@@ -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']; ?>'; |
@@ -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 |
@@ -84,13 +84,13 @@ |
||
| 84 | 84 | */ |
| 85 | 85 | public function fromDatabaseArray(array $data) |
| 86 | 86 | { |
| 87 | - $this->id = (int) $data['id']; |
|
| 88 | - $this->slug = (string) $data['slug']; |
|
| 89 | - $this->metaKeywords = (string) $data['meta_keywords']; |
|
| 90 | - $this->metaDescription = (string) $data['meta_description']; |
|
| 91 | - $this->metaSocial = (string) $data['meta_social']; |
|
| 87 | + $this->id = (int)$data['id']; |
|
| 88 | + $this->slug = (string)$data['slug']; |
|
| 89 | + $this->metaKeywords = (string)$data['meta_keywords']; |
|
| 90 | + $this->metaDescription = (string)$data['meta_description']; |
|
| 91 | + $this->metaSocial = (string)$data['meta_social']; |
|
| 92 | 92 | $this->updatedAt = new DateTime($data['updated_at']); |
| 93 | - $this->active = (bool) $data['active']; |
|
| 93 | + $this->active = (bool)$data['active']; |
|
| 94 | 94 | |
| 95 | 95 | return $this; |
| 96 | 96 | } |
@@ -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 |
@@ -105,16 +105,16 @@ |
||
| 105 | 105 | */ |
| 106 | 106 | public function fromDatabaseArray(array $data) |
| 107 | 107 | { |
| 108 | - $this->id = (int) $data['user_id']; |
|
| 109 | - $this->username = (string) $data['username']; |
|
| 110 | - $this->password = (string) $data['password']; |
|
| 111 | - $this->email = (string) $data['email']; |
|
| 112 | - $this->latitude = (double) $data['latitude']; |
|
| 113 | - $this->longitude = (double) $data['longitude']; |
|
| 114 | - $this->isActive = (bool) $data['is_active_flag']; |
|
| 115 | - $this->firstname = (string) $data['first_name']; |
|
| 116 | - $this->lastname = (string) $data['last_name']; |
|
| 117 | - $this->country = (string) $data['country']; |
|
| 108 | + $this->id = (int)$data['user_id']; |
|
| 109 | + $this->username = (string)$data['username']; |
|
| 110 | + $this->password = (string)$data['password']; |
|
| 111 | + $this->email = (string)$data['email']; |
|
| 112 | + $this->latitude = (double)$data['latitude']; |
|
| 113 | + $this->longitude = (double)$data['longitude']; |
|
| 114 | + $this->isActive = (bool)$data['is_active_flag']; |
|
| 115 | + $this->firstname = (string)$data['first_name']; |
|
| 116 | + $this->lastname = (string)$data['last_name']; |
|
| 117 | + $this->country = (string)$data['country']; |
|
| 118 | 118 | $this->language = strtolower($data['language']); |
| 119 | 119 | |
| 120 | 120 | return $this; |