From: Antoine Musso Date: Thu, 25 Oct 2012 11:14:24 +0000 (+0200) Subject: sql.php in interactive no more exit on DBerror X-Git-Tag: 1.31.0-rc.0~21870^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=0e7d61dd9f2a3d19cd8cfe8d764881692646c83f;p=lhc%2Fweb%2Fwiklou.git sql.php in interactive no more exit on DBerror This patch make it so that after a DBerror a new prompt is shown to the user. Save us from having to relaunch sql.php. Change-Id: Id3df3df87f6fe7b2aea31e0526c5ff697bc5832c --- diff --git a/maintenance/sql.php b/maintenance/sql.php index 04e98d918d..e8e8cb40dc 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -80,7 +80,8 @@ class MwSql extends Maintenance { $this->sqlPrintResult( $res, $dbw ); $wholeLine = ''; } catch (DBQueryError $e) { - $this->error( $e, true ); + $doDie = ! Maintenance::posix_isatty( 0 ); + $this->error( $e, $doDie ); } } }