[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of Extensions class 4 // 5 // Created on: <03-Jul-2003 10:14:14 jhe> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 $http =& eZHTTPTool::instance(); 30 $module =& $Params["Module"]; 31 32 include_once ( "kernel/common/template.php" ); 33 include_once ( 'lib/ezutils/classes/ezhttptool.php' ); 34 include_once ( 'lib/ezfile/classes/ezdir.php' ); 35 36 $tpl =& templateInit(); 37 38 if ( $module->isCurrentAction( 'ActivateExtensions' ) ) 39 { 40 if ( $http->hasPostVariable( "ActiveExtensionList" ) ) 41 { 42 $selectedExtensionArray = $http->postVariable( "ActiveExtensionList" ); 43 if ( !is_array( $selectedExtensionArray ) ) 44 $selectedExtensionArray = array( $selectedExtensionArray ); 45 } 46 else 47 { 48 $selectedExtensionArray = array(); 49 } 50 51 // open settings/override/site.ini.append[.php] for writing 52 $writeSiteINI = eZINI::instance( 'site.ini.append', 'settings/override', null, null, false, true ); 53 $writeSiteINI->setVariable( "ExtensionSettings", "ActiveExtensions", $selectedExtensionArray ); 54 $writeSiteINI->save( 'site.ini.append', '.php', false, false ); 55 include_once ( 'kernel/classes/ezcache.php' ); 56 eZCache::clearByTag( 'ini' ); 57 } 58 // open site.ini for reading 59 $siteINI = eZINI::instance(); 60 $siteINI->loadCache(); 61 $extensionDir = $siteINI->variable( 'ExtensionSettings', 'ExtensionDirectory' ); 62 $availableExtensionArray = eZDir::findSubItems( $extensionDir ); 63 64 $selectedExtensionArray = $siteINI->variable( 'ExtensionSettings', "ActiveExtensions" ); 65 $selectedAccessExtensionArray = $siteINI->variable( 'ExtensionSettings', "ActiveAccessExtensions" ); 66 $selectedExtensions = array_merge( $selectedExtensionArray, $selectedAccessExtensionArray ); 67 $selectedExtensions = array_unique( $selectedExtensions ); 68 69 $tpl->setVariable( "available_extension_array", $availableExtensionArray ); 70 $tpl->setVariable( "selected_extension_array", $selectedExtensions ); 71 72 $Result = array(); 73 $Result['content'] =& $tpl->fetch( "design:setup/extensions.tpl" ); 74 $Result['path'] = array( array( 'url' => false, 75 'text' => ezi18n( 'kernel/setup', 'Extension configuration' ) ) ); 76 77 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |