@@ -28,14 +28,14 @@ discard block |
||
| 28 | 28 | class UserXoopsVersion extends TDMCreateFile |
| 29 | 29 | { |
| 30 | 30 | /** |
| 31 | - * @var array |
|
| 32 | - */ |
|
| 31 | + * @var array |
|
| 32 | + */ |
|
| 33 | 33 | private $kw = []; |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @public function constructor |
|
| 37 | - * @param null |
|
| 38 | - */ |
|
| 36 | + * @public function constructor |
|
| 37 | + * @param null |
|
| 38 | + */ |
|
| 39 | 39 | |
| 40 | 40 | public function __construct() |
| 41 | 41 | { |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @static function getInstance |
|
| 47 | - * @param null |
|
| 46 | + * @static function getInstance |
|
| 47 | + * @param null |
|
| 48 | 48 | * @return UserXoopsVersion |
| 49 | 49 | */ |
| 50 | 50 | public static function getInstance() |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * @public function write |
|
| 62 | - * @param $module |
|
| 63 | - * @param mixed $table |
|
| 64 | - * @param mixed $tables |
|
| 65 | - * @param $filename |
|
| 61 | + * @public function write |
|
| 62 | + * @param $module |
|
| 63 | + * @param mixed $table |
|
| 64 | + * @param mixed $tables |
|
| 65 | + * @param $filename |
|
| 66 | 66 | */ |
| 67 | 67 | public function write($module, $table, $tables, $filename) |
| 68 | 68 | { |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | - * @public function setKeywords |
|
| 81 | - * @param mixed $keywords |
|
| 80 | + * @public function setKeywords |
|
| 81 | + * @param mixed $keywords |
|
| 82 | 82 | */ |
| 83 | 83 | public function setKeywords($keywords) |
| 84 | 84 | { |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | - * @public function getKeywords |
|
| 94 | - * @param null |
|
| 93 | + * @public function getKeywords |
|
| 94 | + * @param null |
|
| 95 | 95 | * @return array |
| 96 | 96 | */ |
| 97 | 97 | public function getKeywords() |
@@ -141,9 +141,9 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | - * @private function getXoopsVersionMySQL |
|
| 145 | - * @param $moduleDirname |
|
| 146 | - * @param $table |
|
| 144 | + * @private function getXoopsVersionMySQL |
|
| 145 | + * @param $moduleDirname |
|
| 146 | + * @param $table |
|
| 147 | 147 | * @param $tables |
| 148 | 148 | * @return string |
| 149 | 149 | */ |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | - * @private function getXoopsVersionSearch |
|
| 172 | + * @private function getXoopsVersionSearch |
|
| 173 | 173 | * @param $moduleDirname |
| 174 | 174 | * |
| 175 | 175 | * @return string |
@@ -186,8 +186,8 @@ discard block |
||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
| 189 | - * @private function getXoopsVersionComments |
|
| 190 | - * @param $moduleDirname |
|
| 189 | + * @private function getXoopsVersionComments |
|
| 190 | + * @param $moduleDirname |
|
| 191 | 191 | * |
| 192 | 192 | * @return string |
| 193 | 193 | */ |
@@ -206,8 +206,8 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | - * @private function getXoopsVersionTemplatesAdmin |
|
| 210 | - * @param $moduleDirname |
|
| 209 | + * @private function getXoopsVersionTemplatesAdmin |
|
| 210 | + * @param $moduleDirname |
|
| 211 | 211 | * @param $tables |
| 212 | 212 | * |
| 213 | 213 | * @return string |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | /** |
| 238 | - * @private function getXoopsVersionTemplatesLine |
|
| 238 | + * @private function getXoopsVersionTemplatesLine |
|
| 239 | 239 | * @param $moduleDirname |
| 240 | 240 | * @param $type |
| 241 | 241 | * @param string $extra |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | /** |
| 265 | - * @private function getXoopsVersionTemplatesUser |
|
| 266 | - * @param $moduleDirname |
|
| 265 | + * @private function getXoopsVersionTemplatesUser |
|
| 266 | + * @param $moduleDirname |
|
| 267 | 267 | * @param $tables |
| 268 | 268 | * @return string |
| 269 | 269 | */ |
@@ -325,8 +325,8 @@ discard block |
||
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | /** |
| 328 | - * @private function getXoopsVersionSubmenu |
|
| 329 | - * @param $language |
|
| 328 | + * @private function getXoopsVersionSubmenu |
|
| 329 | + * @param $language |
|
| 330 | 330 | * @param $tables |
| 331 | 331 | * @return string |
| 332 | 332 | */ |
@@ -358,8 +358,8 @@ discard block |
||
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | /** |
| 361 | - * @private function getXoopsVersionBlocks |
|
| 362 | - * @param $moduleDirname |
|
| 361 | + * @private function getXoopsVersionBlocks |
|
| 362 | + * @param $moduleDirname |
|
| 363 | 363 | * @param $tables |
| 364 | 364 | * @param $language |
| 365 | 365 | * @return string |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | /** |
| 394 | - * @private function getXoopsVersionTypeBlocks |
|
| 394 | + * @private function getXoopsVersionTypeBlocks |
|
| 395 | 395 | * @param $moduleDirname |
| 396 | 396 | * @param $tableName |
| 397 | 397 | * @param $stuTableSoleName |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | /** |
| 421 | - * @private function getXoopsVersionConfig |
|
| 421 | + * @private function getXoopsVersionConfig |
|
| 422 | 422 | * @param $module |
| 423 | 423 | * @param $table |
| 424 | 424 | * @param $language |
@@ -434,57 +434,57 @@ discard block |
||
| 434 | 434 | $ret = $this->getDashComment('Config'); |
| 435 | 435 | $ret .= $this->getSimpleString('$c = 1;'); |
| 436 | 436 | |
| 437 | - $table_permissions = 0; |
|
| 438 | - $table_admin = 0; |
|
| 439 | - $table_user = 0; |
|
| 440 | - $table_tag = 0; |
|
| 441 | - $field_images = 0; |
|
| 442 | - foreach ($tables as $table) { |
|
| 443 | - $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id')); |
|
| 444 | - foreach (array_keys($fields) as $f) { |
|
| 445 | - $fieldElement = $fields[$f]->getVar('field_element'); |
|
| 446 | - switch ($fieldElement) { |
|
| 447 | - case '3': |
|
| 448 | - case '4': |
|
| 449 | - case 3: |
|
| 450 | - case 4: |
|
| 451 | - $fieldName = $fields[$f]->getVar('field_name'); |
|
| 452 | - $rpFieldName = $this->getRightString($fieldName); |
|
| 453 | - $ucfFieldName = ucfirst($rpFieldName); |
|
| 454 | - $stuFieldName = strtoupper($rpFieldName); |
|
| 455 | - $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Editor', $rpFieldName); |
|
| 456 | - $ret .= $xCodeVConfig->getXcLoad('xoopseditorhandler'); |
|
| 457 | - $ret .= $xCodeVConfig->getXcEqualsOperator('$editorHandler'.$ucfFieldName, 'XoopsEditorHandler::getInstance()'); |
|
| 458 | - $editor = [ |
|
| 459 | - 'name' => "'editor_{$rpFieldName}'", 'title' => "'{$language}EDITOR_{$stuFieldName}'", 'description' => "'{$language}EDITOR_{$stuFieldName}_DESC'", |
|
| 460 | - 'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'dhtml'", 'options' => 'array_flip($editorHandler'.$ucfFieldName.'->getList())', |
|
| 461 | - ]; |
|
| 462 | - $ret .= $uCodeVConfig->getUserModVersion(3, $editor, 'config', '$c'); |
|
| 463 | - $ret .= $this->getSimpleString('++$c;'); |
|
| 464 | - break; |
|
| 437 | + $table_permissions = 0; |
|
| 438 | + $table_admin = 0; |
|
| 439 | + $table_user = 0; |
|
| 440 | + $table_tag = 0; |
|
| 441 | + $field_images = 0; |
|
| 442 | + foreach ($tables as $table) { |
|
| 443 | + $fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id')); |
|
| 444 | + foreach (array_keys($fields) as $f) { |
|
| 445 | + $fieldElement = $fields[$f]->getVar('field_element'); |
|
| 446 | + switch ($fieldElement) { |
|
| 447 | + case '3': |
|
| 448 | + case '4': |
|
| 449 | + case 3: |
|
| 450 | + case 4: |
|
| 451 | + $fieldName = $fields[$f]->getVar('field_name'); |
|
| 452 | + $rpFieldName = $this->getRightString($fieldName); |
|
| 453 | + $ucfFieldName = ucfirst($rpFieldName); |
|
| 454 | + $stuFieldName = strtoupper($rpFieldName); |
|
| 455 | + $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Editor', $rpFieldName); |
|
| 456 | + $ret .= $xCodeVConfig->getXcLoad('xoopseditorhandler'); |
|
| 457 | + $ret .= $xCodeVConfig->getXcEqualsOperator('$editorHandler'.$ucfFieldName, 'XoopsEditorHandler::getInstance()'); |
|
| 458 | + $editor = [ |
|
| 459 | + 'name' => "'editor_{$rpFieldName}'", 'title' => "'{$language}EDITOR_{$stuFieldName}'", 'description' => "'{$language}EDITOR_{$stuFieldName}_DESC'", |
|
| 460 | + 'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'dhtml'", 'options' => 'array_flip($editorHandler'.$ucfFieldName.'->getList())', |
|
| 461 | + ]; |
|
| 462 | + $ret .= $uCodeVConfig->getUserModVersion(3, $editor, 'config', '$c'); |
|
| 463 | + $ret .= $this->getSimpleString('++$c;'); |
|
| 464 | + break; |
|
| 465 | 465 | |
| 466 | - case '10': |
|
| 467 | - case '11': |
|
| 468 | - case '12': |
|
| 469 | - case '13': |
|
| 470 | - case '14': |
|
| 471 | - case 10: |
|
| 472 | - case 11: |
|
| 473 | - case 12: |
|
| 474 | - case 13: |
|
| 475 | - case 14: |
|
| 476 | - $field_images = 1; |
|
| 477 | - break; |
|
| 478 | - case 'else': |
|
| 479 | - default: |
|
| 480 | - break; |
|
| 481 | - } |
|
| 482 | - } |
|
| 483 | - if (1 == $table->getVar('table_permissions')) { $table_permissions = 1;} |
|
| 484 | - if (1 == $table->getVar('table_admin')) { $table_admin = 1;} |
|
| 485 | - if (1 == $table->getVar('table_user')) { $table_user = 1;} |
|
| 486 | - if (1 == $table->getVar('table_tag')) { $table_tag = 1;} |
|
| 487 | - } |
|
| 466 | + case '10': |
|
| 467 | + case '11': |
|
| 468 | + case '12': |
|
| 469 | + case '13': |
|
| 470 | + case '14': |
|
| 471 | + case 10: |
|
| 472 | + case 11: |
|
| 473 | + case 12: |
|
| 474 | + case 13: |
|
| 475 | + case 14: |
|
| 476 | + $field_images = 1; |
|
| 477 | + break; |
|
| 478 | + case 'else': |
|
| 479 | + default: |
|
| 480 | + break; |
|
| 481 | + } |
|
| 482 | + } |
|
| 483 | + if (1 == $table->getVar('table_permissions')) { $table_permissions = 1;} |
|
| 484 | + if (1 == $table->getVar('table_admin')) { $table_admin = 1;} |
|
| 485 | + if (1 == $table->getVar('table_user')) { $table_user = 1;} |
|
| 486 | + if (1 == $table->getVar('table_tag')) { $table_tag = 1;} |
|
| 487 | + } |
|
| 488 | 488 | |
| 489 | 489 | if (1 === $table_permissions) { |
| 490 | 490 | $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Get groups'); |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | } |
| 635 | 635 | |
| 636 | 636 | /** |
| 637 | - * @private function getNotificationsType |
|
| 637 | + * @private function getNotificationsType |
|
| 638 | 638 | * @param $language |
| 639 | 639 | * @param $type |
| 640 | 640 | * @param $tableName |
@@ -677,7 +677,7 @@ discard block |
||
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | /** |
| 680 | - * @private function getXoopsVersionNotifications |
|
| 680 | + * @private function getXoopsVersionNotifications |
|
| 681 | 681 | * @param $module |
| 682 | 682 | * @param $language |
| 683 | 683 | * @return string |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | } |
| 768 | 768 | |
| 769 | 769 | /** |
| 770 | - * @private function getXoopsVersionNotificationGlobal |
|
| 770 | + * @private function getXoopsVersionNotificationGlobal |
|
| 771 | 771 | * @param $language |
| 772 | 772 | * @param $type |
| 773 | 773 | * @param $name |
@@ -794,7 +794,7 @@ discard block |
||
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | /** |
| 797 | - * @private function getXoopsVersionNotificationCategory |
|
| 797 | + * @private function getXoopsVersionNotificationCategory |
|
| 798 | 798 | * @param $language |
| 799 | 799 | * @param $type |
| 800 | 800 | * @param $name |
@@ -822,7 +822,7 @@ discard block |
||
| 822 | 822 | } |
| 823 | 823 | |
| 824 | 824 | /** |
| 825 | - * @private function getXoopsVersionNotificationTableName |
|
| 825 | + * @private function getXoopsVersionNotificationTableName |
|
| 826 | 826 | * @param $language |
| 827 | 827 | * @param $type |
| 828 | 828 | * @param $name |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | } |
| 852 | 852 | |
| 853 | 853 | /** |
| 854 | - * @private function getXoopsVersionNotifications |
|
| 854 | + * @private function getXoopsVersionNotifications |
|
| 855 | 855 | * @param $language |
| 856 | 856 | * @param $type |
| 857 | 857 | * @param $name |
@@ -883,8 +883,8 @@ discard block |
||
| 883 | 883 | } |
| 884 | 884 | |
| 885 | 885 | /** |
| 886 | - * @public function render |
|
| 887 | - * @param null |
|
| 886 | + * @public function render |
|
| 887 | + * @param null |
|
| 888 | 888 | * @return bool|string |
| 889 | 889 | */ |
| 890 | 890 | public function render() |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | if (in_array(1, $tableBlocks)) { |
| 929 | 929 | $content .= $this->getXoopsVersionBlocks($moduleDirname, $tables, $language); |
| 930 | 930 | } |
| 931 | - $content .= $this->getXoopsVersionConfig($module, $tables, $language); |
|
| 931 | + $content .= $this->getXoopsVersionConfig($module, $tables, $language); |
|
| 932 | 932 | if (in_array(1, $tableNotifications)) { |
| 933 | 933 | $content .= $this->getXoopsVersionNotifications($module, $language); |
| 934 | 934 | } |
@@ -480,10 +480,10 @@ discard block |
||
| 480 | 480 | break; |
| 481 | 481 | } |
| 482 | 482 | } |
| 483 | - if (1 == $table->getVar('table_permissions')) { $table_permissions = 1;} |
|
| 484 | - if (1 == $table->getVar('table_admin')) { $table_admin = 1;} |
|
| 485 | - if (1 == $table->getVar('table_user')) { $table_user = 1;} |
|
| 486 | - if (1 == $table->getVar('table_tag')) { $table_tag = 1;} |
|
| 483 | + if (1 == $table->getVar('table_permissions')) { $table_permissions = 1; } |
|
| 484 | + if (1 == $table->getVar('table_admin')) { $table_admin = 1; } |
|
| 485 | + if (1 == $table->getVar('table_user')) { $table_user = 1; } |
|
| 486 | + if (1 == $table->getVar('table_tag')) { $table_tag = 1; } |
|
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | if (1 === $table_permissions) { |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | $ret .= $this->getSimpleString('++$c;'); |
| 523 | 523 | unset($this->keywords); |
| 524 | 524 | |
| 525 | - if ( 1 === $field_images) { |
|
| 525 | + if (1 === $field_images) { |
|
| 526 | 526 | $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Uploads : maxsize of image'); |
| 527 | 527 | $maxsize = [ |
| 528 | 528 | 'name' => "'maxsize'", 'title' => "'{$language}MAXSIZE'", 'description' => "'{$language}MAXSIZE_DESC'", |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | - * @public function initForm |
|
| 47 | + * @public function initForm |
|
| 48 | 48 | * |
| 49 | 49 | * @param $module |
| 50 | 50 | * @param $table |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | - * @private function getXoopsFormText |
|
| 89 | + * @private function getXoopsFormText |
|
| 90 | 90 | * |
| 91 | 91 | * @param $language |
| 92 | 92 | * @param $fieldName |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | - * @private function getXoopsFormDhtmlTextArea |
|
| 111 | + * @private function getXoopsFormDhtmlTextArea |
|
| 112 | 112 | * |
| 113 | 113 | * @param $language |
| 114 | 114 | * @param $moduleDirname |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * @private function getXoopsFormHidden |
|
| 188 | + * @private function getXoopsFormHidden |
|
| 189 | 189 | * |
| 190 | 190 | * @param $fieldName |
| 191 | 191 | * |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | - * @private function getXoopsFormImageList |
|
| 208 | + * @private function getXoopsFormImageList |
|
| 209 | 209 | * |
| 210 | 210 | * @param $language |
| 211 | 211 | * @param $moduleDirname |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | /** |
| 261 | - * @private function getXoopsFormSelectFile |
|
| 261 | + * @private function getXoopsFormSelectFile |
|
| 262 | 262 | * |
| 263 | 263 | * @param $language |
| 264 | 264 | * @param $moduleDirname |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /** |
| 312 | - * @private function getXoopsFormUrlFile |
|
| 312 | + * @private function getXoopsFormUrlFile |
|
| 313 | 313 | * |
| 314 | 314 | * @param $language |
| 315 | 315 | * @param $moduleDirname |
@@ -322,10 +322,10 @@ discard block |
||
| 322 | 322 | private function getXoopsFormUrlFile($language, $moduleDirname, $fieldName, $fieldDefault, $required = 'false') |
| 323 | 323 | { |
| 324 | 324 | $tf = TDMCreateFile::getInstance(); |
| 325 | - $pc = TDMCreatePhpCode::getInstance(); |
|
| 325 | + $pc = TDMCreatePhpCode::getInstance(); |
|
| 326 | 326 | $xc = TDMCreateXoopsCode::getInstance(); |
| 327 | 327 | $cc = ClassXoopsCode::getInstance(); |
| 328 | - $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 328 | + $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 329 | 329 | $t = "\t\t"; |
| 330 | 330 | $ret = $pc->getPhpCodeCommentLine('Form Url', 'Text File ' . $ucfFieldName, $t); |
| 331 | 331 | $ret .= $cc->getClassXoopsFormElementTray('formUrlFile', '_OPTIONS', '<br><br>', $t); |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | /** |
| 395 | - * @private function getXoopsFormUploadFile |
|
| 395 | + * @private function getXoopsFormUploadFile |
|
| 396 | 396 | * |
| 397 | 397 | * @param $language |
| 398 | 398 | * @param $moduleDirname |
@@ -405,10 +405,10 @@ discard block |
||
| 405 | 405 | private function getXoopsFormUploadFile($language, $moduleDirname, $tableName, $fieldName, $required = 'false') |
| 406 | 406 | { |
| 407 | 407 | $tf = TDMCreateFile::getInstance(); |
| 408 | - $pc = TDMCreatePhpCode::getInstance(); |
|
| 408 | + $pc = TDMCreatePhpCode::getInstance(); |
|
| 409 | 409 | $xc = TDMCreateXoopsCode::getInstance(); |
| 410 | 410 | $cc = ClassXoopsCode::getInstance(); |
| 411 | - $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 411 | + $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 412 | 412 | $stuTableName = strtoupper($tableName); |
| 413 | 413 | $t = "\t\t"; |
| 414 | 414 | $ret = $pc->getPhpCodeCommentLine('Form', 'File ' . $ucfFieldName, $t); |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | /** |
| 423 | - * @private function getXoopsFormColorPicker |
|
| 423 | + * @private function getXoopsFormColorPicker |
|
| 424 | 424 | * |
| 425 | 425 | * @param $language |
| 426 | 426 | * @param $moduleDirname |
@@ -432,10 +432,10 @@ discard block |
||
| 432 | 432 | private function getXoopsFormColorPicker($language, $moduleDirname, $fieldName, $required = 'false') |
| 433 | 433 | { |
| 434 | 434 | $tf = TDMCreateFile::getInstance(); |
| 435 | - $pc = TDMCreatePhpCode::getInstance(); |
|
| 435 | + $pc = TDMCreatePhpCode::getInstance(); |
|
| 436 | 436 | $xc = TDMCreateXoopsCode::getInstance(); |
| 437 | 437 | $cc = ClassXoopsCode::getInstance(); |
| 438 | - $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 438 | + $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 439 | 439 | $t = "\t\t"; |
| 440 | 440 | $ret = $pc->getPhpCodeCommentLine('Form Color', 'Picker ' . $ucfFieldName, $t); |
| 441 | 441 | $getVar = $xc->getXcGetVar('', 'this', $fieldName, true); |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | /** |
| 449 | - * @private function getXoopsFormSelectBox |
|
| 449 | + * @private function getXoopsFormSelectBox |
|
| 450 | 450 | * |
| 451 | 451 | * @param $language |
| 452 | 452 | * @param $moduleDirname |
@@ -488,10 +488,10 @@ discard block |
||
| 488 | 488 | private function getXoopsFormSelectUser($language, $moduleDirname, $fieldName, $required = 'false') |
| 489 | 489 | { |
| 490 | 490 | $tf = TDMCreateFile::getInstance(); |
| 491 | - $pc = TDMCreatePhpCode::getInstance(); |
|
| 491 | + $pc = TDMCreatePhpCode::getInstance(); |
|
| 492 | 492 | $xc = TDMCreateXoopsCode::getInstance(); |
| 493 | 493 | $cc = ClassXoopsCode::getInstance(); |
| 494 | - $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 494 | + $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 495 | 495 | $t = "\t\t"; |
| 496 | 496 | $ret = $pc->getPhpCodeCommentLine('Form Select', 'User ' . $ucfFieldName, $t); |
| 497 | 497 | $getConfig = $xc->getXcGetConfig($moduleDirname, 'maxsize'); |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | /** |
| 505 | - * @private function getXoopsFormRadioYN |
|
| 505 | + * @private function getXoopsFormRadioYN |
|
| 506 | 506 | * |
| 507 | 507 | * @param $language |
| 508 | 508 | * @param $fieldName |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | $pc = TDMCreatePhpCode::getInstance(); |
| 517 | 517 | $cc = ClassXoopsCode::getInstance(); |
| 518 | 518 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 519 | - $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 519 | + $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 520 | 520 | $t = "\t\t"; |
| 521 | 521 | $ret = $pc->getPhpCodeCommentLine('Form Radio', 'Yes/No ' . $ucfFieldName, $t); |
| 522 | 522 | $ret .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$this->isNew()', 0, "\$this->getVar('{$fieldName}')", $t); |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | /** |
| 530 | - * @private function getXoopsFormTextDateSelect |
|
| 530 | + * @private function getXoopsFormTextDateSelect |
|
| 531 | 531 | * |
| 532 | 532 | * @param $language |
| 533 | 533 | * @param $fieldName |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | $cc = ClassXoopsCode::getInstance(); |
| 543 | 543 | $t = "\t\t"; |
| 544 | 544 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 545 | - $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 545 | + $ucfFieldName = $tf->getCamelCase($fieldName, true); |
|
| 546 | 546 | $ret = $pc->getPhpCodeCommentLine('Form Text', 'Date Select ' . $ucfFieldName, $t); |
| 547 | 547 | $ret .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$this->isNew()', 0, "\$this->getVar('{$fieldName}')", $t); |
| 548 | 548 | $xoopsTextDateSelect = $cc->getClassXoopsFormTextDateSelect('', $language, $fieldName, $fieldName, $ccFieldName, true, $t); |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | /** |
| 555 | - * @private function getXoopsFormTable |
|
| 555 | + * @private function getXoopsFormTable |
|
| 556 | 556 | * |
| 557 | 557 | * @param $language |
| 558 | 558 | * @param $moduleDirname |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | if ($fieldElement > 15) { |
| 576 | 576 | $fElement = $tc->getHandler('fieldelements')->get($fieldElement); |
| 577 | 577 | $rpFieldelementName = strtolower(str_replace('Table : ', '', $fElement->getVar('fieldelement_name'))); |
| 578 | - $ret = $pc->getPhpCodeCommentLine('Form Table', $rpFieldelementName, $t); |
|
| 578 | + $ret = $pc->getPhpCodeCommentLine('Form Table', $rpFieldelementName, $t); |
|
| 579 | 579 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 580 | 580 | $ret .= $xc->getXoopsHandlerLine($moduleDirname, $rpFieldelementName, $t); |
| 581 | 581 | $ret .= $cc->getClassXoopsFormSelect($ccFieldName.'Select', $language, $fieldName, "this->getVar('{$fieldName}')", null, '', false, $t); |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | /** |
| 628 | - * @private function getXoopsFormTag |
|
| 628 | + * @private function getXoopsFormTag |
|
| 629 | 629 | * |
| 630 | 630 | * @param $moduleDirname |
| 631 | 631 | * @param $fieldId |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | /** |
| 656 | - * @public function renderElements |
|
| 656 | + * @public function renderElements |
|
| 657 | 657 | * @param null |
| 658 | 658 | * @return string |
| 659 | 659 | */ |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 229 | 229 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 230 | 230 | $t = "\t\t"; |
| 231 | - $ret = $pc->getPhpCodeCommentLine('Form Frameworks', 'Image Files ' . $ucfFieldName, $t); |
|
| 231 | + $ret = $pc->getPhpCodeCommentLine('Form Frameworks', 'Image Files '.$ucfFieldName, $t); |
|
| 232 | 232 | $ret .= $xc->getXcEqualsOperator('$get'.$ucfFieldName, "\$this->getVar('{$fieldName}')", null, false, $t); |
| 233 | 233 | $ret .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$get'.$ucfFieldName, '$get'.$ucfFieldName, "'blank.gif'", $t); |
| 234 | 234 | $ret .= $xc->getXcEqualsOperator('$imageDirectory', "'/Frameworks/moduleclasses/icons/32'", null, false, $t); |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 277 | 277 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 278 | 278 | $t = "\t\t\t"; |
| 279 | - $ret = $pc->getPhpCodeCommentLine('Form Frameworks', 'Image Files ' . $ucfFieldName, "\t\t"); |
|
| 279 | + $ret = $pc->getPhpCodeCommentLine('Form Frameworks', 'Image Files '.$ucfFieldName, "\t\t"); |
|
| 280 | 280 | $contentIf = $xc->getXcEqualsOperator('$get'.$ucfFieldName, "\$this->getVar('{$fieldName}')", null, false, $t); |
| 281 | 281 | $contentIf .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$get'.$ucfFieldName, '$get'.$ucfFieldName, "'blank.gif'", $t); |
| 282 | 282 | $contentIf .= $xc->getXcEqualsOperator('$uploadDirectory', "'/uploads/{$moduleDirname}/images/shots'", null, false, $t); |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $cc = ClassXoopsCode::getInstance(); |
| 328 | 328 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 329 | 329 | $t = "\t\t"; |
| 330 | - $ret = $pc->getPhpCodeCommentLine('Form Url', 'Text File ' . $ucfFieldName, $t); |
|
| 330 | + $ret = $pc->getPhpCodeCommentLine('Form Url', 'Text File '.$ucfFieldName, $t); |
|
| 331 | 331 | $ret .= $cc->getClassXoopsFormElementTray('formUrlFile', '_OPTIONS', '<br><br>', $t); |
| 332 | 332 | $ret .= $pc->getPhpCodeTernaryOperator('formUrl', '$this->isNew()', "'{$fieldDefault}'", "\$this->getVar('{$fieldName}')", $t); |
| 333 | 333 | $ret .= $cc->getClassXoopsFormText('formText', $language, $fieldName, 75, 255, 'formUrl', false, $t); |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 363 | 363 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 364 | 364 | $t = "\t\t"; |
| 365 | - $ret = $pc->getPhpCodeCommentLine('Form Upload', 'Image ' . $ucfFieldName, $t); |
|
| 365 | + $ret = $pc->getPhpCodeCommentLine('Form Upload', 'Image '.$ucfFieldName, $t); |
|
| 366 | 366 | $ret .= $xc->getXcEqualsOperator('$get'.$ucfFieldName, "\$this->getVar('{$fieldName}')", null, false, $t); |
| 367 | 367 | $ret .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$get'.$ucfFieldName, '$get'.$ucfFieldName, "'blank.gif'", $t); |
| 368 | 368 | $ret .= $xc->getXcEqualsOperator('$imageDirectory', "'/uploads/{$moduleDirname}/images/{$tableName}'", null, false, $t); |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $paramLabel = "\"<br><img src='\".XOOPS_URL.\"/\".\$imageDirectory.\"/\".\${$ccFieldName}.\"' name='image1' id='image1' alt='' style='max-width:100px' />\""; |
| 379 | 379 | $xoopsFormLabel = $cc->getClassXoopsFormLabel('', "''", $paramLabel, true, ''); |
| 380 | 380 | $ret .= $cc->getClassAddElement('imageTray', $xoopsFormLabel, $t); |
| 381 | - $ret .= $pc->getPhpCodeCommentLine('Form', 'File ' . $ucfFieldName, $t); |
|
| 381 | + $ret .= $pc->getPhpCodeCommentLine('Form', 'File '.$ucfFieldName, $t); |
|
| 382 | 382 | $ret .= $cc->getClassXoopsFormElementTray('fileSelectTray', "''", '<br>', $t); |
| 383 | 383 | $getConfig = $xc->getXcGetConfig($moduleDirname, 'maxsize'); |
| 384 | 384 | $xoopsFormFile = $cc->getClassXoopsFormFile('', $language.'FORM_UPLOAD_IMAGE_'.$stuTableName, 'attachedfile', $getConfig, true, ''); |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 412 | 412 | $stuTableName = strtoupper($tableName); |
| 413 | 413 | $t = "\t\t"; |
| 414 | - $ret = $pc->getPhpCodeCommentLine('Form', 'File ' . $ucfFieldName, $t); |
|
| 414 | + $ret = $pc->getPhpCodeCommentLine('Form', 'File '.$ucfFieldName, $t); |
|
| 415 | 415 | $getConfig = $xc->getXcGetConfig($moduleDirname, 'maxsize'); |
| 416 | 416 | $xoopsFormFile = $cc->getClassXoopsFormFile('', $language.'_'.$stuTableName, $fieldName, $getConfig, true, ''); |
| 417 | 417 | $ret .= $cc->getClassAddElement('form', $xoopsFormFile, $t); |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | $cc = ClassXoopsCode::getInstance(); |
| 438 | 438 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 439 | 439 | $t = "\t\t"; |
| 440 | - $ret = $pc->getPhpCodeCommentLine('Form Color', 'Picker ' . $ucfFieldName, $t); |
|
| 440 | + $ret = $pc->getPhpCodeCommentLine('Form Color', 'Picker '.$ucfFieldName, $t); |
|
| 441 | 441 | $getVar = $xc->getXcGetVar('', 'this', $fieldName, true); |
| 442 | 442 | $xoopsFormFile = $cc->getClassXoopsFormColorPicker('', $language, $fieldName, $getVar, true, ''); |
| 443 | 443 | $ret .= $cc->getClassAddElement('form', $xoopsFormFile, $t); |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | $t = "\t\t"; |
| 468 | 468 | $ret = $pc->getPhpCodeCommentLine($ucfTableName, 'handler', $t); |
| 469 | 469 | $ret .= $xc->getXoopsHandlerLine($moduleDirname, $tableName, $t); |
| 470 | - $ret .= $pc->getPhpCodeCommentLine('Form', 'Select ' . $ucfTableName, $t); |
|
| 470 | + $ret .= $pc->getPhpCodeCommentLine('Form', 'Select '.$ucfTableName, $t); |
|
| 471 | 471 | $ret .= $cc->getClassXoopsFormSelect($ccFieldName.'Select', $language, $fieldName, "this->getVar('{$fieldName}')", null, '', false, $t); |
| 472 | 472 | $ret .= $cc->getClassAddOption($ccFieldName.'Select', "'Empty'", $t); |
| 473 | 473 | $ret .= $cc->getClassAddOptionArray($ccFieldName.'Select', "\${$tableName}Handler->getList()", $t); |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | $cc = ClassXoopsCode::getInstance(); |
| 494 | 494 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 495 | 495 | $t = "\t\t"; |
| 496 | - $ret = $pc->getPhpCodeCommentLine('Form Select', 'User ' . $ucfFieldName, $t); |
|
| 496 | + $ret = $pc->getPhpCodeCommentLine('Form Select', 'User '.$ucfFieldName, $t); |
|
| 497 | 497 | $getConfig = $xc->getXcGetConfig($moduleDirname, 'maxsize'); |
| 498 | 498 | $xoopsSelectUser = $cc->getClassXoopsFormSelectUser('', $language, $fieldName, 'false', $fieldName, true, $t); |
| 499 | 499 | $ret .= $cc->getClassAddElement('form', $xoopsSelectUser.$required, $t); |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 519 | 519 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 520 | 520 | $t = "\t\t"; |
| 521 | - $ret = $pc->getPhpCodeCommentLine('Form Radio', 'Yes/No ' . $ucfFieldName, $t); |
|
| 521 | + $ret = $pc->getPhpCodeCommentLine('Form Radio', 'Yes/No '.$ucfFieldName, $t); |
|
| 522 | 522 | $ret .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$this->isNew()', 0, "\$this->getVar('{$fieldName}')", $t); |
| 523 | 523 | $xoopsRadioYN = $cc->getClassXoopsFormRadioYN('', $language, $fieldName, $ccFieldName, true, $t); |
| 524 | 524 | $ret .= $cc->getClassAddElement('form', $xoopsRadioYN.$required, $t); |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | $t = "\t\t"; |
| 544 | 544 | $ccFieldName = $tf->getCamelCase($fieldName, false, true); |
| 545 | 545 | $ucfFieldName = $tf->getCamelCase($fieldName, true); |
| 546 | - $ret = $pc->getPhpCodeCommentLine('Form Text', 'Date Select ' . $ucfFieldName, $t); |
|
| 546 | + $ret = $pc->getPhpCodeCommentLine('Form Text', 'Date Select '.$ucfFieldName, $t); |
|
| 547 | 547 | $ret .= $pc->getPhpCodeTernaryOperator($ccFieldName, '$this->isNew()', 0, "\$this->getVar('{$fieldName}')", $t); |
| 548 | 548 | $xoopsTextDateSelect = $cc->getClassXoopsFormTextDateSelect('', $language, $fieldName, $fieldName, $ccFieldName, true, $t); |
| 549 | 549 | $ret .= $cc->getClassAddElement('form', $xoopsTextDateSelect.$required, $t); |