Commit 19dbf956 authored by Alan Garcia's avatar Alan Garcia
Browse files

Bugfix affichage rawhtml des variables

Debut de changement pour variable_get
parent 31d2e980
......@@ -587,7 +587,7 @@ class m_admin {
*/
function hook_admin_add_member() {
global $err, $cuid, $L_FQDN, $L_HOSTING;
$dest = variable_get('new_email', 0, 'An email will be sent to this address when new accounts are created if set.');
$dest = variable_get('new_email', '0', 'An email will be sent to this address when new accounts are created if set.', array(array('desc'=>'Enabled','type'=>'boolean')));
if (!$dest) {
return false;
}
......
......@@ -248,11 +248,19 @@ class m_variables {
echo "$k";
} else {
if ( !isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]) || is_array( $this->variables_list()['DEFAULT'][null][$varname]['type'][$k] ) ) {
echo $k;
if (isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'])) {
echo $this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'];
} else {
echo $k;
}
} else {
echo $this->variables_list()['DEFAULT'][null][$varname]['type'][$k];
}
}
} else {
if (isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'] )) {
echo $this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'];
}
}
if (is_array($l)) {
echo "<ul>";
......@@ -274,7 +282,7 @@ class m_variables {
}
echo "</ul>";
} // empty $v
} else if (empty($v)) {
} else if (empty($v) && $v != '0') {
echo "<em>"._("Empty")."</em>";
} else {
echo $v;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment