[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Created on: <07-May-2003 15:37:09 bf> 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 $http =& eZHTTPTool::instance(); 28 $module =& $Params["Module"]; 29 30 $offset = $Params['Offset']; 31 32 $doFiltration = false; 33 $filterString = ''; 34 35 if ( !is_numeric( $offset ) ) 36 $offset = 0; 37 38 if ( $http->hasVariable( 'filterString' ) ) 39 { 40 $filterString = $http->variable('filterString'); 41 if ( ( strlen( trim( $filterString ) ) > 0 ) ) 42 $doFiltration = true; 43 } 44 45 include_once ( "kernel/common/template.php" ); 46 include_once ( "kernel/common/eztemplatedesignresource.php" ); 47 include_once ( 'lib/ezutils/classes/ezhttptool.php' ); 48 49 $ini =& eZINI::instance(); 50 $tpl =& templateInit(); 51 52 $siteAccess = $http->sessionVariable( 'eZTemplateAdminCurrentSiteAccess' ); 53 54 $overrideArray = eZTemplatedesignresource::overrideArray( $siteAccess ); 55 56 $mostUsedOverrideArray = array(); 57 $filteredOverrideArray = array(); 58 $mostUsedMatchArray = array( 'node/view/', 'content/view/embed', 'pagelayout.tpl', 'search.tpl', 'basket' ); 59 foreach ( array_keys( $overrideArray ) as $overrideKey ) 60 { 61 foreach ( $mostUsedMatchArray as $mostUsedMatch ) 62 { 63 if ( strpos( $overrideArray[$overrideKey]['template'], $mostUsedMatch ) !== false ) 64 { 65 $mostUsedOverrideArray[$overrideKey] = $overrideArray[$overrideKey]; 66 } 67 } 68 if ( $doFiltration ) { 69 if ( strpos( $overrideArray[$overrideKey]['template'], $filterString ) !== false ) 70 { 71 $filteredOverrideArray[$overrideKey] = $overrideArray[$overrideKey]; 72 } 73 } 74 } 75 76 $tpl->setVariable( 'filterString', $filterString ); 77 78 if ( $doFiltration ) 79 { 80 $tpl->setVariable( 'template_array', $filteredOverrideArray ); 81 $tpl->setVariable( 'template_count', count( $filteredOverrideArray ) ); 82 } 83 else 84 { 85 $tpl->setVariable( 'template_array', $overrideArray ); 86 $tpl->setVariable( 'template_count', count( $overrideArray ) ); 87 } 88 89 $tpl->setVariable( 'most_used_template_array', $mostUsedOverrideArray ); 90 $viewParameters = array( 'offset' => $offset ); 91 $tpl->setVariable( 'view_parameters', $viewParameters ); 92 93 $Result = array(); 94 $Result['content'] =& $tpl->fetch( "design:visual/templatelist.tpl" ); 95 $Result['path'] = array( array( 'url' => false, 96 'text' => ezi18n( 'kernel/design', 'Template list' ) ) ); 97 98 ?>
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 |