[geeklog-cvs] Geeklog-1.x/public_html/admin moderation.php, 1.118, 1.119

Dirk Haun dhaun at qs1489.pair.com
Sat Apr 19 08:13:20 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin
In directory qs1489.pair.com:/tmp/cvs-serv29213/public_html/admin

Modified Files:
	moderation.php 
Log Message:
Fixes for E_ALL


Index: moderation.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/moderation.php,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -d -r1.118 -r1.119
*** moderation.php	20 Feb 2008 20:07:58 -0000	1.118
--- moderation.php	19 Apr 2008 12:13:18 -0000	1.119
***************
*** 35,42 ****
  // $Id$
  
! require_once ('../lib-common.php');
! require_once ('auth.inc.php');
! require_once ($_CONF['path_system'] . 'lib-user.php');
! require_once ($_CONF['path_system'] . 'lib-story.php');
  
  // Uncomment the line below if you need to debug the HTTP variables being passed
--- 35,42 ----
  // $Id$
  
! require_once '../lib-common.php';
! require_once 'auth.inc.php';
! require_once $_CONF['path_system'] . 'lib-user.php';
! require_once $_CONF['path_system'] . 'lib-story.php';
  
  // Uncomment the line below if you need to debug the HTTP variables being passed
***************
*** 484,490 ****
      }
  
!     $formaction = false;        // Set true if an valid action other then delete_all is selected
      for ($i = 0; $i < $count; $i++) {
!         if (isset($action[$i]) AND $action[$i] != '') $formaction = true;
          switch ($action[$i]) {
          case 'delete':
--- 484,497 ----
      }
  
!     // Set true if an valid action other than delete_all is selected
!     $formaction = false;
! 
      for ($i = 0; $i < $count; $i++) {
!         if (isset($action[$i]) AND ($action[$i] != '')) {
!             $formaction = true;
!         } else {
!             continue;
!         }
! 
          switch ($action[$i]) {
          case 'delete':
***************
*** 504,507 ****
--- 511,515 ----
              }
              break;
+ 
          case 'approve':
              if ($type == 'story') {
***************
*** 543,549 ****
      }
  
!     // Check if there was no direct action used on the form and if the delete_all submit action was used
      if (!$formaction AND isset($_POST['delitem'])) {
!         foreach($_POST['delitem'] as $delitem) {
              $delitem = COM_applyFilter($delitem);
              if (!empty ($type) && ($type <> 'story') && ($type <> 'draft')) {
--- 551,558 ----
      }
  
!     // Check if there was no direct action used on the form
!     // and if the delete_all submit action was used
      if (!$formaction AND isset($_POST['delitem'])) {
!         foreach ($_POST['delitem'] as $delitem) {
              $delitem = COM_applyFilter($delitem);
              if (!empty ($type) && ($type <> 'story') && ($type <> 'draft')) {
***************
*** 582,588 ****
  
      $retval = '';
!     $formaction = false;        // Set true if an valid action other then delete_all is selected
      for ($i = 0; $i < $count; $i++) {
!         if (isset($action[$i]) AND $action[$i] != '') $formaction = true;
          switch ($action[$i]) {
              case 'delete': // Ok, delete everything related to this user
--- 591,605 ----
  
      $retval = '';
! 
!     // Set true if an valid action other then delete_all is selected
!     $formaction = false;
! 
      for ($i = 0; $i < $count; $i++) {
!         if (isset($action[$i]) AND ($action[$i] != '')) {
!             $formaction = true;
!         } else {
!             continue;
!         }
! 
          switch ($action[$i]) {
              case 'delete': // Ok, delete everything related to this user
***************
*** 591,594 ****
--- 608,612 ----
                  }
                  break;
+ 
              case 'approve':
                  $uid[$i] = COM_applyFilter($uid[$i], true);
***************
*** 605,611 ****
      }
  
!     // Check if there was no direct action used on the form and if the delete_all submit action was used
      if (!$formaction AND isset($_POST['delitem'])) {
!         foreach($_POST['delitem'] as $del_uid) {
              $del_uid = COM_applyFilter($del_uid,true);
              if ($del_uid > 1) {
--- 623,630 ----
      }
  
!     // Check if there was no direct action used on the form
!     // and if the delete_all submit action was used
      if (!$formaction AND isset($_POST['delitem'])) {
!         foreach ($_POST['delitem'] as $del_uid) {
              $del_uid = COM_applyFilter($del_uid,true);
              if ($del_uid > 1) {
***************
*** 651,663 ****
  
  if (isset ($_POST['mode']) && ($_POST['mode'] == 'moderation')) {
      if ($_POST['type'] == 'user') {
!         $display .= moderateusers ($_POST['id'], $_POST['action'],
!                                   COM_applyFilter ($_POST['count'], true));
      } else {
!         $display .= moderation ($_POST['id'], $_POST['action'], $_POST['type'],
!                                   COM_applyFilter ($_POST['count'], true));
      }
  } else {
!     $display .= security_check_reminder ();
      $display .= commandcontrol();
  }
--- 670,686 ----
  
  if (isset ($_POST['mode']) && ($_POST['mode'] == 'moderation')) {
+     $action = array();
+     if (isset($_POST['action'])) {
+         $action = $_POST['action'];
+     }
      if ($_POST['type'] == 'user') {
!         $display .= moderateusers($_POST['id'], $action,
!                                   COM_applyFilter($_POST['count'], true));
      } else {
!         $display .= moderation($_POST['id'], $action, $_POST['type'],
!                                COM_applyFilter ($_POST['count'], true));
      }
  } else {
!     $display .= security_check_reminder();
      $display .= commandcontrol();
  }




More information about the geeklog-cvs mailing list