Fix database title with multiple database. re #40
这个提交存在于:
父节点
16c85418c0
当前提交
1a501e3c6c
共有 1 个文件被更改,包括 13 次插入 和 1 次删除
12
base.php
12
base.php
|
|
@ -380,6 +380,8 @@ class Page
|
|||
}
|
||||
}
|
||||
$this->entryArray = array_merge ($this->entryArray, Book::getCount());
|
||||
|
||||
if (!is_null ($database)) $this->title = Base::getDbName ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -626,6 +628,16 @@ abstract class Base
|
|||
}
|
||||
}
|
||||
|
||||
public static function getDbName ($database = NULL) {
|
||||
global $config;
|
||||
if (is_array ($config['calibre_directory'])) {
|
||||
if (is_null ($database)) $database = GetUrlParam (DB, 0);
|
||||
$array = array_keys ($config['calibre_directory']);
|
||||
return $array[$database];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static function getDbDirectory ($database = NULL) {
|
||||
global $config;
|
||||
if (is_array ($config['calibre_directory'])) {
|
||||
|
|
|
|||
正在加载…
添加表格
添加链接
在新工单中引用