Changeset 1059
- Timestamp:
- 12/06/05 18:15:51 (3 years ago)
- Location:
- trunk/rss
- Files:
-
- 2 modified
-
admin/plugins.php (modified) (3 diffs)
-
intl/en.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rss/admin/plugins.php
r1058 r1059 130 130 131 131 function plugin_options() { 132 if (!array_key_exists('plugin_name',$_REQUEST)) { 132 if (!array_key_exists('plugin_name',$_REQUEST) || 133 array_key_exists('admin_plugin_options_cancel_changes', $_REQUEST)) { 134 plugins(); 133 135 return; 134 136 } 135 137 $plugin_filename = $_REQUEST['plugin_name']; 136 138 $plugin_filename = str_replace("%2F", "/", $plugin_filename); 139 $plugin_output = ""; 137 140 if (preg_match('/([a-zA-Z0-9_\/\-]+).php/',$plugin_filename,$matches)) { 138 141 $plugin_filename = $matches[1] .".php"; // sanitize input … … 140 143 if($plugin_info && array_key_exists('configuration', $plugin_info)) { 141 144 $plugin_config_func = $plugin_info['configuration']; 145 ob_start(); 142 146 require_once("../".RSS_PLUGINS_DIR. "/" . $plugin_filename); 143 147 if(function_exists($plugin_config_func)) { 144 148 call_user_func($plugin_config_func); // Are you happy now? 145 } 149 $plugin_output = ob_get_contents(); 150 151 } 152 ob_end_clean(); 153 } 154 if ($plugin_output) { // Let us set up a form 155 echo "<h2 156 class=\"trigger\">".LBL_ADMIN_PLUGINS_OPTIONS." ".TITLE_SEP." ". $plugin_info['name']. "</h2>\n" 157 ."<div id=\"admin_plugin_options\">\n"; 158 echo "<form method=\"post\" action=\"" .$_SERVER['PHP_SELF'] ."\">\n"; 159 echo "<p><input type=\"hidden\" name=\"".CST_ADMIN_DOMAIN 160 ."\" value=\"".CST_ADMIN_DOMAIN_PLUGIN_OPTIONS."\" /></p>\n"; 161 echo $plugin_output; 162 echo "<p><input type=\"hidden\" name=\"plugin_name\" value=\"".$plugin_filename."\"/>\n"; 163 echo "<p><input type=\"hidden\" name=\"". CST_ADMIN_METAACTION 164 ."\" value=\"LBL_ADMIN_SUBMIT_CHANGES\"/>\n"; 165 echo "<input type=\"submit\" name=\"admin_plugin_options_submit_changes\" value=\"" 166 .LBL_ADMIN_SUBMIT_CHANGES."\" />\n"; 167 echo "<input type=\"submit\" name=\"admin_plugin_options_cancel_changes\" 168 value=\"".LBL_ADMIN_CANCEL."\" /></p></form>\n"; 169 echo "</div>"; 170 } else { 171 plugins(); 146 172 } 147 173 } … … 344 370 } 345 371 372 function rss_plugins_is_submit() { 373 return array_key_exists("admin_plugin_options_submit_changes", $_REQUEST); 374 } 375 346 376 ?> -
trunk/rss/intl/en.php
r1058 r1059 148 148 define ('LBL_ADMIN_PLUGINS_HEADING_ACTION','Active'); 149 149 define ('LBL_ADMIN_PLUGINS_HEADING_OPTIONS','Options'); 150 define ('LBL_ADMIN_PLUGINS_OPTIONS','Plugin Options'); 150 151 151 152
