[fix] Rewrites code to be 5.3 compliant by removing func()[key] notations
This commit is contained in:
parent
28675a2973
commit
0d307bd6d6
|
@ -113,9 +113,9 @@ $creators_list=array();
|
||||||
foreach($admin->get_creator_list() as $mid=>$mlogin) {
|
foreach($admin->get_creator_list() as $mid=>$mlogin) {
|
||||||
$creators_list[$mid] = $mlogin['login'];
|
$creators_list[$mid] = $mlogin['login'];
|
||||||
}
|
}
|
||||||
|
$variablesList = $variables->variables_list_name();
|
||||||
echo "<fieldset><legend>"._("Description")."</legend>";
|
echo "<fieldset><legend>"._("Description")."</legend>";
|
||||||
echo "<p>".$variables->variables_list_name()[$var]."</p>";
|
echo "<p>".$variablesList[$var]."</p>";
|
||||||
echo "</fieldset>";
|
echo "</fieldset>";
|
||||||
|
|
||||||
echo "<br/>";
|
echo "<br/>";
|
||||||
|
|
|
@ -101,7 +101,8 @@ echo "<input type='submit' class='ina' value=\""; echo ehe(_("View")); echo "\"
|
||||||
<?php
|
<?php
|
||||||
if ( $member_id && $fqdn_id ) {
|
if ( $member_id && $fqdn_id ) {
|
||||||
$sub_infos=$dom->get_sub_domain_all($fqdn_id);
|
$sub_infos=$dom->get_sub_domain_all($fqdn_id);
|
||||||
$fqdn=$dom->get_panel_url_list()[$fqdn_id];
|
$domList = $dom->get_panel_url_list();
|
||||||
|
$fqdn=$domList[$fqdn_id];
|
||||||
$impersonated_conf=$variables->get_impersonated($fqdn, $member_id);
|
$impersonated_conf=$variables->get_impersonated($fqdn, $member_id);
|
||||||
|
|
||||||
echo sprintf(_("Here are values for members %s logged via %s"), '<b>'.$ml[$member_id].'</b>', "<b>$fqdn</b>") ;?>
|
echo sprintf(_("Here are values for members %s logged via %s"), '<b>'.$ml[$member_id].'</b>', "<b>$fqdn</b>") ;?>
|
||||||
|
|
|
@ -181,7 +181,8 @@ class system_bind {
|
||||||
*/
|
*/
|
||||||
function dkim_generate_key($domain) {
|
function dkim_generate_key($domain) {
|
||||||
// Stop here if we do not manage the mail
|
// Stop here if we do not manage the mail
|
||||||
if ( ! $this->get_domain_summary($domain)['gesmx'] ) return;
|
$domainInfo = $this->get_domain_summary($domain);
|
||||||
|
if ( ! $domainInfo['gesmx'] ) return;
|
||||||
|
|
||||||
$target_dir = "/etc/opendkim/keys/$domain";
|
$target_dir = "/etc/opendkim/keys/$domain";
|
||||||
|
|
||||||
|
@ -266,7 +267,8 @@ class system_bind {
|
||||||
*/
|
*/
|
||||||
function dkim_entry($domain) {
|
function dkim_entry($domain) {
|
||||||
$keyfile="/etc/opendkim/keys/$domain/alternc.txt";
|
$keyfile="/etc/opendkim/keys/$domain/alternc.txt";
|
||||||
if (! file_exists($keyfile) && $this->get_domain_summary($domain)['gesmx'] ) {
|
$domainInfo = $this->get_domain_summary($domain);
|
||||||
|
if (! file_exists($keyfile) && $domainInfo['gesmx'] ) {
|
||||||
$this->dkim_generate_key($domain);
|
$this->dkim_generate_key($domain);
|
||||||
}
|
}
|
||||||
return @file_get_contents($keyfile);
|
return @file_get_contents($keyfile);
|
||||||
|
@ -283,7 +285,8 @@ class system_bind {
|
||||||
$zone= implode("\n",$this->conf_from_db($domain))."\n".$this->get_persistent($domain);
|
$zone= implode("\n",$this->conf_from_db($domain))."\n".$this->get_persistent($domain);
|
||||||
|
|
||||||
$entry='';
|
$entry='';
|
||||||
if ( $this->get_domain_summary($domain)['gesmx'] ) {
|
$domainInfo = $this->get_domain_summary($domain);
|
||||||
|
if ( $domainInfo['gesmx'] ) {
|
||||||
// If we manage the mail
|
// If we manage the mail
|
||||||
|
|
||||||
// Check if there is no the same entry (defined or manual)
|
// Check if there is no the same entry (defined or manual)
|
||||||
|
@ -324,6 +327,7 @@ class system_bind {
|
||||||
|
|
||||||
$zone.="\n;;;END ALTERNC AUTOGENERATE CONFIGURATION";
|
$zone.="\n;;;END ALTERNC AUTOGENERATE CONFIGURATION";
|
||||||
$zone.=$this->get_persistent($domain);
|
$zone.=$this->get_persistent($domain);
|
||||||
|
$domainInfo = $this->get_domain_summary($domain);
|
||||||
|
|
||||||
// FIXME check those vars
|
// FIXME check those vars
|
||||||
$zone = strtr($zone, array(
|
$zone = strtr($zone, array(
|
||||||
|
@ -340,7 +344,7 @@ class system_bind {
|
||||||
"@@DOMAINE@@"=>"$domain",
|
"@@DOMAINE@@"=>"$domain",
|
||||||
"@@SERIAL@@"=>$this->get_serial($domain),
|
"@@SERIAL@@"=>$this->get_serial($domain),
|
||||||
"@@PUBLIC_IP@@"=>"$L_PUBLIC_IP",
|
"@@PUBLIC_IP@@"=>"$L_PUBLIC_IP",
|
||||||
"@@ZONETTL@@"=> $this->get_domain_summary($domain)['zonettl'],
|
"@@ZONETTL@@"=> $domainInfo['zonettl'],
|
||||||
));
|
));
|
||||||
|
|
||||||
return $zone;
|
return $zone;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
*
|
*
|
||||||
* @author Drupal Developpement Team
|
* @author Drupal Developpement Team
|
||||||
* @link http://cvs.drupal.org/viewcvs/drupal/drupal/includes/bootstrap.inc?rev=1.38&view=auto
|
* @link http://cvs.drupal.org/viewcvs/drupal/drupal/includes/bootstrap.inc?rev=1.38&view=auto
|
||||||
|
* @
|
||||||
*/
|
*/
|
||||||
class m_variables {
|
class m_variables {
|
||||||
var $strata_order = array('DEFAULT','GLOBAL','FQDN_CREATOR','FQDN','CREATOR','MEMBER','DOMAIN');
|
var $strata_order = array('DEFAULT','GLOBAL','FQDN_CREATOR','FQDN','CREATOR','MEMBER','DOMAIN');
|
||||||
|
@ -299,6 +300,7 @@ class m_variables {
|
||||||
*/
|
*/
|
||||||
function display_valueraw_html($v,$varname,$echo = true) {
|
function display_valueraw_html($v,$varname,$echo = true) {
|
||||||
$output = "";
|
$output = "";
|
||||||
|
$varList = $this->variables_list();
|
||||||
if (is_array($v)) {
|
if (is_array($v)) {
|
||||||
if (empty($v)) {
|
if (empty($v)) {
|
||||||
$output .= "<em>"._("Empty array")."</em>";
|
$output .= "<em>"._("Empty array")."</em>";
|
||||||
|
@ -310,19 +312,19 @@ class m_variables {
|
||||||
if (is_null($varname)) {
|
if (is_null($varname)) {
|
||||||
$output .= "$k";
|
$output .= "$k";
|
||||||
} else {
|
} else {
|
||||||
if ( !isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]) || is_array( $this->variables_list()['DEFAULT'][null][$varname]['type'][$k] ) ) {
|
if ( !isset($varList['DEFAULT'][null][$varname]['type'][$k]) || is_array( $varList['DEFAULT'][null][$varname]['type'][$k] ) ) {
|
||||||
if (isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'])) {
|
if (isset($varList['DEFAULT'][null][$varname]['type'][$k]['desc'])) {
|
||||||
$output .= $this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'];
|
$output .= $varList['DEFAULT'][null][$varname]['type'][$k]['desc'];
|
||||||
} else {
|
} else {
|
||||||
$output .= $k;
|
$output .= $k;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$output .= $this->variables_list()['DEFAULT'][null][$varname]['type'][$k];
|
$output .= $varList['DEFAULT'][null][$varname]['type'][$k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isset($this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'] )) {
|
if (isset($varList['DEFAULT'][null][$varname]['type'][$k]['desc'] )) {
|
||||||
$output .= $this->variables_list()['DEFAULT'][null][$varname]['type'][$k]['desc'];
|
$output .= $varList['DEFAULT'][null][$varname]['type'][$k]['desc'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_array($l)) {
|
if (is_array($l)) {
|
||||||
|
@ -332,7 +334,7 @@ class m_variables {
|
||||||
if ( is_numeric($m)) {
|
if ( is_numeric($m)) {
|
||||||
$output .= "$m";
|
$output .= "$m";
|
||||||
} else {
|
} else {
|
||||||
$output .= $this->variables_list()['DEFAULT'][null][$varname]['type'][$k][$m]['desc'];
|
$output .= $varList['DEFAULT'][null][$varname]['type'][$k][$m]['desc'];
|
||||||
}
|
}
|
||||||
$output .= " => $n";
|
$output .= " => $n";
|
||||||
$output .= "</li>";
|
$output .= "</li>";
|
||||||
|
|
Loading…
Reference in New Issue