modid fixed, add update instructions

This commit is contained in:
Daniel Seifert 2013-09-09 07:49:11 +00:00
parent 0b4d102217
commit 2b7b031379
4 changed files with 59 additions and 13 deletions

1
.gitattributes vendored
View File

@ -9,6 +9,7 @@ copy_this/modules/d3/d3usersonline/picture.png -text
copy_this/modules/d3/d3usersonline/translations/de/d3usersonline_lang.php -text copy_this/modules/d3/d3usersonline/translations/de/d3usersonline_lang.php -text
copy_this/modules/d3/d3usersonline/translations/en/d3usersonline_lang.php -text copy_this/modules/d3/d3usersonline/translations/en/d3usersonline_lang.php -text
setup+doku/Installation.pdf -text setup+doku/Installation.pdf -text
setup+doku/changelog.txt -text
setup+doku/d3precheck.php -text setup+doku/d3precheck.php -text
source/Re[!!-~]D3[!!-~]Users[!!-~]Online[!!-~]kit[!!-~]Oxid[!!-~]CE[!!-~]4.7.eml -text source/Re[!!-~]D3[!!-~]Users[!!-~]Online[!!-~]kit[!!-~]Oxid[!!-~]CE[!!-~]4.7.eml -text
source/UsersOnline[!!-~]v1.2.1[!!-~]CE4_Kundenversion_4.7.0.zip -text source/UsersOnline[!!-~]v1.2.1[!!-~]CE4_Kundenversion_4.7.0.zip -text

View File

