issue 2119. supporting php 5.4. adminlogging module

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12712 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2013-02-06 09:23:36 +00:00
parent 3df6b3ecd7
commit 6823f75f45
3 changed files with 21 additions and 5 deletions

View file

@ -1,4 +1,5 @@
<?php
/**
* adminlogging class
* Base class of adminlogging module
@ -9,6 +10,7 @@
*/
class adminlogging extends ModuleObject
{
/**
* Install adminlogging module
* @return Object
@ -24,7 +26,7 @@ class adminlogging extends ModuleObject
*/
function checkUpdate()
{
return false;
return FALSE;
}
/**
@ -42,7 +44,9 @@ class adminlogging extends ModuleObject
*/
function recompileCache()
{
}
}
/* End of file adminlogging.class.php */
/* Location: ./modules/adminlogging/adminlogging.class.php */

View file

@ -1,4 +1,5 @@
<?php
/**
* adminloggingController class
* controller class of adminlogging module
@ -9,6 +10,7 @@
*/
class adminloggingController extends adminlogging
{
/**
* Initialization
* @return void
@ -16,9 +18,12 @@ class adminloggingController extends adminlogging
function init()
{
// forbit access if the user is not an administrator
$oMemberModel = &getModel('member');
$oMemberModel = getModel('member');
$logged_info = $oMemberModel->getLoggedInfo();
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
if($logged_info->is_admin != 'Y')
{
return $this->stop("msg_is_not_administrator");
}
}
/**
@ -27,16 +32,21 @@ class adminloggingController extends adminlogging
*/
function insertLog($module, $act)
{
if(!$module || !$act) return;
if(!$module || !$act)
{
return;
}
$args = new stdClass();
$args->module = $module;
$args->act = $act;
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
$args->regdate = date('YmdHis');
$args->requestVars = print_r(Context::getRequestVars(), true);
$args->requestVars = print_r(Context::getRequestVars(), TRUE);
$output = executeQuery('adminlogging.insertLog', $args);
}
}
/* End of file adminlogging.controller.php */
/* Location: ./modules/adminlogging/adminlogging.controller.php */

View file

@ -1,4 +1,5 @@
<?php
/**
* adminloggingModel class
* model class of adminlogging module
@ -9,6 +10,7 @@
*/
class adminloggingModel extends adminlogging
{
}
/* End of file adminlogging.model.php */
/* Location: ./modules/adminlogging/adminlogging.model.php */