svn: /web/doc-editor/trunk/php/ class.php

From: Date: Wed, 11 Nov 2009 21:40:56 +0000
Subject: svn: /web/doc-editor/trunk/php/ class.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-1145@lists.php.net to get a copy of this message
yannick Wed, 11 Nov 2009 21:40:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=290548 Log: Remove revParseTranslation's method from class.php. This method is present in RepositoryManager.php as updateTranslatorInfo'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:39:42 UTC (rev 290547) +++ web/doc-editor/trunk/php/class.php 2009-11-11 21:40:56 UTC (rev 290548) @@ -324,60 +324,6 @@ } /** - * Parse the translation's file witch hold all informations about all translators and put it into database. - */ - function revParseTranslation() { - - reset($this->availableLanguage); - while (list(, $lang) = each($this->availableLanguage)) { - - // Path to find translation.xml file, set default values, - // in case we can't find the translation file - $translation_xml = DOC_EDITOR_CVS_PATH . $lang . "/translation.xml"; - - if (file_exists($translation_xml)) { - // Else go on, and load in the file, replacing all - // space type chars with one space - $txml = preg_replace('/\\s+/', ' ', join('', file($translation_xml))); - - } - - if (isset($txml)) { - // Find all persons matching the pattern - $matches = array(); - if (preg_match_all('!<person (.+)/\\s?>!U', $txml, $matches)) { - $default = array('cvs' => 'n/a', 'nick' => 'n/a', 'editor' => 'n/a', 'email' => 'n/a', 'name' => 'n/a'); - $persons = $this->revParseAttrString($matches[1]); - - $charset = $this->getFileEncoding($txml, 'content'); - - foreach ($persons as $person) { - - if ($charset == 'utf-8' ) { - $name = utf8_decode($person['name']); - } else { - $name = $person['name']; - } - - $person = array_merge($default, $person); - - $s = sprintf('INSERT INTO translators (lang, nick, name, mail, cvs, editor) VALUES ("%s", "%s", "%s", "%s", "%s", "%s")', - $lang, - $this->db->real_escape_string($person['nick']), - $this->db->real_escape_string($name), - $this->db->real_escape_string($person['email']), - $this->db->real_escape_string($person['cvs']), - $this->db->real_escape_string($person['editor']) - ); - - $this->db->query($s) or die('Error: '.$this->db->error.'|'.$s); - } - } - } - } - } - - /** * Test if the file is a modified file. * * @param $lang The lang of the tested file.

« previous php.doc.web (#1145) next »