Skip to content
Snippets Groups Projects

shortcut#install-skin: add a text input to admin menu to install a new skin

Merged Arthur Suzuki requested to merge shortcut-install-skin into hotline
All threads resolved!
Files
7
@@ -142,8 +142,12 @@ class Admin_IndexController extends ZendAfi_Controller_Action {
$reader = new Class_Profil_SkinUpdateReader();
$this->view->reader = $reader;
if('pull' === $this->_getParam('git'))
$git = $this->_getParam('git');
if ($git === 'pull')
$this->_askGitPull($reader);
if ($git === 'clone')
$this->_askGitClone($reader, $this->_getParam('url'));
}
@@ -155,4 +159,14 @@ class Admin_IndexController extends ZendAfi_Controller_Action {
$this->_helper->notify($message);
$this->_redirect('admin/index/update-skin');
}
protected function _askGitClone($reader,$skin_name) {
$message = $reader->askGitClone($skin_name)
? $this->_('La demande d\'installation a été envoyée au serveur')
: $this->_('Erreur : La demande d\'installation n\'a pas pu être envoyée au serveur');
$this->_helper->notify($message);
$this->_redirect('admin/index/update-skin');
}
}
\ No newline at end of file