Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage
  • Mage_Adminhtml_Block_Html_Date
  • Mage_Adminhtml_Block_Html_Select
  • Mage_Api_Model_Wsdl_Config_Element
  • Mage_Captcha_Adminhtml_RefreshController
  • Mage_Captcha_RefreshController
  • Mage_Core_AjaxController
  • Mage_Core_Block_Abstract
  • Mage_Core_Block_Flush
  • Mage_Core_Block_Html_Calendar
  • Mage_Core_Block_Html_Date
  • Mage_Core_Block_Html_Link
  • Mage_Core_Block_Html_Select
  • Mage_Core_Block_Messages
  • Mage_Core_Block_Profiler
  • Mage_Core_Block_Store_Switcher
  • Mage_Core_Block_Template
  • Mage_Core_Block_Template_Facade
  • Mage_Core_Block_Template_Smarty
  • Mage_Core_Block_Template_Zend
  • Mage_Core_Block_Text
  • Mage_Core_Block_Text_List
  • Mage_Core_Block_Text_List_Item
  • Mage_Core_Block_Text_List_Link
  • Mage_Core_Block_Text_Tag
  • Mage_Core_Block_Text_Tag_Css
  • Mage_Core_Block_Text_Tag_Css_Admin
  • Mage_Core_Block_Text_Tag_Debug
  • Mage_Core_Block_Text_Tag_Js
  • Mage_Core_Block_Text_Tag_Meta
  • Mage_Core_Controller_Front_Action
  • Mage_Core_Controller_Front_Router
  • Mage_Core_Controller_Request_Http
  • Mage_Core_Controller_Response_Http
  • Mage_Core_Controller_Varien_Action
  • Mage_Core_Controller_Varien_Front
  • Mage_Core_Controller_Varien_Router_Abstract
  • Mage_Core_Controller_Varien_Router_Admin
  • Mage_Core_Controller_Varien_Router_Default
  • Mage_Core_Controller_Varien_Router_Standard
  • Mage_Core_Helper_Abstract
  • Mage_Core_Helper_Cookie
  • Mage_Core_Helper_Data
  • Mage_Core_Helper_File_Storage
  • Mage_Core_Helper_File_Storage_Database
  • Mage_Core_Helper_Hint
  • Mage_Core_Helper_Http
  • Mage_Core_Helper_Js
  • Mage_Core_Helper_String
  • Mage_Core_Helper_Translate
  • Mage_Core_Helper_Url
  • Mage_Core_Helper_Url_Rewrite
  • Mage_Core_IndexController
  • Mage_Core_Model_Abstract
  • Mage_Core_Model_App
  • Mage_Core_Model_App_Area
  • Mage_Core_Model_App_Emulation
  • Mage_Core_Model_Cache
  • Mage_Core_Model_Calculator
  • Mage_Core_Model_Config
  • Mage_Core_Model_Config_Base
  • Mage_Core_Model_Config_Data
  • Mage_Core_Model_Config_Element
  • Mage_Core_Model_Config_Options
  • Mage_Core_Model_Config_System
  • Mage_Core_Model_Cookie
  • Mage_Core_Model_Date
  • Mage_Core_Model_Design
  • Mage_Core_Model_Design_Package
  • Mage_Core_Model_Design_Source_Design
  • Mage_Core_Model_Email
  • Mage_Core_Model_Email_Info
  • Mage_Core_Model_Email_Template
  • Mage_Core_Model_Email_Template_Filter
  • Mage_Core_Model_Email_Template_Mailer
  • Mage_Core_Model_Email_Transport
  • Mage_Core_Model_Encryption
  • Mage_Core_Model_File_Storage
  • Mage_Core_Model_File_Storage_Abstract
  • Mage_Core_Model_File_Storage_Database
  • Mage_Core_Model_File_Storage_Database_Abstract
  • Mage_Core_Model_File_Storage_Directory_Database
  • Mage_Core_Model_File_Storage_File
  • Mage_Core_Model_File_Storage_Flag
  • Mage_Core_Model_File_Uploader
  • Mage_Core_Model_File_Validator_AvailablePath
  • Mage_Core_Model_File_Validator_NotProtectedExtension
  • Mage_Core_Model_Flag
  • Mage_Core_Model_Input_Filter
  • Mage_Core_Model_Input_Filter_MaliciousCode
  • Mage_Core_Model_Language
  • Mage_Core_Model_Layout
  • Mage_Core_Model_Layout_Data
  • Mage_Core_Model_Layout_Element
  • Mage_Core_Model_Layout_Update
  • Mage_Core_Model_Locale
  • Mage_Core_Model_Locale_Config
  • Mage_Core_Model_Log_Adapter
  • Mage_Core_Model_Magento_Api
  • Mage_Core_Model_Magento_Api_V2
  • Mage_Core_Model_Message
  • Mage_Core_Model_Message_Abstract
  • Mage_Core_Model_Message_Collection
  • Mage_Core_Model_Message_Error
  • Mage_Core_Model_Message_Notice
  • Mage_Core_Model_Message_Success
  • Mage_Core_Model_Message_Warning
  • Mage_Core_Model_Mysql4_Abstract
  • Mage_Core_Model_Mysql4_Cache
  • Mage_Core_Model_Mysql4_Collection_Abstract
  • Mage_Core_Model_Mysql4_Config
  • Mage_Core_Model_Mysql4_Config_Data
  • Mage_Core_Model_Mysql4_Config_Data_Collection
  • Mage_Core_Model_Mysql4_Design
  • Mage_Core_Model_Mysql4_Design_Collection
  • Mage_Core_Model_Mysql4_Design_Package_Collection
  • Mage_Core_Model_Mysql4_Design_Theme
  • Mage_Core_Model_Mysql4_Email_Template
  • Mage_Core_Model_Mysql4_Email_Template_Collection
  • Mage_Core_Model_Mysql4_File_Storage_Abstract
  • Mage_Core_Model_Mysql4_File_Storage_Database
  • Mage_Core_Model_Mysql4_File_Storage_Directory_Database
  • Mage_Core_Model_Mysql4_File_Storage_File
  • Mage_Core_Model_Mysql4_Flag
  • Mage_Core_Model_Mysql4_Language
  • Mage_Core_Model_Mysql4_Language_Collection
  • Mage_Core_Model_Mysql4_Layout
  • Mage_Core_Model_Mysql4_Resource
  • Mage_Core_Model_Mysql4_Session
  • Mage_Core_Model_Mysql4_Store
  • Mage_Core_Model_Mysql4_Store_Collection
  • Mage_Core_Model_Mysql4_Store_Group
  • Mage_Core_Model_Mysql4_Store_Group_Collection
  • Mage_Core_Model_Mysql4_Translate
  • Mage_Core_Model_Mysql4_Translate_String
  • Mage_Core_Model_Mysql4_Url_Rewrite
  • Mage_Core_Model_Mysql4_Url_Rewrite_Collection
  • Mage_Core_Model_Mysql4_Variable
  • Mage_Core_Model_Mysql4_Variable_Collection
  • Mage_Core_Model_Mysql4_Website
  • Mage_Core_Model_Mysql4_Website_Collection
  • Mage_Core_Model_Observer
  • Mage_Core_Model_Resource
  • Mage_Core_Model_Resource_Abstract
  • Mage_Core_Model_Resource_Cache
  • Mage_Core_Model_Resource_Config
  • Mage_Core_Model_Resource_Config_Data
  • Mage_Core_Model_Resource_Config_Data_Collection
  • Mage_Core_Model_Resource_Db_Abstract
  • Mage_Core_Model_Resource_Db_Collection_Abstract
  • Mage_Core_Model_Resource_Design
  • Mage_Core_Model_Resource_Design_Collection
  • Mage_Core_Model_Resource_Design_Package_Collection
  • Mage_Core_Model_Resource_Email_Template
  • Mage_Core_Model_Resource_Email_Template_Collection
  • Mage_Core_Model_Resource_Entity_Abstract
  • Mage_Core_Model_Resource_Entity_Table
  • Mage_Core_Model_Resource_File_Storage_Abstract
  • Mage_Core_Model_Resource_File_Storage_Database
  • Mage_Core_Model_Resource_File_Storage_Directory_Database
  • Mage_Core_Model_Resource_File_Storage_File
  • Mage_Core_Model_Resource_Flag
  • Mage_Core_Model_Resource_Helper_Abstract
  • Mage_Core_Model_Resource_Helper_Mysql4
  • Mage_Core_Model_Resource_Iterator
  • Mage_Core_Model_Resource_Language
  • Mage_Core_Model_Resource_Language_Collection
  • Mage_Core_Model_Resource_Layout
  • Mage_Core_Model_Resource_Resource
  • Mage_Core_Model_Resource_Session
  • Mage_Core_Model_Resource_Setup
  • Mage_Core_Model_Resource_Setup_Query_Modifier
  • Mage_Core_Model_Resource_Store
  • Mage_Core_Model_Resource_Store_Collection
  • Mage_Core_Model_Resource_Store_Group
  • Mage_Core_Model_Resource_Store_Group_Collection
  • Mage_Core_Model_Resource_Transaction
  • Mage_Core_Model_Resource_Translate
  • Mage_Core_Model_Resource_Translate_String
  • Mage_Core_Model_Resource_Type_Abstract
  • Mage_Core_Model_Resource_Type_Db
  • Mage_Core_Model_Resource_Type_Db_Mysqli
  • Mage_Core_Model_Resource_Type_Db_Mysqli_Setup
  • Mage_Core_Model_Resource_Type_Db_Pdo_Mysql
  • Mage_Core_Model_Resource_Url_Rewrite
  • Mage_Core_Model_Resource_Url_Rewrite_Collection
  • Mage_Core_Model_Resource_Variable
  • Mage_Core_Model_Resource_Variable_Collection
  • Mage_Core_Model_Resource_Website
  • Mage_Core_Model_Resource_Website_Collection
  • Mage_Core_Model_Session
  • Mage_Core_Model_Session_Abstract
  • Mage_Core_Model_Session_Abstract_Varien
  • Mage_Core_Model_Session_Abstract_Zend
  • Mage_Core_Model_Source_Email_Variables
  • Mage_Core_Model_Store
  • Mage_Core_Model_Store_Api
  • Mage_Core_Model_Store_Api_V2
  • Mage_Core_Model_Store_Group
  • Mage_Core_Model_Template
  • Mage_Core_Model_Translate
  • Mage_Core_Model_Translate_Expr
  • Mage_Core_Model_Translate_Inline
  • Mage_Core_Model_Translate_String
  • Mage_Core_Model_Url
  • Mage_Core_Model_Url_Rewrite
  • Mage_Core_Model_Url_Validator
  • Mage_Core_Model_Variable
  • Mage_Core_Model_Variable_Config
  • Mage_Core_Model_Variable_Observer
  • Mage_Core_Model_Website
  • Mage_Page_Block_Switch
  • Mage_Page_Block_Template_Container
  • Mage_Page_Block_Template_Links
  • Mage_Page_Block_Template_Links_Block
  • Mage_Sales_Model_Quote_Address_Total_Collector

