svn: /web/doc-editor/trunk/ error_type.php php/ToolsError.php
| From: | Yannick Torres | Date: | Sun, 31 Jan 2010 23:16:38 +0000 |
| Subject: | svn: /web/doc-editor/trunk/ error_type.php php/ToolsError.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-1502@lists.php.net to get a copy of this message | ||
yannick Sun, 31 Jan 2010 23:16:38 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=294286
Log:
Take care of the errorSkipNbLiteralTag option to display errors when we check a file on the fly
Changed paths:
U web/doc-editor/trunk/error_type.php
U web/doc-editor/trunk/php/ToolsError.php
Modified: web/doc-editor/trunk/error_type.php
===================================================================
--- web/doc-editor/trunk/error_type.php 2010-01-31 22:54:00 UTC (rev 294285)
+++ web/doc-editor/trunk/error_type.php 2010-01-31 23:16:38 UTC (rev 294286)
@@ -15,6 +15,12 @@
$errorTools->setParams('', '', $am->vcsLang, $_GET['dir'],
$_GET['file'], '');
$error_to_display = $errorTools->getInfo();
+ if( empty($error_to_display) ) {
+ // We fake an empty error
+ $error_to_display['-No error-']['error'][0]['value_en'] =
'-';
+ $error_to_display['-No error-']['error'][0]['value_lang'] =
'-';
+ }
+
$fileLibel = $_GET['dir'] . $_GET['file'];
} else {
Modified: web/doc-editor/trunk/php/ToolsError.php
===================================================================
--- web/doc-editor/trunk/php/ToolsError.php 2010-01-31 22:54:00 UTC (rev 294285)
+++ web/doc-editor/trunk/php/ToolsError.php 2010-01-31 23:16:38 UTC (rev 294286)
@@ -152,11 +152,18 @@
$project = AccountManager::getInstance()->project;
+ if ( AccountManager::getInstance()->userConf->errorSkipNbLiteralTag ) {
+ $type = ' type != \'nbLiteralTag\' AND ';
+ } else {
+ $type = '';
+ }
+
$s = 'SELECT
value_en, value_lang, type
FROM
errorfiles
WHERE
+ '.$type.'
project = \''.$project.'\' AND
lang = \''.$this->lang.'\' AND
path = \''.$this->filePath.'\' AND