@@ -137,7 +137,7 @@ |
||
| 137 | 137 | $allpics = 'ownlogs'; |
| 138 | 138 | } |
| 139 | 139 | if ($allpics == 'ownlogs' || $allpics == 'owncaches') { |
| 140 | - $gallery = ($allpics == 'ownlogs' ? LogPics::FOR_OWNLOGS_GALLERY : LogPics::FOR_OWNCACHES_GALLERY); |
|
| 140 | + $gallery = ($allpics == 'ownlogs' ? LogPics::FOR_OWNLOGS_GALLERY : LogPics::FOR_OWNCACHES_GALLERY); |
|
| 141 | 141 | $all_pictures = LogPics::get($gallery); |
| 142 | 142 | LogPics::setPaging($gallery, 0, 0, "myhome.php?allpics=1"); |
| 143 | 143 | } else { |
@@ -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()); |
@@ -27,6 +27,10 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | if (!function_exists('get_logtype_name')) { |
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * @return string |
|
| 33 | + */ |
|
| 30 | 34 | function get_logtype_name($logtype, $language) |
| 31 | 35 | { |
| 32 | 36 | return sqlValue( |
@@ -504,6 +508,9 @@ discard block |
||
| 504 | 508 | ); |
| 505 | 509 | } |
| 506 | 510 | |
| 511 | +/** |
|
| 512 | + * @param string $watchtext |
|
| 513 | + */ |
|
| 507 | 514 | function insert_recommendation($rLog, $language, $watchtext) |
| 508 | 515 | { |
| 509 | 516 | global $translate; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | // mode switch from plain text to HTML editor => convert HTML special chars |
| 37 | 37 | $text = nl2br(htmlspecialchars($text)); |
| 38 | 38 | // .. and smilies |
| 39 | - $text = ' ' . $text . ' '; // see Redmine #1103 |
|
| 39 | + $text = ' ' . $text . ' '; // see Redmine #1103 |
|
| 40 | 40 | $text = str_replace($smiley['text'], $smiley['spaced_image'], $text); |
| 41 | 41 | if (substr($text, 0, 1) == ' ') { |
| 42 | 42 | $text = substr($text, 1); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | // convert to HTML for storing to database |
| 60 | 60 | // also implemented in okapi/services/logs/submit.php |
| 61 | 61 | $text = nl2br(htmlspecialchars($text, ENT_COMPAT, 'UTF-8')); |
| 62 | - $text = str_replace(' ', ' ', $text); // can produce new ' ' (' ' + ' ') |
|
| 62 | + $text = str_replace(' ', ' ', $text); // can produce new ' ' (' ' + ' ') |
|
| 63 | 63 | $text = str_replace(' ', ' ', $text); |
| 64 | 64 | } else { |
| 65 | 65 | // mode switch from HTML editor to plain text, or decode HTML-encoded plain text |
@@ -510,7 +510,7 @@ |
||
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | if ($coords) { |
| 513 | - $lastcoorddate = $coords[count($coords)-1]['date']; |
|
| 513 | + $lastcoorddate = $coords[count($coords) - 1]['date']; |
|
| 514 | 514 | $coords[] = [ |
| 515 | 515 | 'date' => '0000-00-00', |
| 516 | 516 | 'latitude' => $coords[count($coords) - 1]['latitude'], |