public function __construct($account, $password, $profileid) { try { $this->ga = new gManagementApi($account, $password); } catch (Exception $e) { $analytics = new SxCms_Analytics(); $analytics->unsetAll()->save(); header('Location: /admin/analytics'); exit; } if (!isset($e)) { $this->profileid = $profileid; } }
public function settingsAction() { $this->hasLoginInfo(); $analytics = new SxCms_Analytics(); if ($this->getRequest()->isPost()) { if ($this->_getParam('deletelink') !== null) { $cache = Zend_Registry::get('cache'); $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('Analytics')); $analytics->unsetAll()->save(); header('Location: /admin/analytics'); exit; } } }