mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
combined script now really merges files
added option $conf['template_combine_files'] by default true to enable/disable file combining git-svn-id: http://piwigo.org/svn/trunk@8012 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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_template_combine_files' );
|
||||
pwg_unset_session_var( 'multiview_no_history' );
|
||||
?>
|
||||
|
||||
@@ -85,6 +86,16 @@ if ( isset($_GET['debug_template']) )
|
||||
$refresh_main = true;
|
||||
}
|
||||
|
||||
if ( isset($_GET['template_combine_files']) )
|
||||
{
|
||||
if ( $_GET['template_combine_files']==0 )
|
||||
pwg_set_session_var( 'multiview_template_combine_files', 0 );
|
||||
else
|
||||
pwg_unset_session_var( 'multiview_template_combine_files' );
|
||||
$refresh_main = true;
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_GET['no_history']) )
|
||||
{
|
||||
if ( $_GET['no_history']>0 )
|
||||
@@ -193,6 +204,17 @@ if (!$conf['debug_template'])
|
||||
$debug_template_html.='<a href="'.$my_url.'?debug_template=0">Revert debug template</a>';
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template combine files |
|
||||
$template_combine_files_html='';
|
||||
if ($conf['template_combine_files'])
|
||||
{
|
||||
if ( pwg_get_session_var( 'multiview_template_combine_files', 1 ) )
|
||||
$template_combine_files_html.='<a href="'.$my_url.'?template_combine_files=0">Don\'t combine js&css</a>';
|
||||
else
|
||||
$template_combine_files_html.='<a href="'.$my_url.'?template_combine_files=1">Combine js&css</a>';
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | no history |
|
||||
$no_history_html='';
|
||||
@@ -224,7 +246,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, $no_history_html) ); ?>
|
||||
<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html, $template_combine_files_html, $no_history_html) ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user