Updates for PHP > 5.3.0
diff --git a/addons/babel.eclipse.org/backend_functions.php b/addons/babel.eclipse.org/backend_functions.php
index f1a7efb..6ccb9bb 100644
--- a/addons/babel.eclipse.org/backend_functions.php
+++ b/addons/babel.eclipse.org/backend_functions.php
@@ -152,4 +152,6 @@
 global $register_function_backend;
 $register_function_backend = '__register_backend';
 
-?>
+date_default_timezone_set('America/Montreal');
+
+?>
\ No newline at end of file
diff --git a/addons/babel.eclipse.org/html/head.php b/addons/babel.eclipse.org/html/head.php
index 5c4c11a..2c49c4b 100755
--- a/addons/babel.eclipse.org/html/head.php
+++ b/addons/babel.eclipse.org/html/head.php
@@ -1,6 +1,6 @@
 <?php
 /*******************************************************************************
- * Copyright (c) 2007 Eclipse Foundation and others.
+ * Copyright (c) 2007-2012 Eclipse Foundation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,100 +11,9 @@
  *    Eclipse Foundation
 *******************************************************************************/
 
-// this is actually a paste from the phoenix header.php:
-/* 
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><title><?= $pageTitle ?></title><meta name="author" content="<?= $pageAuthor ?>" />
-<meta name="keywords" content="<?= $pageKeywords ?>" /><link rel="stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/small.css" title="small" /><link rel="alternate stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/large.css" title="large" /><link rel="stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/visual.css" media="screen" /><link rel="stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/layout.css" media="screen" />
-<!--[if IE]>    <link rel="stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/ie_style.css" media="screen"/> <![endif]-->
-<link rel="stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/print.css" media="print" />
-<link rel="stylesheet" type="text/css" href="/eclipse.org-common/themes/Phoenix/css/header.css" media="screen" />
-<script type="text/javascript" src="/eclipse.org-common/themes/Phoenix/styleswitcher.js"></script>
-<?php if( isset($extraHtmlHeaders) ) echo $extraHtmlHeaders; ?></head>
-<body>
-<div id="header">
-    <div id="header-graphic" class="eclipse-main">
-        <a href="/"><img src="/eclipse.org-common/themes/Phoenix/images/eclipse_home_header.jpg" alt="" /></a><h1>Eclipse</h1>  
-    </div>
-    <div id="header-global-holder" class="eclipse-main-global">
-        <div id="header-global-links"><ul>
-<li><a href="/org/foundation/contact.php" class="first_one">Contact</a></li><li><a href="/legal/">Legal</a></li>
-            </ul>
-        </div>
-        <div id="header-icons">
-<a href="http://live.eclipse.org"><img src="/eclipse.org-common/themes/Phoenix/images/Icon_Live.png" width="28" height="28" alt="Eclipse Live" title="Eclipse Live" /></a>
-<a href="http://www.eclipseplugincentral.com"><img src="/eclipse.org-common/themes/Phoenix/images/Icon_plugin.png" width="28" height="28" alt="Eclipse Plugin Central" title="Eclipse Plugin Central" /></a>
-<a href="http://www.planeteclipse.org"><img src="/eclipse.org-common/themes/Phoenix/images/Icon_planet.png" width="28" height="28" alt="Planet Eclipse" title="Planet Eclipse" /></a>
-        </div>
-    </div></div>
-    
-<?php // Now pasting menu.php, copied from phoenix as well. ?>
-            <div id="header-menu"><div id="header-nav">
-        <ul>
-<?php
-    global $App;
-    $www_prefix = "";
-    $pageRSS = "";
-    
-    if(isset($App)) {
-        $www_prefix = $App->getWWWPrefix();
-        
-        if($App->PageRSS != "") {
-            $pageRSS = $App->PageRSS;
-        }
-    }
-
-    $firstClass = "class=\"first_one\""; 
-    $nextclass = "";
-    
-    /*for($i = 0; $i < $Menu->getMenuItemCount(); $i++) {
-        $MenuItem = $Menu->getMenuItemAt($i);
-            
-        
-        ?>
-        <li><a <?=$firstClass;?> href="<?= $MenuItem->getURL(); ?>" target="<?= $MenuItem->getTarget(); ?>"><?= $MenuItem->getText(); ?></a></li> 
-        <?php
-        $firstClass="";
-            }*\/
-        ?>
-        </ul>
-    </div>
-    <div id="header-utils">
-<?php // we inline this function, originally used with $App
-function getGoogleSearchHTML() {
-        $strn = <<<EOHTML
-        <form action="http://www.google.com/cse" id="searchbox_017941334893793413703:sqfrdtd112s">
-        <input type="hidden" name="cx" value="017941334893793413703:sqfrdtd112s" />
-        <input type="text" name="q" size="25" />
-        <input type="submit" name="sa" value="Search" />
-        </form>
-        <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_017941334893793413703%3Asqfrdtd112s&lang=en"></script>
-EOHTML;
-        return $strn;
-}
-
+global $pageTitle, $pageAuthor, $pageKeywords;
 ?>
-<?= 
-
-getGoogleSearchHTML() ?>
-        <ul>
-            <?php
-                if($pageRSS != "") {
-            ?><li class="rss_feed"><a href="<?= $pageRSS ?>" target="_blank"><img src="/eclipse.org-common/themes/Phoenix/images/rss_btn.gif" alt="RSS" height="16" width="16" border="0" class="rss_icon" /></a></li>
-            <?php
-                } 
-            ?>
-            <li class="text_size"><a class="smallText" title="Small Text" href="#" onclick="setActiveStyleSheet('small');return false;">A</a> <a class="largeText" title="Large Text" href="#" onclick="setActiveStyleSheet('large');return false;">A</a></li>
-        </ul>
-    </div></div>
-        
-
-<?php // done copying stuff
-*/
-// now our own header: ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head><title><?= $pageTitle ?></title><meta name="author" content="<?= $pageAuthor ?>" />
 <meta name="keywords" content="<?= $pageKeywords ?>" />
