]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed PHP syntax in template files.
authorFrançois KUBLER <francois@kubler.org>
Wed, 9 Mar 2011 20:57:00 +0000 (21:57 +0100)
committerFrançois KUBLER <francois@kubler.org>
Wed, 9 Mar 2011 20:57:00 +0000 (21:57 +0100)
  * Full PHP tags
  * Alternative syntax for control structures
  * Semi-colon at the end of instructions

admin/templates/index.php
admin/templates/plugins.php
admin/templates/users.php
files/templates/index.php
log/templates/index.php
templates/layout.admin.php
templates/layout.guest.php
templates/layout.user.php
templates/login.php

index ad60ad08012ef96cd40a8cfc377d1903ab11b639..2ca7b0b2d3b39bf6b669c230283624bad23b2046 100644 (file)
@@ -7,6 +7,6 @@
 
 <ul>
        <?php foreach($_["adminpages"] as $i): ?>
-               <li><a href="<?php echo link_to($i["app"], $i["file"]) ?>"><?php echo $i["name"] ?></a></li>
+               <li><a href="<?php echo link_to($i["app"], $i["file"]); ?>"><?php echo $i["name"]; ?></a></li>
        <?php endforeach; ?>
 </ul>
index ef9ef4fa4e957f499fa3bfe78e49be5edaf8516e..8f5e87d3e809c78361775549aea2a3612f2e27cd 100644 (file)
        </thead>
        <tbody>
                <?php foreach($_["plugins"] as $plugin): ?>
-                       <td><?php echo $plugin["info"]["id"] ?></td>
-                       <td><?php echo $plugin["info"]["version"] ?></td>
-                       <td><?php echo $plugin["info"]["name"] ?></td>
-                       <td><?php echo $plugin["info"]["author"] ?></td>
+                       <td><?php echo $plugin["info"]["id"]; ?></td>
+                       <td><?php echo $plugin["info"]["version"]; ?></td>
+                       <td><?php echo $plugin["info"]["name"]; ?></td>
+                       <td><?php echo $plugin["info"]["author"]; ?></td>
                        <td>enable</td>
                <?php endforeach; ?>
        </tbody>
index 6ad10cafc46d5da67690357893de5f0291554b3f..7aa93baf496f1a93b9dccdbd6ff7fcd0bc0580b3 100644 (file)
@@ -18,8 +18,8 @@
                <?php foreach($_["users"] as $user): ?>
                        <tr>
                                <td><input type="checkbox"></td>
-                               <td><?php echo $user["name"] ?></td>
-                               <td><?php echo $user["groups"] ?></td>
+                               <td><?php echo $user["name"]; ?></td>
+                               <td><?php echo $user["groups"]; ?></td>
                        </tr>
                <?php endforeach; ?>
        </tbody>
@@ -36,7 +36,7 @@
        <tbody>
                <?php foreach($_["groups"] as $group): ?>
                        <tr>
-                               <td><?php echo $group["name"] ?></td>
+                               <td><?php echo $group["name"]; ?></td>
                                <td>remove</td>
                        </tr>
                <?php endforeach; ?>
index fe7ec903c2a3b55eb214a333a32e7e2a1564f6f6..695a3c45a9da059b4fbb9182686c3ec7930a5688 100644 (file)
 </div>
 
 <p class="nav">
-       <a href="<? echo link_to( "files", "index.php?dir=/" ) ?>"><img src="<? echo image_path( "", "actions/go-home.png" ) ?>" alt="Root" /></a>
-       <? foreach( $_["breadcrumb"] as $crumb ){ ?>
-               <a href="<? echo link_to( "files", "index.php?dir=".$crumb["dir"] ) ?>"><? echo $crumb["name"] ?></a>
-       <? } ?>
+       <a href="<?php echo link_to("files", "index.php?dir=/"); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a>
+       <?php foreach($_["breadcrumb"] as $crumb): ?>
+               <a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo $crumb["name"]; ?></a>
+       <?php endforeach; ?>
 </p>
 
 <table cellspacing="0">
                </tr>
        </thead>
        <tbody>
