Browse Source

Added $settings var for plugins

Tobias Reich 11 years ago
parent
commit
7e2936325f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      php/api.php
  2. 1 1
      php/modules/Plugins.php

+ 1 - 1
php/api.php

@@ -49,7 +49,7 @@ if (!empty($_POST['function'])||!empty($_GET['function'])) {
 
 	# Init plugins
 	$plugins = explode(';', $settings['plugins']);
-	$plugins = new Plugins($plugins, $database);
+	$plugins = new Plugins($plugins, $database, $settings);
 
 	# Escape
 	foreach(array_keys($_POST) as $key)	$_POST[$key] = mysqli_real_escape_string($database, urldecode($_POST[$key]));

+ 1 - 1
php/modules/Plugins.php

@@ -16,7 +16,7 @@ class Plugins implements \SplSubject {
 	public $action	= null;
 	public $args	= null;
 
-	public function __construct($files, $database) {
+	public function __construct($files, $database, $settings) {
 
 		if (!isset($files)) return false;