diff --git a/classes/system/addons_management.php b/classes/system/addons_management.php
index 466edb2..3e1e77c 100644
--- a/classes/system/addons_management.php
+++ b/classes/system/addons_management.php
@@ -80,8 +80,8 @@
     /**
      * Executes the function associated with the hook and returns the result
      */ 
-    public function callHook($hook_key, $args = null) {
-        return call_user_func_array($this->hook($hook_key), $args);
+    public function callHook($hook_key, $args = array()) {
+    	return call_user_func_array($this->hook($hook_key), $args);
     }
 }
 
diff --git a/html/babel.css b/html/babel.css
index 5a3b088..c9f3c39 100644
--- a/html/babel.css
+++ b/html/babel.css
@@ -900,7 +900,9 @@
 }
 
 #contentArea{
-	border: 1px solid black;	
+	border: 1px solid black;
+	font-size: 12px;
+	margin: 10px;	
 }
 
 h1{
@@ -928,14 +930,9 @@
 	margin: 0px;	
 }
 
-#contentArea{
-	font-size: 12px;
-}
-
-
 .side-component{
 	float: left;	
-	width: 333px;
+	width: 33.3%;
 }
 	
 	
@@ -950,15 +947,15 @@
 }
 
 .side-component-small+.projects{
-	width: 165px;	
+	width: 10%;	
 }
 
 .side-component-small+.versions{
-	width: 95px;	
+	width: 8%;	
 }
 
 .side-component-small+.files{
-	width: 594px;	
+	width: 70%;
 }
 
 * html #files{
@@ -981,6 +978,7 @@
 .side-component-small h4{
 	padding-top: 3px;
 	padding-bottom: 2px;
+	padding-left: 1px;
 }
 
 .files h4{
@@ -995,7 +993,7 @@
 }
 
 #language{
