Merge pull request #506 from DakuTree/bugfixes
Fixes #505 & other small fixes
This commit is contained in:
commit
6c304420a6
@ -1168,6 +1168,7 @@ class Tag {
|
||||
*/
|
||||
public static function resolve_alias($tag) {
|
||||
assert('is_string($tag)');
|
||||
global $database;
|
||||
|
||||
$negative = false;
|
||||
if(!empty($tag) && ($tag[0] == '-')) {
|
||||
@ -1175,14 +1176,18 @@ class Tag {
|
||||
$tag = substr($tag, 1);
|
||||
}
|
||||
|
||||
global $database;
|
||||
|
||||
$newtag = $database->get_one(
|
||||
$database->scoreql_to_sql("SELECT newtag FROM aliases WHERE SCORE_STRNORM(oldtag)=SCORE_STRNORM(:tag)"),
|
||||
array("tag"=>$tag));
|
||||
array("tag"=>$tag)
|
||||
);
|
||||
|
||||
if(empty($newtag)) {
|
||||
//tag has no alias, use old tag
|
||||
$newtag = $tag;
|
||||
}
|
||||
return $negative ? "-$newtag" : $newtag;
|
||||
|
||||
return !$negative ? $newtag : preg_replace("/(\S+)/", "-$1", $newtag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1276,7 +1276,8 @@ function list_files(/*string*/ $base, $_sub_dir="") {
|
||||
// ignore
|
||||
}
|
||||
else if(is_dir($full_path)) {
|
||||
if($filename == "." || $filename == "..") {
|
||||
if(!($filename == "." || $filename == "..")) {
|
||||
//subdirectory found
|
||||
$file_list = array_merge(
|
||||
$file_list,
|
||||
list_files($base, "$_sub_dir/$filename")
|
||||
|
@ -24,6 +24,12 @@ class BulkAdd extends Extension {
|
||||
$list = add_dir($_POST['dir']);
|
||||
if(strlen($list) > 0) {
|
||||
$this->theme->add_status("Adding files", $list);
|
||||
} else {
|
||||
if(is_dir($_POST['dir'])) {
|
||||
$this->theme->add_status("No files in directory", "No files exists in specified directory ({$_POST['dir']}).");
|
||||
} else {
|
||||
$this->theme->add_status("Directory does not exist", "Specified directory does not exist ({$_POST['dir']}).");
|
||||
}
|
||||
}
|
||||
$this->theme->display_upload_results($page);
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ class PoolsTheme extends Themelet {
|
||||
<br><a href="'.make_link("pool/updated").'">Pool Changes</a>
|
||||
';
|
||||
|
||||
$page->add_block(new Block($nav_html, null, "left", 5));
|
||||
$page->add_block(new Block($nav_html, null, "left", 5, "indexnavleft"));
|
||||
$page->add_block(new Block("Pool Navigation", $poolnav_html, "left", 10));
|
||||
|
||||
if(count($pools) == 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user