@@ -62,7 +62,7 @@ |
||
62 | 62 | $sXML .= '<lastmod>' . xmlentities(date('c', $dLastMod)) . '</lastmod>'; |
63 | 63 | $sXML .= '<changefreq>' . xmlentities($sChangeFreq) . '</changefreq>'; |
64 | 64 | $sXML .= '<priority>' . xmlentities($nPriority) . '</priority>'; |
65 | - $sXML .= '</url>'."\n"; |
|
65 | + $sXML .= '</url>' . "\n"; |
|
66 | 66 | |
67 | 67 | $this->writeInternal($sXML); |
68 | 68 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | |
293 | 293 | /** |
294 | 294 | * @param integer $id |
295 | - * @param $name |
|
295 | + * @param string $name |
|
296 | 296 | */ |
297 | 297 | public function checkGeoKretType($id, $name) |
298 | 298 | { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | /** |
308 | 308 | * @param integer $id |
309 | - * @param $name |
|
309 | + * @param string $name |
|
310 | 310 | */ |
311 | 311 | public function checkUser($id, $name) |
312 | 312 | { |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | |
321 | 321 | /** |
322 | 322 | * @param integer $id |
323 | - * @param $name |
|
323 | + * @param string $name |
|
324 | 324 | */ |
325 | 325 | public function checkMoveType($id, $name) |
326 | 326 | { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * @param string $okapiVarDir |
24 | 24 | */ |
25 | - public function __construct($okapiVarDir = __DIR__.'/../../../var/okapi') |
|
25 | + public function __construct($okapiVarDir = __DIR__ . '/../../../var/okapi') |
|
26 | 26 | { |
27 | 27 | $this->okapiVarDir = $okapiVarDir; |
28 | 28 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | $tpl->menuitem = MNU_CACHES_ADDTOLIST; |
10 | 10 | |
11 | 11 | $login->verify(); |
12 | -if ($login->userid == 0) { |
|
12 | +if ($login->userid == 0) { |
|
13 | 13 | $tpl->redirect_login(); |
14 | 14 | } |
15 | 15 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $default_list = isset($_REQUEST['listid']) ? (int)$_REQUEST['listid'] : cachelist::getMyLastAddedToListId(); |
33 | 33 | |
34 | 34 | if (isset($_REQUEST['save'], $_REQUEST['listid'])) { |
35 | - $listId = (int) $_REQUEST['listid']; |
|
35 | + $listId = (int)$_REQUEST['listid']; |
|
36 | 36 | if ($listId === 0) { |
37 | 37 | $cacheList = new cachelist(ID_NEW, $login->userid); |
38 | 38 | $name_error = $cacheList->setNameAndVisibility($newListName, $newListPublic ? 2 : 0); |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'listbyuser'; |
17 | -$cacheId = isset($_REQUEST['cacheid']) ? (int) $_REQUEST['cacheid'] : 0; |
|
17 | +$cacheId = isset($_REQUEST['cacheid']) ? (int)$_REQUEST['cacheid'] : 0; |
|
18 | 18 | $tpl->assign('action', $action); |
19 | 19 | $tpl->assign('error', ''); |
20 | 20 | if (isset($_REQUEST['cacheid'])) { |
21 | - $tpl->assign('cacheid', (int) $_REQUEST['cacheid']); |
|
21 | + $tpl->assign('cacheid', (int)$_REQUEST['cacheid']); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if ($action === 'listbycache') { |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | } elseif ($action === 'add') { |
27 | 27 | $tpl->assign('action', 'listbycache'); |
28 | 28 | |
29 | - $tou = isset($_REQUEST['tou']) ? (int) $_REQUEST['tou'] : 0; |
|
30 | - $submit = isset($_REQUEST['submit']) ? (int) $_REQUEST['submit'] : 0; |
|
29 | + $tou = isset($_REQUEST['tou']) ? (int)$_REQUEST['tou'] : 0; |
|
30 | + $submit = isset($_REQUEST['submit']) ? (int)$_REQUEST['submit'] : 0; |
|
31 | 31 | |
32 | 32 | $username = isset($_REQUEST['username']) ? $_REQUEST['username'] : ''; |
33 | 33 | $tpl->assign('adoptusername', $username); |
34 | 34 | |
35 | 35 | if ($submit === 1) { |
36 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
36 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
37 | 37 | if ($userId === 0) { |
38 | 38 | $tpl->assign('error', 'userunknown'); |
39 | 39 | } elseif ($tou !== 1) { |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | |
46 | 46 | listRequestsByCacheId($cacheId); |
47 | 47 | } elseif ($action === 'cancel') { |
48 | - $userId = isset($_REQUEST['userid']) ? (int) $_REQUEST['userid']: 0; |
|
48 | + $userId = isset($_REQUEST['userid']) ? (int)$_REQUEST['userid'] : 0; |
|
49 | 49 | cancelRequest($cacheId, $userId); |
50 | 50 | } elseif ($action === 'commit') { |
51 | - $submit = isset($_REQUEST['submit']) ? (int) $_REQUEST['submit'] : 0; |
|
52 | - $tou = isset($_REQUEST['tou']) ? (int) $_REQUEST['tou'] : 0; |
|
51 | + $submit = isset($_REQUEST['submit']) ? (int)$_REQUEST['submit'] : 0; |
|
52 | + $tou = isset($_REQUEST['tou']) ? (int)$_REQUEST['tou'] : 0; |
|
53 | 53 | |
54 | 54 | if ($submit === 1 && $tou === 1) { |
55 | 55 | commitRequest($cacheId); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | $cache = null; |
13 | 13 | if (isset($_REQUEST['cacheid'])) { |
14 | - $cacheId = (int) $_REQUEST['cacheid']; |
|
14 | + $cacheId = (int)$_REQUEST['cacheid']; |
|
15 | 15 | $cache = new cache($cacheId); |
16 | 16 | } else { |
17 | 17 | if (isset($_REQUEST['uuid'])) { |
@@ -162,7 +162,7 @@ |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | - * @param int|bool $privilege |
|
165 | + * @param integer $privilege |
|
166 | 166 | * @return bool |
167 | 167 | */ |
168 | 168 | public function hasAdminPriv($privilege = false) |
@@ -162,7 +162,7 @@ |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | - * @param int|bool $privilege |
|
165 | + * @param integer $privilege |
|
166 | 166 | * @return bool |
167 | 167 | */ |
168 | 168 | public function hasAdminPriv($privilege = false) |
@@ -15,13 +15,13 @@ |
||
15 | 15 | |
16 | 16 | use OcLegacy\Util\PasswordCrypt; |
17 | 17 | |
18 | -define('LOGIN_UNKNOWN_ERROR', -1); // unknown error occurred |
|
19 | -define('LOGIN_OK', 0); // login succeeded |
|
20 | -define('LOGIN_BADUSERPW', 1); // bad username or password |
|
21 | -define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
22 | -define('LOGIN_USERNOTACTIVE', 3); // the userAccount locked |
|
18 | +define('LOGIN_UNKNOWN_ERROR', -1); // unknown error occurred |
|
19 | +define('LOGIN_OK', 0); // login succeeded |
|
20 | +define('LOGIN_BADUSERPW', 1); // bad username or password |
|
21 | +define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
22 | +define('LOGIN_USERNOTACTIVE', 3); // the userAccount locked |
|
23 | 23 | define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty |
24 | -define('LOGIN_LOGOUT_OK', 5); // logout was successful |
|
24 | +define('LOGIN_LOGOUT_OK', 5); // logout was successful |
|
25 | 25 | |
26 | 26 | // login times in seconds |
27 | 27 | define('LOGIN_TIME', 60 * 60); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | isset($_REQUEST['desclang']) && |
23 | 23 | !isset($_REQUEST['descid'])) { // Ocprop |
24 | 24 | |
25 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
26 | - $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
25 | + $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
26 | + $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
27 | 27 | |
28 | 28 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
29 | 29 | if (mysql_num_rows($rs) == 1) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | //save to DB? |
90 | 90 | if (isset($_POST['post'])) { // Ocprop |
91 | 91 | //here we read all used information from the form if submitted |
92 | - $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
92 | + $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
93 | 93 | |
94 | 94 | // fuer alte Versionen von OCProp |
95 | 95 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $oldDescMode = $descMode; |
123 | 123 | } |
124 | 124 | |
125 | - $short_desc = trim($_POST['short_desc']); // Ocprop |
|
125 | + $short_desc = trim($_POST['short_desc']); // Ocprop |
|
126 | 126 | $hint = htmlspecialchars(trim($_POST['hints']), ENT_COMPAT, 'UTF-8'); |
127 | 127 | $desclang = $_POST['desclang']; |
128 | 128 | $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | // Text from textarea |
140 | - $desc = trim($_POST['desc']); // Ocprop |
|
140 | + $desc = trim($_POST['desc']); // Ocprop |
|
141 | 141 | |
142 | 142 | // fuer alte Versionen von OCProp |
143 | 143 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8')); |
297 | 297 | tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8')); |
298 | 298 | tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8')); |
299 | - tpl_set_var('reset', $reset); // obsolete |
|
299 | + tpl_set_var('reset', $reset); // obsolete |
|
300 | 300 | tpl_set_var('submit', $submit); |
301 | 301 | |
302 | 302 | // Text / normal HTML / HTML editor |