fix update script
This commit is contained in:
parent
98f7efbf59
commit
e269bf7fbe
@ -14,7 +14,7 @@
|
||||
class d3_usersonline_statistic extends d3_cfg_mod_main
|
||||
{
|
||||
protected $_blUseOwnOxid = false;
|
||||
|
||||
protected $_iExpTime = 600; // (in seconds)
|
||||
protected $_sThisTemplate = 'd3_usersonline_statistic.tpl';
|
||||
|
||||
/**
|
||||
@ -24,6 +24,7 @@ class d3_usersonline_statistic extends d3_cfg_mod_main
|
||||
{
|
||||
/** @var d3usersonline $oUsersOnline */
|
||||
$oUsersOnline = oxNew('d3usersonline');
|
||||
$oUsersOnline->clearOldItems($this->_iExpTime);
|
||||
return $oUsersOnline->getUserCount();
|
||||
}
|
||||
}
|
||||
|
@ -67,5 +67,13 @@ $aModule = array(
|
||||
'block' => 'sidebar_categoriestree',
|
||||
'file' => 'views/blocks/layout/d3usersonline_sidebar.tpl'
|
||||
),
|
||||
)
|
||||
),
|
||||
'd3FileRegister' => array(
|
||||
'd3/d3usersonline/IntelliSenseHelper.php',
|
||||
'd3/d3usersonline/metadata.php',
|
||||
'd3/d3usersonline/translations/de/d3usersonline_lang.php',
|
||||
'd3/d3usersonline/translations/en/d3usersonline_lang.php',
|
||||
'd3/d3usersonline/views/admin/de/d3usersonline_lang.php',
|
||||
'd3/d3usersonline/views/admin/en/d3usersonline_lang.php',
|
||||
),
|
||||
);
|
@ -46,10 +46,18 @@ k09';
|
||||
'do' => 'fixFields'),
|
||||
array('check' => 'checkIndizes',
|
||||
'do' => 'fixIndizes'),
|
||||
array('check' => 'hasOldModuleFiles',
|
||||
'do' => 'deleteOldModuleFiles'),
|
||||
array('check' => 'hasUnregisteredFiles',
|
||||
'do' => 'showUnregisteredFiles'),
|
||||
array('check' => 'checkModCfgSameRevision',
|
||||
'do' => 'updateModCfgSameRevision'),
|
||||
);
|
||||
|
||||
public $aOldModuleFiles = array(
|
||||
'd3/d3usersonline/models/d3usersonline_update.php',
|
||||
);
|
||||
|
||||
public $aFields = array(
|
||||
'OXID' => array(
|
||||
'sTableName' => 'd3usersonline',
|
||||
@ -153,11 +161,8 @@ k09';
|
||||
{
|
||||
$blRet = true;
|
||||
|
||||
if ($this->checkUsersOnlineTableExist())
|
||||
{
|
||||
$aRet = $this->_addTable('d3usersonline', $this->aFields, $this->aIndizes, 'users online', 'MyISAM');
|
||||
$blRet = $aRet['blRet'];
|
||||
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__);
|
||||
if ($this->checkUsersOnlineTableExist()) {
|
||||
$blRet = $this->_addTable2('d3usersonline', $this->aFields, $this->aIndizes, 'users online', 'MyISAM');
|
||||
}
|
||||
|
||||
return $blRet;
|
||||
@ -169,7 +174,7 @@ k09';
|
||||
public function checkModCfgItemExist()
|
||||
{
|
||||
$blRet = false;
|
||||
foreach ($this->_getShopList() as $oShop) {
|
||||
foreach ($this->getShopList() as $oShop) {
|
||||
/** @var $oShop oxshop */
|
||||
$aWhere = array(
|
||||
'oxmodid' => $this->sModKey,
|
||||
@ -195,7 +200,7 @@ k09';
|
||||
$blRet = false;
|
||||
|
||||
if ($this->checkModCfgItemExist()) {
|
||||
foreach ($this->_getShopList() as $oShop) {
|
||||
foreach ($this->getShopList() as $oShop) {
|
||||
/** @var $oShop oxshop */
|
||||
$aWhere = array(
|
||||
'oxmodid' => $this->sModKey,
|
||||
@ -274,14 +279,27 @@ k09';
|
||||
'use_quote' => true,
|
||||
)
|
||||
);
|
||||
$aRet = $this->_updateTableItem('d3_cfg_mod', $aInsertFields, $aWhere);
|
||||
$blRet = $aRet['blRet'];
|
||||
|
||||
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__);
|
||||
$this->_setUpdateBreak(false);
|
||||
$blRet = $this->_updateTableItem2('d3_cfg_mod', $aInsertFields, $aWhere);
|
||||
$this->setUpdateBreak(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $blRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasUnregisteredFiles()
|
||||
{
|
||||
return $this->_hasUnregisteredFiles($this->sModKey, array('d3FileRegister', 'blocks'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function showUnregisteredFiles()
|
||||
{
|
||||
return $this->_showUnregisteredFiles($this->sModKey, array('d3FileRegister', 'blocks'));
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ class requcheck
|
||||
'aParams' => array(
|
||||
'd3modcfg_lib',
|
||||
'Modul-Connector',
|
||||
'3.9.0.5'
|
||||
'4.3.1.0'
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user