svn: /web/doc-editor/trunk/php/ File.php RepositoryManager.php

From: Date: Wed, 28 Apr 2010 04:25:41 +0000
Subject: svn: /web/doc-editor/trunk/php/ File.php RepositoryManager.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-1824@lists.php.net to get a copy of this message
mrkschan Wed, 28 Apr 2010 04:25:41 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298686 Log: rollback RepositoryManager, File->path is now matching the path in db.files table Changed paths: U web/doc-editor/trunk/php/File.php U web/doc-editor/trunk/php/RepositoryManager.php Modified: web/doc-editor/trunk/php/File.php =================================================================== --- web/doc-editor/trunk/php/File.php 2010-04-28 03:52:19 UTC (rev 298685) +++ web/doc-editor/trunk/php/File.php 2010-04-28 04:25:41 UTC (rev 298686) @@ -32,15 +32,19 @@ $this->lang = $lang = trim($lang, '/'); $this->name = $name = trim($name, '/'); - $this->path = $path = trim($path, '/'); + $path = trim($path, '/'); if (strlen($path) > 0) { + $this->path = "/$path/"; + $this->full_path = $appConf[$project]['vcs.path'].$lang.'/'.$path.'/'.$name; // The fallback file : if the file don't exist, we fallback to the EN file witch should always exist $this->full_path_fallback = $appConf[$project]['vcs.path'].'en/'.$path.'/'.$name; } else { + $this->path = '/'; + $this->full_path = $appConf[$project]['vcs.path'].$lang.'/'.$name; $this->full_path_fallback = $appConf[$project]['vcs.path'].'en/'.$name; } @@ -357,7 +361,7 @@ if( $type == 'vcs' ) { $output = VCSFactory::getInstance()->diff( - $this->lang."/".$this->path, + $this->lang.$this->path, $this->name, $options['rev1'], $options['rev2'] ); Modified: web/doc-editor/trunk/php/RepositoryManager.php =================================================================== --- web/doc-editor/trunk/php/RepositoryManager.php 2010-04-28 03:52:19 UTC (rev 298685) +++ web/doc-editor/trunk/php/RepositoryManager.php 2010-04-28 04:25:41 UTC (rev 298686) @@ -1300,9 +1300,9 @@ (!$file->exist() && !in_array(substr($name, -3), array('xml','ent')) && substr($name, -13) != 'PHPEditBackup') || strpos($name, 'entities.') === 0 - || $path == 'chmonly' || $path == 'internals' || $path == 'internals2' + || $path == '/chmonly/' || $path == '/internals/' || $path == '/internals2/' || $name == 'contributors.ent' || $name == 'contributors.xml' - || ($path == 'appendices' && ($name == 'reserved.constants.xml' || $name == 'extensions.xml')) + || ($path == '/appendices/' && ($name == 'reserved.constants.xml' || $name == 'extensions.xml')) || $name == 'README' || $name == 'DO_NOT_TRANSLATE' || $name == 'rsusi.txt' || $name == 'translation.xml' || $name == 'missing-ids.xml' || $name == 'license.xml' || $name == 'versions.xml' @@ -1472,7 +1472,7 @@ 'INSERT INTO files (project, lang, xmlid, path, name, revision, size, mdate, maintainer, status, check_oldstyle, check_undoc, check_roleerror, check_badorder, check_noseealso, check_noreturnvalues, check_noparameters, check_noexamples, check_noerrors) VALUES ("%s", "%s", "%s", "%s", "%s", "%s", %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', $am->project, - 'en', $xmlid, "/".$f->path."/", $f->name, $en_revision, $en_size, $en_date, 'NULL', 'NULL', + 'en', $xmlid, $f->path, $f->name, $en_revision, $en_size, $en_date, 'NULL', 'NULL', $ToolsCheckDocResult['check_oldstyle'], $ToolsCheckDocResult['check_undoc'], $ToolsCheckDocResult['check_roleerror'], @@ -1564,7 +1564,7 @@ 'INSERT INTO files (project, lang, xmlid, path, name, revision, en_revision, reviewed, size, size_diff, mdate, mdate_diff, maintainer, status) VALUES ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", %s, %s, %s, %s, "%s", "%s")', $project, - $lang, $xmlid, "/".$lang_file->path."/", $lang_file->name, + $lang, $xmlid, $lang_file->path, $lang_file->name, $revision, $en_revision, $reviewed, $size, $size_diff, $date, $date_diff, $maintainer, $status @@ -1587,7 +1587,7 @@ VALUES ("%s", "%s", "%s", "%s", %s)', $project, $lang, - "/".$lang_file->path."/", + $lang_file->path, $lang_file->name, $en_size ); @@ -1597,7 +1597,7 @@ } foreach ($dirs as $d) { - $this->applyRevCheck("/".$d->path."/".$d->name."/", $revType, $revLang); + $this->applyRevCheck($d->path.$d->name.'/', $revType, $revLang); } } @closedir($dh);

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