@@ -52,7 +52,7 @@ |
||
| 52 | 52 | 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
| 53 | 53 | 'VERSION_FILE' => __DIR__ . '/okapi/meta.php', |
| 54 | 54 | 'OCDE_HTML_PURIFIER_SETTINGS' |
| 55 | - => $opt['html_purifier'], |
|
| 55 | + => $opt['html_purifier'], |
|
| 56 | 56 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
| 57 | 57 | ]; |
| 58 | 58 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$GLOBALS['rootpath'] = __DIR__.'/../'; |
|
| 3 | +$GLOBALS['rootpath'] = __DIR__ . '/../'; |
|
| 4 | 4 | |
| 5 | 5 | require_once __DIR__ . '/../vendor/autoload.php'; |
| 6 | 6 | |
| 7 | -require_once __DIR__ .'/../vendor/opencaching/okapi/okapi/index.php'; |
|
| 7 | +require_once __DIR__ . '/../vendor/opencaching/okapi/okapi/index.php'; |
|
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $config->set( |
| 64 | 64 | 'HTML.ForbiddenElements', |
| 65 | 65 | [ |
| 66 | - 'basefont', // workaround for HTMLPurifier bug, which allows this in the <body> |
|
| 66 | + 'basefont', // workaround for HTMLPurifier bug, which allows this in the <body> |
|
| 67 | 67 | ] |
| 68 | 68 | ); |
| 69 | 69 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // add attributes |
| 99 | 99 | $def->addAttribute('a', 'rel', 'CDATA'); |
| 100 | 100 | $def->addAttribute('img', 'usemap', 'CDATA'); |
| 101 | - $def->addAttribute('map', 'name', 'CDATA'); // workaround for HTMLPurifer bug |
|
| 101 | + $def->addAttribute('map', 'name', 'CDATA'); // workaround for HTMLPurifer bug |
|
| 102 | 102 | |
| 103 | 103 | // create parent object with config |
| 104 | 104 | parent::__construct($config); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $jpegQuality = 80; |
| 12 | 12 | $fontFile = __DIR__ . '/resource2/' . $opt['template']['style'] . '/fonts/dejavu/ttf/DejaVuSans.ttf'; |
| 13 | 13 | |
| 14 | -$userId = isset($_REQUEST['userid']) ? (int) $_REQUEST['userid'] : 0; |
|
| 14 | +$userId = isset($_REQUEST['userid']) ? (int)$_REQUEST['userid'] : 0; |
|
| 15 | 15 | $lang = isset($_REQUEST['lang']) ? mb_strtoupper($_REQUEST['lang']) : $opt['template']['locale']; |
| 16 | 16 | |
| 17 | 17 | if (!isset($opt['locale'][$lang])) { |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $connection = AppKernel::Container()->get(Connection::class); |
| 23 | 23 | |
| 24 | 24 | $fileName = __DIR__ . '/images/statpics/statpic' . $userId . $lang . '.jpg'; |
| 25 | -$userStatisticPicture = (int) $connection->createQueryBuilder() |
|
| 25 | +$userStatisticPicture = (int)$connection->createQueryBuilder() |
|
| 26 | 26 | ->select('COUNT(*)') |
| 27 | 27 | ->from('user_statpic') |
| 28 | 28 | ->where('user_id = :userId') |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | if (is_array($userData)) { |
| 50 | 50 | $username = $userData['username']; |
| 51 | - $found = (int) $userData['found']; |
|
| 52 | - $hidden = (int) $userData['hidden']; |
|
| 53 | - $logo = (int) $userData['statpic_logo']; |
|
| 51 | + $found = (int)$userData['found']; |
|
| 52 | + $hidden = (int)$userData['hidden']; |
|
| 53 | + $logo = (int)$userData['statpic_logo']; |
|
| 54 | 54 | $logoText = $userData['statpic_text']; |
| 55 | 55 | |
| 56 | 56 | $textCounterStatistic = $translate->t('Finds: %1 Hidden: %2', '', '', 0, '', 0, $lang); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | ORDER BY username' |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | -foreach($admins as &$admin) { |
|
| 34 | +foreach ($admins as &$admin) { |
|
| 35 | 35 | $rights = []; |
| 36 | 36 | |
| 37 | 37 | if ($admin['admin'] & ADMIN_TRANSLATE) { |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | // user.last_login gives the overall last login date, including OKAPI logins. |
| 122 | 122 | |
| 123 | 123 | if ($rUser = sql_fetch_assoc($rs)) { |
| 124 | - if ((($this->permanent == true) && (strtotime($rUser['last_login']) + LOGIN_TIME_PERMANENT / 2 < time())) || |
|
| 124 | + if ((($this->permanent == true) && (strtotime($rUser['last_login']) + LOGIN_TIME_PERMANENT / 2 < time())) || |
|
| 125 | 125 | (($this->permanent == false) && (strtotime($rUser['last_login']) + LOGIN_TIME / 2 < time())) |
| 126 | 126 | ) { |
| 127 | 127 | sql( |
@@ -218,10 +218,10 @@ |
||
| 218 | 218 | $entity->nativeName = $data['native_name']; |
| 219 | 219 | $entity->de = $data['de']; |
| 220 | 220 | $entity->en = $data['en']; |
| 221 | - $entity->translationId = (int) $data['trans_id']; |
|
| 222 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
| 223 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
| 224 | - $entity->isTranslated = (bool) $data['is_translated']; |
|
| 221 | + $entity->translationId = (int)$data['trans_id']; |
|
| 222 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
| 223 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
| 224 | + $entity->isTranslated = (bool)$data['is_translated']; |
|
| 225 | 225 | |
| 226 | 226 | return $entity; |
| 227 | 227 | } |
@@ -181,9 +181,9 @@ |
||
| 181 | 181 | $entity->name = $data['name']; |
| 182 | 182 | $entity->de = $data['de']; |
| 183 | 183 | $entity->en = $data['en']; |
| 184 | - $entity->translationId = (int) $data['trans_id']; |
|
| 185 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
| 186 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
| 184 | + $entity->translationId = (int)$data['trans_id']; |
|
| 185 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
| 186 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
| 187 | 187 | $entity->sortDe = $data['sort_de']; |
| 188 | 188 | $entity->sortEn = $data['sort_en']; |
| 189 | 189 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | public static function fromEMail($email) |
| 28 | 28 | { |
| 29 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `email`='&1'", 0, $email); |
|
| 29 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `email`='&1'", 0, $email); |
|
| 30 | 30 | if ($userId === 0) { |
| 31 | 31 | return null; |
| 32 | 32 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public static function fromUsername($username) |
| 43 | 43 | { |
| 44 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
| 44 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
| 45 | 45 | if ($userId === 0) { |
| 46 | 46 | return null; |
| 47 | 47 | } |