Index: branches/SCHEMA_WORK/phase3/includes/Article.php |
— | — | @@ -508,17 +508,16 @@ |
509 | 509 | } |
510 | 510 | |
511 | 511 | /** |
512 | | - * Loads everything from cur except cur_text |
| 512 | + * Loads everything except the text |
513 | 513 | * This isn't necessary for all uses, so it's only done if needed. |
514 | 514 | * @private |
515 | 515 | */ |
516 | 516 | function loadLastEdit() { |
517 | | - ## $this->loadContent(); |
518 | | - ## return; |
519 | 517 | global $wgOut; |
520 | | - ## wfDebugDieBacktrace( "Shouldn't the content do this?" ); |
521 | | - if ( -1 != $this->mUser ) return; |
522 | 518 | |
| 519 | + if ( -1 != $this->mUser ) |
| 520 | + return; |
| 521 | + |
523 | 522 | $fname = 'Article::loadLastEdit'; |
524 | 523 | |
525 | 524 | $dbr =& $this->getDB(); |
Index: branches/SCHEMA_WORK/phase3/includes/SpecialDisambiguations.php |
— | — | @@ -33,18 +33,18 @@ |
34 | 34 | |
35 | 35 | function getSQL() { |
36 | 36 | $dbr =& wfGetDB( DB_SLAVE ); |
37 | | - extract( $dbr->tableNames( 'cur', 'links' ) ); |
| 37 | + extract( $dbr->tableNames( 'page', 'links' ) ); |
38 | 38 | |
39 | 39 | $dp = Title::newFromText(wfMsgForContent("disambiguationspage")); |
40 | 40 | $dpid = $dp->getArticleID(); |
41 | 41 | |
42 | | - $sql = "SELECT ca.cur_namespace AS ns_art, ca.cur_title AS title_art," |
43 | | - . " cb.cur_namespace AS ns_dis, cb.cur_title AS title_dis" |
44 | | - . " FROM links as la, links as lb, cur as ca, cur as cb" |
| 42 | + $sql = "SELECT pa.page_namespace AS ns_art, pa.page_title AS title_art," |
| 43 | + . " pb.page_namespace AS ns_dis, pb.page_title AS title_dis" |
| 44 | + . " FROM {$links} as la, {$links} as lb, {$page} as pa, {$page} as pb" |
45 | 45 | . " WHERE la.l_to = '{$dpid}'" |
46 | 46 | . " AND la.l_from = lb.l_to" |
47 | | - . " AND ca.cur_id = lb.l_from" |
48 | | - . " AND cb.cur_id = lb.l_to"; |
| 47 | + . " AND pa.page_id = lb.l_from" |
| 48 | + . " AND pb.page_id = lb.l_to"; |
49 | 49 | |
50 | 50 | return $sql; |
51 | 51 | } |
Index: branches/SCHEMA_WORK/phase3/includes/SpecialBrokenRedirects.php |
— | — | @@ -30,10 +30,10 @@ |
31 | 31 | |
32 | 32 | function getSQL() { |
33 | 33 | $dbr =& wfGetDB( DB_SLAVE ); |
34 | | - extract( $dbr->tableNames( 'cur', 'brokenlinks' ) ); |
| 34 | + extract( $dbr->tableNames( 'page', 'brokenlinks' ) ); |
35 | 35 | |
36 | | - $sql = "SELECT bl_to,cur_title FROM $brokenlinks,$cur " . |
37 | | - "WHERE cur_is_redirect=1 AND cur_namespace=0 AND bl_from=cur_id "; |
| 36 | + $sql = "SELECT bl_to,page_title FROM $brokenlinks,$page " . |
| 37 | + "WHERE page_is_redirect=1 AND page_namespace=0 AND bl_from=page_id "; |
38 | 38 | return $sql; |
39 | 39 | } |
40 | 40 | |
— | — | @@ -45,8 +45,8 @@ |
46 | 46 | global $wgContLang ; |
47 | 47 | |
48 | 48 | $ns = $wgContLang->getNamespaces() ; /* not used, why bother? */ |
49 | | - $from = $skin->makeKnownLink( $result->cur_title ,'', 'redirect=no' ); |
50 | | - $edit = $skin->makeBrokenLink( $result->cur_title , "(".wfMsg("qbedit").")" , 'redirect=no'); |
| 49 | + $from = $skin->makeKnownLink( $result->page_title ,'', 'redirect=no' ); |
| 50 | + $edit = $skin->makeBrokenLink( $result->page_title , "(".wfMsg("qbedit").")" , 'redirect=no'); |
51 | 51 | $to = $skin->makeBrokenLink( $result->bl_to ); |
52 | 52 | |
53 | 53 | return "$from $edit => $to"; |
Index: branches/SCHEMA_WORK/phase3/includes/SpecialDeadendpages.php |
— | — | @@ -42,12 +42,12 @@ |
43 | 43 | */ |
44 | 44 | function getSQL() { |
45 | 45 | $dbr =& wfGetDB( DB_SLAVE ); |
46 | | - extract( $dbr->tableNames( 'cur', 'links' ) ); |
47 | | - return "SELECT 'Deadendpages' as type, cur_namespace AS namespace, cur_title as title, cur_title AS value " . |
48 | | - "FROM $cur LEFT JOIN $links ON cur_id = l_from " . |
| 46 | + extract( $dbr->tableNames( 'page', 'links' ) ); |
| 47 | + return "SELECT 'Deadendpages' as type, page_namespace AS namespace, page_title as title, page_title AS value " . |
| 48 | + "FROM $page LEFT JOIN $links ON page_id = l_from " . |
49 | 49 | "WHERE l_from IS NULL " . |
50 | | - "AND cur_namespace = 0 " . |
51 | | - "AND cur_is_redirect = 0"; |
| 50 | + "AND page_namespace = 0 " . |
| 51 | + "AND page_is_redirect = 0"; |
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
Index: branches/SCHEMA_WORK/phase3/includes/SpecialDoubleRedirects.php |
— | — | @@ -30,14 +30,15 @@ |
31 | 31 | |
32 | 32 | function getSQL() { |
33 | 33 | $dbr =& wfGetDB( DB_SLAVE ); |
34 | | - extract( $dbr->tableNames( 'cur', 'links' ) ); |
| 34 | + extract( $dbr->tableNames( 'page', 'links', 'text' ) ); |
35 | 35 | |
36 | | - $sql = "SELECT ca.cur_namespace as ns_a, ca.cur_title as title_a," . |
37 | | - " cb.cur_namespace as ns_b, cb.cur_title as title_b," . |
38 | | - " cb.cur_text AS rt " . |
39 | | - "FROM $links,$cur AS ca,$cur AS cb ". |
40 | | - "WHERE ca.cur_is_redirect=1 AND cb.cur_is_redirect=1 AND l_to=cb.cur_id " . |
41 | | - " AND l_from=ca.cur_id " ; |
| 36 | + $sql = "SELECT pa.page_namespace as ns_a, pa.page_title as title_a, |
| 37 | + pb.page_namespace as ns_b, pb.page_title as title_b, |
| 38 | + old_text AS rt |
| 39 | + FROM $text AS t, $links,$page AS pa,$page AS pb |
| 40 | + WHERE pa.page_is_redirect=1 AND pb.page_is_redirect=1 AND l_to=pb.page_id |
| 41 | + AND l_from=pa.page_id |
| 42 | + AND pb.page_latest=t.old_id" ; |
42 | 43 | return $sql; |
43 | 44 | } |
44 | 45 | |
Index: branches/SCHEMA_WORK/phase3/includes/LinksUpdate.php |
— | — | @@ -272,7 +272,7 @@ |
273 | 273 | $fname = 'LinksUpdate::fixBrokenLinks'; |
274 | 274 | |
275 | 275 | $dbw =& wfGetDB( DB_MASTER ); |
276 | | - $cur = $dbw->tableName( 'page' ); |
| 276 | + $page = $dbw->tableName( 'page' ); |
277 | 277 | $links = $dbw->tableName( 'links' ); |
278 | 278 | |
279 | 279 | $res = $dbw->select( 'brokenlinks', array( 'bl_from' ), array( 'bl_to' => $this->mTitle ), |
Index: branches/SCHEMA_WORK/phase3/includes/SpecialMaintenance.php |
— | — | @@ -157,8 +157,8 @@ |
158 | 158 | |
159 | 159 | list( $limit, $offset ) = wfCheckLimits(); |
160 | 160 | |
161 | | - $sql = "SELECT cur_namespace,cur_title FROM cur,links " . |
162 | | - "WHERE l_from=l_to AND l_to=cur_id " . |
| 161 | + $sql = "SELECT page_namespace,page_title FROM page,links " . |
| 162 | + "WHERE l_from=l_to AND l_to=page_id " . |
163 | 163 | "LIMIT {$offset}, {$limit}"; |
164 | 164 | |
165 | 165 | $res = wfQuery( $sql, DB_SLAVE, $fname ); |
— | — | @@ -175,7 +175,7 @@ |
176 | 176 | $sk = $wgUser->getSkin(); |
177 | 177 | $s = '<ol start=' . ( $offset + 1 ) . '>'; |
178 | 178 | while ( $obj = wfFetchObject( $res ) ) { |
179 | | - $title = Title::makeTitle( $obj->cur_namespace, $obj->cur_title ); |
| 179 | + $title = Title::makeTitle( $obj->page_namespace, $obj->page_title ); |
180 | 180 | $s .= "<li>".$sk->makeKnownLinkObj( $title )."</li>\n" ; |
181 | 181 | } |
182 | 182 | wfFreeResult( $res ); |