svn: /web/doc-editor/trunk/ php/RepositoryManager.php scripts/cron/update_data.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Wed, 16 Feb 2011 22:30:25 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308407
Log:
Calculate the static version for revcheck script after each update
Changed paths:
U web/doc-editor/trunk/php/RepositoryManager.php
U web/doc-editor/trunk/scripts/cron/update_data.php
Modified: web/doc-editor/trunk/php/RepositoryManager.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryManager.php 2011-02-16 22:27:57 UTC (rev 308406)
+++ web/doc-editor/trunk/php/RepositoryManager.php 2011-02-16 22:30:25 UTC (rev 308407)
@@ -1970,6 +1970,26 @@
$db->query($s);
}
}
+
+ public function applyStaticRevcheck()
+ {
+ $am = AccountManager::getInstance();
+ $appConf = $am->appConf;
+ $project = $am->project;
+
+ $ExistingLanguage = $this->getExistingLanguage();
+
+ foreach( $ExistingLanguage as $lang ) {
+
+ $lang = $lang["code"];
+ if( $lang == 'en' ) { continue; }
+
+ $cmd = 'cd '.$appConf[$project]['vcs.path'].' && '
+ .$appConf['GLOBAL_CONFIGURATION']['php.bin'].' doc-base/scripts/revcheck.php '.$lang.' > '.$appConf['GLOBAL_CONFIGURATION']['data.path'].'revcheck/'.$lang.'.html';
+
+ exec("$cmd 2>&1");
+ }
+ }
}
?>
Modified: web/doc-editor/trunk/scripts/cron/update_data.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/update_data.php 2011-02-16 22:27:57 UTC (rev 308406)
+++ web/doc-editor/trunk/scripts/cron/update_data.php 2011-02-16 22:30:25 UTC (rev 308407)
@@ -76,6 +76,12 @@
TranslationStatistic::getInstance()->computeSummary('all');
TranslatorStatistic::getInstance()->computeSummary('all');
+ // We start the revcheck's script to make a static page into data/revcheck/ directory
+ // Only for php project
+ if( $project['code'] == 'php' ) {
+ $rm->applyStaticRevcheck();
+ }
+
// Store this info
$info = array();
$info['user'] = 'root';