[Phpslash-commit] CVS: phpslash-ft/public_html/admin storyAdmin.php3,1.19,1.20
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2003-03-25 21:27:43
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv32422/phpslash-ft/public_html/admin Modified Files: storyAdmin.php3 Log Message: permission cleanup, mailinglist fix, fmsearch update Index: storyAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/storyAdmin.php3,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** storyAdmin.php3 20 Dec 2002 22:17:32 -0000 1.19 --- storyAdmin.php3 25 Mar 2003 21:27:09 -0000 1.20 *************** *** 30,34 **** } ! $auth->login_if(!$perm->have_perm('storyList')); $content = ''; --- 30,34 ---- } ! // $auth->login_if(!$perm->have_perm('storyList')); $content = ''; *************** *** 36,40 **** $story = pslNew("Story_admin"); ! if ($perm->have_perm("storyList")) { switch ($submit) { --- 36,40 ---- $story = pslNew("Story_admin"); ! // if ($perm->have_perm("storyList")) { switch ($submit) { *************** *** 42,52 **** case "delete": if ($perm->have_perm("storyDelete")) { ! if(!$story->deleteStory($story_id)) { $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); ! } ! } ! if ($perm->have_perm("storyList")) { ! $content .= $story->listStory($ary,$next); ! } break; --- 42,55 ---- case "delete": if ($perm->have_perm("storyDelete")) { ! $success = $story->deleteStory($story_id); ! if($success == false) { $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); ! } else { ! $content .= $story->getMessage(); ! } ! } ! if ($perm->have_perm("storyList")) { ! $content .= $story->listStory($ary,$next); ! } break; *************** *** 59,68 **** } ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); ! // expire cache for these section_id's ! $section_id_ary = $HTTP_POST_VARS['section_id_ary']; ! foreach($section_id_ary as $key => $value) { ! jpcache_gc('string', "-section_id-" . $value, "100"); } } --- 62,73 ---- } ! if(function_exists('jpcache_gc')) { ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); ! // expire cache for these section_id's ! $section_id_ary = $HTTP_POST_VARS['section_id_ary']; ! foreach($section_id_ary as $key => $value) { ! jpcache_gc('string', "-section_id-" . $value, "100"); ! } } } *************** *** 109,115 **** if ($perm->have_perm("storyList")) { $content .= $story->listStory($ary,$next); ! } } ! } else { $content = getTitlebar("100%", "Error! Invalid Privileges"); $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); --- 114,127 ---- if ($perm->have_perm("storyList")) { $content .= $story->listStory($ary,$next); ! } else { ! $content = getTitlebar("100%", "Error! Invalid Privileges"); ! $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); ! ! } } ! // } else { ! if( $content == '') { ! $auth->auth['error'] = pslgetText("Sorry. You do not have the necessary privilege to view this page."); ! $auth->login_if(!$perm->have_perm('storyList')); $content = getTitlebar("100%", "Error! Invalid Privileges"); $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); |