Fix abstract passwords in host/domain manage planel logins
This commit is contained in:
@@ -14,14 +14,14 @@ class Model_Domain_Registrar extends ORMOSB {
|
||||
/**
|
||||
* The button that provides a login to the Registrar to manage the domain license
|
||||
*/
|
||||
public function manage_button($u,$p,$d) {
|
||||
public function manage_button(Model_Service_Plugin_Domain $spdo,$t) {
|
||||
$c = sprintf('Service_Domain_%s',$this->file);
|
||||
if (! class_exists($c))
|
||||
return '';
|
||||
|
||||
$po = new $c($this->id);
|
||||
|
||||
return $po->manage_button($u,$p,$d);
|
||||
return $po->manage_button($spdo,$t);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -57,16 +57,26 @@ class Model_Service_Plugin_Domain extends Model_Service_Plugin {
|
||||
->set('so',$this);
|
||||
}
|
||||
|
||||
public function username_value() {
|
||||
return $this->registrar_username;
|
||||
}
|
||||
|
||||
public function password_value() {
|
||||
return $this->registrar_password;
|
||||
}
|
||||
|
||||
/**
|
||||
* This provides us with a manage button to jump to the registrar
|
||||
* to manage the domain.
|
||||
*/
|
||||
public function manage_button() {
|
||||
return ($this->registrar_username AND $this->registrar_password) ? $this->domain_registrar->manage_button($this->registrar_username,$this->registrar_password,$this->name()) : _('Please contact us');
|
||||
public function manage_button($t='') {
|
||||
parent::manage_button($t);
|
||||
|
||||
return ($this->username_value() AND $this->password_value()) ? $this->domain_registrar->manage_button($this,$t) : _('Please contact us');
|
||||
}
|
||||
|
||||
public function manage_dns_button() {
|
||||
return $this->service_plugin_host->manage_button();
|
||||
return $this->service_plugin_host->manage_button('service_plugin_host');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user