mirror of
				https://git.tt-rss.org/fox/tt-rss.git
				synced 2025-11-04 05:41:29 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			463 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			463 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
class PluginHandler extends Handler_Protected {
 | 
						|
	function csrf_ignore($method) {
 | 
						|
		return true;
 | 
						|
	}
 | 
						|
 | 
						|
	function catchall($method) {
 | 
						|
		global $pluginhost;
 | 
						|
 | 
						|
		$plugin = $pluginhost->get_plugin($_REQUEST["plugin"]);
 | 
						|
 | 
						|
		if ($plugin) {
 | 
						|
			if (method_exists($plugin, $method)) {
 | 
						|
				$plugin->$method();
 | 
						|
			} else {
 | 
						|
				print json_encode(array("error" => "METHOD_NOT_FOUND"));
 | 
						|
			}
 | 
						|
		} else {
 | 
						|
			print json_encode(array("error" => "PLUGIN_NOT_FOUND"));
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
?>
 |