braces and whitspace

pull/1901/head
Isaac Connor 2017-05-31 11:16:55 -04:00
parent 53a7b2e72c
commit ece10d6278
1 changed files with 27 additions and 32 deletions

View File

@ -21,24 +21,23 @@
// Only load new js & css in these views
$new_views = array('login');
function xhtmlHeaders( $file, $title )
{
global $css;
global $skin;
$skinCssFile = getSkinFile( 'css/'.$css.'/skin.css' );
$skinCssPhpFile = getSkinFile( 'css/'.$css.'/skin.css.php' );
function xhtmlHeaders( $file, $title ) {
global $css;
global $skin;
$skinCssFile = getSkinFile( 'css/'.$css.'/skin.css' );
$skinCssPhpFile = getSkinFile( 'css/'.$css.'/skin.css.php' );
$skinJsFile = getSkinFile( 'js/skin.js' );
$skinJsPhpFile = getSkinFile( 'js/skin.js.php' );
$cssJsFile = getSkinFile( 'js/'.$css.'.js' );
$skinJsFile = getSkinFile( 'js/skin.js' );
$skinJsPhpFile = getSkinFile( 'js/skin.js.php' );
$cssJsFile = getSkinFile( 'js/'.$css.'.js' );
$basename = basename( $file, '.php' );
$viewCssFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css' );
$viewCssPhpFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css.php' );
$viewJsFile = getSkinFile( 'views/js/'.$basename.'.js' );
$viewJsPhpFile = getSkinFile( 'views/js/'.$basename.'.js.php' );
$basename = basename( $file, '.php' );
$viewCssFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css' );
$viewCssPhpFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css.php' );
$viewJsFile = getSkinFile( 'views/js/'.$basename.'.js' );
$viewJsPhpFile = getSkinFile( 'views/js/'.$basename.'.js.php' );
extract( $GLOBALS, EXTR_OVERWRITE );
extract( $GLOBALS, EXTR_OVERWRITE );
?>
<!DOCTYPE html>
<html lang="en">
@ -56,19 +55,17 @@ function xhtmlHeaders( $file, $title )
<?php } ?>
<link rel="stylesheet" href="<?php echo $skinCssFile ?>" type="text/css" media="screen"/>
<?php
if ( $viewCssFile )
{
if ( $viewCssFile ) {
?>
<link rel="stylesheet" href="<?php echo $viewCssFile ?>" type="text/css" media="screen"/>
<?php
}
if ( $viewCssPhpFile )
{
}
if ( $viewCssPhpFile ) {
?>
<style type="text/css">
/*<![CDATA[*/
<?php
require_once( $viewCssPhpFile );
require_once( $viewCssPhpFile );
?>
/*]]>*/
</style>
@ -88,9 +85,9 @@ function xhtmlHeaders( $file, $title )
<script src="skins/<?php echo $skin ?>/js/video.js"></script>
<script src="./js/videojs.zoomrotate.js"></script>
<script src="skins/<?php echo $skin ?>/js/moment.min.js"></script>
<?php }
if ( $skinJsPhpFile )
{
<?php
}
if ( $skinJsPhpFile ) {
?>
<script type="text/javascript">
//<![CDATA[
@ -102,33 +99,31 @@ function xhtmlHeaders( $file, $title )
//]]>
</script>
<?php
}
if ( $viewJsPhpFile )
{
}
if ( $viewJsPhpFile ) {
?>
<script type="text/javascript">
//<![CDATA[
<!--
<?php
require_once( $viewJsPhpFile );
require_once( $viewJsPhpFile );
?>
//-->
//]]>
</script>
<?php
}
}
if ( $cssJsFile ) {
?>
<script type="text/javascript" src="<?php echo $cssJsFile ?>"></script>
<?php } ?>
<script type="text/javascript" src="<?php echo $skinJsFile ?>"></script>
<?php
if ( $viewJsFile )
{
if ( $viewJsFile ) {
?>
<script type="text/javascript" src="<?php echo $viewJsFile ?>"></script>
<?php
}
}
?>
</head>
<?php