diff --git a/OpenSQLManager.php b/OpenSQLManager.php index d3fd383..a8a900a 100644 --- a/OpenSQLManager.php +++ b/OpenSQLManager.php @@ -182,6 +182,14 @@ class OpenSQLManager extends \wxApp { \wxExit(); return 0; } + + /** + * Handle Fatal Exceptions + */ + public function OnFatalException($e) + { + file_put_contents('errors.txt', print_r($e, TRUE), FILE_APPEND); + } } // Create the app instance diff --git a/sys/common/db_reg.php b/sys/common/db_reg.php index 852e349..4eb4386 100644 --- a/sys/common/db_reg.php +++ b/sys/common/db_reg.php @@ -21,8 +21,8 @@ namespace OpenSQLManager; * Decouples the Settings class from the query builder * and organizes database connections * - * @package Query - * @subpackage Helper Classes + * @package OpenSQLManager + * @subpackage Common */ class DB_Reg { diff --git a/sys/common/functions.php b/sys/common/functions.php index 82d587e..fb7be5e 100644 --- a/sys/common/functions.php +++ b/sys/common/functions.php @@ -12,8 +12,13 @@ */ // -------------------------------------------------------------------------- -// ! Global Functions -// -------------------------------------------------------------------------- + +/** + * Global Functions + * + * @package OpenSQLManager + * @subpackage Common + */ namespace OpenSQLManager; diff --git a/sys/common/settings.php b/sys/common/settings.php index 95989e2..b0026c1 100644 --- a/sys/common/settings.php +++ b/sys/common/settings.php @@ -18,8 +18,8 @@ namespace OpenSQLManager; /** * Class for manipulating datbase connections, and miscellaneous settings * - * @package Query - * @subpackage Helper Classes + * @package OpenSQLManager + * @subpackage Common */ class Settings { diff --git a/sys/widgets/connection_sidebar.php b/sys/widgets/connection_sidebar.php index 285822b..886ceeb 100644 --- a/sys/widgets/connection_sidebar.php +++ b/sys/widgets/connection_sidebar.php @@ -174,51 +174,13 @@ class Connection_Sidebar extends \wxPanel { * @return void */ private function _layout() - { - // Create an ImageList - /*\wxBitmap::InitStandardHandlers(); - $img_list = new \wxImageList(); - $img_list->Add(new \wxBitmap(BASE_DIR . '/images/firebirdlogo32.xpm', wxBITMAP_TYPE_XPM)); - $img_list->Add(new \wxBitmap(BASE_DIR . '/images/mysqllogo32.xpm', wxBITMAP_TYPE_XPM)); - $img_list->Add(new \wxBitmap(BASE_DIR . '/images/posgresqllogo32.xpm', wxBITMAP_TYPE_XPM)); - $img_list->Add(new \wxBitmap(file_get_contents(BASE_DIR . '/images/sqlitelogo32.xpm'), wxBITMAP_TYPE_XPM_DATA));*/ - + { // Add the actual connections $conns = $this->settings->get_dbs(); foreach($conns as $c) { - /*switch($c->type) - { - case "firebird": - $img_num = 0; - break; - - case "mysql": - $img_num = 1; - break; - - case "pgsql": - $img_num = 2; - break; - - case "sqlite": - $img_num = 3; - break; - - default: - $img_num = NULL; - break; - }*/ - - /*if ( ! is_null($img_num)) - { - $this->list->InsertItem(0, $c->name, 0); - } - else - {*/ - $this->list->InsertItem(0, $c->name); - //} + $this->list->InsertItem(0, $c->name); } } }