-	width: 145px
+	width: 12%;
 	}
 	
 .project-area{
diff --git a/html/callback/getCurrentStringTranslation.php b/html/callback/getCurrentStringTranslation.php
index 5a9d2d1..4c2c344 100644
--- a/html/callback/getCurrentStringTranslation.php
+++ b/html/callback/getCurrentStringTranslation.php
@@ -135,14 +135,11 @@
 ?>
 
 <form id='translation-form'>
-	<input type="hidden" name="string_id" value="<?=$line['string_id'];?>">
-	<input type="hidden" name="stringTableIndex" value="<?=$stringTableIndex;?>">
+	<input type="hidden" name="string_id" value="<?= $line['string_id'] ?>">
+	<input type="hidden" name="stringTableIndex" value="<?= $stringTableIndex ?>">
 
 	<div id="english-area" class="side-component">
-		<h4>
-			English String
-			[<a id="copy-english-string-link">Copy</a>]
-		</h4>
+		<h4>English String [<a id="copy-english-string-link">Copy</a>]</h4>
 		<div style='overflow: auto; height: 75px;'>
 			<div id="english-string"><?= nl2br(htmlspecialchars($line['string_value'])); ?></div>
 		</div>
@@ -154,14 +151,14 @@
 		<input id='non-translatable-checkbox' type=checkbox name="non_translatable_string" <?= $line['non_translatable'] ? 'checked' : '' ;?>>Non-Translatable		
 	</div>
 	<div id="translation-textarea" class="side-component">
-	<?if($line['non_translatable'] == 0){?>
+	<?php if($line['non_translatable'] == 0) {?>
 		<h4>
 			Current Translation
 			[<a id="reset-current-translation-link">Reset</a>]
 			[<a id="clear-current-translation-link">Clear</a>]
 		</h4>
 		
-		<textarea id="current-translation" style='display: inline; width: 320px; height: 154px;' name="translation"><?=(($line['translation_value']));?></textarea>
+		<textarea id="current-translation" style='display: inline; width: 95%; height: 154px;' name="translation"><?=(($line['translation_value']));?></textarea>
 		<br />
 		<!-- [281434] Syncup overuses the "possibly incorrect" flag
 		<input id='fuzzy' type=checkbox name="fuzzy_checkbox" <?= $line['fuzzy'] ? 'checked' : '' ;?>> Translation is possibly incorrect 
@@ -169,20 +166,16 @@
 		-->
 		<button id="allversions" type="submit" name="translateAction" value="All Versions">Submit</button>
 		
-	<?}else{?>
+	<?php }else{?>
 		<h4>Non Translatable String</h4>
-		<br>
-		<br>
-		<br>
+		<br /><br /><br />
 		<div style='text-align:center;'>This string has been marked as <b>'non-translatable'</b>.</div>
-		
-	<?}?>		
 
+	<?php }?>
 	</div>	
 	<div id="translation-history-area" class="side-component">
 		<h4>History of Translations</h4>
 		<div id="translation-history">
-		
 		<table>
 		<?php
 			$query = "select value,first_name,last_name,translations.created_on, possibly_incorrect as fuzzy from translations,users where string_id = '".addslashes($line['string_id'])."' and language_id = '".addslashes($language)."' and translations.userid = users.userid order by translations.created_on desc";
diff --git a/html/content/en_login.php b/html/content/en_login.php
index 7b4eecf..3589159 100644
--- a/html/content/en_login.php
+++ b/html/content/en_login.php
@@ -4,14 +4,14 @@
 
 <div id="index-page">
 
-	<a href="https://bugs.eclipse.org/bugs/createaccount.cgi"><img src="<?php echo imageRoot() ?>/large_icons/categories/preferences-desktop-peripherals.png">	<h2>A Bugzilla Account is all you need</h2></a>
+	<a href="https://dev.eclipse.org/site_login/createaccount.php"><img src="<?php echo imageRoot() ?>/large_icons/categories/preferences-desktop-peripherals.png">	<h2>An Eclipse.org account is all you need</h2></a>
     <br style='clear: both;'>
-	<p>If you don't already have an Eclipse Bugzilla account then <a href="https://bugs.eclipse.org/bugs/createaccount.cgi">create one today</a>.  
-	It takes Babel a few minutes to receive your new Bugzilla account information. 
+	<p>If you don't already have an Eclipse.org account then <a href="https://dev.eclipse.org/site_login/createaccount.php">create one today</a>.  
+	It takes Babel a few minutes to receive your new account information. 
 	If logging in doesn't work after a few minutes, please contact <a href="mailto:webmaster@eclipse.org">webmaster@eclipse.org</a>.</p>
 
     <br style='clear: both;'>
-	<p>If you already have an Eclipse Bugzilla account, then log in and started helping Eclipse speak your language.</p>
+	<p>If you already have an Eclipse account, then log in and start helping Eclipse speak your language.</p>
 
 <form style="margin-left: 35px;" name="frmLogin" method="post">
 <div>
@@ -22,12 +22,12 @@
 			  <img style='margin-left: 70px;' src='<?php echo imageRoot() ?>/small_icons/actions/process-stop.png'>
 		      <div style='color: red; font-weight: bold; '><?=$GLOBALS['g_ERRSTRS'][0]?></div>
 		      <br style='clear: both;'>
-		    <?
+		    <?php
 	    }else{
 			?>
 	    		<img style='margin-left: 70px;' src="<?php echo imageRoot() ?>/small_icons/emblems/emblem-important.png">	<h2 style='font-size: 14px; margin-top: 0px; background-color: yellow;'>Use your Bugzilla login information</h2>
 		    	<br style='clear: both;'>
-		   <?
+		   <?php
 	    }
 	 ?>
 	
