Use short tags for php echo
authorMarc MAURICE <marc-bizou@pub.positon.org>
Sat, 17 Aug 2013 19:01:29 +0000 (21:01 +0200)
committerMarc MAURICE <marc-bizou@pub.positon.org>
Sat, 17 Aug 2013 19:01:29 +0000 (21:01 +0200)
plugins/_disabled/balanced/before_content.php
plugins/tar/after_content.php
plugins/viewer/template.php
template.php

index 63cbb11..2abced6 100644 (file)
@@ -1 +1 @@
-<div id="thumbsize" style="visibility:hidden"><?php echo THUMB_SIZE ?></div>
+<div id="thumbsize" style="visibility:hidden"><?= THUMB_SIZE ?></div>
index 8629df6..1bc535a 100644 (file)
@@ -1,5 +1,5 @@
 <?php if ($GLOBALS['imageFiles'] or $GLOBALS['otherFiles']) { ?>
 <div style="text-align: center; font-size: 0.25cm;">
 <?php if ($GLOBALS['imageFiles'] or $GLOBALS['otherFiles']) { ?>
 <div style="text-align: center; font-size: 0.25cm;">
-<a href="<?php echo $GLOBALS['rootUrl']."plugins/tar/tar.php".$GLOBALS['simplePath'] ?>">Download all files in this directory</a>
+<a href="<?= $GLOBALS['rootUrl']."plugins/tar/tar.php".$GLOBALS['simplePath'] ?>">Download all files in this directory</a>
 </div>
 <?php } ?>
 </div>
 <?php } ?>
index 7da8acd..fe75c40 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 <head>
 <html>
 <head>
