@@ -3,4 +3,6 @@ |
||
| 3 | 3 | /** |
| 4 | 4 | * @deprecated use EvolutionCMS\Legacy\LogHandler |
| 5 | 5 | */ |
| 6 | -class logHandler extends EvolutionCMS\Legacy\LogHandler{} |
|
| 6 | +class logHandler extends EvolutionCMS\Legacy\LogHandler |
|
| 7 | +{ |
|
| 8 | +} |
|
@@ -105,7 +105,8 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - private function getUserIP() { |
|
| 108 | + private function getUserIP() |
|
| 109 | + { |
|
| 109 | 110 | if( array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) { |
| 110 | 111 | if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')>0) { |
| 111 | 112 | $addr = explode(",",$_SERVER['HTTP_X_FORWARDED_FOR']); |
@@ -113,8 +114,7 @@ discard block |
||
| 113 | 114 | } else { |
| 114 | 115 | return $_SERVER['HTTP_X_FORWARDED_FOR']; |
| 115 | 116 | } |
| 116 | - } |
|
| 117 | - else { |
|
| 117 | + } else { |
|
| 118 | 118 | return $_SERVER['REMOTE_ADDR']; |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -8,7 +8,8 @@ discard block |
||
| 8 | 8 | * @param array $data |
| 9 | 9 | * @return string |
| 10 | 10 | */ |
| 11 | - public function output($config = array(), $data = array()) { |
|
| 11 | + public function output($config = array(), $data = array()) |
|
| 12 | + { |
|
| 12 | 13 | $modx = evolutionCMS(); |
| 13 | 14 | |
| 14 | 15 | $output = ''; |
@@ -64,7 +65,8 @@ discard block |
||
| 64 | 65 | * @param array $data |
| 65 | 66 | * @return string |
| 66 | 67 | */ |
| 67 | - private function render($data) { |
|
| 68 | + private function render($data) |
|
| 69 | + { |
|
| 68 | 70 | $modx = evolutionCMS(); global $_lang, $_country_lang; |
| 69 | 71 | |
| 70 | 72 | $data['lang.name'] = (isset($_lang[$data['alias']]) ? $_lang[$data['alias']] : $data['alias']); |
@@ -457,7 +457,8 @@ |
||
| 457 | 457 | if ($this->formElementType) { |
| 458 | 458 | $table = "\n" . '<form id="' . $this->formName . '" name="' . $this->formName . '" action="' . $this->formAction . '" method="POST">' . $table; |
| 459 | 459 | } |
| 460 | - if (strlen($this->pageNav) > 1) {//changed to display the pagination if exists. |
|
| 460 | + if (strlen($this->pageNav) > 1) { |
|
| 461 | +//changed to display the pagination if exists. |
|
| 461 | 462 | /* commented this part because of cookie |
| 462 | 463 | $table .= '<div id="max-display-records" ><select style="display:inline" onchange="javascript:updatePageSize(this[this.selectedIndex].value);">'; |
| 463 | 464 | $pageSizes= array (10, 25, 50, 100, 250); |
@@ -43,7 +43,8 @@ discard block |
||
| 43 | 43 | public $im_height = 0; |
| 44 | 44 | public $im; |
| 45 | 45 | |
| 46 | - public function __construct($w=200, $h=80) { |
|
| 46 | + public function __construct($w=200, $h=80) |
|
| 47 | + { |
|
| 47 | 48 | /* create session to set word for verification */ |
| 48 | 49 | $this->setVeriword(); |
| 49 | 50 | $this->dir_font = MODX_BASE_PATH . 'assets/' . $this->dir_font; |
@@ -51,21 +52,24 @@ discard block |
||
| 51 | 52 | $this->im_height = $h; |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | - public function setVeriword() { |
|
| 55 | + public function setVeriword() |
|
| 56 | + { |
|
| 55 | 57 | /* create session variable for verification, |
| 56 | 58 | you may change the session variable name */ |
| 57 | 59 | $this->word = $this->makeText(); |
| 58 | 60 | $_SESSION['veriword'] = $this->word; |
| 59 | 61 | } |
| 60 | 62 | |
| 61 | - public function output() { |
|
| 63 | + public function output() |
|
| 64 | + { |
|
| 62 | 65 | /* output the image as jpeg */ |
| 63 | 66 | $this->drawImage(); |
| 64 | 67 | header("Content-type: image/jpeg"); |
| 65 | 68 | imagejpeg($this->im); |
| 66 | 69 | } |
| 67 | 70 | |
| 68 | - public function makeText() { |
|
| 71 | + public function makeText() |
|
| 72 | + { |
|
| 69 | 73 | $modx = evolutionCMS(); |
| 70 | 74 | // set default words |
| 71 | 75 | $words="MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote"; |
@@ -76,7 +80,8 @@ discard block |
||
| 76 | 80 | return (string) $arr_words[array_rand($arr_words)].rand(10,999); |
| 77 | 81 | } |
| 78 | 82 | |
| 79 | - public function drawText() { |
|
| 83 | + public function drawText() |
|
| 84 | + { |
|
| 80 | 85 | $dir = dir($this->dir_font); |
| 81 | 86 | $fontstmp = array(); |
| 82 | 87 | while (false !== ($file = $dir->read())) { |
@@ -131,7 +136,8 @@ discard block |
||
| 131 | 136 | } |
| 132 | 137 | |
| 133 | 138 | |
| 134 | - public function drawImage() { |
|
| 139 | + public function drawImage() |
|
| 140 | + { |
|
| 135 | 141 | |
| 136 | 142 | /* pick one background image randomly from image directory */ |
| 137 | 143 | $img_file = MODX_BASE_PATH . 'assets/' . $this->dir_noise."noise".rand(1,4).".jpg"; |
@@ -162,7 +168,8 @@ discard block |
||
| 162 | 168 | return $this->im; |
| 163 | 169 | } |
| 164 | 170 | |
| 165 | - public function destroy() { |
|
| 171 | + public function destroy() |
|
| 172 | + { |
|
| 166 | 173 | imagedestroy($this->im); |
| 167 | 174 | } |
| 168 | 175 | } |
@@ -8,8 +8,8 @@ |
||
| 8 | 8 | * @todo could be unnecessary |
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | -Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser |
|
| 12 | -{
|
|
| 11 | +Class TemplateParser extends EvolutionCMS\Legacy\TemplateParser |
|
| 12 | +{ |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | ?> |
@@ -27,16 +27,14 @@ |
||
| 27 | 27 | $cm = new EvolutionCMS\Legacy\ModuleCategoriesManager(); |
| 28 | 28 | |
| 29 | 29 | // assign module_params to internal params |
| 30 | -foreach( $_module_params as $param => $value ) |
|
| 31 | -{ |
|
| 30 | +foreach( $_module_params as $param => $value ) { |
|
| 32 | 31 | $cm->set( $param, $value ); |
| 33 | 32 | } |
| 34 | 33 | |
| 35 | 34 | // catch the request actions |
| 36 | 35 | include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
| 37 | 36 | |
| 38 | -if( !$categories = $cm->getCategories() ) |
|
| 39 | -{ |
|
| 37 | +if( !$categories = $cm->getCategories() ) { |
|
| 40 | 38 | setcookie('webfxtab_manage-categories-pane', 0 ); |
| 41 | 39 | $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' ); |
| 42 | 40 | } |
@@ -4,4 +4,6 @@ |
||
| 4 | 4 | * Class to handle the modx-categories |
| 5 | 5 | * @deprecated use EvolutionCMS\Legacy\Categories |
| 6 | 6 | */ |
| 7 | -class Categories extends EvolutionCMS\Legacy\Categories{} |
|
| 7 | +class Categories extends EvolutionCMS\Legacy\Categories |
|
| 8 | +{ |
|
| 9 | +} |
|
@@ -491,4 +491,6 @@ |
||
| 491 | 491 | /** |
| 492 | 492 | * @deprecated use EvolutionCMS\Support\MysqlDumper |
| 493 | 493 | */ |
| 494 | -class Mysqldumper extends EvolutionCMS\Support\MysqlDumper{} |
|
| 494 | +class Mysqldumper extends EvolutionCMS\Support\MysqlDumper |
|
| 495 | +{ |
|
| 496 | +} |
|