Simplify a little getLink
This commit is contained in:
parent
133b6dc9d6
commit
e67e620ba3
2 changed files with 8 additions and 2 deletions
7
base.php
7
base.php
|
@ -1072,6 +1072,13 @@ abstract class Base
|
|||
return is_array ($config['calibre_directory']);
|
||||
}
|
||||
|
||||
public static function useAbsolutePath () {
|
||||
global $config;
|
||||
$path = self::getDbDirectory();
|
||||
return preg_match ('/^\//', Base::getDbDirectory ()) || // Linux /
|
||||
preg_match ('/^\w\:/', Base::getDbDirectory ()); // Windows X:
|
||||
}
|
||||
|
||||
public static function noDatabaseSelected () {
|
||||
return self::isMultipleDatabaseEnabled () && is_null (GetUrlParam (DB));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue