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