-               <? foreach( $_["files"] as $file ){ ?>
+               <?php foreach($_["files"] as $file): ?>
                        <tr>
                                <td class="selection"><input type="checkbox" /></td>
-                               <td class="filename"><a style="background-image:url(<? if( $file["type"] == "dir" ) echo mimetype_icon( "dir" ); else echo mimetype_icon( $file["mime"] )  ?>)" href="<? if( $file["type"] == "dir" ) echo link_to( "files", "index.php?dir=".$file["directory"]."/".$file["name"] ); else echo link_to( "files", "download.php?file=".$file["directory"]."/".$file["name"] )  ?>" title=""><? echo $file["name"] ?></a></td>
-                               <td class="filesize"><? if( $file["type"] != "dir" ) echo human_file_size( $file["size"] ) ?></td>
-                               <td class="date"><? if( $file["type"] != "dir" ) echo $file["date"] ?></td>
+                               <td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo $file["name"]; ?></a></td>
+                               <td class="filesize"><?php if($file["type"] != "dir" ) echo human_file_size($file["size"]); ?></td>
+                               <td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td>
                                <td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
                        </tr>
-               <? } ?>
+               <?php endforeach; ?>
        </tbody>
 </table>
 
index be91fa00da27c264d73df256cb10c1c14d71dee7..02fea0f87b01b6eda1346c1425490059506dd791 100644 (file)
                </tr>
        </thead>
        <tbody>
-               <? foreach( $_["logs"] as $entry ){ ?>
+               <?php foreach($_["logs"] as $entry): ?>
                        <tr>
-                               <td class="login"><em><? echo $entry["user"] ?></em> <? echo $entry["message"] ?></td>
-                               <td class="date"><? echo $entry["date"] ?></td>
+                               <td class="login"><em><?php echo $entry["user"]; ?></em> <?php echo $entry["message"]; ?></td>
+                               <td class="date"><?php echo $entry["date"]; ?></td>
                        </tr>
-               <? } ?>
+               <?php endforeach; ?>
        </tbody>
 </table>
 
index b4fcc9158829dc8bde8a5ed7d970b9dc93437da1..ebf0a1f048a0bba6d54a85c84f16d76ba0537d8c 100644 (file)
@@ -9,24 +9,24 @@
                <title>ownCloud</title>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <link rel="shortcut icon" href="favicon.ico" />
-               <? foreach( $_["cssfiles"] as $cssfile ){ ?>
-                       <link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" />
-               <? } ?>
-               <? foreach( $_["jsfiles"] as $jsfile ){ ?>
-                       <script type="text/javascript" src="<? echo $jsfile ?>"></script>
-               <? } ?>
+               <?php foreach($_["cssfiles"] as $cssfile): ?>
+                       <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+               <?php endforeach; ?>
+               <?php foreach($_["jsfiles"] as $jsfile): ?>
+                       <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+               <?php endforeach; ?>
        </head>
 
        <body>
                <div id="header">
-                       <a href="<? echo link_to( "", "index.php" )?>" title="" id="owncloud"><img src="<? echo image_path( "", "owncloud-logo-small-white.png" ) ?>" alt="ownCloud" /></a>
+                       <a href="<?php echo link_to("", "index.php"); ?>" title="" id="owncloud"><img src="<?php echo image_path("", "owncloud-logo-small-white.png"); ?>" alt="ownCloud" /></a>
 
                        <div id="user">
                                <a id="user_menu_link" href="" title="">Username</a>
                                <ul id="user_menu">
-                                       <? foreach( $_["personalmenu"] as $entry ){ ?>
-                                               <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
-                                       <? } ?>
+                                       <?php foreach($_["personalmenu"] as $entry ): ?>
+                                               <li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
+                                       <?php endforeach; ?>
                                </ul>
                        </div>
                </div>
                <div id="main">
                        <div id="plugins">
                                <ul>
-                                       <? foreach( $_["navigation"] as $entry ){ ?>
-                                               <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
-                                       <? } ?>
+                                       <?php foreach($_["navigation"] as $entry): ?>
+                                               <li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
+                                       <?php endforeach; ?>
                                </ul>
                        </div>
 
                        <div id="content">
-                               <? echo $_["content"] ?>
+                               <?php echo $_["content"]; ?>
                        </div>
                </div>
        </body>
index a5ebf7a76a86c7dcc2807dabacfc8f3c35e99874..a163a97103f2cef408e4902059823e213c01c0a3 100644 (file)
@@ -9,16 +9,16 @@
                <title>ownCloud</title>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <link rel="shortcut icon" href="favicon.ico" />
