Bläddra i källkod

Moved the loading of config higher up in the sequence of processes so that config vars would be available before more hooks run.

Andrew Meyer 12 år sedan
förälder
incheckning
67b6720dc8
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      lib/pico.php

+ 4 - 4
lib/pico.php

@@ -21,6 +21,10 @@ class Pico {
 		// Load plugins
 		// Load plugins
 		$this->load_plugins();
 		$this->load_plugins();
 		$this->run_hooks('plugins_loaded');
 		$this->run_hooks('plugins_loaded');
+
+		// Load the settings
+		$settings = $this->get_config();
+		$this->run_hooks('config_loaded', array(&$settings));
 		
 		
 		// Get request url and script url
 		// Get request url and script url
 		$url = '';
 		$url = '';
@@ -51,10 +55,6 @@ class Pico {
 		}
 		}
 		$this->run_hooks('after_load_content', array(&$file, &$content));
 		$this->run_hooks('after_load_content', array(&$file, &$content));
 		
 		
-		// Load the settings
-		$settings = $this->get_config();
-		$this->run_hooks('config_loaded', array(&$settings));
-
 		$meta = $this->read_file_meta($content);
 		$meta = $this->read_file_meta($content);
 		$this->run_hooks('file_meta', array(&$meta));
 		$this->run_hooks('file_meta', array(&$meta));
 		$content = $this->parse_content($content);
 		$content = $this->parse_content($content);