@@ -69,11 +69,11 @@ discard block |
||
| 69 | 69 | public function getAdminItemButton($language, $tableName, $stuTableSoleName, $op = '?op=new', $type = 'add', $t = '') |
| 70 | 70 | { |
| 71 | 71 | $stuType = mb_strtoupper($type); |
| 72 | - $aM = $t . '$adminObject->addItemButton('; |
|
| 72 | + $aM = $t.'$adminObject->addItemButton('; |
|
| 73 | 73 | if ('add' === $type) { |
| 74 | - $ret = $aM . "{$language}ADD_{$stuTableSoleName}, '{$tableName}.php{$op}', '{$type}');\n"; |
|
| 74 | + $ret = $aM."{$language}ADD_{$stuTableSoleName}, '{$tableName}.php{$op}', '{$type}');\n"; |
|
| 75 | 75 | } else { |
| 76 | - $ret = $aM . "{$language}{$stuTableSoleName}_{$stuType}, '{$tableName}.php{$op}', '{$type}');\n"; |
|
| 76 | + $ret = $aM."{$language}{$stuTableSoleName}_{$stuType}, '{$tableName}.php{$op}', '{$type}');\n"; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return $ret; |
@@ -115,11 +115,11 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function getAxcAddInfoBoxLine($language, $label = '', $var = '', $t = '') |
| 117 | 117 | { |
| 118 | - $aMenu = $t . '$adminObject->addInfoBoxLine(sprintf('; |
|
| 118 | + $aMenu = $t.'$adminObject->addInfoBoxLine(sprintf('; |
|
| 119 | 119 | if ('' != $var) { |
| 120 | - $ret = $aMenu . " '<label>'.{$label}.'</label>', {$var}));\n"; |
|
| 120 | + $ret = $aMenu." '<label>'.{$label}.'</label>', {$var}));\n"; |
|
| 121 | 121 | } else { |
| 122 | - $ret = $aMenu . " '<label>'.{$label}.'</label>'));\n"; |
|
| 122 | + $ret = $aMenu." '<label>'.{$label}.'</label>'));\n"; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return $ret; |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | public function getAxcAddConfigBoxLine($language, $label = '', $var = '', $t = '') |
| 138 | 138 | { |
| 139 | - $aMenu = $t . '$adminObject->addConfigBoxLine('; |
|
| 139 | + $aMenu = $t.'$adminObject->addConfigBoxLine('; |
|
| 140 | 140 | if ('' != $var) { |
| 141 | - $ret = $aMenu . "{$language}, '{$label}', {$var});\n"; |
|
| 141 | + $ret = $aMenu."{$language}, '{$label}', {$var});\n"; |
|
| 142 | 142 | } else { |
| 143 | - $ret = $aMenu . "{$language}, '{$label}');\n"; |
|
| 143 | + $ret = $aMenu."{$language}, '{$label}');\n"; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return $ret; |
@@ -162,15 +162,15 @@ discard block |
||
| 162 | 162 | $ret .= $pCodeImageList->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/uploader', true, false, '', $t); |
| 163 | 163 | $xRootPath = "XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'"; |
| 164 | 164 | $ret .= $xCodeImageList->getXcMediaUploader('uploader', $xRootPath, $moduleDirname, $t); |
| 165 | - $post = $pCodeImageList->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST') . '[0]'; |
|
| 165 | + $post = $pCodeImageList->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST').'[0]'; |
|
| 166 | 166 | $fetchMedia = $this->getAxcFetchMedia('uploader', $post); |
| 167 | - $ifelse = $t . "\t//" . $this->getAxcSetPrefix('uploader', "{$fieldName}_") . ";\n"; |
|
| 168 | - $ifelse .= $t . "\t//{$fetchMedia};\n"; |
|
| 169 | - $contentElseInt = $xCodeImageList->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t . "\t\t"); |
|
| 170 | - $contentIf = $xCodeImageList->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t . "\t\t"); |
|
| 171 | - $contentIf .= $xCodeImageList->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t . "\t\t"); |
|
| 172 | - $ifelse .= $pCodeImageList->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t . "\t"); |
|
| 173 | - $contentElseExt = $xCodeImageList->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t . "\t"); |
|
| 167 | + $ifelse = $t."\t//".$this->getAxcSetPrefix('uploader', "{$fieldName}_").";\n"; |
|
| 168 | + $ifelse .= $t."\t//{$fetchMedia};\n"; |
|
| 169 | + $contentElseInt = $xCodeImageList->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t."\t\t"); |
|
| 170 | + $contentIf = $xCodeImageList->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t."\t\t"); |
|
| 171 | + $contentIf .= $xCodeImageList->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t."\t\t"); |
|
| 172 | + $ifelse .= $pCodeImageList->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t."\t"); |
|
| 173 | + $contentElseExt = $xCodeImageList->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t."\t"); |
|
| 174 | 174 | |
| 175 | 175 | $ret .= $pCodeImageList->getPhpCodeConditions($fetchMedia, '', '', $ifelse, $contentElseExt, $t); |
| 176 | 176 | |
@@ -194,21 +194,21 @@ discard block |
||
| 194 | 194 | $ret = $pCodeUploadImage->getPhpCodeCommentLine('Set Var', $fieldName, $t); |
| 195 | 195 | $ret .= $pCodeUploadImage->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/uploader', true, false, '', $t); |
| 196 | 196 | $xUploadImage = "{$stuModuleDirname}_UPLOAD_IMAGE_PATH"; |
| 197 | - $ret .= $xCodeUploadImage->getXcMediaUploader('uploader', $xUploadImage . ".'/{$tableName}/'", $moduleDirname, $t); |
|
| 198 | - $post = $pCodeUploadImage->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST') . '[0]'; |
|
| 197 | + $ret .= $xCodeUploadImage->getXcMediaUploader('uploader', $xUploadImage.".'/{$tableName}/'", $moduleDirname, $t); |
|
| 198 | + $post = $pCodeUploadImage->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST').'[0]'; |
|
| 199 | 199 | $fetchMedia = $this->getAxcFetchMedia('uploader', $post); |
| 200 | - $file = $pCodeUploadImage->getPhpCodeGlobalsVariables('attachedfile', 'FILES') . "['name']"; |
|
| 200 | + $file = $pCodeUploadImage->getPhpCodeGlobalsVariables('attachedfile', 'FILES')."['name']"; |
|
| 201 | 201 | $expr = '/^.+\.([^.]+)$/sU'; |
| 202 | - $ifelse = $pCodeUploadImage->getPhpCodePregFunzions('extension', $expr, '', $file, 'replace', false, $t . "\t"); |
|
| 202 | + $ifelse = $pCodeUploadImage->getPhpCodePregFunzions('extension', $expr, '', $file, 'replace', false, $t."\t"); |
|
| 203 | 203 | |
| 204 | - $ifelse .= $t . "\t\$imgName = str_replace(' ', '', \$_POST['{$fieldMain}']).'.'.\$extension;\n"; |
|
| 205 | - $ifelse .= $this->getAxcSetPrefix('uploader', '$imgName', $t . "\t") . ";\n"; |
|
| 206 | - $ifelse .= $t . "\t{$fetchMedia};\n"; |
|
| 207 | - $contentElseInt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t . "\t\t"); |
|
| 208 | - $contentIf = $xCodeUploadImage->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t . "\t\t"); |
|
| 209 | - $contentIf .= $xCodeUploadImage->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t . "\t\t"); |
|
| 210 | - $ifelse .= $pCodeUploadImage->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t . "\t"); |
|
| 211 | - $contentElseExt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t . "\t"); |
|
| 204 | + $ifelse .= $t."\t\$imgName = str_replace(' ', '', \$_POST['{$fieldMain}']).'.'.\$extension;\n"; |
|
| 205 | + $ifelse .= $this->getAxcSetPrefix('uploader', '$imgName', $t."\t").";\n"; |
|
| 206 | + $ifelse .= $t."\t{$fetchMedia};\n"; |
|
| 207 | + $contentElseInt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t."\t\t"); |
|
| 208 | + $contentIf = $xCodeUploadImage->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t."\t\t"); |
|
| 209 | + $contentIf .= $xCodeUploadImage->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t."\t\t"); |
|
| 210 | + $ifelse .= $pCodeUploadImage->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t."\t"); |
|
| 211 | + $contentElseExt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t."\t"); |
|
| 212 | 212 | |
| 213 | 213 | $ret .= $pCodeUploadImage->getPhpCodeConditions($fetchMedia, '', '', $ifelse, $contentElseExt, $t); |
| 214 | 214 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | public function getAxcUploadFileSetVar($moduleDirname, $tableName, $fieldName, $formatUrl = false, $t = '') |
| 228 | 228 | { |
| 229 | 229 | $stuModuleDirname = mb_strtoupper($moduleDirname); |
| 230 | - $ret = $this->getAxcImageFileSetVar($moduleDirname, $stuModuleDirname . '_UPLOAD_FILES_PATH', $tableName, $fieldName, $formatUrl, $t); |
|
| 230 | + $ret = $this->getAxcImageFileSetVar($moduleDirname, $stuModuleDirname.'_UPLOAD_FILES_PATH', $tableName, $fieldName, $formatUrl, $t); |
|
| 231 | 231 | |
| 232 | 232 | return $ret; |
| 233 | 233 | } |
@@ -249,26 +249,26 @@ discard block |
||
| 249 | 249 | $ret = ''; |
| 250 | 250 | $ifelse = ''; |
| 251 | 251 | $files = ''; |
| 252 | - $post = $pCodeFileSetVar->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST') . '[0]'; |
|
| 252 | + $post = $pCodeFileSetVar->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST').'[0]'; |
|
| 253 | 253 | $fetchMedia = $this->getAxcFetchMedia('uploader', $post); |
| 254 | 254 | if ($formatUrl) { |
| 255 | 255 | $ret .= $xCodeFileSetVar->getXcSetVar($tableName, $fieldName, "formatUrl(\$_REQUEST['{$fieldName}'])", $t); |
| 256 | 256 | $ret .= $pCodeFileSetVar->getPhpCodeCommentLine('Set Var', $fieldName, $t); |
| 257 | - $ifelse .= $t . "\t\t{$fetchMedia};\n"; |
|
| 257 | + $ifelse .= $t."\t\t{$fetchMedia};\n"; |
|
| 258 | 258 | } else { |
| 259 | 259 | $files = '/files'; |
| 260 | 260 | $ret .= $pCodeFileSetVar->getPhpCodeCommentLine('Set Var', $fieldName, $t); |
| 261 | - $ifelse .= $t . "\t//" . $this->getAxcSetPrefix('uploader', "'{$fieldName}_'") . ";\n"; |
|
| 262 | - $ifelse .= $t . "\t//{$fetchMedia};\n"; |
|
| 261 | + $ifelse .= $t."\t//".$this->getAxcSetPrefix('uploader', "'{$fieldName}_'").";\n"; |
|
| 262 | + $ifelse .= $t."\t//{$fetchMedia};\n"; |
|
| 263 | 263 | } |
| 264 | 264 | $ret .= $pCodeFileSetVar->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/uploader', true, false, '', $t); |
| 265 | - $ret .= $xCodeFileSetVar->getXcMediaUploader('uploader', $dirname . ".'/{$tableName}{$files}'", $moduleDirname, $t); |
|
| 266 | - $contentElse = $xCodeFileSetVar->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t . "\t\t"); |
|
| 267 | - $contentIf = $xCodeFileSetVar->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t . "\t\t"); |
|
| 268 | - $contentIf .= $xCodeFileSetVar->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t . "\t\t"); |
|
| 269 | - $ifelse .= $pCodeFileSetVar->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElse, $t . "\t"); |
|
| 265 | + $ret .= $xCodeFileSetVar->getXcMediaUploader('uploader', $dirname.".'/{$tableName}{$files}'", $moduleDirname, $t); |
|
| 266 | + $contentElse = $xCodeFileSetVar->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t."\t\t"); |
|
| 267 | + $contentIf = $xCodeFileSetVar->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t."\t\t"); |
|
| 268 | + $contentIf .= $xCodeFileSetVar->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t."\t\t"); |
|
| 269 | + $ifelse .= $pCodeFileSetVar->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElse, $t."\t"); |
|
| 270 | 270 | |
| 271 | - $ret .= $pCodeFileSetVar->getPhpCodeConditions($fetchMedia, '', '', $t . "\t" . $fetchMedia . ";\n", $ifelse, $t); |
|
| 271 | + $ret .= $pCodeFileSetVar->getPhpCodeConditions($fetchMedia, '', '', $t."\t".$fetchMedia.";\n", $ifelse, $t); |
|
| 272 | 272 | |
| 273 | 273 | return $ret; |
| 274 | 274 | } |
@@ -380,24 +380,24 @@ discard block |
||
| 380 | 380 | $phpCodeCaseDelete = TDMCreatePhpCode::getInstance(); |
| 381 | 381 | $xCodeCaseDelete = TDMCreateXoopsCode::getInstance(); |
| 382 | 382 | $ccFieldId = TDMCreateFile::getInstance()->getCamelCase($fieldId, false, true); |
| 383 | - $ret = $xCodeCaseDelete->getXcGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler'); |
|
| 383 | + $ret = $xCodeCaseDelete->getXcGet($tableName, $ccFieldId, 'Obj', $tableName.'Handler'); |
|
| 384 | 384 | |
| 385 | 385 | $reqOk = "_REQUEST['ok']"; |
| 386 | 386 | $isset = $phpCodeCaseDelete->getPhpCodeIsset($reqOk); |
| 387 | 387 | $xoopsSecurityCheck = $xCodeCaseDelete->getXcSecurityCheck(); |
| 388 | 388 | $xoopsSecurityErrors = $xCodeCaseDelete->getXcSecurityErrors(); |
| 389 | 389 | $implode = $phpCodeCaseDelete->getPhpCodeImplode(', ', $xoopsSecurityErrors); |
| 390 | - $redirectHeaderErrors = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', $implode, true, $t . "\t\t"); |
|
| 390 | + $redirectHeaderErrors = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', $implode, true, $t."\t\t"); |
|
| 391 | 391 | |
| 392 | 392 | $delete = $xCodeCaseDelete->getXcDelete($tableName, $tableName, 'Obj', 'Handler'); |
| 393 | - $condition = $phpCodeCaseDelete->getPhpCodeConditions('!' . $xoopsSecurityCheck, '', '', $redirectHeaderErrors, false, $t . "\t"); |
|
| 393 | + $condition = $phpCodeCaseDelete->getPhpCodeConditions('!'.$xoopsSecurityCheck, '', '', $redirectHeaderErrors, false, $t."\t"); |
|
| 394 | 394 | |
| 395 | - $redirectHeaderLanguage = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', "{$language}FORM_DELETE_OK", true, $t . "\t\t"); |
|
| 395 | + $redirectHeaderLanguage = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', "{$language}FORM_DELETE_OK", true, $t."\t\t"); |
|
| 396 | 396 | $htmlErrors = $xCodeCaseDelete->getXcHtmlErrors($tableName, true); |
| 397 | - $internalElse = $xCodeCaseDelete->getXcTplAssign('error', $htmlErrors, true, $t . "\t\t"); |
|
| 398 | - $condition .= $phpCodeCaseDelete->getPhpCodeConditions($delete, '', '', $redirectHeaderLanguage, $internalElse, $t . "\t"); |
|
| 397 | + $internalElse = $xCodeCaseDelete->getXcTplAssign('error', $htmlErrors, true, $t."\t\t"); |
|
| 398 | + $condition .= $phpCodeCaseDelete->getPhpCodeConditions($delete, '', '', $redirectHeaderLanguage, $internalElse, $t."\t"); |
|
| 399 | 399 | |
| 400 | - $mainElse = $xCodeCaseDelete->getXcXoopsConfirm($tableName, $language, $fieldId, $fieldMain, 'delete', $t . "\t"); |
|
| 400 | + $mainElse = $xCodeCaseDelete->getXcXoopsConfirm($tableName, $language, $fieldId, $fieldMain, 'delete', $t."\t"); |
|
| 401 | 401 | $ret .= $phpCodeCaseDelete->getPhpCodeConditions($isset, ' && ', "1 == \${$reqOk}", $condition, $mainElse, $t); |
| 402 | 402 | |
| 403 | 403 | return $ret; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function getPhpCodeCommentLine($comment = null, $var = null, $t = '') |
| 53 | 53 | { |
| 54 | - $value = !empty($var) ? ' ' . $var : ''; |
|
| 54 | + $value = !empty($var) ? ' '.$var : ''; |
|
| 55 | 55 | $ret = "{$t}// {$comment}{$value}\n"; |
| 56 | 56 | |
| 57 | 57 | return $ret; |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | */ |
| 708 | 708 | public function getPhpCodeHtmlentities($entitiesVar, $entitiesQuote = false) |
| 709 | 709 | { |
| 710 | - $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar . ', ' . $entitiesQuote : $entitiesVar; |
|
| 710 | + $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar.', '.$entitiesQuote : $entitiesVar; |
|
| 711 | 711 | $entities = "htmlentities({$entitiesVar})"; |
| 712 | 712 | |
| 713 | 713 | return $entities; |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | */ |
| 722 | 722 | public function getPhpCodeHtmlspecialchars($specialVar, $specialQuote = false) |
| 723 | 723 | { |
| 724 | - $specialVar = (false !== $specialQuote) ? $specialVar . ', ' . $specialQuote : $specialVar; |
|
| 724 | + $specialVar = (false !== $specialQuote) ? $specialVar.', '.$specialQuote : $specialVar; |
|
| 725 | 725 | $specialchars = "htmlspecialchars({$specialVar})"; |
| 726 | 726 | |
| 727 | 727 | return $specialchars; |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | { |
| 75 | 75 | $this->setModule($module); |
| 76 | 76 | $this->extension = $extension; |
| 77 | - $this->setFileName($filename . '.' . $extension); |
|
| 77 | + $this->setFileName($filename.'.'.$extension); |
|
| 78 | 78 | if (false !== mb_strpos($folder, 'user')) { |
| 79 | 79 | $this->folder = '/'; |
| 80 | 80 | } else { |
@@ -128,12 +128,12 @@ discard block |
||
| 128 | 128 | $contentIf .= $pc->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/tree', true, false, 'include', "\t"); |
| 129 | 129 | //$contentIf .= $cc->getClassXoopsObjectTree('mytree', $tableName, $fieldId, $fieldParent, "\t"); |
| 130 | 130 | $contentIf .= $pc->getPhpCodeArray($tableName, "\t"); |
| 131 | - $foreach = $xc->getXcGetValues($tableName, $tableSoleName . 'Values', $tableFieldname, false, "\t"); |
|
| 131 | + $foreach = $xc->getXcGetValues($tableName, $tableSoleName.'Values', $tableFieldname, false, "\t"); |
|
| 132 | 132 | $foreach .= $pc->getPhpCodeArray('acount', ["'count'", '$count']); |
| 133 | - $foreach .= $pc->getPhpCodeArrayType($tableName, 'merge', $tableSoleName . 'Values', '$acount'); |
|
| 133 | + $foreach .= $pc->getPhpCodeArrayType($tableName, 'merge', $tableSoleName.'Values', '$acount'); |
|
| 134 | 134 | $foreach .= $this->getSimpleString('++$count;', "\t\t"); |
| 135 | 135 | $contentIf .= $pc->getPhpCodeForeach("{$tableName}All", true, false, $tableFieldname, $foreach, "\t"); |
| 136 | - $contentIf .= $xc->getXcTplAssign($tableName, '$' . $tableName, true, "\t"); |
|
| 136 | + $contentIf .= $xc->getXcTplAssign($tableName, '$'.$tableName, true, "\t"); |
|
| 137 | 137 | $contentIf .= $pc->getPhpCodeUnset($tableName, "\t"); |
| 138 | 138 | $getConfig = $xc->getXcGetConfig($moduleDirname, 'numb_col'); |
| 139 | 139 | $contentIf .= $xc->getXcTplAssign('numb_col', $getConfig, true, "\t"); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $foreach .= $xc->getXcGetVar('keywords[]', "{$tableName}All[\$i]", $fieldMain, false, "\t\t"); |
| 190 | 190 | $foreach .= $this->getSimpleString('++$count;', "\t\t"); |
| 191 | 191 | $condIf .= $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $foreach, "\t"); |
| 192 | - $condIf .= $xc->getXcTplAssign($tableName, '$' . $tableName, true, "\t"); |
|
| 192 | + $condIf .= $xc->getXcTplAssign($tableName, '$'.$tableName, true, "\t"); |
|
| 193 | 193 | $condIf .= $pc->getPhpCodeUnset($tableName, "\t"); |
| 194 | 194 | $condIf .= $xc->getXcPageNav($tableName, "\t"); |
| 195 | 195 | $thereare = $pc->getPhpCodeSprintf("{$language}INDEX_THEREARE", "\${$tableName}Count"); |
@@ -453,10 +453,10 @@ discard block |
||
| 453 | 453 | $stuFieldName = mb_strtoupper($rpFieldName); |
| 454 | 454 | $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Editor', $rpFieldName); |
| 455 | 455 | $ret .= $xCodeVConfig->getXcLoad('xoopseditorhandler'); |
| 456 | - $ret .= $xCodeVConfig->getXcEqualsOperator('$editorHandler' . $ucfFieldName, 'XoopsEditorHandler::getInstance()'); |
|
| 456 | + $ret .= $xCodeVConfig->getXcEqualsOperator('$editorHandler'.$ucfFieldName, 'XoopsEditorHandler::getInstance()'); |
|
| 457 | 457 | $editor = [ |
| 458 | 458 | 'name' => "'editor_{$rpFieldName}'", 'title' => "'{$language}EDITOR_{$stuFieldName}'", 'description' => "'{$language}EDITOR_{$stuFieldName}_DESC'", |
| 459 | - 'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'dhtml'", 'options' => 'array_flip($editorHandler' . $ucfFieldName . '->getList())', |
|
| 459 | + 'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'dhtml'", 'options' => 'array_flip($editorHandler'.$ucfFieldName.'->getList())', |
|
| 460 | 460 | ]; |
| 461 | 461 | $ret .= $uCodeVConfig->getUserModVersion(3, $editor, 'config', '$c'); |
| 462 | 462 | $ret .= $this->getSimpleString('++$c;'); |
@@ -748,25 +748,25 @@ discard block |
||
| 748 | 748 | $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'new_category', 'global', 0, 'global', 'newcategory', 'global_newcategory_notify', $num); |
| 749 | 749 | ++$num; |
| 750 | 750 | } |
| 751 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName . '_modify', 'global', 1, 'global', $tableSoleName . 'modify', 'global_' . $tableSoleName . 'modify_notify', $num); |
|
| 751 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName.'_modify', 'global', 1, 'global', $tableSoleName.'modify', 'global_'.$tableSoleName.'modify_notify', $num); |
|
| 752 | 752 | if (in_array(1, $tableBroken, true)) { |
| 753 | 753 | ++$num; |
| 754 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName . '_broken', 'global', 1, 'global', $tableSoleName . 'broken', 'global_' . $tableSoleName . 'broken_notify', $num); |
|
| 754 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName.'_broken', 'global', 1, 'global', $tableSoleName.'broken', 'global_'.$tableSoleName.'broken_notify', $num); |
|
| 755 | 755 | } |
| 756 | 756 | if (in_array(1, $tableSubmit, true)) { |
| 757 | 757 | ++$num; |
| 758 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName . '_submit', 'global', 1, 'global', $tableSoleName . 'submit', 'global_' . $tableSoleName . 'submit_notify', $num); |
|
| 758 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName.'_submit', 'global', 1, 'global', $tableSoleName.'submit', 'global_'.$tableSoleName.'submit_notify', $num); |
|
| 759 | 759 | } |
| 760 | 760 | ++$num; |
| 761 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'new_' . $tableSoleName, 'global', 0, 'global', 'new' . $tableSoleName, 'global_new' . $tableSoleName . '_notify', $num); |
|
| 761 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'new_'.$tableSoleName, 'global', 0, 'global', 'new'.$tableSoleName, 'global_new'.$tableSoleName.'_notify', $num); |
|
| 762 | 762 | if (in_array(1, $tableCategory, true)) { |
| 763 | 763 | ++$num; |
| 764 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName . '_submit', 'category', 1, 'category', $tableSoleName . 'submit', 'category_' . $tableSoleName . 'submit_notify', $num); |
|
| 764 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', $tableSoleName.'_submit', 'category', 1, 'category', $tableSoleName.'submit', 'category_'.$tableSoleName.'submit_notify', $num); |
|
| 765 | 765 | ++$num; |
| 766 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'new_' . $tableSoleName, 'category', 0, 'category', 'new' . $tableSoleName, 'category_new' . $tableSoleName . '_notify', $num); |
|
| 766 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'new_'.$tableSoleName, 'category', 0, 'category', 'new'.$tableSoleName, 'category_new'.$tableSoleName.'_notify', $num); |
|
| 767 | 767 | } |
| 768 | 768 | ++$num; |
| 769 | - $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'approve', $tableSoleName, 1, $tableSoleName, 'approve', $tableSoleName . '_approve_notify', $num); |
|
| 769 | + $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'approve', $tableSoleName, 1, $tableSoleName, 'approve', $tableSoleName.'_approve_notify', $num); |
|
| 770 | 770 | unset($num); |
| 771 | 771 | |
| 772 | 772 | return $ret; |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | $uCodeVNTN = UserXoopsCode::getInstance(); |
| 847 | 847 | $stuTitle = mb_strtoupper($title); |
| 848 | 848 | $ucfTitle = ucfirst($title); |
| 849 | - $ret = $phpCodeVNTN->getPhpCodeCommentLine($ucfTitle . ' Notify'); |
|
| 849 | + $ret = $phpCodeVNTN->getPhpCodeCommentLine($ucfTitle.' Notify'); |
|
| 850 | 850 | $table = [ |
| 851 | 851 | 'name' => "'{$name}'", 'title' => "{$language}{$stuTitle}_NOTIFY", 'description' => "{$language}{$stuTitle}_NOTIFY_DESC", |
| 852 | 852 | 'subscribe_from' => "'{$file}.php'", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}", |
@@ -877,7 +877,7 @@ discard block |
||
| 877 | 877 | $title = mb_strtoupper($title); |
| 878 | 878 | $table = mb_strtoupper($table); |
| 879 | 879 | $ucfTitle = ucfirst($title); |
| 880 | - $ret = $phpCodeVNCC->getPhpCodeCommentLine($ucfTitle . ' Notify'); |
|
| 880 | + $ret = $phpCodeVNCC->getPhpCodeCommentLine($ucfTitle.' Notify'); |
|
| 881 | 881 | $event = [ |
| 882 | 882 | 'name' => "'{$name}'", 'category' => "'{$category}'", 'admin_only' => "{$admin}", 'title' => "{$language}{$title}_{$table}_NOTIFY", |
| 883 | 883 | 'caption' => "{$language}{$title}_{$table}_NOTIFY_CAPTION", 'description' => "{$language}{$title}_{$table}_NOTIFY_DESC", |
@@ -107,18 +107,18 @@ discard block |
||
| 107 | 107 | $pc = TDMCreatePhpCode::getInstance(); |
| 108 | 108 | $uc = UserXoopsCode::getInstance(); |
| 109 | 109 | $ret = $pc->getPhpCodeCommentLine('Navigation'); |
| 110 | - $ret .= $xc->getXcEqualsOperator('$navigation', "{$language}SUBMIT_PROPOSER", '', false, $t . "\t"); |
|
| 111 | - $ret .= $xc->getXcTplAssign('navigation', '$navigation', true, $t . "\t"); |
|
| 112 | - $ret .= $pc->getPhpCodeCommentLine('Title of page', null, $t . "\t"); |
|
| 113 | - $ret .= $xc->getXcEqualsOperator('$title', "{$language}SUBMIT_PROPOSER . ' - '", '', false, $t . "\t"); |
|
| 114 | - $ret .= $xc->getXcEqualsOperator('$title', "\$GLOBALS['xoopsModule']->name()", '.', false, $t . "\t"); |
|
| 115 | - $ret .= $xc->getXcTplAssign('xoops_pagetitle', '$title', true, $t . "\t"); |
|
| 116 | - $ret .= $pc->getPhpCodeCommentLine('Description', null, $t . "\t"); |
|
| 117 | - $ret .= $uc->getUserAddMeta('description', $language, 'SUBMIT_PROPOSER', $t . "\t"); |
|
| 118 | - $ret .= $pc->getPhpCodeCommentLine('Form Create', null, $t . "\t"); |
|
| 119 | - $ret .= $xc->getXcObjHandlerCreate($tableName, $t . "\t"); |
|
| 120 | - $ret .= $xc->getXcGetForm('form', $tableName, 'Obj', $t . "\t"); |
|
| 121 | - $ret .= $xc->getXcTplAssign('form', '$form->render()', true, $t . "\t"); |
|
| 110 | + $ret .= $xc->getXcEqualsOperator('$navigation', "{$language}SUBMIT_PROPOSER", '', false, $t."\t"); |
|
| 111 | + $ret .= $xc->getXcTplAssign('navigation', '$navigation', true, $t."\t"); |
|
| 112 | + $ret .= $pc->getPhpCodeCommentLine('Title of page', null, $t."\t"); |
|
| 113 | + $ret .= $xc->getXcEqualsOperator('$title', "{$language}SUBMIT_PROPOSER . ' - '", '', false, $t."\t"); |
|
| 114 | + $ret .= $xc->getXcEqualsOperator('$title', "\$GLOBALS['xoopsModule']->name()", '.', false, $t."\t"); |
|
| 115 | + $ret .= $xc->getXcTplAssign('xoops_pagetitle', '$title', true, $t."\t"); |
|
| 116 | + $ret .= $pc->getPhpCodeCommentLine('Description', null, $t."\t"); |
|
| 117 | + $ret .= $uc->getUserAddMeta('description', $language, 'SUBMIT_PROPOSER', $t."\t"); |
|
| 118 | + $ret .= $pc->getPhpCodeCommentLine('Form Create', null, $t."\t"); |
|
| 119 | + $ret .= $xc->getXcObjHandlerCreate($tableName, $t."\t"); |
|
| 120 | + $ret .= $xc->getXcGetForm('form', $tableName, 'Obj', $t."\t"); |
|
| 121 | + $ret .= $xc->getXcTplAssign('form', '$form->render()', true, $t."\t"); |
|
| 122 | 122 | |
| 123 | 123 | return $ret; |
| 124 | 124 | } |
@@ -144,8 +144,8 @@ discard block |
||
| 144 | 144 | $xoopsSecurityCheck = $xc->getXcSecurityCheck(); |
| 145 | 145 | $securityError = $xc->getXcSecurityErrors(); |
| 146 | 146 | $implode = $pc->getPhpCodeImplode(',', $securityError); |
| 147 | - $redirectError = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t . "\t"); |
|
| 148 | - $ret .= $pc->getPhpCodeConditions('!' . $xoopsSecurityCheck, '', '', $redirectError, false, $t); |
|
| 147 | + $redirectError = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t."\t"); |
|
| 148 | + $ret .= $pc->getPhpCodeConditions('!'.$xoopsSecurityCheck, '', '', $redirectError, false, $t); |
|
| 149 | 149 | $ret .= $xc->getXcObjHandlerCreate($tableName, $t); |
| 150 | 150 | $autoincrement = in_array(1, $tableAutoincrement, true) ? $tableAutoincrement : 0; |
| 151 | 151 | if (in_array(1, $tableSubmit, true)) { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | } |
| 154 | 154 | $ret .= $pc->getPhpCodeCommentLine('Insert Data', null, $t); |
| 155 | 155 | $insert = $xc->getXcInsert($tableName, $tableName, 'Obj', 'Handler'); |
| 156 | - $confirmOk = $xc->getXcRedirectHeader('index', '', '2', "{$language}FORM_OK", true, $t . "\t"); |
|
| 156 | + $confirmOk = $xc->getXcRedirectHeader('index', '', '2', "{$language}FORM_OK", true, $t."\t"); |
|
| 157 | 157 | $ret .= $pc->getPhpCodeConditions($insert, '', '', $confirmOk, false, $t); |
| 158 | 158 | |
| 159 | 159 | $ret .= $pc->getPhpCodeCommentLine('Get Form Error', null, $t); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $fields = $this->getTableFields($tableMid, $tableId); |
| 202 | 202 | $cases = [ |
| 203 | 203 | 'form' => [$this->getUserSubmitForm($tableName, $language, $t)], |
| 204 | - 'save' => [$this->getUserSubmitSave($moduleDirname, $fields, $tableName, $tableSoleName, $tableSubmit, $tableAutoincrement, $language, $t . "\t")], |
|
| 204 | + 'save' => [$this->getUserSubmitSave($moduleDirname, $fields, $tableName, $tableSoleName, $tableSubmit, $tableAutoincrement, $language, $t."\t")], |
|
| 205 | 205 | ]; |
| 206 | 206 | |
| 207 | 207 | return $xc->getXcSwitch('op', $cases, true, false, $t); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $ret .= $pc->getPhpCodeArray('keywords', null, false, ''); |
| 111 | 111 | $condIf = $pc->getPhpCodeArray($tableName, null, false, $t); |
| 112 | 112 | $condIf .= $pc->getPhpCodeCommentLine('Get All', $ucfTableName, $t); |
| 113 | - $foreach = $xc->getXcGetValues($tableName, $tableName . '[]', 'i', false, $t); |
|
| 113 | + $foreach = $xc->getXcGetValues($tableName, $tableName.'[]', 'i', false, $t); |
|
| 114 | 114 | |
| 115 | 115 | $table = $this->getTable(); |
| 116 | 116 | // Fields |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $fieldMain = $fieldName; // fieldMain = fields parameters main field |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | - $foreach .= $xc->getXcGetVar('keywords[]', "{$tableName}All[\$i]", $fieldMain, false, $t . "\t"); |
|
| 124 | + $foreach .= $xc->getXcGetVar('keywords[]', "{$tableName}All[\$i]", $fieldMain, false, $t."\t"); |
|
| 125 | 125 | $condIf .= $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $foreach, $t); |
| 126 | 126 | $condIf .= $xc->getXcTplAssign($tableName, "\${$tableName}", true, $t); |
| 127 | 127 | $condIf .= $pc->getPhpCodeUnset($tableName, $t); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $pCodeAddMeta = TDMCreatePhpCode::getInstance(); |
| 74 | 74 | $stuTableName = mb_strtoupper($tableName); |
| 75 | - $stripTags = $pCodeAddMeta->getPhpCodeStripTags('', $language . $stuTableName, true); |
|
| 75 | + $stripTags = $pCodeAddMeta->getPhpCodeStripTags('', $language.$stuTableName, true); |
|
| 76 | 76 | |
| 77 | 77 | return "{$t}\$GLOBALS['xoTheme']->addMeta( 'meta', '{$type}', {$stripTags});\n"; |
| 78 | 78 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $stuModuleDirname = mb_strtoupper($moduleDirname); |
| 140 | 140 | $ret = $pCodeHeaderFile->getPhpCodeCommentLine('Breadcrumbs'); |
| 141 | 141 | $ret .= $pCodeHeaderFile->getPhpCodeArray('xoBreadcrumbs', null, false, ''); |
| 142 | - $titleLink = ["'title'" => $language . 'TITLE', "'link'" => "{$stuModuleDirname}_URL . '/'"]; |
|
| 142 | + $titleLink = ["'title'" => $language.'TITLE', "'link'" => "{$stuModuleDirname}_URL . '/'"]; |
|
| 143 | 143 | $ret .= $pCodeHeaderFile->getPhpCodeArray('xoBreadcrumbs[]', $titleLink, false, ''); |
| 144 | 144 | |
| 145 | 145 | return $ret; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | public function getUserModVersion($eleArray, $descriptions, $name = null, $index = null, $num = false, $t = '') |
| 176 | 176 | { |
| 177 | 177 | $ret = ''; |
| 178 | - $mv = $t . '$modversion'; |
|
| 178 | + $mv = $t.'$modversion'; |
|
| 179 | 179 | if (!is_array($descriptions)) { |
| 180 | 180 | $descs = [$descriptions]; |
| 181 | 181 | } else { |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | $one = (null === $name) ? $key : $name; |
| 186 | 186 | $two = (null === $index) ? $key : $index; |
| 187 | 187 | if (1 === $eleArray) { |
| 188 | - $ret .= $mv . "['{$one}'] = {$desc};\n"; |
|
| 188 | + $ret .= $mv."['{$one}'] = {$desc};\n"; |
|
| 189 | 189 | } elseif (2 === $eleArray) { |
| 190 | - $ret .= $mv . "['{$one}'][{$two}] = {$desc};\n"; |
|
| 190 | + $ret .= $mv."['{$one}'][{$two}] = {$desc};\n"; |
|
| 191 | 191 | } elseif (3 === $eleArray) { |
| 192 | - $ret .= $mv . "['{$one}'][{$two}]['{$key}'] = {$desc};\n"; |
|
| 192 | + $ret .= $mv."['{$one}'][{$two}]['{$key}'] = {$desc};\n"; |
|
| 193 | 193 | } elseif (4 === $eleArray) { |
| 194 | - $ret .= $mv . "['{$one}'][{$two}][{$num}]['{$key}'] = {$desc};\n"; |
|
| 194 | + $ret .= $mv."['{$one}'][{$two}][{$num}]['{$key}'] = {$desc};\n"; |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | |
@@ -151,9 +151,9 @@ |
||
| 151 | 151 | $ret .= $this->phpcode->getPhpCodeForeach($tableSoleName, false, 'k', 'v', $contentForeach); |
| 152 | 152 | $ret .= $this->xc->getXcTplAssign('xoops_sitename', "\$GLOBALS['xoopsConfig']['sitename']"); |
| 153 | 153 | $getVar = $this->xc->getXcGetVar('', $tableSoleName, $fieldMain, true); |
| 154 | - $stripTags = $this->phpcode->getPhpCodeStripTags('', $getVar . ' - ' . "{$language}PRINT" . ' - ' . "\$GLOBALS['xoopsModule']->name()", true); |
|
| 154 | + $stripTags = $this->phpcode->getPhpCodeStripTags('', $getVar.' - '."{$language}PRINT".' - '."\$GLOBALS['xoopsModule']->name()", true); |
|
| 155 | 155 | $ret .= $this->xc->getXcTplAssign('xoops_pagetitle', $stripTags); |
| 156 | - $ret .= $this->xc->getXcTplDisplay($tableName . '_print.tpl', '', false); |
|
| 156 | + $ret .= $this->xc->getXcTplDisplay($tableName.'_print.tpl', '', false); |
|
| 157 | 157 | |
| 158 | 158 | return $ret; |
| 159 | 159 | } |