29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-28 16:13:42 +00:00
Commit Graph

9814 Commits

Author SHA1 Message Date
Translation
1c7ce4d3b0 Language update 2022-02-01 07:31:10 +00:00
joomla-translation-bot
df4eeaf5b0
Translation Update (#36852)
* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update
2022-01-31 17:17:40 +01:00
Brian Teeman
e67cfa68b3
[4.1] redirect links index (#36817)
* [4.1] redirect links index

Set the correct index name

* updates

* Update administrator/components/com_admin/sql/updates/postgresql/4.1.0-2022-01-24.sql

Co-authored-by: Quy <quy@fluxbb.org>

Co-authored-by: Quy <quy@fluxbb.org>
2022-01-31 16:54:42 +01:00
Brian Teeman
24b47ac217
[4.1] s/occurence/occurrence (#36815)
typo
2022-01-25 04:42:35 +01:00
Brian Teeman
63dc79d5d6
[4.1] s/overriden/overridden (#36818)
spelling error
2022-01-25 04:22:39 +01:00
Benjamin Trenkle
f412e13529
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev 2022-01-23 09:15:56 +01:00
joomla-translation-bot
4d40850d89
Translation Update (#36764)
* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update

* Language update
2022-01-23 07:18:56 +01:00
wilsonge
8791331f2e
Reset to dev 2022-01-18 07:01:31 +00:00
Benjamin Trenkle
92d7cf3eb8
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into HEAD
# Conflicts:
#	.drone.yml
#	administrator/language/en-GB/install.xml
#	administrator/language/en-GB/langmetadata.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	api/components/com_categories/src/Controller/CategoriesController.php
#	api/language/en-GB/install.xml
#	api/language/en-GB/langmetadata.xml
#	composer.lock
#	installation/language/en-GB/langmetadata.xml
#	language/en-GB/install.xml
#	language/en-GB/langmetadata.xml
#	layouts/joomla/content/category_default.php
#	libraries/src/Application/ConsoleApplication.php
#	libraries/src/Version.php
#	tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php
2022-01-16 03:26:30 +01:00
joomla-translation-bot
38e6b07e51
Translation Update (#36645) 2022-01-12 11:41:00 +00:00
Dimitris Grammatikogiannis
1554ad2631
[4.1] Update fix 4.1.0-2021-11-20.sql (#36576)
* Update 4.1.0-2021-11-20.sql

* Update 4.1.0-2021-11-20.sql

* Update 4.1.0-2021-11-20.sql

* Update 4.1.0-2021-11-20.sql

* Fix mail template params also for new installations

* Fix task notification plugin params for new installations, too

* Add new update SQL to fix previous 4.1 beta versions

* Revert "Fix task notification plugin params for new installations, too"

This reverts commit 3b68af5e6b.

* Remove change for extension params from new update SQL

* Revert change of extension params in old update SQL, too

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
2022-01-09 11:51:52 +01:00
Brian Teeman
831c4f1a15
[4.1] @todo (#36612)
Most IDE have tools to quickly find @todo in the code base. This PR corrects the usage of TODO instead of @todo. It will make it easier in future to work through these items, check that they are still valid, and resolve them.
2022-01-09 02:12:24 +01:00
joomla-translation-bot
6c99641942
Translation Update (#36356) 2022-01-08 23:01:44 +00:00
wilsonge
e5246259b7
Tag 4.0.6 RC1 2022-01-08 21:04:54 +00:00
wilsonge
077101026c
Improve security and type checking of the installer task 2022-01-08 19:33:52 +00:00
Benjamin Trenkle
90ee7905b0
Bump to 4.1.0 Beta 3 2022-01-01 23:05:36 +01:00
Benjamin Trenkle
b7a6aa7610
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev 2022-01-01 11:07:47 +01:00
Richard Fath
9f800fa063
Fix duplicate lft rgt in assets table for PostgreSQL (#36509) 2021-12-31 19:52:38 +00:00
Richard Fath
a407e4abf6
Fix asset table sequence next value for PostgreSQL after upmerge from 4.0-dev (#36507) 2021-12-31 18:18:05 +01:00
Benjamin Trenkle
6dc01f5c49
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts:
#	.drone.yml
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/src/Model/ArticleModel.php
#	administrator/components/com_templates/src/View/Template/HtmlView.php
#	composer.lock
#	installation/sql/mysql/base.sql
#	installation/sql/postgresql/base.sql
#	layouts/plugins/editors/tinymce/field/tinymcebuilder.php
#	package-lock.json
#	package.json
#	tests/Codeception/api.suite.dist.yml
2021-12-31 16:28:26 +01:00
Phil E. Taylor
c604191d6f
[4.0] Remove reference to old JPrefixed Class + Cleanup (Misc) (#36442) 2021-12-30 22:48:10 +00:00
Nicola Galgano
609da7bb69
[4] Add missing asset for "Login Support" module in the installer (#36481) 2021-12-30 12:39:00 +00:00
Konstantin Kolos
5b47ac04e5
[4.0] Input bs5 for installation page (#36464)
* class="form-check-input"

* tabs
2021-12-29 08:13:17 -08:00
Brian Teeman
1a32b68ae9
[4.1] Joomla-Accessibility Checker (jooa11y). (#36190)
* jooa11y scaffolding

media folder
web assets
     hard coded until we decide on npm or not

to install check out this branch
npm run build:js
npm run build:css
discover install the plugin

todo - aka brian needs help
[] make the checker start
[] make the checker use the settings from the plugin

* script loads now

* tippy - temp

* editor button

* toolbar

* enpugh

* Jooa11y/enhancements (#132)

* Add some enhancements

* Fix wrong name

Co-authored-by: Benjamin Trenkle <benjamin.trenkle@wicked-software.de>

* tabs

* tippy popper licence and naming

* postgresql install

* xml bug

* cleaning

* tidy

* fix

* dont need scss

* needs to be an integer

* deploy version

* might not be the best way?

* Revert "Auxiliary commit to revert individual files from 18199dd5bec43f5b52bfcfd1b0bb13afb865dc2c"

This reverts commit 4eb15800ccc4bb0d64580013b58a92505bc5abfc.

* clarify show

* options

* package.lock

* remove editor button

* cs

* string

* set input

* deploy

* Temporary add git to node ci (#133)

* github link

* param

* Revert "param"

This reverts commit 378a64e0a3.

* params

* spelling

* revert

* sql field

* cs and spelling

* Fix npm

* Revert drone.yml change

* Switch package to tarball

* Use the es module

* Update eslint-plugin-vue to 8.2.0

* CS (#135)

* lang

* progress update

* fix strings

* load strings

* js change from @fedik

* typo and package-lock

* sef and non-sef

* revert change by Dimitris

* Update joomla-a11y-checker version

* Update joomla-a11y-checker version

* Update view preview url

* simplify

* Update jooa11y.php

* fix jscs (#136)

* undo eslint change

* remove "Additional ruleset toggles" from the plugin settings

* Update .eslintrc

lets try this again

* final try

* sha

Co-authored-by: Benjamin Trenkle <benjamin.trenkle@wicked-software.de>
Co-authored-by: Harald Leithner <leithner@itronic.at>
Co-authored-by: dgrammatiko <d.grammatiko@gmail.com>
Co-authored-by: Dimitris Grammatikogiannis <dg@dgrammatiko.dev>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>
Co-authored-by: Fedir Zinchuk <getthesite@gmail.com>
2021-12-29 10:39:29 +01:00
Phil E. Taylor
accbe4ef12
Return value type is not compatible with declared (#36412) 2021-12-29 01:19:11 +00:00
Benjamin Trenkle
39807a496d
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts:
#	.drone.yml
#	administrator/language/en-GB/install.xml
#	administrator/language/en-GB/langmetadata.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	api/language/en-GB/install.xml
#	api/language/en-GB/langmetadata.xml
#	installation/language/en-GB/langmetadata.xml
#	language/en-GB/install.xml
#	language/en-GB/langmetadata.xml
#	libraries/src/Version.php
2021-12-18 15:27:04 +01:00
joomla-translation-bot
9d50af62da
Translation Update (#36325) 2021-12-16 23:12:17 +00:00
wilsonge
92e67d80c6
Reset to dev 2021-12-13 23:32:17 +00:00
joomla-translation-bot
bfaf931341
Translation Update (#36258) 2021-12-08 18:36:49 +00:00
Benjamin Trenkle
bfd66d9442
Bump to 4.1-beta1 2021-12-07 15:59:21 +01:00
Benjamin Trenkle
4dc16a86e5
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts:
#	administrator/manifests/files/joomla.xml
#	libraries/src/Version.php
2021-12-07 11:39:11 +01:00
joomla-translation-bot
328c3eba86
Translation Update (#36226) 2021-12-06 22:09:28 +00:00
wilsonge
ceacd3536e
Fix version in reset to dev 2021-12-05 18:31:30 +00:00
wilsonge
af3386d2b7
Reset to dev 2021-12-05 18:30:40 +00:00
Benjamin Trenkle
da1f63343d
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts:
#	administrator/language/en-GB/install.xml
#	administrator/language/en-GB/langmetadata.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	api/language/en-GB/install.xml
#	api/language/en-GB/langmetadata.xml
#	installation/language/en-GB/langmetadata.xml
#	language/en-GB/install.xml
#	language/en-GB/langmetadata.xml
#	libraries/src/Version.php
2021-12-05 19:19:48 +01:00
wilsonge
ac67ec3735
Tag RC2 2021-12-05 18:07:27 +00:00
joomla-translation-bot
39f052dc46
Language update (#36220) 2021-12-05 17:49:11 +00:00
Dimitris Grammatikogiannis
579e20ee14
4.1 Child templates 1/2 (#35874)
* New mode for cassiopeia and atum

* DB Changes

* Fix wrong import paths

* SQL for updates

* Deleted files and folder for changing core templates to inheritable

* Better version comments

* Move custom files in core templates to media folder on update

* Better English in the comment

* Fix some paths

* System templates

* Deleted files and folders for system templates

* Move template preview files, too

* Create parent folders if necessary at target path

* Don't delete template previews

* Revert special handling for core template preview images

* move images to the correct folder

* Fix the logos

* One more path fixed

* Revert the tinyMCE changes here

* Fix the roboto path

* Fix the fontawesome path

* .css files imports are relative to the path of the file importing

* Add missing import

* Use realpath instaed of the Path::clean

* RecursiveDirectoryIterator && mkdir

* Meh

* Mehhh

* Update administrator/components/com_admin/script.php

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>

* No dots and dirs

* Use the flag for the dots

* Update administrator/components/com_admin/script.php

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>

* sql

* Cassiopeia Roboto

* Update paths to local font schemes in template style parameters on database update

* Roboto font path

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>
2021-11-30 03:34:47 +01:00
wilsonge
eabccde4b4
Tag 4.0.5 RC 2021-11-28 18:41:05 +00:00
Tushar
3be67ab042
[4.1] [SOC 21] Add a Scheduled Tasks Infrastructure to Joomla (#35143)
* Fix task filter ordering

Order now matches the order of columns the db table.

Ref: joomla/joomla-cms#35143#discussion_r700213211 / @brianteeman.

* Improve com_scheduler language strings

Improves a task form hint, a label.

Refs: joomla/joomla-cms#35143#discussion_r700203125
      joomla/joomla-cms#35143#discussion_r700202862
      @brianteeman.

* Scheduler runner as a shutdown_function

The schedule runner trigger is now bound as a shutdown_function.
The function is registered by a onBeforeRender listener.

* Enhance task locks and events

- Updates task locks (the `locked` column) so they now use a timestamp
  to allow for recovery from a fatal failure. Includes updates to SQL
  scripts.
- Dispatch a new onTaskRecoverFailure event on "recovery" from a fatal
  failure.
- Actually dispatch task exit events (oops!)
- Update the event class declaration for onExecuteTask to be more
  elegant, readable. [1]

[1]: http://joomla/joomla-cms#35143#discussion_r700897628 / @Denitz

* Add a sanity check to TaskPluginTrait

Adds a pre-broadcast sanity check for plugins with invalid an TASK_MAP.
The advertiseRoutines method will no longer try to advertise tasks that
don't have a corresponding 'langConstPrefix'.

* Fix fatal task failure check

Fixes the failure check (the lock should not be null) and
enhances a comment + styling.

* Increase scheduler plugin hook priority

Increases the priority for the registerRunner hook to PHP_INT_MAX,
although I'm not yet sure if onBeforeRender is the first event to be
fired (probably not).

* Fix event dispatchers in the Task class

The onTaskRecoverFailure and exit task weren't passing the
event name to dispatchers. Oops!
P.S. I don't know why that's required with the new Event classes.

* Cleanup com_scheduler manifest

Removes menu link (was supposed to go before).

* Add filtering by lock state in TasksModel

Adds support for filtering by the "lock" state of a task. Also in
the process defines different lock levels: hard locks and soft locks.
I think in the future, the filtering states should maybe
go into a namespace/class for constants.

* Add task timeout config to "com_scheduler"

Adds a configuration field for a global task timeout.
The timeout serves the purpose of safely declaring a hard-limit on how
long tasks can be considered as running once a lock on them is acquired.
Right now the default is 300s (5min) but this can be re-evaluated
in the future to a more sensible value if needed.

* Update language file for "com_scheduler"

Adds new constants for the component configuration form.

* Bugfix and update Scheduler API class

- Now fetches all fields from the DB (this broke things as the `locked`
  field was never fetched!!)
- Adds locked state filtering as a default (excludes hard-locked jobs).

* Add priority column to `#__scheduler_tasks`

- Adds a priority column to the tasks table, also a linked index.
- Fixes update SQL script styling.

* Add task priority to Task form and filter form

* Add priority, multi-ordering support to TasksModel

- Adds priority to the filter_fields config.
- Adds support for a `list.multi_ordering` model state variable which
  can be used to sort by multiple fields (limitation for the standard
  `list.ordering` `list.direction` model). The way this is right now
  means we pass unquoted names to the db which should be fixed in the
  future. In any case this is not exposed in the filter form but only
  meant to be used by internal handlers interacting with the model.
- Fixes behaviour for high collision ordering fields (used to order
  first by title and then by the targeted column).

* Update task timeout with config fetch

The Task driver class now fetches the task timeout from the component
config.

* Add priority-aware task queue to Scheduler class

The fetchTasks() method now uses multi-ordering with priority as the
primary ordering column to make the task queue priority aware.

* Update language files for com_scheduler

- Adds language constants for the task priority config in the task and
  tasks filter form.
- Sneaks in a description attribute for the priority form field.

* Bugfix and add an 'Advanced' tab to the task form

- Moves the log config and task priority to the advanced tab.
- Fixes a bug with using `joomla.edit.params`, which is now used
  for rendering all injected task routine parameters.

* Enhance orphan task handling in Task driver

- Dispatches now an event if task to run is orphaned, then skip the
  execution and exit early with a new exit code.
- Adds a skipExecution method to the Task class.
- Enhanced the handleExit method through an events map to dispatch
  other events based on exit code.
- Adds a new code for orphaned tasks to the Status namespace class.

* Enhance orphan handling in Scheduler, update lang

- Scheduler now includes orphaned tasks by default. Before this,
  the ::runTask() method never got to handling or logging orphaned
  tasks because of the default filtering excluding them.
- Adds exceptional log for orphaned tasks.
- Update language file to match.

* Add demo task routines to stress memory

Adds task routines to test scheduled tasks when either the system memory
runs out or the PHP memory_limit is exceeded.

* Add sleep demo task routine

Renames the first demo task routine and adds a form field to configure
the sleep duration.

* Update language files for plgTaskDemotasks

Adds constants for new task routines and updates some others.

* Cleanup and bugfix com_scheduler

- Removes redundant pass-by-reference
- Makes closures static where possible
- Fixes problematic casts
- Adds some missing parenthesis
- Removes unused variables
- Removes unused method overrides
- Miscellaneous changes

Ref: joomla/joomla-cms#35143 / @Denitz

* Improve consistency, extend `#__scheduler_tasks`

Adds `checked_out` and `checkout_out_time` to `#__scheduler_tasks`. Also
adds index for `checked_out`.

Ref: joomla/joomla-cms#35143#issuecomment-911819994 / @Denitz

* Remove language autoload from ScheduleRunner

Ref: joomla/joomla-cms#35143#issuecomment-911819994 / @Denitz

* Fix missed errant cast

Fixes a leftover problematic cast in IntervalField.

* Patch Task::releaseLock()

The method now updates the Task properties, so they now keep in sync
with db updates and can be used reliably by other code.

* Add plgSystemTaskNotification

This plugin is responsible for sending out email notifications for
task failures and optionally also successful executions.

* Add language files for plgSystemTaskNotifications

* Add SQL DDL for task notification mail templates

* Add auto-install SQL (plgSystemTaskNotifications)

* Add language autoload for plgSysTaskNotification

* Patch auto-install SQL scripts

- Adds installation DDL in installation script (supports.sql)
- Adds the `extension` column in update scripts.

* Cleanup plg taskNotification

* Fix Scheduler::fetchTasks() default behaviour

Shifts the list config for the task queue to the fetchTaskRecord()
method. This makes more sense as the fetchTasks() method is supposed
to be a transparent API method to interact with the TasksModel rather
than have an overriding default like the list.multi_ordering state
variable as a default. Also changes the default ordering behaviour for
sensibility and adds some comments for clarity.

* Add explicit id, title filtering to TasksModel

These are largely redundant to the search filter but convenient to use
and when only the title should be targeted. It turned out I assumed
we had this in the model and so was an outstanding bug with the
Scheduler class. Probably, can use refactor later (or _should_).

* Enhance ExecRuleHelper::nextExec()

Adds a new option $nowBasis argument, when provided uses 'now' as the
last execution. Useful when skipping executions, so we're not actually
updating the last exec.

* Add new Task::Status constant

Adds a status code for when no (matching) task exists.

* Improve comments in the TaskOption class

Improves comment structure, adds some missing punctuation.

* Update the Scheduler class

- Renames fetchTasks() => fetchTaskRecords().
- Fixes broken id search (l190).
- Updates runTask() return (now returns the Task exit code).
- Adds TASK_QUEUE filters and list config as class constants so other
  extensions can reliably use them to get the queue behaviour (should
  this somehow be baked in?).
- Updates return for fetchTaskRecords(), which could return a false
  from the model query before but now would an empty array.

* Bugfix Task::skipExecution()

Now actually skips the execution and advances the task to the next
execution slot relative to 'now'.

* Add scheduler:list console command

Command to list scheduled tasks.

* Add scheduler:run command

Command to run scheduled tasks. Supports triggering the task queue
as well as individual tasks, matching either by id or title. Right now,
due some code-smell fixes and perhaps behavior adjustments. An example,
perhaps the title match could support running all tasks matching a title
with the --all flag.

* Add autoload for new commands

Adds new commands to the application loader and dependency injection
class used by other core commands.

* Add plugin plgTaskCheckFiles

Adds plgTaskCheckFiles. This plugin includes currently a single task
routine which offers the ability to check images in a directory
for dimensions and resize ones that are too big!

* Enhance form for image size routine

Adds sensible defaults, require attributes, etc.

* Update form for get_request routine

Updates the fieldset so its translated right.

* Update language file for com_scheduler

Adds a new constant for the task_params fieldset so plugins can use it
without defining their own.

* Patch task form

Patches the "trigger" field to make it hidden. This is temporary as it
should be removed altogether soon both in the form and the db table.

* Patch exit handling in Task class

The handleExit() method needed the exit code to be passed while it was
available already in the $snapshot class property. This also created
room for error and the final handleExit() return meant that generic
failures were never broadcasted through the failure event.

* Patch exit handling in Task class

The handleExit() method needed the exit code to be passed while it was
available already in the $snapshot class property. This also created
room for error and the final handleExit() return meant that generic
failures were never broadcasted through the failure event.

* Add support for mailing task outputs

Implements support for mailing out task output attachments and
in the body. Not robust but just works for a demo (needs to be
redone).

* Update SQL for task notification templates

Adds the "task_output" param.

* Add output file support in GET request routine

Hastily done and to be redone but this works okay as a POC.

* Patch task class

Fixes the execution time record/next execution which broke somewhere
along before. This is a quick patch and should be fixed as suggested
by the comment.

* Disable deprecated routineEndMessage [CheckFiles]

* Improve code quality, consistency and style

- Removes some redundant comments.
- Reduces reliance on implicit PHP casts.
- Refactors to a more functional approach in TaskModel::save() and calls
  nested within.
- Uses allowed Priority::MAX as plgSystemSchedulerunner listener
  priority.
- Refactors some abbreviated variable names.
- Changes uses of the 'GMT' to 'UTC' (more correct and consistent with
  existing Joomla code)
- Separates some variable assignments and tests for improved
  readability.
- Starts removing imports for native global functions and objects.
  This should be a gradual process.
- Cover up a couple copy-and-paste inconsistencies. oops!
- Reverts a styling regression in old code.

Ref: joomla/joomla-cms#35143 / @nibra / @HLeithner / @brianteeman.

* Make SchedulerHelper abstract

Makes SchedulerHelper an abstract class. This also eliminates the need
for a private constructor.

Refs: joomla/joomla-cms/#35143#discussion_r710998565
     / joomla/joomla-cms#35143#discussion_r710999157
     / @PhilETaylor
     / @nibra.

* Add request hash protection for scheduler runner

- Adds a configuration tab for the lazy scheduler in ComScheduler with
  configuration switches for disabling the lazy scheduler and protecting
  it with a request hash.
- Adds configuration checks in plgSystemScheduleRunner to only run if
  either hash matches or it's not protected.

* Bugfix scheduleRunner event subscription behaviour

ScheduleRunner attached itself to events even with comScheduler
disabled. This was likely because it utilised a constructor short which
is useful only with the pre-4.x event-method model.
This commit adds checks for the component straight to the
getSubscribedEvents() method and also adds a check for the lazy
scheduler switch in com_scheduler config params.

Refs: @Denitz / joomla/joomla-cms#35143#issuecomment-911453500.

* Add rule for manual-only task invocation

Adds an execution rule for when a task should only run when manually
invoked. Also renames internally the "custom" rule to "cron-expression".

* Refactor and extend TaskModel, TaskTable

- Updates TaskModel for changes in the Task form.
- Extends and refactors TaskModel to both support to both support
  the new manual invocation only rule and for better behaviour with
  setting some fields initially in the database.
- Adds a Task::bind() override to TaskTable and changes a default
  param to support updating fields to NULL through AdminModel::save().

* Update ExecRuleHelper

- Update with changes to the Task form.
- Removes imports for native global functions.

* Update language constants for com_scheduler

- Adds language constants for new Scheduler config fields.
- Refactors some language constants for better, more uniform naming.

* Cleanup Task class

- Removes outdated info from handleExit() PHP-doc.
- Removes imports for native global symbols.

* Update com_scheduler manifest

- Adds some missing fields and fixes code-style.

* Apply code-style suggestions from code review

- Fixes styling for some docblocks.
- Fixes copyright header alignment for consistency (non-exhaustive).
- Adds trailing commas for multi-line array declarations (probably non-exhaustive).
- Adds explicit name-spacing for global native symbols (likely non-exhaustive).
- Misc code-style improvements.

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Apply code-style suggestions from code review

- Fixes styling for some docblocks.
- Fixes copyright header alignment for consistency (non-exhaustive).
- Adds trailing commas for multi-line array declarations (probably non-exhaustive).
- Adds explicit name-spacing for global native symbols (likely non-exhaustive).
- Misc code-style improvements.

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Clean up usage

* Add AJAX requests script to scheduleRunner

JS sets up a navigator.sendBeacon() callback to make
requests to trigger a `com_ajax` backed AJAX listener offered by
plgSystemScheduleRunner.

* Update manifest for plgSystemScheduleRunner

Adds the new media asset folder, fills in some missing fields and
fixes the language field.

* Add scheduleRunner listener to inject JS

- Removes `shutdown_function` behavior to register the scheduleRunner.
- Adds listener method to inject the trigger JS on the
  `onBeforeCompileHead` event.
- Fixes copyright header styling.
- Reduces event subscription stage check complexity. (Ref: @Denitz /
  joomla-projects/soc21_website-cronjob#4#commitcomment-57308547)
- Adds `com_scheduler` component config as class property.
- Change scheduleRunner's subscription event to `onAjaxRunScheduler`.

* Add scheduleRunner doc and missing checks

- Adds descriptive doc in the class docblock.
- Adds missing checks to the runScheduler() method.

* Fix `created_by` auto set on task save

- TaskTable::save() now sets the `created_by` field  correctly.
- Adds and fixes existing checks for field auto-set.

* Cleanup and enhance TaskTable docs

- Fix copyright style.
- Enhance doc blocks.
- Cleanup.

* Fix plugin manifests

- Lowercase <name>.
- Adds missing fields and missing <files> nodes.
- Fixes XML styling (tasknotification.xml)

Ref: @bembelimen

* Revert changes to the modules/select template

Reverts file to 4.1-dev state.

* Add standard routine handler

`standardRoutineHandler()` can take care of initialising the routine,
calling the associated callable and ending the routine all without
any logic in the plugin class if each routine has a corresponding
callable.

* Fix copyright formatting

* Update Task\Status

Adds status code for invalid return and improves member doc blocks.

* Refactor TaskPluginTrait

- Renames methods:
 - `taskLog()` => `logTask()`
 - `taskEnd()` => `endRoutine()`
 - `taskStart()` => `initRoutine()`
- Upgrade `enhanceTaskItemForm()` to a complete event handler. For
  plugins targeting only the task form, this method can now be mapped
  straight to the `onContentPrepareForm` event.
- Code style improvements and fixes for global namespace qualification
  on some `\Exception` references.
- More explicit checks on variables.
- `Event` type arguments are now `EventInterface` so other
  implementations stay compatible.
- Removes deprecated logging nd `$log` param from `endRoutine()`.

* Improve TaskPluginTrait documentation

Adds and improves on the information in the doc blocks with context,
usage hints and related information. Also updates some parameter
information and fixes the tag order (`@since` <=> `@throws`).

* Implement suggestions on TaskPluginTrait

- Refactors `initRoutine()` => `startRoutine()`
- Return true for irrelevant enhanceTaskItemForm() contexts.
- Path checks for routine forms.
- Allow only class methods with `standardRoutineHandler()`
- Adds signature checks on standard routine methods.
- Adds validation on routine return codes against `Task\Status`.

* Update TaskPluginTrait::standardRoutineHandler()

Now enforces a single required parameter of type `ExecuteTaskEvent`
(from `EventInterface`).

* Update task plugins

- Remove methods now offered by TaskPluginTrait.
- The 'call' TASKS_MAP param is now 'method'.
- Update event subscriptions.
- Update docs.
- Improve code-style and copyright blocks.

* Ignore user aborts on scheduler trigger

Adds attempt to set the INI `ignore_user_abort` to true.
Also enhances some docs.

* Update TaskPluginTrait doc

Updates signature reference for standard routine methods.

* Rename status code

Renames `Task\Status::NO_TIME` to `Task\Status::RUNNING`.

* Add config options for scheduleRunner

Adds config option for the client side request intervals
for the scheduler trigger. Also fixes some showon attributes in
the com_scheduler config form.

* Add removal of time limit on task runs
Add test task permission
Add webcron, test task, lazycron entry points

* Fix broken interval run when setting custom value

* Set correct lazyCron URL and run it at the beginning
Prevent running LazyCron when not in html view or if lazyCron is not enabled
Implement hash check for webCron

* Rebuild JS
Implement test runner

* Finish test cron

* Fix CS

* Revert SQL query

* Add webcron to scheduler config

Updates the `com_scheduler` config.xml with the webcron fieldset.

* Add webcron key autogen and more to Schedulerunner

- Schedulerunner auto-generates the webcron key and does some form
  usability enhancements on the config form (much like the user API
  token plugin).

* Add custom field for webcron link

- Adds new field 'WebcronLinkField', this field is not really needed
  except for to support the custom layout location.
- Allows for the webcron link to be copies on click, much like the user
  API token field.
- Adds field JS to the `com_scheduler` media source provider.

* Update com_scheduler language file

Adds new strings for the config form and updates some refs.

* Fix regression in Scheduler class

- Fix regression due to newly protected status
  of Task::snapshot + accessor.
- Update some doc-blocks and related formatting.
- Optimise some imports.
- Minor miscellaneous changes.

* Fix test run JS

Fixes apparent JS parse error on non-zero task exits.

* Improve form manipulation code

- Check for `com_scheduler` in the subject table for table event.
- Minor code simplification.

* Clean up redundant field from Tasks table

- Remove redundant `trigger` field from `#__scheduler_tasks`.
  - From install and update SQL.
  - Task item form.
  - Language file.
- Fix regression in GenericDataException ref.
- Minor styling/doc fixes and upgrades.

* Remove global task configuration config

- Removes task configuration config from `plgSystemTasknotifications`
  plugin config.
- ! Does not update any usages.

* Add task notification config as injected form

- Task notification config is now injected into the task item form.
- ! Usages are not updated.

* Improve plgSystemTaskNotification code style

- Updates docs.
- Improves docblocks, general code style for compliance with unenforced
  Joomla! style guide.

* Fix params display in task view

* Add fieldset labels for task form

- Adds missing fieldset labels.
- Adds some comments and fixes marginally code-style.

* Update task notification logic

- Replaces checks with updated task item configuration.
- Improves logging (additional checks).
- Makes file attachment handling safer.
- Fixes/updates code-style.

* Update plgSystemTaskNotification language file

- Adds new constants for logging.
- Fixes ordering.

* Fix Task driver behavior

The run() method now updates the object state instead of leaving it
to releaseLock(). The class continues to appear a clunky build :D.

* Fix TasksRunCommand regression

* Fix scheduleRunner default behaviour

- Uses again sensible defaults (enabled lazy cron).
- Check webcron.enabled.
- Some useful logging.
- Improved docblocks.

* Update scheduleRunner language files

Adds new constant for a logging string.

* Update and fix code-style

- Fix license header formatting.
- Fix doc phpdoc tag ordering.
- Cleanup and marginally improve doc-blocks.
- Fix unqualified global refs in doc-blocks.
- Misc formatting fixes/improvements.
- Remove phpcs ignores.

* Revert drone

* Update com_scheduler language file

- Missing constant.
- Ordering.

* Apply suggestions from code review

Code-style and language improvements.

Co-authored-by: Brian Teeman <brian@teeman.net>

* Apply suggestions from code review

Code-style and language improvements.

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update language constants for plgSysScheduleRunner

Updates plugin description string.

* Bugfix Task::run()

For some reason, the UNIX timestamp with microseconds `microtime()`
broke the DateTime breaking down the task usual scheduling.
This commit introduces an int cast for the timestamp which makes things
work as expected.

* Fix webcron url & description

Fixes webcron url and description as exposed in the Scheduler component
config.

Ref: joomla-projects/soc21_website-cronjob#37

* Update joomla.asset.json

* Improve the locking mechanism

* Add table locking when locking task

* CS

* Simplify null date check

* Add column quote

* Extend TaskModel's getter method

! Fails in MySQL 5.6 with "Table <task table> was not locked with LOCK
  TABLES"

- Adds options array to customise behavior.
- Adds static option resolver for proxies to the getter.
- Wrap queue behavior in a sub-query for compatibility.
...

* Update Scheduler::getTask() and runTask()

Updates Scheduler::getTask() and Scheduler::runTask() to match
the updated TaskModel::getTask() method.

* Fix typos and improve static analysis support

Fixes some typos and adds some doc IDE typehint for improved
static analysis to the Scheduler class.

* Update/fix Schedulerunner

Updates primarily the Schedulerunner::runTestCron() method. Other
methods might need to be updated still.

* Update Task class

Minor updates, comments for the future.

* Update Task::releaseLock()

Fixes compatibility with PostgreSQL (tested on 11). Removes table
specificity from columns (this confuses Postgres for some reason).

* Update TaskModel::getTask()

Fixes task queue behavior (now only applies when an ID is not passed).

* Improve TaskModel::getTask() mysql compat

! Still fails because of table locks
- Adds pseudo-source for sub-query.
  https://stackoverflow.com/q/44970574
- Adds reference comments to try to make the
  SQL gymnastics make sense.

* Add unlock function

* Fix language strings for the schedulerunner plugin

* Update description and remove plugin files

* Implement Scheduler CLI state changer

* Update TasksStateCommand.php

* Fix list state filter in scheduler

* Fix MySQL lock violations

Fixes lock violation by getting rid of sub-queries.

* Fix label a11y [#42]

* Quote 'id'

Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>

* update publish/unpublish => enable/disable

* Add check for checked out tasks

Adds check for checked out state of tasks, so it doesn't silently fail
anymore if such a task is attempted to be updated.

* Improve static analysis support.

Adds type hints for classes so static analysis and IDE autocomplete
works better.

* Update exit codes and fix typos

- Updates failure exit codes so all are now distinct.
- Fixes typos and other minor things.
- Uses syntactic string composition instead of concatenation.

* Cleanup

Removes debug string eval

* Fix SQL scripts

Reduces length of `#__scheduler_tasks.type` to evade exceeding maximum
length of indices and considering 128 chars is sufficient for a UUID
and for context aware string currently used for routine IDs.

Refs: @HLeithner

* Apply Code-style and doc-block improvements from code review

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Replace Registry inheritance with composition

Task no longer extends Registry, but uses a new `taskRegistry` property
to store a Registry object. This compositional pattern makes the code
stink less.

* Refactor Task::isSuccess()

No longer takes care of dispatching exit events, which is done by
Task::dispatchExitEvent() now. Return API is unchanged.

* Apply Code-style and doc-block improvements from code review

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update doc-blocks for the Task driver

Adds doc-block for Task::EVENTS_MAP and updates the constructor's.

* Update composer.lock

* Update composer.lock

* Make Task property getter public [bug]

Makes the task property getter public. Protected visibility here
breaks things.

* Improve task routine exception handling

- The driver now allows for and preserves exceptions from routines,
throwing them again after wrapping things up and releasing the task
lock.
- Removes the nonNull assertion for the routine snapshot (this already
  did not work).

* Update plgScheduleRunner

Webcron now throws the exception from the task, if it exists. This is
caught by com_ajax and the exception message included in the output.

* Update Task::Status

Renames the KO_RUN status to KNOCKOUT, adds description in docblock.

* Fix exception handling in TaskPluginTrait

Catches only ReflectionExceptions now, leaving out others for the Task
driver to access.

* Cleanup assert exception refs

Cleans up imports and docblocks.

* Improve ScheduleRunner documentation.

* Improve code style

Majorly fixes from the latest updates in Joomla's PHP CS Fixer config,

* Fix demo task form

* Update language file for `com_scheduler`

* Use output buffering for lazyCron to avoid dying

* Merge update SQL

* Update plgTaskCheckfiles

- Adds support for WEBP.
- Better format support while resizing.
- Minor refactoring and more informative logging.

* Update scheduleRunner docs

* Improve code quality for task unlocking

- Improved static analysis support and type-hinting.
- Fix usage of undefined variables.
- Add/modify comments and variable names.
- Update event names and interface for relevance.
- Improve docs in doc-blocks.
- Fix code-style.

* Fix com_scheduler, task plugin code-style

Fixes code-style with the updated php-cs-fixer config.

* Fix WebcronLinkField::getLayoutPaths()

The union operator... did not do the right job.

* Merge more update SQL

Missed one!

* Rename update SQL

Updates date signatures of update files to a fresher date.

* Make plgTaskCheckfiles logging translatable

Adds language constants for logging strings.

Refs: @PhilETaylor

* Update plgTaskRequests

- Add logging on exception.
- Improve variable naming/file write safety.
- Update language file.

Refs: @PhilETaylor

* Improve exception handling plgTaskCheckfiles

- Improves handling exceptions and failures.
- Adds more informative logging.

Refs: @PhilETaylor

* Update code-style and language

- Fixes some misc code-style, reverses regression.
- Adds language for some log.

* Fix installation and update SQL scripts

* Fix update SQL for PostgreSQL for the database checker

* Add new core extensions to the extensions helper

* Add auto-install SQL for plg_task_checkfiles

- Adds auto-install SQL for both installation and update.
- Also adds relevant entry to ExtensionHelper.

Refs: joomla-projects/soc21_website-cronjob#49 / @richard67

* Add DB column for cli exclusive tasks

- Adds new DB column `#__scheduler_tasks.cli_exclusive`, updating both
  install and update scripts. Also adds relevant index.

* Add support for CLI exclusive tasks

- Updates TaskModel::getTask() with an option to include/exclude
  CLI exclusives.
- Adds runtime check to Scheduler::runTask() so it now includes CLI
  exclusives only in a CLI context.

* Add comments, fix doc signatures + style

- Add comments to schedulerunner.
- Fix some type signatures in doc-blocks.
- Other minor style fixes.

* Fix get request response body

Shouldn't throw an undefined constant again.

* Add `Scheduler::run()` option for concurrency

- Scheduler::run() now uses an options array backed by the Symfony
  OptionsResolver.
- Offers a new option that allows for execution concurrency (this was
  specifically required by the CLI command).

* Update plgSystemSchedulerunner

Updates Schedulerunner for changes in Scheduler::run()

* Make `scheduler:run` safer

- Null safety against Tasks.
- More informative stderr log on lock acquisition failures.
- Now allows concurrency so Web doesn't block out CLI anymore (thanks
  to the updates in Scheduler::run()).

Refs: joomla/joomla-cms#35143#issuecomment-976391914
      / @alikon
      / @bembelimen

* Refactor `scheduler:state`

- Better (expectedly safer) flow of logic with attempts to get the
  logical/enumerated state from command mode and interactive modes.
- Terminate on invalid command invocation.
- Fix exit success message (did not show action).
- Better formatting of description, etc.
- Code-style fixes.

Refs: joomla/joomla-cms#35143#issuecomment-977608144
      / @alikon
      / @bembelimen

* Improve `scheduler:run` description style

Minor improvement to `scheduler:run` description for consistency.

* Add utilities, bugfix Task class

- Adds state enumerations and map.
- Adds basic static state and id validators.
- Fix use of un-imported Text class, $->getMessage() call.

* Improve `scheduler:state` command

- Better validation and improved consistency.
- Removes now redundant state enumerations, mapping and validators
  which the Task class offers.

* Add page reload after testing

* Code sniffer fixes

* Rename param for Scheduler::fetchTaskRecord()

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Benjamin Trenkle <benjamin.trenkle@wicked-software.de>
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Benjamin Trenkle <bembelimen@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
2021-11-26 12:42:10 +01:00
Benjamin Trenkle
16f3dc1b33
Merge branch '4.1-dev' of github.com:joomla/joomla-cms into 4.1-dev 2021-11-23 21:20:59 +01:00
Allon Moritz
379895ccd9
[4.1] Media webservice (#35788)
* [4.0] Notification icons (#34226)

* remove method allow parent to run (#34118)

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>

* [4.0] Changing title to tooltip for template preview (#33292)

* [4.0] Changing title to tooltip fpr template preview

* Update location path in description (#34238)

* Fix patterns field check when field empty and not required (#34124)

* [4.0] Finish transition from CSS classes "label-" to "alert-" for the pre-update check (#34227)

* [4.0] mod_popular with disabled hits (#34257)

* [4.0] mod_popular with disabled hits

When hits are disabled for articles it makes no sense to display the Most Read Articles module in the site or admin as the contents will never be updated.

This PR changes the output of the module so that instead of a list of non-updating articles a message is displayed.

* [4.0] Use MVCFactory to create model (#34092)

* Use MVCFactory to create models

* CS

* Fix row selecting, when module is disabled (#34273)

* Media web service implementation.

* Media web service implementation.

* Fix hard coded adapter name default.

* Fix missing url and tempUrl attributes in single item response.

* Remove useless comments.

* Replace 'PATH' with 'STRING' for cleaning of input parameters.

* Adds required parameter checks and removes global exception handling.

* Adds media web service specific language strings.

* Adds exception handling.

* Adds missing exception handler and fixes wrong path return value after move/rename.

* Use exception message as error title.

* Adds proper FileNotFound exception handling for GET requests.

* Fixes handling of status code.

* Fixes some types, formatting and similar stuff.

* Fixes yet another sloppy typo.

* restore file

* Fix some docs

* Adapter endpoint

* Add plugin to install file

* Add tests

* Update api/components/com_media/src/Helper/MediaHelper.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Helper/MediaHelper.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Model/MediaModel.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Model/MediumModel.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/View/Media/JsonapiView.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update libraries/src/Error/JsonApi/SaveExceptionHandler.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Controller/MediaController.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Controller/MediaController.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Model/AdaptersModel.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update api/components/com_media/src/Model/MediaModel.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* docs

* Update api/components/com_media/src/View/Media/JsonapiView.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* int

* cs

* cs

* more cleanup

* tabs

* restore

* Test all endpoints

* Update api/components/com_media/src/Model/MediaModel.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Hardening

* Tests fix for drone

* Update Api.php

* Create directory in test with correct permissions

* Add more tests and remove static helper

* Update tests/Codeception/api/com_media/MediaCest.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* Update tests/Codeception/_support/Helper/Api.php

Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>

* cs

Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: infograf768 <infografjms@gmail.com>
Co-authored-by: Quy <quy@fluxbb.org>
Co-authored-by: Ruud <info@onlinecommunityhub.nl>
Co-authored-by: Tuan Pham Ngoc <github@joomdonation.com>
Co-authored-by: Fedir Zinchuk <getthesite@gmail.com>
Co-authored-by: Pieter-Jan de Vries <pieter@obix.nl>
2021-11-23 20:20:07 +01:00
Benjamin Trenkle
3ef1b15fe7
Bump to 4.1-alpha3 2021-11-22 21:33:38 +01:00
Benjamin Trenkle
f3efe182c1
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts:
#	administrator/language/en-GB/install.xml
#	administrator/language/en-GB/langmetadata.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	api/language/en-GB/install.xml
#	api/language/en-GB/langmetadata.xml
#	installation/language/en-GB/langmetadata.xml
#	language/en-GB/install.xml
#	language/en-GB/langmetadata.xml
#	libraries/src/Version.php
2021-11-15 14:45:13 +01:00
Khushi Rauniyar
0ae41f9869
Removed Complete & from open site and open admin button (#35988)
* Removed Complete & from open site and open admin button after installation

* Update joomla.ini

* Update joomla.ini
2021-11-13 23:49:21 +01:00
Benjamin Trenkle
4a114da2e2
Create release 4.1 Alpha2 2021-10-24 22:15:10 +02:00
wilsonge
b3de496a33
Bump to 4.0.5 development 2021-10-24 19:51:39 +01:00
Benjamin Trenkle
447c628bcb
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts:
#	.drone.yml
#	administrator/language/en-GB/install.xml
#	administrator/language/en-GB/langmetadata.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	api/language/en-GB/install.xml
#	api/language/en-GB/langmetadata.xml
#	installation/language/en-GB/langmetadata.xml
#	language/en-GB/install.xml
#	language/en-GB/langmetadata.xml
#	libraries/src/Version.php
2021-10-19 15:26:27 +02:00
wilsonge
6c0b201d35
Tag 4.0.4 RC 2021-10-17 18:02:43 +01:00
Phil E. Taylor
b1d6e3b749
Cleanup comments to comply with coding standards (#35141) 2021-10-07 16:32:42 +02:00