Changeset 4208


Ignore:
Timestamp:
11/05/09 21:13:41 (10 years ago)
Author:
rvelices
Message:

admin multi view plugin : new option "do not save page visits to history table"

Location:
trunk/plugins/admin_multi_view
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/admin_multi_view/controller.php

    r3282 r4208  
    1212  pwg_unset_session_var( 'multiview_debug_l10n' ); 
    1313  pwg_unset_session_var( 'multiview_debug_template' ); 
     14  pwg_unset_session_var( 'multiview_no_history' ); 
    1415?> 
    1516 
     
    8283  else 
    8384    pwg_unset_session_var( 'multiview_debug_template' ); 
     85  $refresh_main = true; 
     86} 
     87 
     88if ( isset($_GET['no_history']) ) 
     89{ 
     90  if ( $_GET['no_history']>0 ) 
     91    pwg_set_session_var( 'multiview_no_history', 1 ); 
     92  else 
     93    pwg_unset_session_var( 'multiview_no_history' ); 
    8494  $refresh_main = true; 
    8595} 
     
    182192} 
    183193 
     194// +-----------------------------------------------------------------------+ 
     195// | no history                                                            | 
     196$no_history_html=''; 
     197if ( !pwg_get_session_var( 'multiview_no_history', 0 ) ) 
     198  $no_history_html.='<a href="'.$my_url.'?no_history=1">Don\'t save to visit history</a>'; 
     199else 
     200  $no_history_html.='<a href="'.$my_url.'?no_history=0">Save to visit history</a>'; 
     201 
    184202?> 
    185203<html> 
     
    212230<tr><td>Lang</td><td><?php echo $lang_html; ?></td></tr> 
    213231</table> 
    214 <?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html) ); ?> 
     232<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $no_history_html) ); ?> 
    215233 
    216234<script type="text/javascript"> 
  • trunk/plugins/admin_multi_view/is_admin.inc.php

    r3282 r4208  
    2626  if (pwg_get_session_var( 'multiview_debug_template', 0 )) 
    2727    $conf['debug_template'] = true; 
     28  if (pwg_get_session_var( 'multiview_no_history', 0 )) 
     29  { 
     30    add_event_handler( 'pwg_log_allowed', create_function( '', 'return false;' ) ); 
     31  } 
    2832} 
    2933 
Note: See TracChangeset for help on using the changeset viewer.