diff --git a/admin/templates/index.php b/admin/templates/index.php
index ad60ad08012ef96cd40a8cfc377d1903ab11b639..2ca7b0b2d3b39bf6b669c230283624bad23b2046 100644
--- a/admin/templates/index.php
+++ b/admin/templates/index.php
@@ -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>
diff --git a/admin/templates/plugins.php b/admin/templates/plugins.php
index ef9ef4fa4e957f499fa3bfe78e49be5edaf8516e..8f5e87d3e809c78361775549aea2a3612f2e27cd 100644
--- a/admin/templates/plugins.php
+++ b/admin/templates/plugins.php
@@ -18,10 +18,10 @@
 	</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>
diff --git a/admin/templates/users.php b/admin/templates/users.php
index 6ad10cafc46d5da67690357893de5f0291554b3f..7aa93baf496f1a93b9dccdbd6ff7fcd0bc0580b3 100644
--- a/admin/templates/users.php
+++ b/admin/templates/users.php
@@ -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; ?>
diff --git a/files/templates/index.php b/files/templates/index.php
index fe7ec903c2a3b55eb214a333a32e7e2a1564f6f6..695a3c45a9da059b4fbb9182686c3ec7930a5688 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -12,10 +12,10 @@
 </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">
@@ -29,15 +29,15 @@
 		</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>
 
diff --git a/log/templates/index.php b/log/templates/index.php
index be91fa00da27c264d73df256cb10c1c14d71dee7..02fea0f87b01b6eda1346c1425490059506dd791 100644
--- a/log/templates/index.php
+++ b/log/templates/index.php
@@ -36,12 +36,12 @@
 		</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>
 
diff --git a/templates/layout.admin.php b/templates/layout.admin.php
index b4fcc9158829dc8bde8a5ed7d970b9dc93437da1..ebf0a1f048a0bba6d54a85c84f16d76ba0537d8c 100644
--- a/templates/layout.admin.php
+++ b/templates/layout.admin.php
@@ -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>
@@ -34,14 +34,14 @@
 		<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>
diff --git a/templates/layout.guest.php b/templates/layout.guest.php
index a5ebf7a76a86c7dcc2807dabacfc8f3c35e99874..a163a97103f2cef408e4902059823e213c01c0a3 100644
--- a/templates/layout.guest.php
+++ b/templates/layout.guest.php
@@ -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>.
diff --git a/templates/layout.user.php b/templates/layout.user.php
index 0643c99e9332f441bc3a962090d01a5af8552463..20fb3f88cd6d020d3a87fdec6ce21a5dbc354ec8 100644
--- a/templates/layout.user.php
+++ b/templates/layout.user.php
@@ -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>
@@ -34,14 +34,14 @@
 		<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>
diff --git a/templates/login.php b/templates/login.php
index 60b8dc0253ffd5185ce4d00c47c96566c1738656..a165fc7246eabbc440147d68c74ab11e43737f4e 100644
--- a/templates/login.php
+++ b/templates/login.php
@@ -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>