mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 2662 adminlogging, autoinstall
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12236 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
db5e4b2ff0
commit
71361410b6
10 changed files with 2290 additions and 2233 deletions
|
|
@ -1,42 +1,48 @@
|
|||
<?php
|
||||
/**
|
||||
* adminlogging class
|
||||
* Base class of adminlogging module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/adminlogging
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminlogging extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* adminlogging class
|
||||
* Base class of adminlogging module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/adminlogging
|
||||
* @version 0.1
|
||||
* Install adminlogging module
|
||||
* @return Object
|
||||
*/
|
||||
class adminlogging extends ModuleObject {
|
||||
/**
|
||||
* Install adminlogging module
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall() {
|
||||
return new Object();
|
||||
}
|
||||
function moduleInstall()
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* If update is necessary it returns true
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate() {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* If update is necessary it returns true
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update module
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
}
|
||||
/**
|
||||
* Update module
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Regenerate cache file
|
||||
* @return void
|
||||
*/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Regenerate cache file
|
||||
* @return void
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
}
|
||||
}
|
||||
/* End of file adminlogging.class.php */
|
||||
/* Location: ./modules/adminlogging/adminlogging.class.php */
|
||||
|
|
|
|||
|
|
@ -1,39 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* adminloggingController class
|
||||
* controller class of adminlogging module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/adminlogging
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminloggingController extends adminlogging
|
||||
{
|
||||
/**
|
||||
* adminloggingController class
|
||||
* controller class of adminlogging module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/adminlogging
|
||||
* @version 0.1
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
class adminloggingController extends adminlogging {
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init() {
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
|
||||
}
|
||||
function init()
|
||||
{
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert log
|
||||
* @return void
|
||||
*/
|
||||
function insertLog($module, $act)
|
||||
{
|
||||
if(!$module || !$act) return;
|
||||
/**
|
||||
* Insert log
|
||||
* @return void
|
||||
*/
|
||||
function insertLog($module, $act)
|
||||
{
|
||||
if(!$module || !$act) return;
|
||||
|
||||
$args->module = $module;
|
||||
$args->act = $act;
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
$args->regdate = date('YmdHis');
|
||||
$args->requestVars = print_r(Context::getRequestVars(), true);
|
||||
$args->module = $module;
|
||||
$args->act = $act;
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
$args->regdate = date('YmdHis');
|
||||
$args->requestVars = print_r(Context::getRequestVars(), true);
|
||||
|
||||
$output = executeQuery('adminlogging.insertLog', $args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
$output = executeQuery('adminlogging.insertLog', $args);
|
||||
}
|
||||
}
|
||||
/* End of file adminlogging.controller.php */
|
||||
/* Location: ./modules/adminlogging/adminlogging.controller.php */
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
<?php
|
||||
/**
|
||||
* adminloggingModel class
|
||||
* model class of adminlogging module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/adminlogging
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminloggingModel extends adminlogging
|
||||
{
|
||||
}
|
||||
/**
|
||||
* adminloggingModel class
|
||||
* model class of adminlogging module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/adminlogging
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminloggingModel extends adminlogging
|
||||
{
|
||||
}
|
||||
/* End of file adminlogging.model.php */
|
||||
/* Location: ./modules/adminlogging/adminlogging.model.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue