/** * Generate module: * - Display a wildcard in the back end * - Declare actionlist with templates and compilers in the front end */ public function generate() { if ($this->Input->get('update') != 'database' && !extension_loaded('soap')) { $this->loadLanguageFile('tl_repository'); $theme = new RepositoryBackendTheme(); return ' <div id="tl_buttons" class="buttonwrapper"> ' . $theme->createMainButton('dbcheck16', $this->createUrl(array('update' => 'database')), $GLOBALS['TL_LANG']['tl_repository']['updatedatabase']) . ' </div> <p class="tl_empty">SOAP extension not loaded (configure PHP with --enable-soap).</p>'; } // if $this->actions = array(array('', 'repository_mgrlist', 'listinsts'), array('edit', 'repository_mgredit', 'edit'), array('install', 'repository_mgrinst', 'install'), array('upgrade', 'repository_mgrupgd', 'upgrade'), array('update', 'repository_mgrupdt', 'update'), array('uninstall', 'repository_mgruist', 'uninstall')); return parent::generate(); }
/** * Generate module: * - Display a wildcard in the back end * - Declare actionlist with templates and compilers in the front end * @return string */ public function generate() { if (Input::get('update') != 'database' && !extension_loaded('soap')) { System::loadLanguageFile('tl_repository'); $theme = new RepositoryBackendTheme(); return ' <div id="tl_buttons" class="buttonwrapper"> ' . $theme->createMainButton('dbcheck16', $this->createUrl(array('update' => 'database')), $GLOBALS['TL_LANG']['tl_repository']['updatedatabase']) . ' </div> <p class="tl_empty">' . $GLOBALS['TL_LANG']['tl_repository']['missingSoapModule'] . '</p>'; } // if $this->actions = array(array('', 'repository_mgrlist', 'listinsts'), array('edit', 'repository_mgredit', 'edit'), array('install', 'repository_mgrinst', 'install'), array('upgrade', 'repository_mgrupgd', 'upgrade'), array('update', 'repository_mgrupdt', 'update'), array('uninstall', 'repository_mgruist', 'uninstall')); // Switch to maintenance mode (see #4561) if (Input::post('repository_action') == 'install' || Input::post('repository_action') == 'uninstall') { Config::persist('maintenanceMode', true); } return parent::generate(); }
<?php /** * Contao Open Source CMS * * Copyright (C) 2005-2012 Leo Feyer * * @package Repository * @author Peter Koch, IBK Software AG * @license See accompaning file LICENSE.txt * @copyright Peter Koch 2008-2010 */ /** * Back end modules */ $GLOBALS['BE_MOD']['system']['repository_catalog'] = array('callback' => 'RepositoryCatalog', 'icon' => RepositoryBackendTheme::image('catalog16'), 'stylesheet' => RepositoryBackendTheme::file('backend.css')); $GLOBALS['BE_MOD']['system']['repository_manager'] = array('callback' => 'RepositoryManager', 'icon' => RepositoryBackendTheme::image('install16'), 'stylesheet' => RepositoryBackendTheme::file('backend.css'));
* License as published by the Free Software Foundation, either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program. If not, please visit the Free * Software Foundation website at <http://www.gnu.org/licenses/>. * * PHP version 5 * @copyright Leo Feyer 2005-2011 * @author Leo Feyer <http://www.contao.org> * @package Repository * @license LGPL * @filesource */ /** * Contao Repository :: Configuration file * * @copyright Peter Koch 2008-2010 * @author Peter Koch, IBK Software AG * @license See accompaning file LICENSE.txt */ /** * Back end modules */ array_insert($GLOBALS['BE_MOD']['system'], 4, array('repository_catalog' => array('callback' => 'RepositoryCatalog', 'icon' => RepositoryBackendTheme::image('catalog16'), 'stylesheet' => RepositoryBackendTheme::file('backend.css')), 'repository_manager' => array('callback' => 'RepositoryManager', 'icon' => RepositoryBackendTheme::image('install16'), 'stylesheet' => RepositoryBackendTheme::file('backend.css'))));