Skip to content

Commit

Permalink
Merge branch '4.1-dev' into j4/mce/paste
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed Jan 9, 2022
2 parents 8685942 + 831c4f1 commit c91670b
Show file tree
Hide file tree
Showing 84 changed files with 111 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST C:\tools\php (SET PHP=0)
# TODO: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we
# @todo: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we
# should go back to latest version in appveyor saving ourselves test time
- ps: choco upgrade chocolatey -y --version 0.10.13 --allow-downgrade --no-progress
- ps: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FiltersField extends FormField
/**
* Method to get the field input markup.
*
* TODO: Add access check.
* @todo: Add access check.
*
* @return string The field input markup.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function getListQuery()
$categoryTable = Table::getInstance('Category', 'JTable');
$subCatItemsWhere = array();

// TODO: Convert to prepared statement
// @todo: Convert to prepared statement
foreach ($categoryId as $filter_catid)
{
$categoryTable->load($filter_catid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function display($tpl = null)
}

// Preprocess the list of items to find ordering divisions.
// TODO: Complete the ordering stuff with nested sets
// @todo: Complete the ordering stuff with nested sets
foreach ($this->items as &$item)
{
$item->order_up = true;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/src/Indexer/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static function tokenize($input, $lang, $phrase = false)
$tokens = array();
$terms = $language->tokenise($input);

// TODO: array_filter removes any number 0's from the terms. Not sure this is entirely intended
// @todo: array_filter removes any number 0's from the terms. Not sure this is entirely intended
$terms = array_filter($terms);
$terms = array_values($terms);

Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/src/Indexer/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ protected function processString($input, $lang, $mode)
// Tokenize the current term.
$token = Helper::tokenize($terms[$i], $lang, true);

// Todo: The previous function call may return an array, which seems not to be handled by the next one, which expects an object
// @todo: The previous function call may return an array, which seems not to be handled by the next one, which expects an object
$token = $this->getTokenData(array_shift($token));

if ($params->get('filter_commonwords', 0) && $token->common)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected static function storeNode($node, $parentId)
* The database did not match the input. This could be because the
* state has changed or because the node does not exist. Let's figure
* out which case is true and deal with it.
* TODO: use factory?
* @todo: use factory?
*/
$nodeTable = new MapTable($db);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function install()
/** @var \Joomla\Component\Installer\Administrator\Model\InstallModel $model */
$model = $this->getModel('install');

// TODO: Reset the users acl here as well to kill off any missing bits.
// @todo: Reset the users acl here as well to kill off any missing bits.
$result = $model->install();

$app = $this->app;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function discover_install()
}
}

