var span = elCreate('span');
if (this._options.maxSize >= file.size) {
- span.className = 'icon icon48 fa-spinnner';
+ span.className = 'icon icon48 fa-spinner';
}
else {
span.className = 'icon icon48 fa-ban-circle';
/**
- * Shows and hides an element that dependes on certain selected pages when setting up conditions.
+ * Shows and hides an element that depends on certain selected pages when setting up conditions.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
/**
- * Handles dismissable user notices.
+ * Handles dismissible user notices.
*
* @author Alexander Ebert
* @copyright 2001-2015 WoltLab GmbH
*
* @param {Element} element target element
* @param {string=} prefix attribute prefix
- * @param {boolean=} camcelCaseName transform attribute names into camel case using dashes as separators
+ * @param {boolean=} camelCaseName transform attribute names into camel case using dashes as separators
* @param {boolean=} idToUpperCase transform '-id' into 'ID'
* @returns {object<string, string>} list of data attributes
*/
- getDataAttributes: function(element, prefix, camcelCaseName, idToUpperCase) {
+ getDataAttributes: function(element, prefix, camelCaseName, idToUpperCase) {
prefix = prefix || '';
if (!/^data-/.test(prefix)) prefix = 'data-' + prefix;
- camcelCaseName = (camcelCaseName === true);
+ camelCaseName = (camelCaseName === true);
idToUpperCase = (idToUpperCase === true);
var attribute, attributes = {}, name, tmp;
if (attribute.name.indexOf(prefix) === 0) {
name = attribute.name.replace(new RegExp('^' + prefix), '');
- if (camcelCaseName) {
+ if (camelCaseName) {
tmp = name.split('-');
name = '';
for (var j = 0, innerLength = tmp.length; j < innerLength; j++) {
* Returns the selected language for a certain chooser.
*
* @param {string} chooserId input element id
- * @return {int} choosen language id
+ * @return {int} chosen language id
*/
getLanguageId: function(chooserId) {
return ~~this.getChooser(chooserId).element.value;
var innerInfo = DomTraverse.childByClass(this._input.parentNode.parentNode, 'innerInfo');
- // TODO: treshold option?
+ // TODO: threshold option?
if (this._input.value.length >= 3) {
if (innerInfo) {
elHide(innerInfo);
var dropdown = _dropdowns.get(targetId), preventToggle = false;
if (dropdown !== undefined) {
- // Repeated clicks on the dropdown buttom will not cause it to close, the only way
+ // Repeated clicks on the dropdown button will not cause it to close, the only way
// to close it is by clicking somewhere else in the document or on another dropdown
// toggle. This is used with the search bar to prevent the dropdown from closing by
// setting the caret position in the search input field.
* Initializes the like handler.
*
* @param {string} objectType object type
- * @param {object} options initilization options
+ * @param {object} options initialization options
*/
init: function(objectType, options) {
if (options.containerSelector === '') {
- throw new Error("[WoltLab/WCF/Ui/Like/Handler] Expected a non-emtpy string for option 'containerSelector'.");
+ throw new Error("[WoltLab/WCF/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");
}
this._containers = new ObjectMap();
* |<bar>This is <foo>a </foo></bar>|<bar><foo>simple <bar>example</bar></strike></foo></bar>|
*
* As a result we can now remove <bar> both inside the <strike> element as well as
- * the outer <bar> without harming the effect of <bar> for the preceeding siblings.
+ * the outer <bar> without harming the effect of <bar> for the preceding siblings.
*
* This process is repeated for siblings appearing after the <strike> element too, it
* works as described above but flipped. This is an expensive operation and will only
* @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Acp\Form
- * @since 3.0k
+ * @since 3.0
*/
class MenuAddForm extends AbstractForm {
/**
// reset styles to make sure the updated option values are used
StyleHandler::resetStylesheets();
- // show succes message
+ // show success message
WCF::getTPL()->assign('success', true);
}
public $neededPermissions = ['admin.user.canMailUser'];
/**
- * type of the file containg the exported email addresses
+ * type of the file containing the exported email addresses
* @var string
*/
public $fileType = 'csv';
}
/**
- * Throws an previously catched exception while maintaing the propriate stacktrace.
+ * Throws an previously catched exception while maintaining the propriate stacktrace.
*
* @param \Exception|\Throwable $e
* @throws AJAXException
}
/**
- * Returns the directory of the application with the given abbrevation.
+ * Returns the directory of the application with the given abbreviation.
*
* @param string $abbreviation
* @return string
}
/**
- * Sest the article's content.
+ * Sets the article's content.
*
* @param ViewableArticleContent $articleContent
*/
}
/**
- * Returns the box with the given idnetifier.
+ * Returns the box with the given identifier.
*
* @param string $identifier
* @return Box
public function getParentCategories() {
if ($this->parentCategories === null) {
$this->parentCategories = [];
- $parentCaregory = $this;
- while ($parentCaregory = $parentCaregory->getParentCategory()) {
- $this->parentCategories[] = $parentCaregory;
+ $parentCategory = $this;
+ while ($parentCategory = $parentCategory->getParentCategory()) {
+ $this->parentCategories[] = $parentCategory;
}
$this->parentCategories = array_reverse($this->parentCategories);
*/
class CategoryNodeTree implements \IteratorAggregate {
/**
- * list of ids of categories which will not be inluded in the node tree
+ * list of ids of categories which will not be included in the node tree
* @var integer[]
*/
protected $excludedCategoryIDs = [];
public $createdResponse = null;
/**
- * errors occuring durch the validation of addComment or addResponse
+ * errors occurring through the validation of addComment or addResponse
* @var array
*/
public $validationErrors = [];
}
/**
- * Returns mimimum response time.
+ * Returns minimum response time.
*
* @return integer
*/
// check if all required options are set for cronjob to be executed
// note: a general log is created to avoid confusion why a cronjob
- // apperently is not executed while that is indeed the correct internal
+ // apparently is not executed while that is indeed the correct internal
// behavior
if ($cronjob->validateOptions()) {
try {
use wcf\system\WCF;
/**
- * Represents a madia file.
+ * Represents a media file.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
use wcf\util\FileUtil;
/**
- * Executes madia file-related actions.
+ * Executes media file-related actions.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
use wcf\data\DatabaseObjectEditor;
/**
- * Procides functions to edit media files.
+ * Provides functions to edit media files.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
use wcf\system\database\util\PreparedStatementConditionBuilder;
/**
- * Represents a list of madia files.
+ * Represents a list of media files.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
use wcf\util\StringUtil;
/**
- * Represents a viewable madia file.
+ * Represents a viewable media file.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
$node->setIsActive();
// only one effective item can be marked as active, use the first
- // occurence with the highest priority and ignore everything else
+ // occurrence with the highest priority and ignore everything else
return;
}
}
ModerationQueueManager::getInstance()->populate($objectTypeID, $queueItems);
}
- // check for non-existant items
+ // check for non-existent items
$queueIDs = [];
foreach ($this->objects as $index => $object) {
if ($object->isOrphaned()) {
}
/**
- * Returns the names of proporties that should be serialized.
+ * Returns the names of properties that should be serialized.
*
* @return string[]
*/
}
/**
- * Returns the highlighed server URL.
+ * Returns the highlighted server URL.
*
* @return string
*/
// step 2) copy
//
- // cretae poll
+ // create poll
$pollData = $row;
$pollData['objectTypeID'] = $targetObjectType->objectTypeID;
$pollData['objectID'] = $this->parameters['targetObjectID'];
return [];
}
- // removes orphaned and non-accessable events
+ // removes orphaned and non-accessible events
UserActivityEventHandler::validateEvents($eventList);
if (!count($eventList)) {
/**
* Returns true if the current group is a moderator-group.
*
- * @reutn boolean
+ * @return boolean
*/
public function isModGroup() {
// workaround for WCF-Setup
use wcf\system\request\IRouteController;
/**
- * Represents an automatic assignement to a user group.
+ * Represents an automatic assignment to a user group.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
protected static $databaseTableName = 'user_group_assignment';
/**
- * Returns the conditions of the automatic assignement to a user group.
+ * Returns the conditions of the automatic assignment to a user group.
*
* @return Condition[]
*/
use wcf\util\StringUtil;
/**
- * MessageForm is an abstract form implementation for a message with optional captcha suppport.
+ * MessageForm is an abstract form implementation for a message with optional captcha support.
*
* @author Marcel Werk
* @copyright 2001-2016 WoltLab GmbH
$lastEventTime = $this->eventList->getLastEventTime();
- // removes orphaned and non-accessable events
+ // removes orphaned and non-accessible events
UserActivityEventHandler::validateEvents($this->eventList);
WCF::getTPL()->assign([
*
* You SHOULD NOT implement this interface in generic classes, as each method is entirely
* responsible to verify parameters and permissions. Implementing this class in generic
- * classes leads to a potential breach of security and unforseen side-effects.
+ * classes leads to a potential breach of security and unforeseen side-effects.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
const NO_ANALYSE = 8;
/**
- * indicates that whitespaces are igored in regex
+ * indicates that whitespaces are ignored in regex
* @var integer
*/
const IGNORE_WHITESPACE = 16;
}
/**
- * Called within __construct(), override if neccessary.
+ * Called within __construct(), override if necessary.
*/
protected function init() { }
* @throws ErrorException
*/
public static final function handleError($severity, $message, $file, $line) {
- // this is neccessary for the shut-up operator
+ // this is necessary for the shut-up operator
if (error_reporting() == 0) return;
throw new ErrorException($message, 0, $severity, $file, $line);
}
/**
- * Shows the page for configurating the database connection.
+ * Shows the page for configuring the database connection.
*/
protected function configureDB() {
if (self::$developerMode && isset($_ENV['WCFSETUP_DBHOST'])) {
}
/**
- * Immediatly performs the given job.
+ * Immediately performs the given job.
* This method automatically handles requeuing in case of failure.
*
* This method is used internally by performNextJob(), but it can
*/
public function performNextJob() {
WCF::getDB()->beginTransaction();
- $commited = false;
+ $committed = false;
try {
$sql = "SELECT jobID, job
FROM wcf".WCF_N."_background_job
return;
}
WCF::getDB()->commitTransaction();
- $commited = true;
+ $committed = true;
}
finally {
- if (!$commited) WCF::getDB()->rollBackTransaction();
+ if (!$committed) WCF::getDB()->rollBackTransaction();
}
$job = null;
protected $filename = '';
/**
- * start line numer attribute value
+ * start line number attribute value
* @var string
*/
protected $startLineNumber = 1;
/**
* Returns all users who the active user can access due to their user group
- * assocition.
+ * association.
*
* @param UserList $userList
* @return User[]
use wcf\util\StringUtil;
/**
- * Bulk processing action implementation for sening mails to users.
+ * Bulk processing action implementation for sending mails to users.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
}
/**
- * Builds the list of controllers violating the camcel-case schema by having more than
+ * Builds the list of controllers violating the camel-case schema by having more than
* two consecutive upper-case letters in the name. The list is divided on an application
* and environment level to prevent any issues with controllers with the same name but
* correct spelling to be incorrectly handled.
}
/**
- * Determines wheater the cache needs to be rebuild or not.
+ * Determines whether the cache needs to be rebuild or not.
*
* @param string $filename
* @param integer $maxLifetime
use wcf\system\WCF;
/**
- * Condition implementation for compairing a user-bound timestamp with a fixed time
+ * Condition implementation for comparing a user-bound timestamp with a fixed time
* interval.
*
* @author Matthias Schmidt
WCF::getDB()->beginTransaction();
/** @noinspection PhpUnusedLocalVariableInspection */
- $commited = false;
+ $committed = false;
try {
$sql = "SELECT jobID, job
FROM wcf".WCF_N."_background_job
if (empty($jobIDs)) {
WCF::getDB()->commitTransaction();
- $commited = true;
+ $committed = true;
return;
}
$statement->execute($condition->getParameters());
WCF::getDB()->commitTransaction();
- $commited = true;
+ $committed = true;
}
finally {
- if (!$commited) WCF::getDB()->rollBackTransaction();
+ if (!$committed) WCF::getDB()->rollBackTransaction();
}
}
}
// check if all required options are set for cronjob to be executed
// note: a general log is created to avoid confusion why a cronjob
- // apperently is not executed while that is indeed the correct internal
+ // apparently is not executed while that is indeed the correct internal
// behavior
if ($cronjobEditor->validateOptions()) {
try {
use wcf\data\session\SessionEditor;
/**
- * Deletes expired sesions.
+ * Deletes expired sessions.
*
* @author Marcel Werk
* @copyright 2001-2016 WoltLab GmbH
}
/**
- * Commits a transaction and returns true if the transaction was successfull.
+ * Commits a transaction and returns true if the transaction was successful.
*
* @return boolean
* @throws DatabaseTransactionException
}
/**
- * Rolls back a transaction and returns true if the rollback was successfull.
+ * Rolls back a transaction and returns true if the rollback was successful.
*
* @return boolean
* @throws DatabaseTransactionException
protected $inheritedActions = null;
/**
- * instances of registerd actions
+ * instances of registered actions
* @var array
*/
protected $actionsObjects = [];
*/
public function rotate($degrees) {
if ($degrees > 360.0 || $degrees < 0.0) {
- throw new SystemException("Degress must be a value between 0 and 360.");
+ throw new SystemException("Degrees must be a value between 0 and 360.");
}
return $this->adapter->rotate($degrees);
}
/**
- * Reads the Information wich the Server sends back.
+ * Reads the Information which the Server sends back.
*
* @return string
*/
}
/**
- * Removes embedded object assigments for given messages.
+ * Removes embedded object assignments for given messages.
*
* @param string $messageObjectType
* @param integer[] $messageIDs
/**
* Adds a quote unless it is already stored. If you want to quote a whole
- * message while maintaing the original markup, pass $obj->getExcerpt() for
+ * message while maintaining the original markup, pass $obj->getExcerpt() for
* $message and $obj->getMessage() for $fullQuote.
*
* @param string $objectType
public function populate($objectTypeID, array $objects);
/**
- * Returns whether the afftected content may be removed.
+ * Returns whether the affected content may be removed.
*
* @param \wcf\data\moderation\queue\ModerationQueue $queue
* @return boolean
public function checkUser(User $user, Option $option, $value);
/**
- * Returns the data of the condition or null if the option should be igored.
+ * Returns the data of the condition or null if the option should be ignored.
*
* @param Option $option
* @param mixed $newValue
}
/**
- * Returns true if the package is an application and has an unique abbrevation.
+ * Returns true if the package is an application and has an unique abbreviation.
*
* @return boolean
*/
*/
abstract class PackageInstallationFileHandler implements IFileHandler {
/**
- * abbrevation of the application the files belong to
+ * abbreviation of the application the files belong to
* @var string
*/
protected $application = '';
if (!in_array($tag, self::$reservedTags)) $additionalData[$tag] = $value;
}
- // check if the otion exist already and was installed by this package
+ // check if the option exist already and was installed by this package
$sql = "SELECT optionID
FROM wcf".WCF_N."_user_group_option
WHERE optionName = ?
namespace wcf\system\page\handler;
/**
- * Default implementation for pages supporting visiblity and outstanding items.
+ * Default implementation for pages supporting visibility and outstanding items.
*
* It is highly recommended to extend this class rather than implementing the interface
* directly to achieve better upwards-compatibility in case of interface changes.
namespace wcf\system\page\handler;
/**
- * Default interface for pages supporting visiblity and outstanding items.
+ * Default interface for pages supporting visibility and outstanding items.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
}
/**
- * Returns true if the requested page is avaiable during the offline mode.
+ * Returns true if the requested page is available during the offline mode.
*
* @return boolean
*/
* This heavily limits the abilities for end-users to define appealing urls, but at
* the same time this ensures a sufficient level of stability.
*
- * @param string $customUrl url to perform sanitiy checks on
+ * @param string $customUrl url to perform sanity checks on
* @return bool true if `$customUrl` passes the sanity check
* @since 3.0
*/
protected $staticController = '';
/**
- * Creates a new static route instace.
+ * Creates a new static route instance.
*/
public function __construct() {
// static routes are disallowed for ACP
*/
interface IACPSearchResultProvider {
/**
- * Returns a list of seach results for given query.
+ * Returns a list of search results for given query.
*
* @param string $query
* @return ACPSearchResult[]
* @throws SystemException
*/
protected function compileBlockPlugin($tagCommand, $tagArgs) {
- // check wheater this is the start ({block}) or the
+ // check whether this is the start ({block}) or the
// end tag ({/block})
if (substr($tagCommand, 0, 1) == '/') {
$tagCommand = substr($tagCommand, 1);
* @throws SystemException
*/
protected function compileCompilerPlugin($tagCommand, $tagArgs) {
- // check wheater this is the start ({block}) or the
+ // check whether this is the start ({block}) or the
// end tag ({/block})
if (substr($tagCommand, 0, 1) == '/') {
$tagCommand = substr($tagCommand, 1);
/**
* Reorders content to provide a logical order. In fact the content of
* '{content}' is moved outside the if-condition in order to capture
- * the content during runtime, safely determining wether content is empty
+ * the content during runtime, safely determining whether content is empty
* or not.
*
* @param array $matches
use wcf\system\WCF;
/**
- * Template prefiler plugin which compiles static language variables.
+ * Template prefilter plugin which compiles static language variables.
*
* Dynamic language variables will catched by the 'lang' compiler function.
* It is recommended to use static language variables.
/**
* Returns the user activity point event object type with the given id or
- * null if no such object tyoe exists.
+ * null if no such object type exists.
*
* @param integer $objectTypeID
* @return \wcf\data\object\type\ObjectType
use wcf\system\WCF;
/**
- * User notification event for moderation queue commments.
+ * User notification event for moderation queue comments.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
use wcf\system\WCF;
/**
- * User notification event for moderation queue commments.
+ * User notification event for moderation queue comments.
*
* @author Matthias Schmidt
* @copyright 2001-2016 WoltLab GmbH
use wcf\system\WCF;
/**
- * User notification event for profile commment likes.
+ * User notification event for profile comment likes.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
use wcf\system\WCF;
/**
- * User notification event for profile commment response likes.
+ * User notification event for profile comment response likes.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
use wcf\system\WCF;
/**
- * User notification event for profile's owner for commment responses.
+ * User notification event for profile's owner for comment responses.
*
* @author Alexander Ebert
* @copyright 2001-2016 WoltLab GmbH
}
/**
- * Checks wether given class extends or implements the target class or interface.
+ * Checks whether given class extends or implements the target class or interface.
* You SHOULD NOT call this method if 'instanceof' satisfies your request!
*
* @param string $className
}
- // compare day, month and year wether we have to recalculate hour and minute
+ // compare day, month and year whether we have to recalculate hour and minute
if (($day != self::$result['day']) || ($month != self::$result['month']) || ($year != self::$result['year'])) {
// calculate new time base
$timeBase = gmmktime(0, 0, 1, self::$result['month'], self::$result['day'], self::$result['year']);
}
/**
- * Returns the immediate parent element before provided ancenstor element. Returns null if
+ * Returns the immediate parent element before provided ancestor element. Returns null if
* the ancestor element is the direct parent of provided node.
*
* @param \DOMNode $node node
const REMOVED = '-';
/**
- * indentifier for unchanged lines
+ * identifier for unchanged lines
* @var string
*/
const SAME = ' ';
}
/**
- * Checks wether $haystack starts with $needle, or not.
+ * Checks whether $haystack starts with $needle, or not.
*
* @param string $haystack The string to be checked for starting with $needle
* @param string $needle The string to be found at the start of $haystack
$openTags = [];
$truncatedString = '';
- // initalize length counter with the ending length
+ // initialize length counter with the ending length
$totalLength = mb_strlen($etc);
preg_match_all('/(<\/?([\w+]+)[^>]*>)?([^<>]*)/', $string, $tags, PREG_SET_ORDER);
protected $activeDocument = false;
/**
- * number of open elments
+ * number of open elements
* @var integer
*/
protected $openElements = 0;