svn: /web/doc-editor/trunk/ README php/conf.inc.php

[email protected] (Chan Ka Shing)
Newsgroups php.doc.web
Message-ID <[email protected]>
mrkschan                                 Tue, 01 Dec 2009 07:10:17 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=291541

Log:
allow local.conf.inc.php to override config in conf.inc.php

Changed paths:
    U   web/doc-editor/trunk/README
    U   web/doc-editor/trunk/php/conf.inc.php

Modified: web/doc-editor/trunk/README
===================================================================
--- web/doc-editor/trunk/README	2009-12-01 07:04:31 UTC (rev 291540)
+++ web/doc-editor/trunk/README	2009-12-01 07:10:17 UTC (rev 291541)
@@ -26,7 +26,7 @@
   - Default data directory location: doc-editor/data

 == The Database ==
-* Create a MySQL database as per php/config.inc.php
+* Create a MySQL database as per php/config.inc.php [If you're a developer and don't want to overwrite the default config, create a file local.conf.inc.php that can override the config
 * Import install/doc-editor.sql into this new database
 * Setup configuration options inside php/config.inc.php


Modified: web/doc-editor/trunk/php/conf.inc.php
===================================================================
--- web/doc-editor/trunk/php/conf.inc.php	2009-12-01 07:04:31 UTC (rev 291540)
+++ web/doc-editor/trunk/php/conf.inc.php	2009-12-01 07:10:17 UTC (rev 291541)
@@ -1,5 +1,11 @@
 <?php

+if (file_exists(dirname(__FILE__) . '/local.conf.inc.php')) {
+
+    require_once dirname(__FILE__) . '/local.conf.inc.php';
+
+} else {
+
 /**
  * WWW user
  */
@@ -67,3 +73,7 @@
  * VCS checkout path
  */
 define('DOC_EDITOR_VCS_PATH', DOC_EDITOR_DATA_PATH . DOC_EDITOR_VCS_MODULE . '/');
+
+}
+
+?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.