r109852 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109851‎ | r109852 | r109853 >
Date:21:16, 23 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed some issues caused by recent renaming
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPCourse.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPCoursePager.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPMC.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPMCPager.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPOrgPager.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialInstitution.php (modified) (history)
  • /trunk/extensions/EducationProgram/sql/EducationProgram.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/sql/EducationProgram.sql
@@ -52,8 +52,8 @@
5353 course_id INT unsigned NOT NULL auto_increment PRIMARY KEY,
5454
5555 course_mc_id INT unsigned NOT NULL, -- Foreign key on ep_mcs.mc_id
 56+ course_org_id INT unsigned NOT NULL, -- Foreign key on ep_orgs.org_id. Helper field, not strictly needed.
5657 course_name VARCHAR(255) NOT NULL, -- Name of the course
57 - course_org_id INT unsigned NOT NULL, -- Foreign key on ep_orgs.org_id. Helper field, not strictly needed.
5858 course_year SMALLINT unsigned NOT NULL, -- Year in which the course takes place
5959 course_start varbinary(14) NOT NULL, -- Start time of the course
6060 course_end varbinary(14) NOT NULL, -- End time of the course
Index: trunk/extensions/EducationProgram/specials/SpecialInstitution.php
@@ -59,12 +59,12 @@
6060
6161 $this->displaySummary( $org );
6262
63 - $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-institution-courses' ) ) );
 63+ $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-institution-mcs' ) ) );
6464
6565 EPMC::displayPager( $this->getContext(), array( 'org_id' => $org->getId() ) );
6666
67 - if ( $this->getUser()->isAllowed( 'ep-course' ) ) {
68 - $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-institution-add-course' ) ) );
 67+ if ( $this->getUser()->isAllowed( 'ep-mc' ) ) {
 68+ $out->addHTML( Html::element( 'h2', array(), wfMsg( 'ep-institution-add-mc' ) ) );
6969
7070 EPMC::displayAddNewControl( $this->getContext(), array( 'org' => $org->getId() ) );
7171 }
Index: trunk/extensions/EducationProgram/includes/EPOrgPager.php
@@ -157,7 +157,10 @@
158158 array( 'wpreturnto' => $this->getTitle()->getText() )
159159 );
160160
161 - $links[] = $this->getDeletionLink( 'org', $item->getId() );
 161+ $links[] = $this->getDeletionLink(
 162+ ApiDeleteEducation::getTypeForClassName( $this->className ),
 163+ $item->getId()
 164+ );
162165 }
163166
164167 return $links;
Index: trunk/extensions/EducationProgram/includes/EPMCPager.php
@@ -147,7 +147,10 @@
148148 array( 'wpreturnto' => $this->getTitle()->getText() )
149149 );
150150
151 - $links[] = $this->getDeletionLink( 'course', $item->getId() );
 151+ $links[] = $this->getDeletionLink(
 152+ ApiDeleteEducation::getTypeForClassName( $this->className ),
 153+ $item->getId()
 154+ );
152155 }
153156
154157 return $links;
Index: trunk/extensions/EducationProgram/includes/EPCoursePager.php
@@ -192,7 +192,10 @@
193193 array( 'wpreturnto' => $this->getTitle()->getText() )
194194 );
195195
196 - $links[] = $this->getDeletionLink( 'course', $item->getId() );
 196+ $links[] = $this->getDeletionLink(
 197+ ApiDeleteEducation::getTypeForClassName( $this->className ),
 198+ $item->getId()
 199+ );
197200 }
198201
199202 return $links;
Index: trunk/extensions/EducationProgram/includes/EPMC.php
@@ -148,7 +148,7 @@
149149 $success = parent::insertIntoDB();
150150
151151 if ( $this->updateSummaries ) {
152 - EPOrg::updateSummaryFields( array( 'courses', 'active' ), array( 'id' => $this->getField( 'org_id' ) ) );
 152+ EPOrg::updateSummaryFields( array( 'mcs', 'active' ), array( 'id' => $this->getField( 'org_id' ) ) );
153153 }
154154
155155 return $success;
Index: trunk/extensions/EducationProgram/includes/EPCourse.php
@@ -216,7 +216,7 @@
217217 $success = parent::insertIntoDB();
218218
219219 if ( $success && $this->updateSummaries ) {
220 - EPOrg::updateSummaryFields( array( 'terms', 'active' ), array( 'id' => $this->getField( 'org_id' ) ) );
 220+ EPOrg::updateSummaryFields( array( 'courses', 'active' ), array( 'id' => $this->getField( 'org_id' ) ) );
221221 EPMC::updateSummaryFields( 'active', array( 'id' => $this->getField( 'mc_id' ) ) );
222222 }
223223
@@ -240,7 +240,7 @@
241241
242242 if ( $success && $this->updateSummaries ) {
243243 EPMC::updateSummaryFields( 'students', array( 'id' => $courseId ) );
244 - EPOrg::updateSummaryFields( array( 'terms', 'students', 'active' ), array( 'id' => $orgId ) );
 244+ EPOrg::updateSummaryFields( array( 'courses', 'students', 'active' ), array( 'id' => $orgId ) );
245245 }
246246
247247 if ( $success ) {
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -304,7 +304,7 @@
305305 'ep-institution-none' => 'There is no institution with name "$1". See [[Special:Institution|here]] for a list of institutions.',
306306 'ep-institution-create' => 'There is no institution with name "$1" yet, but you can create it.',
307307 'ep-institution-title' => 'Institution: $1',
308 - 'ep-institution-courses' => 'Courses',
 308+ 'ep-institution-mcs' => 'Master courses',
309309 'specialinstitution-summary-name' => 'Name',
310310 'specialinstitution-summary-city' => 'City',
311311 'specialinstitution-summary-country' => 'Country',
@@ -313,7 +313,7 @@
314314 'specialinstitution-summary-mcs' => 'Master course count',
315315 'specialinstitution-summary-students' => 'Student count',
316316 'ep-institution-nav-edit' => 'Edit this institution',
317 - 'ep-institution-add-course' => 'Add a course',
 317+ 'ep-institution-add-mc' => 'Add a master course',
318318 'ep-institution-inactive' => 'Inactive',
319319 'ep-institution-active' => 'Active',
320320

Status & tagging log