r102097 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102096‎ | r102097 | r102098 >
Date:14:20, 5 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r101241, after removing @private set private modifier as they are indeed private...
Modified paths:
  • /trunk/phase3/includes/LinksUpdate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LinksUpdate.php
@@ -328,7 +328,7 @@
329329 * @param $insertions
330330 * @param $fromField
331331 */
332 - function dumbTableUpdate( $table, $insertions, $fromField ) {
 332+ private function dumbTableUpdate( $table, $insertions, $fromField ) {
333333 $this->mDb->delete( $table, array( $fromField => $this->mId ), __METHOD__ );
334334 if ( count( $insertions ) ) {
335335 # The link array was constructed without FOR UPDATE, so there may
@@ -392,7 +392,7 @@
393393 * @param $existing array
394394 * @return array
395395 */
396 - function getLinkInsertions( $existing = array() ) {
 396+ private function getLinkInsertions( $existing = array() ) {
397397 $arr = array();
398398 foreach( $this->mLinks as $ns => $dbkeys ) {
399399 $diffs = isset( $existing[$ns] )
@@ -414,7 +414,7 @@
415415 * @param $existing array
416416 * @return array
417417 */
418 - function getTemplateInsertions( $existing = array() ) {
 418+ private function getTemplateInsertions( $existing = array() ) {
419419 $arr = array();
420420 foreach( $this->mTemplates as $ns => $dbkeys ) {
421421 $diffs = isset( $existing[$ns] ) ? array_diff_key( $dbkeys, $existing[$ns] ) : $dbkeys;
@@ -435,7 +435,7 @@
436436 * @param $existing array
437437 * @return array
438438 */
439 - function getImageInsertions( $existing = array() ) {
 439+ private function getImageInsertions( $existing = array() ) {
440440 $arr = array();
441441 $diffs = array_diff_key( $this->mImages, $existing );
442442 foreach( $diffs as $iname => $dummy ) {
@@ -452,7 +452,7 @@
453453 * @param $existing array
454454 * @return array
455455 */
456 - function getExternalInsertions( $existing = array() ) {
 456+ private function getExternalInsertions( $existing = array() ) {
457457 $arr = array();
458458 $diffs = array_diff_key( $this->mExternals, $existing );
459459 foreach( $diffs as $url => $dummy ) {
@@ -473,7 +473,7 @@
474474 *
475475 * @return array
476476 */
477 - function getCategoryInsertions( $existing = array() ) {
 477+ private function getCategoryInsertions( $existing = array() ) {
478478 global $wgContLang, $wgCategoryCollation;
479479 $diffs = array_diff_assoc( $this->mCategories, $existing );
480480 $arr = array();
@@ -516,7 +516,7 @@
517517 *
518518 * @return array
519519 */
520 - function getInterlangInsertions( $existing = array() ) {
 520+ private function getInterlangInsertions( $existing = array() ) {
521521 $diffs = array_diff_assoc( $this->mInterlangs, $existing );
522522 $arr = array();
523523 foreach( $diffs as $lang => $title ) {
@@ -553,7 +553,7 @@
554554 * @param $existing array
555555 * @return array
556556 */
557 - function getInterwikiInsertions( $existing = array() ) {
 557+ private function getInterwikiInsertions( $existing = array() ) {
558558 $arr = array();
559559 foreach( $this->mInterwikis as $prefix => $dbkeys ) {
560560 $diffs = isset( $existing[$prefix] ) ? array_diff_key( $dbkeys, $existing[$prefix] ) : $dbkeys;
@@ -574,7 +574,7 @@
575575 * @param $existing array
576576 * @return array
577577 */
578 - function getLinkDeletions( $existing ) {
 578+ private function getLinkDeletions( $existing ) {
579579 $del = array();
580580 foreach ( $existing as $ns => $dbkeys ) {
581581 if ( isset( $this->mLinks[$ns] ) ) {
@@ -592,7 +592,7 @@
593593 * @param $existing array
594594 * @return array
595595 */
596 - function getTemplateDeletions( $existing ) {
 596+ private function getTemplateDeletions( $existing ) {
597597 $del = array();
598598 foreach ( $existing as $ns => $dbkeys ) {
599599 if ( isset( $this->mTemplates[$ns] ) ) {
@@ -610,7 +610,7 @@
611611 * @param $existing array
612612 * @return array
613613 */
614 - function getImageDeletions( $existing ) {
 614+ private function getImageDeletions( $existing ) {
615615 return array_diff_key( $existing, $this->mImages );
616616 }
617617
@@ -620,7 +620,7 @@
621621 * @param $existing array
622622 * @return array
623623 */
624 - function getExternalDeletions( $existing ) {
 624+ private function getExternalDeletions( $existing ) {
625625 return array_diff_key( $existing, $this->mExternals );
626626 }
627627
@@ -630,7 +630,7 @@
631631 * @param $existing array
632632 * @return array
633633 */
634 - function getCategoryDeletions( $existing ) {
 634+ private function getCategoryDeletions( $existing ) {
635635 return array_diff_assoc( $existing, $this->mCategories );
636636 }
637637
@@ -640,7 +640,7 @@
641641 * @param $existing array
642642 * @return array
643643 */
644 - function getInterlangDeletions( $existing ) {
 644+ private function getInterlangDeletions( $existing ) {
645645 return array_diff_assoc( $existing, $this->mInterlangs );
646646 }
647647
@@ -659,7 +659,7 @@
660660 * @param $existing array
661661 * @return array
662662 */
663 - function getInterwikiDeletions( $existing ) {
 663+ private function getInterwikiDeletions( $existing ) {
664664 $del = array();
665665 foreach ( $existing as $prefix => $dbkeys ) {
666666 if ( isset( $this->mInterwikis[$prefix] ) ) {
@@ -676,7 +676,7 @@
677677 *
678678 * @return array
679679 */
680 - function getExistingLinks() {
 680+ private function getExistingLinks() {
681681 $res = $this->mDb->select( 'pagelinks', array( 'pl_namespace', 'pl_title' ),
682682 array( 'pl_from' => $this->mId ), __METHOD__, $this->mOptions );
683683 $arr = array();
@@ -694,7 +694,7 @@
695695 *
696696 * @return array
697697 */
698 - function getExistingTemplates() {
 698+ private function getExistingTemplates() {
699699 $res = $this->mDb->select( 'templatelinks', array( 'tl_namespace', 'tl_title' ),
700700 array( 'tl_from' => $this->mId ), __METHOD__, $this->mOptions );
701701 $arr = array();
@@ -712,7 +712,7 @@
713713 *
714714 * @return array
715715 */
716 - function getExistingImages() {
 716+ private function getExistingImages() {
717717 $res = $this->mDb->select( 'imagelinks', array( 'il_to' ),
718718 array( 'il_from' => $this->mId ), __METHOD__, $this->mOptions );
719719 $arr = array();
@@ -727,7 +727,7 @@
728728 *
729729 * @return array
730730 */
731 - function getExistingExternals() {
 731+ private function getExistingExternals() {
732732 $res = $this->mDb->select( 'externallinks', array( 'el_to' ),
733733 array( 'el_from' => $this->mId ), __METHOD__, $this->mOptions );
734734 $arr = array();
@@ -742,7 +742,7 @@
743743 *
744744 * @return array
745745 */
746 - function getExistingCategories() {
 746+ private function getExistingCategories() {
747747 $res = $this->mDb->select( 'categorylinks', array( 'cl_to', 'cl_sortkey_prefix' ),
748748 array( 'cl_from' => $this->mId ), __METHOD__, $this->mOptions );
749749 $arr = array();
@@ -758,7 +758,7 @@
759759 *
760760 * @return array
761761 */
762 - function getExistingInterlangs() {
 762+ private function getExistingInterlangs() {
763763 $res = $this->mDb->select( 'langlinks', array( 'll_lang', 'll_title' ),
764764 array( 'll_from' => $this->mId ), __METHOD__, $this->mOptions );
765765 $arr = array();
@@ -790,7 +790,7 @@
791791 *
792792 * @return array
793793 */
794 - function getExistingProperties() {
 794+ private function getExistingProperties() {
795795 $res = $this->mDb->select( 'page_props', array( 'pp_propname', 'pp_value' ),
796796 array( 'pp_page' => $this->mId ), __METHOD__, $this->mOptions );
797797 $arr = array();
@@ -804,7 +804,7 @@
805805 * Return the title object of the page being updated
806806 * @return Title
807807 */
808 - function getTitle() {
 808+ public function getTitle() {
809809 return $this->mTitle;
810810 }
811811
@@ -820,7 +820,7 @@
821821 * Invalidate any necessary link lists related to page property changes
822822 * @param $changed
823823 */
824 - function invalidateProperties( $changed ) {
 824+ private function invalidateProperties( $changed ) {
825825 global $wgPagePropLinkInvalidations;
826826
827827 foreach ( $changed as $name => $value ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101241Die @privatereedy01:49, 29 October 2011

Status & tagging log