NextResetField now queries #__scheduler_tasks.next_execution directly
instead of using a stored param. Also shows last execution time.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When demo mode is turned on and saved, automatically creates a Joomla
Scheduler task for the demo reset using the configured cron schedule.
When demo mode is turned off, removes the scheduled task.
No manual task creation needed — just enable demo mode and save.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced selective table snapshot with full mysqldump/restore. This
ensures the site returns to an exact known state without the risk of
breaking the installation by restoring stale #__extensions or #__assets.
Uses mysqldump CLI when available, falls back to PHP-based dump.
Removed SnapshotTables field and table selection config — the entire
database is now captured and restored as one unit.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove extra [] from select name (caused nested array storage)
- Flatten nested arrays when reading back broken saved values
- NextResetField shows "Demo mode is off" when disabled
- Clear demo_next_reset param when demo mode is turned off
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HTMLHelper::_('select.optgroup') does not exist in Joomla 6. Replaced
with a plain HTML multi-select built manually with <optgroup> tags.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SnapshotTablesField now renders as a multi-select <select> with
optgroups (Content, Users, Menus, Modules, Assets, Other) instead
of individual checkboxes
- NextResetField displays the next reset as a formatted datetime in
the site's configured timezone with a relative badge (in X hours)
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- SnapshotTablesField: custom checkbox field that queries DB for all
tables, groups by type (content/users/menus/modules), pre-selects
important tables by default
- Media snapshots now support multiple directories (images, media)
with individual ZIPs per directory and legacy fallback
- Backward compatible with old boolean and textarea param formats
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Countdown now calculates next reset on the fly from cron schedule if
demo_next_reset is empty or in the past, instead of only on save
- Added 5min, 15min, 30min presets to the schedule dropdown for testing
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New CopyableTokenField renders a readonly monospace input with a Copy
button, matching Joomla's native API token UX in user profiles.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Joomla requires a <filename plugin="mokowaasdemo"> in the files block
to populate the element field in #__extensions. Without it, the DB
INSERT fails with "Field 'element' doesn't have a default value".
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cron-related comments contained */ in examples like "*/5" and "*/N"
which PHP interprets as closing the block comment, causing syntax errors.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The string "*/N" inside a docblock contains */ which PHP interprets as
the end of the block comment, making "N" an unexpected identifier.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The package manifest expects plg_task_mokowaasdemo.zip but the directory
was named plg_task_mokowaas, causing "Install path does not exist" during
package installation.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- updates.xml descriptions now use "Package - MokoWaaS" prefix (matches
MokoOnyx's "Template - MokoOnyx" convention)
- Added <php_minimum>8.1.0</php_minimum> to all update entries
- Fixed inconsistent quote style in dev channel entry
- Fixed language strings: "Moko WaaS" → "MokoWaaS" in all .ini files
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GET /?mokowaas=extensions and GET /api/v1/mokowaas/extensions returns
all installed extensions with version, enabled/protected/locked status,
and update server details. Supports ?type, ?search, and ?enabled filters.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- protectExtensions() now covers all MokoWaaS elements (package, system
plugin, component, webservices, task, perfectpublisher)
- enableUpdateServer() ensures #__update_sites stays enabled for MokoWaaS
- cleanupLegacyExtensions() removes old mokowaasbrand entries from
#__extensions and deletes plugins/system/mokowaasbrand/ from filesystem
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds ContentSyncService (sender) and ContentSyncReceiver (receiver) for
pushing articles, categories, menus, and modules from a dev site to
remote MokoWaaS sites. Content matched by alias (upsert pattern).
Category IDs in menu links encoded as {catid:path} tokens for portable
cross-site resolution.
Closes#89
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds Demo Mode feature for configuring sites as demo instances with
automatic periodic reset to a saved baseline. Includes DemoResetService
for DB table + media snapshots, frontend warning banner, REST and
query-string API endpoints, admin toggles, and a Joomla Scheduled Task
plugin (plg_task_mokowaasdemo) for automatic reset.
Closes#88
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds POST /api/v1/mokowaas/install to install Joomla extensions from a
remote ZIP URL via the REST API, enabling push-deploy from CI pipelines.
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>