diff --git a/html/fragments/language_progress.php b/html/fragments/language_progress.php
index 725afb9..f7ef6a6 100644
--- a/html/fragments/language_progress.php
+++ b/html/fragments/language_progress.php
@@ -22,10 +22,10 @@
 <div id="trans-progress-area">
 	<h2>Translation Progress</h2>
 	<dl>
-	<?
+	<?php
 		while($row = mysql_fetch_assoc($res)){
-			?><dt><?=$row['value'] ?></dt>
-			<dd><?=$row['quantity'];?></dd><?
+			echo "<dt>" . $row['value'] . "</dt>";
+			echo "<dd>" . $row['quantity'] . "</dd>";
 		}
 	?>
 	</dl>
diff --git a/html/fragments/top_translators.php b/html/fragments/top_translators.php
index 722aa53..edbb66c 100644
--- a/html/fragments/top_translators.php
+++ b/html/fragments/top_translators.php
@@ -21,10 +21,10 @@
 <div id="top-translators-area">
 	<h2>Top Translators</h2>
 	<dl>
-	<?
-		while($row = mysql_fetch_assoc($res)){
-			?><dt><?=$row['value'] ?></dt>
-			<dd><?=$row['quantity'];?></dd><?
+	<?php
+		while($row = mysql_fetch_assoc($res)) {
+			echo "<dt>" . $row['value'] . "</dt>";
+			echo "<dd>" . $row['quantity'] . "</dd>";
 		}
 	?>
 	</dl>
diff --git a/html/index.php b/html/index.php
index ee57c88..369a916 100644
--- a/html/index.php
+++ b/html/index.php
@@ -20,11 +20,11 @@
 $addon->callHook("head");
 ?>
 <h1 id="page-message">Welcome to the Babel Project</h1>
-<? include("fragments/motd.php");?>
+<?php include("fragments/motd.php");?>
 <div id="index-page" style='width: 510px; padding-right: 190px;'>
 	  <div style='float: right;height: 290px; border: 0px solid red;'>
-	      <? include("fragments/language_progress.php");?>
-		  <? include("fragments/top_translators.php");?>	  
+	      <?php include("fragments/language_progress.php");?>
+		  <?php include("fragments/top_translators.php");?>	  
 	  </div>
 
 	  <div style='float: left;border: 0px solid red;'>
diff --git a/html/translate.php b/html/translate.php
index 9482697..8bca0ff 100644
--- a/html/translate.php
+++ b/html/translate.php
@@ -52,13 +52,13 @@
 ?>
 
 <h1 id="page-message">Welcome to the Babel Project</h1>
-<? include("fragments/motd.php");?>
+<?php include("fragments/motd.php");?>
 <div id="contentArea">
 
 	<h2>Languages / Projects / Versions / Files</h2>
 	<div id="language" class="side-component-small">
 		<h4 id="language-selection">Languages</h4>
-		<ul id="language-area"class="scrollable-area"></ul>
+		<ul id="language-area" class="scrollable-area"></ul>
 	</div>
 
 	<div id="project" class="side-component-small projects">
@@ -79,7 +79,6 @@
 		</h4>
 		<ul id="files-area" class="scrollable-area"></ul>
 	</div>
-
 	<div class="clearing"></div>