@ -22,20 +22,24 @@ class d3usersonline_update extends d3install_updatebase
{ {
public $sModKey = 'd3usersonline'; public $sModKey = 'd3usersonline';
public $sModName = 'Users Online'; public $sModName = 'Users Online';
public $sModVersion = '2.0.0.0'; public $sModVersion = '2.0.0.1';
public $sModRevision = '24'; public $sModRevision = '26';
public $sBaseConf = 'qnqSkx5WGk0V0xyY0wwVWNKTE5qSy9oY3RZeXdOSHhtd1c5aW9PWEltei9aWXg2RTBoOUErUi9UcVZFb public $sBaseConf = 'fDTR3hjTlJlNFErRXBGTkNUSU9zdXNPNTVFUm0wZFMvMEYyTEVUeDdCL0VNVnZZNHh2Yk9YVDA1djBnV
W1RVUpWM1ZwTTBLU2plR3RxNzVXSVREQUFqd0V4cTQ5ZHVYQTYvVEFYKzdXMkE3aTM0SFgvbEZsZzlwU VNQRTJVaGFqc0NHT1dOUkY5YlZVM3k0ODBESHNkRnhSM1UrMnJLQXNMSlhMcUg1WGZLcEkyd2hGN2Uzc
VJKeTltWmVISFQ5YmY1Y0Q5aDRFRGZ4b2FoenlOb1p5Y0c2aFdnRXVmQVdTK2VubzBhc2hvUkVQbVBhV 0JjdFFtZ3VvZmZFMUNrWDg4SUlqN1l3UmhPL2tmSEFOWC95MWNoNEtiLzIySlBENE42d0lwKzVOaXM1b
jFJeWdqRUZOSEFnekZVZmF2eCtIcThzeDBqNU1JdWkrZG9MQlhFdUNyd3NhUzlkL05YVDAvaEhjS04vZ nhIcTZXQnF2L25maUcycHRjRGNJOFFISWNMbUtKMWh3TjhXN2RBSGtSRzhieUZBL1lEdlNzbkxhVDRnK
2xRL0w2U2ZlOEFjTXB3aGp1UmRFS2dmVGNocXhCT2dQY0MzZkVvckVOU1BoMG5Ma053UTNhYlNtMklQZ zJIUlBNUHkzVmN5T0lVOG5pWCs2d0Q1b2kzM1ExeklaOXcxcEIyMGx0ejZGK0N6Rm9Pam9QNGNiL0RWS
DQ9'; kU9';
public $sRequirements = ''; public $sRequirements = '';
public $sBaseValue = ''; public $sBaseValue = '';
protected $_aUpdateMethods = array( protected $_aUpdateMethods = array(
array('check' => 'checkUsersOnlineTableExist', array('check' => 'checkUsersOnlineTableExist',
'do' => 'updateUsersOnlineTableExist'), 'do' => 'updateUsersOnlineTableExist'),
array('check' => 'checkRenameFields',
'do' => 'fixRenameFields'),
array('check' => 'checkDeleteFields',
'do' => 'fixDeleteFields'),
array('check' => 'checkModCfgItemExist', array('check' => 'checkModCfgItemExist',
'do' => 'updateModCfgItemExist'), 'do' => 'updateModCfgItemExist'),
array('check' => 'checkFields', array('check' => 'checkFields',
@ -97,6 +101,41 @@ DQ9';
), ),
); );
public $aRenameFields = array(
'OXID' => array(
'sTableName' => 'd3usersonline',
'mOldFieldNames' => array('id', 'ID'), // is case sensitive
'sFieldName' => 'OXID',
'blMultilang' => FALSE,
),
'VISITOR' => array(
'sTableName' => 'd3usersonline',
'mOldFieldNames' => array('visitor'), // is case sensitive
'sFieldName' => 'VISITOR',
'blMultilang' => FALSE,
),
'TIMEVISIT' => array(
'sTableName' => 'd3usersonline',
'mOldFieldNames' => array('timevisit'), // is case sensitive
'sFieldName' => 'TIMEVISIT',
'blMultilang' => FALSE,
),
'OXCLASS' => array(
'sTableName' => 'd3usersonline',
'mOldFieldNames' => array('oxclass'), // is case sensitive
'sFieldName' => 'OXCLASS',
'blMultilang' => FALSE,
),
);
public $aDeleteFields = array(
'VISITOR' => array(
'sTableName' => 'd3usersonline',
'sFieldName' => 'VISITOR',
'blMultilang' => FALSE,
),
);
protected $_aRefreshMetaModuleIds = array('d3usersonline'); protected $_aRefreshMetaModuleIds = array('d3usersonline');
/** /**

View File

@ -32,17 +32,17 @@ class d3_oxcmp_utils_usersonline extends d3_oxcmp_utils_usersonline_parent
if (d3_cfg_mod::get($this->_sD3UsersOnlineModId)->isActive()) if (d3_cfg_mod::get($this->_sD3UsersOnlineModId)->isActive())
{ {
/** @var d3usersonline $oUserOnline */ /** @var d3usersonline $oUsersOnline */
$oUserOnline = oxNew('d3usersonline'); $oUsersOnline = oxNew('d3usersonline');
$oUserOnline->clearOldItems($this->_iExpTime); $oUsersOnline->clearOldItems($this->_iExpTime);
$oUserOnline->setActTimeVisit(); $oUsersOnline->setActTimeVisit();
$oUser = $this->getUser(); $oUser = $this->getUser();
if ($oUser && strtolower($oUser->getFieldData('oxrights')) == 'malladmin') if ($oUser && strtolower($oUser->getFieldData('oxrights')) == 'malladmin')
{ {
/** @var oxview $oActView */ /** @var oxview $oActView */
$oActView = $this->getParent(); $oActView = $this->getParent();
$oActView->addTplParam('aUsersOnline', $oUserOnline->getUserCount()); $oActView->addTplParam('aUsersOnline', $oUsersOnline->getUserCount());
} }
} }

6
setup+doku/changelog.txt Normal file
View File

@ -0,0 +1,6 @@
=> 2.0.0.1
- ModulID korrigiert
- Datenbankstruktur bei Altinstallationen aktualisiert
=> 2.0.0.0
- für OXID 4.7 / 5.0 angepasst