-<title> <?php echo IMAGES_DIR.$simpleImagePath ?> </title>
+<title> <?= IMAGES_DIR.$simpleImagePath ?> </title>
 <style type="text/css">
 html, body {
 height: 100%;
 <style type="text/css">
 html, body {
 height: 100%;
@@ -45,28 +45,28 @@ img {
 </style>
 
 <?php if ($nextImageUrl !== '' and $firefox) { ?>
 </style>
 
 <?php if ($nextImageUrl !== '' and $firefox) { ?>
-<link rel="prefetch" href="<?php echo $nextImageUrl ?>" />
-<link rel="prefetch" href="<?php echo $nextPageUrl ?>" />
+<link rel="prefetch" href="<?= $nextImageUrl ?>" />
+<link rel="prefetch" href="<?= $nextPageUrl ?>" />
 <?php } ?>
 
 </head>
 <body>
 
 <?php } ?>
 
 </head>
 <body>
 
-<a href="<?php echo $imageUrl ?>"><img src="<?php echo $imageUrl ?>" id="theimage" /></a>
+<a href="<?= $imageUrl ?>"><img src="<?= $imageUrl ?>" id="theimage" /></a>
 
 <div id="up">
 
 <div id="up">
-<a href="<?php echo $directoryUrl ?>" title="Back to directory">^</a>
+<a href="<?= $directoryUrl ?>" title="Back to directory">^</a>
 </div>
 
 <?php if ($nextPageUrl !== '') { ?>
 <div id="next">
 </div>
 
 <?php if ($nextPageUrl !== '') { ?>
 <div id="next">
-<a href="<?php echo $nextPageUrl ?>" title="Next image">&gt;</a>
+<a href="<?= $nextPageUrl ?>" title="Next image">&gt;</a>
 </div>
 <?php } ?>
 
 <?php if ($prevPageUrl !== '') { ?>
 <div id="previous">
 </div>
 <?php } ?>
 
 <?php if ($prevPageUrl !== '') { ?>
 <div id="previous">
-<a href="<?php echo $prevPageUrl ?>" title="Previous image">&lt;</a>
+<a href="<?= $prevPageUrl ?>" title="Previous image">&lt;</a>
 </div>
 <?php } ?>
 
 </div>
 <?php } ?>
 
@@ -75,9 +75,9 @@ img {
 <?php if ($nextImageUrl !== '' and ! $firefox) { ?>
 window.onload = function() { // for browsers not supporting link rel=prefetch
        var im = new Image();
 <?php if ($nextImageUrl !== '' and ! $firefox) { ?>
 window.onload = function() { // for browsers not supporting link rel=prefetch
        var im = new Image();
-       im.src = '<?php echo $nextImageUrl ?>';
+       im.src = '<?= $nextImageUrl ?>';
        var req = new XMLHttpRequest();
        var req = new XMLHttpRequest();
-       req.open('GET', '<?php echo $nextPageUrl ?>', false);
+       req.open('GET', '<?= $nextPageUrl ?>', false);
        req.send(null);
 };
 <?php } ?>
        req.send(null);
 };
 <?php } ?>
@@ -87,17 +87,17 @@ function keyup(e)
 {
        switch (e.keyCode) {
                case 37: // left
 {
        switch (e.keyCode) {
                case 37: // left
-                       window.location = "<?php echo $prevPageUrl ?>";
+                       window.location = "<?= $prevPageUrl ?>";
                break;
                case 39: // right
                case 32: // space
                break;
                case 39: // right
                case 32: // space
-                       window.location = "<?php echo $nextPageUrl ?>";
+                       window.location = "<?= $nextPageUrl ?>";
                break;
                case 38: // up  (down is 40)
                break;
                case 38: // up  (down is 40)
-                       window.location = "<?php echo $directoryUrl ?>";
+                       window.location = "<?= $directoryUrl ?>";
                break;
                case 13: // enter
                break;
                case 13: // enter
-                       window.location = "<?php echo $imageUrl ?>";
+                       window.location = "<?= $imageUrl ?>";
                break;
        }
 }
                break;
        }
 }
index 1508f8b..5a4487e 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
 <!DOCTYPE html>
 <html>
 <head>
-<title> <?php echo $realDir ?> </title>
+<title> <?= $realDir ?> </title>
 <style type="text/css">
 body {
        margin-top: 0;
 <style type="text/css">
 body {
        margin-top: 0;
@@ -21,11 +21,11 @@ a {
        vertical-align: middle;
 }
 .image, .image_nopreview {
        vertical-align: middle;
 }
 .image, .image_nopreview {
-       width: <?php echo THUMB_SIZE ?>px;
+       width: <?= THUMB_SIZE ?>px;
        text-align: center;
 }
 .image, .foldername {
        text-align: center;
 }
 .image, .foldername {
-       height: <?php echo THUMB_SIZE ?>px;
+       height: <?= THUMB_SIZE ?>px;
 }
 .foldername, .foldername_nopreview {
        padding-left: 1ex;
 }
 .foldername, .foldername_nopreview {
        padding-left: 1ex;
@@ -42,13 +42,13 @@ a {
 }
 </style>
 <?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?>
 }
 </style>
 <?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?>
-       <link rel="stylesheet" type="text/css" href="<?php echo $rootUrl."plugins/$p/style.css" ?>" />
+       <link rel="stylesheet" type="text/css" href="<?= $rootUrl."plugins/$p/style.css" ?>" />
 <?php } ?>
 <?php plugins_include("head.php") ?>
 </head>
 <body>
 
 <?php } ?>
 <?php plugins_include("head.php") ?>
 </head>
 <body>
 
-<div id="parentfolder"><a href="<?php echo $parentLink ?>">
+<div id="parentfolder"><a href="<?= $parentLink ?>">
 <?php if ($parentLink !== '') { ?>
 ^
 <?php } ?>
 <?php if ($parentLink !== '') { ?>
 ^
 <?php } ?>
@@ -61,10 +61,10 @@ a {
        <div class="folder">
        <?php if ($preview === "") { ?>
                <div class="square"><div class="image_nopreview"> - </div></div>
        <div class="folder">
        <?php if ($preview === "") { ?>
                <div class="square"><div class="image_nopreview"> - </div></div>
-               <div class="square"><div class="foldername_nopreview"> <a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> </div></div>
+               <div class="square"><div class="foldername_nopreview"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
        <?php } else { ?>
        <?php } else { ?>
-               <div class="square"><div class="image"> <a href="<?php echo $folder["link"] ?>"><img src="<?php echo $rootUrl.$preview ?>" /></a> </div></div>
-               <div class="square"><div class="foldername"> <a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> </div></div>
+               <div class="square"><div class="image"> <a href="<?= $folder["link"] ?>"><img src="<?= $rootUrl.$preview ?>" /></a> </div></div>
+               <div class="square"><div class="foldername"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
                <?php if (isset($generating)) { ob_flush(); flush(); } ?>
        <?php } ?>
        </div>
                <?php if (isset($generating)) { ob_flush(); flush(); } ?>
        <?php } ?>
        </div>
@@ -73,14 +73,14 @@ a {
 
 <div id="images">
 <?php foreach ($imageFiles as $file) { ?>
 
 <div id="images">
 <?php foreach ($imageFiles as $file) { ?>
-       <div class="square"><div class="image"><a href="<?php echo $file["link"] ?>"><img src="<?php echo $rootUrl.getPreview($file["file"]) ?>" alt="<?php echo $file["name"] ?>" /></a></div></div>
+       <div class="square"><div class="image"><a href="<?= $file["link"] ?>"><img src="<?= $rootUrl.getPreview($file["file"]) ?>" alt="<?= $file["name"] ?>" /></a></div></div>
        <?php if (isset($generating)) { ob_flush(); flush(); } ?>
 <?php } ?>
 </div>
 
 <div id="miscfiles">
 <?php foreach ($otherFiles as $file) { ?>
        <?php if (isset($generating)) { ob_flush(); flush(); } ?>
 <?php } ?>
 </div>
 
 <div id="miscfiles">
 <?php foreach ($otherFiles as $file) { ?>
-       <div class="miscfile"><a href="<?php echo $file["link"] ?>"><?php echo $file["name"] ?></a></div>
+       <div class="miscfile"><a href="<?= $file["link"] ?>"><?= $file["name"] ?></a></div>
 <?php } ?>
 </div>
 
 <?php } ?>
 </div>