<?php
function plugin_ldapextauth_mapping ($entry) {
- global $Language;
$result = array () ;
$result['firstname'] = $entry['givenname'][0] ;
$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']
// 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 ;
}
* @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);
}
function getLocalizedLabel() {
- global $Language;
$languageId = choose_language_from_context();
$label = $this->getLabel($languageId);
if($label) {
var $dataArray = false;
function TroveCategoryLabel(& $category, $labelId = false, $dataArray = false) {
- global $Language;
$this->Error();
if (!$category || !is_object($category)) {
return false;
}
function create($label, $languageId) {
- global $Language;
if(strlen($label) == 0) {
// set error
return false;
}
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() ."' "
}
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) {
// print current node, then all subnodes
function printnode ($nodeid,$text) {
- global $Language;
print ('<br />');
for ($i=0;$i<$GLOBALS[depth];$i++) {
global $discrim_url;
global $expl_discrim;
global $form_cat;
- global $Language;
$res_trovecat = db_query("
SELECT trove_cat.fullpath AS fullpath,
}
function CallHook (\$hookname, \$params) {
- global \$Language, \$G_SESSION, \$HTML ;
+ global \$G_SESSION, \$HTML ;
if (\$hookname == "usermenu") {
\$text = "${fullname}" ;
if (\$G_SESSION->usesPlugin("$minus")) {
* @param array Header parameters array
*/
function header(\$params) {
- global \$Language;
if (!\$params['title']) {
\$params['title'] = "GForge";
?>
<!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">
<!--
// 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'];
"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">
<!--
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>";
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