svn: /web/doc-editor/trunk/php/ class.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Wed, 11 Nov 2009 21:44:22 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290549
Log:
Remove doCheckOldFiles's method from class.php. This method is present in RepositoryManager.php as doUpdateNotInEN'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:40:56 UTC (rev 290548)
+++ web/doc-editor/trunk/php/class.php 2009-11-11 21:44:22 UTC (rev 290549)
@@ -265,65 +265,6 @@
}
/**
- * Analyse all files to check if the LANG files is present into EN tree or not.
- *
- * @param $dir The analysed dir.
- * @param $lang The tested lang.
- *
- */
- function doCheckOldFiles($dir = '', $lang) {
-
- if ($dh = @opendir(DOC_EDITOR_CVS_PATH . $lang . $dir)) {
-
- $entriesDir = array();
- $entriesFiles = array();
-
- while (($file = readdir($dh)) !== false) {
- if ( !$this->isParsed($lang, $dir, $file) ) {
- continue;
- }
-
- if ($file != '.' && $file != '..' && $file != 'CVS' && $dir != '/functions') {
-
- if (is_dir(DOC_EDITOR_CVS_PATH . $lang . $dir.'/' .$file)) {
- $entriesDir[] = $file;
- } elseif (is_file(DOC_EDITOR_CVS_PATH . $lang . $dir.'/' .$file)) {
- $entriesFiles[] = $file;
- }
- }
- }
-
- // Files first
- if (!empty($entriesFiles)) {
- foreach($entriesFiles as $file) {
- $path_en = DOC_EDITOR_CVS_PATH . 'en/' . $dir . '/' . $file;
- $path = DOC_EDITOR_CVS_PATH . $lang . $dir . '/' . $file;
-
- if (!@is_file($path_en)) {
- $size = intval(filesize($path) / 1024);
-
- $s = sprintf('INSERT INTO `files` (`lang`, `path`, `name`, `status`) VALUES (%s, %s, %s, %s)',
- "'".$lang."'",
- "'$dir/'",
- "'$file'",
- "'NotInEN'"
- );
- $this->db->query($s) or die('Error: '.$this->db->error.'|'.$s);
- }
- }
- }
-
- // Directories..
- if (!empty($entriesDir)) {
- foreach ($entriesDir as $Edir) {
- $this->doCheckOldFiles($dir . '/' . $Edir, $lang);
- }
- }
- }
- @closedir($dh);
- }
-
- /**
* Test if the file is a modified file.
*
* @param $lang The lang of the tested file.