@@ -37,7 +37,7 @@ |
||
| 37 | 37 | public function __construct() |
| 38 | 38 | { |
| 39 | 39 | $this->phpcode = TDMCreatePhpCode::getInstance(); |
| 40 | - $this->adminobjects = TDMCreateAdminObjects::getInstance(); |
|
| 40 | + $this->adminobjects = TDMCreateAdminObjects::getInstance(); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /* |
@@ -90,8 +90,8 @@ |
||
| 90 | 90 | $moduleDirname = $module->getVar('mod_dirname'); |
| 91 | 91 | $content = $this->getHeaderFilesComments($module, $filename); |
| 92 | 92 | $isset = $this->phpcode->getPhpCodeIsset('templateMain'); |
| 93 | - $display = $this->xoopscode->getXoopsCodeTplAssign('maintainedby', '$'.$moduleDirname."->getConfig('maintainedby')"); |
|
| 94 | - $display .= "\t".$this->getRemoveCarriageReturn($this->xoopscode->getXoopsCodeTplDisplay()); |
|
| 93 | + $display = $this->xoopscode->getXoopsCodeTplAssign('maintainedby', '$'.$moduleDirname."->getConfig('maintainedby')"); |
|
| 94 | + $display .= "\t".$this->getRemoveCarriageReturn($this->xoopscode->getXoopsCodeTplDisplay()); |
|
| 95 | 95 | $content .= $this->phpcode->getPhpCodeConditions($isset, '', '', $display); |
| 96 | 96 | $content .= $this->xoopscode->getXoopsCodeCPFooter(); |
| 97 | 97 | |
@@ -273,8 +273,8 @@ |
||
| 273 | 273 | public function getPhpCodeCaseSwitch($case = 'list', $content, $defaultAfterCase = false, $default = false) |
| 274 | 274 | { |
| 275 | 275 | $case = is_string($case) ? "'{$case}'" : $case; |
| 276 | - $ret = ''; |
|
| 277 | - if (!empty($case)) { |
|
| 276 | + $ret = ''; |
|
| 277 | + if (!empty($case)) { |
|
| 278 | 278 | $ret .= "\tcase {$case}:\n"; |
| 279 | 279 | } |
| 280 | 280 | if ($defaultAfterCase) { |
@@ -544,7 +544,7 @@ |
||
| 544 | 544 | return $ret; |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | - /* |
|
| 547 | + /* |
|
| 548 | 548 | * @public function getRemoveCarriageReturn |
| 549 | 549 | * @param $string |
| 550 | 550 | * |
@@ -275,7 +275,7 @@ |
||
| 275 | 275 | $ret .= $this->defines->getDefine($language, 'IDPAYPAL_DESC', 'Insert here your PayPal ID for donactions.'); |
| 276 | 276 | $ret .= $this->defines->getDefine($language, 'ADVERTISE', 'Advertisement Code'); |
| 277 | 277 | $ret .= $this->defines->getDefine($language, 'ADVERTISE_DESC', 'Insert here the advertisement code'); |
| 278 | - $ret .= $this->defines->getDefine($language, 'MAINTAINEDBY', 'Maintained By'); |
|
| 278 | + $ret .= $this->defines->getDefine($language, 'MAINTAINEDBY', 'Maintained By'); |
|
| 279 | 279 | $ret .= $this->defines->getDefine($language, 'MAINTAINEDBY_DESC', 'Allow url of support site or community'); |
| 280 | 280 | $ret .= $this->defines->getDefine($language, 'BOOKMARKS', 'Social Bookmarks'); |
| 281 | 281 | $ret .= $this->defines->getDefine($language, 'BOOKMARKS_DESC', 'Show Social Bookmarks in the single page'); |
@@ -132,36 +132,36 @@ |
||
| 132 | 132 | return $ret; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - /** |
|
| 135 | + /** |
|
| 136 | 136 | * @private function getModVersionArrayElements |
| 137 | 137 | * |
| 138 | 138 | * @param $element |
| 139 | - * @param $left |
|
| 140 | - * @param $index |
|
| 141 | - * @param $right |
|
| 142 | - * @param $desc |
|
| 143 | - * @param $arrayOptions |
|
| 139 | + * @param $left |
|
| 140 | + * @param $index |
|
| 141 | + * @param $right |
|
| 142 | + * @param $desc |
|
| 143 | + * @param $arrayOptions |
|
| 144 | 144 | * |
| 145 | 145 | * @return string |
| 146 | 146 | */ |
| 147 | 147 | private function getModVersionArrayElements($element = 1, $left, $index = '', $right = '', $desc = '', $arrayOptions = '') |
| 148 | 148 | { |
| 149 | - $index = (is_string($index) && !empty($index)) ? "'{$index}'": $index; |
|
| 150 | - $right = (is_string($right) && !empty($right)) ? "'{$right}'": $right; |
|
| 151 | - $desc = is_string($desc) ? "'{$desc}'": $desc; |
|
| 152 | - if ($element == 1) { |
|
| 153 | - $ret = "\$modversion['{$left}'] = {$desc};\n"; |
|
| 154 | - } |
|
| 155 | - if ($element == 2) { |
|
| 156 | - $ret = "\$modversion['{$left}'][{$index}] = {$desc};\n"; |
|
| 157 | - } |
|
| 158 | - if ($element == 3) { |
|
| 159 | - $ret = "\$modversion['{$left}'][{$index}][{$right}] = {$desc};\n"; |
|
| 160 | - } |
|
| 161 | - if (($element == 3) && !empty($arrayOptions)) { |
|
| 162 | - $ret = "\$modversion['{$left}'][{$index}][{$right}] = {$desc};"; |
|
| 163 | - $ret .= "\$modversion['{$left}'][{$index}][{$right}] = {$arrayOptions};\n"; |
|
| 164 | - } |
|
| 149 | + $index = (is_string($index) && !empty($index)) ? "'{$index}'": $index; |
|
| 150 | + $right = (is_string($right) && !empty($right)) ? "'{$right}'": $right; |
|
| 151 | + $desc = is_string($desc) ? "'{$desc}'": $desc; |
|
| 152 | + if ($element == 1) { |
|
| 153 | + $ret = "\$modversion['{$left}'] = {$desc};\n"; |
|
| 154 | + } |
|
| 155 | + if ($element == 2) { |
|
| 156 | + $ret = "\$modversion['{$left}'][{$index}] = {$desc};\n"; |
|
| 157 | + } |
|
| 158 | + if ($element == 3) { |
|
| 159 | + $ret = "\$modversion['{$left}'][{$index}][{$right}] = {$desc};\n"; |
|
| 160 | + } |
|
| 161 | + if (($element == 3) && !empty($arrayOptions)) { |
|
| 162 | + $ret = "\$modversion['{$left}'][{$index}][{$right}] = {$desc};"; |
|
| 163 | + $ret .= "\$modversion['{$left}'][{$index}][{$right}] = {$arrayOptions};\n"; |
|
| 164 | + } |
|
| 165 | 165 | |
| 166 | 166 | return $ret; |
| 167 | 167 | } |
@@ -146,9 +146,9 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | private function getModVersionArrayElements($element = 1, $left, $index = '', $right = '', $desc = '', $arrayOptions = '') |
| 148 | 148 | { |
| 149 | - $index = (is_string($index) && !empty($index)) ? "'{$index}'": $index; |
|
| 150 | - $right = (is_string($right) && !empty($right)) ? "'{$right}'": $right; |
|
| 151 | - $desc = is_string($desc) ? "'{$desc}'": $desc; |
|
| 149 | + $index = (is_string($index) && !empty($index)) ? "'{$index}'" : $index; |
|
| 150 | + $right = (is_string($right) && !empty($right)) ? "'{$right}'" : $right; |
|
| 151 | + $desc = is_string($desc) ? "'{$desc}'" : $desc; |
|
| 152 | 152 | if ($element == 1) { |
| 153 | 153 | $ret = "\$modversion['{$left}'] = {$desc};\n"; |
| 154 | 154 | } |
@@ -965,7 +965,7 @@ discard block |
||
| 965 | 965 | */ |
| 966 | 966 | private function getXoopsVersionNotificationCategory($language, $type, $name, $title, $from, $item, $allow) |
| 967 | 967 | { |
| 968 | - $title = strtoupper($title);//{$from} |
|
| 968 | + $title = strtoupper($title); //{$from} |
|
| 969 | 969 | $ret = " |
| 970 | 970 | \$modversion['notification']['{$type}'][] = array( |
| 971 | 971 | 'name' => '{$name}', |