@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | * @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html |
9 | 9 | * @author Agel_Nash <[email protected]> |
10 | 10 | */ |
11 | -include_once(MODX_BASE_PATH . 'assets/lib/APIHelpers.class.php'); |
|
12 | -include_once(MODX_BASE_PATH . 'assets/lib/Helpers/FS.php'); |
|
13 | -require_once(dirname(dirname(__FILE__)) . "/lib/jsonHelper.class.php"); |
|
14 | -require_once(dirname(dirname(__FILE__)) . "/lib/sqlHelper.class.php"); |
|
15 | -require_once(dirname(dirname(__FILE__)) . "/lib/DLTemplate.class.php"); |
|
16 | -require_once(dirname(dirname(__FILE__)) . "/lib/DLCollection.class.php"); |
|
17 | -require_once(dirname(dirname(__FILE__)) . "/lib/xnop.class.php"); |
|
11 | +include_once(MODX_BASE_PATH.'assets/lib/APIHelpers.class.php'); |
|
12 | +include_once(MODX_BASE_PATH.'assets/lib/Helpers/FS.php'); |
|
13 | +require_once(dirname(dirname(__FILE__))."/lib/jsonHelper.class.php"); |
|
14 | +require_once(dirname(dirname(__FILE__))."/lib/sqlHelper.class.php"); |
|
15 | +require_once(dirname(dirname(__FILE__))."/lib/DLTemplate.class.php"); |
|
16 | +require_once(dirname(dirname(__FILE__))."/lib/DLCollection.class.php"); |
|
17 | +require_once(dirname(dirname(__FILE__))."/lib/xnop.class.php"); |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Class DocLister |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | case ')': |
275 | 275 | $open--; |
276 | 276 | if ($open == 0) { |
277 | - $res[] = $cur . ')'; |
|
277 | + $res[] = $cur.')'; |
|
278 | 278 | $cur = ''; |
279 | 279 | } else { |
280 | 280 | $cur .= $e; |
@@ -348,8 +348,8 @@ discard block |
||
348 | 348 | ini_set('display_errors', 1); |
349 | 349 | } |
350 | 350 | $dir = dirname(dirname(__FILE__)); |
351 | - if (file_exists($dir . "/lib/DLdebug.class.php")) { |
|
352 | - include_once($dir . "/lib/DLdebug.class.php"); |
|
351 | + if (file_exists($dir."/lib/DLdebug.class.php")) { |
|
352 | + include_once($dir."/lib/DLdebug.class.php"); |
|
353 | 353 | if (class_exists("DLdebug", false)) { |
354 | 354 | $this->debug = new DLdebug($this); |
355 | 355 | } |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | } |
388 | 388 | $table = $this->_table[$name]; |
389 | 389 | if (!empty($alias) && is_scalar($alias)) { |
390 | - $table .= " as `" . $alias . "`"; |
|
390 | + $table .= " as `".$alias."`"; |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | return $table; |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | */ |
428 | 428 | public function loadConfig($name) |
429 | 429 | { |
430 | - $this->debug->debug('Load json config: ' . $this->debug->dumpData($name), 'loadconfig', 2); |
|
430 | + $this->debug->debug('Load json config: '.$this->debug->dumpData($name), 'loadconfig', 2); |
|
431 | 431 | if (!is_scalar($name)) { |
432 | 432 | $name = ''; |
433 | 433 | } |
@@ -442,10 +442,10 @@ discard block |
||
442 | 442 | switch ($cfgName[1]) { |
443 | 443 | case 'custom': |
444 | 444 | case 'core': |
445 | - $configFile = dirname(dirname(__FILE__)) . "/config/{$cfgName[1]}/{$cfgName[0]}.json"; |
|
445 | + $configFile = dirname(dirname(__FILE__))."/config/{$cfgName[1]}/{$cfgName[0]}.json"; |
|
446 | 446 | break; |
447 | 447 | default: |
448 | - $configFile = $this->FS->relativePath($cfgName[1] . '/' . $cfgName[0] . ".json"); |
|
448 | + $configFile = $this->FS->relativePath($cfgName[1].'/'.$cfgName[0].".json"); |
|
449 | 449 | break; |
450 | 450 | } |
451 | 451 | |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | */ |
472 | 472 | public function jsonDecode($json, $config = array(), $nop = false) |
473 | 473 | { |
474 | - $this->debug->debug('Decode JSON: ' . $this->debug->dumpData($json) . "\r\nwith config: " . $this->debug->dumpData($config), |
|
474 | + $this->debug->debug('Decode JSON: '.$this->debug->dumpData($json)."\r\nwith config: ".$this->debug->dumpData($config), |
|
475 | 475 | 'jsonDecode', 2); |
476 | 476 | $config = jsonHelper::jsonDecode($json, $config, $nop); |
477 | 477 | $this->isErrorJSON($json); |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | { |
491 | 491 | $error = jsonHelper::json_last_error_msg(); |
492 | 492 | if (!in_array($error, array('error_none', 'other'))) { |
493 | - $this->debug->error($this->getMsg('json.' . $error) . ": " . $this->debug->dumpData($json, 'code'), 'JSON'); |
|
493 | + $this->debug->error($this->getMsg('json.'.$error).": ".$this->debug->dumpData($json, 'code'), 'JSON'); |
|
494 | 494 | $error = true; |
495 | 495 | } |
496 | 496 | |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | |
581 | 581 | $link = $this->checkExtender('request') ? $this->extender['request']->getLink() : $this->getRequest(); |
582 | 582 | if ($id == $this->modx->config['site_start']) { |
583 | - $url = $this->modx->config['site_url'] . ($link != '' ? "?{$link}" : ""); |
|
583 | + $url = $this->modx->config['site_url'].($link != '' ? "?{$link}" : ""); |
|
584 | 584 | } else { |
585 | 585 | $url = $this->modx->makeUrl($id, '', $link, $this->getCFGDef('urlScheme', '')); |
586 | 586 | } |
@@ -657,13 +657,13 @@ discard block |
||
657 | 657 | public function ErrorLogger($message, $code, $file, $line, $trace) |
658 | 658 | { |
659 | 659 | if (abs($this->getCFGDef('debug', '0')) == '1') { |
660 | - $out = "CODE #" . $code . "<br />"; |
|
661 | - $out .= "on file: " . $file . ":" . $line . "<br />"; |
|
660 | + $out = "CODE #".$code."<br />"; |
|
661 | + $out .= "on file: ".$file.":".$line."<br />"; |
|
662 | 662 | $out .= "<pre>"; |
663 | 663 | $out .= print_r($trace, 1); |
664 | 664 | $out .= "</pre>"; |
665 | 665 | |
666 | - $message = $out . $message; |
|
666 | + $message = $out.$message; |
|
667 | 667 | } |
668 | 668 | die($message); |
669 | 669 | } |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | $ext = explode(",", $ext); |
692 | 692 | foreach ($ext as $item) { |
693 | 693 | if ($item != '' && !$this->_loadExtender($item)) { |
694 | - throw new Exception('Error load ' . APIHelpers::e($item) . ' extender'); |
|
694 | + throw new Exception('Error load '.APIHelpers::e($item).' extender'); |
|
695 | 695 | } |
696 | 696 | } |
697 | 697 | } |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | $out = DLTemplate::getInstance($this->getMODX())->toPlaceholders($data, $set, $key, $id); |
775 | 775 | |
776 | 776 | $this->debug->debugEnd( |
777 | - "toPlaceholders", array($key . " placeholder" => $data), array('html') |
|
777 | + "toPlaceholders", array($key." placeholder" => $data), array('html') |
|
778 | 778 | ); |
779 | 779 | |
780 | 780 | return $out; |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | } |
803 | 803 | } |
804 | 804 | $q = $quote ? "'" : ""; |
805 | - $out = $q . implode($q . "," . $q, $out) . $q; |
|
805 | + $out = $q.implode($q.",".$q, $out).$q; |
|
806 | 806 | |
807 | 807 | return $out; |
808 | 808 | } |
@@ -823,8 +823,8 @@ discard block |
||
823 | 823 | if (empty($lang)) { |
824 | 824 | $lang = $this->getCFGDef('lang', $this->modx->config['manager_language']); |
825 | 825 | } |
826 | - if (file_exists(dirname(dirname(__FILE__)) . "/lang/" . $lang . ".php")) { |
|
827 | - $tmp = include(dirname(__FILE__) . "/lang/" . $lang . ".php"); |
|
826 | + if (file_exists(dirname(dirname(__FILE__))."/lang/".$lang.".php")) { |
|
827 | + $tmp = include(dirname(__FILE__)."/lang/".$lang.".php"); |
|
828 | 828 | $this->_customLang = is_array($tmp) ? $tmp : array(); |
829 | 829 | } |
830 | 830 | |
@@ -845,14 +845,14 @@ discard block |
||
845 | 845 | $lang = $this->getCFGDef('lang', $this->modx->config['manager_language']); |
846 | 846 | } |
847 | 847 | |
848 | - $this->debug->debug('Load language ' . $this->debug->dumpData($name) . "." . $this->debug->dumpData($lang), |
|
848 | + $this->debug->debug('Load language '.$this->debug->dumpData($name).".".$this->debug->dumpData($lang), |
|
849 | 849 | 'loadlang', 2); |
850 | 850 | if (is_scalar($name)) { |
851 | 851 | $name = array($name); |
852 | 852 | } |
853 | 853 | foreach ($name as $n) { |
854 | - if (file_exists(dirname(__FILE__) . "/lang/" . $lang . "/" . $n . ".inc.php")) { |
|
855 | - $tmp = include(dirname(__FILE__) . "/lang/" . $lang . "/" . $n . ".inc.php"); |
|
854 | + if (file_exists(dirname(__FILE__)."/lang/".$lang."/".$n.".inc.php")) { |
|
855 | + $tmp = include(dirname(__FILE__)."/lang/".$lang."/".$n.".inc.php"); |
|
856 | 856 | if (is_array($tmp)) { |
857 | 857 | /** |
858 | 858 | * Переименовыываем элементы массива из array('test'=>'data') в array('name.test'=>'data') |
@@ -935,7 +935,7 @@ discard block |
||
935 | 935 | } |
936 | 936 | } |
937 | 937 | |
938 | - $data[$this->getCFGDef("sysKey", "dl") . ".wrap"] = $this->renderWrap($out); |
|
938 | + $data[$this->getCFGDef("sysKey", "dl").".wrap"] = $this->renderWrap($out); |
|
939 | 939 | $out = $this->parseChunk($this->getCFGDef('tpl', ''), $data); |
940 | 940 | |
941 | 941 | return $out; |
@@ -1001,7 +1001,7 @@ discard block |
||
1001 | 1001 | ); |
1002 | 1002 | $out = DLTemplate::getInstance($this->getMODX())->parseChunk($name, $data, $parseDocumentSource); |
1003 | 1003 | if (empty($out)) { |
1004 | - $this->debug->debug("Empty chunk: " . $this->debug->dumpData($name), '', 2); |
|
1004 | + $this->debug->debug("Empty chunk: ".$this->debug->dumpData($name), '', 2); |
|
1005 | 1005 | } |
1006 | 1006 | $this->debug->debugEnd("parseChunk"); |
1007 | 1007 | |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | if ((($this->getCFGDef("noneWrapOuter", "1") && $docs == 0) || $docs > 0) && !empty($this->ownerTPL)) { |
1038 | 1038 | $this->debug->debug("", "renderWrapTPL", 2); |
1039 | 1039 | $parse = true; |
1040 | - $plh = array($this->getCFGDef("sysKey", "dl") . ".wrap" => $data); |
|
1040 | + $plh = array($this->getCFGDef("sysKey", "dl").".wrap" => $data); |
|
1041 | 1041 | /** |
1042 | 1042 | * @var $extPrepare prepare_DL_Extender |
1043 | 1043 | */ |
@@ -1087,13 +1087,13 @@ discard block |
||
1087 | 1087 | |
1088 | 1088 | $iterationName = ($i % 2 == 0) ? 'Odd' : 'Even'; |
1089 | 1089 | $tmp = strtolower($iterationName); |
1090 | - $class[] = $this->getCFGDef($tmp . 'Class', $tmp); |
|
1090 | + $class[] = $this->getCFGDef($tmp.'Class', $tmp); |
|
1091 | 1091 | |
1092 | - $this->renderTPL = $this->getCFGDef('tplId' . $i, $this->renderTPL); |
|
1093 | - $this->renderTPL = $this->getCFGDef('tpl' . $iterationName, $this->renderTPL); |
|
1092 | + $this->renderTPL = $this->getCFGDef('tplId'.$i, $this->renderTPL); |
|
1093 | + $this->renderTPL = $this->getCFGDef('tpl'.$iterationName, $this->renderTPL); |
|
1094 | 1094 | |
1095 | 1095 | $data[$this->getCFGDef("sysKey", |
1096 | - "dl") . '.full_iteration'] = ($this->extPaginate) ? ($i + $this->getCFGDef('display', |
|
1096 | + "dl").'.full_iteration'] = ($this->extPaginate) ? ($i + $this->getCFGDef('display', |
|
1097 | 1097 | 0) * ($this->extPaginate->currentPage() - 1)) : $i; |
1098 | 1098 | |
1099 | 1099 | if ($i == 1) { |
@@ -1107,14 +1107,14 @@ discard block |
||
1107 | 1107 | if ($this->modx->documentIdentifier == $data['id']) { |
1108 | 1108 | $this->renderTPL = $this->getCFGDef('tplCurrent', $this->renderTPL); |
1109 | 1109 | $data[$this->getCFGDef("sysKey", |
1110 | - "dl") . '.active'] = 1; //[+active+] - 1 if $modx->documentIdentifer equal ID this element |
|
1110 | + "dl").'.active'] = 1; //[+active+] - 1 if $modx->documentIdentifer equal ID this element |
|
1111 | 1111 | $class[] = $this->getCFGDef('currentClass', 'current'); |
1112 | 1112 | } else { |
1113 | - $data[$this->getCFGDef("sysKey", "dl") . '.active'] = 0; |
|
1113 | + $data[$this->getCFGDef("sysKey", "dl").'.active'] = 0; |
|
1114 | 1114 | } |
1115 | 1115 | |
1116 | 1116 | $class = implode(" ", $class); |
1117 | - $data[$this->getCFGDef("sysKey", "dl") . '.class'] = $class; |
|
1117 | + $data[$this->getCFGDef("sysKey", "dl").'.class'] = $class; |
|
1118 | 1118 | |
1119 | 1119 | /** |
1120 | 1120 | * @var $extE e_DL_Extender |
@@ -1219,7 +1219,7 @@ discard block |
||
1219 | 1219 | */ |
1220 | 1220 | public function checkExtender($name) |
1221 | 1221 | { |
1222 | - return (isset($this->extender[$name]) && $this->extender[$name] instanceof $name . "_DL_Extender"); |
|
1222 | + return (isset($this->extender[$name]) && $this->extender[$name] instanceof $name."_DL_Extender"); |
|
1223 | 1223 | } |
1224 | 1224 | |
1225 | 1225 | /** |
@@ -1260,17 +1260,17 @@ discard block |
||
1260 | 1260 | */ |
1261 | 1261 | protected function _loadExtender($name) |
1262 | 1262 | { |
1263 | - $this->debug->debug('Load Extender ' . $this->debug->dumpData($name), 'LoadExtender', 2); |
|
1263 | + $this->debug->debug('Load Extender '.$this->debug->dumpData($name), 'LoadExtender', 2); |
|
1264 | 1264 | $flag = false; |
1265 | 1265 | |
1266 | - $classname = ($name != '') ? $name . "_DL_Extender" : ""; |
|
1266 | + $classname = ($name != '') ? $name."_DL_Extender" : ""; |
|
1267 | 1267 | if ($classname != '' && isset($this->extender[$name]) && $this->extender[$name] instanceof $classname) { |
1268 | 1268 | $flag = true; |
1269 | 1269 | |
1270 | 1270 | } else { |
1271 | 1271 | if (!class_exists($classname, false) && $classname != '') { |
1272 | - if (file_exists(dirname(__FILE__) . "/extender/" . $name . ".extender.inc")) { |
|
1273 | - include_once(dirname(__FILE__) . "/extender/" . $name . ".extender.inc"); |
|
1272 | + if (file_exists(dirname(__FILE__)."/extender/".$name.".extender.inc")) { |
|
1273 | + include_once(dirname(__FILE__)."/extender/".$name.".extender.inc"); |
|
1274 | 1274 | } |
1275 | 1275 | } |
1276 | 1276 | if (class_exists($classname, false) && $classname != '') { |
@@ -1279,7 +1279,7 @@ discard block |
||
1279 | 1279 | } |
1280 | 1280 | } |
1281 | 1281 | if (!$flag) { |
1282 | - $this->debug->debug("Error load Extender " . $this->debug->dumpData($name)); |
|
1282 | + $this->debug->debug("Error load Extender ".$this->debug->dumpData($name)); |
|
1283 | 1283 | } |
1284 | 1284 | $this->debug->debugEnd('LoadExtender'); |
1285 | 1285 | |
@@ -1298,7 +1298,7 @@ discard block |
||
1298 | 1298 | */ |
1299 | 1299 | public function setIDs($IDs) |
1300 | 1300 | { |
1301 | - $this->debug->debug('set ID list ' . $this->debug->dumpData($IDs), 'setIDs', 2); |
|
1301 | + $this->debug->debug('set ID list '.$this->debug->dumpData($IDs), 'setIDs', 2); |
|
1302 | 1302 | $IDs = $this->cleanIDs($IDs); |
1303 | 1303 | $type = $this->getCFGDef('idType', 'parents'); |
1304 | 1304 | $depth = $this->getCFGDef('depth', ''); |
@@ -1333,7 +1333,7 @@ discard block |
||
1333 | 1333 | */ |
1334 | 1334 | public function cleanIDs($IDs, $sep = ',') |
1335 | 1335 | { |
1336 | - $this->debug->debug('clean IDs ' . $this->debug->dumpData($IDs) . ' with separator ' . $this->debug->dumpData($sep), |
|
1336 | + $this->debug->debug('clean IDs '.$this->debug->dumpData($IDs).' with separator '.$this->debug->dumpData($sep), |
|
1337 | 1337 | 'cleanIDs', 2); |
1338 | 1338 | $out = array(); |
1339 | 1339 | if (!is_array($IDs)) { |
@@ -1416,7 +1416,7 @@ discard block |
||
1416 | 1416 | { |
1417 | 1417 | $out = ''; |
1418 | 1418 | if ($group != '') { |
1419 | - $out = 'GROUP BY ' . $group; |
|
1419 | + $out = 'GROUP BY '.$group; |
|
1420 | 1420 | } |
1421 | 1421 | |
1422 | 1422 | return $out; |
@@ -1446,7 +1446,7 @@ discard block |
||
1446 | 1446 | $idList = $this->sanitarIn($this->IDs, ',', false); |
1447 | 1447 | $out = array('orderBy' => "FIND_IN_SET({$this->getCFGDef('sortBy', $this->getPK())}, '{$idList}')"); |
1448 | 1448 | $this->setConfig($out); //reload config; |
1449 | - $sort = "ORDER BY " . $out['orderBy']; |
|
1449 | + $sort = "ORDER BY ".$out['orderBy']; |
|
1450 | 1450 | break; |
1451 | 1451 | default: |
1452 | 1452 | $out = array('orderBy' => '', 'order' => '', 'sortBy' => ''); |
@@ -1466,13 +1466,13 @@ discard block |
||
1466 | 1466 | } |
1467 | 1467 | |
1468 | 1468 | $out['sortBy'] = (($tmp = $this->getCFGDef('sortBy', '')) != '') ? $tmp : $sortName; |
1469 | - $out['orderBy'] = $out['sortBy'] . " " . $out['order']; |
|
1469 | + $out['orderBy'] = $out['sortBy']." ".$out['order']; |
|
1470 | 1470 | } |
1471 | 1471 | $this->setConfig($out); //reload config; |
1472 | - $sort = "ORDER BY " . $out['orderBy']; |
|
1472 | + $sort = "ORDER BY ".$out['orderBy']; |
|
1473 | 1473 | break; |
1474 | 1474 | } |
1475 | - $this->debug->debugEnd("sortORDER", 'Get sort order for SQL: ' . $this->debug->dumpData($sort)); |
|
1475 | + $this->debug->debugEnd("sortORDER", 'Get sort order for SQL: '.$this->debug->dumpData($sort)); |
|
1476 | 1476 | |
1477 | 1477 | return $sort; |
1478 | 1478 | } |
@@ -1500,17 +1500,17 @@ discard block |
||
1500 | 1500 | } |
1501 | 1501 | |
1502 | 1502 | if ($limit != 0) { |
1503 | - $ret = "LIMIT " . (int)$offset . "," . (int)$limit; |
|
1503 | + $ret = "LIMIT ".(int)$offset.",".(int)$limit; |
|
1504 | 1504 | } else { |
1505 | 1505 | if ($offset != 0) { |
1506 | 1506 | /** |
1507 | 1507 | * To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter |
1508 | 1508 | * @see http://dev.mysql.com/doc/refman/5.0/en/select.html |
1509 | 1509 | */ |
1510 | - $ret = "LIMIT " . (int)$offset . ",18446744073709551615"; |
|
1510 | + $ret = "LIMIT ".(int)$offset.",18446744073709551615"; |
|
1511 | 1511 | } |
1512 | 1512 | } |
1513 | - $this->debug->debugEnd("limitSQL", "Get limit for SQL: " . $this->debug->dumpData($ret)); |
|
1513 | + $this->debug->debugEnd("limitSQL", "Get limit for SQL: ".$this->debug->dumpData($ret)); |
|
1514 | 1514 | |
1515 | 1515 | return $ret; |
1516 | 1516 | } |
@@ -1553,20 +1553,20 @@ discard block |
||
1553 | 1553 | $children = array(); // children of each ID |
1554 | 1554 | $ids = array(); |
1555 | 1555 | foreach ($data as $i => $r) { |
1556 | - $row =& $data[$i]; |
|
1556 | + $row = & $data[$i]; |
|
1557 | 1557 | $id = $row[$idName]; |
1558 | 1558 | $pid = $row[$pidName]; |
1559 | - $children[$pid][$id] =& $row; |
|
1559 | + $children[$pid][$id] = & $row; |
|
1560 | 1560 | if (!isset($children[$id])) { |
1561 | 1561 | $children[$id] = array(); |
1562 | 1562 | } |
1563 | - $row['#childNodes'] =& $children[$id]; |
|
1563 | + $row['#childNodes'] = & $children[$id]; |
|
1564 | 1564 | $ids[$row[$idName]] = true; |
1565 | 1565 | } |
1566 | 1566 | // Root elements are elements with non-found PIDs. |
1567 | 1567 | $this->_tree = array(); |
1568 | 1568 | foreach ($data as $i => $r) { |
1569 | - $row =& $data[$i]; |
|
1569 | + $row = & $data[$i]; |
|
1570 | 1570 | if (!isset($ids[$row[$pidName]])) { |
1571 | 1571 | $this->_tree[$row[$idName]] = $row; |
1572 | 1572 | } |
@@ -1605,7 +1605,7 @@ discard block |
||
1605 | 1605 | */ |
1606 | 1606 | protected function getFilters($filter_string) |
1607 | 1607 | { |
1608 | - $this->debug->debug("getFilters: " . $this->debug->dumpData($filter_string), 'getFilter', 1); |
|
1608 | + $this->debug->debug("getFilters: ".$this->debug->dumpData($filter_string), 'getFilter', 1); |
|
1609 | 1609 | // the filter parameter tells us, which filters can be used in this query |
1610 | 1610 | $filter_string = trim($filter_string, ' ;'); |
1611 | 1611 | if (!$filter_string) { |
@@ -1632,14 +1632,14 @@ discard block |
||
1632 | 1632 | } |
1633 | 1633 | } |
1634 | 1634 | $output['join'] = !empty($joins) ? implode(' ', $joins) : ''; |
1635 | - $output['where'] = !empty($wheres) ? '(' . implode($sql, $wheres) . ')' : ''; |
|
1635 | + $output['where'] = !empty($wheres) ? '('.implode($sql, $wheres).')' : ''; |
|
1636 | 1636 | } |
1637 | 1637 | } |
1638 | 1638 | |
1639 | 1639 | if (!$logic_op_found) { |
1640 | 1640 | $filter = $this->loadFilter($filter_string); |
1641 | 1641 | if (!$filter) { |
1642 | - $this->debug->warning('Error while loading DocLister filter "' . $this->debug->dumpData($filter_string) . '": check syntax!'); |
|
1642 | + $this->debug->warning('Error while loading DocLister filter "'.$this->debug->dumpData($filter_string).'": check syntax!'); |
|
1643 | 1643 | $output = false; |
1644 | 1644 | } else { |
1645 | 1645 | $output['join'] = $filter->get_join(); |
@@ -1679,19 +1679,19 @@ discard block |
||
1679 | 1679 | $type = trim($type); |
1680 | 1680 | switch (strtoupper($type)) { |
1681 | 1681 | case 'DECIMAL': |
1682 | - $field = 'CAST(' . $field . ' as DECIMAL(10,2))'; |
|
1682 | + $field = 'CAST('.$field.' as DECIMAL(10,2))'; |
|
1683 | 1683 | break; |
1684 | 1684 | case 'UNSIGNED': |
1685 | - $field = 'CAST(' . $field . ' as UNSIGNED)'; |
|
1685 | + $field = 'CAST('.$field.' as UNSIGNED)'; |
|
1686 | 1686 | break; |
1687 | 1687 | case 'BINARY': |
1688 | - $field = 'CAST(' . $field . ' as BINARY)'; |
|
1688 | + $field = 'CAST('.$field.' as BINARY)'; |
|
1689 | 1689 | break; |
1690 | 1690 | case 'DATETIME': |
1691 | - $field = 'CAST(' . $field . ' as DATETIME)'; |
|
1691 | + $field = 'CAST('.$field.' as DATETIME)'; |
|
1692 | 1692 | break; |
1693 | 1693 | case 'SIGNED': |
1694 | - $field = 'CAST(' . $field . ' as SIGNED)'; |
|
1694 | + $field = 'CAST('.$field.' as SIGNED)'; |
|
1695 | 1695 | break; |
1696 | 1696 | } |
1697 | 1697 | |
@@ -1705,17 +1705,17 @@ discard block |
||
1705 | 1705 | */ |
1706 | 1706 | protected function loadFilter($filter) |
1707 | 1707 | { |
1708 | - $this->debug->debug('Load filter ' . $this->debug->dumpData($filter), 'loadFilter', 2); |
|
1708 | + $this->debug->debug('Load filter '.$this->debug->dumpData($filter), 'loadFilter', 2); |
|
1709 | 1709 | $out = false; |
1710 | 1710 | $fltr_params = explode(':', $filter, 2); |
1711 | 1711 | $fltr = APIHelpers::getkey($fltr_params, 0, null); |
1712 | 1712 | // check if the filter is implemented |
1713 | - if (!is_null($fltr) && file_exists(dirname(__FILE__) . '/filter/' . $fltr . '.filter.php')) { |
|
1714 | - require_once dirname(__FILE__) . '/filter/' . $fltr . '.filter.php'; |
|
1713 | + if (!is_null($fltr) && file_exists(dirname(__FILE__).'/filter/'.$fltr.'.filter.php')) { |
|
1714 | + require_once dirname(__FILE__).'/filter/'.$fltr.'.filter.php'; |
|
1715 | 1715 | /** |
1716 | 1716 | * @var tv_DL_filter|content_DL_filter $fltr_class |
1717 | 1717 | */ |
1718 | - $fltr_class = $fltr . '_DL_filter'; |
|
1718 | + $fltr_class = $fltr.'_DL_filter'; |
|
1719 | 1719 | $this->totalFilters++; |
1720 | 1720 | $fltr_obj = new $fltr_class(); |
1721 | 1721 | if ($fltr_obj->init($this, $filter)) { |
@@ -1775,7 +1775,7 @@ discard block |
||
1775 | 1775 | public function getRequest() |
1776 | 1776 | { |
1777 | 1777 | $URL = null; |
1778 | - parse_str(parse_url(MODX_SITE_URL . $_SERVER['REQUEST_URI'], PHP_URL_QUERY), $URL); |
|
1778 | + parse_str(parse_url(MODX_SITE_URL.$_SERVER['REQUEST_URI'], PHP_URL_QUERY), $URL); |
|
1779 | 1779 | |
1780 | 1780 | return http_build_query(array_merge($URL, array(DocLister::AliasRequest => null))); |
1781 | 1781 | } |