@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -$userid = (int)$value; |
|
| 2 | +$userid = (int) $value; |
|
| 3 | 3 | if (!isset($modx->filter->cache['ui'][$userid])) { |
| 4 | 4 | if ($userid < 0) $user = $modx->getWebUserInfo(abs($userid)); |
| 5 | 5 | else $user = $modx->getUserInfo($userid); |
@@ -1,8 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $userid = (int)$value; |
| 3 | 3 | if (!isset($modx->filter->cache['ui'][$userid])) { |
| 4 | - if ($userid < 0) $user = $modx->getWebUserInfo(abs($userid)); |
|
| 5 | - else $user = $modx->getUserInfo($userid); |
|
| 4 | + if ($userid < 0) { |
|
| 5 | + $user = $modx->getWebUserInfo(abs($userid)); |
|
| 6 | + } else { |
|
| 7 | + $user = $modx->getUserInfo($userid); |
|
| 8 | + } |
|
| 6 | 9 | $modx->filter->cache['ui'][$userid] = $user; |
| 7 | 10 | } else { |
| 8 | 11 | $user = $modx->filter->cache['ui'][$userid]; |
@@ -1,43 +1,43 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(strpos($opt,',')) list($limit,$delim) = explode(',', $opt); |
|
| 3 | -elseif(preg_match('/^[1-9][0-9]*$/',$opt)) {$limit=$opt;$delim='';} |
|
| 4 | -else {$limit=124;$delim='';} |
|
| 2 | +if (strpos($opt, ',')) list($limit, $delim) = explode(',', $opt); |
|
| 3 | +elseif (preg_match('/^[1-9][0-9]*$/', $opt)) {$limit = $opt; $delim = ''; } |
|
| 4 | +else {$limit = 124; $delim = ''; } |
|
| 5 | 5 | |
| 6 | -if($delim==='') $delim = $modx->config['manager_language']==='japanese-utf8' ? '。' : '.'; |
|
| 7 | -$limit = (int)$limit; |
|
| 6 | +if ($delim === '') $delim = $modx->config['manager_language'] === 'japanese-utf8' ? '。' : '.'; |
|
| 7 | +$limit = (int) $limit; |
|
| 8 | 8 | |
| 9 | 9 | $content = $modx->filter->parseDocumentSource($value); |
| 10 | 10 | |
| 11 | 11 | $content = strip_tags($content); |
| 12 | 12 | |
| 13 | -$content = str_replace(array("\r\n","\r","\n","\t",' '),' ',$content); |
|
| 14 | -if(preg_match('/\s+/',$content)) |
|
| 15 | - $content = preg_replace('/\s+/',' ',$content); |
|
| 13 | +$content = str_replace(array("\r\n", "\r", "\n", "\t", ' '), ' ', $content); |
|
| 14 | +if (preg_match('/\s+/', $content)) |
|
| 15 | + $content = preg_replace('/\s+/', ' ', $content); |
|
| 16 | 16 | $content = trim($content); |
| 17 | 17 | |
| 18 | 18 | $pos = $modx->filter->strpos($content, $delim); |
| 19 | 19 | |
| 20 | -if($pos!==false && $pos<$limit) { |
|
| 20 | +if ($pos !== false && $pos < $limit) { |
|
| 21 | 21 | $_ = explode($delim, $content); |
| 22 | 22 | $text = ''; |
| 23 | - foreach($_ as $v) { |
|
| 24 | - if($limit <= $modx->filter->strlen($text.$v.$delim)) break; |
|
| 23 | + foreach ($_ as $v) { |
|
| 24 | + if ($limit <= $modx->filter->strlen($text.$v.$delim)) break; |
|
| 25 | 25 | $text .= $v.$delim; |
| 26 | 26 | } |
| 27 | - if($text) $content = $text; |
|
| 27 | + if ($text) $content = $text; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | -if($limit<$modx->filter->strlen($content) && strpos($content,' ')!==false) { |
|
| 30 | +if ($limit < $modx->filter->strlen($content) && strpos($content, ' ') !== false) { |
|
| 31 | 31 | $_ = explode(' ', $content); |
| 32 | 32 | $text = ''; |
| 33 | - foreach($_ as $v) { |
|
| 34 | - if($limit <= $modx->filter->strlen($text.$v.' ')) break; |
|
| 35 | - $text .= $v . ' '; |
|
| 33 | + foreach ($_ as $v) { |
|
| 34 | + if ($limit <= $modx->filter->strlen($text.$v.' ')) break; |
|
| 35 | + $text .= $v.' '; |
|
| 36 | 36 | } |
| 37 | - if($text!=='') $content = $text; |
|
| 37 | + if ($text !== '') $content = $text; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -if($limit < $modx->filter->strlen($content)) $content = $modx->filter->substr($content, 0, $limit); |
|
| 41 | -if($modx->filter->substr($content,-1)==$delim) $content = rtrim($content,$delim) . $delim; |
|
| 40 | +if ($limit < $modx->filter->strlen($content)) $content = $modx->filter->substr($content, 0, $limit); |
|
| 41 | +if ($modx->filter->substr($content, -1) == $delim) $content = rtrim($content, $delim).$delim; |
|
| 42 | 42 | |
| 43 | 43 | return $content; |
@@ -1,9 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(strpos($opt,',')) list($limit,$delim) = explode(',', $opt); |
|
| 3 | -elseif(preg_match('/^[1-9][0-9]*$/',$opt)) {$limit=$opt;$delim='';} |
|
| 4 | -else {$limit=124;$delim='';} |
|
| 2 | +if(strpos($opt,',')) { |
|
| 3 | + list($limit,$delim) = explode(',', $opt); |
|
| 4 | +} elseif(preg_match('/^[1-9][0-9]*$/',$opt)) {$limit=$opt;$delim='';} else {$limit=124;$delim='';} |
|
| 5 | 5 | |
| 6 | -if($delim==='') $delim = $modx->config['manager_language']==='japanese-utf8' ? '。' : '.'; |
|
| 6 | +if($delim==='') { |
|
| 7 | + $delim = $modx->config['manager_language']==='japanese-utf8' ? '。' : '.'; |
|
| 8 | +} |
|
| 7 | 9 | $limit = (int)$limit; |
| 8 | 10 | |
| 9 | 11 | $content = $modx->filter->parseDocumentSource($value); |
@@ -11,8 +13,9 @@ discard block |
||
| 11 | 13 | $content = strip_tags($content); |
| 12 | 14 | |
| 13 | 15 | $content = str_replace(array("\r\n","\r","\n","\t",' '),' ',$content); |
| 14 | -if(preg_match('/\s+/',$content)) |
|
| 16 | +if(preg_match('/\s+/',$content)) { |
|
| 15 | 17 | $content = preg_replace('/\s+/',' ',$content); |
| 18 | +} |
|
| 16 | 19 | $content = trim($content); |
| 17 | 20 | |
| 18 | 21 | $pos = $modx->filter->strpos($content, $delim); |
@@ -21,23 +24,35 @@ discard block |
||
| 21 | 24 | $_ = explode($delim, $content); |
| 22 | 25 | $text = ''; |
| 23 | 26 | foreach($_ as $v) { |
| 24 | - if($limit <= $modx->filter->strlen($text.$v.$delim)) break; |
|
| 27 | + if($limit <= $modx->filter->strlen($text.$v.$delim)) { |
|
| 28 | + break; |
|
| 29 | + } |
|
| 25 | 30 | $text .= $v.$delim; |
| 26 | 31 | } |
| 27 | - if($text) $content = $text; |
|
| 28 | -} |
|
| 32 | + if($text) { |
|
| 33 | + $content = $text; |
|
| 34 | + } |
|
| 35 | + } |
|
| 29 | 36 | |
| 30 | 37 | if($limit<$modx->filter->strlen($content) && strpos($content,' ')!==false) { |
| 31 | 38 | $_ = explode(' ', $content); |
| 32 | 39 | $text = ''; |
| 33 | 40 | foreach($_ as $v) { |
| 34 | - if($limit <= $modx->filter->strlen($text.$v.' ')) break; |
|
| 41 | + if($limit <= $modx->filter->strlen($text.$v.' ')) { |
|
| 42 | + break; |
|
| 43 | + } |
|
| 35 | 44 | $text .= $v . ' '; |
| 36 | 45 | } |
| 37 | - if($text!=='') $content = $text; |
|
| 38 | -} |
|
| 46 | + if($text!=='') { |
|
| 47 | + $content = $text; |
|
| 48 | + } |
|
| 49 | + } |
|
| 39 | 50 | |
| 40 | -if($limit < $modx->filter->strlen($content)) $content = $modx->filter->substr($content, 0, $limit); |
|
| 41 | -if($modx->filter->substr($content,-1)==$delim) $content = rtrim($content,$delim) . $delim; |
|
| 51 | +if($limit < $modx->filter->strlen($content)) { |
|
| 52 | + $content = $modx->filter->substr($content, 0, $limit); |
|
| 53 | +} |
|
| 54 | +if($modx->filter->substr($content,-1)==$delim) { |
|
| 55 | + $content = rtrim($content,$delim) . $delim; |
|
| 56 | +} |
|
| 42 | 57 | |
| 43 | 58 | return $content; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $pre = null, |
| 31 | 31 | $charset = '', |
| 32 | 32 | $connection_method = 'SET CHARACTER SET' |
| 33 | - ) { |
|
| 33 | + ){ |
|
| 34 | 34 | $this->config['host'] = $host ? $host : $GLOBALS['database_server']; |
| 35 | 35 | $this->config['dbase'] = $dbase ? $dbase : $GLOBALS['dbase']; |
| 36 | 36 | $this->config['user'] = $uid ? $uid : $GLOBALS['database_user']; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $referer = $modx->htmlspecialchars($_SERVER['HTTP_REFERER']); |
| 121 | 121 | |
| 122 | 122 | $modx->sendmail(array( |
| 123 | - 'subject' => 'Missing to create the database connection! from ' . $modx->config['site_name'], |
|
| 123 | + 'subject' => 'Missing to create the database connection! from '.$modx->config['site_name'], |
|
| 124 | 124 | 'body' => "{$logtitle}\n{$request_uri}\n{$ua}\n{$referer}", |
| 125 | 125 | 'type' => 'text' |
| 126 | 126 | ) |
@@ -137,15 +137,15 @@ discard block |
||
| 137 | 137 | } else { |
| 138 | 138 | $dbase = trim($dbase, '`'); // remove the `` chars |
| 139 | 139 | if (!@ mysql_select_db($dbase, $this->conn)) { |
| 140 | - $modx->messageQuit("Failed to select the database '" . $dbase . "'!"); |
|
| 140 | + $modx->messageQuit("Failed to select the database '".$dbase."'!"); |
|
| 141 | 141 | exit; |
| 142 | 142 | } |
| 143 | 143 | @mysql_query("{$connection_method} {$charset}", $this->conn); |
| 144 | 144 | $tend = $modx->getMicroTime(); |
| 145 | 145 | $totaltime = $tend - $tstart; |
| 146 | 146 | if ($modx->dumpSQL) { |
| 147 | - $modx->queryCode .= "<fieldset style='text-align:left'><legend>Database connection</legend>" . sprintf("Database connection was created in %2.4f s", |
|
| 148 | - $totaltime) . "</fieldset><br />"; |
|
| 147 | + $modx->queryCode .= "<fieldset style='text-align:left'><legend>Database connection</legend>".sprintf("Database connection was created in %2.4f s", |
|
| 148 | + $totaltime)."</fieldset><br />"; |
|
| 149 | 149 | } |
| 150 | 150 | if (function_exists('mysql_set_charset')) { |
| 151 | 151 | mysql_set_charset($this->config['charset']); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | case 1091: |
| 226 | 226 | break; |
| 227 | 227 | default: |
| 228 | - $modx->messageQuit('Execution of a query to the database failed - ' . $this->getLastError(), $sql); |
|
| 228 | + $modx->messageQuit('Execution of a query to the database failed - '.$this->getLastError(), $sql); |
|
| 229 | 229 | } |
| 230 | 230 | } else { |
| 231 | 231 | $tend = $modx->getMicroTime(); |
@@ -239,24 +239,24 @@ discard block |
||
| 239 | 239 | $debug_path[] = $line['function']; |
| 240 | 240 | } |
| 241 | 241 | $debug_path = implode(' > ', array_reverse($debug_path)); |
| 242 | - $modx->queryCode .= "<fieldset style='text-align:left'><legend>Query " . ($modx->executedQueries + 1) . " - " . sprintf("%2.2f ms", |
|
| 243 | - $totaltime * 1000) . "</legend>"; |
|
| 244 | - $modx->queryCode .= $sql . '<br><br>'; |
|
| 242 | + $modx->queryCode .= "<fieldset style='text-align:left'><legend>Query ".($modx->executedQueries + 1)." - ".sprintf("%2.2f ms", |
|
| 243 | + $totaltime * 1000)."</legend>"; |
|
| 244 | + $modx->queryCode .= $sql.'<br><br>'; |
|
| 245 | 245 | if ($modx->event->name) { |
| 246 | - $modx->queryCode .= 'Current Event => ' . $modx->event->name . '<br>'; |
|
| 246 | + $modx->queryCode .= 'Current Event => '.$modx->event->name.'<br>'; |
|
| 247 | 247 | } |
| 248 | 248 | if ($modx->event->activePlugin) { |
| 249 | - $modx->queryCode .= 'Current Plugin => ' . $modx->event->activePlugin . '<br>'; |
|
| 249 | + $modx->queryCode .= 'Current Plugin => '.$modx->event->activePlugin.'<br>'; |
|
| 250 | 250 | } |
| 251 | 251 | if ($modx->currentSnippet) { |
| 252 | - $modx->queryCode .= 'Current Snippet => ' . $modx->currentSnippet . '<br>'; |
|
| 252 | + $modx->queryCode .= 'Current Snippet => '.$modx->currentSnippet.'<br>'; |
|
| 253 | 253 | } |
| 254 | 254 | if (stripos($sql, 'select') === 0) { |
| 255 | - $modx->queryCode .= 'Record Count => ' . $this->getRecordCount($result) . '<br>'; |
|
| 255 | + $modx->queryCode .= 'Record Count => '.$this->getRecordCount($result).'<br>'; |
|
| 256 | 256 | } else { |
| 257 | - $modx->queryCode .= 'Affected Rows => ' . $this->getAffectedRows() . '<br>'; |
|
| 257 | + $modx->queryCode .= 'Affected Rows => '.$this->getAffectedRows().'<br>'; |
|
| 258 | 258 | } |
| 259 | - $modx->queryCode .= 'Functions Path => ' . $debug_path . '<br>'; |
|
| 259 | + $modx->queryCode .= 'Functions Path => '.$debug_path.'<br>'; |
|
| 260 | 260 | $modx->queryCode .= "</fieldset><br />"; |
| 261 | 261 | } |
| 262 | 262 | $modx->executedQueries = $modx->executedQueries + 1; |
@@ -350,9 +350,9 @@ discard block |
||
| 350 | 350 | if (is_null($value) || strtolower($value) === 'null') { |
| 351 | 351 | $flds = 'NULL'; |
| 352 | 352 | } else { |
| 353 | - $flds = "'" . $value . "'"; |
|
| 353 | + $flds = "'".$value."'"; |
|
| 354 | 354 | } |
| 355 | - $fields[$key] = "`{$key}` = " . $flds; |
|
| 355 | + $fields[$key] = "`{$key}` = ".$flds; |
|
| 356 | 356 | } |
| 357 | 357 | $fields = implode(",", $fields); |
| 358 | 358 | } |
@@ -380,13 +380,13 @@ discard block |
||
| 380 | 380 | $this->query("INSERT INTO {$intotable} {$fields}"); |
| 381 | 381 | } else { |
| 382 | 382 | if (empty($fromtable)) { |
| 383 | - $fields = "(`" . implode("`, `", array_keys($fields)) . "`) VALUES('" . implode("', '", |
|
| 384 | - array_values($fields)) . "')"; |
|
| 383 | + $fields = "(`".implode("`, `", array_keys($fields))."`) VALUES('".implode("', '", |
|
| 384 | + array_values($fields))."')"; |
|
| 385 | 385 | $rt = $this->query("INSERT INTO {$intotable} {$fields}"); |
| 386 | 386 | } else { |
| 387 | 387 | if (version_compare($this->getVersion(), "4.0.14") >= 0) { |
| 388 | 388 | $fromtable = $this->replaceFullTableName($fromtable); |
| 389 | - $fields = "(" . implode(",", array_keys($fields)) . ")"; |
|
| 389 | + $fields = "(".implode(",", array_keys($fields)).")"; |
|
| 390 | 390 | $where = trim($where); |
| 391 | 391 | $limit = trim($limit); |
| 392 | 392 | if ($where !== '' && stripos($where, 'WHERE') !== 0) { |
@@ -399,8 +399,8 @@ discard block |
||
| 399 | 399 | } else { |
| 400 | 400 | $ds = $this->select($fromfields, $fromtable, $where, '', $limit); |
| 401 | 401 | while ($row = $this->getRow($ds)) { |
| 402 | - $fields = "(" . implode(",", array_keys($fields)) . ") VALUES('" . implode("', '", |
|
| 403 | - $row) . "')"; |
|
| 402 | + $fields = "(".implode(",", array_keys($fields)).") VALUES('".implode("', '", |
|
| 403 | + $row)."')"; |
|
| 404 | 404 | $rt = $this->query("INSERT INTO {$intotable} {$fields}"); |
| 405 | 405 | } |
| 406 | 406 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | public function getInsertId($conn = null) |
| 486 | 486 | { |
| 487 | 487 | if (!is_resource($conn)) { |
| 488 | - $conn =& $this->conn; |
|
| 488 | + $conn = & $this->conn; |
|
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | return mysql_insert_id($conn); |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | public function getAffectedRows($conn = null) |
| 499 | 499 | { |
| 500 | 500 | if (!is_resource($conn)) { |
| 501 | - $conn =& $this->conn; |
|
| 501 | + $conn = & $this->conn; |
|
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | return mysql_affected_rows($conn); |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | public function getLastError($conn = null) |
| 512 | 512 | { |
| 513 | 513 | if (!is_resource($conn)) { |
| 514 | - $conn =& $this->conn; |
|
| 514 | + $conn = & $this->conn; |
|
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | return mysql_error($conn); |
@@ -280,13 +280,13 @@ discard block |
||
| 280 | 280 | $orderby = trim($orderby); |
| 281 | 281 | $limit = trim($limit); |
| 282 | 282 | if ($where !== '' && stripos($where, 'WHERE') !== 0) { |
| 283 | - $where = "WHERE {$where}"; |
|
| 283 | + $where = "where {$where}"; |
|
| 284 | 284 | } |
| 285 | 285 | if ($orderby !== '' && stripos($orderby, 'ORDER BY') !== 0) { |
| 286 | 286 | $orderby = "ORDER BY {$orderby}"; |
| 287 | 287 | } |
| 288 | 288 | if ($limit !== '' && stripos($limit, 'LIMIT') !== 0) { |
| 289 | - $limit = "LIMIT {$limit}"; |
|
| 289 | + $limit = "limit {$limit}"; |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | return $this->query("DELETE FROM {$from} {$where} {$orderby} {$limit}"); |
@@ -322,16 +322,16 @@ discard block |
||
| 322 | 322 | $orderby = trim($orderby); |
| 323 | 323 | $limit = trim($limit); |
| 324 | 324 | if ($where !== '' && stripos($where, 'WHERE') !== 0) { |
| 325 | - $where = "WHERE {$where}"; |
|
| 325 | + $where = "where {$where}"; |
|
| 326 | 326 | } |
| 327 | 327 | if ($orderby !== '' && stripos($orderby, 'ORDER') !== 0) { |
| 328 | 328 | $orderby = "ORDER BY {$orderby}"; |
| 329 | 329 | } |
| 330 | 330 | if ($limit !== '' && stripos($limit, 'LIMIT') !== 0) { |
| 331 | - $limit = "LIMIT {$limit}"; |
|
| 331 | + $limit = "limit {$limit}"; |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - return $this->query("SELECT {$fields} FROM {$from} {$where} {$orderby} {$limit}"); |
|
| 334 | + return $this->query("select {$fields} FROM {$from} {$where} {$orderby} {$limit}"); |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | /** |
@@ -358,10 +358,10 @@ discard block |
||
| 358 | 358 | } |
| 359 | 359 | $where = trim($where); |
| 360 | 360 | if ($where !== '' && stripos($where, 'WHERE') !== 0) { |
| 361 | - $where = "WHERE {$where}"; |
|
| 361 | + $where = "where {$where}"; |
|
| 362 | 362 | } |
| 363 | 363 | |
| 364 | - return $this->query("UPDATE {$table} SET {$fields} {$where}"); |
|
| 364 | + return $this->query("update {$table} SET {$fields} {$where}"); |
|
| 365 | 365 | } |
| 366 | 366 | } |
| 367 | 367 | |
@@ -390,10 +390,10 @@ discard block |
||
| 390 | 390 | $where = trim($where); |
| 391 | 391 | $limit = trim($limit); |
| 392 | 392 | if ($where !== '' && stripos($where, 'WHERE') !== 0) { |
| 393 | - $where = "WHERE {$where}"; |
|
| 393 | + $where = "where {$where}"; |
|
| 394 | 394 | } |
| 395 | 395 | if ($limit !== '' && stripos($limit, 'LIMIT') !== 0) { |
| 396 | - $limit = "LIMIT {$limit}"; |
|
| 396 | + $limit = "limit {$limit}"; |
|
| 397 | 397 | } |
| 398 | 398 | $rt = $this->query("INSERT INTO {$intotable} {$fields} SELECT {$fromfields} FROM {$fromtable} {$where} {$limit}"); |
| 399 | 399 | } else { |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | |
| 733 | 733 | public function truncate($table_name) |
| 734 | 734 | { |
| 735 | - $rs = $this->query("TRUNCATE {$table_name}"); |
|
| 735 | + $rs = $this->query("truncate {$table_name}"); |
|
| 736 | 736 | |
| 737 | 737 | return $rs; |
| 738 | 738 | } |
@@ -268,6 +268,7 @@ discard block |
||
| 268 | 268 | /** |
| 269 | 269 | * @name: delete |
| 270 | 270 | * |
| 271 | + * @param string $from |
|
| 271 | 272 | */ |
| 272 | 273 | public function delete($from, $where = '', $orderby = '', $limit = '') |
| 273 | 274 | { |
@@ -414,6 +415,9 @@ discard block |
||
| 414 | 415 | } |
| 415 | 416 | } |
| 416 | 417 | |
| 418 | + /** |
|
| 419 | + * @param string $table |
|
| 420 | + */ |
|
| 417 | 421 | public function save($fields, $table, $where = '') |
| 418 | 422 | { |
| 419 | 423 | |
@@ -444,6 +448,7 @@ discard block |
||
| 444 | 448 | /** |
| 445 | 449 | * @name: freeResult |
| 446 | 450 | * |
| 451 | + * @param mysqli_result $rs |
|
| 447 | 452 | */ |
| 448 | 453 | public function freeResult($rs) |
| 449 | 454 | { |
@@ -554,6 +559,7 @@ discard block |
||
| 554 | 559 | * @name: getColumn |
| 555 | 560 | * @desc: returns an array of the values found on colun $name |
| 556 | 561 | * @param: $dsq - dataset or query string |
| 562 | + * @param string $name |
|
| 557 | 563 | */ |
| 558 | 564 | public function getColumn($name, $dsq) |
| 559 | 565 | { |
@@ -720,6 +726,9 @@ discard block |
||
| 720 | 726 | return $result; |
| 721 | 727 | } |
| 722 | 728 | |
| 729 | + /** |
|
| 730 | + * @param string $table_name |
|
| 731 | + */ |
|
| 723 | 732 | public function optimize($table_name) |
| 724 | 733 | { |
| 725 | 734 | $rs = $this->query("OPTIMIZE TABLE {$table_name}"); |
@@ -730,6 +739,9 @@ discard block |
||
| 730 | 739 | return $rs; |
| 731 | 740 | } |
| 732 | 741 | |
| 742 | + /** |
|
| 743 | + * @param string $table_name |
|
| 744 | + */ |
|
| 733 | 745 | public function truncate($table_name) |
| 734 | 746 | { |
| 735 | 747 | $rs = $this->query("TRUNCATE {$table_name}"); |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -$lockElementId = (int)$lockElementId; |
|
| 6 | +$lockElementId = (int) $lockElementId; |
|
| 7 | 7 | |
| 8 | 8 | if ($lockElementId > 0) { |
| 9 | 9 | ?> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | var stay = document.getElementById('stay'); |
| 19 | 19 | // Trigger unlock |
| 20 | 20 | if ((stay && stay.value !== '2') || !form_save) { |
| 21 | - var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType;?>&id=<?php echo $lockElementId;?>&o=' + Math.random(); |
|
| 21 | + var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType; ?>&id=<?php echo $lockElementId; ?>&o=' + Math.random(); |
|
| 22 | 22 | if (navigator.sendBeacon) { |
| 23 | 23 | navigator.sendBeacon(url) |
| 24 | 24 | } else { |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('delete_plugin')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforePluginFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforePluginFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the plugin. |
| 25 | 25 | $modx->db->delete($modx->getFullTableName('site_plugins'), "id='{$id}'"); |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // invoke OnPluginFormDelete event |
| 31 | 31 | $modx->invokeEvent("OnPluginFormDelete", |
| 32 | - array( |
|
| 33 | - "id" => $id |
|
| 34 | - )); |
|
| 32 | + array( |
|
| 33 | + "id" => $id |
|
| 34 | + )); |
|
| 35 | 35 | |
| 36 | 36 | // empty cache |
| 37 | 37 | $modx->clearCache('full'); |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('delete_plugin')) { |
|
| 5 | +if (!$modx->hasPermission('delete_plugin')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
@@ -37,5 +37,5 @@ discard block |
||
| 37 | 37 | $modx->clearCache('full'); |
| 38 | 38 | |
| 39 | 39 | // finished emptying cache - redirect |
| 40 | -$header="Location: index.php?a=76&r=2"; |
|
| 40 | +$header = "Location: index.php?a=76&r=2"; |
|
| 41 | 41 | header($header); |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('delete_snippet')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeChunkFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeChunkFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the chunk. |
| 25 | 25 | $modx->db->delete($modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"); |
| 26 | 26 | |
| 27 | 27 | // invoke OnChunkFormDelete event |
| 28 | 28 | $modx->invokeEvent("OnChunkFormDelete", |
| 29 | - array( |
|
| 30 | - "id" => $id |
|
| 31 | - )); |
|
| 29 | + array( |
|
| 30 | + "id" => $id |
|
| 31 | + )); |
|
| 32 | 32 | |
| 33 | 33 | // empty cache |
| 34 | 34 | $modx->clearCache('full'); |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('delete_snippet')) { |
|
| 5 | +if (!$modx->hasPermission('delete_snippet')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
@@ -34,5 +34,5 @@ discard block |
||
| 34 | 34 | $modx->clearCache('full'); |
| 35 | 35 | |
| 36 | 36 | // finished emptying cache - redirect |
| 37 | -$header="Location: index.php?a=76&r=2"; |
|
| 37 | +$header = "Location: index.php?a=76&r=2"; |
|
| 38 | 38 | header($header); |
@@ -1,22 +1,22 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('delete_template')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id == 0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // delete the template, but first check it doesn't have any documents using it |
| 15 | 15 | $rs = $modx->db->select('id, pagetitle,introtext', $modx->getFullTableName('site_content'), "template='{$id}' AND deleted=0"); |
| 16 | 16 | $limit = $modx->db->getRecordCount($rs); |
| 17 | 17 | if($limit > 0) { |
| 18 | - include "header.inc.php"; |
|
| 19 | - ?> |
|
| 18 | + include "header.inc.php"; |
|
| 19 | + ?> |
|
| 20 | 20 | |
| 21 | 21 | <h1><?php echo $_lang['manage_templates']; ?></h1> |
| 22 | 22 | |
@@ -28,20 +28,20 @@ discard block |
||
| 28 | 28 | <p>Documents using this template:</p> |
| 29 | 29 | <ul> |
| 30 | 30 | <?php |
| 31 | - while($row = $modx->db->getRow($rs)) { |
|
| 32 | - echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
| 33 | - } |
|
| 34 | - ?> |
|
| 31 | + while($row = $modx->db->getRow($rs)) { |
|
| 32 | + echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
| 33 | + } |
|
| 34 | + ?> |
|
| 35 | 35 | </ul> |
| 36 | 36 | </div> |
| 37 | 37 | </div> |
| 38 | 38 | <?php |
| 39 | - include_once "footer.inc.php"; |
|
| 40 | - exit; |
|
| 39 | + include_once "footer.inc.php"; |
|
| 40 | + exit; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | if($id == $default_template) { |
| 44 | - $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
|
| 44 | + $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // Set the item name for logger |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | // invoke OnBeforeTempFormDelete event |
| 52 | 52 | $modx->invokeEvent("OnBeforeTempFormDelete", array( |
| 53 | - "id" => $id |
|
| 54 | - )); |
|
| 53 | + "id" => $id |
|
| 54 | + )); |
|
| 55 | 55 | |
| 56 | 56 | // delete the document. |
| 57 | 57 | $modx->db->delete($modx->getFullTableName('site_templates'), "id='{$id}'"); |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | // invoke OnTempFormDelete event |
| 62 | 62 | $modx->invokeEvent("OnTempFormDelete", array( |
| 63 | - "id" => $id |
|
| 64 | - )); |
|
| 63 | + "id" => $id |
|
| 64 | + )); |
|
| 65 | 65 | |
| 66 | 66 | // empty cache |
| 67 | 67 | $modx->clearCache('full'); |
@@ -1,20 +1,20 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('delete_template')) { |
|
| 5 | +if (!$modx->hasPermission('delete_template')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
|
| 10 | -if($id == 0) { |
|
| 9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // delete the template, but first check it doesn't have any documents using it |
| 15 | 15 | $rs = $modx->db->select('id, pagetitle,introtext', $modx->getFullTableName('site_content'), "template='{$id}' AND deleted=0"); |
| 16 | 16 | $limit = $modx->db->getRecordCount($rs); |
| 17 | -if($limit > 0) { |
|
| 17 | +if ($limit > 0) { |
|
| 18 | 18 | include "header.inc.php"; |
| 19 | 19 | ?> |
| 20 | 20 | |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | <p>Documents using this template:</p> |
| 29 | 29 | <ul> |
| 30 | 30 | <?php |
| 31 | - while($row = $modx->db->getRow($rs)) { |
|
| 32 | - echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
| 31 | + while ($row = $modx->db->getRow($rs)) { |
|
| 32 | + echo '<li><span style="width: 200px"><a href="index.php?id='.$row['id'].'&a=27">'.$row['pagetitle'].'</a></span>'.($row['introtext'] != '' ? ' - '.$row['introtext'] : '').'</li>'; |
|
| 33 | 33 | } |
| 34 | 34 | ?> |
| 35 | 35 | </ul> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | exit; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -if($id == $default_template) { |
|
| 43 | +if ($id == $default_template) { |
|
| 44 | 44 | $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('delete_snippet')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
| 10 | 10 | if($id==0) { |
| 11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // invoke OnBeforeSnipFormDelete event |
| 19 | 19 | $modx->invokeEvent("OnBeforeSnipFormDelete", |
| 20 | - array( |
|
| 21 | - "id" => $id |
|
| 22 | - )); |
|
| 20 | + array( |
|
| 21 | + "id" => $id |
|
| 22 | + )); |
|
| 23 | 23 | |
| 24 | 24 | // delete the snippet. |
| 25 | 25 | $modx->db->delete($modx->getFullTableName('site_snippets'), "id='{$id}'"); |
| 26 | 26 | |
| 27 | 27 | // invoke OnSnipFormDelete event |
| 28 | 28 | $modx->invokeEvent("OnSnipFormDelete", |
| 29 | - array( |
|
| 30 | - "id" => $id |
|
| 31 | - )); |
|
| 29 | + array( |
|
| 30 | + "id" => $id |
|
| 31 | + )); |
|
| 32 | 32 | |
| 33 | 33 | // empty cache |
| 34 | 34 | $modx->clearCache('full'); |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('delete_snippet')) { |
|
| 5 | +if (!$modx->hasPermission('delete_snippet')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
| 10 | -if($id==0) { |
|
| 9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
| 10 | +if ($id == 0) { |
|
| 11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
| 12 | 12 | } |
| 13 | 13 | |
@@ -34,5 +34,5 @@ discard block |
||
| 34 | 34 | $modx->clearCache('full'); |
| 35 | 35 | |
| 36 | 36 | // finished emptying cache - redirect |
| 37 | -$header="Location: index.php?a=76&r=2"; |
|
| 37 | +$header = "Location: index.php?a=76&r=2"; |
|
| 38 | 38 | header($header); |
@@ -3,33 +3,33 @@ |
||
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | if (isset($_REQUEST['t'])) { |
| 10 | 10 | |
| 11 | - if (empty($_REQUEST['t'])) { |
|
| 12 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 13 | - } |
|
| 11 | + if (empty($_REQUEST['t'])) { |
|
| 12 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - // Set the item name for logger |
|
| 16 | - $_SESSION['itemname'] = $_REQUEST['t']; |
|
| 15 | + // Set the item name for logger |
|
| 16 | + $_SESSION['itemname'] = $_REQUEST['t']; |
|
| 17 | 17 | |
| 18 | - $modx->db->optimize($_REQUEST['t']); |
|
| 18 | + $modx->db->optimize($_REQUEST['t']); |
|
| 19 | 19 | |
| 20 | 20 | } elseif (isset($_REQUEST['u'])) { |
| 21 | 21 | |
| 22 | - if (empty($_REQUEST['u'])) { |
|
| 23 | - $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
| 24 | - } |
|
| 22 | + if (empty($_REQUEST['u'])) { |
|
| 23 | + $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - // Set the item name for logger |
|
| 27 | - $_SESSION['itemname'] = $_REQUEST['u']; |
|
| 26 | + // Set the item name for logger |
|
| 27 | + $_SESSION['itemname'] = $_REQUEST['u']; |
|
| 28 | 28 | |
| 29 | - $modx->db->truncate($_REQUEST['u']); |
|
| 29 | + $modx->db->truncate($_REQUEST['u']); |
|
| 30 | 30 | |
| 31 | 31 | } else { |
| 32 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 32 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $mode = (int)$_REQUEST['mode']; |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | -if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) { |
|
| 5 | +if (!($modx->hasPermission('settings') && ($modx->hasPermission('logs') || $modx->hasPermission('bk_manager')))) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -32,6 +32,6 @@ discard block |
||
| 32 | 32 | $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -$mode = (int)$_REQUEST['mode']; |
|
| 36 | -$header="Location: index.php?a={$mode}&s=4"; |
|
| 35 | +$mode = (int) $_REQUEST['mode']; |
|
| 36 | +$header = "Location: index.php?a={$mode}&s=4"; |
|
| 37 | 37 | header($header); |