Skip to content

Commit

Permalink
PR-748 Fix naming from shopID to shopId
Browse files Browse the repository at this point in the history
Related #748
  • Loading branch information
realFlowControl authored and Sieg committed Dec 13, 2019
1 parent 108352e commit 92a2e70
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions source/Application/Model/CategoryList.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,13 @@ public function loadList()
}

/**
* setter for shopID
* setter for shopId
*
* @param int $sShopID ShopID
* @param int $sShopId ShopID
*/
public function setShopID($sShopID)
public function setShopID($sShopId)
{
$this->_sShopID = $sShopID;
$this->_sShopID = $sShopId;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions source/Application/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2370,7 +2370,7 @@ public function isMallAdmin()
*
* @param string $userName User
* @param string $password Password
* @param int $shopID Shop id
* @param int $shopId Shop id
*
* @throws UserException
*
Expand All @@ -2382,20 +2382,20 @@ public function isMallAdmin()
*
* @return void
*/
protected function _dbLogin(string $userName, $password, $shopID)
protected function _dbLogin(string $userName, $password, $shopId)
{
$database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
$userId = $database->getOne($this->_getLoginQuery($userName, $password, $shopID, $this->isAdmin()));
$userId = $database->getOne($this->_getLoginQuery($userName, $password, $shopId, $this->isAdmin()));
if (!$userId) {
$userId = $database->getOne($this->_getLoginQueryHashedWithMD5($userName, $password, $shopID, $this->isAdmin()));
$userId = $database->getOne($this->_getLoginQueryHashedWithMD5($userName, $password, $shopId, $this->isAdmin()));
}

/** Return here to give other log-in mechanisms the possibility to be triggered */
if (!$userId) {
return;
}

$this->loadAuthenticatedUser($userName, $shopID);
$this->loadAuthenticatedUser($userName, $shopId);
$this->isOutdatedPasswordHashAlgorithmUsed = true;
}

Expand Down
20 changes: 10 additions & 10 deletions source/Core/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,17 @@ protected function _processSeoCall()
* Initialize configuration variables
*
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseException
* @param int $shopID
* @param int $shopId
*/
public function initVars($shopID)
public function initVars($shopId)
{
$this->_loadVarsFromFile();

$this->_setDefaults();

$configLoaded = $this->_loadVarsFromDb($shopID);
$configLoaded = $this->_loadVarsFromDb($shopId);
// loading shop config
if (empty($shopID) || !$configLoaded) {
if (empty($shopId) || !$configLoaded) {
// if no config values where loaded (some problems with DB), throwing an exception
$exception = new \OxidEsales\Eshop\Core\Exception\DatabaseException(
"Unable to load shop config values from database",
Expand All @@ -394,15 +394,15 @@ public function initVars($shopID)
}

// loading theme config options
$this->_loadVarsFromDb($shopID, null, Config::OXMODULE_THEME_PREFIX . $this->getConfigParam('sTheme'));
$this->_loadVarsFromDb($shopId, null, Config::OXMODULE_THEME_PREFIX . $this->getConfigParam('sTheme'));

// checking if custom theme (which has defined parent theme) config options should be loaded over parent theme (#3362)
if ($this->getConfigParam('sCustomTheme')) {
$this->_loadVarsFromDb($shopID, null, Config::OXMODULE_THEME_PREFIX . $this->getConfigParam('sCustomTheme'));
$this->_loadVarsFromDb($shopId, null, Config::OXMODULE_THEME_PREFIX . $this->getConfigParam('sCustomTheme'));
}

// loading modules config
$this->_loadVarsFromDb($shopID, null, Config::OXMODULE_MODULE_PREFIX);
$this->_loadVarsFromDb($shopId, null, Config::OXMODULE_MODULE_PREFIX);

$this->loadAdditionalConfiguration();

Expand Down Expand Up @@ -545,18 +545,18 @@ protected function _loadCustomConfig()
/**
* Load config values from DB
*
* @param int $shopID shop ID to load parameters
* @param int $shopId shop ID to load parameters
* @param array $onlyVars array of params to load (optional)
* @param string $module module vars to load, empty for base options
*
* @return bool
*/
protected function _loadVarsFromDb($shopID, $onlyVars = null, $module = '')
protected function _loadVarsFromDb($shopId, $onlyVars = null, $module = '')
{
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

$params = [
':oxshopid' => $shopID
':oxshopid' => $shopId
];
$select = "select
oxvarname, oxvartype, oxvarvalue
Expand Down
10 changes: 5 additions & 5 deletions source/Core/Model/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ public function setId($oxid = null)
if ($this->getCoreTableName() == 'oxobject2category') {
$objectId = $this->oxobject2category__oxobjectid;
$categoryId = $this->oxobject2category__oxcatnid;
$shopID = $this->oxobject2category__oxshopid;
$this->_sOXID = md5($objectId . $categoryId . $shopID);
$shopId = $this->oxobject2category__oxshopid;
$this->_sOXID = md5($objectId . $categoryId . $shopId);
} else {
$this->_sOXID = \OxidEsales\Eshop\Core\Registry::getUtilsObject()->generateUID();
}
Expand Down Expand Up @@ -996,13 +996,13 @@ protected function _isInList()
* Returns actual object view or table name
*
* @param string $table Original table name
* @param int $shopID Shop ID
* @param int $shopId Shop ID
*
* @return string
*/
protected function _getObjectViewName($table, $shopID = null)
protected function _getObjectViewName($table, $shopId = null)
{
return getViewName($table, -1, $shopID);
return getViewName($table, -1, $shopId);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions source/Core/Model/MultiLanguageModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,17 @@ protected function _insert()
* Returns actual object view or table name
*
* @param string $table Original table name
* @param int $shopID Shop ID
* @param int $shopId Shop ID
*
* @return string
*/
protected function _getObjectViewName($table, $shopID = null)
protected function _getObjectViewName($table, $shopId = null)
{
if (!$this->_blEmployMultilanguage) {
return parent::_getObjectViewName($table, $shopID);
return parent::_getObjectViewName($table, $shopId);
}

return getViewName($table, $this->getLanguage(), $shopID);
return getViewName($table, $this->getLanguage(), $shopId);
}

/**
Expand Down

0 comments on commit 92a2e70

Please sign in to comment.