From: Dan F. <dfr...@cs...> - 2005-02-18 21:09:26
|
I agree with David Howland that the right thing to do is to not even run (or produce only a page showing a warning, but no edit buttons, etc.) until the setting is proper. I'd start the setting with a blank or with "./files" or something. Of course, since I'm not willing to dive into the code to change it at this point, my voice is not as authoritative. :) However, I still figure it helps the project as a whole to apply pressure for the right solution. Dan Joel Uckelman wrote: >Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB >In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24337 > >Modified Files: > dba.php file.php >Log Message: >Re-enabled /tmp warnings to save those who choose not to read the > instructions. > > >Index: dba.php >=================================================================== >RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/dba.php,v >retrieving revision 1.4 >retrieving revision 1.5 >diff -u -2 -b -p -d -r1.4 -r1.5 >--- dba.php 21 Nov 2004 11:59:25 -0000 1.4 >+++ dba.php 18 Feb 2005 20:41:28 -0000 1.5 >@@ -13,14 +13,6 @@ class WikiDB_dba extends WikiDB > > if (empty($dbparams['directory']) >- || preg_match('@^/tmp\b@', $dbparams['directory'])) { >- $this->_warnings >- = sprintf(_("DBA files are in the %s directory. Please read the INSTALL file and move the DB file to a permanent location or risk losing all the pages!"),'/tmp'); >- } >- else >- $this->_warnings = false; >- } >- >- function genericWarnings () { >- return $this->_warnings; >+ || preg_match('@^/tmp\b@', $dbparams['directory'])) >+ trigger_error(_("DBA files are in the /tmp directory. Please read the INSTALL file and move the database to a permanent location or risk losing all the pages!"), E_USER_WARNING); > } > }; > >Index: file.php >=================================================================== >RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/file.php,v >retrieving revision 1.4 >retrieving revision 1.5 >diff -u -2 -b -p -d -r1.4 -r1.5 >--- file.php 4 Jan 2003 03:41:46 -0000 1.4 >+++ file.php 18 Feb 2005 20:41:28 -0000 1.5 >@@ -42,4 +42,8 @@ class WikiDB_file extends WikiDB > $backend = new WikiDB_backend_file( $dbparams ); > $this->WikiDB($backend, $dbparams); >+ >+ if (empty($dbparams['directory']) >+ || preg_match('@^/tmp\b@', $dbparams['directory'])) >+ trigger_error(_("Page files are in the /tmp directory. Please read the INSTALL file and move the database to a permanent location or risk losing all the pages!"), E_USER_WARNING); > } > } >@@ -47,4 +51,8 @@ class WikiDB_file extends WikiDB > > // $Log$ >+// Revision 1.5 2005/02/18 20:41:28 uckelman >+// Re-enabled /tmp warnings to save those who choose not to read the >+// instructions. >+// > // Revision 1.4 2003/01/04 03:41:46 wainstead > // Added copyleft flowerboxes > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >phpwiki-checkins mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins > > |