[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <22-Sen-2004 13:19:58 vs> 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 $Module =& $Params['Module']; 28 $NodeID =& $Params['NodeID']; 29 30 $curNode = eZContentObjectTreeNode::fetch( $NodeID ); 31 if ( !$curNode ) 32 return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 33 34 if ( !$curNode->attribute( 'can_hide' ) ) 35 return $Module->handleError( EZ_ERROR_KERNEL_ACCESS_DENIED, 'kernel' ); 36 37 if ( $curNode->attribute( 'is_hidden' ) ) 38 eZContentObjectTreeNode::unhideSubTree( $curNode ); 39 else 40 eZContentObjectTreeNode::hideSubTree( $curNode ); 41 42 43 include_once ( 'kernel/classes/ezredirectmanager.php' ); 44 $hasRedirect = eZRedirectManager::redirectTo( $Module, false ); 45 if ( !$hasRedirect ) 46 { 47 // redirect to the parent node 48 if( ( $parentNodeID = $curNode->attribute( 'parent_node_id' ) ) == 1 ) 49 $redirectNodeID = $NodeID; 50 else 51 $redirectNodeID = $parentNodeID; 52 return $Module->redirectToView( 'view', array( 'full', $redirectNodeID ) ); 53 } 54 55 ?>
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 |