[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <11-Aug-2003 18:12:39 amos> 4 // 5 // SOFTWARE NAME: eZ publish 6 // SOFTWARE RELEASE: 3.9.0 7 // BUILD VERSION: 17785 8 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 9 // SOFTWARE LICENSE: GNU General Public License v2.0 10 // NOTICE: > 11 // This program is free software; you can redistribute it and/or 12 // modify it under the terms of version 2.0 of the GNU General 13 // Public License as published by the Free Software Foundation. 14 // 15 // This program is distributed in the hope that it will be useful, 16 // but WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU General Public License for more details. 19 // 20 // You should have received a copy of version 2.0 of the GNU General 21 // Public License along with this program; if not, write to the Free 22 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 // MA 02110-1301, USA. 24 // 25 // 26 27 include_once ( "kernel/common/template.php" ); 28 include_once ( "kernel/classes/ezpackage.php" ); 29 30 $module =& $Params['Module']; 31 $offset = (int)$Params['Offset']; 32 33 $repositoryID = 'local'; 34 if ( $Params['RepositoryID'] ) 35 $repositoryID = $Params['RepositoryID']; 36 37 if ( $module->isCurrentAction( 'InstallPackage' ) ) 38 { 39 return $module->redirectToView( 'upload' ); 40 } 41 42 $removeList = array(); 43 if ( $module->isCurrentAction( 'RemovePackage' ) or 44 $module->isCurrentAction( 'ConfirmRemovePackage' ) ) 45 { 46 if ( $module->hasActionParameter( 'PackageSelection' ) ) 47 { 48 $removeConfirmation = $module->isCurrentAction( 'ConfirmRemovePackage' ); 49 $packageSelection = $module->actionParameter( 'PackageSelection' ); 50 foreach ( $packageSelection as $packageID ) 51 { 52 $package = eZPackage::fetch( $packageID ); 53 if ( $package ) 54 { 55 if ( $removeConfirmation ) 56 { 57 $package->remove(); 58 } 59 else 60 { 61 $removeList[] = $package; 62 } 63 } 64 } 65 if ( $removeConfirmation ) 66 return $module->redirectToView( 'list' ); 67 } 68 } 69 70 if ( $module->isCurrentAction( 'ChangeRepository' ) ) 71 { 72 $repositoryID = $module->actionParameter( 'RepositoryID' ); 73 } 74 75 if ( $module->isCurrentAction( 'CreatePackage' ) ) 76 { 77 return $module->redirectToView( 'create' ); 78 } 79 80 $tpl =& templateInit(); 81 82 $viewParameters = array( 'offset' => $offset ); 83 84 $tpl->setVariable( 'module_action', $module->currentAction() ); 85 $tpl->setVariable( 'view_parameters', $viewParameters ); 86 $tpl->setVariable( 'remove_list', $removeList ); 87 $tpl->setVariable( 'repository_id', $repositoryID ); 88 89 $Result = array(); 90 $Result['content'] =& $tpl->fetch( "design:package/list.tpl" ); 91 $Result['path'] = array( array( 'url' => false, 92 'text' => ezi18n( 'kernel/package', 'Packages' ) ) ); 93 94 ?>
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 |