01-04-2010, 01:54 AM
1) Replace line 29 of file / admin / tabs / AdminPreferences.php by:
2) Replace line 26 of file / header.php by:
This way, you can specify multiple addresses in "maintenance" very useful for teasing
Note, the new IP addresses are added to this form:
XXX.XXX.XXX.XXX, YYYY.YYYY.YYYY.YYYY, ZZZZ.ZZZZ.ZZZZ. ZZZZ
PHP Code:
'PS_MAINTENANCE_IP' => array('title' => $this->l('Maintenance IP:'), 'desc' => $this->l('IP address allowed to access the Front Office while the shop is disabled (e.g., 42.24.4.2)'), 'validation' => 'isGenericName', 'type' => 'text', 'size' => 60, 'default' => ''),
PHP Code:
if (isset($maintenance) AND (!isset($_SERVER['REMOTE_ADDR']) OR !in_array($_SERVER['REMOTE_ADDR'], explode(',', Configuration::get('PS_MAINTENANCE_IP')))))
Note, the new IP addresses are added to this form:
XXX.XXX.XXX.XXX, YYYY.YYYY.YYYY.YYYY, ZZZZ.ZZZZ.ZZZZ. ZZZZ