[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <04-Jul-2003 10:30:48 wy> 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 /*! \file view.php 28 */ 29 include_once ( "lib/ezutils/classes/ezhttptool.php" ); 30 include_once ( 'kernel/classes/datatypes/ezurl/ezurl.php' ); 31 include_once ( "kernel/classes/datatypes/ezurl/ezurlobjectlink.php" ); 32 33 $Module =& $Params["Module"]; 34 $urlID = null; 35 if ( isset( $Params["ID"] ) ) 36 $urlID = $Params["ID"]; 37 38 if ( is_numeric( $urlID ) ) 39 { 40 $url = eZURL::fetch( $urlID ); 41 if ( !$url ) 42 { 43 return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 44 } 45 } 46 else 47 { 48 return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' ); 49 } 50 51 $http =& eZHttpTool::instance(); 52 if ( $Module->isCurrentAction( 'Cancel' ) ) 53 { 54 $Module->redirectToView( 'list' ); 55 return; 56 } 57 58 if ( $Module->isCurrentAction( 'Store' ) ) 59 { 60 if ( $http->hasPostVariable( 'link' ) ) 61 { 62 $link = $http->postVariable( 'link' ); 63 $url->setAttribute( 'url', $link ); 64 $url->store(); 65 eZURLObjectLink::clearCacheForObjectLink( $urlID ); 66 } 67 $Module->redirectToView( 'list' ); 68 return; 69 } 70 71 $Module->setTitle( "Edit link " . $url->attribute( "id" ) ); 72 73 // Template handling 74 include_once ( "kernel/common/template.php" ); 75 $tpl =& templateInit(); 76 77 $tpl->setVariable( "Module", $Module ); 78 $tpl->setVariable( "url", $url ); 79 80 $Result = array(); 81 $Result['content'] = $tpl->fetch( "design:url/edit.tpl" ); 82 $Result['path'] = array( array( 'url' => '/url/edit/', 83 'text' => ezi18n( 'kernel/url', 'URL edit' ) ) ); 84 ?>
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 |