From 9707d708cb09159114ba49e8ccb785ecdf0715c9 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 1 Feb 2012 14:45:38 -0500 Subject: [PATCH] Formatting fixes --- src/index.php | 18 +++++++++--------- src/windows/add_db.php | 21 --------------------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/src/index.php b/src/index.php index 071c71f..556df0b 100644 --- a/src/index.php +++ b/src/index.php @@ -28,16 +28,16 @@ error_reporting(-1 & ~(E_STRICT | E_DEPRECATED)); function log_fatal() { // Catch the last error - $error = error_get_last(); + $error = error_get_last(); - // types of errors that are fatal - $fatal = array(E_ERROR, E_PARSE, E_RECOVERABLE_ERROR); + // types of errors that are fatal + $fatal = array(E_ERROR, E_PARSE, E_RECOVERABLE_ERROR); - // Display pretty error page - if(in_array($error['type'], $fatal)) - { - file_put_contents('errors.txt', print_r($error, TRUE), FILE_APPEND); - } + // Display pretty error page + if(in_array($error['type'], $fatal)) + { + file_put_contents('errors.txt', print_r($error, TRUE), FILE_APPEND); + } } register_shutdown_function('log_fatal'); @@ -45,7 +45,7 @@ register_shutdown_function('log_fatal'); // Make sure php-gtk works if ( ! class_exists('gtk')) { - die("Please load the php-gtk2 module in your php.ini\r\n"); + die("Please load the php-gtk2 module in your php.ini\r\n"); } // Set the stupid timezone so PHP shuts up. diff --git a/src/windows/add_db.php b/src/windows/add_db.php index 808f562..4f98074 100644 --- a/src/windows/add_db.php +++ b/src/windows/add_db.php @@ -74,37 +74,16 @@ class Add_DB extends GtkWindow { // Host { $this->_add_row($table, "DB Host", $this->host, $y1, $y2); - /*$hostlbl = new GtkLabel("DB Host"); - $this->host = new GtkEntry(); - $hostalign = new GtkAlignment(0, 0.5, 0, 0); - $hostalign->add($hostlbl); - - $table->attach($hostalign, 0, 1, ++$y1, ++$y2); - $table->attach($this->host, 1, 2, $y1, $y2);*/ } // Username { $this->_add_row($table, "DB User", $this->user, $y1, $y2); - /*$userlbl = new GtkLabel("DB User"); - $this->user = new GtkEntry(); - $useralign = new GtkAlignment(0, 0.5, 0, 0); - $useralign->add($userlbl); - - $table->attach($useralign, 0, 1, ++$y1, ++$y2); - $table->attach($this->user, 1, 2, $y1, $y2);*/ } // Password { $this->_add_row($table, "DB Password", $this->pass, $y1, $y2); - /*$passlbl = new GtkLabel("DB Password"); - $this->pass = new GtkEntry(); - $passalign = new GtkAlignment(0, 0.5, 0, 0); - $passalign->add($passlbl); - - $table->attach($passalign, 0, 1, ++$y1, ++$y2); - $table->attach($this->pass, 1, 2, $y1, $y2);*/ }