Exceptions

  • Mage_Core_Controller_Varien_Exception
  • Mage_Core_Exception
  • Mage_Core_Model_Session_Exception
  • Mage_Core_Model_Store_Exception

Functions

  • destruct
  • is_dir_writeable
  • is_empty_date
  • mageCoreErrorHandler
  • mageDebugBacktrace
  • mageDelTree
  • mageFindClassFile
  • mageParseCsv
  • mageSendErrorFooter
  • mageSendErrorHeader
  • mageUndoMagicQuotes
  • now
  • sys_get_temp_dir
  • uc_words
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_Core
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: 
 28: /**
 29:  * Url rewrite model class
 30:  *
 31:  * @method Mage_Core_Model_Resource_Url_Rewrite _getResource()
 32:  * @method Mage_Core_Model_Resource_Url_Rewrite getResource()
 33:  * @method Mage_Core_Model_Url_Rewrite setStoreId(int $value)
 34:  * @method int getCategoryId()
 35:  * @method Mage_Core_Model_Url_Rewrite setCategoryId(int $value)
 36:  * @method int getProductId()
 37:  * @method Mage_Core_Model_Url_Rewrite setProductId(int $value)
 38:  * @method string getIdPath()
 39:  * @method Mage_Core_Model_Url_Rewrite setIdPath(string $value)
 40:  * @method string getRequestPath()
 41:  * @method Mage_Core_Model_Url_Rewrite setRequestPath(string $value)
 42:  * @method string getTargetPath()
 43:  * @method Mage_Core_Model_Url_Rewrite setTargetPath(string $value)
 44:  * @method int getIsSystem()
 45:  * @method Mage_Core_Model_Url_Rewrite setIsSystem(int $value)
 46:  * @method string getOptions()
 47:  * @method Mage_Core_Model_Url_Rewrite setOptions(string $value)
 48:  * @method string getDescription()
 49:  * @method Mage_Core_Model_Url_Rewrite setDescription(string $value)
 50:  *
 51:  * @category    Mage
 52:  * @package     Mage_Core
 53:  * @author      Magento Core Team <core@magentocommerce.com>
 54:  */
 55: class Mage_Core_Model_Url_Rewrite extends Mage_Core_Model_Abstract
 56: {
 57:     const TYPE_CATEGORY = 1;
 58:     const TYPE_PRODUCT  = 2;
 59:     const TYPE_CUSTOM   = 3;
 60:     const REWRITE_REQUEST_PATH_ALIAS = 'rewrite_request_path';
 61: 
 62:     /**
 63:      * Cache tag for clear cache in after save and after delete
 64:      *
 65:      * @var mixed | array | string | boolean
 66:      */
 67:     protected $_cacheTag = false;
 68: 
 69:     protected function _construct()
 70:     {
 71:         $this->_init('core/url_rewrite');
 72:     }
 73: 
 74:     /**
 75:      * Clean cache for front-end menu
 76:      *
 77:      * @return  Mage_Core_Model_Url_Rewrite
 78:      */
 79:     protected function _afterSave()
 80:     {
 81:         if ($this->hasCategoryId()) {
 82:             $this->_cacheTag = array(Mage_Catalog_Model_Category::CACHE_TAG, Mage_Core_Model_Store_Group::CACHE_TAG);
 83:         }
 84: 
 85:         parent::_afterSave();
 86: 
 87:         return $this;
 88:     }
 89: 
 90:     /**
 91:      * Load rewrite information for request
 92:      * If $path is array - we must load possible records and choose one matching earlier record in array
 93:      *
 94:      * @param   mixed $path
 95:      * @return  Mage_Core_Model_Url_Rewrite
 96:      */
 97:     public function loadByRequestPath($path)
 98:     {
 99:         $this->setId(null);
100:         $this->_getResource()->loadByRequestPath($this, $path);
101:         $this->_afterLoad();
102:         $this->setOrigData();
103:         $this->_hasDataChanges = false;
104:         return $this;
105:     }
106: 
107:     public function loadByIdPath($path)
108:     {
109:         $this->setId(null)->load($path, 'id_path');
110:         return $this;
111:     }
112: 
113:     public function loadByTags($tags)
114:     {
115:         $this->setId(null);
116: 
117:         $loadTags = is_array($tags) ? $tags : explode(',', $tags);
118: 
119:         $search = $this->getResourceCollection();
120:         foreach ($loadTags as $k=>$t) {
121:             if (!is_numeric($k)) {
122:                 $t = $k.'='.$t;
123:             }
124:             $search->addTagsFilter($t);
125:         }
126:         if (!is_null($this->getStoreId())) {
127:             $search->addStoreFilter($this->getStoreId());
128:         }
129: 
130:         $search->setPageSize(1)->load();
131: 
132:         if ($search->getSize()>0) {
133:             foreach ($search as $rewrite) {
134:                 $this->setData($rewrite->getData());
135:             }
136:         }
137: 
138:         return $this;
139:     }
140: 
141:     public function hasOption($key)
142:     {
143:         $optArr = explode(',', $this->getOptions());
144: 
145:         return array_search($key, $optArr) !== false;
146:     }
147: 
148:     public function addTag($tags)
149:     {
150:         $curTags = $this->getTags();
151: 
152:         $addTags = is_array($tags) ? $tags : explode(',', $tags);
153: 
154:         foreach ($addTags as $k=>$t) {
155:             if (!is_numeric($k)) {
156:                 $t = $k.'='.$t;
157:             }
158:             if (!in_array($t, $curTags)) {
159:                 $curTags[] = $t;
160:             }
161:         }
162: 
163:         $this->setTags($curTags);
164: 
165:         return $this;
166:     }
167: 
168:     public function removeTag($tags)
169:     {
170:         $curTags = $this->getTags();
171: 
172:         $removeTags = is_array($tags) ? $tags : explode(',', $tags);
173: 
174:         foreach ($removeTags as $t) {
175:             if (!is_numeric($k)) {
176:                 $t = $k.'='.$t;
177:             }
178:             if ($key = array_search($t, $curTags)) {
179:                 unset($curTags[$key]);
180:             }
181:         }
182: 
183:         $this->setTags(',', $curTags);
184: 
185:         return $this;
186:     }
187: 
188:     /**
189:      * Implement logic of custom rewrites
190:      *
191:      * @param   Zend_Controller_Request_Http $request
192:      * @param   Zend_Controller_Response_Http $response
193:      * @return  Mage_Core_Model_Url
194:      */
195:     public function rewrite(Zend_Controller_Request_Http $request=null, Zend_Controller_Response_Http $response=null)
196:     {
197:         if (!Mage::isInstalled()) {
198:             return false;
199:         }
200:         if (is_null($request)) {
201:             $request = Mage::app()->getFrontController()->getRequest();
202:         }
203:         if (is_null($response)) {
204:             $response = Mage::app()->getFrontController()->getResponse();
205:         }
206:         if (is_null($this->getStoreId()) || false===$this->getStoreId()) {
207:             $this->setStoreId(Mage::app()->getStore()->getId());
208:         }
209: 
210:         /**
211:          * We have two cases of incoming paths - with and without slashes at the end ("/somepath/" and "/somepath").
212:          * Each of them matches two url rewrite request paths - with and without slashes at the end ("/somepath/" and "/somepath").
213:          * Choose any matched rewrite, but in priority order that depends on same presence of slash and query params.
214:          */
215:         $requestCases = array();
216:         $pathInfo = $request->getPathInfo();
217:         $origSlash = (substr($pathInfo, -1) == '/') ? '/' : '';
218:         $requestPath = trim($pathInfo, '/');
219: 
220:         // If there were final slash - add nothing to less priority paths. And vice versa.
221:         $altSlash = $origSlash ? '' : '/';
222: 
223:         $queryString = $this->_getQueryString(); // Query params in request, matching "path + query" has more priority
224:         if ($queryString) {
225:             $requestCases[] = $requestPath . $origSlash . '?' . $queryString;
226:             $requestCases[] = $requestPath . $altSlash . '?' . $queryString;
227:         }
228:         $requestCases[] = $requestPath . $origSlash;
229:         $requestCases[] = $requestPath . $altSlash;
230: 
231:         $this->loadByRequestPath($requestCases);
232: 
233:         /**
234:          * Try to find rewrite by request path at first, if no luck - try to find by id_path
235:          */
236:         if (!$this->getId() && isset($_GET['___from_store'])) {
237:             try {
238:                 $fromStoreId = Mage::app()->getStore($_GET['___from_store'])->getId();
239:             }
240:             catch (Exception $e) {
241:                 return false;
242:             }
243: 
244:             $this->setStoreId($fromStoreId)->loadByRequestPath($requestCases);
245:             if (!$this->getId()) {
246:                 return false;
247:             }
248:             $currentStore = Mage::app()->getStore();
249:             $this->setStoreId($currentStore->getId())->loadByIdPath($this->getIdPath());
250: 
251:             Mage::app()->getCookie()->set(Mage_Core_Model_Store::COOKIE_NAME, $currentStore->getCode(), true);
252:             $targetUrl = $request->getBaseUrl(). '/' . $this->getRequestPath();
253: 
254:             $this->_sendRedirectHeaders($targetUrl, true);
255:         }
256: 
257:         if (!$this->getId()) {
258:             return false;
259:         }
260: 
261: 
262:         $request->setAlias(self::REWRITE_REQUEST_PATH_ALIAS, $this->getRequestPath());
263:         $external = substr($this->getTargetPath(), 0, 6);
264:         $isPermanentRedirectOption = $this->hasOption('RP');
265:         if ($external === 'http:/' || $external === 'https:') {
266:             $destinationStoreCode = Mage::app()->getStore($this->getStoreId())->getCode();
267:             Mage::app()->getCookie()->set(Mage_Core_Model_Store::COOKIE_NAME, $destinationStoreCode, true);
268: 
269:             $this->_sendRedirectHeaders($this->getTargetPath(), $isPermanentRedirectOption);
270:         } else {
271:             $targetUrl = $request->getBaseUrl(). '/' . $this->getTargetPath();
272:         }
273:         $isRedirectOption = $this->hasOption('R');
274:         if ($isRedirectOption || $isPermanentRedirectOption) {
275:             if (Mage::getStoreConfig('web/url/use_store') && $storeCode = Mage::app()->getStore()->getCode()) {
276:                 $targetUrl = $request->getBaseUrl(). '/' . $storeCode . '/' .$this->getTargetPath();
277:             }
278: 
279:             $this->_sendRedirectHeaders($targetUrl, $isPermanentRedirectOption);
280:         }
281: 
282:         if (Mage::getStoreConfig('web/url/use_store') && $storeCode = Mage::app()->getStore()->getCode()) {
283:                 $targetUrl = $request->getBaseUrl(). '/' . $storeCode . '/' .$this->getTargetPath();
284:             }
285: 
286:         $queryString = $this->_getQueryString();
287:         if ($queryString) {
288:             $targetUrl .= '?'.$queryString;
289:         }
290: 
291:         $request->setRequestUri($targetUrl);
292:         $request->setPathInfo($this->getTargetPath());
293: 
294:         return true;
295:     }
296: 
297:     protected function _getQueryString()
298:     {
299:         if (!empty($_SERVER['QUERY_STRING'])) {
300:             $queryParams = array();
301:             parse_str($_SERVER['QUERY_STRING'], $queryParams);
302:             $hasChanges = false;
303:             foreach ($queryParams as $key=>$value) {
304:                 if (substr($key, 0, 3) === '___') {
305:                     unset($queryParams[$key]);
306:                     $hasChanges = true;
307:                 }
308:             }
309:             if ($hasChanges) {
310:                 return http_build_query($queryParams);
311:             }
312:             else {
313:                 return $_SERVER['QUERY_STRING'];
314:             }
315:         }
316:         return false;
317:     }
318: 
319:     public function getStoreId()
320:     {
321:         return $this->_getData('store_id');
322:     }
323: 
324:     /**
325:      * Add location header and disable browser page caching
326:      *
327:      * @param string $url
328:      * @param bool $isPermanent
329:      */
330:     protected function _sendRedirectHeaders($url, $isPermanent = false)
331:     {
332:         if ($isPermanent) {
333:             header('HTTP/1.1 301 Moved Permanently');
334:         }
335: 
336:         header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
337:         header('Pragma: no-cache');
338:         header('Location: ' . $url);
339:         exit;
340:     }
341: }
342: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0