}
}
- $startIndex = 0;
if (is_dir($filename)) {
if (self::$mode == 0644) {
@chmod($filename, 0755);
'title' => $this->title
))
));
- $returnValues = $this->objectAction->executeAction();
+ $this->objectAction->executeAction();
// transform conditions array into one-dimensional array
$conditions = array();
* @return string[]
*/
public function getOutstandingQueues() {
- $objectTypeIDs = ModerationQueueManager::getInstance()->getObjectTypeIDs(array_keys(ModerationQueueManager::getInstance()->getDefinitions()));
-
$conditions = new PreparedStatementConditionBuilder();
$conditions->add("moderation_queue_to_user.userID = ?", array(WCF::getUser()->userID));
$conditions->add("moderation_queue_to_user.isAffected = ?", array(1));
default:
throw new UserInputException('image');
}
-
+
if ($imageData[0] > Style::PREVIEW_IMAGE_MAX_WIDTH || $imageData[1] > Style::PREVIEW_IMAGE_MAX_HEIGHT) {
$adapter = ImageHandler::getInstance()->getAdapter();
$adapter->loadFile($fileLocation);
$fileLocation = FileUtil::getTemporaryFilename();
$thumbnail = $adapter->createThumbnail(Style::PREVIEW_IMAGE_MAX_WIDTH, Style::PREVIEW_IMAGE_MAX_HEIGHT, false);
$adapter->writeImage($thumbnail, $fileLocation);
- $imageData = getimagesize($fileLocation);
}
}
catch (SystemException $e) {
* @see \wcf\data\user\avatar\IUserAvatar::getURL()
*/
public function getURL($size = null) {
- if ($size === null) $size = $this->size;
-
return WCF::getPath().'images/avatars/avatar-default.svg';
}
$style = 'float: ' . $float . '; margin: ' . ($float == 'left' ? '0 15px 7px 0' : '0 0 7px 15px') . ';';
}
- $width = 0;
if (isset($openingTag['attributes'][2])) {
- $width = $openingTag['attributes'][2];
-
- $style .= 'width: ' . $width . 'px;';
+ $style .= 'width: ' . $openingTag['attributes'][2] . 'px;';
}
return '<img src="'.$src.'" class="jsResizeImage" alt=""'.($style ? ' style="' . $style . '"' : '').($dataSource ? ' data-source="'.StringUtil::encodeJS($dataSource).'"' : '').' />';
// check if writing animated gifs is supported
$version = $this->imagick->getVersion();
- $versionNumber = preg_match('~([0-9]+\.[0-9]+\.[0-9]+)~', $version['versionString'], $match);
+ preg_match('~([0-9]+\.[0-9]+\.[0-9]+)~', $version['versionString'], $match);
if (version_compare($match[0], '6.3.6') < 0) {
$this->supportsWritingAnimatedGIF = false;
}
}
// read headers
- $header = array();
$header = unpack('vminVersion/vgeneralPurposeBit/vcompression/vmtime/vmdate', $this->read(10));
$second = ($header['mtime'] & ((1 << 5) - 1)) * 2;
$minute = ($header['mtime'] >> 5) & ((1 << 6) - 1);
*/
public function getArchive() {
if ($this->archive === null) {
- $package = $this->getPackage();
// check if we're doing an iterative update of the same package
if ($this->previousPackageData !== null && $this->getPackage()->package == $this->previousPackageData['package']) {
if (Package::compareVersion($this->getPackage()->packageVersion, $this->previousPackageData['packageVersion'], '<')) {
// extract sql file from archive
if ($queries = $this->getSQL($this->instruction['value'])) {
- $package = $this->installation->getPackage();
-
// replace app1_ with app{WCF_N}_ in the table names for
// all applications
$packageList = new PackageList();
// remove poll
if (empty($this->pollData['question'])) {
$action = new PollAction(array($this->poll), 'delete');
- $returnValues = $action->executeAction();
+ $action->executeAction();
$this->poll = null;
return 0;
'data' => $this->pollData,
'options' => $this->pollOptions
));
- $returnValues = $action->executeAction();
+ $action->executeAction();
}
}
* attacker.
*/
protected function changeSessionID() {
- $oldSessionID = $this->session->sessionID;
$newSessionID = StringUtil::getRandomID();
/** @var \wcf\data\DatabaseObjectEditor $sessionEditor */
return;
}
- $responses = $responseIDs = [];
+ $responseIDs = [];
foreach ($events as $event) {
$responseIDs[] = $event->objectID;
}
return;
}
- $comments = $commentIDs = array();
+ $commentIDs = array();
foreach ($events as $event) {
$commentIDs[] = $event->objectID;
}
);
}
- $authorIDs = $eventIDs = $notificationIDs = $objectTypes = array();
+ $eventIDs = $notificationIDs = $objectTypes = array();
foreach ($notificationObjects as $notification) {
// cache object types
if (!isset($objectTypes[$notification->objectType])) {
}
// get objects
- $objectTypeObject = $this->availableObjectTypes[$objectType];
$event = $this->availableEvents[$objectType][$eventName];
// mark as confirmed