1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 17:01:43 +02:00

Removal of $admin_log globals.

This commit is contained in:
Cameron
2014-10-23 11:07:18 -07:00
parent 0d4e4201e0
commit 1ff46a68a2
8 changed files with 22 additions and 17 deletions

View File

@@ -1856,13 +1856,16 @@ class users_admin_ui extends e_admin_ui
$DEL = ($pref['mail_bounce_delete']) ? true : false;
$text = "<br /><div><form method='post' action='".e_SELF.$qry."'><table>
<tr><td style='width:5%'>#</td><td>e107-id</td><td>email</td><td>Subject</td><td>Bounce</td></tr>\n";
$identifier = deftrue('MAIL_IDENTIFIER', 'X-e107-id');
for ($i = 1; $i <= $tot; $i++)
{
$head = $obj->getHeaders($i);
if ($head['bounce'])
{
// Its a 'bounce' email
if (preg_match('/.*X-e107-id:(.*)MIME/',$obj->getBody($i),$result))
if (preg_match('/.*'.$identifier.':(.*)MIME/',$obj->getBody($i),$result))
{
if ($result[1])
{

View File

@@ -2028,7 +2028,7 @@ class mailoutAdminClass extends e107MailManager
$results[] = str_replace('--COUNT--', $changeCount, LAN_MAILOUT_237);
}
$this->e107->admin_log->log_event('MAIL_05', implode('[!br!]', $results), E_LOG_INFORMATIVE, '');
e107::getLog()->add('MAIL_05', implode('[!br!]', $results), E_LOG_INFORMATIVE, '');
return $noError;
}

View File

@@ -272,28 +272,28 @@ class e_menuManager {
$menu_count = $sql->count("menus", "(*)", " WHERE menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ");
$sql->db_Update("menus", "menu_order=".($menu_count+1)." WHERE menu_order='{$position}' AND menu_location='{$location}' AND menu_layout = '$this->dbLayout' ");
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location='{$location}' AND menu_order > {$position} AND menu_layout = '".$this->dbLayout."' ");
$admin_log->log_event('MENU_06',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_06',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
}
if ($menu_act == "top")
{
$sql->db_Update("menus", "menu_order=menu_order+1 WHERE menu_location='{$location}' AND menu_order < {$position} AND menu_layout = '".$this->dbLayout."' ",$this->debug);
$sql->db_Update("menus", "menu_order=1 WHERE menu_id='{$this->menuId}' ");
$admin_log->log_event('MENU_05',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_05',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
}
if ($menu_act == "dec")
{
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_order='".($position+1)."' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ",$this->debug);
$sql->db_Update("menus", "menu_order=menu_order+1 WHERE menu_id='{$this->menuId}' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ");
$admin_log->log_event('MENU_08',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_08',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
}
if ($menu_act == "inc")
{
$sql->db_Update("menus", "menu_order=menu_order+1 WHERE menu_order='".($position-1)."' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ",$this->debug);
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_id='{$this->menuId}' AND menu_location='{$location}' AND menu_layout = '".$this->dbLayout."' ");
$admin_log->log_event('MENU_07',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_07',$location.'[!br!]'.$position.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
}
if (!isset($_GET['configure']))
@@ -345,7 +345,7 @@ class e_menuManager {
);
$sql->db_Insert("menus",$insert);
$admin_log->log_event('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
}
}
@@ -657,7 +657,7 @@ class e_menuManager {
$sql->db_Insert("menus",$insert, $this->debug);
$admin_log->log_event('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
$menu_count++;
}
}
@@ -774,7 +774,7 @@ class e_menuManager {
{
return array('msg'=>'All Okay','error'=>false);
// FIXME - menu log
//$admin_log->log_event('MENU_02',$_POST['menu_parms'].'[!br!]'.$parms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
//e107::getLog()->add('MENU_02',$_POST['menu_parms'].'[!br!]'.$parms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
// $this->menuAddMessage(LAN_SAVED,E_MESSAGE_SUCCESS);
}
elseif(false === $check)
@@ -808,7 +808,7 @@ class e_menuManager {
if($sql->db_Update("menus", "menu_class='".intval($_POST['menu_class'])."', menu_pages='{$pageparms}' WHERE menu_id=".intval($_POST['menu_id'])))
{
$admin_log->log_event('MENU_02',$_POST['menu_class'].'[!br!]'.$pageparms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_02',$_POST['menu_class'].'[!br!]'.$pageparms.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
return array('msg'=>LAN_UPDATED, 'error'=> false);
//$this->menuAddMessage($message,E_MESSAGE_SUCCESS);
@@ -862,7 +862,7 @@ class e_menuManager {
}
//Move all menus up (reduces order number) that have a higher menu order number than one deactivated, in the selected location.
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location={$row['menu_location']} AND menu_order > {$row['menu_order']} AND menu_layout = '".$this->dbLayout."' ");
$admin_log->log_event('MENU_04',$row['menu_name'].'[!br!]'.$row['menu_location'].'[!br!]'.$row['menu_order'].'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_04',$row['menu_name'].'[!br!]'.$row['menu_location'].'[!br!]'.$row['menu_order'].'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
}
else
{
@@ -892,7 +892,7 @@ class e_menuManager {
$sql->db_Update("menus", "menu_location='{$this->menuNewLoc}', menu_order=".($menu_count+1)." WHERE menu_id=".$this->menuId);
$sql->db_Update("menus", "menu_order=menu_order-1 WHERE menu_location='{$location}' AND menu_order > {$position} AND menu_layout='".$this->dbLayout ."' ");
}
$admin_log->log_event('MENU_03',$row['menu_name'].'[!br!]'.$this->menuNewLoc.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
e107::getLog()->add('MENU_03',$row['menu_name'].'[!br!]'.$this->menuNewLoc.'[!br!]'.$this->menuId,E_LOG_INFORMATIVE,'');
}
}

View File

@@ -217,6 +217,8 @@ class pop3BounceHandler
*/
public function processBounces()
{
$identifier = deftrue('MAIL_IDENTIFIER', 'X-e107-id');
$this->connect();
$tot = $this->getTotalMails(); // Get all the emails
for ($i = 1; $i <= $tot; $i++)
@@ -227,7 +229,7 @@ class pop3BounceHandler
//print_a($head);
$body = $this->getBody($i);
$e107Header = '';
if (preg_match('#.*X-e107-id:(.*?)[\n\r]#',$body, $result))
if (preg_match('#.*'.$identifier.':(.*?)[\n\r]#',$body, $result))
{
$e107Header = varset($result[1],'');
}

View File

@@ -326,7 +326,7 @@ class alt_auth_admin extends alt_auth_base
}
}
}
e107::getAdminLog()->log_event('AUTH_03',$prefix,E_LOG_INFORMATIVE,'');
e107::getLog()->add('AUTH_03',$prefix,E_LOG_INFORMATIVE,'');
return LAN_ALT_UPDATED;
}

View File

@@ -74,7 +74,7 @@ if(isset($_POST['updateeufs']))
{
$pref['auth_extended'] = $au; // @TODO:
save_prefs();
$admin_log->log_event('AUTH_02',$au,'');
e107::getLog()->add('AUTH_02',$au,'');
}
}

View File

@@ -453,7 +453,7 @@ if (isset($_POST['register']) && $pref['user_reg'] == 1)
{
$allData['errors']['user_email'] = ERR_GENERIC;
$allData['errortext']['user_email'] = LAN_SIGNUP_71;
$admin_log->log_event('USET_15',LAN_SIGNUP_103.e107::getIPHandler()->getIP(FALSE), 4);
e107::getLog()->add('USET_15',LAN_SIGNUP_103.e107::getIPHandler()->getIP(FALSE), 4);
}
}
}

View File

@@ -634,7 +634,7 @@ if ($dataToSave && !$promptPassword)
$log_action = '';
if ($_uid)
{ // Its an admin changing someone elses data - make an admin log entry here
$admin_log->log_event('USET_01', "UID: {$udata['user_id']}. UName: {$udata['user_name']}", E_LOG_INFORMATIVE);
e107::getLog()->add('USET_01', "UID: {$udata['user_id']}. UName: {$udata['user_name']}", E_LOG_INFORMATIVE);
// Check against the class of the target user, not the admin!
if (!check_class(varset($pref['user_audit_class'], ''), $udata['user_class'])) { $user_logging_opts = array(); }
}