From 3d2b8aa4711d3e189ed940187b0062e2c46c2759 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 28 Jun 2026 19:07:10 +0000 Subject: [PATCH 1/3] feat: add license key warning on install/update --- source/script.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 source/script.php diff --git a/source/script.php b/source/script.php new file mode 100644 index 0000000..577b63b --- /dev/null +++ b/source/script.php @@ -0,0 +1,77 @@ +warnMissingLicenseKey(); + } + + /** + * Warn after install/update if no license key (dlid) is configured on the update site. + */ + private function warnMissingLicenseKey(): void + { + try + { + $db = Factory::getDbo(); + $app = Factory::getApplication(); + + $query = $db->getQuery(true) + ->select([$db->quoteName('update_site_id'), $db->quoteName('extra_query')]) + ->from($db->quoteName('#__update_sites')) + ->where('(' . $db->quoteName('name') . ' LIKE ' . $db->quote('%MokoSuiteTaxi%') + . ' OR ' . $db->quoteName('location') . ' LIKE ' . $db->quote('%MokoSuiteTaxi%') . ')') + ->setLimit(1); + $db->setQuery($query); + $site = $db->loadObject(); + + if ($site) + { + $extraQuery = (string) ($site->extra_query ?? ''); + + if (!empty($extraQuery) && strpos($extraQuery, 'dlid=') !== false) + { + parse_str($extraQuery, $parsed); + + if (!empty($parsed['dlid'])) + { + return; + } + } + + $editUrl = 'index.php?option=com_installer&task=updatesite.edit&update_site_id=' . (int) $site->update_site_id; + } + else + { + $editUrl = 'index.php?option=com_installer&view=updatesites'; + } + + $app->enqueueMessage( + 'Moko Consulting License Key Required — ' + . 'No download key is configured. Updates will not be available until a valid license key is entered. ' + . 'Enter License Key', + 'warning' + ); + } + catch (\Throwable $e) + { + // Silent — avoid breaking install if update_sites query fails + } + } +} -- 2.52.0 From d8af3c63da9399b0e7ff4b7d45073fee1ba2bcf8 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 28 Jun 2026 19:07:27 +0000 Subject: [PATCH 2/3] fix: add scriptfile and missing package entries to manifest --- source/pkg_mokosuitetaxi.xml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/source/pkg_mokosuitetaxi.xml b/source/pkg_mokosuitetaxi.xml index 2c1dfb5..abd3fa9 100644 --- a/source/pkg_mokosuitetaxi.xml +++ b/source/pkg_mokosuitetaxi.xml @@ -9,12 +9,37 @@ https://mokoconsulting.tech Copyright (C) 2026 Moko Consulting. All rights reserved. GNU General Public License version 3 or later; see LICENSE - Ride-hailing, dispatch, fleet management, fare zones, and driver scheduling + MokoSuite Taxi +

Layer 2 ride-hailing extension for the MokoSuite platform on Joomla 6.

+

Requires: MokoSuiteClient (Layer 0), MokoSuiteCRM (Layer 1)

+

Included Extensions

+ +

Features

+ +

Documentation | Support

+ ]]>
+ script.php 8.3 true plg_system_mokosuitetaxi.zip + com_mokosuitetaxi.zip + plg_webservices_mokosuitetaxi.zip https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteTaxi/updates.xml -- 2.52.0 From b0156864e5e5716e12075f8dee8d06a2336eaf70 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 28 Jun 2026 19:07:35 +0000 Subject: [PATCH 3/3] docs: update changelog with license warning and manifest fixes --- CHANGELOG.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d37e676..a842291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,33 @@ ## [Unreleased] ### Added +- **Package Script** -- license key warning on install/update when no DLID is configured - **Repository** -- initial repo creation with scaffolding - **System Plugin** -- Extension class, service provider, 6 helpers - **SQL Schema** -- 8 tables: vehicles, drivers, zones, fares, rides, ratings, dispatch, shifts -- **Admin Component** -- 6 views: dashboard, rides, vehicles, drivers, zones, fares +- **Admin Component** -- 6 views with ListModels: dashboard, rides, vehicles, drivers, zones, fares +- **Admin Templates** -- functional Joomla 6 list views with pagination and status badges - **Webservices Plugin** -- 7 API routes: rides, vehicles, drivers, zones, fares, dispatch, ratings - **Configuration** -- 16 settings across general, dispatch, fares, drivers, booking - **Access Control** -- 21 permissions for granular role-based access +- **Component Language Files** -- en-GB translations for menu, submenu, and extension manager +- **Wiki Documentation** -- 13 pages covering installation, configuration, database, ride management, ride lifecycle, dispatch engine, fare system, fare zones, fleet management, driver management, API reference, and permissions + +### Fixed +- **Package Manifest** -- added `` for package install script +- **Package Manifest** -- added component and webservices plugin to package files list (only system plugin was listed) +- **FareHelper** -- timezone-aware night surcharge using `Factory::getDate()` instead of `date('H')` +- **FareHelper** -- peak multiplier now gated by `peak_hours_start`/`peak_hours_end` instead of always applied +- **FareHelper** -- surcharges return value now conditionally includes night surcharge +- **FareHelper** -- replaced deprecated `bootPlugin()` with `PluginHelper::getPlugin()` + `Registry` +- **ZoneHelper** -- surge supply count now filtered to drivers within zone bounding box instead of global count +- **ZoneHelper** -- replaced deprecated `bootPlugin()` with `PluginHelper::getPlugin()` + `Registry` +- **ZoneHelper** -- radius fallback uses null coalesce (`??`) instead of falsy coalesce (`?:`) +- **RideHelper** -- `requestRide()` now detects pickup/dropoff zones via `ZoneHelper::detectZone()` +- **RideHelper** -- surge multiplier stored on ride at request time for use at completion +- **RideHelper** -- `completeRide()` now passes ride's pickup zone to `calculateFare()` +- **DispatchHelper** -- SQL bounding-box pre-filter before haversine distance calculation +- **DispatchHelper** -- `LIMIT` applied after distance filtering instead of before (was silently missing nearby drivers) +- **Component Manifest** -- added `access.xml`, `config.xml`, language folder, submenu entries +- **Component Provider** -- added `RouterFactoryInterface` registration for SEF URL support +- **Webservices Manifest** -- added description, author metadata -- 2.52.0