Formatting fixes
This commit is contained in:
parent
afcc722449
commit
9707d708cb
@ -28,16 +28,16 @@ error_reporting(-1 & ~(E_STRICT | E_DEPRECATED));
|
|||||||
function log_fatal()
|
function log_fatal()
|
||||||
{
|
{
|
||||||
// Catch the last error
|
// Catch the last error
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
|
|
||||||
// types of errors that are fatal
|
// types of errors that are fatal
|
||||||
$fatal = array(E_ERROR, E_PARSE, E_RECOVERABLE_ERROR);
|
$fatal = array(E_ERROR, E_PARSE, E_RECOVERABLE_ERROR);
|
||||||
|
|
||||||
// Display pretty error page
|
// Display pretty error page
|
||||||
if(in_array($error['type'], $fatal))
|
if(in_array($error['type'], $fatal))
|
||||||
{
|
{
|
||||||
file_put_contents('errors.txt', print_r($error, TRUE), FILE_APPEND);
|
file_put_contents('errors.txt', print_r($error, TRUE), FILE_APPEND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
register_shutdown_function('log_fatal');
|
register_shutdown_function('log_fatal');
|
||||||
@ -45,7 +45,7 @@ register_shutdown_function('log_fatal');
|
|||||||
// Make sure php-gtk works
|
// Make sure php-gtk works
|
||||||
if ( ! class_exists('gtk'))
|
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.
|
// Set the stupid timezone so PHP shuts up.
|
||||||
|
@ -74,37 +74,16 @@ class Add_DB extends GtkWindow {
|
|||||||
// Host
|
// Host
|
||||||
{
|
{
|
||||||
$this->_add_row($table, "DB Host", $this->host, $y1, $y2);
|
$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
|
// Username
|
||||||
{
|
{
|
||||||
$this->_add_row($table, "DB User", $this->user, $y1, $y2);
|
$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
|
// Password
|
||||||
{
|
{
|
||||||
$this->_add_row($table, "DB Password", $this->pass, $y1, $y2);
|
$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);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user