cvs: pear /DB_Sqlite_Tools Tools.php

From: Date: Mon, 30 Aug 2004 14:18:50 +0000
Subject: cvs: pear /DB_Sqlite_Tools Tools.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23504@lists.php.net to get a copy of this message
gurugeek Mon Aug 30 10:18:50 2004 EDT Modified files: /pear/DB_Sqlite_Tools Tools.php Log: XMLdump: added support for safecopy, it is not very safe to export working on a current live database during the export operation. It is now mandatory to run copySafe first, obtain a valid clone of the database and work on the fresh clone.(David) http://cvs.php.net/diff.php/pear/DB_Sqlite_Tools/Tools.php?r1=1.9&r2=1.10&ty=u Index: pear/DB_Sqlite_Tools/Tools.php diff -u pear/DB_Sqlite_Tools/Tools.php:1.9 pear/DB_Sqlite_Tools/Tools.php:1.10 --- pear/DB_Sqlite_Tools/Tools.php:1.9 Sat Aug 28 19:21:47 2004 +++ pear/DB_Sqlite_Tools/Tools.php Mon Aug 30 10:18:50 2004 @@ -17,7 +17,7 @@ // | Authors: David Costa <gurugeek@php.net> | // +----------------------------------------------------------------------+ // -// \$Id: Tools.php,v 1.9 2004/08/28 23:21:47 gurugeek Exp $ $ +// \$Id: Tools.php,v 1.10 2004/08/30 14:18:50 gurugeek Exp $ $ /** * Class to manage sqlite database. On object-oriented interface to @@ -29,7 +29,7 @@ * @author Ashley Hewson <morbidness@gmail.com> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version @VER@ - * @version $Id: Tools.php,v 1.9 2004/08/28 23:21:47 gurugeek Exp $ + * @version $Id: Tools.php,v 1.10 2004/08/30 14:18:50 gurugeek Exp $ * */ @@ -52,7 +52,7 @@ * @author David Costa <gurugeek@php.net> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version @VER@ - * @version $Id: Tools.php,v 1.9 2004/08/28 23:21:47 gurugeek Exp $ + * @version $Id: Tools.php,v 1.10 2004/08/30 14:18:50 gurugeek Exp $ * * @ */ @@ -861,10 +861,14 @@ * @throws PEAR exception on failure */ - public function createXMLDumps() + public function createXMLDumps($path ='') { - foreach($this->database as $database) { - $XMLFile = @fopen("$database.xml", "w"); + if ($this->safecopy == false) { + throw new DB_Sqlite_Tools_Exception(self::DB_SQLITE_TOOLS_INSC, -1); + } + $this->scanBackupDir(); + foreach($this->backupar as $database) { + $XMLFile = @fopen($path."$database.xml", "w"); if (!$XMLFile) { throw new DB_Sqlite_Tools_Exception(self::DB_SQLITE_TOOLS_CCXML."$database.xml", -1); }

« previous php.pear.cvs (#23504) next »