@@ -231,16 +231,16 @@ |
||
| 231 | 231 | * @param string|object $model |
| 232 | 232 | * @return string |
| 233 | 233 | */ |
| 234 | - public function getModelName( $model ) { |
|
| 235 | - if( is_object( $model ) ) { |
|
| 236 | - $model = get_class( $model ); |
|
| 234 | + public function getModelName($model) { |
|
| 235 | + if (is_object($model)) { |
|
| 236 | + $model = get_class($model); |
|
| 237 | 237 | } |
| 238 | 238 | // This guess may work if the extension uses its lowercased name as model group name. |
| 239 | - $result = strtolower( preg_replace( |
|
| 240 | - '~^[^_]+_([^_]+)_Model_(.+)$~', '$1/$2', $model ) ); |
|
| 239 | + $result = strtolower(preg_replace( |
|
| 240 | + '~^[^_]+_([^_]+)_Model_(.+)$~', '$1/$2', $model )); |
|
| 241 | 241 | // This check is not expensive because the answer should come from Magento's classNameCache |
| 242 | 242 | $checkModel = Mage::getConfig()->getModelClassName($result); |
| 243 | - if ( 'Mage_' == substr($checkModel,0,5) && !class_exists($result) ) { |
|
| 243 | + if ('Mage_' == substr($checkModel, 0, 5) && ! class_exists($result)) { |
|
| 244 | 244 | // Fallback to full model name. |
| 245 | 245 | $result = $model; |
| 246 | 246 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * User: [email protected] |
|
| 4 | - * Date: 08/01/14 |
|
| 5 | - */ |
|
| 3 | + * User: [email protected] |
|
| 4 | + * Date: 08/01/14 |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | require_once Mage::getModuleDir('controllers', 'Mage_Adminhtml').DS.'CacheController.php'; |
| 8 | 8 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | */ |
| 66 | 66 | public function fixCmRedisSessionLocks($eventObject) { |
| 67 | 67 | if (Mage::helper('core')->isModuleEnabled('Cm_RedisSession')) { |
| 68 | - if (!empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend']) { |
|
| 68 | + if ( ! empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend']) { |
|
| 69 | 69 | define('CM_REDISSESSION_LOCKING_ENABLED', false); |
| 70 | 70 | } |
| 71 | 71 | } |