From c66d868e6d846e341555f29adca276bc35219a1d Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 19 Oct 2012 22:10:42 +0200 Subject: [PATCH] Remove a bunch of trailing spaces and unneeded newlines Change-Id: I166a171c196f4c2c75886be12f913ffa9a4a35ad --- includes/media/BitmapMetadataHandler.php | 2 +- includes/media/DjVuImage.php | 6 +-- includes/media/Exif.php | 15 +++--- includes/media/GIF.php | 12 ++--- includes/media/GIFMetadataExtractor.php | 11 ++-- includes/media/JpegMetadataExtractor.php | 2 +- includes/media/PNG.php | 12 ++--- includes/media/PNGMetadataExtractor.php | 2 +- includes/media/SVGMetadataExtractor.php | 6 +-- includes/media/XMPInfo.php | 2 +- includes/media/XMPValidate.php | 8 +-- includes/normal/Utf8CaseGenerate.php | 2 +- includes/normal/UtfNormal.php | 2 +- includes/normal/UtfNormalBench.php | 2 +- includes/normal/UtfNormalDefines.php | 2 +- includes/normal/UtfNormalGenerate.php | 2 +- includes/objectcache/EhcacheBagOStuff.php | 16 +++--- includes/objectcache/MemcachedBagOStuff.php | 2 +- includes/objectcache/MemcachedClient.php | 6 +-- .../objectcache/MemcachedPhpBagOStuff.php | 2 +- includes/objectcache/MultiWriteBagOStuff.php | 4 +- includes/objectcache/ObjectCache.php | 4 +- includes/search/SearchIBM_DB2.php | 4 +- includes/search/SearchMssql.php | 6 +-- includes/search/SearchOracle.php | 52 +++++++++---------- 25 files changed, 91 insertions(+), 93 deletions(-) diff --git a/includes/media/BitmapMetadataHandler.php b/includes/media/BitmapMetadataHandler.php index d2edc9f140..2b04f78b53 100644 --- a/includes/media/BitmapMetadataHandler.php +++ b/includes/media/BitmapMetadataHandler.php @@ -240,7 +240,7 @@ class BitmapMetadataHandler { unset( $baseArray['comment'] ); unset( $baseArray['xmp'] ); - + $baseArray['metadata'] = $meta->getMetadataArray(); $baseArray['metadata']['_MW_GIF_VERSION'] = GIFMetadataExtractor::VERSION; return $baseArray; diff --git a/includes/media/DjVuImage.php b/includes/media/DjVuImage.php index 6aef562b12..e2fcaa932c 100644 --- a/includes/media/DjVuImage.php +++ b/includes/media/DjVuImage.php @@ -228,7 +228,7 @@ class DjVuImage { function retrieveMetaData() { global $wgDjvuToXML, $wgDjvuDump, $wgDjvuTxt; wfProfileIn( __METHOD__ ); - + if ( isset( $wgDjvuDump ) ) { # djvudump is faster as of version 3.5 # http://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583 @@ -247,7 +247,7 @@ class DjVuImage { $xml = null; } # Text layer - if ( isset( $wgDjvuTxt ) ) { + if ( isset( $wgDjvuTxt ) ) { wfProfileIn( 'djvutxt' ); $cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename ) ; wfDebug( __METHOD__.": $cmd\n" ); @@ -260,7 +260,7 @@ class DjVuImage { $reg = << # Text to match is composed of atoms of either: - \\\\. # - any escaped character + \\\\. # - any escaped character | # - any character different from " and \ [^"\\\\]+ )*?) diff --git a/includes/media/Exif.php b/includes/media/Exif.php index 104ba555f6..bdacbc86d9 100644 --- a/includes/media/Exif.php +++ b/includes/media/Exif.php @@ -389,7 +389,7 @@ class Exif { $this->charCodeString( 'UserComment' ); $this->charCodeString( 'GPSProcessingMethod'); $this->charCodeString( 'GPSAreaInformation' ); - + //ComponentsConfiguration should really be an array instead of a string... //This turns a string of binary numbers into an array of numbers. @@ -402,7 +402,7 @@ class Exif { $ccVals['_type'] = 'ol'; //this is for formatting later. $this->mFilteredExifData['ComponentsConfiguration'] = $ccVals; } - + //GPSVersion(ID) is treated as the wrong type by php exif support. //Go through each byte turning it into a version string. //For example: "\x02\x02\x00\x00" -> "2.2.0.0" @@ -451,8 +451,7 @@ class Exif { } $charCode = substr( $this->mFilteredExifData[$prop], 0, 8); $val = substr( $this->mFilteredExifData[$prop], 8); - - + switch ($charCode) { case "\x4A\x49\x53\x00\x00\x00\x00\x00": //JIS @@ -481,7 +480,7 @@ class Exif { wfRestoreWarnings(); } } - + //trim and check to make sure not only whitespace. $val = trim($val); if ( strlen( $val ) === 0 ) { @@ -749,10 +748,10 @@ class Exif { return false; } if( $count > 1 ) { - foreach( $val as $v ) { + foreach( $val as $v ) { if( !$this->validate( $section, $tag, $v, true ) ) { - return false; - } + return false; + } } return true; } diff --git a/includes/media/GIF.php b/includes/media/GIF.php index 84b9b8ca7d..da8fc6f87b 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -29,7 +29,7 @@ class GIFHandler extends BitmapHandler { const BROKEN_FILE = '0'; // value to store in img_metadata if error extracting metadata. - + function getMetadata( $image, $filename ) { try { $parsedGIFMetadata = BitmapMetadataHandler::GIF( $filename ); @@ -143,7 +143,7 @@ class GIFHandler extends BitmapHandler { wfSuppressWarnings(); $metadata = unserialize($image->getMetadata()); wfRestoreWarnings(); - + if (!$metadata || $metadata['frameCount'] <= 1) { return $original; } @@ -151,19 +151,19 @@ class GIFHandler extends BitmapHandler { /* Preserve original image info string, but strip the last char ')' so we can add even more */ $info = array(); $info[] = $original; - + if ( $metadata['looped'] ) { $info[] = wfMessage( 'file-info-gif-looped' )->parse(); } - + if ( $metadata['frameCount'] > 1 ) { $info[] = wfMessage( 'file-info-gif-frames' )->numParams( $metadata['frameCount'] )->parse(); } - + if ( $metadata['duration'] ) { $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); } - + return $wgLang->commaList( $info ); } } diff --git a/includes/media/GIFMetadataExtractor.php b/includes/media/GIFMetadataExtractor.php index f6ca7753d3..7a162c3fcb 100644 --- a/includes/media/GIFMetadataExtractor.php +++ b/includes/media/GIFMetadataExtractor.php @@ -58,7 +58,7 @@ class GIFMetadataExtractor { $isLooped = false; $xmp = ""; $comment = array(); - + if ( !$filename ) { throw new Exception( "No file name specified" ); } elseif ( !file_exists( $filename ) || is_dir( $filename ) ) { @@ -107,7 +107,7 @@ class GIFMetadataExtractor { ## Read GCT self::readGCT( $fh, $bpp ); fread( $fh, 1 ); - self::skipBlock( $fh ); + self::skipBlock( $fh ); } elseif ( $buf == self::$gif_extension_sep ) { $buf = fread( $fh, 1 ); if ( strlen( $buf ) < 1 ) throw new Exception( "Ran out of input" ); @@ -182,23 +182,22 @@ class GIFMetadataExtractor { // NETSCAPE2.0 (application name for animated gif) if ( $data == 'NETSCAPE2.0' ) { - $data = fread( $fh, 2 ); // Block length and introduction, should be 03 01 if ($data != "\x03\x01") { throw new Exception( "Expected \x03\x01, got $data" ); } - + // Unsigned little-endian integer, loop count or zero for "forever" $loopData = fread( $fh, 2 ); if ( strlen( $loopData ) < 2 ) throw new Exception( "Ran out of input" ); $loopData = unpack( 'v', $loopData ); $loopCount = $loopData[1]; - + if ($loopCount != 1) { $isLooped = true; } - + // Read out terminator byte fread( $fh, 1 ); } elseif ( $data == 'XMP DataXMP' ) { diff --git a/includes/media/JpegMetadataExtractor.php b/includes/media/JpegMetadataExtractor.php index ecf216ad53..60fd2a0f7b 100644 --- a/includes/media/JpegMetadataExtractor.php +++ b/includes/media/JpegMetadataExtractor.php @@ -129,7 +129,7 @@ class JpegMetadataExtractor { // whatever... $segments["XMP"] = substr( $temp, 29 ); wfDebug( __METHOD__ . ' Found XMP section with wrong app identifier ' - . "Using anyways.\n" ); + . "Using anyways.\n" ); } elseif ( substr( $temp, 0, 6 ) === "Exif\0\0" ) { // Just need to find out what the byte order is. // because php's exif plugin sucks... diff --git a/includes/media/PNG.php b/includes/media/PNG.php index 1b329e57b5..a23821f4fb 100644 --- a/includes/media/PNG.php +++ b/includes/media/PNG.php @@ -88,11 +88,11 @@ class PNGHandler extends BitmapHandler { function canAnimateThumbnail( $image ) { return false; } - + function getMetadataType( $image ) { return 'parsed-png'; } - + function isMetadataValid( $image, $metadata ) { if ( $metadata === self::BROKEN_FILE ) { @@ -134,21 +134,21 @@ class PNGHandler extends BitmapHandler { $info = array(); $info[] = $original; - + if ( $metadata['loopCount'] == 0 ) { $info[] = wfMessage( 'file-info-png-looped' )->parse(); } elseif ( $metadata['loopCount'] > 1 ) { $info[] = wfMessage( 'file-info-png-repeat' )->numParams( $metadata['loopCount'] )->parse(); } - + if ( $metadata['frameCount'] > 0 ) { $info[] = wfMessage( 'file-info-png-frames' )->numParams( $metadata['frameCount'] )->parse(); } - + if ( $metadata['duration'] ) { $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); } - + return $wgLang->commaList( $info ); } diff --git a/includes/media/PNGMetadataExtractor.php b/includes/media/PNGMetadataExtractor.php index 9dcde40694..55f087ad2e 100644 --- a/includes/media/PNGMetadataExtractor.php +++ b/includes/media/PNGMetadataExtractor.php @@ -124,7 +124,7 @@ class PNGMetadataExtractor { case 0: $colorType = 'greyscale'; break; - case 2: + case 2: $colorType = 'truecolour'; break; case 3: diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index 871d419e48..456c0166c2 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -75,9 +75,9 @@ class SVGReader { $this->reader->open( $source, null, LIBXML_NOERROR | LIBXML_NOWARNING ); } - // Expand entities, since Adobe Illustrator uses them for xmlns - // attributes (bug 31719). Note that libxml2 has some protection - // against large recursive entity expansions so this is not as + // Expand entities, since Adobe Illustrator uses them for xmlns + // attributes (bug 31719). Note that libxml2 has some protection + // against large recursive entity expansions so this is not as // insecure as it might appear to be. $this->reader->setParserProperty( XMLReader::SUBST_ENTITIES, true ); diff --git a/includes/media/XMPInfo.php b/includes/media/XMPInfo.php index 83b8a102d0..aa411dfdf9 100644 --- a/includes/media/XMPInfo.php +++ b/includes/media/XMPInfo.php @@ -669,7 +669,7 @@ class XMPInfo { * 'validate' => 'validateClosed', * 'choices' => array( '1' => true, '2' => true ), * ), - */ + */ ), 'http://ns.adobe.com/exif/1.0/aux/' => array( 'Lens' => array( diff --git a/includes/media/XMPValidate.php b/includes/media/XMPValidate.php index 5ce3c00bde..e3fd59fdad 100644 --- a/includes/media/XMPValidate.php +++ b/includes/media/XMPValidate.php @@ -153,7 +153,7 @@ class XMPValidate { //check if its in a numeric range $inRange = false; - if ( isset( $info['rangeLow'] ) + if ( isset( $info['rangeLow'] ) && isset( $info['rangeHigh'] ) && is_numeric( $val ) && ( intval( $val ) <= $info['rangeHigh'] ) @@ -342,7 +342,7 @@ class XMPValidate { } $m = array(); - if ( preg_match( + if ( preg_match( '/(\d{1,3}),(\d{1,2}),(\d{1,2})([NWSE])/D', $val, $m ) ) { @@ -354,7 +354,7 @@ class XMPValidate { } $val = $coord; return; - } elseif ( preg_match( + } elseif ( preg_match( '/(\d{1,3}),(\d{1,2}(?:.\d*)?)([NWSE])/D', $val, $m ) ) { @@ -367,7 +367,7 @@ class XMPValidate { return; } else { - wfDebugLog( 'XMP', __METHOD__ + wfDebugLog( 'XMP', __METHOD__ . " Expected GPSCoordinate, but got $val." ); $val = null; return; diff --git a/includes/normal/Utf8CaseGenerate.php b/includes/normal/Utf8CaseGenerate.php index 368d0bcdff..d9deb3c36f 100644 --- a/includes/normal/Utf8CaseGenerate.php +++ b/includes/normal/Utf8CaseGenerate.php @@ -49,7 +49,7 @@ while( false !== ($line = fgets( $in ) ) ) { $name = $columns[1]; $simpleUpper = $columns[12]; $simpleLower = $columns[13]; - + $source = codepointToUtf8( hexdec( $codepoint ) ); if( $simpleUpper ) { $wikiUpperChars[$source] = codepointToUtf8( hexdec( $simpleUpper ) ); diff --git a/includes/normal/UtfNormal.php b/includes/normal/UtfNormal.php index 08f85bd342..64d96187d5 100644 --- a/includes/normal/UtfNormal.php +++ b/includes/normal/UtfNormal.php @@ -765,7 +765,7 @@ class UtfNormal { * @param $string String The string * @return String String with the character codes replaced. */ - private static function replaceForNativeNormalize( $string ) { + private static function replaceForNativeNormalize( $string ) { $string = preg_replace( '/[\x00-\x08\x0b\x0c\x0e-\x1f]/', UTF8_REPLACEMENT, diff --git a/includes/normal/UtfNormalBench.php b/includes/normal/UtfNormalBench.php index 944c443530..6642844e2b 100644 --- a/includes/normal/UtfNormalBench.php +++ b/includes/normal/UtfNormalBench.php @@ -19,7 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html - * + * * @file * @ingroup UtfNormal */ diff --git a/includes/normal/UtfNormalDefines.php b/includes/normal/UtfNormalDefines.php index 5142a4143b..64624b8a14 100644 --- a/includes/normal/UtfNormalDefines.php +++ b/includes/normal/UtfNormalDefines.php @@ -2,7 +2,7 @@ /** * Some constant definitions for the unicode normalization module. * - * Note: these constants must all be resolvable at compile time by HipHop, + * Note: these constants must all be resolvable at compile time by HipHop, * since this file will not be executed during request startup for a compiled * MediaWiki. * diff --git a/includes/normal/UtfNormalGenerate.php b/includes/normal/UtfNormalGenerate.php index e4c1138ea3..11d06d4ccd 100644 --- a/includes/normal/UtfNormalGenerate.php +++ b/includes/normal/UtfNormalGenerate.php @@ -177,7 +177,7 @@ if( $out ) { * * @file */ - + UtfNormal::\$utfCombiningClass = unserialize( '$serCombining' ); UtfNormal::\$utfCanonicalComp = unserialize( '$serComp' ); UtfNormal::\$utfCanonicalDecomp = unserialize( '$serCanon' ); diff --git a/includes/objectcache/EhcacheBagOStuff.php b/includes/objectcache/EhcacheBagOStuff.php index 156c39ec02..60d0645c90 100644 --- a/includes/objectcache/EhcacheBagOStuff.php +++ b/includes/objectcache/EhcacheBagOStuff.php @@ -28,9 +28,9 @@ * @ingroup Cache */ class EhcacheBagOStuff extends BagOStuff { - var $servers, $cacheName, $connectTimeout, $timeout, $curlOptions, + var $servers, $cacheName, $connectTimeout, $timeout, $curlOptions, $requestData, $requestDataPos; - + var $curls = array(); /** @@ -49,7 +49,7 @@ class EhcacheBagOStuff extends BagOStuff { } $this->servers = $params['servers']; $this->cacheName = isset( $params['cache'] ) ? $params['cache'] : 'mw'; - $this->connectTimeout = isset( $params['connectTimeout'] ) + $this->connectTimeout = isset( $params['connectTimeout'] ) ? $params['connectTimeout'] : 1; $this->timeout = isset( $params['timeout'] ) ? $params['timeout'] : 1; $this->curlOptions = array( @@ -77,7 +77,7 @@ class EhcacheBagOStuff extends BagOStuff { if ( $response['http_code'] >= 300 ) { wfDebug( __METHOD__.": GET failure, got HTTP {$response['http_code']}\n" ); wfProfileOut( __METHOD__ ); - return false; + return false; } $body = $response['body']; $type = $response['content_type']; @@ -203,9 +203,9 @@ class EhcacheBagOStuff extends BagOStuff { * @return int */ protected function attemptPut( $key, $data, $type, $ttl ) { - // In initial benchmarking, it was 30 times faster to use CURLOPT_POST + // In initial benchmarking, it was 30 times faster to use CURLOPT_POST // than CURLOPT_UPLOAD with CURLOPT_READFUNCTION. This was because - // CURLOPT_UPLOAD was pushing the request headers first, then waiting + // CURLOPT_UPLOAD was pushing the request headers first, then waiting // for an ACK packet, then sending the data, whereas CURLOPT_POST just // sends the headers and the data in a single send(). $response = $this->doItemRequest( $key, @@ -232,7 +232,7 @@ class EhcacheBagOStuff extends BagOStuff { */ protected function createCache( $key ) { wfDebug( __METHOD__.": creating cache for $key\n" ); - $response = $this->doCacheRequest( $key, + $response = $this->doCacheRequest( $key, array( CURLOPT_POST => 1, CURLOPT_CUSTOMREQUEST => 'PUT', @@ -280,7 +280,7 @@ class EhcacheBagOStuff extends BagOStuff { if ( array_diff_key( $curlOptions, $this->curlOptions ) ) { // var_dump( array_diff_key( $curlOptions, $this->curlOptions ) ); throw new MWException( __METHOD__.": to prevent options set in one doRequest() " . - "call from affecting subsequent doRequest() calls, only options listed " . + "call from affecting subsequent doRequest() calls, only options listed " . "in \$this->curlOptions may be specified in the \$curlOptions parameter." ); } $curlOptions += $this->curlOptions; diff --git a/includes/objectcache/MemcachedBagOStuff.php b/includes/objectcache/MemcachedBagOStuff.php index 813c2727c4..643d2e94bf 100644 --- a/includes/objectcache/MemcachedBagOStuff.php +++ b/includes/objectcache/MemcachedBagOStuff.php @@ -101,7 +101,7 @@ class MemcachedBagOStuff extends BagOStuff { * @return Mixed */ public function replace( $key, $value, $exptime = 0 ) { - return $this->client->replace( $this->encodeKey( $key ), $value, + return $this->client->replace( $this->encodeKey( $key ), $value, $this->fixExpiry( $exptime ) ); } diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php index 536ba6ea07..9ac8ad87ce 100644 --- a/includes/objectcache/MemcachedClient.php +++ b/includes/objectcache/MemcachedClient.php @@ -897,7 +897,7 @@ class MWMemcached { return false; } if ( substr( $data, -2 ) !== "\r\n" ) { - $this->_handle_error( $sock, + $this->_handle_error( $sock, 'line ending missing from data block from $1' ); return false; } @@ -1096,7 +1096,7 @@ class MWMemcached { } /** - * Read the specified number of bytes from a stream. If there is an error, + * Read the specified number of bytes from a stream. If there is an error, * mark the socket dead. * * @param $sock The socket @@ -1137,7 +1137,7 @@ class MWMemcached { function _fgets( $sock ) { $result = fgets( $sock ); // fgets() may return a partial line if there is a select timeout after - // a successful recv(), so we have to check for a timeout even if we + // a successful recv(), so we have to check for a timeout even if we // got a string response. $data = stream_get_meta_data( $sock ); if ( $data['timed_out'] ) { diff --git a/includes/objectcache/MemcachedPhpBagOStuff.php b/includes/objectcache/MemcachedPhpBagOStuff.php index a46dc71628..5a9ee508b9 100644 --- a/includes/objectcache/MemcachedPhpBagOStuff.php +++ b/includes/objectcache/MemcachedPhpBagOStuff.php @@ -81,7 +81,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff { public function unlock( $key ) { return $this->client->unlock( $this->encodeKey( $key ) ); } - + /** * @param $key string * @param $value int diff --git a/includes/objectcache/MultiWriteBagOStuff.php b/includes/objectcache/MultiWriteBagOStuff.php index e496ddd8ab..2f37c23b27 100644 --- a/includes/objectcache/MultiWriteBagOStuff.php +++ b/includes/objectcache/MultiWriteBagOStuff.php @@ -22,8 +22,8 @@ */ /** - * A cache class that replicates all writes to multiple child caches. Reads - * are implemented by reading from the caches in the order they are given in + * A cache class that replicates all writes to multiple child caches. Reads + * are implemented by reading from the caches in the order they are given in * the configuration until a cache gives a positive result. * * @ingroup Cache diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index 9b360f3234..83b6016401 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -139,8 +139,8 @@ class ObjectCache { /** * Factory function that creates a memcached client object. * - * This always uses the PHP client, since the PECL client has a different - * hashing scheme and a different interpretation of the flags bitfield, so + * This always uses the PHP client, since the PECL client has a different + * hashing scheme and a different interpretation of the flags bitfield, so * switching between the two clients randomly would be disasterous. * * @param $params array diff --git a/includes/search/SearchIBM_DB2.php b/includes/search/SearchIBM_DB2.php index 51ed000f62..368d900feb 100644 --- a/includes/search/SearchIBM_DB2.php +++ b/includes/search/SearchIBM_DB2.php @@ -186,10 +186,10 @@ class SearchIBM_DB2 extends SearchEngine { $searchon = $this->db->strencode(join(',', $q)); $field = $this->getIndexField($fulltext); - + // requires Net Search Extender or equivalent //return " CONTAINS($field, '$searchon') > 0 "; - + return " lcase($field) LIKE lcase('%$searchon%')"; } diff --git a/includes/search/SearchMssql.php b/includes/search/SearchMssql.php index 69c92ba324..4edce35f97 100644 --- a/includes/search/SearchMssql.php +++ b/includes/search/SearchMssql.php @@ -78,7 +78,7 @@ class SearchMssql extends SearchEngine { * Return a partial WHERE clause to limit the search to the given namespaces * * @return String - * @private + * @private */ function queryNamespaces() { $namespaces = implode( ',', $this->namespaces ); @@ -146,7 +146,7 @@ class SearchMssql extends SearchEngine { $match = $this->parseQuery( $filteredTerm, $fulltext ); $page = $this->db->tableName( 'page' ); $searchindex = $this->db->tableName( 'searchindex' ); - + return 'SELECT page_id, page_namespace, page_title, ftindex.[RANK]' . "FROM $page,FREETEXTTABLE($searchindex , $match, LANGUAGE 'English') as ftindex " . 'WHERE page_id=ftindex.[KEY] '; @@ -196,7 +196,7 @@ class SearchMssql extends SearchEngine { */ function update( $id, $title, $text ) { // We store the column data as UTF-8 byte order marked binary stream - // because we are invoking the plain text IFilter on it so that, and we want it + // because we are invoking the plain text IFilter on it so that, and we want it // to properly decode the stream as UTF-8. SQL doesn't support UTF8 as a data type // but the indexer will correctly handle it by this method. Since all we are doing // is passing this data to the indexer and never retrieving it via PHP, this will save space diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php index a2db52f364..29070e1ad1 100644 --- a/includes/search/SearchOracle.php +++ b/includes/search/SearchOracle.php @@ -29,32 +29,32 @@ * @ingroup Search */ class SearchOracle extends SearchEngine { - - private $reservedWords = array ('ABOUT' => 1, - 'ACCUM' => 1, - 'AND' => 1, - 'BT' => 1, - 'BTG' => 1, - 'BTI' => 1, + + private $reservedWords = array ('ABOUT' => 1, + 'ACCUM' => 1, + 'AND' => 1, + 'BT' => 1, + 'BTG' => 1, + 'BTI' => 1, 'BTP' => 1, - 'FUZZY' => 1, - 'HASPATH' => 1, - 'INPATH' => 1, - 'MINUS' => 1, - 'NEAR' => 1, + 'FUZZY' => 1, + 'HASPATH' => 1, + 'INPATH' => 1, + 'MINUS' => 1, + 'NEAR' => 1, 'NOT' => 1, - 'NT' => 1, - 'NTG' => 1, - 'NTI' => 1, - 'NTP' => 1, - 'OR' => 1, - 'PT' => 1, - 'RT' => 1, + 'NT' => 1, + 'NTG' => 1, + 'NTI' => 1, + 'NTP' => 1, + 'OR' => 1, + 'PT' => 1, + 'RT' => 1, 'SQE' => 1, - 'SYN' => 1, - 'TR' => 1, - 'TRSYN' => 1, - 'TT' => 1, + 'SYN' => 1, + 'TR' => 1, + 'TRSYN' => 1, + 'TT' => 1, 'WITHIN' => 1); /** @@ -254,13 +254,13 @@ class SearchOracle extends SearchEngine { ), 'SearchOracle::update' ); // Sync the index - // We need to specify the DB name (i.e. user/schema) here so that + // We need to specify the DB name (i.e. user/schema) here so that // it can work from the installer, where // ALTER SESSION SET CURRENT_SCHEMA = ... // was used. - $dbw->query( "CALL ctx_ddl.sync_index(" . + $dbw->query( "CALL ctx_ddl.sync_index(" . $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', 'raw' ) ) . ")" ); - $dbw->query( "CALL ctx_ddl.sync_index(" . + $dbw->query( "CALL ctx_ddl.sync_index(" . $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', 'raw' ) ) . ")" ); } -- 2.20.1