Changeset 2254
- Timestamp:
- Mar 6, 2008, 1:25:47 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/template.class.php
r2239 r2254 85 85 $this->smarty->register_modifier( 'translate', array('Template', 'mod_translate') ); 86 86 87 include($root.'/theme/'.$theme.'/themeconf.inc.php'); 88 $this->smarty->assign('themeconf', $themeconf); 87 if ( !empty($theme) ) 88 { 89 include($root.'/theme/'.$theme.'/themeconf.inc.php'); 90 $this->smarty->assign('themeconf', $themeconf); 91 } 89 92 90 93 $this->_old = & new TemplateOld($root, $theme); -
trunk/plugins/event_tracer/event_list.php
r1900 r2254 68 68 $url = get_admin_plugin_menu_link(__FILE__); 69 69 70 $template->assign _vars( array(70 $template->assign( array( 71 71 'NB_EVENTS' => count($events), 72 72 'U_SORT0' => add_url_params($url, array('sort'=>0) ), … … 75 75 ) ); 76 76 77 $template->assign('events', array()); 77 78 foreach ($events as $e) 78 79 { 79 $template->a ssign_block_vars( 'event', array(80 $template->append( 'events', array( 80 81 'TYPE' => $e[0], 81 82 'NAME' => $e[1], -
trunk/plugins/event_tracer/event_list.tpl
r2222 r2254 1 <!-- DEV TAG: not smarty migrated --> 2 There are { NB_EVENTS} calls to triger_event or triger_action.1 {* $Id$ *} 2 There are {$NB_EVENTS} calls to triger_event or triger_action. 3 3 4 4 <table width="99%" class="table2"> 5 5 <tr class="throw"> 6 <th><a href="{ U_SORT0}">Type</a></th>7 <th><a href="{ U_SORT1}">Name</a></th>8 <th><a href="{ U_SORT2}">File</a></th>6 <th><a href="{$U_SORT0}">Type</a></th> 7 <th><a href="{$U_SORT1}">Name</a></th> 8 <th><a href="{$U_SORT2}">File</a></th> 9 9 </tr> 10 <!-- BEGIN event --> 10 {foreach from=$events item=event} 11 11 <tr> 12 <td>{ event.TYPE}</td>13 <td>{ event.NAME}</td>14 <td>{ event.FILE}</td>12 <td>{$event.TYPE}</td> 13 <td>{$event.NAME}</td> 14 <td>{$event.FILE}</td> 15 15 </tr> 16 <!-- END event --> 16 {/foreach} 17 17 </table> -
trunk/plugins/event_tracer/main.inc.php
r2243 r2254 1 1 <?php /* 2 2 Plugin Name: Event tracer 3 Version: 1.8 3 Version: 1.8.a 4 4 Description: For developers. Shows all calls to trigger_event. 5 5 Plugin URI: http://www.phpwebgallery.net … … 19 19 } 20 20 21 function get_config_file_dir() 22 { 23 global $conf; 24 return $conf['local_data_dir'].'/plugins/'; 25 } 26 27 function get_config_file_name() 28 { 29 return basename(dirname(__FILE__)).'.dat'; 30 } 31 21 32 function load_config() 22 33 { 23 $x = @file_get_contents( dirname(__FILE__).'/data.dat');34 $x = @file_get_contents( $this->get_config_file_dir().$this->get_config_file_name() ); 24 35 if ($x!==false) 25 36 { … … 39 50 function save_config() 40 51 { 41 $file = fopen( dirname(__FILE__).'/data.dat', 'w' ); 52 $dir = $this->get_config_file_dir(); 53 @mkdir($dir); 54 $file = fopen( $dir.$this->get_config_file_name(), 'w' ); 42 55 fwrite($file, serialize($this->my_config) ); 43 56 fclose( $file ); -
trunk/plugins/event_tracer/tracer_admin.php
r1912 r2254 22 22 array_push($page['infos'], 'event tracer options saved'); 23 23 } 24 $template->assign _var('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) );25 $template->assign _var('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' );26 $template->assign _var('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php'));24 $template->assign('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) ); 25 $template->assign('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' ); 26 $template->assign('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php')); 27 27 28 28 //$template->assign_var('EVENT_TRACER_F_ACTION', $my_url); -
trunk/plugins/event_tracer/tracer_admin.tpl
r2222 r2254 1 <!-- DEV TAG: not smarty migrated --> 1 {* $Id$ *} 2 2 <div class="titrePage"> 3 3 <h2>Event Tracer</h2> … … 9 9 <b>Note that $conf['show_queries'] must be true.</b> 10 10 </p> 11 <form method="post" action="{ EVENT_TRACER_F_ACTION}" class="general">11 <form method="post" action="{$EVENT_TRACER_F_ACTION}" class="general"> 12 12 <fieldset> 13 13 <legend>Event Tracer</legend> 14 14 15 15 <label>Show event argument 16 <input type="checkbox" name="eventTracer_show_args" { EVENT_TRACER_SHOW_ARGS} />16 <input type="checkbox" name="eventTracer_show_args" {$EVENT_TRACER_SHOW_ARGS} /> 17 17 </label> 18 18 <br/> 19 19 <label>Fill below a list of regular expressions (one per line). 20 20 An event will be logged if its name matches at least one expression in the list. 21 <textarea name="eventTracer_filters" id="eventTracer_filters"rows="10" cols="80">{ EVENT_TRACER_FILTERS}</textarea>21 <textarea name="eventTracer_filters" id="eventTracer_filters"rows="10" cols="80">{$EVENT_TRACER_FILTERS}</textarea> 22 22 </label> 23 23 … … 26 26 <p><input class="submit" type="submit" value="Submit" /></p> 27 27 28 <p><a href="{ U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p>28 <p><a href="{$U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p> 29 29 </form> -
trunk/template/yoga/index.tpl
r2231 r2254 57 57 <select onchange="document.location = this.options[this.selectedIndex].value;"> 58 58 {foreach from=$chronology_views item=view} 59 <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if} }>{$view.CONTENT}</option>59 <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}>{$view.CONTENT}</option> 60 60 {/foreach} 61 61 </select> -
trunk/template/yoga/upgrade.tpl
r2222 r2254 1 <!-- DEV TAG: not smarty migrated --> 1 {* $Id$ *} 2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> … … 5 5 <head> 6 6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 7 <title>PhpWebGallery : Upgrade to { RELEASE}</title>7 <title>PhpWebGallery : Upgrade to {$RELEASE}</title> 8 8 </head> 9 9 10 10 <body> 11 <!-- BEGIN introduction -->11 {if isset($introduction)} 12 12 <h1>Welcome to PhpWebGallery upgrade page.</h1> 13 13 … … 15 15 version of PhpWebGallery to the current version. The upgrade assistant 16 16 thinks you are currently running a 17 <strong>release { introduction.CURRENT_RELEASE}</strong> (or equivalent).</p>17 <strong>release {$introduction.CURRENT_RELEASE}</strong> (or equivalent).</p> 18 18 19 <p><a href="{ introduction.RUN_UPGRADE_URL}">Upgrade from release20 { introduction.CURRENT_RELEASE} to {RELEASE}</a></p>21 <!-- END introduction -->19 <p><a href="{$introduction.RUN_UPGRADE_URL}">Upgrade from release 20 {$introduction.CURRENT_RELEASE} to {$RELEASE}</a></p> 21 {/if} 22 22 23 <!-- BEGIN upgrade -->24 <h1>Upgrade from version { upgrade.VERSION} to {RELEASE}</h1>23 {if isset($upgrade)} 24 <h1>Upgrade from version {$upgrade.VERSION} to {$RELEASE}</h1> 25 25 26 26 <p>Statistics</p> 27 27 <ul> 28 <li>total upgrade time : { upgrade.TOTAL_TIME}</li>29 <li>total SQL time : { upgrade.SQL_TIME}</li>30 <li>SQL queries : { upgrade.NB_QUERIES}</li>28 <li>total upgrade time : {$upgrade.TOTAL_TIME}</li> 29 <li>total SQL time : {$upgrade.SQL_TIME}</li> 30 <li>SQL queries : {$upgrade.NB_QUERIES}</li> 31 31 </ul> 32 32 33 <!-- BEGIN infos -->34 33 <p>Upgrade informations</p> 35 34 36 35 <ul> 37 <!-- BEGIN info -->38 <li>{ upgrade.infos.info.CONTENT}</li>39 <!-- END info -->36 {foreach from=$infos item=info} 37 <li>{$info}</li> 38 {/foreach} 40 39 </ul> 41 <!-- END infos --> 42 <!-- END upgrade -->40 41 {/if} 43 42 </body> 44 43 -
trunk/upgrade.php
r2102 r2254 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 7PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | file : $Id$ … … 148 148 $template = new Template(PHPWG_ROOT_PATH.'template/yoga'); 149 149 $template->set_filenames(array('upgrade'=>'upgrade.tpl')); 150 $template->assign _vars(array('RELEASE'=>PHPWG_VERSION));150 $template->assign('RELEASE', PHPWG_VERSION); 151 151 152 152 // +-----------------------------------------------------------------------+ … … 180 180 $current_release = '1.5.0'; 181 181 } 182 else if ( !in_array(PREFIX_TABLE.'history_summary', $tables))182 else if ( !in_array(PREFIX_TABLE.'history_summary', $tables) ) 183 183 { 184 184 if (!in_array('auto_login_key', $columns_of[PREFIX_TABLE.'user_infos'])) … … 196 196 } 197 197 198 $template->assign _block_vars(198 $template->assign( 199 199 'introduction', 200 200 array( … … 216 216 die('No database upgrade required, do not refresh the page'); 217 217 } 218 218 219 219 $upgrade_file = PHPWG_ROOT_PATH.'install/upgrade_'.$_GET['version'].'.php'; 220 220 if (is_file($upgrade_file)) … … 250 250 // Create empty local files to avoid log errors 251 251 create_empty_local_files(); 252 252 253 253 $page['upgrade_end'] = get_moment(); 254 254 255 $template->assign _block_vars(255 $template->assign( 256 256 'upgrade', 257 257 array( … … 291 291 ); 292 292 293 $template->assign _block_vars('upgrade.infos', array());293 $template->assign('infos', $page['infos']); 294 294 295 foreach ($page['infos'] as $info)296 {297 $template->assign_block_vars(298 'upgrade.infos.info',299 array(300 'CONTENT' => $info,301 )302 );303 }304 305 295 $query = ' 306 296 UPDATE '.USER_CACHE_TABLE.'
Note: See TracChangeset
for help on using the changeset viewer.