| | |
| | | */ |
| | | public function request_security_check($mode = rcube_utils::INPUT_POST) |
| | | { |
| | | // don't check for valid request tokens in these actions |
| | | // @TODO: get rid of this |
| | | $request_check_whitelist = array('spell'=>1, 'spell_html'=>1); |
| | | |
| | | if ($request_check_whitelist[$this->action]) { |
| | | return; |
| | | } |
| | | |
| | | // check request token |
| | | if (!$this->check_request($mode)) { |
| | | self::raise_error(array( |
| | |
| | | return $result; |
| | | } |
| | | |
| | | /** |
| | | * Get resource file content (with assets_dir support) |
| | | * |
| | | * @param string $name File name |
| | | */ |
| | | public function get_resource_content($name) |
| | | { |
| | | if (!strpos($name, '/')) { |
| | | $name = "program/resources/$name"; |
| | | } |
| | | |
| | | $assets_dir = $this->config->get('assets_dir'); |
| | | |
| | | if ($assets_dir) { |
| | | $path = slashify($assets_dir) . $name; |
| | | if (@file_exists($path)) { |
| | | $name = $path; |
| | | } |
| | | } |
| | | |
| | | return file_get_contents($name, false); |
| | | } |
| | | |
| | | |
| | | /************************************************************************ |
| | | ********* Deprecated methods (to be removed) ********* |