// TODO - We are only receiving the message for the last Installer instance
// @todo - We are only receiving the message for the last Installer instance
$this->setState('action', 'remove');
$this->setState('name', $installer->get('name'));
$app->setUserState('com_installer.message', $installer->message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function publish(&$eid = array(), $value = 1)

/*
* Ensure eid is an array of extension ids
* TODO: If it isn't an array do we want to set an error and fail?
* @todo: If it isn't an array do we want to set an error and fail?
*/
if (!is_array($eid))
{
Expand Down Expand Up @@ -234,7 +234,7 @@ public function remove($eid = array())

/*
* Ensure eid is an array of extension ids in the form id => client_id
* TODO: If it isn't an array do we want to set an error and fail?
* @todo: If it isn't an array do we want to set an error and fail?
*/
if (!is_array($eid))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ private function install($update)
// Quick change
$this->type = $package['type'];

// TODO: Reconfigure this code when you have more battery life left
// @todo: Reconfigure this code when you have more battery life left
$this->setState('name', $installer->get('name'));
$this->setState('result', $result);
$app->setUserState('com_installer.message', $installer->message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function applyUpdateSite()
break;

// "Custom"
// TODO: check if the customurl is valid and not just "not empty".
// @todo: check if the customurl is valid and not just "not empty".
case 'custom':
if (trim($params->get('customurl', '')) != '')
{
Expand Down Expand Up @@ -1082,7 +1082,7 @@ public function removePackageFiles()

/**
* Gets PHP options.
* TODO: Outsource, build common code base for pre install and pre update check
* @todo: Outsource, build common code base for pre install and pre update check
*
* @return array Array of PHP config options
*
Expand Down Expand Up @@ -1174,7 +1174,7 @@ public function getPhpOptions()

/**
* Gets PHP Settings.
* TODO: Outsource, build common code base for pre install and pre update check
* @todo: Outsource, build common code base for pre install and pre update check
*
* @return array
*
Expand Down Expand Up @@ -1312,7 +1312,7 @@ private function getTargetMinimumPHPVersion()

/**
* Checks the availability of the parse_ini_file and parse_ini_string functions.
* TODO: Outsource, build common code base for pre install and pre update check
* @todo: Outsource, build common code base for pre install and pre update check
*
* @return boolean True if the method exists.
*
Expand Down Expand Up @@ -1706,7 +1706,7 @@ private function checkCompatibility($updateFileUrl, $joomlaTargetVersion)
*/
protected function translateExtensionName(&$item)
{
// ToDo: Cleanup duplicated code. from com_installer/models/extension.php
// @todo: Cleanup duplicated code. from com_installer/models/extension.php
$lang = Factory::getLanguage();
$path = $item->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
},
/* Edit an item */
editItem() {
// TODO should we use relative urls here?
// @todo should we use relative urls here?
const fileBaseUrl = `${Joomla.getOptions('com_media').editViewUrl}&path=`;
window.location.href = fileBaseUrl + this.item.path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export default {
save() {
// Check if the form is valid
if (!this.isValid()) {
// TODO show an error message to user for insert a folder name
// TODO mark the field as invalid
// @todo show an error message to user for insert a folder name
// @todo mark the field as invalid
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default {
save() {
// Check if the form is valid
if (!this.isValid()) {
// TODO mark the field as invalid
// @todo mark the field as invalid
return;
}
let newName = this.$refs.nameField.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default {
try {
document.execCommand('copy');
} catch (err) {
// TODO Error handling in joomla way
// @todo Error handling in joomla way
// eslint-disable-next-line no-undef
alert(translate('COM_MEDIA_SHARE_COPY_FAILED_ERROR'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getContents = (context, payload) => {
context.commit(types.SET_IS_LOADING, false);
})
.catch((error) => {
// TODO error handling
// @todo error handling
context.commit(types.SET_IS_LOADING, false);
// eslint-disable-next-line no-console
console.log('error', error);
Expand All @@ -58,7 +58,7 @@ export const getFullContents = (context, payload) => {
context.commit(types.SET_IS_LOADING, false);
})
.catch((error) => {
// TODO error handling
// @todo error handling
context.commit(types.SET_IS_LOADING, false);
// eslint-disable-next-line no-console
console.log('error', error);
Expand Down Expand Up @@ -137,7 +137,7 @@ export const createDirectory = (context, payload) => {
context.commit(types.SET_IS_LOADING, false);
})
.catch((error) => {
// TODO error handling
// @todo error handling
context.commit(types.SET_IS_LOADING, false);
// eslint-disable-next-line no-console
console.log('error', error);
Expand Down Expand Up @@ -187,7 +187,7 @@ export const renameItem = (context, payload) => {
context.commit(types.SET_IS_LOADING, false);
})
.catch((error) => {
// TODO error handling
// @todo error handling
context.commit(types.SET_IS_LOADING, false);
// eslint-disable-next-line no-console
console.log('error', error);
Expand All @@ -211,13 +211,13 @@ export const deleteSelectedItems = (context) => {
context.commit(types.SET_IS_LOADING, false);
})
.catch((error) => {
// TODO error handling
// @todo error handling
context.commit(types.SET_IS_LOADING, false);
// eslint-disable-next-line no-console
console.log('error', error);
});
});
} else {
// TODO notify the user that he has to select at least one item
// @todo notify the user that he has to select at least one item
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default {
const file = payload;
const isNew = (!state.files.some((existing) => (existing.path === file.path)));

// TODO handle file_exists
// @todo handle file_exists
if (isNew) {
const parentDirectory = state.directories
.find((existing) => (existing.path === file.directory));
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/src/Model/ItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ protected function batchCopy($value, $pks, $contexts)
// Set the new location in the tree for the node.
$table->setLocation($table->parent_id, 'last-child');

// TODO: Deal with ordering?
// @todo: Deal with ordering?
// $table->ordering = 1;
$table->level = null;
$table->lft = null;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/src/Model/MenuModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function delete($itemIds)
// Trigger the after delete event.
Factory::getApplication()->triggerEvent('onContentAfterDelete', array($this->_context, $table));

// TODO: Delete the menu associations - Menu items and Modules
// @todo: Delete the menu associations - Menu items and Modules
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ protected function getTypeOptionsFromLayouts($component, $view)
}

// Get the template layouts
// TODO: This should only search one template -- the current template for this item (default of specified)
// @todo: This should only search one template -- the current template for this item (default of specified)
$folders = Folder::folders($client->path . '/templates', '', false, true);

// Array to hold association between template file names and templates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function getItems()

$items = ArrayHelper::sortObjects($items, 'name', 1, true, true);

// TODO: Use the cached XML from the extensions table?
// @todo: Use the cached XML from the extensions table?
return $items;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function getItem($pk = null)
$item->tags = new TagsHelper;
$item->tags->getTagIds($item->id, 'com_newsfeeds.newsfeed');

// TODO: We probably don't need this in any client - but needs careful validation
// @todo: We probably don't need this in any client - but needs careful validation
if (!Factory::getApplication()->isClient('api'))
{
$item->metadata['tags'] = $item->tags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected function canDelete($record)

$this->levelsInUse = array_merge($this->levelsInUse, $values);

// TODO Could assemble an array of the tables used by each view level list those,
// @todo Could assemble an array of the tables used by each view level list those,
// giving the user a clue in the error where to look.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function reorder($pk, $direction = 0)
}

// Move the row.
// TODO: Where clause to restrict category.
// @todo: Where clause to restrict category.
$table->move($pk);

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function preprocessSaveData(array $data): array
$extension = $this->getExtensionFromInput();
$data['extension'] = $extension;

// TODO: This is a hack to drop the extension into the global input object - to satisfy how state is built
// @todo: This is a hack to drop the extension into the global input object - to satisfy how state is built
// we should be able to improve this in the future
$this->input->set('extension', $extension);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function edit()
$oldData = $model->getData();
$data = array_replace($oldData, $data);

// TODO: Not the cleanest thing ever but it works...
// @todo: Not the cleanest thing ever but it works...
Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR . '/forms');

// Must load after serving service-requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function edit()

$option = $this->input->get('component_name');

// TODO: Not the cleanest thing ever but it works...
// @todo: Not the cleanest thing ever but it works...
Form::addFormPath(JPATH_ADMINISTRATOR . '/components/' . $option);

// Must load after serving service-requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function displayList(array $items = null)

if ($component === null || !$component->enabled)
{
// TODO: exception component unavailable
// @todo: exception component unavailable
throw new \RuntimeException(Text::_('JLIB_APPLICATION_ERROR_INVALID_COMPONENT_NAME'), 400);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function languageAssociations($model)
{
$resources = [];

// TODO: This can't be hardcoded in the future?
// @todo: This can't be hardcoded in the future?
$serializer = new JoomlaSerializer($this->type);

foreach ($model->associations as $association)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function languageAssociations($model)
{
$resources = [];

// TODO: This can't be hardcoded in the future?
// @todo: This can't be hardcoded in the future?
$serializer = new JoomlaSerializer($this->type);

foreach ($model->associations as $association)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function save($recordKey = null)

$data = $this->input->get('data', json_decode($this->input->json->getRaw(), true), 'array');

// TODO: Not the cleanest thing ever but it works...
// @todo: Not the cleanest thing ever but it works...
Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR . '/forms');

// Validate the posted data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function languageAssociations($model)
{
$resources = [];

// TODO: This can't be hardcoded in the future?
// @todo: This can't be hardcoded in the future?
$serializer = new JoomlaSerializer($this->type);

foreach ($model->associations as $association)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
} else if (content && !content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">');
} else {
// TODO replace with joomla-alert
// @todo replace with joomla-alert
alert(options.exists);
return false;
}
Expand Down

0 comments on commit c91670b

Please sign in to comment.