svn: /web/doc-editor/trunk/scripts/cron/ check_build.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Tue, 25 Oct 2011 15:38:50 +0000

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

Log:
don't try to check the build for exclude language

Changed paths:
    U   web/doc-editor/trunk/scripts/cron/check_build.php

Modified: web/doc-editor/trunk/scripts/cron/check_build.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/check_build.php	2011-10-25 15:08:21 UTC (rev 318405)
+++ web/doc-editor/trunk/scripts/cron/check_build.php	2011-10-25 15:38:50 UTC (rev 318406)
@@ -44,6 +44,11 @@
     // For all language, we check the build
     foreach ($existingLanguage as $lang) {

+        if( in_array($lang, $dontSendEmail) ) {
+            echo "Exclude build for this language\n";
+            continue;
+        }
+
         echo "check lang : ".$lang["code"]."\n";

         $lang = $lang["code"];
@@ -57,10 +62,8 @@
             // What we must do when the build failed
             if( $return["state"] == "ko" ) {

-                if( ! in_array($lang, $dontSendEmail) ) {
+                $msg = "Your documentation is broken. The build is done on Friday.

-                    $msg = "Your documentation is broken. The build is done on Friday.
-
         Please, try to fix it *quickly*.

         Here is the output of the configure.php script :
@@ -73,18 +76,17 @@
         This email is send automatically by the Php Docbook Online Editor.
         ";

-                    //Usefull for language like pt_BR for example, because doc-pt_br don't exist, it's doc-pt-br
-                    $emailLang = str_replace("_", "-", strtolower($lang));
+                //Usefull for language like pt_BR for example, because doc-pt_br don't exist, it's doc-pt-br
+                $emailLang = str_replace("_", "-", strtolower($lang));

-                    $to = ( $lang === 'en' ) ? "[email protected]" : "[email protected]";
+                $to = ( $lang === 'en' ) ? "[email protected]" : "[email protected]";

-                    $subject = "[DOC-".strtoupper($emailLang)."] - Your documentation is broken";
+                $subject = "[DOC-".strtoupper($emailLang)."] - Your documentation is broken";

-                    // We send an email for this failed build
-                    AccountManager::getInstance()->email($to, $subject, $msg, $to, 'list');
+                // We send an email for this failed build
+                AccountManager::getInstance()->email($to, $subject, $msg, $to, 'list');

-                    echo "email send !\n";
-                }
+                echo "email send !\n";

                 // We store it into DB
                 LogManager::getInstance()->saveFailedBuild($lang, $return["logContent"]);
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.