Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Database fixes.

  • Loading branch information...
commit e337367cefb93010fb0b7e36c94cf91705a6ab0e 1 parent 8c71bab
@VxMxPx authored
View
28 system/core/avrelia.php
@@ -93,6 +93,20 @@ public function init()
# Error Handling
set_error_handler('avreliaErrorHandler');
+ # Init the input
+ Input::Init();
+
+ # Set default language
+ Language::SetDefaults(Cfg::Get('system/languages'));
+
+ # MUST be called before we can use Plugs.
+ Plug::Init(Cfg::Get('plug/enabled'));
+
+ # Now scan and autoload plugs
+ if (Cfg::Get('plug/enabled')) {
+ Plug::Inc(Cfg::Get('plug/auto_load'));
+ }
+
# Trigger event after framework initialization
Event::Trigger('avrelia.after.init');
@@ -110,12 +124,6 @@ public function boot()
# We will decide where to go from here...
Event::Trigger('avrelia.before.boot');
- # Init the input
- Input::Init();
-
- # Set default language
- Language::SetDefaults(Cfg::Get('system/languages'));
-
# Is application offline?
if (Cfg::Get('system/offline') === true) {
$message = Cfg::Get('system/offline_message');
@@ -125,14 +133,6 @@ public function boot()
HTTP::Status503_ServiceUnavailable($message);
}
- # MUST be called before we can use Plugs.
- Plug::Init(Cfg::Get('plug/enabled'));
-
- # Now scan and autoload plugs
- if (Cfg::Get('plug/enabled')) {
- Plug::Inc(Cfg::Get('plug/auto_load'));
- }
-
$requestUri = trim(Input::GetRequestUri(false), '/');
$routeCall = '';
$found = false;
View
2  system/plugs/database/database.php
@@ -47,7 +47,7 @@ public static function _DoInit()
public static function _DoEnable()
{
self::LoadDriver();
- self::$Driver->_create();
+ return self::$Driver->_create();
}
//-
View
3  system/plugs/database/database_query.php
@@ -560,8 +560,7 @@ private function prepare()
if ($this->group) {
$sql .= ' GROUP BY ' . $this->group;
}
-if ($this->joins) {
- dumpVar($sql); }
+
return $sql;
}
//-
View
14 system/plugs/database/database_statement.php
@@ -78,13 +78,15 @@ public function replace($statement)
*/
public function bind($key, $val=false)
{
- if (is_array($key)) {
- foreach ($key as $k => $v) {
- $this->Bind[$k] = $v;
+ if ($key) {
+ if (is_array($key)) {
+ foreach ($key as $k => $v) {
+ $this->Bind[$k] = $v;
+ }
+ }
+ else {
+ $this->Bind[$key] = $val;
}
- }
- else {
- $this->Bind[$key] = $val;
}
return $this;
Please sign in to comment.
Something went wrong with that request. Please try again.