Some of them are already resolved and others don't matter at all.
var highlighters = { {implode from=$__wcf->getBBCodeHandler()->getHighlighters() item=__highlighter}'{$__highlighter}': '{lang}wcf.bbcode.code.{@$__highlighter}.title{/lang}'{/implode} };
- // TODO: Should the media stuff be here?
{include file='mediaJavaScript'}
var element = elById('{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}');
this._packageSearchResultContainer.find('.pagination').wcfPages('destroy').remove();
if (this._pageCount > 1) {
- // TODO: Fix ui.wcfPages to properly synchronize multiple instances without triggering events
- /*$('<div class="contentNavigation" />').insertBefore(this._packageSearchResultList).wcfPages({
- activePage: this._pageNo,
- maxPage: this._pageCount
- }).on('wcfpagesswitched', $.proxy(this._showPage, this));*/
-
$('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({
activePage: this._pageNo,
maxPage: this._pageCount
var highlighters = { {implode from=$__wcf->getBBCodeHandler()->getHighlighters() item=__highlighter}'{$__highlighter}': '{lang}wcf.bbcode.code.{@$__highlighter}.title{/lang}'{/implode} };
- // TODO: Should the media stuff be here?
{include file='mediaJavaScript'}
var element = elById('{if $wysiwygSelector|isset}{$wysiwygSelector|encodeJS}{else}text{/if}');
this.button.addCallback(button, this.WoltLabImage.add);
// add support for image source when editing
- // TODO: float
var mpShowEdit = this.image.showEdit;
this.image.showEdit = (function($image) {
var image = $image[0];
this._toggleShowQuotes();
- // TODO: when is this event being used?
- WCF.System.Event.addListener('com.woltlab.wcf.message.quote', 'insert', (function(data) {
- this._insertQuote(null, undefined, data);
- }).bind(this));
-
WCF.System.Event.addListener('com.woltlab.wcf.quote', 'reload', this.countQuotes.bind(this));
},
// insert all quotes
this._dialog.find('input.jsCheckbox:checked').each($.proxy(function(index, input) {
- this._insertQuote(null, input, undefined);
+ this._insertQuote(null, input);
}, this));
// close dialog
*
* @param {Event} event
* @param {Object} inputElement
- * @param {Object} data
*/
- _insertQuote: function(event, inputElement, data) {
- // TODO: what is with this data attribute, when is the event actually used?
-
+ _insertQuote: function(event, inputElement) {
var listItem = $(event ? event.currentTarget : inputElement).parents('li:eq(0)');
var text = listItem.children('.jsFullQuote')[0].textContent.trim();
if (isset($_POST['showButton'])) $this->showButton = true;
if (isset($_POST['wysiwygIcon'])) $this->wysiwygIcon = StringUtil::trim($_POST['wysiwygIcon']);
- // TODO: The code below violates every implicit convention of value reading and type casting
$attributeNo = 0;
foreach ($this->attributes as $key => $val) {
$val['attributeNo'] = $attributeNo++;
I18nHandler::getInstance()->readValues();
- // @TODO
$colors = [];
foreach ($this->colors as $categoryName => $variables) {
foreach ($variables as $variable) {
}
/**
- * TODO: Comment
+ * Returns the page handler for this item.
*
* @return IMenuPageHandler|null
* @throws SystemException
parent::save();
$this->text = $this->htmlInputProcessor->getHtml();
-
- // parse URLs
- /* TODO
- if ($this->preParse == 1) {
- // BBCodes are enabled
- if ($this->enableBBCodes) {
- if ($this->allowedBBCodesPermission) {
- $this->text = PreParser::getInstance()->parse($this->text, ArrayUtil::trim(explode(',', WCF::getSession()->getPermission($this->allowedBBCodesPermission))));
- }
- else {
- $this->text = PreParser::getInstance()->parse($this->text);
- }
- }
- // BBCodes are disabled, thus no allowed BBCodes
- else {
- $this->text = PreParser::getInstance()->parse($this->text, array());
- }
- }
- */
}
/**
// PackageStartInstallForm::validateArchive()
// try to open the archive
try {
- // TODO: Exceptions thrown within openArchive() are discarded, resulting in
- // the meaningless message 'not a valid package'
$archive->openArchive();
}
catch (SystemException $e) {
$queue = new PackageInstallationQueue($queueID);
if (!$queue->queueID) {
- // todo: what to output?
echo "InstallPackageAction::readParameters()";
return;
}
* @inheritDoc
*/
public function canAccess() {
- // TODO: Check access
return true;
}
}
* Returns the id of the clipboard object type with the given name or `null` if no such
* clipboard object type exists.
*
- * TODO: The name of this method does not reflect its return type and appears not to be used.
- *
* @param string $objectType
* @return integer|null
*/
namespace wcf\system\message\embedded\object;
use wcf\data\object\type\ObjectType;
use wcf\data\DatabaseObjectDecorator;
-use wcf\system\html\input\HtmlInputProcessor;
/**
* Provides default implementations for message embedded object handlers.
* @inheritDoc
*/
protected static $baseClass = ObjectType::class;
-
- /**
- * @inheritDoc
- */
- public function parse(HtmlInputProcessor $htmlInputProcessor, array $embeddedData) {
- // TODO: DEBUG ONLY, remove this method!
- return [];
- }
-
}
use wcf\data\object\type\ObjectType;
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\IMessage;
-use wcf\system\application\ApplicationHandler;
use wcf\system\exception\SystemException;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
/**
* Manages message quotes.
*
- * @author Alexander Ebert
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\System\Message\Quote
+ * @author Alexander Ebert
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Message\Quote
*/
class MessageQuoteManager extends SingletonFactory {
/**
*/
protected $objectTypes = [];
- /**
- * primary application's package id
- * @var integer
- */
- protected $packageID = 0;
-
/**
* list of stored quotes
* @var mixed[][]
* @inheritDoc
*/
protected function init() {
- // @todo
- $this->packageID = 1;
- //$this->packageID = ApplicationHandler::getInstance()->getPrimaryApplication()->packageID;
-
// load stored quotes from session
- $messageQuotes = WCF::getSession()->getVar('__messageQuotes'.$this->packageID);
+ $messageQuotes = WCF::getSession()->getVar('__messageQuotes');
if (is_array($messageQuotes)) {
$this->quotes = isset($messageQuotes['quotes']) ? $messageQuotes['quotes'] : [];
$this->quoteData = isset($messageQuotes['quoteData']) ? $messageQuotes['quoteData'] : [];
* Updates data stored in session,
*/
protected function updateSession() {
- WCF::getSession()->register('__messageQuotes'.$this->packageID, [
+ WCF::getSession()->register('__messageQuotes', [
'quotes' => $this->quotes,
'quoteData' => $this->quoteData,
'removeQuoteIDs' => $this->removeQuoteIDs
* @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Option\User\Group
- *
- * @todo text options types can't have line breaks, why use them to split
- * values? what to do?
*/
class TextUserGroupOptionType extends TextOptionType implements IUserGroupOptionType {
/**
}
/**
- * Saves the localized package infos.
- *
- * @todo license and readme
+ * Saves the localized package info.
*/
protected function saveLocalizedPackageInfos() {
$package = new Package($this->queue->packageID);
$statement->execute([
base64_encode(serialize($document)),
$queue->queueID,
- $document->formName // TODO: FormDocument::$formName does not exist, FormDocument::getName()?
+ $document->getName()
]);
}
// the new delivered required version of the package has a
// higher version number, thus update/replace the existing
// package installation queue
-
- // todo
}
}
protected function uninstallPackage(array $nodeData) {
PackageEditor::deleteAll([$this->queue->packageID]);
- // remove localized package infos
- // todo: license/readme
+ // remove localized package info
$sql = "DELETE FROM wcf".WCF_N."_language_item
WHERE languageItem IN (?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
ORDER BY showOrder ASC";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([$this->poll->pollID]);
- // TODO?: $this->pollOptions = $statement->fetchAll(\PDO::FETCH_ASSOC);
while ($row = $statement->fetchArray()) {
$this->pollOptions[] = $row;
}
}
&.preInput {
- // TODO: use flex-box instead
display: table;
width: 100%;
}
.messageTabMenu + .innerError {
- margin-top: -1px; // TODO
+ margin-top: -1px;
width: 100%;
}