@@ -43,11 +43,11 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | //get the posted data |
| 45 | 45 | $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0; |
| 46 | - $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop |
|
| 46 | + $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop |
|
| 47 | 47 | |
| 48 | - $hints = isset($_POST['hints']) ? trim($_POST['hints']) : ''; // Ocprop |
|
| 49 | - $sel_lang = isset($_POST['desc_lang']) ? trim($_POST['desc_lang']) : $default_lang; // Ocprop |
|
| 50 | - $desc = isset($_POST['desc']) ? trim($_POST['desc']) : ''; // Ocprop |
|
| 48 | + $hints = isset($_POST['hints']) ? trim($_POST['hints']) : ''; // Ocprop |
|
| 49 | + $sel_lang = isset($_POST['desc_lang']) ? trim($_POST['desc_lang']) : $default_lang; // Ocprop |
|
| 50 | + $desc = isset($_POST['desc']) ? trim($_POST['desc']) : ''; // Ocprop |
|
| 51 | 51 | |
| 52 | 52 | // read descMode; if not set, initialize from user profile |
| 53 | 53 | if (isset($_POST['descMode'])) { // Ocprop |
@@ -212,8 +212,7 @@ discard block |
||
| 212 | 212 | tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8')); |
| 213 | 213 | tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8')); |
| 214 | 214 | |
| 215 | - tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : |
|
| 216 | - (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : '')); |
|
| 215 | + tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : '')); |
|
| 217 | 216 | |
| 218 | 217 | tpl_set_var('show_all_langs', $show_all_langs); |
| 219 | 218 | tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : ''); |
@@ -235,7 +234,7 @@ discard block |
||
| 235 | 234 | $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
| 236 | 235 | tpl_set_var('htmlheaders', $headers); |
| 237 | 236 | |
| 238 | - tpl_set_var('reset', $reset); // obsolete |
|
| 237 | + tpl_set_var('reset', $reset); // obsolete |
|
| 239 | 238 | tpl_set_var('submit', $submit); |
| 240 | 239 | } |
| 241 | 240 | } else { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | /** |
| 100 | 100 | * @param $filename |
| 101 | 101 | * @param $maxLength |
| 102 | - * @return bool|string |
|
| 102 | + * @return false|string |
|
| 103 | 103 | */ |
| 104 | 104 | function read_file($filename, $maxLength = 4096) |
| 105 | 105 | { |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | * format number with 1000s dots |
| 266 | 266 | * |
| 267 | 267 | * @param $n |
| 268 | - * @return mixed|string |
|
| 268 | + * @return string |
|
| 269 | 269 | */ |
| 270 | 270 | function number1000($n) |
| 271 | 271 | { |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | */ |
| 10 | 10 | function is_valid_email_address($eMail) |
| 11 | 11 | { |
| 12 | - return (int) ($eMail === filter_var($eMail, FILTER_VALIDATE_EMAIL)); |
|
| 12 | + return (int)($eMail === filter_var($eMail, FILTER_VALIDATE_EMAIL)); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | /** |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | function escape_javascript($text) |
| 206 | 206 | { |
| 207 | 207 | return str_replace( |
| 208 | - ['\'', '"',], |
|
| 208 | + ['\'', '"', ], |
|
| 209 | 209 | ['\\\'', '"'], |
| 210 | 210 | $text |
| 211 | 211 | ); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | // get cacheid |
| 47 | 47 | $cacheid = 0; |
| 48 | 48 | if (isset($_REQUEST['cacheid'])) { |
| 49 | - $cacheid = (int) $_REQUEST['cacheid']; |
|
| 49 | + $cacheid = (int)$_REQUEST['cacheid']; |
|
| 50 | 50 | } else { |
| 51 | 51 | if (isset($_REQUEST['uuid'])) { |
| 52 | 52 | $cacheid = cache::cacheIdFromUUID($_REQUEST['uuid']); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | <?php |
| 156 | 156 | foreach ($opt['template']['locales'] as $k => $lang) { |
| 157 | 157 | if ($lang['status'] == OC_LOCALE_ACTIVE) { |
| 158 | - echo '<a style="text-decoration: none;" href="'.$langUrl . $k . '"><img src="' . $lang['flag'] . |
|
| 158 | + echo '<a style="text-decoration: none;" href="' . $langUrl . $k . '"><img src="' . $lang['flag'] . |
|
| 159 | 159 | '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> '; |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | $nLastGroup = $tpl_usercountries[$i]['group']; |
| 186 | 186 | |
| 187 | - 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 | + 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>'; |
|
| 188 | 188 | } |
| 189 | 189 | ?> |
| 190 | 190 | </select> |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | </div> <!-- page-container-1 --> |
| 346 | 346 | |
| 347 | 347 | </div> <!-- overall --> |
| 348 | - <?php if($opt['tracking']['googleAnalytics']) { ?> |
|
| 348 | + <?php if ($opt['tracking']['googleAnalytics']) { ?> |
|
| 349 | 349 | <script type="text/javascript"> |
| 350 | 350 | // Set to the same value as the web property used on the site |
| 351 | 351 | var gaProperty = '<?= $opt['tracking']['googleAnalytics']; ?>'; |
@@ -190,14 +190,14 @@ |
||
| 190 | 190 | $tpl->assign( |
| 191 | 191 | 'other_report_in_progress', |
| 192 | 192 | sql_value( |
| 193 | - "SELECT `id` |
|
| 193 | + "SELECT `id` |
|
| 194 | 194 | FROM `cache_reports` |
| 195 | 195 | WHERE `cacheid`='&1' AND `id`<>'&2' AND `status`='&3' |
| 196 | 196 | LIMIT 1", |
| 197 | - null, |
|
| 198 | - $record['cacheid'], |
|
| 199 | - $record['id'], |
|
| 200 | - CACHE_REPORT_INPROGRESS |
|
| 197 | + null, |
|
| 198 | + $record['cacheid'], |
|
| 199 | + $record['id'], |
|
| 200 | + CACHE_REPORT_INPROGRESS |
|
| 201 | 201 | ) !== null |
| 202 | 202 | ); |
| 203 | 203 | |
@@ -6,36 +6,36 @@ |
||
| 6 | 6 | * Common error messages |
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | - define('ERROR_UNKNOWN', 1000); |
|
| 10 | - define('ERROR_TEMPLATE_NOT_FOUND', 1001); |
|
| 11 | - define('ERROR_COMPILATION_FAILED', 1002); |
|
| 12 | - define('ERROR_NO_ACCESS', 1003); |
|
| 13 | - define('ERROR_INVALID_OPERATION', 1004); |
|
| 14 | - define('ERROR_LOGIN_REQUIRED', 1005); |
|
| 15 | - define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006); |
|
| 16 | - define('ERROR_NO_COOKIES', 1007); |
|
| 17 | - define('ERROR_ALREADY_LOGGEDIN', 1008); |
|
| 18 | - define('ERROR_USER_NOT_ACTIVE', 1009); |
|
| 19 | - define('ERROR_USER_NO_EMAIL', 1010); |
|
| 20 | - define('ERROR_CACHE_NOT_PUBLISHED', 1011); |
|
| 21 | - define('ERROR_CACHE_LOCKED', 1012); |
|
| 9 | + define('ERROR_UNKNOWN', 1000); |
|
| 10 | + define('ERROR_TEMPLATE_NOT_FOUND', 1001); |
|
| 11 | + define('ERROR_COMPILATION_FAILED', 1002); |
|
| 12 | + define('ERROR_NO_ACCESS', 1003); |
|
| 13 | + define('ERROR_INVALID_OPERATION', 1004); |
|
| 14 | + define('ERROR_LOGIN_REQUIRED', 1005); |
|
| 15 | + define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006); |
|
| 16 | + define('ERROR_NO_COOKIES', 1007); |
|
| 17 | + define('ERROR_ALREADY_LOGGEDIN', 1008); |
|
| 18 | + define('ERROR_USER_NOT_ACTIVE', 1009); |
|
| 19 | + define('ERROR_USER_NO_EMAIL', 1010); |
|
| 20 | + define('ERROR_CACHE_NOT_PUBLISHED', 1011); |
|
| 21 | + define('ERROR_CACHE_LOCKED', 1012); |
|
| 22 | 22 | |
| 23 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013); |
|
| 24 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014); |
|
| 25 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015); |
|
| 23 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013); |
|
| 24 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014); |
|
| 25 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015); |
|
| 26 | 26 | |
| 27 | - define('ERROR_DB_COULD_NOT_RECONNECT', 1016); |
|
| 28 | - define('ERROR_DB_NO_ROOT', 1017); |
|
| 27 | + define('ERROR_DB_COULD_NOT_RECONNECT', 1016); |
|
| 28 | + define('ERROR_DB_NO_ROOT', 1017); |
|
| 29 | 29 | |
| 30 | - define('ERROR_USER_NOT_EXISTS', 1018); |
|
| 31 | - define('ERROR_CACHE_NOT_EXISTS', 1019); |
|
| 32 | - define('ERROR_CACHELOG_NOT_EXISTS', 1020); |
|
| 33 | - define('ERROR_PICTURE_NOT_EXISTS', 1021); |
|
| 30 | + define('ERROR_USER_NOT_EXISTS', 1018); |
|
| 31 | + define('ERROR_CACHE_NOT_EXISTS', 1019); |
|
| 32 | + define('ERROR_CACHELOG_NOT_EXISTS', 1020); |
|
| 33 | + define('ERROR_PICTURE_NOT_EXISTS', 1021); |
|
| 34 | 34 | |
| 35 | - define('ERROR_UPLOAD_ERR_NO_FILE', 1022); |
|
| 36 | - define('ERROR_UPLOAD_ERR_SIZE', 1023); |
|
| 37 | - define('ERROR_UPLOAD_ERR_TYPE', 1024); |
|
| 38 | - define('ERROR_UPLOAD_UNKNOWN', 1025); |
|
| 39 | - define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026); |
|
| 35 | + define('ERROR_UPLOAD_ERR_NO_FILE', 1022); |
|
| 36 | + define('ERROR_UPLOAD_ERR_SIZE', 1023); |
|
| 37 | + define('ERROR_UPLOAD_ERR_TYPE', 1024); |
|
| 38 | + define('ERROR_UPLOAD_UNKNOWN', 1025); |
|
| 39 | + define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026); |
|
| 40 | 40 | |
| 41 | - define('ERROR_WRONG_NODE', 1027); |
|
| 41 | + define('ERROR_WRONG_NODE', 1027); |
|
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | } else { |
| 87 | 87 | $position = PHP_INT_MAX; |
| 88 | 88 | } |
| 89 | - $position = min($position, $allpics ? $allpics[count($allpics)-1]['seq'] + 1 : 1); |
|
| 89 | + $position = min($position, $allpics ? $allpics[count($allpics) - 1]['seq'] + 1 : 1); |
|
| 90 | 90 | |
| 91 | 91 | // uploaded file ok? |
| 92 | 92 | if (isset($_REQUEST['ok'])) { // Ocprop |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | } |
| 234 | 234 | $tpl->assign('allpics', $allpics); |
| 235 | 235 | $tpl->assign('position', $position); |
| 236 | - $tpl->assign('appendseq', $allpics ? $allpics[count($allpics)-1]['seq']+1 : 1); |
|
| 236 | + $tpl->assign('appendseq', $allpics ? $allpics[count($allpics) - 1]['seq'] + 1 : 1); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | $rsCache = sql("SELECT `wp_oc`, `name` FROM `caches` WHERE `cache_id`='&1'", $picture->getCacheId()); |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | \set_php_locale(); |
| 81 | 81 | |
| 82 | 82 | if ($this->translate->t('INTERNAL_LANG', 'all', 'OcSmarty.class.php', '') !== $sLanguage) { |
| 83 | - echo 'setlocale() failed to set language to ' . $sLanguage ."\n"; |
|
| 83 | + echo 'setlocale() failed to set language to ' . $sLanguage . "\n"; |
|
| 84 | 84 | die("Is the translation of INTERNAL_LANG correct?\n"); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -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 |