Minor fixes to payment, host manage and plesk

This commit is contained in:
Deon George
2012-04-17 20:50:06 +10:00
parent d2bc1bd451
commit 01d7f09a68
13 changed files with 360 additions and 108 deletions

View File

@@ -12,10 +12,26 @@
*/
class Controller_User_Service extends Controller_TemplateDefault_User {
protected $secure_actions = array(
'ajaxmanage'=>TRUE,
'list'=>TRUE,
'view'=>TRUE,
);
public function action_ajaxmanage() {
$this->auto_render = FALSE;
$so = ORM::factory('service',$this->request->param('id'));
$k = Session::instance()->get_once('manage_button');
$o = array(
'u'=>$so->plugin()->host_username ? $so->plugin()->host_username : strtolower($so->plugin()->name()),
'p'=>(! $k OR ! $this->request->is_ajax() OR ! $so->loaded() OR ! isset($_REQUEST['k']) OR $k != $_REQUEST['k']) ? Random::char() : $so->plugin()->host_password,
);
$this->response->headers('Content-Type','application/json');
$this->response->body(json_encode($o));
}
/**
* Show a list of services
*/