From 2b7b0313793026417762d8eeef838518cc362f0c Mon Sep 17 00:00:00 2001 From: DanielSeifert Date: Mon, 9 Sep 2013 07:49:11 +0000 Subject: [PATCH] modid fixed, add update instructions --- .gitattributes | 1 + .../models/d3usersonline_update.php | 55 ++++++++++++++++--- .../components/d3_oxcmp_utils_usersonline.php | 10 ++-- setup+doku/changelog.txt | 6 ++ 4 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 setup+doku/changelog.txt diff --git a/.gitattributes b/.gitattributes index 19ab0d2..7761d81 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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/en/d3usersonline_lang.php -text setup+doku/Installation.pdf -text +setup+doku/changelog.txt -text setup+doku/d3precheck.php -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 diff --git a/copy_this/modules/d3/d3usersonline/models/d3usersonline_update.php b/copy_this/modules/d3/d3usersonline/models/d3usersonline_update.php index d029cd8..bda7d3d 100644 --- a/copy_this/modules/d3/d3usersonline/models/d3usersonline_update.php +++ b/copy_this/modules/d3/d3usersonline/models/d3usersonline_update.php @@ -22,20 +22,24 @@ class d3usersonline_update extends d3install_updatebase { public $sModKey = 'd3usersonline'; public $sModName = 'Users Online'; - public $sModVersion = '2.0.0.0'; - public $sModRevision = '24'; - public $sBaseConf = 'qnqSkx5WGk0V0xyY0wwVWNKTE5qSy9oY3RZeXdOSHhtd1c5aW9PWEltei9aWXg2RTBoOUErUi9UcVZFb -W1RVUpWM1ZwTTBLU2plR3RxNzVXSVREQUFqd0V4cTQ5ZHVYQTYvVEFYKzdXMkE3aTM0SFgvbEZsZzlwU -VJKeTltWmVISFQ5YmY1Y0Q5aDRFRGZ4b2FoenlOb1p5Y0c2aFdnRXVmQVdTK2VubzBhc2hvUkVQbVBhV -jFJeWdqRUZOSEFnekZVZmF2eCtIcThzeDBqNU1JdWkrZG9MQlhFdUNyd3NhUzlkL05YVDAvaEhjS04vZ -2xRL0w2U2ZlOEFjTXB3aGp1UmRFS2dmVGNocXhCT2dQY0MzZkVvckVOU1BoMG5Ma053UTNhYlNtMklQZ -DQ9'; + public $sModVersion = '2.0.0.1'; + public $sModRevision = '26'; + public $sBaseConf = 'fDTR3hjTlJlNFErRXBGTkNUSU9zdXNPNTVFUm0wZFMvMEYyTEVUeDdCL0VNVnZZNHh2Yk9YVDA1djBnV +VNQRTJVaGFqc0NHT1dOUkY5YlZVM3k0ODBESHNkRnhSM1UrMnJLQXNMSlhMcUg1WGZLcEkyd2hGN2Uzc +0JjdFFtZ3VvZmZFMUNrWDg4SUlqN1l3UmhPL2tmSEFOWC95MWNoNEtiLzIySlBENE42d0lwKzVOaXM1b +nhIcTZXQnF2L25maUcycHRjRGNJOFFISWNMbUtKMWh3TjhXN2RBSGtSRzhieUZBL1lEdlNzbkxhVDRnK +zJIUlBNUHkzVmN5T0lVOG5pWCs2d0Q1b2kzM1ExeklaOXcxcEIyMGx0ejZGK0N6Rm9Pam9QNGNiL0RWS +kU9'; public $sRequirements = ''; public $sBaseValue = ''; protected $_aUpdateMethods = array( array('check' => 'checkUsersOnlineTableExist', 'do' => 'updateUsersOnlineTableExist'), + array('check' => 'checkRenameFields', + 'do' => 'fixRenameFields'), + array('check' => 'checkDeleteFields', + 'do' => 'fixDeleteFields'), array('check' => 'checkModCfgItemExist', 'do' => 'updateModCfgItemExist'), 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'); /** diff --git a/copy_this/modules/d3/d3usersonline/modules/components/d3_oxcmp_utils_usersonline.php b/copy_this/modules/d3/d3usersonline/modules/components/d3_oxcmp_utils_usersonline.php index fed4ad1..4d7fd25 100644 --- a/copy_this/modules/d3/d3usersonline/modules/components/d3_oxcmp_utils_usersonline.php +++ b/copy_this/modules/d3/d3usersonline/modules/components/d3_oxcmp_utils_usersonline.php @@ -32,17 +32,17 @@ class d3_oxcmp_utils_usersonline extends d3_oxcmp_utils_usersonline_parent if (d3_cfg_mod::get($this->_sD3UsersOnlineModId)->isActive()) { - /** @var d3usersonline $oUserOnline */ - $oUserOnline = oxNew('d3usersonline'); - $oUserOnline->clearOldItems($this->_iExpTime); - $oUserOnline->setActTimeVisit(); + /** @var d3usersonline $oUsersOnline */ + $oUsersOnline = oxNew('d3usersonline'); + $oUsersOnline->clearOldItems($this->_iExpTime); + $oUsersOnline->setActTimeVisit(); $oUser = $this->getUser(); if ($oUser && strtolower($oUser->getFieldData('oxrights')) == 'malladmin') { /** @var oxview $oActView */ $oActView = $this->getParent(); - $oActView->addTplParam('aUsersOnline', $oUserOnline->getUserCount()); + $oActView->addTplParam('aUsersOnline', $oUsersOnline->getUserCount()); } } diff --git a/setup+doku/changelog.txt b/setup+doku/changelog.txt new file mode 100644 index 0000000..df65eae --- /dev/null +++ b/setup+doku/changelog.txt @@ -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 \ No newline at end of file