-               <? foreach( $_["cssfiles"] as $cssfile ){ ?>
-                       <link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" />
-               <? } ?>
-               <? foreach( $_["jsfiles"] as $jsfile ){ ?>
-                       <script type="text/javascript" src="<? echo $jsfile ?>"></script>
-               <? } ?>
+               <?php foreach($_["cssfiles"] as $cssfile): ?>
+                       <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+               <?php endforeach; ?>
+               <?php foreach($_["jsfiles"] as $jsfile): ?>
+                       <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+               <?php endforeach; ?>
        </head>
 
        <body class="login">
-               <? echo $_["content"] ?>
+               <?php echo $_["content"]; ?>
                <p class="info">
                        ownCloud is an open personal cloud which runs on your personal server.<br />
                        To learn more, please visit <a href="http://www.owncloud.org/">owncloud.org</a>.
index 0643c99e9332f441bc3a962090d01a5af8552463..20fb3f88cd6d020d3a87fdec6ce21a5dbc354ec8 100644 (file)
@@ -9,24 +9,24 @@
                <title>ownCloud</title>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <link rel="shortcut icon" href="favicon.ico" />
-               <? foreach( $_["cssfiles"] as $cssfile ){ ?>
-                       <link rel="stylesheet" href="<? echo $cssfile ?>" type="text/css" media="screen" />
-               <? } ?>
-               <? foreach( $_["jsfiles"] as $jsfile ){ ?>
-                       <script type="text/javascript" src="<? echo $jsfile ?>"></script>
-               <? } ?>
+               <?php foreach($_["cssfiles"] as $cssfile): ?>
+                       <link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
+               <?php endforeach; ?>
+               <?php foreach($_["jsfiles"] as $jsfile): ?>
+                       <script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
+               <?php endforeach; ?>
        </head>
 
        <body>
                <div id="header">
-                       <a href="<? echo link_to( "", "index.php" )?>" title="" id="owncloud"><img src="<? echo image_path( "", "owncloud-logo-small-white.png" ) ?>" alt="ownCloud" /></a>
+                       <a href="<?php echo link_to("", "index.php"); ?>" title="" id="owncloud"><img src="<?php echo image_path("", "owncloud-logo-small-white.png"); ?>" alt="ownCloud" /></a>
 
                        <div id="user">
                                <a id="user_menu_link" href="" title="">Username</a>
                                <ul id="user_menu">
-                                       <? foreach( $_["personalmenu"] as $entry ){ ?>
-                                               <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
-                                       <? } ?>
+                                       <?php foreach($_["personalmenu"] as $entry): ?>
+                                               <li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
+                                       <?php endforeach; ?>
                                </ul>
                        </div>
                </div>
                <div id="main">
                        <div id="plugins">
                                <ul>
-                                       <? foreach( $_["navigation"] as $entry ){ ?>
-                                               <li><a href="<? echo link_to( $entry["app"], $entry["file"] )?>" title=""><? echo $entry["name"] ?></a></li>
-                                       <? } ?>
+                                       <?php foreach($_["navigation"] as $entry): ?>
+                                               <li><a href="<?php echo link_to($entry["app"], $entry["file"]); ?>" title=""><?php echo $entry["name"]; ?></a></li>
+                                       <?php endforeach; ?>
                                </ul>
                        </div>
 
                        <div id="content">
-                               <? echo $_["content"] ?>
+                               <?php echo $_["content"]; ?>
                        </div>
                </div>
        </body>
index 60b8dc0253ffd5185ce4d00c47c96566c1738656..a165fc7246eabbc440147d68c74ab11e43737f4e 100644 (file)
@@ -4,13 +4,13 @@
  */
 ?>
 <div id="login">
-       <img src="<? echo image_path( "", "owncloud-logo-medium-white.png" ) ?>" alt="ownCloud" />
+       <img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
        <form action="index.php" method="post">
                <!-- <h1>Sign in :</h1> -->
                <fieldset>
-                       <? if( $_["error"] ){ ?>
+                       <?php if($_["error"]): ?>
                                Login failed!
-                       <? } ?>
+                       <?php endif; ?>
                        <p><input type="text" name="user" value="" /></p>
                        <p><input type="password" name="password" /></p>
                        <p><input type="submit" value="Sign in" /></p>