diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/actions.php | 1 | ||||
-rw-r--r-- | engine/lib/database.php | 7 | ||||
-rw-r--r-- | engine/lib/elgglib.php | 6 | ||||
-rw-r--r-- | engine/lib/plugins.php | 4 |
4 files changed, 13 insertions, 5 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php index e24659df1..035d26cf5 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -79,6 +79,7 @@ function actions_init($event, $object_type, $object) {
register_action("error");
+ return true;
}
// Register some actions ***************************************************
diff --git a/engine/lib/database.php b/engine/lib/database.php index 66383afe3..55bfc602d 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -85,6 +85,7 @@ */
function init_db($event, $object_type, $object = null) {
setup_db_connections();
+ return true;
}
/**
@@ -268,11 +269,14 @@ /**
* Runs a full database script from disk
*
- * @param string $scriptlocation The full apth to the script
+ * @uses $CONFIG
+ * @param string $scriptlocation The full path to the script
*/
function run_sql_script($scriptlocation) {
if ($script = file_get_contents($scriptlocation)) {
+
+ global $CONFIG;
$errors = array();
@@ -280,6 +284,7 @@ $sql_statements = preg_split('/;[\n\r]+/', $script);
foreach($sql_statements as $statement) {
$statement = trim($statement);
+ $statement = str_replace("prefix_",$CONFIG->dbprefix,$statement);
if (!empty($statement)) {
$result = update_data($statement);
if ($result == false) {
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index ba2156242..1c5f8bb97 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -101,7 +101,7 @@ }
ob_start();
- foreach($viewlist as $view) {
+ foreach($viewlist as $priority => $view) {
if (!isset($CONFIG->views->locations[$view])) {
$location = $CONFIG->viewpath;
@@ -144,7 +144,7 @@ $CONFIG->views->extensions = array();
}
if (!isset($CONFIG->views->extensions[$view])) {
- $CONFIG->views[$view][500] = "{$view}";
+ $CONFIG->views->extensions[$view][500] = "{$view}";
}
while(isset($CONFIG->views->extensions[$view][$priority])) {
$priority++;
@@ -168,6 +168,8 @@ }
if (!isset($CONFIG->views->locations)) {
$CONFIG->views->locations = array($view => $location);
+ } else {
+ $CONFIG->views->locations[$view] = $location;
}
}
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 81f5757e9..a5027486d 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -25,8 +25,8 @@ if ($handle = opendir($CONFIG->pluginspath)) {
while ($mod = readdir($handle)) {
- if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($mod)) {
- if (!@include($ONFIG->pluginspath . $mod . "/start.php"))
+ if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
+ if (!@include($CONFIG->pluginspath . $mod . "/start.php"))
throw new PluginException("{$mod} is a misconfigured plugin.");
}
}
|