mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 11:49:56 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -1,60 +1,85 @@
|
|||
<?php
|
||||
/**
|
||||
* High class of counter module
|
||||
|
||||
/**
|
||||
* High class of counter module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class counter extends ModuleObject
|
||||
{
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
$oCounterController = getController('counter');
|
||||
|
||||
// add a row for the total visit history
|
||||
//$oCounterController->insertTotalStatus();
|
||||
|
||||
// add a row for today's status
|
||||
//$oCounterController->insertTodayStatus();
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* method if successfully installed
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
// Add site_srl to the counter
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl'))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
class counter extends ModuleObject {
|
||||
if(!$oDB->isIndexExists('counter_log', 'idx_site_counter_log'))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
* @return Object
|
||||
**/
|
||||
function moduleInstall() {
|
||||
$oCounterController = &getController('counter');
|
||||
// add a row for the total visit history
|
||||
//$oCounterController->insertTotalStatus();
|
||||
// add a row for today's status
|
||||
//$oCounterController->insertTodayStatus();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
/**
|
||||
* Module update
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
// Add site_srl to the counter
|
||||
$oDB = DB::getInstance();
|
||||
|
||||
/**
|
||||
* method if successfully installed
|
||||
*
|
||||
* @return bool
|
||||
**/
|
||||
function checkUpdate() {
|
||||
// Add site_srl to the counter
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl')) return true;
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl'))
|
||||
{
|
||||
$oDB->addColumn('counter_log', 'site_srl', 'number', 11, 0, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Module update
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
// Add site_srl to the counter
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl')) $oDB->addColumn('counter_log','site_srl','number',11,0,true);
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log')) $oDB->addIndex('counter_log','idx_site_counter_log',array('site_srl','ipaddress'),false);
|
||||
if(!$oDB->isIndexExists('counter_log', 'idx_site_counter_log'))
|
||||
{
|
||||
$oDB->addIndex('counter_log', 'idx_site_counter_log', array('site_srl', 'ipaddress'), FALSE);
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file counter.class.php */
|
||||
/* Location: ./modules/counter/counter.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue