Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/49646
Change subject: Use strpos rather then deprecated in_string
......................................................................
Use strpos rather then deprecated in_string
Change-Id: Ib2628d6b84af70995f5f920846311cbd2c7128fb
---
M includes/Utils.php
M includes/actions/EditCourseAction.php
M includes/actions/EditOrgAction.php
3 files changed, 3 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram
refs/changes/46/49646/1
diff --git a/includes/Utils.php b/includes/Utils.php
index 282d93e..7b8d9a6 100644
--- a/includes/Utils.php
+++ b/includes/Utils.php
@@ -239,6 +239,6 @@
$title = $title->getFullText();
}
- return in_string( '/', $title );
+ return strpos( '/', $title ) !== false;
}
}
diff --git a/includes/actions/EditCourseAction.php
b/includes/actions/EditCourseAction.php
index 8ea94a4..ff97b59 100644
--- a/includes/actions/EditCourseAction.php
+++ b/includes/actions/EditCourseAction.php
@@ -136,7 +136,7 @@
'help-message' => 'ep-course-help-title',
'required' => true,
'validation-callback' => function( $value, array
$alldata = null ) {
- return in_string( '/', $value ) ? wfMessage(
'ep-course-no-slashes' )->text() : true;
+ return strpos( '/', $value ) !== false ?
wfMessage( 'ep-course-no-slashes' )->text() : true;
},
);
diff --git a/includes/actions/EditOrgAction.php
b/includes/actions/EditOrgAction.php
index c4ccc9a..03e2526 100644
--- a/includes/actions/EditOrgAction.php
+++ b/includes/actions/EditOrgAction.php
@@ -65,7 +65,7 @@
return wfMessage(
'educationprogram-org-invalid-name', 2 )->text();
}
- if ( in_string( '/', $value ) ) {
+ if ( strpos( '/', $value ) !== false ) {
return wfMessage( 'ep-org-no-slashes'
)->text();
}
--
To view, visit https://gerrit.wikimedia.org/r/49646
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2628d6b84af70995f5f920846311cbd2c7128fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits