@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | $result = ""; |
| 29 | 29 | |
| 30 | 30 | while ($pos < strlen($s)) { |
| 31 | - $c1 = ord($s[$pos ++]); |
|
| 31 | + $c1 = ord($s[$pos++]); |
|
| 32 | 32 | if ($c1 < 0xC0) { |
| 33 | 33 | $result .= chr($c1); |
| 34 | 34 | } elseif ($pos < strlen($s)) { |
| 35 | - $c2 = ord($s[$pos ++]); |
|
| 35 | + $c2 = ord($s[$pos++]); |
|
| 36 | 36 | if ($c1 < 0xE0) { |
| 37 | 37 | $code = 0x40 * ($c1 & 0x1F) + ($c2 & 0x3F); |
| 38 | 38 | if ($code < 0x100) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $result .= "?"; |
| 47 | 47 | } |
| 48 | 48 | } elseif ($pos < strlen($s)) { |
| 49 | - $c3 = ord($s[$pos ++]); |
|
| 49 | + $c3 = ord($s[$pos++]); |
|
| 50 | 50 | $code = 0x1000 * ($c1 & 0x0F) + 0x40 * ($c2 & 0x3F) + ($c3 & 0x3F); |
| 51 | 51 | switch ($code) { |
| 52 | 52 | case 0x2026: |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | $config->set('Attr.IDPrefix', 'custom_'); |
| 51 | 51 | |
| 52 | 52 | // enable 'display' and 'visibility' styles for mystery descriptions |
| 53 | - $config->set('CSS.AllowTricky', true); // + display, visibility, overflow |
|
| 54 | - $config->set('CSS.ForbiddenProperties', 'overflow'); // - overflow |
|
| 53 | + $config->set('CSS.AllowTricky', true); // + display, visibility, overflow |
|
| 54 | + $config->set('CSS.ForbiddenProperties', 'overflow'); // - overflow |
|
| 55 | 55 | |
| 56 | 56 | // prepare additional definitions |
| 57 | 57 | $def = $config->getHTMLDefinition(true); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ); // HTML5 attribs currently not supported by TinyMCE |
| 66 | 66 | $def->addElement('legend', 'Inline', 'Flow', 'Common'); |
| 67 | 67 | $def->addElement('q', 'Inline', 'Inline', 'Common', ['cite' => 'URI']); |
| 68 | - $def->addElement('strike', 'Inline', 'Inline', 'Common'); // -> wird in CSS umgewandelt |
|
| 68 | + $def->addElement('strike', 'Inline', 'Inline', 'Common'); // -> wird in CSS umgewandelt |
|
| 69 | 69 | $def->addElement( |
| 70 | 70 | 'area', |
| 71 | 71 | 'Inline', |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | if ($opt['session']['check_referer']) { |
| 53 | 53 | if (isset($_SERVER['REFERER'])) { |
| 54 | - if (strtolower(substr('http' + strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) { |
|
| 54 | + if (strtolower(substr('http' +strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) { |
|
| 55 | 55 | $this->createNewSession(); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | global $login; |
| 31 | 31 | |
| 32 | 32 | $fields = |
| 33 | - "`pics`.`uuid` AS `pic_uuid`, |
|
| 33 | + "`pics`.`uuid` AS `pic_uuid`, |
|
| 34 | 34 | `pics`.`url` AS `pic_url`, |
| 35 | 35 | `pics`.`title`, |
| 36 | 36 | `pics`.`date_created`, |
@@ -17,12 +17,12 @@ |
||
| 17 | 17 | const FOR_STARTPAGE_GALLERY = 1; |
| 18 | 18 | const FOR_NEWPICS_GALLERY = 2; |
| 19 | 19 | const FOR_USER_STAT = 3; |
| 20 | - const FOR_USER_GALLERY = 4; // params: userid |
|
| 20 | + const FOR_USER_GALLERY = 4; // params: userid |
|
| 21 | 21 | const FOR_MYHOME_GALLERY = 5; |
| 22 | - const FOR_CACHE_STAT = 6; // params: cacheid |
|
| 23 | - const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
| 22 | + const FOR_CACHE_STAT = 6; // params: cacheid |
|
| 23 | + const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
| 24 | 24 | |
| 25 | - const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
| 25 | + const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | public static function get($purpose, $userid = 0, $cacheid = 0) |
@@ -91,28 +91,28 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $allowed_logtypes = array(); |
| 93 | 93 | if ($owner || $admin_report || $admin_locked) { |
| 94 | - $allowed_logtypes[] = 3; // note |
|
| 94 | + $allowed_logtypes[] = 3; // note |
|
| 95 | 95 | } |
| 96 | 96 | if (($owner && $statuslogs) || $admin_report) { |
| 97 | 97 | if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) { |
| 98 | - $allowed_logtypes[] = 10; // ready for search |
|
| 99 | - $allowed_logtypes[] = 11; // temporarily not available |
|
| 100 | - $allowed_logtypes[] = 9; // archived |
|
| 101 | - $allowed_logtypes[] = 13; // locked |
|
| 98 | + $allowed_logtypes[] = 10; // ready for search |
|
| 99 | + $allowed_logtypes[] = 11; // temporarily not available |
|
| 100 | + $allowed_logtypes[] = 9; // archived |
|
| 101 | + $allowed_logtypes[] = 13; // locked |
|
| 102 | 102 | } |
| 103 | 103 | if ($admin_report || $old_logtype == 14) { |
| 104 | 104 | $allowed_logtypes[] = 14; |
| 105 | 105 | } // locked, invisible |
| 106 | 106 | } |
| 107 | 107 | if ($cache_type == 6) { // event |
| 108 | - $allowed_logtypes[] = 8; // will attend |
|
| 109 | - $allowed_logtypes[] = 7; // attended |
|
| 108 | + $allowed_logtypes[] = 8; // will attend |
|
| 109 | + $allowed_logtypes[] = 7; // attended |
|
| 110 | 110 | } else { |
| 111 | - $allowed_logtypes[] = 1; // found |
|
| 112 | - $allowed_logtypes[] = 2; // not found |
|
| 111 | + $allowed_logtypes[] = 1; // found |
|
| 112 | + $allowed_logtypes[] = 2; // not found |
|
| 113 | 113 | } |
| 114 | 114 | if (!($owner || $admin_report || $admin_locked)) { |
| 115 | - $allowed_logtypes[] = 3; // note |
|
| 115 | + $allowed_logtypes[] = 3; // note |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | // always allow to keep the existing logtype when the log is edited by an admin |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } elseif (!$opt['logic']['admin']['team_comments_only_for_reports'] || admin_has_open_report($cache_id)) { |
| 152 | 152 | // allowed for report processing by admins |
| 153 | 153 | $allowed = true; |
| 154 | - } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6,7])) { |
|
| 154 | + } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6, 7])) { |
|
| 155 | 155 | // allowed for admins && locked caches, see http://forum.opencaching.de/index.php?topic=3102.msg39517#msg39517 |
| 156 | 156 | $allowed = true; |
| 157 | 157 | } else { |
@@ -16,12 +16,12 @@ discard block |
||
| 16 | 16 | define('RE_TYPE_FLOAT', 5); |
| 17 | 17 | define('RE_TYPE_DOUBLE', 6); |
| 18 | 18 | |
| 19 | -define('RE_INSERT_NOTHING', 0); // |
|
| 20 | -define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function |
|
| 21 | -define('RE_INSERT_IGNORE', 2); // dont use this column on insert |
|
| 19 | +define('RE_INSERT_NOTHING', 0); // |
|
| 20 | +define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function |
|
| 21 | +define('RE_INSERT_IGNORE', 2); // dont use this column on insert |
|
| 22 | 22 | define('RE_INSERT_AUTOINCREMENT', 4); // column is an auto increment column |
| 23 | -define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields) |
|
| 24 | -define('RE_INSERT_NOW', 16); // NOW() |
|
| 23 | +define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields) |
|
| 24 | +define('RE_INSERT_NOW', 16); // NOW() |
|
| 25 | 25 | |
| 26 | 26 | define('EUROPEAN_LETTERS', 'A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'); |
| 27 | 27 | // ASCII + ISO-8859-1 0xC0..0xFF |
@@ -31,13 +31,13 @@ discard block |
||
| 31 | 31 | define('REGEX_FIRST_NAME', REGEX_LAST_NAME); |
| 32 | 32 | define('REGEX_STATPIC_TEXT', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$'); |
| 33 | 33 | |
| 34 | -define('ADMIN_TRANSLATE', 1); // edit translation |
|
| 35 | -define('ADMIN_MAINTAINANCE', 2); // check table etc. |
|
| 36 | -define('ADMIN_USER', 4); // drop users, caches etc. |
|
| 37 | -define('ADMIN_NEWS', 8); // obsolete / reserved |
|
| 38 | -define('ADMIN_RESTORE', 16); // restore vandalized listings |
|
| 39 | -define('ADMIN_ROOT', 128 | 127); // root + all previous rights |
|
| 40 | -define('ADMIN_LISTING', 1024); // can edit any cache listings |
|
| 34 | +define('ADMIN_TRANSLATE', 1); // edit translation |
|
| 35 | +define('ADMIN_MAINTAINANCE', 2); // check table etc. |
|
| 36 | +define('ADMIN_USER', 4); // drop users, caches etc. |
|
| 37 | +define('ADMIN_NEWS', 8); // obsolete / reserved |
|
| 38 | +define('ADMIN_RESTORE', 16); // restore vandalized listings |
|
| 39 | +define('ADMIN_ROOT', 128 | 127); // root + all previous rights |
|
| 40 | +define('ADMIN_LISTING', 1024); // can edit any cache listings |
|
| 41 | 41 | |
| 42 | 42 | define('ATTRIB_SELECTED', 1); |
| 43 | 43 | define('ATTRIB_UNSELECTED', 2); |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | // ID 15 was temporarily used and is reserved, see commit dda7ef0. Continue with 16. |
| 80 | 80 | |
| 81 | 81 | // user.data_license values |
| 82 | -define('OLD_DATA_LICSENSE', 0); // before deadline |
|
| 83 | -define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license |
|
| 84 | -define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration |
|
| 85 | -define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline |
|
| 86 | -define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled |
|
| 82 | +define('OLD_DATA_LICSENSE', 0); // before deadline |
|
| 83 | +define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license |
|
| 84 | +define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration |
|
| 85 | +define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline |
|
| 86 | +define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled |
|
| 87 | 87 | |
| 88 | 88 | //picture upload/resize parameters |
| 89 | 89 | define('PICTURE_QUALITY', 85); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname) |
| 12 | 12 | { |
| 13 | - $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents |
|
| 13 | + $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents |
|
| 14 | 14 | $iconext = "." . mb_eregi_replace("^.*\.", "", $iconname); |
| 15 | 15 | $iconname = mb_eregi_replace("\..*", "", $iconname); |
| 16 | 16 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | break; |
| 31 | 31 | case 5: |
| 32 | 32 | $iconname .= "-s"; |
| 33 | - break; // fix for RT ticket #3403 |
|
| 33 | + break; // fix for RT ticket #3403 |
|
| 34 | 34 | case 6: |
| 35 | 35 | $iconname .= "-a"; |
| 36 | 36 | break; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // number of points in the polygon |
| 30 | 30 | $n = count($polygon); |
| 31 | 31 | $poly1 = $polygon[0]; |
| 32 | - for ($i = 1; $i <= $n; $i ++) { |
|
| 32 | + for ($i = 1; $i <= $n; $i++) { |
|
| 33 | 33 | $poly1XY = explode(' ', $poly1); |
| 34 | 34 | $poly1x = $poly1XY[0]; |
| 35 | 35 | $poly1y = $poly1XY[1]; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ($poly1y != $poly2y) { |
| 45 | 45 | $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x; |
| 46 | 46 | if ($poly1x == $poly2x || $px <= $xinters) { |
| 47 | - $counter ++; |
|
| 47 | + $counter++; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | // min. 4 different chars |
| 36 | 36 | $chars = array(); |
| 37 | - for ($i = 0; $i < mb_strlen($pw); $i ++) { |
|
| 37 | + for ($i = 0; $i < mb_strlen($pw); $i++) { |
|
| 38 | 38 | $chars[mb_substr($pw, $i, 1)] = true; |
| 39 | 39 | } |
| 40 | 40 | |