public function index() { if (!empty($this->request->data['Admin']['icon'])) { $this->_saveFavicon(); } if (!empty($this->request->data['Admin']['export'])) { $this->SiteExport->_exportSite($this->request->data['Admin']['export']); } if (!empty($this->request->data['Upgrade']['all'])) { $this->SiteUpdate->_runUpdates(); $this->set('runUpdates', true); } if (!empty($this->request->data['Update']['index'])) { $this->view = 'index_upgrade'; } if (!empty($this->request->data['Alias']['update'])) { App::uses('Alias', 'Model'); $Alias = new Alias(); $this->set('syncd', $Alias->sync()); $this->view = 'index_upgrade'; } $complete = $this->Session->read('Updates.complete'); if (!empty($complete)) { $this->Session->delete('Updates'); $this->Session->setFlash(__('Update check complete!!!'), 'flash_success'); } $this->set('title_for_layout', 'Admin Dashboard'); $this->set('page_title_for_layout', 'Admin Dashboard'); $this->layout = 'default'; // this is here so we can show "Add Post" links foreach Blog on the dashboard if (CakePlugin::loaded('Blogs')) { App::uses('Blog', 'Blogs.Model'); $Blog = new Blog(); $this->set('blogs', $Blog->find('all')); } }