[MediaWiki-commits] [Gerrit] mediawiki...LinkedWiki[master]: Fix a bug in the function addPropertyWithLitteral

2017-11-30 Thread Karima Rafes (Code Review)
Karima Rafes has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394512 )

Change subject: Fix a bug in the function addPropertyWithLitteral
..


Fix a bug in the function addPropertyWithLitteral

Change-Id: Ice3177f14602607e259f2eeb1d1171b38884c76b
---
M lua/LinkedWiki.lua.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Karima Rafes: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/lua/LinkedWiki.lua.php b/lua/LinkedWiki.lua.php
index dfa70f4..ba2cf27 100644
--- a/lua/LinkedWiki.lua.php
+++ b/lua/LinkedWiki.lua.php
@@ -301,7 +301,7 @@
 if ($iriSubject === null && $this->subject ===null) {
 return array("ERROR : Subject unknown (Use the parameter 
iriSubject or the function setSubject.");
 }
-if (EMPTY($value) || preg_match("/(\"\"\"|''')/i", $value)) {
+if ((EMPTY($value) && !is_numeric($value)) || 
preg_match("/(\"\"\"|''')/i", $value)) {
 return array("ERROR : Bad value");
 }
 if (EMPTY($iriProperty) || preg_match("/(\"\"\"|'''| )/i", 
trim($iriProperty))) {

-- 
To view, visit https://gerrit.wikimedia.org/r/394512
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice3177f14602607e259f2eeb1d1171b38884c76b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkedWiki
Gerrit-Branch: master
Gerrit-Owner: Karima Rafes 
Gerrit-Reviewer: Karima Rafes 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...LinkedWiki[master]: Fix a bug in the function addPropertyWithLitteral

2017-11-30 Thread Karima Rafes (Code Review)
Karima Rafes has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394512 )

Change subject: Fix a bug in the function addPropertyWithLitteral
..

Fix a bug in the function addPropertyWithLitteral

Change-Id: Ice3177f14602607e259f2eeb1d1171b38884c76b
---
M lua/LinkedWiki.lua.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkedWiki 
refs/changes/12/394512/1

diff --git a/lua/LinkedWiki.lua.php b/lua/LinkedWiki.lua.php
index dfa70f4..ba2cf27 100644
--- a/lua/LinkedWiki.lua.php
+++ b/lua/LinkedWiki.lua.php
@@ -301,7 +301,7 @@
 if ($iriSubject === null && $this->subject ===null) {
 return array("ERROR : Subject unknown (Use the parameter 
iriSubject or the function setSubject.");
 }
-if (EMPTY($value) || preg_match("/(\"\"\"|''')/i", $value)) {
+if ((EMPTY($value) && !is_numeric($value)) || 
preg_match("/(\"\"\"|''')/i", $value)) {
 return array("ERROR : Bad value");
 }
 if (EMPTY($iriProperty) || preg_match("/(\"\"\"|'''| )/i", 
trim($iriProperty))) {

-- 
To view, visit https://gerrit.wikimedia.org/r/394512
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice3177f14602607e259f2eeb1d1171b38884c76b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkedWiki
Gerrit-Branch: master
Gerrit-Owner: Karima Rafes 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits