@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | const COMPATIBILITY_XML_ALDIKO = 'aldiko'; |
| 37 | 37 | |
| 38 | - private static $db = NULL; |
|
| 38 | + private static $db = null; |
|
| 39 | 39 | |
| 40 | 40 | public static function isMultipleDatabaseEnabled() |
| 41 | 41 | { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - public static function getDbName($database = NULL) |
|
| 79 | + public static function getDbName($database = null) |
|
| 80 | 80 | { |
| 81 | 81 | global $config; |
| 82 | 82 | if (self::isMultipleDatabaseEnabled()) { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | return ''; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - public static function getDbDirectory($database = NULL) |
|
| 93 | + public static function getDbDirectory($database = null) |
|
| 94 | 94 | { |
| 95 | 95 | global $config; |
| 96 | 96 | if (self::isMultipleDatabaseEnabled()) { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | return $config['calibre_directory']; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - public static function getDbFileName($database = NULL) |
|
| 107 | + public static function getDbFileName($database = null) |
|
| 108 | 108 | { |
| 109 | 109 | return self::getDbDirectory($database) .'metadata.db'; |
| 110 | 110 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | throw new Exception('Database <' . $database . '> not found.'); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - public static function getDb ($database = NULL) |
|
| 120 | + public static function getDb ($database = null) |
|
| 121 | 121 | { |
| 122 | 122 | if (is_null (self::$db)) { |
| 123 | 123 | try { |
@@ -151,22 +151,22 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | public static function clearDb() |
| 153 | 153 | { |
| 154 | - self::$db = NULL; |
|
| 154 | + self::$db = null; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - public static function executeQuerySingle($query, $database = NULL) |
|
| 157 | + public static function executeQuerySingle($query, $database = null) |
|
| 158 | 158 | { |
| 159 | 159 | return self::getDb($database)->query($query)->fetchColumn(); |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - public static function getCountGeneric($table, $id, $pageId, $numberOfString = NULL) |
|
| 162 | + public static function getCountGeneric($table, $id, $pageId, $numberOfString = null) |
|
| 163 | 163 | { |
| 164 | 164 | if (!$numberOfString) { |
| 165 | 165 | $numberOfString = $table . '.alphabetical'; |
| 166 | 166 | } |
| 167 | 167 | $count = self::executeQuerySingle('select count(*) from ' . $table); |
| 168 | 168 | if ($count == 0) { |
| 169 | - return NULL; |
|
| 169 | + return null; |
|
| 170 | 170 | } |
| 171 | 171 | $entry = new Entry(localize($table . '.title'), $id, |
| 172 | 172 | str_format(localize($numberOfString, $count), $count), 'text', |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | return $entryArray; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - public static function executeQuery($query, $columns, $filter, $params, $n, $database = NULL, $numberPerPage = NULL) |
|
| 200 | + public static function executeQuery($query, $columns, $filter, $params, $n, $database = null, $numberPerPage = null) |
|
| 201 | 201 | { |
| 202 | 202 | $totalResult = -1; |
| 203 | 203 | |