Index: trunk/phase3/maintenance/populateRevisionSha1.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $end = $db->selectField( $table, "MAX($idCol)", false, __METHOD__ ); |
69 | 69 | if ( !$start || !$end ) { |
70 | 70 | $this->output( "...$table table seems to be empty.\n" ); |
71 | | - return true; |
| 71 | + return 0; |
72 | 72 | } |
73 | 73 | |
74 | 74 | $count = 0; |
— | — | @@ -95,7 +95,10 @@ |
96 | 96 | } |
97 | 97 | return $count; |
98 | 98 | } |
99 | | - |
| 99 | + |
| 100 | + /** |
| 101 | + * @return int |
| 102 | + */ |
100 | 103 | protected function doSha1LegacyUpdates() { |
101 | 104 | $count = 0; |
102 | 105 | $db = $this->getDB( DB_MASTER ); |
— | — | @@ -116,8 +119,16 @@ |
117 | 120 | } |
118 | 121 | } |
119 | 122 | $db->commit( __METHOD__ ); |
| 123 | + return $count; |
120 | 124 | } |
121 | 125 | |
| 126 | + /** |
| 127 | + * @param $row |
| 128 | + * @param $table |
| 129 | + * @param $idCol |
| 130 | + * @param $prefix |
| 131 | + * @return bool |
| 132 | + */ |
122 | 133 | protected function upgradeRow( $row, $table, $idCol, $prefix ) { |
123 | 134 | $db = $this->getDB( DB_MASTER ); |
124 | 135 | if ( $table === 'archive' ) { |
— | — | @@ -140,6 +151,10 @@ |
141 | 152 | } |
142 | 153 | } |
143 | 154 | |
| 155 | + /** |
| 156 | + * @param $row |
| 157 | + * @return bool |
| 158 | + */ |
144 | 159 | protected function upgradeLegacyArchiveRow( $row ) { |
145 | 160 | $db = $this->getDB( DB_MASTER ); |
146 | 161 | $rev = Revision::newFromArchiveRow( $row ); |