svn: /web/doc-editor/trunk/php/ class.php
| From: | Yannick Torres | Date: | Wed, 11 Nov 2009 21:39:42 +0000 |
| Subject: | svn: /web/doc-editor/trunk/php/ class.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-1144@lists.php.net to get a copy of this message | ||
yannick Wed, 11 Nov 2009 21:39:42 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290547
Log:
Remove updateRev's method from class.php. This method is present in RepositoryManager.php as
updateFileInfo's method
Changed paths:
U web/doc-editor/trunk/php/class.php
Modified: web/doc-editor/trunk/php/class.php
===================================================================
--- web/doc-editor/trunk/php/class.php 2009-11-11 21:35:42 UTC (rev 290546)
+++ web/doc-editor/trunk/php/class.php 2009-11-11 21:39:42 UTC (rev 290547)
@@ -1385,96 +1385,6 @@
}
/**
- * Update information about a file after his commit (update informations added with revcheck
tools).
- *
- * @param $nodes An array of files.
- */
- function updateRev($nodes) {
-
- for ($i = 0; $i < count($nodes); $i++ ) {
-
- $FileLang = $nodes[$i]['lang'];
-
- $FilePath = $nodes[$i]['path'];
- $FileName = $nodes[$i]['name'];
-
- //En file ?
- if ($FileLang == 'en' ) {
-
- $path = DOC_EDITOR_CVS_PATH.'en'.$FilePath.$FileName;
- $content = file_get_contents($path);
- $info = $this->getInfoFromContent($content);
- $size = intval(filesize($path) / 1024);
- $date = filemtime($path);
-
- // For the EN file
- $s = sprintf('UPDATE
files
- SET
- revision = "%s",
- size = "%s",
- mdate = "%s"
-
- WHERE
- lang = "%s" AND
- path = "%s" AND
- name = "%s"
- ',$info['rev'], $size, $date, $FileLang, $FilePath, $FileName);
- $this->db->query($s) or die($this->db->error.'|'.$s);
-
- // For all LANG file
- $s = sprintf('UPDATE files
- SET
- en_revision = "%s"
-
- WHERE
- lang != "%s" AND
- path = "%s" AND
- name = "%s"
- ', $info['rev'], $FileLang, $FilePath, $FileName);
- $this->db->query($s) or die($this->db->error.'|'.$s);
-
-
- } else {
-
- $path = DOC_EDITOR_CVS_PATH.$FileLang.$FilePath.$FileName;
- $content = file_get_contents($path);
- $info = $this->getInfoFromContent($content);
- $size = intval(filesize($path) / 1024);
- $date = filemtime($path);
-
-
- $pathEN = DOC_EDITOR_CVS_PATH.'en'.$FilePath.$FileName;
- $sizeEN = intval(filesize($pathEN) / 1024);
- $dateEN = filemtime($pathEN);
-
- $size_diff = $sizeEN - $size;
- $date_diff = (intval((time() - $dateEN) / 86400)) - (intval((time() - $date) /
86400));
-
- $s = sprintf('UPDATE files
- SET
- revision = "%s",
- reviewed = "%s",
- size = "%s",
- mdate = "%s",
- maintainer = "%s",
- status = "%s",
- size_diff = "%s",
- mdate_diff = "%s"
-
- WHERE
- lang = "%s" AND
- path = "%s" AND
- name = "%s"
- ',$info['en-rev'], $info['reviewed'], $size, $date,
$info['maintainer'], $info['status'], $size_diff, $date_diff, $FileLang,
$FilePath, $FileName);
- $this->db->query($s) or die($this->db->error.'|'.$s);
- }
-
- //$this->debug('in updateRev() ; DB query : '.$s);
-
- }
- }
-
- /**
* Print debug information into a file (.debug) into data folder.
*
* @param $mess The debug message.