@@ -78,7 +78,7 @@ |
||
| 78 | 78 | $module_dirname = $module->getVar('mod_dirname'); |
| 79 | 79 | $ucf_module_dirname = ucfirst($module_dirname); |
| 80 | 80 | $content = $this->getHeaderFilesComments($module, $filename); |
| 81 | - $content .= <<<EOT |
|
| 81 | + $content .= <<<EOT |
|
| 82 | 82 | |
| 83 | 83 | |
| 84 | 84 | class {$ucf_module_dirname}Helper |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | $htmlCode = Tdmcreate\Files\CreateHtmlCode::getInstance(); |
| 135 | 135 | $img = $htmlCode->getHtmlImage('".$localLogo."', $moduleAuthorWebsiteName); |
| 136 | 136 | $anchor = $htmlCode->getHtmlAnchor($moduleAuthorWebsiteUrl, $img, $moduleAuthorWebsiteName, '_blank'); |
| 137 | - $replace = $xc->getXcEqualsOperator('$copyright', '"' . $anchor . '"'); |
|
| 138 | - $ret .= str_replace("\n", '', $replace) . PHP_EOL; |
|
| 137 | + $replace = $xc->getXcEqualsOperator('$copyright', '"'.$anchor.'"'); |
|
| 138 | + $ret .= str_replace("\n", '', $replace).PHP_EOL; |
|
| 139 | 139 | $ret .= $pc->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/xoopsrequest', true); |
| 140 | 140 | $ret .= $pc->getPhpCodeIncludeDir("{$stuModuleDirname}_PATH", 'class/helper', true); |
| 141 | 141 | $ret .= $pc->getPhpCodeIncludeDir("{$stuModuleDirname}_PATH", 'include/functions', true); |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $moduleDirname = $module->getVar('mod_dirname'); |
| 155 | 155 | $filename = $this->getFileName(); |
| 156 | 156 | $content = $this->getHeaderFilesComments($module, $filename); |
| 157 | - $content .= $this->getCommonCode($module); |
|
| 157 | + $content .= $this->getCommonCode($module); |
|
| 158 | 158 | $this->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
| 159 | 159 | |
| 160 | 160 | return $this->renderFile(); |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | $filename = $this->getFileName(); |
| 178 | 178 | $moduleDirname = $module->getVar('mod_dirname'); |
| 179 | 179 | $content = $this->getHeaderFilesComments($module, $filename); |
| 180 | - $content .= $this->getNotificationsFunction($moduleDirname); |
|
| 180 | + $content .= $this->getNotificationsFunction($moduleDirname); |
|
| 181 | 181 | |
| 182 | 182 | $this->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
| 183 | 183 | |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $tables = $this->getTables(); |
| 244 | 244 | $filename = $this->getFileName(); |
| 245 | 245 | $content = $this->getHeaderFilesComments($module, $filename); |
| 246 | - $content .= $this->getInstallModuleFolder($moduleDirname); |
|
| 246 | + $content .= $this->getInstallModuleFolder($moduleDirname); |
|
| 247 | 247 | foreach (array_keys($tables) as $t) { |
| 248 | 248 | $tableId = $tables[$t]->getVar('table_id'); |
| 249 | 249 | $tableMid = $tables[$t]->getVar('table_mid'); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $tableInstall = $tables[$t]->getVar('table_install'); |
| 252 | 252 | if (1 == $tableInstall) { |
| 253 | 253 | $content .= $this->getInstallTableFolder($moduleDirname, $tableName); |
| 254 | - $fields = $this->getTableFields($tableMid, $tableId); |
|
| 254 | + $fields = $this->getTableFields($tableMid, $tableId); |
|
| 255 | 255 | foreach (array_keys($fields) as $f) { |
| 256 | 256 | $fieldElement = $fields[$f]->getVar('field_element'); |
| 257 | 257 | // All fields elements selected |
@@ -77,12 +77,12 @@ discard block |
||
| 77 | 77 | public function renderCommentsIncludes($module, $filename) |
| 78 | 78 | { |
| 79 | 79 | $moduleDirname = $module->getVar('mod_dirname'); |
| 80 | - $content = $this->getHeaderFilesComments($module, $filename . '.php'); |
|
| 81 | - $content .= <<<EOT |
|
| 80 | + $content = $this->getHeaderFilesComments($module, $filename.'.php'); |
|
| 81 | + $content .= <<<EOT |
|
| 82 | 82 | include_once __DIR__ . '/../../../mainfile.php'; |
| 83 | 83 | include_once XOOPS_ROOT_PATH.'/include/{$filename}.php'; |
| 84 | 84 | EOT; |
| 85 | - $this->create($moduleDirname, 'include', $filename . '.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
|
| 85 | + $this->create($moduleDirname, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
|
| 86 | 86 | |
| 87 | 87 | return $this->render(); |
| 88 | 88 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $fpmf = $fields[$f]->getVar('field_name'); |
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | - $content = $this->getHeaderFilesComments($module, $filename . '.php'); |
|
| 108 | + $content = $this->getHeaderFilesComments($module, $filename.'.php'); |
|
| 109 | 109 | $content .= <<<EOT |
| 110 | 110 | include __DIR__ . '/../../../mainfile.php'; |
| 111 | 111 | include_once XOOPS_ROOT_PATH.'/modules/{$moduleDirname}/class/{$tableName}.php'; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | include XOOPS_ROOT_PATH.'/include/{$filename}.php'; |
| 118 | 118 | } |
| 119 | 119 | EOT; |
| 120 | - $this->create($moduleDirname, 'include', $filename . '.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
|
| 120 | + $this->create($moduleDirname, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
|
| 121 | 121 | |
| 122 | 122 | return $this->renderFile(); |
| 123 | 123 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $ucfTableName = ucfirst($tableName); |
| 85 | 85 | $filename = $this->getFileName(); |
| 86 | 86 | $content = $this->getHeaderFilesComments($module, $filename); |
| 87 | - $content .= <<<EOT |
|
| 87 | + $content .= <<<EOT |
|
| 88 | 88 | \n/** |
| 89 | 89 | * CommentsUpdate |
| 90 | 90 | * |
@@ -83,12 +83,12 @@ discard block |
||
| 83 | 83 | $sql = ''; |
| 84 | 84 | if (isset($fieldSearch)) { |
| 85 | 85 | $nb_fieldSearch = count($fieldSearch); |
| 86 | - $sql .= '('; |
|
| 86 | + $sql .= '('; |
|
| 87 | 87 | for ($i = 0; $i < $nb_fieldSearch; ++$i) { |
| 88 | 88 | if ($i != $nb_fieldSearch - 1) { |
| 89 | - $sql .= '' . $fieldSearch[$i] . ' LIKE %$queryarray[' . $options . ']% OR '; |
|
| 89 | + $sql .= ''.$fieldSearch[$i].' LIKE %$queryarray['.$options.']% OR '; |
|
| 90 | 90 | } else { |
| 91 | - $sql .= '' . $fieldSearch[$i] . ' LIKE %$queryarray[0]%'; |
|
| 91 | + $sql .= ''.$fieldSearch[$i].' LIKE %$queryarray[0]%'; |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | $sql .= ')'; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | { |
| 146 | 146 | \$sql .= " AND ( |
| 147 | 147 | EOT; |
| 148 | - $ret .= $this->getSearchField($fieldSearch, 0) . '";'; |
|
| 148 | + $ret .= $this->getSearchField($fieldSearch, 0).'";'; |
|
| 149 | 149 | $ret .= <<<EOT |
| 150 | 150 | |
| 151 | 151 | for(\$i = 1; \$i < \$count; ++\$i) |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $filename = $this->getFileName(); |
| 185 | 185 | $moduleDirname = $module->getVar('mod_dirname'); |
| 186 | 186 | $content = $this->getHeaderFilesComments($module, $filename); |
| 187 | - $content .= $this->getSearchFunction($moduleDirname); |
|
| 187 | + $content .= $this->getSearchFunction($moduleDirname); |
|
| 188 | 188 | |
| 189 | 189 | $this->tdmcfile->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); |
| 190 | 190 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function getPhpCodeCommentLine($comment = null, $var = null, $t = '') |
| 57 | 57 | { |
| 58 | - $value = !empty($var) ? ' ' . $var : ''; |
|
| 58 | + $value = !empty($var) ? ' '.$var : ''; |
|
| 59 | 59 | $ret = "{$t}// {$comment}{$value}\n"; |
| 60 | 60 | |
| 61 | 61 | return $ret; |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | */ |
| 712 | 712 | public function getPhpCodeHtmlentities($entitiesVar, $entitiesQuote = false) |
| 713 | 713 | { |
| 714 | - $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar . ', ' . $entitiesQuote : $entitiesVar; |
|
| 714 | + $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar.', '.$entitiesQuote : $entitiesVar; |
|
| 715 | 715 | $entities = "htmlentities({$entitiesVar})"; |
| 716 | 716 | |
| 717 | 717 | return $entities; |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | */ |
| 726 | 726 | public function getPhpCodeHtmlspecialchars($specialVar, $specialQuote = false) |
| 727 | 727 | { |
| 728 | - $specialVar = (false !== $specialQuote) ? $specialVar . ', ' . $specialQuote : $specialVar; |
|
| 728 | + $specialVar = (false !== $specialQuote) ? $specialVar.', '.$specialQuote : $specialVar; |
|
| 729 | 729 | $specialchars = "htmlspecialchars({$specialVar})"; |
| 730 | 730 | |
| 731 | 731 | return $specialchars; |
@@ -53,25 +53,25 @@ |
||
| 53 | 53 | /* @var \XoopsFormElement $ele */ |
| 54 | 54 | foreach ($this->getElements() as $ele) { |
| 55 | 55 | $ret .= NWLINE; |
| 56 | - $ret .= '<tr>' . NWLINE; |
|
| 57 | - $ret .= '<td class="head" width="30%">' . NWLINE; |
|
| 58 | - $required = $ele->isRequired() ? '-required' : ''; |
|
| 59 | - $ret .= '<div class="xoops-form-element-caption' . $required . '">' . NWLINE; |
|
| 60 | - $ret .= '<span class="caption-text">' . $ele->getCaption() . '</span>' . NWLINE; |
|
| 61 | - $ret .= '<span class="caption-marker">*</span>' . NWLINE; |
|
| 62 | - $ret .= '</div>' . NWLINE; |
|
| 56 | + $ret .= '<tr>'.NWLINE; |
|
| 57 | + $ret .= '<td class="head" width="30%">'.NWLINE; |
|
| 58 | + $required = $ele->isRequired() ? '-required' : ''; |
|
| 59 | + $ret .= '<div class="xoops-form-element-caption'.$required.'">'.NWLINE; |
|
| 60 | + $ret .= '<span class="caption-text">'.$ele->getCaption().'</span>'.NWLINE; |
|
| 61 | + $ret .= '<span class="caption-marker">*</span>'.NWLINE; |
|
| 62 | + $ret .= '</div>'.NWLINE; |
|
| 63 | 63 | $description = $ele->getDescription(); |
| 64 | 64 | if ($description) { |
| 65 | - $ret .= '<div style="font-weight: normal">' . NWLINE; |
|
| 66 | - $ret .= $description . NWLINE; |
|
| 67 | - $ret .= '</div>' . NWLINE; |
|
| 65 | + $ret .= '<div style="font-weight: normal">'.NWLINE; |
|
| 66 | + $ret .= $description.NWLINE; |
|
| 67 | + $ret .= '</div>'.NWLINE; |
|
| 68 | 68 | } |
| 69 | - $ret .= '</td>' . NWLINE; |
|
| 70 | - $ret .= '<td class="even">' . NWLINE; |
|
| 71 | - $ret .= $ele->render() . NWLINE; |
|
| 72 | - $ret .= '<span class="form-horizontal">' . $ele->getDescription() . '</span>'; |
|
| 73 | - $ret .= '</td>' . NWLINE; |
|
| 74 | - $ret .= '</tr>' . NWLINE; |
|
| 69 | + $ret .= '</td>'.NWLINE; |
|
| 70 | + $ret .= '<td class="even">'.NWLINE; |
|
| 71 | + $ret .= $ele->render().NWLINE; |
|
| 72 | + $ret .= '<span class="form-horizontal">'.$ele->getDescription().'</span>'; |
|
| 73 | + $ret .= '</td>'.NWLINE; |
|
| 74 | + $ret .= '</tr>'.NWLINE; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | return $ret; |