Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396363 )

Change subject: PageContentSave WikiPage typehint
......................................................................

PageContentSave WikiPage typehint

Change-Id: I9ca5ad280a120b56783b0195479c63fe3d9c345a
---
M AthenaHooks.php
1 file changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Athena 
refs/changes/63/396363/1

diff --git a/AthenaHooks.php b/AthenaHooks.php
index 88bb075..cd7d7c4 100644
--- a/AthenaHooks.php
+++ b/AthenaHooks.php
@@ -63,7 +63,9 @@
         * If an article successfully saves, we want to take the page_id and 
rev_id and update our
         * athena_page_details table
         *
-        * @param $article WikiPage
+        * PageContentSaveComplete hook handler
+        *
+        * @param WikiPage $wikiPage
         * @param $user User
         * @param $content Content
         * @param $summary string
@@ -74,18 +76,20 @@
         * @param $revision {Revision|null}
         * @param $status Status
         * @param $baseRevId integer
+        *
         * @return boolean
         */
-       static function successfulEdit( $article, $user, $content, $summary, 
$isMinor, $isWatch, $section,
+       static function successfulEdit(
+               WikiPage $wikiPage, $user, $content, $summary, $isMinor, 
$isWatch, $section,
                                                                   $flags, 
$revision, $status, $baseRevId ) {
                $dbw = wfGetDB( DB_MASTER );
 
-               $page_id = $article->getId();
-               $rev_id = $article->getRevision()->getId();
+               $page_id = $wikiPage->getId();
+               $rev_id = $wikiPage->getRevision()->getId();
 
-               $title = $dbw->strencode( $article->getTitle()->getText() );
+               $title = $dbw->strencode( $wikiPage->getTitle()->getText() );
 
-               $whereStatement = " apd_title='{$title}' AND 
apd_namespace={$article->getTitle()->getNamespace()}";
+               $whereStatement = " apd_title='{$title}' AND 
apd_namespace={$wikiPage->getTitle()->getNamespace()}";
 
                // TODO check multiple instances of the same title - maybe 
check user_id as well
                $sql = "SELECT al_id FROM {$dbw->tableName( 
'athena_page_details' )} WHERE {$whereStatement} ORDER BY al_id DESC;";

-- 
To view, visit https://gerrit.wikimedia.org/r/396363
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ca5ad280a120b56783b0195479c63fe3d9c345a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Athena
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to