Ragesoss has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/98537


Change subject: Display correct interface message when adding duplicate 
institution
......................................................................

Display correct interface message when adding duplicate institution

This makes the interface display the correct warning message,
<ep-editorg-exists-already>, when attempint to add an institution
with a name that already exists.

bug 56327

Change-Id: Ifc9f8fa46a99c9ff3d58b6662668180f18a0733e
---
M includes/actions/EditAction.php
M includes/actions/EditOrgAction.php
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram 
refs/changes/37/98537/1

diff --git a/includes/actions/EditAction.php b/includes/actions/EditAction.php
index d9eaf06..d0857a2 100644
--- a/includes/actions/EditAction.php
+++ b/includes/actions/EditAction.php
@@ -111,7 +111,7 @@
                        elseif ( $this->isNewPost() ) {
                                // Give grep a chance to find the usages:
                                // ep-editorg-exists-already, 
ep-editcourse-exists-already
-                               $this->showWarning( $this->msg( 'ep-' . 
strtolower( $this->getName() ) . '-exists-already' ) );
+                               $this->showWarning( $this->msg( 'ep-' . 
strtolower( $this->getName() ) . $this->getPageType() . '-exists-already' ) );
                        }
 
                        $out->setPageTitle( $this->getPageTitle() );
diff --git a/includes/actions/EditOrgAction.php 
b/includes/actions/EditOrgAction.php
index 5eac469..8e4198f 100644
--- a/includes/actions/EditOrgAction.php
+++ b/includes/actions/EditOrgAction.php
@@ -34,6 +34,13 @@
                return 'edit';
        }
 
+        /**
+         * return the type of page, for use in composing
+         */
+        public function getPageType() {
+                return 'org';
+        }
+
        /**
         * @see Action::getDescription()
         */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc9f8fa46a99c9ff3d58b6662668180f18a0733e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Ragesoss <rages...@gmail.com>

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

Reply via email to