Kipcool has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53626


Change subject: getExpressionsRecordSet Removed "exists syntrans" check, since 
expression.remove_transaction_id is now updated. Removed unused function 
getExpressionIdThatHasSynonyms
......................................................................

getExpressionsRecordSet
Removed "exists syntrans" check, since expression.remove_transaction_id
is now updated.
Removed unused function getExpressionIdThatHasSynonyms

Change-Id: I5d0c3987471a066d93a2d9a69c7b490b0fbc2aee
---
M OmegaWiki/OmegaWikiRecordSets.php
1 file changed, 0 insertions(+), 35 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData 
refs/changes/26/53626/1

diff --git a/OmegaWiki/OmegaWikiRecordSets.php 
b/OmegaWiki/OmegaWikiRecordSets.php
index 204f2e0..ecee55b 100644
--- a/OmegaWiki/OmegaWikiRecordSets.php
+++ b/OmegaWiki/OmegaWikiRecordSets.php
@@ -454,14 +454,6 @@
                " WHERE spelling= " . $dbr->addQuotes( $spelling ) .
                " AND {$dc}_expression.remove_transaction_id IS NULL " ;
 
-       // needed because expression.remove_transaction_id is not updated 
automatically
-       $sqlbase .= " AND EXISTS (" .
-               "SELECT * " .
-               " FROM {$dc}_syntrans " .
-               " WHERE 
{$dc}_syntrans.expression_id={$dc}_expression.expression_id" .
-               " AND {$dc}_syntrans.remove_transaction_id IS NULL " .
-               ")";
-
        $queryResult = null;
        if ( $viewInformation->expressionLanguageId != 0 ) {
                // display the expression in that language
@@ -498,35 +490,8 @@
                        getExpressionMeaningsRecord( 
$expression->expression_id, $viewInformation )
                ) );
        }
-
        return $result;
 }
-
-function getExpressionIdThatHasSynonyms( $spelling, $languageId ) {
-       $dc = wdGetDataSetContext();
-
-       $dbr = wfGetDB( DB_SLAVE );
-       $queryResult = $dbr->query(
-               "SELECT expression_id, language_id " .
-               " FROM {$dc}_expression" .
-               " WHERE spelling= " . $dbr->addQuotes( $spelling ) .
-               " AND {$dc}_expression.remove_transaction_id IS NULL " .
-               " AND language_id=$languageId" .
-               " AND EXISTS (" .
-                       "SELECT expression_id " .
-                       " FROM {$dc}_syntrans " .
-                       " WHERE 
{$dc}_syntrans.expression_id={$dc}_expression.expression_id" .
-                       " AND {$dc}_syntrans.remove_transaction_id IS NULL "
-               . ")"
-       );
-       
-       if ( $expression = $dbr->fetchObject( $queryResult ) ) {
-               return $expression->expression_id;
-       } else {
-               return 0;
-       }
-}
- 
 
 function getClassAttributesRecordSet( $definedMeaningId, ViewInformation 
$viewInformation ) {
        global $wgWikidataDataSet;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d0c3987471a066d93a2d9a69c7b490b0fbc2aee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool <[email protected]>

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

Reply via email to