Changeset 11741 for extensions/user_tags/include/t4u_config.class.php
- Timestamp:
- Jul 14, 2011, 4:01:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/user_tags/include/t4u_config.class.php
r11081 r11741 22 22 class t4u_Config 23 23 { 24 private 25 $config = array(), 26 $plugin_dir; 24 private $config = array(); 25 protected static $instance; 27 26 28 27 public function __construct($plugin_dir, $plugin_name) { … … 35 34 36 35 if (!file_exists($this->get_config_filename())) { 36 $this->setDefaults(); 37 37 $this->save_config(); 38 38 } 39 39 } 40 41 public static function getInstance() { 42 if (!isset(self::$instance)) { 43 self::$instance = new t4u_Config(T4U_PLUGIN_ROOT, T4U_PLUGIN_NAME); 44 } 45 return self::$instance; 46 } 47 40 48 41 49 public function load_config() { … … 45 53 $this->config = $c; 46 54 } 47 $this->setDefaults();48 55 } 49 56 … … 100 107 101 108 public function getActionUrl($action, $method='POST') { 102 $url = get_root_url().'admin.php?page=plugin'; 103 $file = basename($this->plugin_dir) . '/' .'admin.php'; 104 if (strtoupper($method)=='POST') { 105 $url .= '&section='.urlencode($file); 106 $url .= '&action='.urlencode($action); 107 } else { 108 $url .= '§ion='.$file; 109 $url .= '&action='.$action; 110 } 109 $ws = get_root_url(); 110 $ws .= 'ws.php?format=json&method=user_tags.tags.list'; 111 111 112 return $url; 112 /* $url = get_root_url().'admin.php?page=plugin'; */ 113 /* $file = basename($this->plugin_dir) . '/' .'admin.php'; */ 114 /* if (strtoupper($method)=='POST') { */ 115 /* $url .= '&section='.urlencode($file); */ 116 /* $url .= '&action='.urlencode($action); */ 117 /* } else { */ 118 /* $url .= '§ion='.$file; */ 119 /* $url .= '&action='.$action; */ 120 /* } */ 121 122 return $ws; 113 123 } 114 124
Note: See TracChangeset
for help on using the changeset viewer.