@@ -84,9 +84,9 @@ public function write($module, $table, $tables, $filename)
8484 */
8585 private function getInitVar ($ fieldName , $ type = 'INT ' )
8686 {
87- $ cc = Tdmcreate \Files \Classes \ClassXoopsCode::getInstance ();
87+ $ cxc = Tdmcreate \Files \Classes \ClassXoopsCode::getInstance ();
8888
89- return $ cc ->getClassInitVar ($ fieldName , $ type );
89+ return $ cxc ->getClassInitVar ($ fieldName , $ type );
9090 }
9191
9292 /**
@@ -258,7 +258,7 @@ private function getFunctionForm($module, $table, $fieldId, $fieldInForm)
258258 {
259259 $ pc = Tdmcreate \Files \CreatePhpCode::getInstance ();
260260 $ xc = Tdmcreate \Files \CreateXoopsCode::getInstance ();
261- $ cc = Tdmcreate \Files \Classes \ClassXoopsCode::getInstance ();
261+ $ cxc = Tdmcreate \Files \Classes \ClassXoopsCode::getInstance ();
262262 $ fe = ClassFormElements::getInstance ();
263263 $ moduleDirname = $ module ->getVar ('mod_dirname ' );
264264 $ tableName = $ table ->getVar ('table_name ' );
@@ -272,10 +272,9 @@ private function getFunctionForm($module, $table, $fieldId, $fieldInForm)
272272 $ action = $ xc ->getXcEqualsOperator ('$action ' , "\$_SERVER['REQUEST_URI'] " , null , "\t\t\t" );
273273 $ ucfModuleDirname = ucfirst ($ moduleDirname );
274274 $ getForm = $ xc ->getXcGetInstance ('helper ' , "\XoopsModules \\{$ ucfModuleDirname }\Helper " , "\t\t" );
275- //$getForm .= $pc->getPhpCodeConditions('$action', ' === ', 'false', $action, false, "\t\t");
276- $ getForm .= $ pc ->getPhpCodeConditions ('false ' , ' === ' , '$action ' , $ action , false , "\t\t" );
277- $ xUser = $ pc ->getPhpCodeGlobals ('xoopsUser ' );
278- $ xModule = $ pc ->getPhpCodeGlobals ('xoopsModule ' );
275+ $ getForm .= $ pc ->getPhpCodeConditions ('false ' , ' === ' , '$action ' , $ action , false , "\t\t" );
276+ $ xUser = $ pc ->getPhpCodeGlobals ('xoopsUser ' );
277+ $ xModule = $ pc ->getPhpCodeGlobals ('xoopsModule ' );
279278 $ permString = 'upload_groups ' ;
280279 if (1 != $ tableCategory/* && (1 == $tablePermissions)*/ ) {
281280 $ getForm .= $ pc ->getPhpCodeCommentLine ('Permissions for ' , 'uploader ' , "\t\t" );
@@ -292,8 +291,8 @@ private function getFunctionForm($module, $table, $fieldId, $fieldInForm)
292291 $ getForm .= $ pc ->getPhpCodeTernaryOperator ('title ' , '$this->isNew() ' , "sprintf( {$ language }{$ stuTableSoleName }_ADD) " , "sprintf( {$ language }{$ stuTableSoleName }_EDIT) " , "\t\t" );
293292 $ getForm .= $ pc ->getPhpCodeCommentLine ('Get Theme ' , 'Form ' , "\t\t" );
294293 $ getForm .= $ xc ->getXcXoopsLoad ('XoopsFormLoader ' , "\t\t" );
295- $ getForm .= $ cc ->getClassXoopsThemeForm ('form ' , 'title ' , 'form ' , 'action ' , 'post ' );
296- $ getForm .= $ cc ->getClassSetExtra ('form ' , "'enctype= \"multipart/form-data \"' " );
294+ $ getForm .= $ cxc ->getClassXoopsThemeForm ('form ' , 'title ' , 'form ' , 'action ' , 'post ' );
295+ $ getForm .= $ cxc ->getClassSetExtra ('form ' , "'enctype= \"multipart/form-data \"' " );
297296 $ getForm .= $ fe ->renderElements ();
298297
299298 if (in_array (1 , $ fieldInForm )) {
@@ -303,9 +302,8 @@ private function getFunctionForm($module, $table, $fieldId, $fieldInForm)
303302 }
304303 $ getForm .= $ pc ->getPhpCodeCommentLine ('To Save ' , '' , "\t\t" );
305304 //$hiddenSave = $cc->getClassXoopsFormHidden('', "'op'", "'save'", true, false);
306- $ getForm .= $ cc ->getClassAddElement ('form ' , "new \XoopsFormHidden('op', 'save') " );
307- //$buttonSend = $cc->getClassXoopsFormButton('', '', 'submit', '_SUBMIT', 'submit', true);
308- $ getForm .= $ cc ->getClassAddElement ('form ' , "new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false) " );
305+ $ getForm .= $ cxc ->getClassAddElement ('form ' , "new \XoopsFormHidden('op', 'save') " );
306+ $ getForm .= $ cxc ->getClassAddElement ('form ' , "new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false) " );
309307 $ getForm .= $ this ->getSimpleString ('return $form; ' , "\t\t" );
310308
311309 $ ret .= $ pc ->getPhpCodeFunction ('getForm ' . $ ucfTableName , '$action = false ' , $ getForm , 'public ' , false , "\t" );
@@ -326,7 +324,7 @@ private function getPermissionsInForm($moduleDirname, $fieldId, $tableName)
326324 {
327325 $ pc = Tdmcreate \Files \CreatePhpCode::getInstance ();
328326 $ xc = Tdmcreate \Files \CreateXoopsCode::getInstance ();
329- $ cc = Tdmcreate \Files \Classes \ClassXoopsCode::getInstance ();
327+ $ cxc = Tdmcreate \Files \Classes \ClassXoopsCode::getInstance ();
330328 $ permissionApprove = $ this ->getLanguage ($ moduleDirname , 'AM ' , 'PERMISSIONS_APPROVE ' );
331329 $ permissionSubmit = $ this ->getLanguage ($ moduleDirname , 'AM ' , 'PERMISSIONS_SUBMIT ' );
332330 $ permissionView = $ this ->getLanguage ($ moduleDirname , 'AM ' , 'PERMISSIONS_VIEW ' );
@@ -339,28 +337,28 @@ private function getPermissionsInForm($moduleDirname, $fieldId, $tableName)
339337 $ mId = $ xc ->getXcGetVar ('' , "GLOBALS['xoopsModule'] " , 'mid ' , true );
340338 $ ifGroups = $ xc ->getXcGetGroupIds ('groupsIdsApprove ' , 'grouppermHandler ' , "' {$ moduleDirname }_approve_ {$ tableName }' " , $ fId , $ mId , "\t\t\t" );
341339 $ ifGroups .= $ pc ->getPhpCodeArrayType ('groupsIdsApprove ' , 'values ' , 'groupsIdsApprove ' , null , false , "\t\t\t" );
342- $ ifGroups .= $ cc ->getClassXoopsFormCheckBox ('groupsCanApproveCheckbox ' , $ permissionApprove , "groups_approve_ {$ tableName }[] " , '$groupsIdsApprove ' , false , "\t\t\t" );
340+ $ ifGroups .= $ cxc ->getClassXoopsFormCheckBox ('groupsCanApproveCheckbox ' , $ permissionApprove , "groups_approve_ {$ tableName }[] " , '$groupsIdsApprove ' , false , "\t\t\t" );
343341 $ ifGroups .= $ xc ->getXcGetGroupIds ('groupsIdsSubmit ' , 'grouppermHandler ' , "' {$ moduleDirname }_submit_ {$ tableName }' " , $ fId , $ mId , "\t\t\t" );
344342 $ ifGroups .= $ pc ->getPhpCodeArrayType ('groupsIdsSubmit ' , 'values ' , 'groupsIdsSubmit ' , null , false , "\t\t\t" );
345- $ ifGroups .= $ cc ->getClassXoopsFormCheckBox ('groupsCanSubmitCheckbox ' , $ permissionSubmit , "groups_submit_ {$ tableName }[] " , '$groupsIdsSubmit ' , false , "\t\t\t" );
343+ $ ifGroups .= $ cxc ->getClassXoopsFormCheckBox ('groupsCanSubmitCheckbox ' , $ permissionSubmit , "groups_submit_ {$ tableName }[] " , '$groupsIdsSubmit ' , false , "\t\t\t" );
346344 $ ifGroups .= $ xc ->getXcGetGroupIds ('groupsIdsView ' , 'grouppermHandler ' , "' {$ moduleDirname }_view_ {$ tableName }' " , $ fId , $ mId , "\t\t\t" );
347345 $ ifGroups .= $ pc ->getPhpCodeArrayType ('groupsIdsView ' , 'values ' , 'groupsIdsView ' , null , false , "\t\t\t" );
348- $ ifGroups .= $ cc ->getClassXoopsFormCheckBox ('groupsCanViewCheckbox ' , $ permissionView , "groups_view_ {$ tableName }[] " , '$groupsIdsView ' , false , "\t\t\t" );
346+ $ ifGroups .= $ cxc ->getClassXoopsFormCheckBox ('groupsCanViewCheckbox ' , $ permissionView , "groups_view_ {$ tableName }[] " , '$groupsIdsView ' , false , "\t\t\t" );
349347
350- $ else = $ cc ->getClassXoopsFormCheckBox ('groupsCanApproveCheckbox ' , $ permissionApprove , "groups_approve_ {$ tableName }[] " , '$fullList ' , false , "\t\t\t" );
351- $ else .= $ cc ->getClassXoopsFormCheckBox ('groupsCanSubmitCheckbox ' , $ permissionSubmit , "groups_submit_ {$ tableName }[] " , '$fullList ' , false , "\t\t\t" );
352- $ else .= $ cc ->getClassXoopsFormCheckBox ('groupsCanViewCheckbox ' , $ permissionView , "groups_view_ {$ tableName }[] " , '$fullList ' , false , "\t\t\t" );
348+ $ else = $ cxc ->getClassXoopsFormCheckBox ('groupsCanApproveCheckbox ' , $ permissionApprove , "groups_approve_ {$ tableName }[] " , '$fullList ' , false , "\t\t\t" );
349+ $ else .= $ cxc ->getClassXoopsFormCheckBox ('groupsCanSubmitCheckbox ' , $ permissionSubmit , "groups_submit_ {$ tableName }[] " , '$fullList ' , false , "\t\t\t" );
350+ $ else .= $ cxc ->getClassXoopsFormCheckBox ('groupsCanViewCheckbox ' , $ permissionView , "groups_view_ {$ tableName }[] " , '$fullList ' , false , "\t\t\t" );
353351
354352 $ ret .= $ pc ->getPhpCodeConditions ('!$this->isNew() ' , null , null , $ ifGroups , $ else , "\t\t" );
355353 $ ret .= $ pc ->getPhpCodeCommentLine ('To Approve ' , '' , "\t\t" );
356- $ ret .= $ cc ->getClassAddOptionArray ('groupsCanApproveCheckbox ' , '$groupList ' );
357- $ ret .= $ cc ->getClassAddElement ('form ' , '$groupsCanApproveCheckbox ' );
354+ $ ret .= $ cxc ->getClassAddOptionArray ('groupsCanApproveCheckbox ' , '$groupList ' );
355+ $ ret .= $ cxc ->getClassAddElement ('form ' , '$groupsCanApproveCheckbox ' );
358356 $ ret .= $ pc ->getPhpCodeCommentLine ('To Submit ' , '' , "\t\t" );
359- $ ret .= $ cc ->getClassAddOptionArray ('groupsCanSubmitCheckbox ' , '$groupList ' );
360- $ ret .= $ cc ->getClassAddElement ('form ' , '$groupsCanSubmitCheckbox ' );
357+ $ ret .= $ cxc ->getClassAddOptionArray ('groupsCanSubmitCheckbox ' , '$groupList ' );
358+ $ ret .= $ cxc ->getClassAddElement ('form ' , '$groupsCanSubmitCheckbox ' );
361359 $ ret .= $ pc ->getPhpCodeCommentLine ('To View ' , '' , "\t\t" );
362- $ ret .= $ cc ->getClassAddOptionArray ('groupsCanViewCheckbox ' , '$groupList ' );
363- $ ret .= $ cc ->getClassAddElement ('form ' , '$groupsCanViewCheckbox ' );
360+ $ ret .= $ cxc ->getClassAddOptionArray ('groupsCanViewCheckbox ' , '$groupList ' );
361+ $ ret .= $ cxc ->getClassAddElement ('form ' , '$groupsCanViewCheckbox ' );
364362
365363 return $ ret ;
366364 }
0 commit comments