[evolvis-commits] r12927: Global cleanup of $Language still present in code
mirabilos at evolvis.org
mirabilos at evolvis.org
Mon Feb 28 02:07:48 CET 2011
Author: mirabilos
Date: 2011-02-28 02:07:48 +0100 (Mon, 28 Feb 2011)
New Revision: 12927
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php
trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php
trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategory.class.php
trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategoryLabel.class.php
trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/admin/trove_cat_list.php
trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/include/trove.php
trunk/gforge_base/evolvisforge-5.1/tools/createplugin.sh
trunk/gforge_base/evolvisforge-5.1/tools/createtheme.sh
trunk/gforge_base/evolvisforge-5.1/tools/savannah_std.class
Log:
Global cleanup of $Language still present in code
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/etc/plugins/ldapextauth/mapping.php 2011-02-28 01:07:48 UTC (rev 12927)
@@ -1,7 +1,6 @@
<?php
function plugin_ldapextauth_mapping ($entry) {
- global $Language;
$result = array () ;
$result['firstname'] = $entry['givenname'][0] ;
@@ -9,7 +8,6 @@
$result['email'] = $entry['uid'][0] . '@' . $GLOBALS['sys_default_domain'] ;
//$result['email'] = $entry['mail'][0] ; // AD
// You may also want to customise $result['language_id']
- //$result['language_id']=$Language->getLanguageId();
// You may also want to customise $result['timezone']
//$result['timezone']=$GLOBALS['sys_default_timezone'];
// You may also want to customise $result['jabber_address']
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/plugins/ldapextauth/include/LdapExtAuthPlugin.class.php 2011-02-28 01:07:48 UTC (rev 12927)
@@ -146,7 +146,7 @@
// User not found in LDAP => Account invalid
@ldap_unbind($this->ldap_conn);
debuglog("LDAP: Wrong password according to LDAP ($loginname)");
- $feedback=$Language->getText('session','invalidpasswd');
+ $feedback=_('Invalid Password Or User Name');
$GLOBALS['ldap_auth_failed']=true;
return false ;
}
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategory.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategory.class.php 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategory.class.php 2011-02-28 01:07:48 UTC (rev 12927)
@@ -83,7 +83,6 @@
* @return boolean success.
*/
function fetchData($categoryId) {
- global $Language;
$res=db_query("SELECT *
FROM trove_cat
WHERE trove_cat_id='".$categoryId."'", -1, 0, SYS_DB_TROVE);
@@ -144,7 +143,6 @@
}
function getLocalizedLabel() {
- global $Language;
$languageId = choose_language_from_context();
$label = $this->getLabel($languageId);
if($label) {
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategoryLabel.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategoryLabel.class.php 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/TroveCategoryLabel.class.php 2011-02-28 01:07:48 UTC (rev 12927)
@@ -40,7 +40,6 @@
var $dataArray = false;
function TroveCategoryLabel(& $category, $labelId = false, $dataArray = false) {
- global $Language;
$this->Error();
if (!$category || !is_object($category)) {
return false;
@@ -70,7 +69,6 @@
}
function create($label, $languageId) {
- global $Language;
if(strlen($label) == 0) {
// set error
return false;
@@ -98,7 +96,6 @@
}
function fetchData($labelId) {
- global $Language;
$res=db_query("SELECT trove_category_labels.*, supported_languages.name AS language_name FROM trove_category_labels, supported_languages "
. "WHERE trove_category_labels.label_id='".$labelId."' "
. "AND trove_category_labels.category_id='". $this->category->getId() ."' "
@@ -114,7 +111,6 @@
}
function remove() {
- global $Language;
db_begin();
$res = db_query('DELETE FROM trove_category_labels WHERE label_id='.$this->labelId);
if(!res || db_affected_rows($res) != 1) {
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/admin/trove_cat_list.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/admin/trove_cat_list.php 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/admin/trove_cat_list.php 2011-02-28 01:07:48 UTC (rev 12927)
@@ -20,7 +20,6 @@
// print current node, then all subnodes
function printnode ($nodeid,$text) {
- global $Language;
print ('<br />');
for ($i=0;$i<$GLOBALS[depth];$i++) {
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/include/trove.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/include/trove.php 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/trove/include/trove.php 2011-02-28 01:07:48 UTC (rev 12927)
@@ -225,7 +225,6 @@
global $discrim_url;
global $expl_discrim;
global $form_cat;
- global $Language;
$res_trovecat = db_query("
SELECT trove_cat.fullpath AS fullpath,
Modified: trunk/gforge_base/evolvisforge-5.1/tools/createplugin.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tools/createplugin.sh 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/tools/createplugin.sh 2011-02-28 01:07:48 UTC (rev 12927)
@@ -949,7 +949,7 @@
}
function CallHook (\$hookname, \$params) {
- global \$Language, \$G_SESSION, \$HTML ;
+ global \$G_SESSION, \$HTML ;
if (\$hookname == "usermenu") {
\$text = "${fullname}" ;
if (\$G_SESSION->usesPlugin("$minus")) {
Modified: trunk/gforge_base/evolvisforge-5.1/tools/createtheme.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tools/createtheme.sh 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/tools/createtheme.sh 2011-02-28 01:07:48 UTC (rev 12927)
@@ -345,7 +345,6 @@
* @param array Header parameters array
*/
function header(\$params) {
- global \$Language;
if (!\$params['title']) {
\$params['title'] = "GForge";
@@ -355,9 +354,9 @@
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html lang="<?php echo \$Language->getLanguageCode(); ?>">
+<html lang="<?php echo _('en') ?>">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=<?php echo \$Language->getEncoding(); ?>">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE><?php echo \$params['title']; ?></TITLE>
<SCRIPT language="JavaScript">
<!--
Modified: trunk/gforge_base/evolvisforge-5.1/tools/savannah_std.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tools/savannah_std.class 2011-02-28 01:07:46 UTC (rev 12926)
+++ trunk/gforge_base/evolvisforge-5.1/tools/savannah_std.class 2011-02-28 01:07:48 UTC (rev 12927)
@@ -133,7 +133,7 @@
// generic_header_start() - Start a generic HTML header
function generic_header_start($params) {
- global $G_SESSION, $Language, $sys_name;
+ global $G_SESSION, $sys_name;
if (!$params['title']) {
$params['title'] = $GLOBALS['sys_name'];
@@ -145,9 +145,9 @@
"http://www.w3.org/TR/REC-html40/loose.dtd">
<!-- Server: <?php echo $sys_name; ?> -->
-<html lang="<?php echo $Language->getLanguageCode(); ?>">
+<html lang="<?php echo _('en') ?>">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Language->getEncoding(); ?>">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE><?php echo $params['title']; ?></TITLE>
<SCRIPT language="JavaScript">
<!--
@@ -176,7 +176,7 @@
function generic_footer($params) {
- global $IS_DEBUG,$QUERY_COUNT,$Language;
+ global $IS_DEBUG,$QUERY_COUNT;
if ($IS_DEBUG && user_ismember(1,'A')) {
echo "<CENTER><B><FONT COLOR=RED>Query Count: $QUERY_COUNT</FONT
></B></CENTER>";
@@ -189,10 +189,6 @@
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
</p>
-<span class="center">
-<? echo $Language->getText('general', 'footer'); ?>
-</span>
-
</body>
</html>
<?php
More information about the evolvis-commits
mailing list