示例#1
0
文件: menu.php 项目: grlf/eyedock
 static function staticAction()
 {
     if (am4Request::$method != 'POST') {
         return;
     }
     if (!current_user_can('manage_options')) {
         return '';
     }
     if (!check_admin_referer('am4MenuPageFormController')) {
         throw new Exception('Security check!');
     }
     $options = get_magic_quotes_gpc() ? stripslashes_deep(am4Request::get('options')) : am4Request::get('options');
     try {
         am4PluginsManager::initAPI(@$options['path']);
     } catch (Exception $e) {
     }
 }
示例#2
0
 function validate($options)
 {
     try {
         am4PluginsManager::initAPI($options['path']);
     } catch (Exception $ex) {
         return $ex->getMessage();
     }
     return true;
 }