}
}
- foreach ($this->landingPageID as $packageID => $landingPageID) {
+ foreach ($this->landingPageID as $landingPageID) {
if (!$landingPageID) {
continue;
}
// save object type relations
$this->saveObjectTypeRelations($returnValues['returnValues']->groupID);
- foreach ($this->labelObjectTypes as $objectTypeID => $labelObjectType) {
+ foreach ($this->labelObjectTypes as $labelObjectType) {
$labelObjectType->save();
}
// update object type relations
$this->saveObjectTypeRelations($this->groupID);
- foreach ($this->labelObjectTypes as $objectTypeID => $labelObjectType) {
+ foreach ($this->labelObjectTypes as $labelObjectType) {
$labelObjectType->save();
}
{
parent::save();
- foreach ($this->events as $objectType => $events) {
+ foreach ($this->events as $events) {
foreach ($events as $event) {
$preset = 0;
$presetMailNotificationType = 'none';
}
// get special columns
- foreach ($this->users as $key => $user) {
+ foreach ($this->users as $user) {
foreach ($this->columns as $column) {
switch ($column) {
case 'email':
WCF::getSession()->disableUpdate();
try {
- foreach ($this->getObjects() as $key => $cronjob) {
+ foreach ($this->getObjects() as $cronjob) {
// mark them as pending
$cronjob->update(['state' => Cronjob::PENDING]);
}
foreach ($dirs as $dir => $domainPaths) {
\krsort($domainPaths);
- foreach ($domainPaths as $domainPath => $value) {
+ foreach ($domainPaths as $value) {
$htaccess = "{$dir}.htaccess";
$path = FileUtil::addTrailingSlash(\substr($value, \strlen($dir)));
if ($path == '/') {
// remove duplicates when there are both versions from trusted and untrusted servers
foreach ($possiblePackages as $identifier => $packageSources) {
$hasTrustedSource = false;
- foreach ($packageSources as $packageUpdateID => $packageUpdateServerID) {
+ foreach ($packageSources as $packageUpdateServerID) {
if (\in_array($packageUpdateServerID, $trustedServerIDs)) {
$hasTrustedSource = true;
break;
// Sort by the highest version and return all other sources for the same package.
$validPackageUpdateIDs = [];
- foreach ($possiblePackages as $identifier => $packageSources) {
+ foreach ($possiblePackages as $packageSources) {
if (\count($packageSources) > 1) {
$packageUpdateVersionIDs = [];
foreach (\array_keys($packageSources) as $packageUpdateID) {
// determine highest versions
$packageUpdates = [];
- foreach ($packageVersions as $package => $versionData) {
+ foreach ($packageVersions as $versionData) {
$accessible = $existing = $versions = [];
foreach ($versionData as $packageUpdateID => $versionTypes) {
* @var int $packageUpdateID
* @var ViewablePackageUpdate $packageUpdate
*/
- foreach ($packageUpdates as $packageUpdateID => $packageUpdate) {
+ foreach ($packageUpdates as $packageUpdate) {
$versionIDs = $updateData[$packageUpdate->packageUpdateID];
$packageUpdate->setAccessibleVersion($updateVersions[$versionIDs['accessible']]);
$packageUpdate->setLatestVersion($updateVersions[$versionIDs['existing']]);
$result = $this->objectAction->executeAction();
/** @var User $user */
$user = $result['returnValues'];
- $userEditor = new UserEditor($user);
// update session
WCF::getSession()->changeUser($user);
*/
protected static function getAvailableLanguages()
{
- $languages = $match = [];
+ $languages = [];
foreach (\glob(TMP_DIR . 'setup/lang/*.xml') as $file) {
$xml = new XML();
$xml->load($file);
return $tag['source'];
}
- $index = (isset($tag['bufferPlaceholder'])) ? $index = $tag['bufferPlaceholder'] : \count($this->openTagIdentifiers);
+ $index = (isset($tag['bufferPlaceholder'])) ? $tag['bufferPlaceholder'] : \count($this->openTagIdentifiers);
$uuid = StringUtil::getUUID();
$this->openTagIdentifiers[$index] = [
if ($templateListener->options || $templateListener->permissions) {
$templateCode = '{if ';
- $options = $permissions = [];
+ $options = [];
if ($templateListener->options) {
$options = \explode(',', \strtoupper($templateListener->options));
$optionData[$row['groupID']][$row['optionName']] = $row;
}
- foreach ($optionData as $groupID => $options) {
+ foreach ($optionData as $options) {
$optionBlacklist = [];
foreach ($options as $option) {
}
if (!empty($commentEvents)) {
- foreach ($commentEvents as $eventID => $eventData) {
+ foreach ($commentEvents as $eventData) {
UserNotificationHandler::getInstance()->markAsConfirmed(
$eventData['eventName'],
$eventData['objectType'],
}
if (!empty($responseEvents)) {
- foreach ($responseEvents as $eventID => $eventData) {
+ foreach ($responseEvents as $eventData) {
UserNotificationHandler::getInstance()->markAsConfirmed(
$eventData['eventName'],
$eventData['objectType'],
}
if (!empty($responseEvents)) {
- foreach ($responseEvents as $eventID => $eventData) {
+ foreach ($responseEvents as $eventData) {
UserNotificationHandler::getInstance()->markAsConfirmed(
$eventData['eventName'],
$eventData['objectType'],
$options = $this->getOptions();
if (!isset($options[$this->fieldValue])) {
- foreach ($options as $key => $value) {
+ foreach ($options as $value) {
if (\is_array($value) && isset($value[$this->fieldValue])) {
return;
}
});
$iterator = new \RecursiveIteratorIterator($filter, \RecursiveIteratorIterator::SELF_FIRST);
- foreach ($iterator as $value => $item) {
+ foreach ($iterator as $item) {
/** @var \SplFileInfo $item */
$itemPath = $item->getRealPath();
if (\is_dir($itemPath)) {
});
$iterator = new \RecursiveIteratorIterator($filter, \RecursiveIteratorIterator::SELF_FIRST);
- foreach ($iterator as $value => $item) {
+ foreach ($iterator as $item) {
/** @var \SplFileInfo $item */
$itemPath = $item->getRealPath();
if (\is_dir($itemPath)) {
if ($nestedOptions) {
$collectedOptions = [];
- foreach ($options as $key => $object) {
+ foreach ($options as $object) {
if (!($object instanceof IObjectTreeNode)) {
throw new \InvalidArgumentException(
"Nested traversable options must implement '" . IObjectTreeNode::class . "'."
}
if (!empty($inlineStyles)) {
- $styles = [];
/** @var \DOMElement $element */
foreach ($this->getXPath()->query('//*[@style]') as $element) {
$tmp = \array_filter(\explode(';', $element->getAttribute('style')));
protected function groupPairsByName(array $pairs)
{
$groups = [];
- foreach ($pairs as $uuid => $data) {
+ foreach ($pairs as $data) {
$name = $data['name'];
if (!isset($groups[$name])) {
$objectIDs[$objectType] = [];
if (isset($this->quotes[$objectType])) {
foreach ($this->quotes[$objectType] as $objectID => $quotes) {
- foreach ($quotes as $quoteID => $isFullQuote) {
+ foreach ($quotes as $isFullQuote) {
if ($isFullQuote) {
$objectIDs[$objectType][] = $objectID;
break;
// check delivered files
if (!empty($lockedFiles)) {
- foreach ($files as $key => $file) {
+ foreach ($files as $file) {
if (isset($lockedFiles[$file])) {
$owningPackage = new Package($lockedFiles[$file]);
VALUES (?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
- foreach ($requirements as $identifier => $possibleRequirements) {
+ foreach ($requirements as $possibleRequirements) {
$requirement = \array_shift($possibleRequirements);
$statement->execute([
VALUES (?, ?, ?, ?, ?, ?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
- foreach ($pluginNodes as $index => $nodeData) {
+ foreach ($pluginNodes as $nodeData) {
$statement->execute([
$this->installation->queue->queueID,
$this->installation->queue->processNo,
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute($conditions->getParameters());
while ($row = $statement->fetchArray()) {
- foreach ($packageInstallations as $key => $packageInstallation) {
+ foreach ($packageInstallations as $packageInstallation) {
if ($packageInstallation['package'] == $row['excludedPackage']) {
if (!empty($row['excludedPackageVersion'])) {
// check version
// remove requirements of application packages
if ($removeRequirements) {
- foreach ($existingPackages as $identifier => $instances) {
+ foreach ($existingPackages as $instances) {
foreach ($instances as $instance) {
if ($instance['isApplication'] && isset($updates[$instance['packageID']])) {
$updates = $this->removeUpdateRequirements(
SearchIndexManager::getInstance()->createSearchIndices();
// update search index
- foreach ($this->pages as $pageID => $page) {
+ foreach ($this->pages as $page) {
if ($page->pageType == 'text' || $page->pageType == 'html') {
foreach ($page->getPageContents() as $languageID => $pageContent) {
SearchIndexManager::getInstance()->set(
{
$abbreviation = 'wcf';
$anchor = '';
- $isACP = $originIsACP = RequestHandler::getInstance()->isACPRequest();
+ $isACP = RequestHandler::getInstance()->isACPRequest();
$isRaw = false;
$encodeTitle = true;
$newText = '';
$i = 0;
$length = \count($matches);
- foreach ($matches as $keyword => $position) {
+ foreach ($matches as $position) {
if ($position['start'] < $start) {
$position['end'] += $start - $position['start'];
$position['start'] = $start;
*/
public static function getDefaultVariables()
{
- $variables = [];
-
$sql = "SELECT variable.variableName, variable.defaultValue
FROM wcf" . WCF_N . "_style_variable variable
ORDER BY variable.variableID ASC";
$result[] = '';
}
- foreach ($pathA as $key => $dir) {
+ foreach ($pathA as $dir) {
if ($dir == '..') {
if (\end($result) == '..') {
$result[] = '..';
new \RecursiveArrayIterator($this->postParameters),
\RecursiveIteratorIterator::SELF_FIRST
);
- foreach ($iterator as $k => $v) {
+ foreach ($iterator as $v) {
/** @noinspection PhpUndefinedMethodInspection */
if (!$iterator->hasChildren()) {
$key = '';