Quote:
Unfortunately, I have not found where it came this variable - $get_append
I checked in the older version 2.91, and GIJoe was setting the value like this: Quote:
$get_append = "cid=$cid"; ... $get_append = "uid=-1" ; ... $get_append = "uid=$uid" ; ... $get_append = "cid=0";
depending on other values:
le="color: #000000"><?php if( $cid > 0 ) { // GIJ TODO append error check! $rs = $xoopsDB->query( "SELECT title FROM $table_cat WHERE cid='$cid'" ) ; list( $cat_title ) = $xoopsDB->fetchRow( $rs ) ; $xoopsTpl->assign( 'xoops_pagetitle' , $myts->makeTboxData4show( $cat_title ) ) ; // Category Specified $xoopsTpl->assign( 'category_id' , $cid ) ; $xoopsTpl->assign( 'subcategories' , myalbum_get_sub_categories( $cid , $cattree ) ) ; $xoopsTpl->assign( 'category_options' , myalbum_get_cat_options() ) ; $cids = $cattree->getAllChildId( $cid ) ; array_push( $cids , $cid ) ; $photo_total_sum = myalbum_get_photo_total_sum_from_cats( $cids , "status>0" ) ; $sub_title = preg_replace( "/'>/" , "'><img src='$mod_url/images/folder16.gif' alt='' />" , $cattree->getNicePathFromId( $cid , 'title' , "viewcat.php?num=$num" ) ) ; $sub_title = preg_replace( "/^(.+)folder16/" , '$1folder_open' , $sub_title ) ; $xoopsTpl->assign( 'album_sub_title' , $sub_title ) ; $where = "cid=$cid"; $get_append = "cid=$cid"; $join_append = '' ; $select_append = '' ; } else if( $uid != 0 ) { // This means 'my photo' if( $uid < 0 ) { $xoopsModule->getInfo() ; $where = "submitter=$my_uid" ; $get_append = "uid=-1" ; $xoopsTpl->assign( 'uid' , -1 ) ; $xoopsTpl->assign( 'album_sub_title' , _ALBM_TEXT_SMNAME4 ) ; $xoopsTpl->assign( 'xoops_pagetitle' , _ALBM_TEXT_SMNAME4 ) ; // uid Specified } else { $where = "submitter=$uid" ; $get_append = "uid=$uid" ; $xoopsTpl->assign( 'uid' , $uid ) ; $xoopsTpl->assign( 'album_sub_title' , "<img src='$mod_url/images/myphotos.gif' alt='' />" . myalbum_get_name_from_uid( $uid ) ) ; $xoopsTpl->assign( 'xoops_pagetitle' , myalbum_get_name_from_uid( $uid ) ) ; } $join_append = "LEFT JOIN $table_cat c ON l.cid=c.cid" ; $select_append = ', c.title AS cat_title' ; } else { $where = "cid=0"; $get_append = "cid=0"; $join_append = '' ; $select_append = '' ; $xoopsTpl->assign( 'album_sub_title' , 'error: category id not specified' ) ; }
It looks like in version 3.0, Wishcraft converted parts of the code to use Criteria, which was good, but unfortunately he left the "$get_append" variable in the code:
le="color: #000000"><?php if (!isset($get_append)) $get_append = 0; $nav = new XoopsPageNav( $photo_small_sum , $num , $pos , 'pos' , "$get_append&num=$num&orderby=$orderby" ) ;
even if it didn't exist anymore. Check the logic of the original code, and see if your change follows that... It seems like $get_append = "cid=$cid"; was only for the case when $cid > 0