merge -r4208 fro; trunk
admin multi view plugin : new option "do not save page visits to history table" git-svn-id: http://piwigo.org/svn/branches/2.0@4209 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
ad1c1c1f5d
commit
0257c3b2f1
2 changed files with 23 additions and 1 deletions
|
@ -11,6 +11,7 @@ if (!is_admin() or !function_exists('multiview_user_init') )
|
|||
pwg_unset_session_var( 'multiview_show_queries' );
|
||||
pwg_unset_session_var( 'multiview_debug_l10n' );
|
||||
pwg_unset_session_var( 'multiview_debug_template' );
|
||||
pwg_unset_session_var( 'multiview_no_history' );
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -84,6 +85,15 @@ if ( isset($_GET['debug_template']) )
|
|||
$refresh_main = true;
|
||||
}
|
||||
|
||||
if ( isset($_GET['no_history']) )
|
||||
{
|
||||
if ( $_GET['no_history']>0 )
|
||||
pwg_set_session_var( 'multiview_no_history', 1 );
|
||||
else
|
||||
pwg_unset_session_var( 'multiview_no_history' );
|
||||
$refresh_main = true;
|
||||
}
|
||||
|
||||
$my_url = get_root_url().'plugins/'.basename(dirname(__FILE__)).'/'.basename(__FILE__);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
@ -181,6 +191,14 @@ if (!$conf['debug_template'])
|
|||
$debug_template_html.='<a href="'.$my_url.'?debug_template=0">Revert debug template</a>';
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | no history |
|
||||
$no_history_html='';
|
||||
if ( !pwg_get_session_var( 'multiview_no_history', 0 ) )
|
||||
$no_history_html.='<a href="'.$my_url.'?no_history=1">Don\'t save to visit history</a>';
|
||||
else
|
||||
$no_history_html.='<a href="'.$my_url.'?no_history=0">Save to visit history</a>';
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -211,7 +229,7 @@ if (window.opener==null) {
|
|||
|
||||
<tr><td>Lang</td><td><?php echo $lang_html; ?></td></tr>
|
||||
</table>
|
||||
<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html) ); ?>
|
||||
<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $no_history_html) ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<?php
|
||||
|
|
|
@ -25,6 +25,10 @@ if (! defined('MULTIVIEW_CONTROLLER') )
|
|||
$conf['debug_l10n'] = true;
|
||||
if (pwg_get_session_var( 'multiview_debug_template', 0 ))
|
||||
$conf['debug_template'] = true;
|
||||
if (pwg_get_session_var( 'multiview_no_history', 0 ))
|
||||
{
|
||||
add_event_handler( 'pwg_log_allowed', create_function( '', 'return false;' ) );
|
||||
}
|
||||
}
|
||||
|
||||
add_event_handler('loc_end_page_header', 'multiview_loc_end_page_header');
|
||||
|
|
Loading…
Reference in a new issue