@@ -143,9 +143,9 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | $fnl = strlen($filename); |
| 146 | - $fh = "\x14\x00"; // ver needed to extract |
|
| 147 | - $fh .= "\x00\x00"; // gen purpose bit flag |
|
| 148 | - $fh .= "\x08\x00"; // compression method |
|
| 146 | + $fh = "\x14\x00"; // ver needed to extract |
|
| 147 | + $fh .= "\x00\x00"; // gen purpose bit flag |
|
| 148 | + $fh .= "\x08\x00"; // compression method |
|
| 149 | 149 | $fh .= "\x00\x00\x00\x00"; // last mod time and date |
| 150 | 150 | $fh .= |
| 151 | 151 | pack( |
@@ -172,16 +172,16 @@ discard block |
||
| 172 | 172 | "va*v3V2", |
| 173 | 173 | 0, |
| 174 | 174 | $fh, |
| 175 | - 0, // file comment length |
|
| 176 | - 0, // disk number start |
|
| 177 | - 0, // internal file attributes |
|
| 178 | - $attr, // external file attributes - 'archive/directory' bit set |
|
| 175 | + 0, // file comment length |
|
| 176 | + 0, // disk number start |
|
| 177 | + 0, // internal file attributes |
|
| 178 | + $attr, // external file attributes - 'archive/directory' bit set |
|
| 179 | 179 | $this->offset |
| 180 | 180 | ) . $filename; |
| 181 | 181 | |
| 182 | 182 | $this->offset += 42 + $fnl + $gzsize; |
| 183 | 183 | $this->cdir[] = $cdir; |
| 184 | - $this->cnt ++; |
|
| 184 | + $this->cnt++; |
|
| 185 | 185 | $this->idx = $this->cnt - 1; |
| 186 | 186 | } |
| 187 | 187 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $cdsl, // size of central dir |
| 231 | 231 | $zdsl, // offset to start of central dir |
| 232 | 232 | 0 |
| 233 | - ); // .zip file comment length |
|
| 233 | + ); // .zip file comment length |
|
| 234 | 234 | return $this->zipfile; |
| 235 | 235 | } |
| 236 | 236 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public $main_template = 'sys_main'; |
| 20 | 20 | public $bench = null; |
| 21 | 21 | public $compile_id = null; |
| 22 | - public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
| 22 | + public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
| 23 | 23 | public $title = ''; |
| 24 | 24 | public $menuitem = null; |
| 25 | 25 | public $nowpsearch = false; |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | $errorlog_dir = __DIR__ . '/../var/errorlog'; |
| 135 | 135 | $errorlog_path = $errorlog_dir . '/errorlog-' . date('Y-m-d'); |
| 136 | 136 | |
| 137 | - $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile |
|
| 137 | + $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile |
|
| 138 | 138 | |
| 139 | 139 | // All errors which may happen here are ignored, to avoid error recursions. |
| 140 | 140 | |
@@ -608,7 +608,7 @@ |
||
| 608 | 608 | $pid_daemon = fgets($pidfile, 20); |
| 609 | 609 | fclose($pidfile); |
| 610 | 610 | |
| 611 | - $pid_daemon = (int) $pid_daemon; |
|
| 611 | + $pid_daemon = (int)$pid_daemon; |
|
| 612 | 612 | |
| 613 | 613 | // process running? |
| 614 | 614 | if (posix_kill($pid_daemon, 0)) { |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | // decide if the cache is new |
| 87 | 87 | $dDiff = dateDiff('d', $rCache['date_created'], date('Y-m-d')); |
| 88 | 88 | |
| 89 | - $rCache['isnew'] = ($dDiff <= NEWCACHES_DAYS && (int) $rCache['type'] !== 6); |
|
| 89 | + $rCache['isnew'] = ($dDiff <= NEWCACHES_DAYS && (int)$rCache['type'] !== 6); |
|
| 90 | 90 | |
| 91 | 91 | // get last logs |
| 92 | 92 | if ($options['sort'] != 'bymylastlog' || !$login->logged_in()) { |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $page = $opt['page']; |
| 54 | 54 | $url = ($page['https']['mode'] == HTTPS_ENFORCED ? $page['absolute_https_url'] : $page['absolute_http_url']); |
| 55 | 55 | |
| 56 | - $url = urlencode($url. 'sitemap.xml'); |
|
| 56 | + $url = urlencode($url . 'sitemap.xml'); |
|
| 57 | 57 | |
| 58 | 58 | $this->pingSearchEngine('http://www.google.com/webmasters/ping?sitemap=' . $url); |
| 59 | 59 | $this->pingSearchEngine( |
@@ -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 | } |
@@ -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); |