svn: /web/doc-editor/trunk/ php/Conf.php php/RepositoryManager.php php/conf/conf.ini scripts/cron/check_build.php scripts/cron/check_entities.php scripts/cron/update_data.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Thu, 22 Apr 2010 11:17:08 +0000

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

Log:
Revert. Specify the php binary path on cmd who use it

Changed paths:
    U   web/doc-editor/trunk/php/Conf.php
    U   web/doc-editor/trunk/php/RepositoryManager.php
    _U  web/doc-editor/trunk/php/conf/
    U   web/doc-editor/trunk/php/conf/conf.ini
    U   web/doc-editor/trunk/scripts/cron/check_build.php
    U   web/doc-editor/trunk/scripts/cron/check_entities.php
    U   web/doc-editor/trunk/scripts/cron/update_data.php

Modified: web/doc-editor/trunk/php/Conf.php
===================================================================
--- web/doc-editor/trunk/php/Conf.php	2010-04-22 11:16:49 UTC (rev 298307)
+++ web/doc-editor/trunk/php/Conf.php	2010-04-22 11:17:08 UTC (rev 298308)
@@ -27,6 +27,11 @@

         // First, we load the global configuration file
         $this->conf['GLOBAL_CONFIGURATION'] = parse_ini_file($p."conf.ini");
+
+        if( is_file($p."localConf.ini") ) {
+            $this->conf['GLOBAL_CONFIGURATION'] = array_merge( $this->conf['GLOBAL_CONFIGURATION'], parse_ini_file($p."localConf.ini") );
+        }
+
         // We fix the data path here
         $this->conf['GLOBAL_CONFIGURATION']['data.path'] = realpath(dirname(__FILE__).'/../'.$this->conf['GLOBAL_CONFIGURATION']['data.path']).'/';


Modified: web/doc-editor/trunk/php/RepositoryManager.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryManager.php	2010-04-22 11:16:49 UTC (rev 298307)
+++ web/doc-editor/trunk/php/RepositoryManager.php	2010-04-22 11:17:08 UTC (rev 298308)
@@ -306,10 +306,9 @@

     /**
      * Check the build of the documentation (using configure.php script).
-     * PHP binary should be in /usr/bin
      *
      * @param $lang The lang of the documentation we want to check the build. We must take out $lang to be able to use this method from cron script on multiple language
-     * @param $enable_xml_details Indicate whether the checking includes xml-details
+     * @param $enable_xml_details Indicate whether the check cmd include xml-details option
      * @return The output log.
      */
     public function checkBuild($lang, $enable_xml_details="false")
@@ -323,8 +322,8 @@
             "logContent" => ""
         );

-        $cmd = 'cd '.realpath($appConf[$project]['vcs.configure.script.path']).';'
-              .'./configure.php '
+        $cmd = 'cd '.realpath($appConf[$project]['vcs.configure.script.path']).';'.
+              $appConf['GLOBAL_CONFIGURATION']['php.bin'].' configure.php '
               .$appConf[$project]['vcs.configure.script.options'];

         $cmd = str_replace("{LangCode}", $lang, $cmd).';';


Property changes on: web/doc-editor/trunk/php/conf
___________________________________________________________________
Added: svn:ignore
   + localConf.ini


Modified: web/doc-editor/trunk/php/conf/conf.ini
===================================================================
--- web/doc-editor/trunk/php/conf/conf.ini	2010-04-22 11:16:49 UTC (rev 298307)
+++ web/doc-editor/trunk/php/conf/conf.ini	2010-04-22 11:17:08 UTC (rev 298308)
@@ -10,4 +10,6 @@

 vcs.type = svn

-data.path = "data/"
\ No newline at end of file
+data.path = "data/"
+
+php.bin = "/usr/bin/php"
\ No newline at end of file

Modified: web/doc-editor/trunk/scripts/cron/check_build.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/check_build.php	2010-04-22 11:16:49 UTC (rev 298307)
+++ web/doc-editor/trunk/scripts/cron/check_build.php	2010-04-22 11:17:08 UTC (rev 298308)
@@ -1,11 +1,10 @@
-#!/usr/bin/env php
 <?php

 /***
 * This script is intended to be placed in a cronjob.
 * It must be run every Thursday, at 01hOO for example.
 * On Unix, you can use crontab -e and place this :
-* 00 01 * * 4 /path/to/your/vcs/dir/doc-editor/scripts/cron/check_build.php
+* 00 01 * * 4 /path/php/binary /path/to/your/vcs/dir/doc-editor/scripts/cron/check_build.php
 ****/

 require_once dirname(__FILE__) . '/../../php/Conf.php';

Modified: web/doc-editor/trunk/scripts/cron/check_entities.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/check_entities.php	2010-04-22 11:16:49 UTC (rev 298307)
+++ web/doc-editor/trunk/scripts/cron/check_entities.php	2010-04-22 11:17:08 UTC (rev 298308)
@@ -1,11 +1,10 @@
-#!/usr/bin/env php
 <?php

 /***
 * This script is intended to be placed in a cronjob.
 * It must be run every Thursday, at 01hOO for example.
 * On Unix, you can use crontab -e and place this :
-* 00 01 * * 4 /path/to/your/vcs/dir/doc-editor/scripts/cron/check_entities.php
+* 00 01 * * 4 /path/php/binary /path/to/your/vcs/dir/doc-editor/scripts/cron/check_entities.php
 ****/

 require_once dirname(__FILE__) . '/../../php/Conf.php';

Modified: web/doc-editor/trunk/scripts/cron/update_data.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/update_data.php	2010-04-22 11:16:49 UTC (rev 298307)
+++ web/doc-editor/trunk/scripts/cron/update_data.php	2010-04-22 11:17:08 UTC (rev 298308)
@@ -1,11 +1,10 @@
-#!/usr/bin/env php
 <?php

 /***
 * This script is intended to be placed in a cronjob.
 * It must be run every day, at 00hOO for example.
 * On Unix, you can use crontab -e and place this :
-* 00 00 * * * /path/to/your/vcs/dir/doc-editor/scripts/cron/update_data.php
+* 00 00 * * * /path/php/binary /path/to/your/vcs/dir/doc-editor/scripts/cron/update_data.php
 ****/

 require_once dirname(__FILE__) . '/../../php/Conf.php';
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.