r71760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71759‎ | r71760 | r71761 >
Date:22:43, 26 August 2010
Author:reedy
Status:deferred
Tags:
Comment:
Update calls to insertOrUpdate in ApiArticleAssessment

Minor updated schema, save userid
Modified paths:
  • /trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.sql (modified) (history)
  • /trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.sql
@@ -10,6 +10,7 @@
1111 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/article_assessment (
1212 -- Foreign key to page.page_id
1313 aa_page_id integer unsigned NOT NULL,
 14+ aa_user_id integer NOT NULL,
1415 -- unique user identifier
1516 aa_user_text varchar(255) binary NOT NULL,
1617 -- Foreign key to revision.rev_id
Index: trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php
@@ -17,6 +17,7 @@
1818 'article_assessment',
1919 array( 'aa_rating_id', 'aa_rating_value' ),
2020 array( 'aa_revision' => $params['revid'],
 21+ 'aa_user_id' => $wgUser->getId(),
2122 'aa_user_text' => $userName,
2223 /* 'aa_page_id' => $params['pageid'],*/
2324 ),
@@ -84,7 +85,6 @@
8586 'aap_rating' => $rating,
8687 ),
8788 __METHOD__,
88 - array(),
8989 array(
9090 'aap_total' => 'aap_total + ' . $updateAddition,
9191 'aap_count' => 'aap_count + ' . ( $newRating ? 1 : 0 ),
@@ -111,7 +111,6 @@
112112 'aa_rating_value' => $ratingValue,
113113 ),
114114 __METHOD__,
115 - array(),
116115 array(
117116 'aa_timestamp' => wfTimestampNow(),
118117 'aa_rating_id' => $ratingId,

Status & tagging log