Fix case of called functions/methods
authorMatthias Schmidt <gravatronics@live.com>
Wed, 6 Apr 2016 12:31:38 +0000 (14:31 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 6 Apr 2016 12:31:38 +0000 (14:31 +0200)
17 files changed:
wcfsetup/install.php
wcfsetup/install/files/lib/data/user/UserProfile.class.php
wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php
wcfsetup/install/files/lib/system/cache/source/RedisCacheSource.class.php
wcfsetup/install/files/lib/system/condition/TimeCondition.class.php
wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php
wcfsetup/install/files/lib/system/database/Database.class.php
wcfsetup/install/files/lib/system/email/Email.class.php
wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php
wcfsetup/install/files/lib/system/io/Tar.class.php
wcfsetup/install/files/lib/system/io/TarWriter.class.php
wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php
wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/upload/UploadFile.class.php
wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php
wcfsetup/install/files/lib/util/XML.class.php
wcfsetup/install/files/lib/util/XMLWriter.class.php

index de5a1789d39f5ec79a0cf868187b1b49cf90b21d..c76427517e3b2f8af128e40537bffcd100837727 100644 (file)
@@ -642,14 +642,14 @@ class Tar {
                $data = unpack($format, $binaryData);
                
                // Extract the properties
-               $header['checksum'] = octDec(trim($data['checksum']));
+               $header['checksum'] = octdec(trim($data['checksum']));
                if ($header['checksum'] == $checksum) {
                        $header['filename'] = trim($data['filename']);
-                       $header['mode'] = octDec(trim($data['mode']));
-                       $header['uid'] = octDec(trim($data['uid']));
-                       $header['gid'] = octDec(trim($data['gid']));
-                       $header['size'] = octDec(trim($data['size']));
-                       $header['mtime'] = octDec(trim($data['mtime']));
+                       $header['mode'] = octdec(trim($data['mode']));
+                       $header['uid'] = octdec(trim($data['uid']));
+                       $header['gid'] = octdec(trim($data['gid']));
+                       $header['size'] = octdec(trim($data['size']));
+                       $header['mtime'] = octdec(trim($data['mtime']));
                        $header['prefix'] = trim($data['prefix']);
                        if ($header['prefix']) {
                                $header['filename'] = $header['prefix'].'/'.$header['filename'];
index 6c303c5b1490b8863b914d85d3ab5df66a9362e8..ff892341de976ef1c2828efef5e30c3a147af664 100644 (file)
@@ -831,7 +831,7 @@ class UserProfile extends DatabaseObjectDecorator implements IBreadcrumbProvider
        public function getAnchorTag() {
                $link = LinkHandler::getInstance()->getLink('User', ['object' => $this->getDecoratedObject()]);
                
-               return '<a href="'.$link.'" class="userLink" data-user-id="'.$this->userID.'">'.StringUtil::encodeHtml($this->username).'</a>';
+               return '<a href="'.$link.'" class="userLink" data-user-id="'.$this->userID.'">'.StringUtil::encodeHTML($this->username).'</a>';
        }
        
        /**
index 3ed9eb88fac793c5a9a9c8df3db8afe783d5351a..c08579f0f751ff8a91713e04a7325aa4fdadb9bc 100644 (file)
@@ -169,7 +169,7 @@ class BackgroundQueueHandler extends SingletonFactory {
                        $commited = true;
                }
                finally {
-                       if (!$commited) WCF::getDB()->rollbackTransaction();
+                       if (!$commited) WCF::getDB()->rollBackTransaction();
                }
                
                $job = null;
index 7848d4f183abb15655c3cee1ce8ab75c70071f66..4b33a51183b52d3049979830252b538233452f74 100644 (file)
@@ -76,7 +76,7 @@ class RedisCacheSource implements ICacheSource {
                        }
                        else {
                                // delete the specified key from the hashset
-                               $this->redis->hdel($this->getCacheName($parts[0]), $parts[1]);
+                               $this->redis->hDel($this->getCacheName($parts[0]), $parts[1]);
                        }
                }
                else {
@@ -102,7 +102,7 @@ class RedisCacheSource implements ICacheSource {
                $parts = explode('-', $cacheName, 2);
                
                if (isset($parts[1])) {
-                       $value = $this->redis->hget($this->getCacheName($parts[0]), $parts[1]);
+                       $value = $this->redis->hGet($this->getCacheName($parts[0]), $parts[1]);
                }
                else {
                        $value = $this->redis->get($this->getCacheName($cacheName));
@@ -149,7 +149,7 @@ class RedisCacheSource implements ICacheSource {
                        
                        // save parameterized cache entries as field in a hashset
                        // saving in a hashset is safe as the smallest lifetime of its fields is set as TTL for the whole hashset
-                       $this->redis->hset($key, $parts[1], serialize($value));
+                       $this->redis->hSet($key, $parts[1], serialize($value));
                        
                        $keyTTL = $this->redis->ttl($key);
                        $newTTL = $this->getTTL($maxLifetime);
index 1844b9b0d91ebabfbdc882b7489229f7d591743e..5d8ec76e05cb27fcd3562ad3461daf4e804b65fe 100644 (file)
@@ -166,7 +166,7 @@ HTML;
                }
                
                if ($startDateTime !== null && $endDateTime !== null) {
-                       if ($startDateTime->getTimestamp() >= $endDateTime->getTimeStamp()) {
+                       if ($startDateTime->getTimestamp() >= $endDateTime->getTimestamp()) {
                                $this->errorMessages['time'] = 'wcf.date.endTime.error.beforeStartTime';
                                
                                throw new UserInputException('endTime', 'beforeStartTime');
index b5caf9d8542d320fd061e7885648e019a850ad9e..c028f2c1380f4fb3ea09d3cfa36c888ba8f5ccd3 100644 (file)
@@ -76,7 +76,7 @@ class BackgroundQueueCleanUpCronjob extends AbstractCronjob {
                        $commited = true;
                }
                finally {
-                       if (!$commited) WCF::getDB()->rollbackTransaction();
+                       if (!$commited) WCF::getDB()->rollBackTransaction();
                }
        }
 }
index 91eb80586458776bf6cae17b054661d7358728ce..bd4913ca5bd42cd30bd63ba483977212183fcb6b 100644 (file)
@@ -198,7 +198,7 @@ abstract class Database {
                        $this->activeTransactions--;
                        if ($this->activeTransactions === 0) {
                                if (WCF::benchmarkIsEnabled()) Benchmark::getInstance()->start("ROLLBACK", Benchmark::TYPE_SQL_QUERY);
-                               $result = $this->pdo->rollback();
+                               $result = $this->pdo->rollBack();
                        }
                        else {
                                if (WCF::benchmarkIsEnabled()) Benchmark::getInstance()->start("ROLLBACK TO SAVEPOINT level".$this->activeTransactions, Benchmark::TYPE_SQL_QUERY);
index 0822fca22667ae4deb9de6d88cd20b2c57bb981f..ffd558bb9140399a4bb8a62c4e11d0459c90c0d1 100644 (file)
@@ -513,7 +513,7 @@ class Email {
                $body = "";
                
                if (count($this->text) > 1 || $this->attachments) {
-                       $body .= StringUtil::wordWrap("This is a MIME encoded email. As you are seeing this your user agent does not support these.");
+                       $body .= StringUtil::wordwrap("This is a MIME encoded email. As you are seeing this your user agent does not support these.");
                        $body .= "\r\n\r\n";
                }
                
index 1ab8ed2cb0eb064ec3c4befaec4b5c778ce14675..244f34bab6c3edd8b700bf4fbf439cbb4808a8b7 100644 (file)
@@ -65,27 +65,27 @@ class GDImageAdapter implements IImageAdapter {
                $this->image = $image;
                $this->type = $type;
                
-               $this->height = imageSY($this->image);
-               $this->width = imageSX($this->image);
+               $this->height = imagesy($this->image);
+               $this->width = imagesx($this->image);
        }
        
        /**
         * @see \wcf\system\image\adapter\IImageAdapter::loadFile()
         */
        public function loadFile($file) {
-               list($this->width, $this->height, $this->type) = getImageSize($file);
+               list($this->width, $this->height, $this->type) = getimagesize($file);
                
                switch ($this->type) {
                        case IMAGETYPE_GIF:
-                               $this->image = imageCreateFromGif($file);
+                               $this->image = imagecreatefromgif($file);
                        break;
                        
                        case IMAGETYPE_JPEG:
-                               $this->image = imageCreateFromJpeg($file);
+                               $this->image = imagecreatefromjpeg($file);
                        break;
                        
                        case IMAGETYPE_PNG:
-                               $this->image = imageCreateFromPng($file);
+                               $this->image = imagecreatefrompng($file);
                        break;
                        
                        default:
@@ -98,7 +98,7 @@ class GDImageAdapter implements IImageAdapter {
         * @see \wcf\system\image\adapter\IImageAdapter::createEmptyImage()
         */
        public function createEmptyImage($width, $height) {
-               $this->image = imageCreate($width, $height);
+               $this->image = imagecreate($width, $height);
                $this->type = IMAGETYPE_PNG;
                $this->setColor(0xFF, 0xFF, 0xFF);
                $this->color = null;
@@ -139,10 +139,10 @@ class GDImageAdapter implements IImageAdapter {
                }
                
                // resize image
-               $image = imageCreateTrueColor($width, $height);
-               imageAlphaBlending($image, false);
-               imageCopyResampled($image, $this->image, 0, 0, $x, $y, $width, $height, $sourceWidth, $sourceHeight);
-               imageSaveAlpha($image, true);
+               $image = imagecreatetruecolor($width, $height);
+               imagealphablending($image, false);
+               imagecopyresampled($image, $this->image, 0, 0, $x, $y, $width, $height, $sourceWidth, $sourceHeight);
+               imagesavealpha($image, true);
                
                return $image;
        }
@@ -151,11 +151,11 @@ class GDImageAdapter implements IImageAdapter {
         * @see \wcf\system\image\adapter\IImageAdapter::clip()
         */
        public function clip($originX, $originY, $width, $height) {
-               $image = imageCreateTrueColor($width, $height);
-               imageAlphaBlending($image, false);
+               $image = imagecreatetruecolor($width, $height);
+               imagealphablending($image, false);
                
-               imageCopy($image, $this->image, 0, 0, $originX, $originY, $width, $height);
-               imageSaveAlpha($image, true);
+               imagecopy($image, $this->image, 0, 0, $originX, $originY, $width, $height);
+               imagesavealpha($image, true);
                
                // reload image to update image resource, width and height
                $this->load($image, $this->type);
@@ -165,11 +165,11 @@ class GDImageAdapter implements IImageAdapter {
         * @see \wcf\system\image\adapter\IImageAdapter::resize()
         */
        public function resize($originX, $originY, $originWidth, $originHeight, $targetWidth = 0, $targetHeight = 0) {
-               $image = imageCreateTrueColor($targetWidth, $targetHeight);
-               imageAlphaBlending($image, false);
+               $image = imagecreatetruecolor($targetWidth, $targetHeight);
+               imagealphablending($image, false);
                
-               imageCopyResampled($image, $this->image, 0, 0, $originX, $originY, $targetWidth, $targetHeight, $originWidth, $originHeight);
-               imageSaveAlpha($image, true);
+               imagecopyresampled($image, $this->image, 0, 0, $originX, $originY, $targetWidth, $targetHeight, $originWidth, $originHeight);
+               imagesavealpha($image, true);
                
                // reload image to update image resource, width and height
                $this->load($image, $this->type);
@@ -179,7 +179,7 @@ class GDImageAdapter implements IImageAdapter {
         * @see \wcf\system\image\adapter\IImageAdapter::drawRectangle()
         */
        public function drawRectangle($startX, $startY, $endX, $endY) {
-               imageFilledRectangle($this->image, $startX, $startY, $endX, $endY, $this->color);
+               imagefilledrectangle($this->image, $startX, $startY, $endX, $endY, $this->color);
        }
        
        /**
@@ -277,7 +277,7 @@ class GDImageAdapter implements IImageAdapter {
         * @see \wcf\system\image\adapter\IImageAdapter::setColor()
         */
        public function setColor($red, $green, $blue) {
-               $this->color = imageColorAllocate($this->image, $red, $green, $blue);
+               $this->color = imagecolorallocate($this->image, $red, $green, $blue);
                
                // save data of the color
                $this->colorData = array(
@@ -300,7 +300,7 @@ class GDImageAdapter implements IImageAdapter {
        public function setTransparentColor($red, $green, $blue) {
                if ($this->type == IMAGETYPE_PNG) {
                        $color = imagecolorallocate($this->image, $red, $green, $blue);
-                       imageColorTransparent($this->image, $color);
+                       imagecolortransparent($this->image, $color);
                }
        }
        
@@ -315,13 +315,13 @@ class GDImageAdapter implements IImageAdapter {
                ob_start();
                
                if ($this->type == IMAGETYPE_GIF) {
-                       imageGIF($image);
+                       imagegif($image);
                }
                else if ($this->type == IMAGETYPE_PNG) {
-                       imagePNG($image);
+                       imagepng($image);
                }
                else if (function_exists('imageJPEG')) {
-                       imageJPEG($image, null, 90);
+                       imagejpeg($image, null, 90);
                }
                
                $stream = ob_get_contents();
index 26377be43e8e60a05ff6c5800ec7476dd3ed030a..4953a666d70d0e5705b0e14cdc9fe2dbc6c1b3d4 100644 (file)
@@ -314,14 +314,14 @@ class Tar implements IArchive {
                $data = unpack($format, $binaryData);
                
                // Extract the properties
-               $header['checksum'] = octDec(trim($data['checksum']));
+               $header['checksum'] = octdec(trim($data['checksum']));
                if ($header['checksum'] == $checksum) {
                        $header['filename'] = trim($data['filename']);
-                       $header['mode'] = octDec(trim($data['mode']));
-                       $header['uid'] = octDec(trim($data['uid']));
-                       $header['gid'] = octDec(trim($data['gid']));
-                       $header['size'] = octDec(trim($data['size']));
-                       $header['mtime'] = octDec(trim($data['mtime']));
+                       $header['mode'] = octdec(trim($data['mode']));
+                       $header['uid'] = octdec(trim($data['uid']));
+                       $header['gid'] = octdec(trim($data['gid']));
+                       $header['size'] = octdec(trim($data['size']));
+                       $header['mtime'] = octdec(trim($data['mtime']));
                        $header['prefix'] = trim($data['prefix']);
                        if ($header['prefix']) {
                                $header['filename'] = $header['prefix'].'/'.$header['filename'];
index 496654ac81e0bfd4caac9dd717eaea28c341dbf3..b95e2f79511d32fb96a8904245b63deb9f516f0e 100644 (file)
@@ -217,16 +217,16 @@ class TarWriter extends Tar {
                }
                
                if ($typeFlag == "5") {
-                       $size = sprintf("%11s ", decOct(0));
+                       $size = sprintf("%11s ", decoct(0));
                }
                else {
-                       $size = sprintf("%11s ", decOct($size));
+                       $size = sprintf("%11s ", decoct($size));
                }
                
-               $uid = sprintf("%6s ", decOct($uid));
-               $gid = sprintf("%6s ", decOct($gid));
-               $permissions = sprintf("%6s ", decOct($permissions));
-               $mtime = sprintf("%11s", decOct($mtime));
+               $uid = sprintf("%6s ", decoct($uid));
+               $gid = sprintf("%6s ", decoct($gid));
+               $permissions = sprintf("%6s ", decoct($permissions));
+               $mtime = sprintf("%11s", decoct($mtime));
                
                $binaryDataFirst = pack('a100a8a8a8a12A12', $filename, $permissions, $uid, $gid, $size, $mtime);
                $binaryDataLast = pack('a1a100a6a2a32a32a8a8a155a12', $typeFlag, '', '', '', '', '', '', '', '', '');
@@ -244,7 +244,7 @@ class TarWriter extends Tar {
                }
                
                $this->file->write($binaryDataFirst, 148);
-               $this->file->write(pack('a8', sprintf("%6s ", decOct($checksum))), 8); // write the checksum
+               $this->file->write(pack('a8', sprintf("%6s ", decoct($checksum))), 8); // write the checksum
                $this->file->write($binaryDataLast, 356);
                
                return true;
@@ -257,7 +257,7 @@ class TarWriter extends Tar {
         * @return      boolean
         */
        protected function writeLongHeaderBlock($filename) {
-               $size = sprintf("%11s ", decOct(strlen($filename)));
+               $size = sprintf("%11s ", decoct(strlen($filename)));
                $typeFlag = 'L';
                
                $binaryDataFirst = pack('a100a8a8a8a12A12', '././@LongLink', 0, 0, 0, $size, 0);
@@ -276,7 +276,7 @@ class TarWriter extends Tar {
                }
                
                $this->file->write($binaryDataFirst, 148);
-               $this->file->write(pack('a8', sprintf("%6s ", decOct($checksum))), 8); // write the checksum
+               $this->file->write(pack('a8', sprintf("%6s ", decoct($checksum))), 8); // write the checksum
                $this->file->write($binaryDataLast, 356);
                
                $i = 0;
index b638df31f2e6af45022b4d96f1269e9239d3f788..0fee86ee7af9255231b88e898461af95754f138e 100644 (file)
@@ -60,7 +60,7 @@ class FileSizeOptionType extends TextOptionType {
         * @see \wcf\system\option\IOptionType::getFormElement()
         */
        public function getFormElement(Option $option, $value) {
-               $value = FileUtil::formatFileSize($value);
+               $value = FileUtil::formatFilesize($value);
                return parent::getFormElement($option, $value);
        }
        
index 29516a2d1a1e62f6ecc9dba51ac19fb3506654ba..5c4f2b9a09d1f258a0a1ad444b765a79fba29def 100644 (file)
@@ -99,7 +99,7 @@ class SQLPackageInstallationPlugin extends AbstractPackageInstallationPlugin {
                }
                
                // get all tablenames from database
-               $existingTableNames = WCF::getDB()->getEditor()->getTablenames();
+               $existingTableNames = WCF::getDB()->getEditor()->getTableNames();
                
                // delete or alter tables
                foreach ($entries as $entry) {
index a760aaf297e6cbf4cb7e12eae297d338a4dafaee..afe67ffba77e16e0adf888018bf6f60922430e90 100644 (file)
@@ -168,7 +168,7 @@ class UploadFile {
         */
        public function getImageData() {
                if (strpos($this->getMimeType(), 'image/') == 0) {
-                       if (($imageData = @getImageSize($this->getLocation())) !== false) {
+                       if (($imageData = @getimagesize($this->getLocation())) !== false) {
                                return array(
                                        'width' => $imageData[0],
                                        'height' => $imageData[1],
index 60d6e3dd18edffad40464bef0df23dc62618fba0..2ebe2883d4beb22dc6d9e146b08f259cfdcaf79a 100644 (file)
@@ -248,7 +248,7 @@ class UserStorageHandler extends SingletonFactory {
                                break;
                        }
                        catch (\Exception $e) {
-                               WCF::getDB()->rollbackTransaction();
+                               WCF::getDB()->rollBackTransaction();
                                
                                // retry up to 2 times
                                if (++$i === 2) {
index 42cb4e936ae7fadb79ae2fdc1ec7c5f942d70f71..a30359320ac3f8d74ff76f0d1aa2ab4ed47669c2 100644 (file)
@@ -110,7 +110,7 @@ class XML {
         */
        protected function getSchema() {
                // determine schema by looking for xsi:schemaLocation
-               $this->schema = $this->document->documentElement->getAttributeNS($this->document->documentElement->lookupNamespaceURI('xsi'), 'schemaLocation');
+               $this->schema = $this->document->documentElement->getAttributeNS($this->document->documentElement->lookupNamespaceUri('xsi'), 'schemaLocation');
                
                // no valid schema found or it's lacking a valid namespace
                if (strpos($this->schema, ' ') === false) {
index d2bb4907aab6e605e1a2aff014303d2c72ca4b33..2e78be509cadfbce5ec5c210668eb94815dd6848 100644 (file)
@@ -130,7 +130,7 @@ class XMLWriter {
                }
                
                // content
-               $this->xml->writeCData(StringUtil::escapeCDATA($cdata));
+               $this->xml->writeCdata(StringUtil::escapeCDATA($cdata));
                
                $this->endElement();
        }