|
@@ -147,11 +147,11 @@ discard block |
|
|
block discarded – undo |
|
147
|
147
|
|
|
148
|
148
|
$ret .= $pc->getPhpCodeCommentLine('Table view', $tableName, $t); |
|
149
|
149
|
$contentForeach = $xc->getXcGetValues($tableName, $tableSoleName, 'i', false, "\t"); |
|
150
|
|
- $contentForeach .= $xc->getXcXoopsTplAppend("{$tableName}_list", "\${$tableSoleName}", $t . "\t\t"); |
|
151
|
|
- $contentForeach .= $pc->getPhpCodeUnset($tableSoleName, $t . "\t\t"); |
|
152
|
|
- $condIf = $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $contentForeach, $t . "\t"); |
|
153
|
|
- $condIf .= $xc->getXcPageNav($tableName, $t . "\t"); |
|
154
|
|
- $condElse = $xc->getXcTplAssign('error', "{$language}THEREARENT_{$stuTableName}", true, $t . "\t"); |
|
|
150
|
+ $contentForeach .= $xc->getXcXoopsTplAppend("{$tableName}_list", "\${$tableSoleName}", $t."\t\t"); |
|
|
151
|
+ $contentForeach .= $pc->getPhpCodeUnset($tableSoleName, $t."\t\t"); |
|
|
152
|
+ $condIf = $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $contentForeach, $t."\t"); |
|
|
153
|
+ $condIf .= $xc->getXcPageNav($tableName, $t."\t"); |
|
|
154
|
+ $condElse = $xc->getXcTplAssign('error', "{$language}THEREARENT_{$stuTableName}", true, $t."\t"); |
|
155
|
155
|
$ret .= $pc->getPhpCodeConditions("\${$tableName}Count", ' > ', '0', $condIf, $condElse, $t); |
|
156
|
156
|
|
|
157
|
157
|
return $ret; |
|
@@ -175,7 +175,7 @@ discard block |
|
|
block discarded – undo |
|
175
|
175
|
$stuTableName = strtoupper($tableName); |
|
176
|
176
|
$ret = $axc->getAdminTemplateMain($moduleDirname, $tableName); |
|
177
|
177
|
$navigation = $axc->getAdminDisplayNavigation($tableName); |
|
178
|
|
- $ret .= $xc->getXcTplAssign('navigation', $navigation, true, $t); |
|
|
178
|
+ $ret .= $xc->getXcTplAssign('navigation', $navigation, true, $t); |
|
179
|
179
|
|
|
180
|
180
|
if (in_array(1, $fieldInForm)) { |
|
181
|
181
|
$ret .= $axc->getAdminItemButton($language, $tableName, $stuTableName, '', 'list', $t); |
|
@@ -207,7 +207,7 @@ discard block |
|
|
block discarded – undo |
|
207
|
207
|
$ret = $pc->getPhpCodeCommentLine('Permission to', $perm, "\t\t\t"); |
|
208
|
208
|
$content = $xc->getXcAddRight('gpermHandler', "{$moduleDirname}_{$perm}", '$permId', '$onegroupId', "\$GLOBALS['xoopsModule']->getVar('mid')", false, "\t"); |
|
209
|
209
|
$foreach = $pc->getPhpCodeForeach("_POST['groups_{$perm}']", false, false, 'onegroupId', $content, "\t\t\t\t"); |
|
210
|
|
- $ret .= $pc->getPhpCodeConditions("isset(\$_POST['groups_{$perm}'])", null, null, $foreach, false, "\t\t\t"); |
|
|
210
|
+ $ret .= $pc->getPhpCodeConditions("isset(\$_POST['groups_{$perm}'])", null, null, $foreach, false, "\t\t\t"); |
|
211
|
211
|
|
|
212
|
212
|
return $ret; |
|
213
|
213
|
} |
|
@@ -236,11 +236,11 @@ discard block |
|
|
block discarded – undo |
|
236
|
236
|
$xoopsSecurityCheck = $xc->getXcSecurityCheck('!'); |
|
237
|
237
|
$securityError = $xc->getXcSecurityErrors(); |
|
238
|
238
|
$implode = $pc->getPhpCodeImplode(',', $securityError); |
|
239
|
|
- $redirectError = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t . "\t"); |
|
240
|
|
- $ret .= $pc->getPhpCodeConditions($xoopsSecurityCheck, '', '', $redirectError, false, $t); |
|
|
239
|
+ $redirectError = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t."\t"); |
|
|
240
|
+ $ret .= $pc->getPhpCodeConditions($xoopsSecurityCheck, '', '', $redirectError, false, $t); |
|
241
|
241
|
|
|
242
|
242
|
$isset = $pc->getPhpCodeIsset($ccFieldId); |
|
243
|
|
- $contentIf = $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler', false, $t . "\t"); |
|
|
243
|
+ $contentIf = $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName.'Handler', false, $t."\t"); |
|
244
|
244
|
$contentElse = $xc->getXcObjHandlerCreate($tableName, "\t\t\t"); |
|
245
|
245
|
$ret .= $pc->getPhpCodeConditions($isset, '', '', $contentIf, $contentElse, $t); |
|
246
|
246
|
$ret .= $pc->getPhpCodeCommentLine('Set Vars', null, "\t\t"); |
|
@@ -282,20 +282,20 @@ discard block |
|
|
block discarded – undo |
|
282
|
282
|
} |
|
283
|
283
|
} |
|
284
|
284
|
} |
|
285
|
|
- $ret .= $pc->getPhpCodeCommentLine('Insert Data', null, "\t\t"); |
|
|
285
|
+ $ret .= $pc->getPhpCodeCommentLine('Insert Data', null, "\t\t"); |
|
286
|
286
|
$insert = $xc->getXcInsert($tableName, $tableName, 'Obj'); |
|
287
|
287
|
$contentInsert = ''; |
|
288
|
288
|
if (1 == $tableCategory) { |
|
289
|
289
|
$ucfTableName = ucfirst($tableName); |
|
290
|
|
- $contentInsert = $xc->getXcEqualsOperator('$newCatId', "\${$tableName}Obj->getNewInsertedId{$ucfTableName}()", null, false, $t . "\t"); |
|
|
290
|
+ $contentInsert = $xc->getXcEqualsOperator('$newCatId', "\${$tableName}Obj->getNewInsertedId{$ucfTableName}()", null, false, $t."\t"); |
|
291
|
291
|
$ucfFieldId = $this->getCamelCase($fieldId, true); |
|
292
|
|
- $contentInsert .= $pc->getPhpCodeTernaryOperator('permId', "isset(\$_REQUEST['{$fieldId}'])", "\${$ccFieldId}", "\$new{$ucfFieldId}", $t . "\t"); |
|
293
|
|
- $contentInsert .= $xc->getXcEqualsOperator('$gpermHandler', "xoops_getHandler('groupperm')", null, false, $t . "\t"); |
|
294
|
|
- $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new' . $ucfFieldId); |
|
295
|
|
- $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new' . $ucfFieldId, 'submit'); |
|
296
|
|
- $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new' . $ucfFieldId, 'approve'); |
|
|
292
|
+ $contentInsert .= $pc->getPhpCodeTernaryOperator('permId', "isset(\$_REQUEST['{$fieldId}'])", "\${$ccFieldId}", "\$new{$ucfFieldId}", $t."\t"); |
|
|
293
|
+ $contentInsert .= $xc->getXcEqualsOperator('$gpermHandler', "xoops_getHandler('groupperm')", null, false, $t."\t"); |
|
|
294
|
+ $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new'.$ucfFieldId); |
|
|
295
|
+ $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new'.$ucfFieldId, 'submit'); |
|
|
296
|
+ $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new'.$ucfFieldId, 'approve'); |
|
297
|
297
|
} |
|
298
|
|
- $contentInsert .= $xc->getXcRedirectHeader($tableName . '', '?op=list', '2', "{$language}FORM_OK", true, $t . "\t"); |
|
|
298
|
+ $contentInsert .= $xc->getXcRedirectHeader($tableName.'', '?op=list', '2', "{$language}FORM_OK", true, $t."\t"); |
|
299
|
299
|
$ret .= $pc->getPhpCodeConditions($insert, '', '', $contentInsert, false, $t); |
|
300
|
300
|
$ret .= $pc->getPhpCodeCommentLine('Get Form', null, "\t\t"); |
|
301
|
301
|
$ret .= $xc->getXcTplAssign('error', "\${$tableName}Obj->getHtmlErrors()", true, $t); |
|
@@ -332,7 +332,7 @@ discard block |
|
|
block discarded – undo |
|
332
|
332
|
|
|
333
|
333
|
$ret = $axc->getAdminTemplateMain($moduleDirname, $tableName); |
|
334
|
334
|
$navigation = $axc->getAdminDisplayNavigation($tableName); |
|
335
|
|
- $ret .= $xc->getXcTplAssign('navigation', $navigation, true, $t); |
|
|
335
|
+ $ret .= $xc->getXcTplAssign('navigation', $navigation, true, $t); |
|
336
|
336
|
|
|
337
|
337
|
if (in_array(1, $fieldInForm)) { |
|
338
|
338
|
$ret .= $axc->getAdminItemButton($language, $tableName, $stuTableSoleName, '?op=new', 'add', $t); |
|
@@ -340,7 +340,7 @@ discard block |
|
|
block discarded – undo |
|
340
|
340
|
$ret .= $xc->getXcTplAssign('buttons', '$adminObject->displayButton(\'left\')', true, $t); |
|
341
|
341
|
} |
|
342
|
342
|
$ret .= $pc->getPhpCodeCommentLine('Get Form', null, "\t\t"); |
|
343
|
|
- $ret .= $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler', false, $t); |
|
|
343
|
+ $ret .= $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName.'Handler', false, $t); |
|
344
|
344
|
$ret .= $xc->getXcGetForm('form', $tableName, 'Obj', $t); |
|
345
|
345
|
$ret .= $xc->getXcTplAssign('form', '$form->render()', true, $t); |
|
346
|
346
|
|
|
@@ -404,7 +404,7 @@ discard block |
|
|
block discarded – undo |
|
404
|
404
|
} |
|
405
|
405
|
$delete = $this->getAdminPagesDelete($tableName, $language, $fieldId, $fieldMain, "\t\t"); |
|
406
|
406
|
|
|
407
|
|
- $cases = [ |
|
|
407
|
+ $cases = [ |
|
408
|
408
|
'list' => [$list], |
|
409
|
409
|
'new' => [$new], |
|
410
|
410
|
'save' => [$save], |