From e92b5909a086c23d46d4234bfe5011dbcc4f3f2c Mon Sep 17 00:00:00 2001 From: Dima Malishev Date: Sat, 6 Aug 2011 16:18:52 +0300 Subject: [PATCH] Deleted tmp php files --- web/vesta/core/Request.class.php~ | 86 ------------ web/vesta/core/Vesta.class.php~ | 221 ------------------------------ 2 files changed, 307 deletions(-) delete mode 100644 web/vesta/core/Request.class.php~ delete mode 100644 web/vesta/core/Vesta.class.php~ diff --git a/web/vesta/core/Request.class.php~ b/web/vesta/core/Request.class.php~ deleted file mode 100644 index c4048853..00000000 --- a/web/vesta/core/Request.class.php~ +++ /dev/null @@ -1,86 +0,0 @@ -post = $_POST; - $this->get = $_GET; - $this->server = $_SERVER; - - $this->mergeContainers(); - } - - /** - * Merge holders into single holder - */ - function mergeContainers() { - $this->_merged = array_merge($this->server, $this->post, $this->get, $this->global); - $this->_spell = json_decode($this->_merged['spell'], true); - } - - /** - * Get parameter - * - * @param $key - * @param $default - * @return - * - */ - function getParameter($key, $default=false) { - return isset($this->_merged[$key]) ? $this->_merged[$key] : $default; - // return isset($this->_spell[$key]) ? $this->_spell[$key] : $default; - } - - function getSpell() { - return $this->_spell; - } - - function hasParameter($key, $default=false) { - return isset($this->_merged[$key]); - } - - /** - * Check if request is post - * - * TODO: write the method - * - * @return - */ - function isPost() { - return true; - } - - static function parseAjaxMethod($request) { - if (!$request->hasParameter('jedi_method')) { - throw new ProtectionException(Message::INVALID_METHOD); - } - - $method = explode('.', $request->getParameter('jedi_method')); - - if (count($method) != 2) { - throw new ProtectionException(Message::INVALID_METHOD); - } - - return array('namespace' => ucfirst($method[0]), 'function' => strtolower($method[1])); - } - -} - diff --git a/web/vesta/core/Vesta.class.php~ b/web/vesta/core/Vesta.class.php~ deleted file mode 100644 index daf46054..00000000 --- a/web/vesta/core/Vesta.class.php~ +++ /dev/null @@ -1,221 +0,0 @@ -getParameter("debug", FALSE); - - if (!isset($cmd_command)) { - throw new ProtectionException('No function name passed into Vesta::execute'); // TODO: move msg to Messages:: - } - - $params = array( - 'sudo' => Config::get('sudo_path'), - 'functions' => Config::get('vesta_functions_path'), - 'parameters' => implode("' '", $parameters), - // 'reply' => Config::get('response_type') - ); - - - $cmd = "{$params['sudo']} {$params['functions']}{$cmd_command} '{$params['parameters']}' {$params['reply']}"; - // /usr/bin/sudo /usr/local/vesta/bin/v_list_sys_users vesta json - exec($cmd, $output, $return); - - $result = 0; - $result = array('status' => TRUE, - 'data' => '', - 'error_code' => '', - 'error_message' => '' - ); - - if($debug) - { - $result['debug'] = array( - "cmd" => $cmd, - "output" => $output, - "return" => $return - ); - if($debug == 2) - { - echo '

'.$cmd; - echo '
output: '; print_r($output); - echo '
return: '.$return; - echo '

'; - } - } - - if(!!(int)$return) - { - $result['status'] = FALSE; - $result['error_code'] = (int)$return; - $result['error_message'] = implode('', $output); - } - else - { - $result['data'] = json_decode(implode('', $output), true); - } - - return $result; - } -}