<?php
/**
* This script tries to find the temp folder and unzip all setup files into.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
return $_SERVER['DOCUMENT_ROOT'].'/tmp/';
}
}
-
+
if (isset($_ENV['TMP']) && @is_writable($_ENV['TMP'])) {
return $_ENV['TMP'] . '/';
}
if (isset($_ENV['TMPDIR']) && @is_writable($_ENV['TMPDIR'])) {
return $_ENV['TMPDIR'] . '/';
}
-
+
if (($path = ini_get('upload_tmp_dir')) && @is_writable($path)) {
return $path . '/';
}
* @category Community Framework
*/
// Constant to get relative path to the wcf-root-dir.
-// This constant is already set in each package which got an own config.inc.php
+// This constant is already set in each package which got an own config.inc.php
if (!defined('RELATIVE_WCF_DIR')) define('RELATIVE_WCF_DIR', '../');
// define the wcf-root-dir
//<![CDATA[
$(function() {
WCF.Language.add('wcf.acp.package.install.title', '{lang}wcf.acp.package.install.title{/lang}');
-
+
var $installation = new WCF.ACP.Package.Installation({@$queueID});
$installation.prepareInstallation();
});
_allowForOwnContent: false,
/**
- * user can like
+ * user can like
* @var boolean
*/
_canLike: false,
/**
* Provides methods to follow an user.
- *
+ *
* @param integer userID
* @param boolean following
*/
/**
* Username validation for registration.
- *
+ *
* @see WCF.User.Registration.Validation
*/
WCF.User.Registration.Validation.Username = WCF.User.Registration.Validation.extend({
$length++;
}
}
-
+
return $length;
}
});
var $verticalScrollTolerance = $(element).height() / 2;
- // check if dropdown toggle is still (partially) visible
+ // check if dropdown toggle is still (partially) visible
if ($dropdownOffset.top + $verticalScrollTolerance <= $dialogContentOffset.top) {
// top check
WCF.Dropdown.toggleDropdown($dropdownID);
*/
_processTabs: function() {
var that = this;
-
+
this.tablist = this._getList()
.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
.attr( "role", "tablist" );
-
+
this.tabs = this.tablist.find( "> li:has(a[href])" )
.addClass( "ui-state-default ui-corner-top" )
.attr({
role: "tab",
tabIndex: -1
});
-
+
this.anchors = this.tabs.map(function() {
return $( "a", this )[ 0 ];
})
role: "presentation",
tabIndex: -1
});
-
+
this.panels = $();
-
+
this.anchors.each(function( i, anchor ) {
var selector, panel,
anchorId = $( anchor ).uniqueId().attr( "id" ),
tab = $( anchor ).closest( "li" ),
originalAriaControls = tab.attr( "aria-controls" );
-
+
// inline tab
selector = anchor.hash;
panel = that.element.find( that._sanitizeSelector( selector ) );
});
panel.attr( "aria-labelledby", anchorId );
});
-
+
this.panels
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
.attr( "role", "tabpanel" );
$installationType = $this->installation->nodeBuilder->getInstallationTypeByQueue($queueID);
$currentAction = WCF::getLanguage()->getDynamicVariable('wcf.acp.package.uninstallation.step.'.$installationType, array('packageName' => $packageName));
}
-
+
return $currentAction;
}
}
/**
* Abstract implementation of a form to create categories.
- *
+ *
* @author Matthias Schmidt
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Abstract implementation of a form to edit a category.
- *
+ *
* @author Matthias Schmidt
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function readData() {
parent::readData();
-
+
if (!count($_POST)) {
$this->countryCode = $this->language->countryCode;
$this->languageName = $this->language->languageName;
/**
* Shows the form for adding new templates.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function readParameters() {
parent::readParameters();
-
+
if (!empty($_REQUEST['copy'])) {
$this->copy = intval($_REQUEST['copy']);
$this->copiedTemplate = new Template($this->copy);
if (empty($this->tplName)) {
throw new UserInputException('tplName');
}
-
+
if (!preg_match('/^[a-z0-9_\-]+$/i', $this->tplName)) {
throw new UserInputException('tplName', 'notValid');
}
/**
* Shows the form for adding new templates.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function readParameters() {
parent::readParameters();
-
+
if (isset($_REQUEST['id'])) $this->templateID = intval($_REQUEST['id']);
$this->template = new Template($this->templateID);
if (!$this->template->templateID || !$this->template->templateGroupID) {
*/
public function readData() {
parent::readData();
-
+
if (!count($_POST)) {
$this->tplName = $this->template->templateName;
$this->templateSource = $this->template->getSource();
/**
* Shows the form for adding new template groups.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Shows the form for editing template groups.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function readParameters() {
parent::readParameters();
-
+
if (isset($_REQUEST['id'])) $this->templateGroupID = intval($_REQUEST['id']);
$this->templateGroup = new TemplateGroup($this->templateGroupID);
if (!$this->templateGroup->templateGroupID) {
* @see wcf\form\IForm::validate()
*/
public function validate() {
- // validate static user options
+ // validate static user options
try {
$this->validateUsername($this->username);
}
*/
protected function validateAvatar() {
if ($this->avatarType != 'custom' && $this->avatarType != 'gravatar') $this->avatarType = 'none';
-
+
try {
switch ($this->avatarType) {
case 'custom':
throw new UserInputException('customAvatar');
}
break;
-
+
case 'gravatar':
if (!MODULE_GRAVATAR) {
$this->avatarType = 'none';
break;
}
-
+
// test gravatar
if (!Gravatar::test($this->user->email)) {
throw new UserInputException('gravatar', 'notFound');
public $required = 0;
/**
- * shows this field in the registration process
+ * shows this field in the registration process
* @var boolean
*/
public $askDuringRegistration = 0;
/**
* Shows the form for adding new user option categories.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function readParameters() {
parent::readParameters();
-
+
I18nHandler::getInstance()->register('categoryName');
}
/**
* Provides functions to set the default values of user options.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
public $neededPermissions = array('admin.user.canSearchUser');
/**
- * username
+ * username
* @var string
*/
public $username = '';
/**
* registration start date
- * @var string
+ * @var string
*/
public $registrationDateStart = '';
$this->matches = array();
$sql = "SELECT user_table.userID
FROM wcf".WCF_N."_user user_table
- LEFT JOIN wcf".WCF_N."_user_option_value option_value
+ LEFT JOIN wcf".WCF_N."_user_option_value option_value
ON (option_value.userID = user_table.userID)";
// build search condition
/**
* Abstract implementation of a page with lists all categories of a certain object
* type.
- *
+ *
* @author Matthias Schmidt
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Shows a list of language items.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function readParameters() {
parent::readParameters();
-
+
if (isset($_REQUEST['id'])) $this->languageID = intval($_REQUEST['id']);
if (isset($_REQUEST['languageCategoryID'])) $this->languageCategoryID = intval($_REQUEST['languageCategoryID']);
if (isset($_REQUEST['languageItem'])) $this->languageItem = StringUtil::trim($_REQUEST['languageItem']);
// get languages
$this->availableLanguages = LanguageFactory::getInstance()->getLanguages();
- // get categories
+ // get categories
$languageCategoryList = new LanguageCategoryList();
$languageCategoryList->readObjects();
$this->availableLanguageCategories = $languageCategoryList->getObjects();
*/
public function assignVariables() {
parent::assignVariables();
-
+
WCF::getTPL()->assign(array(
'objects' => $this->languageItemList,
'languageID' => $this->languageID,
/**
* Shows phpinfo() output.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Shows a list of templates.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function assignVariables() {
parent::assignVariables();
-
+
WCF::getTPL()->assign(array(
'templateGroupID' => $this->templateGroupID,
'searchTemplateName' => $this->searchTemplateName,
if ($this->inDebugMode) {
throw $e;
}
-
+
if ($e instanceof IllegalLinkException) {
throw new AJAXException(WCF::getLanguage()->get('wcf.ajax.error.sessionExpired'), AJAXException::SESSION_EXPIRED, $e->getTraceAsString());
}
/**
* Default implementation for object-actions using the AJAX-API.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Default implementation for file uploads using the AJAX-API.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Provides method to send JSON-encoded responses.
- *
+ *
* @author Alexander Ebert
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Clipboard proxy implementation.
- *
+ *
* @author Alexander Ebert
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* indicates if database table index is an identity column
- * @var boolean
+ * @var boolean
*/
protected static $databaseTableIndexIsIdentity = true;
public $sqlJoins = '';
/**
- * enables the automatic usage of the qualified shorthand
+ * enables the automatic usage of the qualified shorthand
* @var boolean
*/
public $useQualifiedShorthand = true;
/**
* Provides functions to edit acl option categories.
- *
+ *
* @author Alexander Ebert
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
protected $embedded = false;
/**
- * user permissions for attachment access
+ * user permissions for attachment access
* @var array<boolean>
*/
protected $permissions = array();
'filesize' => $file->getFilesize(),
'fileType' => $file->getMimeType(),
'fileHash' => sha1_file($file->getLocation()),
- 'uploadTime' => TIME_NOW
+ 'uploadTime' => TIME_NOW
);
// get image data
public function getOpenParentNodes() {
$element = $this;
$i = 0;
-
+
while ($element->parentNode->parentNode != null && $element->isLastSibling()) {
$i++;
$element = $element->parentNode;
}
-
+
return $i;
}
public static function deleteLanguageFiles($languageID = '.*', $category = '.*') {
if ($category != '.*') $category = preg_quote($category, '~');
if ($languageID != '.*') $languageID = intval($languageID);
-
+
DirectoryUtil::getInstance(WCF_DIR.'language/')->removePattern(new Regex($languageID.'_'.$category.'\.php$'));
}
* @param boolean $useRegex
* @param boolean $caseSensitive
* @param boolean $searchVariableName
- * @return array results
+ * @return array
*/
public static function search($search, $replace = null, $languageID = null, $useRegex = 0, $searchVariableName = 0) {
$results = array();
WCF::getTPL()->assign(array(
'item' => $item
));
-
+
return array(
'languageItem' => $item->languageItem,
'template' => WCF::getTPL()->fetch('languageItemEditDialog')
if (!isset($this->parameters['data']['lastChangeTime'])) {
$this->parameters['data']['lastChangeTime'] = TIME_NOW;
}
-
+
return parent::create();
}
-<?php
+<?php
namespace wcf\data\smiley\category;
use wcf\data\AbstractDatabaseObjectAction;
use wcf\system\exception\IllegalLinkException;
* @param boolean $useRegex
* @param boolean $caseSensitive
* @param boolean $invertSearch
- * @return array results
+ * @return array
*/
public static function search($search, $replace = null, $templateIDs = null, $invertTemplates = 0, $useRegex = 0, $caseSensitive = 0, $invertSearch = 0) {
// get available template ids
*/
public function update() {
parent::update();
-
+
foreach ($this->objects as $template) {
// rename file
$templateName = (isset($this->parameters['data']['templateName']) ? $this->parameters['data']['templateName'] : $template->templateName);
/**
* Saves the source of this template.
*
- * @param string $source
+ * @param string $source
*/
public function setSource($source) {
$path = $this->getPath();
mkdir($folder, 0777);
}
- // set source
+ // set source
$file = new File($path);
$file->write($source);
$file->close();
// get current path
$currentPath = $this->getPath();
- // get new path
+ // get new path
if ($templateGroupID != $this->templateGroupID) {
// get folder name
$sql = "SELECT templateGroupFolderName
-<?php
+<?php
namespace wcf\data\user;
use wcf\data\user\group\Team;
use wcf\data\user\group\UserGroup;
if (empty($userIDs)) {
$userIDs = $this->objectIDs;
}
-
+
if (!empty($userIDs)) {
ClipboardHandler::getInstance()->unmark($userIDs, ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user'));
}
}
else {
$this->url[$size] = LinkHandler::getInstance()->getLink('GravatarDownload', array(
- 'forceFrontend' => true
+ 'forceFrontend' => true
), 'userID='.$this->userID.'&size='.$size);
}
}
-<?php
+<?php
namespace wcf\data\user\group;
use wcf\data\user\UserProfile;
use wcf\data\DatabaseObjectDecorator;
-<?php
+<?php
namespace wcf\data\user\ignore;
/**
public $enableTracking = true;
/**
- * true enables the usage of cookies
+ * true enables the usage of cookies
* @var boolean
*/
public $useCookies = 1;
*/
public function readFormParameters() {
parent::readFormParameters();
-
+
if (!empty($this->username) || !empty($this->email)) {
throw new PermissionDeniedException();
}
-<?php
+<?php
namespace wcf\form;
use wcf\acp\form\UserOptionListForm;
use wcf\data\search\SearchEditor;
/**
* List of deleted content.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
public function assignVariables() {
parent::assignVariables();
-
+
WCF::getTPL()->assign(array(
'availableObjectTypes' => ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.deletedContent'),
'objectType' => $this->objectType->objectType,
/**
* Shows the a list of tagged objects.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Replaces part of the string with the regex.
*
- * @param string $string
+ * @param string $string
* @param mixed $replacement replacement-string or instance of wcf\system\Callback
* @return string
*/
if ($attachment->showAsImage() && $parser->getOutputType() == 'text/html') {
// image
$linkParameters = array(
- 'object' => $attachment
+ 'object' => $attachment
);
if ($attachment->hasThumbnail()) {
- $linkParameters['thumbnail'] = 1;
+ $linkParameters['thumbnail'] = 1;
}
// get alignment
// convert colors to classes
$highlightedCode = strtr($highlightedCode, self::$colorToClass);
- // replace double quotes by entity
+ // replace double quotes by entity
return Regex::compile('(?<!\<span class=)"(?!\>)')->replace($highlightedCode, '"');
}
}
/**
* Caches the acl options of categories.
- *
+ *
* @author Matthias Schmidt
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
$data['categories'][$languageCategory->languageCategory] = $languageCategory;
$data['categoryIDs'][$languageCategory->languageCategoryID] = $languageCategory->languageCategory;
}
-
+
return $data;
}
}
// option categories
// get all option categories and sort categories by priority
- $sql = "SELECT categoryName, categoryID
+ $sql = "SELECT categoryName, categoryID
FROM wcf".WCF_N."_".$this->tableName."_category";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
// options
// get all options and sort options by priority
$optionIDs = array();
- $sql = "SELECT optionName, optionID
+ $sql = "SELECT optionName, optionID
FROM wcf".WCF_N."_".$this->tableName;
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
$data = array();
// get all options
- $sql = "SELECT optionName, optionID
+ $sql = "SELECT optionName, optionID
FROM wcf".WCF_N."_user_group_option";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
/**
* Handles the category permissions.
- *
+ *
* @author Matthias Schmidt
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
public function getObjectTypeName($definitionName);
/**
- * Returns the language variable category for the description language
+ * Returns the language variable category for the description language
* variables of categories of this type.
*
* @return string
class MostActiveMembersDashboardBox extends AbstractSidebarDashboardBox {
/**
* user profile list
- * @var wcf\data\user\UserProfileList
+ * @var wcf\data\user\UserProfileList
*/
public $userProfileList = null;
class MostLikedMembersDashboardBox extends AbstractSidebarDashboardBox {
/**
* user profile list
- * @var wcf\data\user\UserProfileList
+ * @var wcf\data\user\UserProfileList
*/
public $userProfileList = null;
class NewestMembersDashboardBox extends AbstractSidebarDashboardBox {
/**
* user profile list
- * @var wcf\data\user\UserProfileList
+ * @var wcf\data\user\UserProfileList
*/
public $userProfileList = null;
*/
class StatsSidebarDashboardBox extends AbstractSidebarDashboardBox {
/**
- * the stats
- * @var wcf\system\cache\builder\UserStatsCacheBuilder
+ * displayed stats
+ * @var wcf\system\cache\builder\UserStatsCacheBuilder
*/
public $stats = null;
*
* @param string $table
* @param string $field
- * @return integer
+ * @return integer
*/
public function getInsertID($table, $field) {
try {
/**
* Returns the sql type of the active database.
*
- * @return string
+ * @return string
*/
public function getDBType() {
return $this->DBType;
// reinsert quotes
$query = StringStack::reinsertStrings($query, 'postgresQuotes');
-
+
return $query;
}
/**
* Basic implementation of IExporter.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Basic interface for all exporters.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports ACLs.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports attachments.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports categories.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports comments.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports comment responses.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Basic implementation of IImporter.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports likes.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports polls.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports poll votes.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
if (!$data['pollID']) return 0;
$option = PollOptionEditor::create($data);
-
+
ImportHandler::getInstance()->saveNewID($this->objectTypeName, $oldID, $option->optionID);
return $option->optionID;
/**
* Imports poll votes.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* poll object type name
- * @var string
+ * @var string
*/
protected $pollObjectTypeName = '';
/**
* Imports watched objects.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Basic interface for all importer.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Handles data import.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
class ImportHandler extends SingletonFactory implements IAJAXInvokeAction {
/**
* id map cache
- * @var array
+ * @var array
*/
protected $idMappingCache = array();
/**
* Imports label groups.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports labels.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports smilies.
- *
+ *
* @author Tim Duesterhus, Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports user avatars.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports user profile comments.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports user profile comment response.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports followers.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports user groups.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
}
else {
$action = new UserGroupAction(array(), 'create', array(
- 'data' => $data
+ 'data' => $data
));
$returnValues = $action->executeAction();
$newGroupID = $returnValues['returnValues']->groupID;
/**
* Imports user options.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Imports user ranks.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
$byteBlock = 1<<14;
$eof = $byteBlock;
- // the correction is for zip files that are too small
- // to get in the first while loop
+ // the correction is for zip files that are too small
+ // to get in the first while loop
$correction = 1;
while ($this->seek($eof) == 0) {
$eof += $byteBlock;
// send content type and length
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-Length: ".strlen($postString)."\r\n";
- // if it is a POST request, there MUST be a blank line before the POST data, but there MUST NOT be
+ // if it is a POST request, there MUST be a blank line before the POST data, but there MUST NOT be
// another blank line before, and of course there must be another blank line at the end of the request!
$request .= "\r\n";
if (!empty($postString)) $request .= $postString."\r\n";
* LikeHandler::getInstance()->loadLikeObjects($objectType, $objectIDs);
* // get like data
* $likeObjects = LikeHandler::getInstance()->getLikeObjects($objectType);
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
$this->header .=
'X-Priority: 3'.self::$lineEnding
- .'X-Mailer: WoltLab Community Framework Mail Package'.self::$lineEnding
+ .'X-Mailer: WoltLab Community Framework Mail Package'.self::$lineEnding
.'From: '.$this->getFrom().self::$lineEnding
.($this->getCCString() != '' ? 'CC:'.$this->getCCString().self::$lineEnding : '')
.($this->getBCCString() != '' ? 'BCC:'.$this->getBCCString().self::$lineEnding : '');
// ignore footer items
return;
}
-
+
parent::setActiveMenuItem($menuItem);
}
}
/**
* Interface for deleted content provider.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
$definitionNames[$objectTypeID] = $definitionName;
}
}
-
+
return $definitionNames;
}
/**
* Option type implementation for password input fields.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
/**
* Option type implementation for url input fields.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
if (isset($requirement['minversion'])) {
if (Package::compareVersion($existingPackages[$requirement['name']]['packageVersion'], $requirement['minversion']) >= 0) {
// package does already exist in needed version
- // skip installation of requirement
+ // skip installation of requirement
continue;
}
else {
/**
* Imports option categories.
*
- * @param \DOMXPath $xpath
+ * @param \DOMXPath $xpath
*/
protected function importCategories(\DOMXPath $xpath) {
$elements = $xpath->query('/ns:data/ns:import/ns:categories/ns:category');
/**
* Imports options.
*
- * @param \DOMXPath $xpath
+ * @param \DOMXPath $xpath
*/
protected function importOptions(\DOMXPath $xpath) {
$elements = $xpath->query('/ns:data/ns:import/ns:options/ns:option');
* @param string $parentName
* @param string $columnName
* @param string $tableNameExtension
- * @return integer
+ * @return integer
*/
protected function getShowOrder($showOrder, $parentName = null, $columnName = null, $tableNameExtension = '') {
if ($showOrder === null) {
}
/**
- * Checks if the active user has the given permissions and throws a
+ * Checks if the active user has the given permissions and throws a
* PermissionDeniedException if that isn't the case.
*/
public function checkPermissions(array $permissions) {
if ($this->compilerObj === null) {
$this->compilerObj = new SetupTemplateCompiler($this);
}
-
+
return $this->compilerObj;
}
use wcf\system\template\TemplateEngine;
/**
- * Modifiers are functions that are applied to a variable in the template
- * before it is displayed or used in some other context.
+ * Modifiers are functions that are applied to a variable in the template before
+ * it is displayed or used in some other context.
*
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* Executes this prefilter.
*
* @param string $templateName
- * @param string $sourceContent
+ * @param string $sourceContent
* @param wcf\system\template\TemplateScriptingCompiler $compiler
* @return string
*/
$sourceContent = preg_replace_callback("~{$ldq}lang{$rdq}([\w\.]+){$ldq}/lang{$rdq}~", function ($match) {
return WCF::getLanguage()->get($match[1]);
}, $sourceContent);
-
+
return $sourceContent;
}
}
$objects[$objectID] = new static::$decoratorClassName(new static::$objectClassName(null, array($indexName => $objectID)));
}
}
-
+
return $objects;
}
}
if (empty($this->objectListClassName)) {
throw new SystemException('DatabaseObjectList class name not specified.');
}
-
+
if (!ClassUtil::isInstanceOf($this->objectListClassName, 'wcf\data\DatabaseObjectList')) {
throw new SystemException("'".$this->objectListClassName."' does not extend 'wcf\data\DatabaseObjectList'");
}
-
+
$this->objectList = new $this->objectListClassName();
$this->objectList->sqlLimit = $this->limit;
$this->objectList->sqlOffset = $this->limit * $this->loopCount;
/**
* Worker implementation for data import.
- *
+ *
* @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @param array $postParameters
* @param array $headers empty array or a not initialized variable
* @return string
- * @deprecated This method currently only is a wrapper around \wcf\util\HTTPRequest. Please use
+ * @deprecated This method currently only is a wrapper around \wcf\util\HTTPRequest. Please use
* HTTPRequest from now on, as this method may be removed in the future.
*/
public static function downloadFileFromHttp($httpUrl, $prefix = 'package', array $options = array(), array $postParameters = array(), &$headers = array()) {
*
* @param string $gzipped
* @param string $destination
- * @return boolean
+ * @return boolean
*/
public static function uncompressFile($gzipped, $destination) {
if (!@is_file($gzipped)) {
* Return the file extension for an image with the given mime type.
*
* @param string $mimeType
- * @return string
+ * @return string
* @see http://www.php.net/manual/en/function.image-type-to-mime-type.php
*/
public static function getExtensionByMimeType($mimeType) {
* @return string
*/
public static function stripCrap($text) {
- // strip session links, security tokens and access tokens
+ // strip session links, security tokens and access tokens
$text = Regex::compile('(?<=\?|&)([st]=[a-f0-9]{40}|at=\d+-[a-f0-9]{40})')->replace($text, '');
// convert html entities (utf-8)
/**
* Contains string-related functions.
*
- * @author Oliver Kliebisch, Marcel Werk
+ * @author Oliver Kliebisch, Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* Returns true if $haystack ends with $needle or if the length of $needle is 0.
*
* @param string $haystack
- * @param string $needle
+ * @param string $needle
* @param boolean $ci case insensitive
* @return boolean
*/
// cut visible url
if (empty($title)) {
- // use URL and remove protocol and www subdomain
+ // use URL and remove protocol and www subdomain
$title = preg_replace('~^(?:https?|ftps?)://(?:www\.)?~i', '', $url);
if (mb_strlen($title) > 60) {
<?php
/**
- * default options.inc.php for package installation of package com.woltlab.wcf.
- *
- * @author Marcel Werk
+ * Default options.inc.php for package installation of package com.woltlab.wcf.
+ *
+ * @author Marcel Werk
* @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
h2 {
font-size: @wcfTitleFontSize;
}
-
+
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
margin: 0.5em 0;
.contentNavigation .pageNavigation {
float: left;
margin: @wcfGapMedium + 5 0 3px;
-
+
ul li {
margin: 0 2px;
}
#messageQuoteList {
max-width: 800px !important;
-
+
li {
&:not(:first-child) {
margin-top: @wcfGapSmall;
if (window.jQuery) {
$(function() {
$('#wcfUrlContainer').show();
-
+
// data
var $domainName = '{@$domainName|encodeJS}';
var $installScriptDir = '{@$installScriptDir|encodeJS}';
var $invalidErrorMessage = '{lang}wcf.global.wcfDir.error.invalid{/lang}';
var $wcfDir = $('#wcfDir');
var $wcfUrl = $('#wcfUrl');
-
+
function updateWcfUrl() {
// split paths and remove empty parts
var $installScriptDirs = removeEmptyDirParts($installScriptDir.split('/'));
$relativePathDirs.push($wcfDirs[$i]);
}
}
-
+
// loop dirs
for (var $i = 0; $i < $relativePathDirs.length; $i++) {
if ($relativePathDirs[$i] == '..') {
$wcfUrl.html($invalidErrorMessage);
return;
}
-
+
$installScriptUrlDirs.pop();
}
else {
$installScriptUrlDirs.push($relativePathDirs[$i]);
}
}
-
+
// implode and show result
var $result = $domainName;
for (var $i = 0; $i < $installScriptUrlDirs.length; $i++) $result += '/' + $installScriptUrlDirs[$i];
$wcfUrl.html($result);
}
-
+
function removeEmptyDirParts(dir) {
for (var $i = dir.length; $i >= 0; $i--) {
if (dir[$i] == '' || dir[$i] == '.') {
dir.splice($i, 1);
}
}
-
+
return dir;
}
-
+
$wcfDir.keyup(updateWcfUrl).blur(updateWcfUrl);
updateWcfUrl();
});