@@ -113,10 +113,12 @@ private function getUserPagesHeader($moduleDirname, $tableName, $fieldId, $table
113113 $ ret .= $ this ->pc ->getPhpCodeIncludeDir ('\XOOPS_ROOT_PATH ' , 'header ' , true );
114114 $ ret .= $ this ->pc ->getPhpCodeBlankLine ();
115115 $ ret .= $ this ->xc ->getXcXoopsRequest ('op ' , 'op ' , 'list ' , 'Cmd ' );
116+ $ ret .= $ this ->xc ->getXcXoopsRequest ($ ccFieldId , $ fieldId , '0 ' , 'Int ' );
116117 $ ret .= $ this ->xc ->getXcXoopsRequest ('start ' , 'start ' , '0 ' , 'Int ' );
117118 $ userpager = $ this ->xc ->getXcGetConfig ('userpager ' );
118119 $ ret .= $ this ->xc ->getXcXoopsRequest ('limit ' , 'limit ' , $ userpager , 'Int ' );
119- $ ret .= $ this ->xc ->getXcXoopsRequest ($ ccFieldId , $ fieldId , '0 ' , 'Int ' );
120+ $ ret .= $ this ->xc ->getXcXoopsTplAssign ('start ' , '$start ' );
121+ $ ret .= $ this ->xc ->getXcXoopsTplAssign ('limit ' , '$limit ' );
120122 $ ret .= $ this ->pc ->getPhpCodeBlankLine ();
121123 $ ret .= $ this ->pc ->getPhpCodeCommentLine ('Define Stylesheet ' );
122124 $ ret .= $ this ->xc ->getXcXoThemeAddStylesheet ();
@@ -180,8 +182,9 @@ private function getUserPagesList($moduleDirname, $tableName, $fieldId, $fieldMa
180182 $ ret .= $ this ->pc ->getPhpCodeConditions ("\${$ ccFieldId }" , ' > ' , '0 ' , $ contIf , false , $ t );
181183 $ ret .= $ this ->xc ->getXcHandlerCountClear ($ tableName . 'Count ' , $ tableName , '$ ' . $ critName , $ t );
182184 $ ret .= $ this ->xc ->getXcXoopsTplAssign ($ tableName . 'Count ' , "\${$ tableName }Count " , '' , $ t );
183- $ ret .= $ this ->xc ->getXcCriteriaSetStart ($ critName , '$start ' , $ t );
184- $ ret .= $ this ->xc ->getXcCriteriaSetLimit ($ critName , '$limit ' , $ t );
185+ $ contIf = $ this ->xc ->getXcCriteriaSetStart ($ critName , '$start ' , $ t . "\t" );
186+ $ contIf .= $ this ->xc ->getXcCriteriaSetLimit ($ critName , '$limit ' , $ t . "\t" );
187+ $ ret .= $ this ->pc ->getPhpCodeConditions ("\${$ ccFieldId }" , ' === ' , '0 ' , $ contIf , false , $ t );
185188 $ ret .= $ this ->xc ->getXcHandlerAllClear ($ tableName . 'All ' , $ tableName , '$ ' . $ critName , $ t );
186189 $ condIf = $ this ->pc ->getPhpCodeArray ($ tableName , null , false , $ t . "\t" );
187190 $ condIf .= $ this ->xc ->getXcEqualsOperator ("\${$ ccFieldMain }" , "'' " ,'' , $ t . "\t" );
@@ -343,10 +346,10 @@ public function getUserPagesSave($moduleDirname, $fields, $tableName, $tableSole
343346 $ contentInsert .= $ this ->pc ->getPhpCodeCommentLine ('redirect after insert ' , null , $ t . "\t" );
344347 if ($ countUploader > 0 ) {
345348 $ errIf = $ this ->xc ->getXcRedirectHeader ("' {$ tableName }.php?op=edit& {$ fieldId }=' . \$new {$ ucfFieldId }" , '' , '5 ' , '$uploaderErrors ' , false , $ t . "\t\t" );
346- $ errElse = $ this ->xc ->getXcRedirectHeader ($ tableName, ' ?op=list ' , '2 ' , "{$ language }FORM_OK " , true , $ t . "\t\t" );
349+ $ errElse = $ this ->xc ->getXcRedirectHeader (" ' { $ tableName} .php ?op=list&start=' . \$ start . '&limit=' . \$ limit " , '' , ' 2 ' , "{$ language }FORM_OK " , false , $ t . "\t\t" );
347350 $ confirmOk = $ this ->pc ->getPhpCodeConditions ('$uploaderErrors ' , ' !== ' , "'' " , $ errIf , $ errElse , $ t . "\t" );
348351 } else {
349- $ confirmOk = $ this ->xc ->getXcRedirectHeader ($ tableName , '' , '2 ' , "{$ language }FORM_OK " , true , $ t . "\t" );
352+ $ confirmOk = $ this ->xc ->getXcRedirectHeader (" ' { $ tableName} .php?op=list&start=' . \$ start . '&limit=' . \$ limit " , '' , '2 ' , "{$ language }FORM_OK " , false , $ t . "\t \t" );
350353 }
351354 $ contentInsert .= $ confirmOk ;
352355 $ ret .= $ this ->pc ->getPhpCodeConditions ($ insert , '' , '' , $ contentInsert , false , $ t );
@@ -531,7 +534,7 @@ private function getUserPagesBroken($language, $moduleDirname, $tableName, $tabl
531534 $ contInsert .= $ this ->getSimpleString ("\$notificationHandler->triggerEvent('global', 0, 'global_broken', \$tags); " , $ t . "\t\t" );
532535 $ contInsert .= $ this ->getSimpleString ("\$notificationHandler->triggerEvent(' {$ tableName }', \${$ ccFieldId }, ' {$ tableSoleName }_broken', \$tags); " , $ t . "\t\t" );
533536 }
534- $ contInsert .= $ this ->xc ->getXcRedirectHeader ($ tableName , '' , '3 ' , "{$ language }FORM_OK " , true , $ t . "\t\t" );
537+ $ contInsert .= $ this ->xc ->getXcRedirectHeader (" ' { $ tableName} .php?op=list&start=' . \$ start . '&limit=' . \$ limit " , '' , '2 ' , "{$ language }FORM_OK " , false , $ t . "\t\t" );
535538 $ htmlErrors = $ this ->xc ->getXcHtmlErrors ($ tableName , true );
536539 $ internalElse = $ this ->xc ->getXcXoopsTplAssign ('error ' , $ htmlErrors , true , $ t . "\t\t" );
537540 $ condition .= $ this ->pc ->getPhpCodeConditions ($ insert , '' , '' , $ contInsert , $ internalElse , $ t . "\t" );
0 commit comments