@@ -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); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | <?php |
155 | 155 | foreach ($opt['template']['locales'] as $k => $lang) { |
156 | 156 | if ($lang['status'] == OC_LOCALE_ACTIVE) { |
157 | - echo '<a style="text-decoration: none;" href="'.$langUrl . $k . '"><img src="' . $lang['flag'] . |
|
157 | + echo '<a style="text-decoration: none;" href="' . $langUrl . $k . '"><img src="' . $lang['flag'] . |
|
158 | 158 | '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> '; |
159 | 159 | } |
160 | 160 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | } |
184 | 184 | $nLastGroup = $tpl_usercountries[$i]['group']; |
185 | 185 | |
186 | - echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry==$tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
186 | + echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry == $tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
187 | 187 | } |
188 | 188 | ?> |
189 | 189 | </select> |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | </div> <!-- page-container-1 --> |
345 | 345 | |
346 | 346 | </div> <!-- overall --> |
347 | - <?php if($opt['tracking']['googleAnalytics']) { ?> |
|
347 | + <?php if ($opt['tracking']['googleAnalytics']) { ?> |
|
348 | 348 | <script type="text/javascript"> |
349 | 349 | // Set to the same value as the web property used on the site |
350 | 350 | var gaProperty = '<?= $opt['tracking']['googleAnalytics']; ?>'; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | } |
365 | 365 | } |
366 | 366 | </script> |
367 | - <?php if (!$_SERVER['HTTP_DNT']){ ?> |
|
367 | + <?php if (!$_SERVER['HTTP_DNT']) { ?> |
|
368 | 368 | <script type="text/javascript"> |
369 | 369 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
370 | 370 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @subpackage plugins |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__.'/../../../lib2/smiley.inc.php'; |
|
9 | +require_once __DIR__ . '/../../../lib2/smiley.inc.php'; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @param $string |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function toDatabaseArray() |
31 | 31 | { |
32 | 32 | return [ |
33 | - 'id' => (int) $this->id, |
|
33 | + 'id' => (int)$this->id, |
|
34 | 34 | 'email' => $this->email, |
35 | 35 | 'status' => $this->status, |
36 | 36 | 'created' => $this->created, |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function fromDatabaseArray(array $data) |
45 | 45 | { |
46 | - $this->id = (int) $data['id']; |
|
46 | + $this->id = (int)$data['id']; |
|
47 | 47 | $this->email = $data['email']; |
48 | 48 | $this->status = $data['status']; |
49 | 49 | $this->created = $data['created']; |
@@ -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) |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $cursor[$key] = $value; |
72 | 72 | } |
73 | 73 | |
74 | - $logEntry->id = (int) hexdec($cursor['i']); |
|
74 | + $logEntry->id = (int)hexdec($cursor['i']); |
|
75 | 75 | |
76 | 76 | $timeStamp = $entry['__REALTIME_TIMESTAMP']; |
77 | 77 | $logEntry->created = \DateTimeImmutable::createFromFormat( |