Merge "db: Use variable functions/callbacks instead of call_user_func()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 26 Mar 2019 05:41:52 +0000 (05:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 26 Mar 2019 05:41:52 +0000 (05:41 +0000)
1  2 
includes/db/DatabaseOracle.php

@@@ -700,6 -700,14 +700,6 @@@ class DatabaseOracle extends Database 
                return new Blob( $b );
        }
  
 -      function decodeBlob( $b ) {
 -              if ( $b instanceof Blob ) {
 -                      $b = $b->fetch();
 -              }
 -
 -              return $b;
 -      }
 -
        function unionQueries( $sqls, $all ) {
                $glue = ' UNION ALL ';
  
                // Defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}';
                while ( !feof( $fp ) ) {
                        if ( $lineCallback ) {
-                               call_user_func( $lineCallback );
+                               $lineCallback();
                        }
                        $line = trim( fgets( $fp, 1024 ) );
                        $sl = strlen( $line ) - 1;
  
                                        $cmd = $this->replaceVars( $cmd );
                                        if ( $inputCallback ) {
-                                               call_user_func( $inputCallback, $cmd );
+                                               $inputCallback( $cmd );
                                        }
                                        $res = $this->doQuery( $cmd );
                                        if ( $resultCallback ) {
                return 'BITOR(' . $fieldLeft . ', ' . $fieldRight . ')';
        }
  
 -      function getServer() {
 -              return $this->server;
 -      }
 -
        public function buildGroupConcatField(
                $delim, $table, $field, $conds = '', $join_conds = []
        ) {