Skip to content
Permalink
Browse files

PR-748 Fix naming from `shopID` to `shopId`

Related #748
  • Loading branch information
flow-control authored and Sieg committed Dec 10, 2019
1 parent 108352e commit 92a2e7070c160fd3b14349ac8419945c5d1637b9
@@ -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;
}

/**
@@ -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
*
@@ -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;
}

@@ -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",
@@ -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();

@@ -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
@@ -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();
}
@@ -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);
}

/**
@@ -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);
}

/**

0 comments on commit 92a2e70

Please sign in to comment.
You can’t perform that action at this time.