Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php |
— | — | @@ -35,6 +35,7 @@ |
36 | 36 | wfProfileIn('SMWDataValue::setUserValue (SMW)'); |
37 | 37 | $this->m_errors = array(); // clear errors |
38 | 38 | $this->m_infolinks = array(); // clear links |
| 39 | + $this->m_isset = false; |
39 | 40 | $this->m_hasssearchlink = false; |
40 | 41 | $this->m_hasservicelinks = false; |
41 | 42 | if ( is_string($caption) ) { |
— | — | @@ -42,8 +43,16 @@ |
43 | 44 | } else { |
44 | 45 | $this->m_caption = false; |
45 | 46 | } |
46 | | - $this->parseUserValue($value); // may set caption if not set yet, depending on datavalue |
47 | | - $this->m_isset = true; |
| 47 | + // The following checks for markers generated by MediaWiki to handle special content, |
| 48 | + // e.g. math. In general, we are not prepared to handle such content properly, and we |
| 49 | + // also have no means of obtaining the user input at this point. Hence the assignement |
| 50 | + // just fails. |
| 51 | + if (strpos($value,"\x7f") === false) { |
| 52 | + $this->parseUserValue($value); // may set caption if not set yet, depending on datavalue |
| 53 | + $this->m_isset = true; |
| 54 | + } else { |
| 55 | + $this->addError(wfMsgForContent('smw_parseerror')); |
| 56 | + } |
48 | 57 | if ($this->isValid()) { |
49 | 58 | $this->checkAllowedValues(); |
50 | 59 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Infolink.php |
— | — | @@ -282,7 +282,7 @@ |
283 | 283 | * Obtain an array of parameters from the parameters given to some HTTP service. |
284 | 284 | * In particular, this function perfoms all necessary decoding as may be needed, e.g., |
285 | 285 | * to recover the proper paramter strings after encoding for use in wiki title names |
286 | | - * as done by SMWInfolink::encodeParameters(). |
| 286 | + * as done by SMWInfolink::encodeParameters(). |
287 | 287 | * |
288 | 288 | * If $allparams is set to true, it is assumed that further data should be obtained |
289 | 289 | * from the global $wgRequest, and all given parameters are read. |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageZh_cn.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => '$1无法用于名字空间为“$2"的页面。', //'$1 can not be used for pages in the namespace “$2".' |
35 | 35 | 'smw_no_importelement' => '无法导入“$1"元素', //'Element “$1" not available for import.' |
36 | 36 | // Messages and strings for basic datatype processing |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => '.', |
38 | 39 | 'smw_kiloseparator' => ',', |
39 | 40 | 'smw_notitle' => '在此wiki内,是无法用“$1"来当作页面名称的', //'“$1" cannot be used as a page name in this wiki.' |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageAr.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => '$1 can not be used for pages in the namespace “$2”.', // TODO: translate |
35 | 35 | 'smw_no_importelement' => ' غير متاح للاستيراد “$1” عنصر ', |
36 | 36 | // Messages and strings for basic datatype processing |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => '.', |
38 | 39 | 'smw_kiloseparator' => ',', |
39 | 40 | 'smw_notitle' => '“$1” لا يمكن أن تستخدم مثل هذا الاسم في صفحة ويكي.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php |
— | — | @@ -35,6 +35,7 @@ |
36 | 36 | 'smw_wrong_importtype' => '$1 can not be used for pages in the namespace “$2”.', |
37 | 37 | 'smw_no_importelement' => 'Element “$1” not available for import.', |
38 | 38 | // Messages and strings for basic datatype processing |
| 39 | + 'smw_parseerror' => 'The given value was not understood.', // generic error, "something" went wrong |
39 | 40 | 'smw_decseparator' => '.', |
40 | 41 | 'smw_kiloseparator' => ',', |
41 | 42 | 'smw_notitle' => '“$1” cannot be used as a page name in this wiki.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageRu.php |
— | — | @@ -34,6 +34,7 @@ |
35 | 35 | 'smw_wrong_importtype' => 'Ошибка: $1 не может быть использован для статей с пространством имен "$2".', |
36 | 36 | 'smw_no_importelement' => 'Ошибка: Элемент "$1" не доступен для импорта.', |
37 | 37 | // Messages and strings for basic datatype processing |
| 38 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
38 | 39 | 'smw_decseparator' => ',', |
39 | 40 | 'smw_kiloseparator' => ' ', |
40 | 41 | 'smw_notitle' => '“$1” не может быть использован как заголовок статьи на данном сайте.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEs.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => 'El elemento "$1" no puede ser utilizado para los artículos del espacio de nombres dominio "$2".', |
35 | 35 | 'smw_no_importelement' => 'El elemento "$1" no está disponible para la importación.', |
36 | 36 | /*Messages and strings for basic datatype processing*/ |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went wrong |
37 | 38 | 'smw_decseparator' => ',', |
38 | 39 | 'smw_kiloseparator' => '.', |
39 | 40 | 'smw_notitle' => '“$1” cannot be used as a page name in this wiki.', // TODO Translate |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageFr.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => 'L\'élément "$1" ne peut être employé pour des articles de l\'espace de nommage domaine "$2".', |
35 | 35 | 'smw_no_importelement' => 'L\'élément "$1" n\'est pas disponible pour l\'importation.', |
36 | 36 | /*Messages and strings for basic datatype processing*/ |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => ',', |
38 | 39 | 'smw_kiloseparator' => '.', |
39 | 40 | 'smw_notitle' => '“$1” ne peut être utilisé comme nom de page sur ce wiki.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageDe.php |
— | — | @@ -42,6 +42,7 @@ |
43 | 43 | 'smw_wrong_importtype' => 'Das Element „$1“ kann nicht für Seiten im Namensraum „$2“ verwendet werden.', |
44 | 44 | 'smw_no_importelement' => 'Das Element „$1“ steht leider nicht zum Importieren zur Verfügung.', |
45 | 45 | /*Messages and strings for basic datatype processing*/ |
| 46 | + 'smw_parseerror' => 'Der eingegebene Wert wurde nicht verstanden.', // generic error, "something" went wrong |
46 | 47 | 'smw_decseparator' => ',', |
47 | 48 | 'smw_kiloseparator' => '.', |
48 | 49 | 'smw_notitle' => '“$1” kann nicht als Seitenname in diesem Wiki verwendet werden.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageKo.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | 'smw_wrong_importtype' => '$1 페이지에 대해 사용할 수없습니다 네임 스페이스 “$2”.', |
38 | 38 | 'smw_no_importelement' => '원소 “$1” 에 사용할 수없습니다 져올.', |
39 | 39 | // Messages and strings for basic datatype processing |
| 40 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
40 | 41 | 'smw_decseparator' => '.', |
41 | 42 | 'smw_kiloseparator' => ',', |
42 | 43 | 'smw_notitle' => '“$1” 대한 이름으로 사용하실 수없습니다이 위키는 페이지입니다.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageNl.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => '$1 kan niet gebruikt worden in pagina\'s in de naamruimte “$2”.', |
35 | 35 | 'smw_no_importelement' => 'Element “$1” is niet beschikbaar voor import.', |
36 | 36 | // Messages and strings for basic datatype processing |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => ',', |
38 | 39 | 'smw_kiloseparator' => '.', |
39 | 40 | 'smw_notitle' => '“$1” cannot be used as a page name in this wiki.', // TODO Translate |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguagePl.php |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | 'smw_wrong_importtype' => '$1 nie może być użyte dla artykułów z przestrzeni nazw "$2".', |
54 | 54 | 'smw_no_importelement' => 'Nie można zaimportować elementu "$1".', |
55 | 55 | /*Messages and strings for basic datatype processing*/ |
| 56 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
56 | 57 | 'smw_decseparator' => ',', |
57 | 58 | 'smw_kiloseparator' => '.', |
58 | 59 | 'smw_notitle' => '“$1” cannot be used as a page name in this wiki.', // TODO Translate |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageZh_tw.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => '$1無法用於名字空間為“$2”的頁面。', //'$1 can not be used for pages in the namespace “$2”.' |
35 | 35 | 'smw_no_importelement' => '無法匯入“$1”元素', //'Element “$1” not available for import.' |
36 | 36 | // Messages and strings for basic datatype processing |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => '.', |
38 | 39 | 'smw_kiloseparator' => ',', |
39 | 40 | 'smw_notitle' => '在此wiki內,是無法用“$1”來當作頁面名稱的', //'“$1” cannot be used as a page name in this wiki.' |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageHe.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => '[Sorry, $1 can not be used for pages in the namespace "$2"]', |
35 | 35 | 'smw_no_importelement' => '[Sorry, element "$1" not available for import.]', |
36 | 36 | /*Messages and strings for basic datatype processing*/ |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => '.', |
38 | 39 | 'smw_kiloseparator' => ',', |
39 | 40 | 'smw_notitle' => '“$1” cannot be used as a page name in this wiki.', // TODO Translate |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageIt.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | 'smw_wrong_importtype' => '$1 non può essere utilizzate per pagine nel namespace “$2”.', |
35 | 35 | 'smw_no_importelement' => 'L\'elemento “$1” non è disponibile per l\'importazione.', |
36 | 36 | // Messages and strings for basic datatype processing |
| 37 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
37 | 38 | 'smw_decseparator' => '.', |
38 | 39 | 'smw_kiloseparator' => ',', |
39 | 40 | 'smw_notitle' => '“$1” non può essere utilizzato come nome di una pagina all\'interno di questo wiki.', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageSk.php |
— | — | @@ -34,6 +34,7 @@ |
35 | 35 | 'smw_wrong_importtype' => '$1 nie je možné použiť pre stránky z menného priestoru "$2".', |
36 | 36 | 'smw_no_importelement' => 'Prvok "$1" nie je dostupný na import.', |
37 | 37 | /*Messages and strings for basic datatype processing*/ |
| 38 | + 'smw_parseerror' => 'The given value was not understood.', // TODO: translate; generic error, "something" went |
38 | 39 | 'smw_decseparator' => '.', |
39 | 40 | 'smw_kiloseparator' => ',', |
40 | 41 | 'smw_notitle' => '“$1” cannot be used as a page name in this wiki.', // TODO Translate |