Index: trunk/admin/category/category_maint.php =================================================================== diff -u -r123 -r214 --- trunk/admin/category/category_maint.php (.../category_maint.php) (revision 123) +++ trunk/admin/category/category_maint.php (.../category_maint.php) (revision 214) @@ -115,7 +115,8 @@ $sql = "SELECT * FROM $table ORDER BY ParentPath ASC LIMIT $CatIndex,$CatsPerLoad"; $start = getmicrotime(); -//echo $sql."
\n"; + +//echo $sql."
\n"; $objCatList->Query_Item($sql); //echo getmicrotime() - $start." QUERY ".$x."
\n"; $x = 0; @@ -134,6 +135,10 @@ // $objSystemCache->PurgeCategory($cat->Get("CategoryId")); } +$no_url = $adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv(); +$yes_url = $_SERVER['PHP_SELF'].'?env='.BuildEnv().'&CatIndex=0&NumCats='.$NumCats; +$cat_update = $objSession->GetVariable('PermCache_UpdateRequired'); + int_header(NULL,NULL,$title); ?> @@ -142,13 +147,21 @@ { document.location = url; } + SetVariable('PermCache_UpdateRequired', 0); + echo "goto_url('$no_url');\n"; + } + ?> $CatsPerLoad) { int_subsection_title(prompt_language("la_confirm_maintenance")); - $yes_url = $_SERVER['PHP_SELF'].'?env='.BuildEnv().'&CatIndex=0&NumCats='.$NumCats; - $no_url = $adminURL.'/browse.php?env='.BuildEnv(); + + ?> @@ -211,13 +224,15 @@ $NumCats) { + $objSession->SetVariable('PermCache_UpdateRequired', 0); $target = $adminURL."/".$objSession->GetVariable('ReturnScript').'?env='.BuildEnv(); //$adminURL."/browse.php?env=".BuildEnv(); } else { $next = $CatIndex+$CatsPerLoad; if($next > $NumCats) { + $objSession->SetVariable('PermCache_UpdateRequired', 0); $target = $adminURL."/".$objSession->GetVariable('ReturnScript').'?env='.BuildEnv(); //$adminURL."/browse.php?env=".BuildEnv(); } else Index: trunk/kernel/action.php =================================================================== diff -u -r203 -r214 --- trunk/kernel/action.php (.../action.php) (revision 203) +++ trunk/kernel/action.php (.../action.php) (revision 214) @@ -22,7 +22,7 @@ { if( trim($value) == '' ) $value = ' '; $src = isset($_GET[$key]) ? 'GE' : (isset($_POST[$key]) ? 'PO' : (isset($_COOKIE[$key]) ? 'CO' : '?') ); - echo ''; + echo ''; } echo '
'.$src.''.$key.''.$value.'
'.$src.''.$key.''.print_r($value, true).'
'; } @@ -715,6 +715,15 @@ $html = (int)$_POST["html_enable"]; $objEditItems = new clsCatList(); $objEditItems->SourceTable = $objSession->GetEditTable("Category"); + + // check if name of cat isn't changed: begin + $original_cats = new clsCatList(); + $original_cat = $original_cats->GetItemByField('CategoryId', $_POST['CategoryId']); + if( $original_cat->Get('Name') != $_POST['cat_name'] ) + $objSession->SetVariable('PermCache_UpdateRequired', 1); + unset($original_cat, $original_cats); + // check if name of cat isn't changed: end + $cat = $objEditItems->Edit_Category($_POST["CategoryId"],inp_escape($_POST["cat_name"],$html), inp_escape($_POST["cat_desc"],$html), $CreatedOn, $cat_pick, $Status, $Hot, $New, $Pop, $_POST["Priority"], $_POST["meta_keywords"], $_POST["meta_desc"]); $objCustomEdit = new clsCustomDataList($objSession->GetEditTable("CustomMetaData"));