Jack Phoenix has submitted this change and it was merged.

Change subject: Remove commented-out calls to DatabaseBase::strencode()
......................................................................


Remove commented-out calls to DatabaseBase::strencode()

Change-Id: Icb52e5d18bd56dbed378afec09eb1e836c2f6f91
---
M PictureGameHome.body.php
1 file changed, 1 insertion(+), 16 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PictureGameHome.body.php b/PictureGameHome.body.php
index e3e2c1c..f16eaf8 100644
--- a/PictureGameHome.body.php
+++ b/PictureGameHome.body.php
@@ -1121,10 +1121,6 @@
                                        __METHOD__,
                                        array( 'LIMIT' => 1 )
                                );
-                               /*$sql = "SELECT * FROM picturegame_images 
WHERE picturegame_images.id NOT IN
-                                       (SELECT picid FROM picturegame_votes 
WHERE picturegame_votes.username='" . $dbr->strencode( $user->getName() ) . "')
-                                       AND flag <> " . 
PICTUREGAME_FLAG_FLAGGED . " AND img1 <> '' AND img2 <> '' LIMIT 1;";
-                               $res = $dbr->query( $sql, __METHOD__ );*/
                                $row = $dbr->fetchObject( $res );
                                $imgID = isset( $row->id ) ? $row->id : 0;
                        }
@@ -1187,10 +1183,6 @@
                                        __METHOD__,
                                        array( 'LIMIT' => 1 )
                                );
-                               /*$sql = "SELECT * FROM picturegame_images 
WHERE picturegame_images.id <> {$imgID} AND picturegame_images.id NOT IN
-                                               (SELECT picid FROM 
picturegame_votes WHERE picturegame_votes.username='" . $dbr->strencode( 
$user->getName() ) . "')
-                                       AND flag != " . 
PICTUREGAME_FLAG_FLAGGED . " AND img1 <> '' AND img2 <> '' LIMIT 1;";
-                               $nextres = $dbr->query( $sql, __METHOD__ );*/
                                $nextrow = $dbr->fetchObject( $nextres );
                                $next_id = ( isset( $nextrow->id ) ? 
$nextrow->id : 0 );
                        }
@@ -1762,13 +1754,6 @@
                                $canSkip = true;
                        }
                }
-               /*$sql = "SELECT COUNT(*) AS mycount FROM picturegame_images 
WHERE picturegame_images.id NOT IN
-                               (SELECT picid FROM picturegame_votes WHERE 
picturegame_votes.username='" . $dbr->strencode( $wgUser->getName() ) . "')
-                       AND flag != " . PICTUREGAME_FLAG_FLAGGED . " AND img1 
<> '' AND img2 <> '' LIMIT 1;";
-               $res = $dbr->query( $sql, __METHOD__ );
-               $row = $dbr->fetchObject( $res );
-
-               $canSkip = ( $row->mycount != 0 ? true : false );*/
 
                // used for the key
                $now = time();
@@ -1849,4 +1834,4 @@
 
                $out->addHTML( $output );
        }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb52e5d18bd56dbed378afec09eb1e836c2f6f91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PictureGame
Gerrit-Branch: master
Gerrit-Owner: PleaseStand <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to