Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a7b91bec4a | |||
| ba38ca3851 | |||
| c937eceeea | |||
| 7a6de2484f | |||
| 375f2c5cf3 | |||
| 8864a837b0 | |||
| b1329f9d28 | |||
| 8c06a177a9 | |||
| 440d4f54eb | |||
| b9ab9a37df | |||
| b4bad5f65e | |||
| 87459a47a1 | |||
| 35d7815063 | |||
| 9834fc7f59 | |||
| a1a10bc529 | |||
| 0c9e694ba4 | |||
| 2402b37e70 | |||
| a8df5103c7 | |||
| 164b269be9 | |||
| e973f0706c | |||
| e2b1d1618b | |||
| 6f3c9943ab | |||
| d221c298b4 | |||
| a50f232e64 | |||
| 7fb7be0664 | |||
| efa8c6bb96 | |||
| 95669e0ec1 | |||
| a97498f4c3 | |||
| aa0f399fa0 | |||
| 9caaa308e9 | |||
| ea63739791 | |||
| 1c12e4c9c1 | |||
| 78f24a33db | |||
| 2aedb20e06 | |||
| d2edbf527c | |||
| ce3e79ddea | |||
| 2b62a6f7f9 | |||
| 117958f557 | |||
| 33e806ff0c | |||
| 49b4c96d19 | |||
| 99f248c35f | |||
| bed64f3eed | |||
| 412f855606 | |||
| 2e746bbd95 | |||
| 73290772bd | |||
| e48da5f855 | |||
| a68caac701 | |||
| 7e3694d4f9 | |||
| 8c0c7d35fc | |||
| b22e82bdb1 | |||
| 40b15942bc |
@@ -8,7 +8,7 @@ contact_links:
|
|||||||
url: https://mokoconsulting.tech/
|
url: https://mokoconsulting.tech/
|
||||||
about: Get help or ask questions through our website
|
about: Get help or ask questions through our website
|
||||||
- name: 📚 MokoStandards Documentation
|
- name: 📚 MokoStandards Documentation
|
||||||
url: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
|
url: https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki
|
||||||
about: View our coding standards and best practices
|
about: View our coding standards and best practices
|
||||||
- name: 🔒 Report a Security Vulnerability
|
- name: 🔒 Report a Security Vulnerability
|
||||||
url: https://git.mokoconsulting.tech/mokoconsulting-tech/.github-private/security/advisories/new
|
url: https://git.mokoconsulting.tech/mokoconsulting-tech/.github-private/security/advisories/new
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ If you have ideas about how this could be implemented, share them here:
|
|||||||
Add any other context, mockups, or screenshots about the feature request here.
|
Add any other context, mockups, or screenshots about the feature request here.
|
||||||
|
|
||||||
## Relevant Standards
|
## Relevant Standards
|
||||||
Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
|
Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)?
|
||||||
- [ ] Accessibility (WCAG 2.1 AA)
|
- [ ] Accessibility (WCAG 2.1 AA)
|
||||||
- [ ] Localization (en_US/en_GB)
|
- [ ] Localization (en_US/en_GB)
|
||||||
- [ ] Security best practices
|
- [ ] Security best practices
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Use this template only for:
|
|||||||
<!-- Describe how this could be addressed -->
|
<!-- Describe how this could be addressed -->
|
||||||
|
|
||||||
## Standards Reference
|
## Standards Reference
|
||||||
Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)?
|
Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)?
|
||||||
- [ ] SPDX license identifiers
|
- [ ] SPDX license identifiers
|
||||||
- [ ] Secret management
|
- [ ] Secret management
|
||||||
- [ ] Dependency security
|
- [ ] Dependency security
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Release
|
# INGROUP: mokocli.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/auto-bump.yml
|
# PATH: /.mokogitea/workflows/auto-bump.yml
|
||||||
# VERSION: 09.02.00
|
# VERSION: 09.02.00
|
||||||
# BRIEF: Auto patch-bump version on every push to dev (skips merge commits)
|
# BRIEF: Auto patch-bump version on every push to dev (skips merge commits)
|
||||||
@@ -34,7 +34,8 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
!contains(github.event.head_commit.message, '[skip ci]') &&
|
!contains(github.event.head_commit.message, '[skip ci]') &&
|
||||||
!contains(github.event.head_commit.message, '[skip bump]') &&
|
!contains(github.event.head_commit.message, '[skip bump]') &&
|
||||||
!startsWith(github.event.head_commit.message, 'Merge pull request')
|
!startsWith(github.event.head_commit.message, 'Merge pull request') &&
|
||||||
|
!startsWith(github.event.repository.name, 'Template-')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -52,7 +53,7 @@ jobs:
|
|||||||
echo "MOKO_CLI=/opt/mokocli/cli" >> "$GITHUB_ENV"
|
echo "MOKO_CLI=/opt/mokocli/cli" >> "$GITHUB_ENV"
|
||||||
else
|
else
|
||||||
git clone --depth 1 --branch main --quiet \
|
git clone --depth 1 --branch main --quiet \
|
||||||
"https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/mokocli.git" \
|
"https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/MokoCLI.git" \
|
||||||
/tmp/mokocli
|
/tmp/mokocli
|
||||||
cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
|
cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
|
||||||
echo "MOKO_CLI=/tmp/mokocli/cli" >> "$GITHUB_ENV"
|
echo "MOKO_CLI=/tmp/mokocli/cli" >> "$GITHUB_ENV"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Release
|
# INGROUP: mokocli.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/universal/auto-release.yml.template
|
# PATH: /.mokogitea/workflows/auto-release.yml
|
||||||
# VERSION: 05.01.00
|
# VERSION: 05.01.00
|
||||||
# BRIEF: Universal build & release � detects platform from manifest.xml
|
# BRIEF: Universal build & release � detects platform from manifest.xml
|
||||||
#
|
#
|
||||||
@@ -64,10 +64,14 @@ jobs:
|
|||||||
promote-rc:
|
promote-rc:
|
||||||
name: Promote to RC
|
name: Promote to RC
|
||||||
runs-on: release
|
runs-on: release
|
||||||
|
# Skip on template repos (Template-*) — they scaffold other repos and do not release.
|
||||||
if: >-
|
if: >-
|
||||||
(github.event.action == 'opened' && github.event.pull_request.merged != true) ||
|
!startsWith(github.event.repository.name, 'Template-') &&
|
||||||
(github.event.action == 'synchronize' && github.event.pull_request.merged != true) ||
|
(
|
||||||
(github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc')
|
(github.event.action == 'opened' && github.event.pull_request.merged != true) ||
|
||||||
|
(github.event.action == 'synchronize' && github.event.pull_request.merged != true) ||
|
||||||
|
(github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc')
|
||||||
|
)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -91,7 +95,7 @@ jobs:
|
|||||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
rm -rf /tmp/mokocli
|
rm -rf /tmp/mokocli
|
||||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
||||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||||
cd /tmp/mokocli
|
cd /tmp/mokocli
|
||||||
composer install --no-dev --no-interaction --quiet
|
composer install --no-dev --no-interaction --quiet
|
||||||
@@ -100,18 +104,46 @@ jobs:
|
|||||||
|
|
||||||
- name: Rename branch to rc
|
- name: Rename branch to rc
|
||||||
run: |
|
run: |
|
||||||
php ${MOKO_CLI}/branch_rename.php \
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
--from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \
|
AUTH="Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
--token "${{ secrets.MOKOGITEA_TOKEN }}" \
|
FROM="${{ github.event.pull_request.head.ref || 'dev' }}"
|
||||||
--api-base "${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \
|
PR="${{ github.event.pull_request.number }}"
|
||||||
--pr "${{ github.event.pull_request.number }}"
|
|
||||||
|
# Resolve the source branch HEAD commit.
|
||||||
|
SRC_JSON=$(curl -sf -H "$AUTH" "${API_BASE}/branches/${FROM}") \
|
||||||
|
|| { echo "::error::Source branch ${FROM} not found"; exit 1; }
|
||||||
|
SRC_SHA=$(printf '%s' "$SRC_JSON" | python3 -c "import sys, json; print(json.load(sys.stdin)['commit']['id'])" 2>/dev/null || true)
|
||||||
|
[ -n "$SRC_SHA" ] || { echo "::error::Could not resolve HEAD of ${FROM}"; exit 1; }
|
||||||
|
|
||||||
|
# Point rc at the source commit. If rc already exists (a protected branch that
|
||||||
|
# cannot be deleted), force-update its ref in place instead of delete+recreate:
|
||||||
|
# deleting a protected branch fails, which then makes the recreate return HTTP 409.
|
||||||
|
if curl -sf -o /dev/null -H "$AUTH" "${API_BASE}/branches/rc"; then
|
||||||
|
echo "rc exists - force-updating to ${FROM} (${SRC_SHA})"
|
||||||
|
curl -sf -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
|
||||||
|
"${API_BASE}/git/refs/heads/rc" -d "{\"sha\":\"${SRC_SHA}\",\"force\":true}" \
|
||||||
|
|| { echo "::error::Failed to force-update rc (CI token needs force-push on the protected rc branch)"; exit 1; }
|
||||||
|
else
|
||||||
|
echo "Creating rc from ${FROM}"
|
||||||
|
curl -sf -X POST -H "$AUTH" -H "Content-Type: application/json" \
|
||||||
|
"${API_BASE}/branches" -d "{\"new_branch_name\":\"rc\",\"old_branch_name\":\"${FROM}\"}" \
|
||||||
|
|| { echo "::error::Failed to create rc from ${FROM}"; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Repoint the PR at rc, then delete the old source branch (non-fatal).
|
||||||
|
if [ -n "$PR" ]; then
|
||||||
|
curl -s -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
|
||||||
|
"${API_BASE}/pulls/${PR}" -d '{"head":"rc"}' >/dev/null || true
|
||||||
|
fi
|
||||||
|
curl -s -X DELETE -H "$AUTH" "${API_BASE}/branches/${FROM}" >/dev/null || true
|
||||||
|
echo "Renamed ${FROM} -> rc"
|
||||||
|
|
||||||
- name: Checkout rc and configure git
|
- name: Checkout rc and configure git
|
||||||
run: |
|
run: |
|
||||||
git fetch origin rc
|
git fetch origin rc
|
||||||
git checkout rc
|
git checkout rc
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "mokogitea-actions[bot]"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
|
|
||||||
- name: Publish RC release
|
- name: Publish RC release
|
||||||
@@ -164,9 +196,13 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
name: Build & Release Pipeline
|
name: Build & Release Pipeline
|
||||||
runs-on: release
|
runs-on: release
|
||||||
|
# Skip on template repos (Template-*) — they scaffold other repos and do not release.
|
||||||
if: >-
|
if: >-
|
||||||
github.event.pull_request.merged == true ||
|
!startsWith(github.event.repository.name, 'Template-') &&
|
||||||
(github.event_name == 'workflow_dispatch' && inputs.action != 'promote-rc')
|
(
|
||||||
|
github.event.pull_request.merged == true ||
|
||||||
|
(github.event_name == 'workflow_dispatch' && inputs.action != 'promote-rc')
|
||||||
|
)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -178,8 +214,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure git for bot pushes
|
- name: Configure git for bot pushes
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "mokogitea-actions[bot]"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
|
|
||||||
- name: Check for merge conflict markers
|
- name: Check for merge conflict markers
|
||||||
@@ -210,7 +246,7 @@ jobs:
|
|||||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
rm -rf /tmp/mokocli
|
rm -rf /tmp/mokocli
|
||||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
||||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||||
cd /tmp/mokocli
|
cd /tmp/mokocli
|
||||||
composer install --no-dev --no-interaction --quiet
|
composer install --no-dev --no-interaction --quiet
|
||||||
@@ -390,7 +426,7 @@ jobs:
|
|||||||
&& echo "main branch pushed to GitHub mirror" \
|
&& echo "main branch pushed to GitHub mirror" \
|
||||||
|| echo "WARNING: GitHub mirror push failed"
|
|| echo "WARNING: GitHub mirror push failed"
|
||||||
|
|
||||||
- name: "Step 11: Delete rc branch and recreate dev from main"
|
- name: "Step 11: Delete rc branch (dev reset moved to cascade-dev.yml)"
|
||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
@@ -402,17 +438,9 @@ jobs:
|
|||||||
"${API_BASE}/branches/rc" 2>/dev/null \
|
"${API_BASE}/branches/rc" 2>/dev/null \
|
||||||
&& echo "Deleted rc branch" || echo "rc branch not found"
|
&& echo "Deleted rc branch" || echo "rc branch not found"
|
||||||
|
|
||||||
# Delete dev branch
|
# dev is reset from main by the dedicated "Cascade Main -> Dev" workflow
|
||||||
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \
|
# (cascade-dev.yml), which runs after this release completes.
|
||||||
"${API_BASE}/branches/dev" 2>/dev/null && echo "Deleted dev branch"
|
echo "rc cleaned; dev reset handled by cascade-dev.yml" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
# Recreate dev from main (now includes version bump + changelog promotion)
|
|
||||||
curl -sf -X POST -H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"${API_BASE}/branches" \
|
|
||||||
-d '{"new_branch_name":"dev","old_branch_name":"main"}' 2>/dev/null && echo "Recreated dev from main"
|
|
||||||
|
|
||||||
echo "Pre-release branches cleaned, dev reset from main" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
- name: "Step 12: Create version branch from main"
|
- name: "Step 12: Create version branch from main"
|
||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Universal
|
# INGROUP: MokoStandards.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/branch-cleanup.yml
|
# PATH: /.mokogitea/workflows/branch-cleanup.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Delete feature branches after PR merge
|
# BRIEF: Delete feature branches after PR merge
|
||||||
@@ -33,7 +33,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
BRANCH="${{ github.event.pull_request.head.ref }}"
|
BRANCH="${{ github.event.pull_request.head.ref }}"
|
||||||
API="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}/api/v1/repos/${{ github.repository }}/branches"
|
API="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}/api/v1/repos/${{ github.repository }}/branches"
|
||||||
ENCODED=$(php -r "echo rawurlencode('${BRANCH}');")
|
# URL-encode the branch name's slashes (no PHP dependency on the runner)
|
||||||
|
ENCODED=$(printf '%s' "${BRANCH}" | sed 's|/|%2F|g')
|
||||||
|
|
||||||
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
|
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
|
||||||
-H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \
|
||||||
|
|||||||
@@ -1,10 +1,106 @@
|
|||||||
# DISABLED — auto-release Step 11 recreates dev from main after every release.
|
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||||
# Cascade-dev is redundant and causes version conflicts when both main and dev
|
#
|
||||||
# have different version numbers in templateDetails.xml / manifest.xml.
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
name: "Cascade Main → Dev (DISABLED)"
|
#
|
||||||
on: workflow_dispatch
|
# FILE INFORMATION
|
||||||
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
|
# INGROUP: MokoStandards.Cascade
|
||||||
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
|
# PATH: /.mokogitea/workflows/cascade-dev.yml
|
||||||
|
# VERSION: 02.00.00
|
||||||
|
# BRIEF: Cascade main -> dev via PR; auto-merge only if conflict-free, else notify
|
||||||
|
|
||||||
|
name: "Cascade Main -> Dev"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
# ntfy destination is configured via repo or org variables (org vars are inherited).
|
||||||
|
NTFY_URL: ${{ vars.NTFY_URL || 'https://ntfy.mokoconsulting.tech' }}
|
||||||
|
NTFY_TOPIC: ${{ vars.CASCADE_NTFY_TOPIC || vars.NTFY_TOPIC || 'gitea-releases' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
noop:
|
cascade:
|
||||||
|
name: Cascade main -> dev
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Cascade disabled — auto-release handles dev recreation"
|
- name: Open main -> dev PR (auto-merge if clean, else notify)
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
API="${MOKOGITEA_URL}/api/v1/repos/${REPO}"
|
||||||
|
AUTH="Authorization: token ${TOKEN}"
|
||||||
|
jqnum() { python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('$1',''))" 2>/dev/null; }
|
||||||
|
|
||||||
|
# 0. dev must exist
|
||||||
|
if ! curl -sf -H "$AUTH" "${API}/branches/dev" >/dev/null 2>&1; then
|
||||||
|
echo "No dev branch - nothing to cascade."; exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 1. is main ahead of dev?
|
||||||
|
AHEAD=$(curl -sf -H "$AUTH" "${API}/compare/dev...main" \
|
||||||
|
| python3 -c "import sys,json; print(json.load(sys.stdin).get('total_commits',0))" 2>/dev/null || echo 0)
|
||||||
|
if [ "${AHEAD:-0}" -eq 0 ]; then
|
||||||
|
echo "dev already up to date with main."; exit 0
|
||||||
|
fi
|
||||||
|
echo "main is ${AHEAD} commit(s) ahead of dev."
|
||||||
|
|
||||||
|
# 2. reuse an open main->dev PR, else create one
|
||||||
|
PR=$(curl -sf -H "$AUTH" "${API}/pulls?state=open&base=dev" \
|
||||||
|
| python3 -c "import sys,json; d=json.load(sys.stdin); print(next((str(p['number']) for p in d if p.get('head',{}).get('ref')=='main'), ''))" 2>/dev/null || echo "")
|
||||||
|
if [ -z "$PR" ]; then
|
||||||
|
RESP=$(curl -s -H "$AUTH" -H "Content-Type: application/json" -X POST "${API}/pulls" \
|
||||||
|
-d '{"head":"main","base":"dev","title":"chore(sync): cascade main -> dev","body":"Automated cascade of main into dev. Auto-merges only if conflict-free; otherwise left open for manual resolution."}')
|
||||||
|
PR=$(printf '%s' "$RESP" | jqnum number)
|
||||||
|
if [ -z "$PR" ]; then
|
||||||
|
echo "::warning::Could not open cascade PR: $RESP"; exit 0
|
||||||
|
fi
|
||||||
|
echo "Opened cascade PR #${PR}"
|
||||||
|
else
|
||||||
|
echo "Reusing open cascade PR #${PR}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3. wait for MokoGitea to compute mergeability (conflict detection)
|
||||||
|
MERGEABLE=""
|
||||||
|
for _ in 1 2 3 4 5 6; do
|
||||||
|
MERGEABLE=$(curl -sf -H "$AUTH" "${API}/pulls/${PR}" | jqnum mergeable)
|
||||||
|
case "$MERGEABLE" in True|False) break ;; esac
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
echo "mergeable=${MERGEABLE}"
|
||||||
|
|
||||||
|
notify() {
|
||||||
|
curl -sS \
|
||||||
|
-H "Title: ${REPO}: dev cascade needs manual merge" \
|
||||||
|
-H "Tags: warning,twisted_rightwards_arrows" \
|
||||||
|
-H "Priority: high" \
|
||||||
|
-H "Click: ${MOKOGITEA_URL}/${REPO}/pulls/${PR}" \
|
||||||
|
-d "main -> dev cascade PR #${PR} $1 It was NOT auto-merged; resolve it manually." \
|
||||||
|
"${NTFY_URL}/${NTFY_TOPIC}" || true
|
||||||
|
}
|
||||||
|
|
||||||
|
# 4. auto-merge only if conflict-free; otherwise notify
|
||||||
|
if [ "$MERGEABLE" = "True" ]; then
|
||||||
|
CODE=$(curl -s -o /tmp/merge.json -w "%{http_code}" -H "$AUTH" -H "Content-Type: application/json" \
|
||||||
|
-X POST "${API}/pulls/${PR}/merge" -d '{"Do":"merge","merge_when_checks_succeed":true}')
|
||||||
|
if [ "$CODE" -ge 200 ] && [ "$CODE" -lt 300 ]; then
|
||||||
|
echo "Cascade PR #${PR} merged (or scheduled to merge when checks pass)."
|
||||||
|
else
|
||||||
|
echo "::warning::Auto-merge returned HTTP ${CODE}: $(cat /tmp/merge.json)"
|
||||||
|
notify "could not be auto-merged (HTTP ${CODE})."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "::warning::Cascade PR #${PR} has conflicts (mergeable=${MERGEABLE}); sending notification."
|
||||||
|
notify "has conflicts and cannot be merged automatically."
|
||||||
|
fi
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.CI
|
# INGROUP: MokoStandards.CI
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.gitea/workflows/ci-generic.yml
|
# PATH: /.mokogitea/workflows/ci-generic.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: CI pipeline — lint, validate, and test for generic projects (PHP + Node.js)
|
# BRIEF: CI pipeline — lint, validate, and test for generic projects (PHP + Node.js)
|
||||||
|
|
||||||
@@ -32,6 +32,8 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
name: Lint & Validate
|
name: Lint & Validate
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Skip on template repos (Template-*) — they hold placeholder scaffolding, not buildable source.
|
||||||
|
if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -130,6 +132,9 @@ jobs:
|
|||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint
|
needs: lint
|
||||||
|
# Run only when lint succeeded; always() forces evaluation so a skipped
|
||||||
|
# lint (e.g. template repos) skips this job cleanly instead of hanging.
|
||||||
|
if: ${{ always() && needs.lint.result == 'success' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Universal
|
# INGROUP: mokocli.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/ci-issue-reporter.yml
|
# PATH: /.mokogitea/workflows/ci-issue-reporter.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Reusable workflow — creates/updates a Gitea issue when a CI gate fails.
|
# BRIEF: Reusable workflow — creates/updates a MokoGitea issue when a CI gate fails.
|
||||||
# Clones MokoCLI and runs cli/ci_issue_reporter.sh.
|
# Clones MokoCLI and runs cli/ci_issue_reporter.sh.
|
||||||
|
|
||||||
name: "Universal: CI Issue Reporter"
|
name: "Universal: CI Issue Reporter"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Maintenance
|
# INGROUP: MokoStandards.Maintenance
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
|
||||||
# PATH: /.gitea/workflows/cleanup.yml
|
# PATH: /.mokogitea/workflows/cleanup.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Scheduled cleanup — delete merged branches and old workflow runs
|
# BRIEF: Scheduled cleanup — delete merged branches and old workflow runs
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
for BRANCH in $BRANCHES; do
|
for BRANCH in $BRANCHES; do
|
||||||
# Skip protected branches
|
# Skip protected branches
|
||||||
case "$BRANCH" in
|
case "$BRANCH" in
|
||||||
main|master|develop|release/*|hotfix/*) continue ;;
|
main|master|dev|develop|rc|beta|alpha|release|release/*|production|stable|staging|hotfix/*|version/*) continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check if branch is merged into main
|
# Check if branch is merged into main
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Security
|
# INGROUP: MokoStandards.Security
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
|
||||||
# PATH: /templates/workflows/gitleaks.yml.template
|
# PATH: /.mokogitea/workflows/gitleaks.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens
|
# BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Automation
|
# INGROUP: mokocli.Automation
|
||||||
# VERSION: 01.02.30
|
# VERSION: 01.02.01
|
||||||
# BRIEF: Auto-create feature branch when an issue is opened
|
# BRIEF: Auto-create feature branch when an issue is opened
|
||||||
|
|
||||||
name: "Universal: Issue Branch"
|
name: "Universal: Issue Branch"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: MokoStandards.Notifications
|
# INGROUP: MokoStandards.Notifications
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
|
||||||
# PATH: /.gitea/workflows/notify.yml
|
# PATH: /.mokogitea/workflows/notify.yml
|
||||||
# VERSION: 01.00.00
|
# VERSION: 01.00.00
|
||||||
# BRIEF: Push notifications via ntfy on release success or workflow failure
|
# BRIEF: Push notifications via ntfy on release success or workflow failure
|
||||||
|
|
||||||
@@ -15,9 +15,9 @@ name: "Universal: Notifications"
|
|||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows:
|
workflows:
|
||||||
- "Joomla Build & Release"
|
- "Universal: Build & Release"
|
||||||
- "Joomla Extension CI"
|
- "Joomla: Extension CI"
|
||||||
- "Deploy"
|
- "Generic: Project CI"
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: moko-platform.CI
|
# INGROUP: mokocli.CI
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/universal/pr-check.yml.template
|
# PATH: /.mokogitea/workflows/pr-check.yml
|
||||||
# VERSION: 09.23.00
|
# VERSION: 09.23.00
|
||||||
# BRIEF: PR gate — branch policy + code validation before merge
|
# BRIEF: PR gate — branch policy + code validation before merge
|
||||||
|
|
||||||
@@ -47,15 +47,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
fix/*|bugfix/*)
|
fix/*|bugfix/*)
|
||||||
if [ "$BASE" != "dev" ]; then
|
if [ "$BASE" != "dev" ] && [ "$BASE" != "main" ]; then
|
||||||
ALLOWED=false
|
ALLOWED=false
|
||||||
REASON="Fix branches must target 'dev', not '${BASE}'"
|
REASON="Fix branches must target 'dev' or 'main', not '${BASE}'"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
patch/*)
|
patch/*)
|
||||||
if [ "$BASE" != "dev" ] && [ "$BASE" != "rc" ]; then
|
if [ "$BASE" != "dev" ] && [ "$BASE" != "rc" ] && [ "$BASE" != "main" ]; then
|
||||||
ALLOWED=false
|
ALLOWED=false
|
||||||
REASON="Patch branches must target 'dev' or 'rc', not '${BASE}'"
|
REASON="Patch branches must target 'dev', 'rc', or 'main', not '${BASE}'"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
hotfix/*)
|
hotfix/*)
|
||||||
@@ -86,7 +86,8 @@ jobs:
|
|||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "### Allowed merge paths:" >> $GITHUB_STEP_SUMMARY
|
echo "### Allowed merge paths:" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- \`feature/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
|
echo "- \`feature/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- \`fix/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
|
echo "- \`fix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- \`patch/*\` → \`dev\`, \`rc\`, or \`main\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- \`hotfix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY
|
echo "- \`hotfix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- \`dev\` → \`main\`" >> $GITHUB_STEP_SUMMARY
|
echo "- \`dev\` → \`main\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- \`rc/*\` → \`main\`" >> $GITHUB_STEP_SUMMARY
|
echo "- \`rc/*\` → \`main\`" >> $GITHUB_STEP_SUMMARY
|
||||||
@@ -96,6 +97,80 @@ jobs:
|
|||||||
echo "Branch policy: OK (${HEAD} → ${BASE})"
|
echo "Branch policy: OK (${HEAD} → ${BASE})"
|
||||||
echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY
|
echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
# ── Docs Update Gate (main PRs) ─────────────────────────────────────────
|
||||||
|
require-docs:
|
||||||
|
name: Require Docs Update
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Enforce only on PRs merging into main: README.md + CHANGELOG.md must both be updated.
|
||||||
|
if: ${{ github.base_ref == 'main' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Require README.md and CHANGELOG.md in the PR diff
|
||||||
|
run: |
|
||||||
|
BASE="${{ github.event.pull_request.base.sha }}"
|
||||||
|
HEAD="${{ github.event.pull_request.head.sha }}"
|
||||||
|
CHANGED="$(git diff --name-only "$BASE" "$HEAD" 2>/dev/null || true)"
|
||||||
|
if [ -z "$CHANGED" ]; then
|
||||||
|
git fetch -q origin "${{ github.base_ref }}" 2>/dev/null || true
|
||||||
|
CHANGED="$(git diff --name-only "origin/${{ github.base_ref }}...HEAD" 2>/dev/null || true)"
|
||||||
|
fi
|
||||||
|
echo "Changed files in PR:"
|
||||||
|
echo "$CHANGED"
|
||||||
|
MISSING=""
|
||||||
|
echo "$CHANGED" | grep -qxE 'README\.md' || MISSING="README.md"
|
||||||
|
echo "$CHANGED" | grep -qxE 'CHANGELOG\.md' || MISSING="${MISSING:+$MISSING, }CHANGELOG.md"
|
||||||
|
if [ -n "$MISSING" ]; then
|
||||||
|
echo "::error::PRs into main must update: ${MISSING}"
|
||||||
|
{
|
||||||
|
echo "## Docs Update Required"
|
||||||
|
echo ""
|
||||||
|
echo "PRs merging into \`main\` must update both **README.md** and **CHANGELOG.md**."
|
||||||
|
echo ""
|
||||||
|
echo "Not updated in this PR: **${MISSING}**"
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Docs update present (README.md + CHANGELOG.md)"
|
||||||
|
echo "## Docs Update: Passed" >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
|
# ── Wiki Update Reminder (main PRs, non-blocking) ───────────────────────
|
||||||
|
wiki-reminder:
|
||||||
|
name: Wiki Update Reminder
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.base_ref == 'main' }}
|
||||||
|
steps:
|
||||||
|
- name: Remind to update the wiki
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
SERVER: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
PR: ${{ github.event.pull_request.number }}
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
{
|
||||||
|
echo "## Wiki Update Reminder"
|
||||||
|
echo ""
|
||||||
|
echo "Docs are **wiki-first** at MokoConsulting. If this change affects behavior, usage, configuration, or standards, update the repo wiki:"
|
||||||
|
echo ""
|
||||||
|
echo "- ${SERVER}/${REPO}/wiki"
|
||||||
|
echo ""
|
||||||
|
echo "_Non-blocking reminder._"
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
# Post a single PR comment (idempotent via hidden marker); best-effort, never fails.
|
||||||
|
API="${SERVER}/api/v1/repos/${REPO}/issues/${PR}/comments"
|
||||||
|
if [ -n "${TOKEN:-}" ] && [ -n "${PR:-}" ]; then
|
||||||
|
existing="$(curl -sf -H "Authorization: token ${TOKEN}" "$API" 2>/dev/null | grep -c 'wiki-reminder' || true)"
|
||||||
|
if [ "${existing:-0}" -eq 0 ]; then
|
||||||
|
curl -sf -H "Authorization: token ${TOKEN}" -H "Content-Type: application/json" -X POST "$API" \
|
||||||
|
-d '{"body":"<!-- wiki-reminder -->\n\n**Wiki reminder:** docs are wiki-first -- if this PR changes behavior, usage, config, or standards, please update the repo wiki before/after merge. _(non-blocking)_"}' >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Wiki reminder emitted (non-blocking)."
|
||||||
|
|
||||||
# ── Secret Scanning ──────────────────────────────────────────────────
|
# ── Secret Scanning ──────────────────────────────────────────────────
|
||||||
gitleaks:
|
gitleaks:
|
||||||
name: Secret Scan
|
name: Secret Scan
|
||||||
@@ -126,6 +201,8 @@ jobs:
|
|||||||
validate:
|
validate:
|
||||||
name: Validate PR
|
name: Validate PR
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Skip on template repos (Template-*) — no real manifest/source/changelog to validate.
|
||||||
|
if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -147,11 +224,12 @@ jobs:
|
|||||||
- name: Detect platform
|
- name: Detect platform
|
||||||
id: platform
|
id: platform
|
||||||
run: |
|
run: |
|
||||||
# Read platform from XML manifest (<platform> tag) or plain text fallback
|
# Platform comes from the MokoGitea metadata API (public GET); manifest.xml is no longer used.
|
||||||
PLATFORM=$(sed -n 's/.*<platform>\([^<]*\)<\/platform>.*/\1/p' .mokogitea/manifest.xml 2>/dev/null | head -1)
|
API="${GITHUB_SERVER_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${GITHUB_REPOSITORY}/metadata"
|
||||||
[ -z "$PLATFORM" ] && PLATFORM=$(cat .mokogitea/manifest.xml 2>/dev/null | tr -d '[:space:]')
|
PLATFORM="$(curl -sf "$API" 2>/dev/null | python3 -c "import sys, json; print(json.load(sys.stdin).get('platform') or '')" 2>/dev/null || true)"
|
||||||
[ -z "$PLATFORM" ] && PLATFORM="generic"
|
[ -z "$PLATFORM" ] && PLATFORM="generic"
|
||||||
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
|
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Detected platform: $PLATFORM"
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr'
|
if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr'
|
||||||
@@ -272,7 +350,7 @@ jobs:
|
|||||||
joomla)
|
joomla)
|
||||||
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
|
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
|
||||||
if [ -z "$MANIFEST" ]; then
|
if [ -z "$MANIFEST" ]; then
|
||||||
echo "::warning::No Joomla manifest found (WaaS site)"
|
echo "::warning::No Joomla manifest found (MokoSuite site)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "Manifest: ${MANIFEST}"
|
echo "Manifest: ${MANIFEST}"
|
||||||
@@ -285,7 +363,7 @@ jobs:
|
|||||||
# Block legacy raw/branch update server URLs on MokoGitea
|
# Block legacy raw/branch update server URLs on MokoGitea
|
||||||
RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogitea\|git\.mokoconsulting\.tech' || true)
|
RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogitea\|git\.mokoconsulting\.tech' || true)
|
||||||
if [ -n "$RAW_URLS" ]; then
|
if [ -n "$RAW_URLS" ]; then
|
||||||
echo "::error::Manifest contains legacy raw/branch update server URL on MokoGitea. Use the Gitea Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)"
|
echo "::error::Manifest contains legacy raw/branch update server URL on MokoGitea. Use the MokoGitea Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)"
|
||||||
echo "$RAW_URLS"
|
echo "$RAW_URLS"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -492,6 +570,9 @@ jobs:
|
|||||||
name: Build RC Package
|
name: Build RC Package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [branch-policy, validate]
|
needs: [branch-policy, validate]
|
||||||
|
# Run only when both gates succeeded; always() forces evaluation so a skipped
|
||||||
|
# validate (e.g. template repos) skips this job cleanly instead of hanging.
|
||||||
|
if: ${{ always() && needs.branch-policy.result == 'success' && needs.validate.result == 'success' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger RC pre-release
|
- name: Trigger RC pre-release
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Release
|
# INGROUP: mokocli.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/universal/pre-release.yml.template
|
# PATH: /.mokogitea/workflows/pre-release.yml
|
||||||
# VERSION: 05.02.00
|
# VERSION: 05.02.00
|
||||||
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
|
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
|
||||||
|
|
||||||
@@ -48,9 +48,13 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: "Build Pre-Release (${{ inputs.stability || github.ref_name }})"
|
name: "Build Pre-Release (${{ inputs.stability || github.ref_name }})"
|
||||||
runs-on: release
|
runs-on: release
|
||||||
|
# Skip on template repos (Template-*) — they scaffold other repos and do not release.
|
||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'workflow_dispatch' ||
|
!startsWith(github.event.repository.name, 'Template-') &&
|
||||||
github.event_name == 'push'
|
(
|
||||||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
|
github.event_name == 'push'
|
||||||
|
)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -80,7 +84,7 @@ jobs:
|
|||||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
rm -rf /tmp/mokocli
|
rm -rf /tmp/mokocli
|
||||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
||||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||||
cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
|
cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
|
||||||
echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV
|
echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV
|
||||||
@@ -152,8 +156,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Commit version bump
|
# Commit version bump
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "mokogitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "mokogitea-actions[bot]"
|
||||||
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
git add -A
|
git add -A
|
||||||
git diff --cached --quiet || {
|
git diff --cached --quiet || {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Universal
|
# INGROUP: mokocli.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/rc-revert.yml
|
# PATH: /.mokogitea/workflows/rc-revert.yml
|
||||||
# VERSION: 09.23.00
|
# VERSION: 09.23.00
|
||||||
# BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge
|
# BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge
|
||||||
@@ -25,7 +25,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >-
|
if: >-
|
||||||
github.event.pull_request.merged == false &&
|
github.event.pull_request.merged == false &&
|
||||||
startsWith(github.event.pull_request.head.ref, 'rc/')
|
startsWith(github.event.pull_request.head.ref, 'rc/') &&
|
||||||
|
!startsWith(github.event.repository.name, 'Template-')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Rename branch
|
- name: Rename branch
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Validation
|
# INGROUP: mokocli.Validation
|
||||||
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /templates/workflows/joomla/repo_health.yml.template
|
# PATH: /.mokogitea/workflows/repo-health.yml
|
||||||
# VERSION: 09.23.00
|
# VERSION: 09.23.00
|
||||||
# BRIEF: Enforces repository guardrails by validating scripts governance, tooling availability, and core repository health artifacts.
|
# BRIEF: Enforces repository guardrails by validating scripts governance, tooling availability, and core repository health artifacts.
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
@@ -88,7 +88,7 @@ jobs:
|
|||||||
|
|
||||||
# Hardcoded authorized users — always allowed
|
# Hardcoded authorized users — always allowed
|
||||||
case "$ACTOR" in
|
case "$ACTOR" in
|
||||||
jmiller|gitea-actions[bot])
|
jmiller|mokogitea-actions[bot])
|
||||||
ALLOWED=true
|
ALLOWED=true
|
||||||
PERMISSION=admin
|
PERMISSION=admin
|
||||||
METHOD="hardcoded allowlist"
|
METHOD="hardcoded allowlist"
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
name: Sync Workflows to Repos
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- '.mokogitea/workflows/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ startsWith(github.event.repository.name, 'Template-') }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout mokocli
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: MokoConsulting/MokoCLI
|
||||||
|
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/raw/branch/main/actions/setup-php@v1
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-dev --no-interaction
|
||||||
|
|
||||||
|
- name: Sync workflows to generic repos
|
||||||
|
run: php automation/bulk_sync.php --platform generic --org MokoConsulting --workflows-only --auto-merge --token "${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
|
env:
|
||||||
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow.Template
|
# DEFGROUP: MokoGitea.Workflow.Template
|
||||||
# INGROUP: MokoStandards.CI
|
# INGROUP: MokoStandards.CI
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
||||||
# PATH: /.mokogitea/workflows/version-set.yml
|
# PATH: /.mokogitea/workflows/version-set.yml
|
||||||
@@ -34,6 +34,7 @@ jobs:
|
|||||||
set-version:
|
set-version:
|
||||||
name: Set Version to ${{ inputs.version }}
|
name: Set Version to ${{ inputs.version }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !startsWith(github.event.repository.name, 'Template-') }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Validate version format
|
- name: Validate version format
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: MokoGitea.Workflow
|
||||||
# INGROUP: mokocli.Universal
|
# INGROUP: mokocli.Universal
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
|
||||||
# PATH: /.mokogitea/workflows/workflow-sync-trigger.yml
|
# PATH: /.mokogitea/workflows/workflow-sync-trigger.yml
|
||||||
# VERSION: 01.01.00
|
# VERSION: 01.01.00
|
||||||
# BRIEF: Trigger workflow sync to live repos when a PR is merged to main
|
# BRIEF: Trigger workflow sync to live repos when a PR is merged to main
|
||||||
@@ -27,9 +27,10 @@ jobs:
|
|||||||
name: Sync workflows to live repos
|
name: Sync workflows to live repos
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'workflow_dispatch' ||
|
startsWith(github.event.repository.name, 'Template-') &&
|
||||||
|
(github.event_name == 'workflow_dispatch' ||
|
||||||
(github.event.pull_request.merged == true &&
|
(github.event.pull_request.merged == true &&
|
||||||
!contains(github.event.pull_request.title, '[skip sync]'))
|
!contains(github.event.pull_request.title, '[skip sync]')))
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Determine platform from repo name
|
- name: Determine platform from repo name
|
||||||
@@ -52,7 +53,7 @@ jobs:
|
|||||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
||||||
git clone --depth 1 "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli
|
git clone --depth 1 "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli
|
||||||
|
|
||||||
- name: Install PHP
|
- name: Install PHP
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- SQL migration compatibility: removed `DROP COLUMN IF EXISTS` (MySQL 8.0.13+ only) in favor of plain `DROP COLUMN`
|
- SQL migration compatibility: removed `DROP COLUMN IF EXISTS` (MySQL 8.0.13+ only) in favor of plain `DROP COLUMN`
|
||||||
- Honest installer success: package postflight now verifies every bundled child extension (component, modules, plugin) actually landed in `#__extensions` before showing the license/next-steps message; if any is missing it shows an error and suppresses the success message instead of reporting a false success. Fails open so a transient DB/IO glitch never fakes a failure.
|
|
||||||
|
|
||||||
## [1.1.0] - 2026-06-23
|
## [1.1.0] - 2026-06-23
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ This file provides guidance to Claude Code when working with this repository.
|
|||||||
| **Default branch** | main |
|
| **Default branch** | main |
|
||||||
| **License** | GPL-3.0-or-later |
|
| **License** | GPL-3.0-or-later |
|
||||||
| **Wiki** | [MokoSuiteStoreLocator Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteStoreLocator/wiki) |
|
| **Wiki** | [MokoSuiteStoreLocator Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteStoreLocator/wiki) |
|
||||||
| **Standards** | [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home) |
|
| **Standards** | [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki) |
|
||||||
|
|
||||||
## Package Contents
|
## Package Contents
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ This is a Joomla package. Key layout:
|
|||||||
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, or `*.min.css`/`*.min.js`
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, or `*.min.css`/`*.min.js`
|
||||||
- **Attribution**: use `Authored-by: Moko Consulting` in commits
|
- **Attribution**: use `Authored-by: Moko Consulting` in commits
|
||||||
- **Branch strategy**: develop on `dev/`, merge to `main` for release
|
- **Branch strategy**: develop on `dev/`, merge to `main` for release
|
||||||
- **Wiki**: documentation lives in the Gitea wiki, not in `docs/` files
|
- **Wiki**: documentation lives in the MokoGitea wiki, not in `docs/` files
|
||||||
- **Standards**: this repo follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home)
|
- **Standards**: this repo follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki)
|
||||||
- **PHP minimum**: 8.2
|
- **PHP minimum**: 8.2
|
||||||
- **Joomla minimum**: 5.0
|
- **Joomla minimum**: 5.0
|
||||||
- **Joomla table operations**: always use bind() -> check() -> store(), never save()
|
- **Joomla table operations**: always use bind() -> check() -> store(), never save()
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
DEFGROUP:
|
DEFGROUP:
|
||||||
INGROUP: Project.Documentation
|
INGROUP: Project.Documentation
|
||||||
REPO:
|
REPO:
|
||||||
VERSION: 01.02.30
|
VERSION: 01.02.01
|
||||||
PATH: ./CODE_OF_CONDUCT.md
|
PATH: ./CODE_OF_CONDUCT.md
|
||||||
BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default
|
BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default
|
||||||
-->
|
-->
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge
|
|||||||
7. **Merging to main** triggers the stable release pipeline:
|
7. **Merging to main** triggers the stable release pipeline:
|
||||||
- Minor version bump (e.g., `02.09.xx` → `02.10.00`)
|
- Minor version bump (e.g., `02.09.xx` → `02.10.00`)
|
||||||
- Stability suffix stripped (clean version)
|
- Stability suffix stripped (clean version)
|
||||||
- Gitea release created with ZIP/tar.gz packages
|
- MokoGitea release created with ZIP/tar.gz packages
|
||||||
- `updates.xml` updated (Joomla extensions)
|
- `updates.xml` updated (Joomla extensions)
|
||||||
- `dev` branch recreated from `main`
|
- `dev` branch recreated from `main`
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -19,12 +19,12 @@
|
|||||||
DEFGROUP: mokoconsulting-tech.Template-Joomla
|
DEFGROUP: mokoconsulting-tech.Template-Joomla
|
||||||
INGROUP: MokoStandards.Governance
|
INGROUP: MokoStandards.Governance
|
||||||
REPO: https://github.com/mokoconsulting-tech/Template-Joomla
|
REPO: https://github.com/mokoconsulting-tech/Template-Joomla
|
||||||
VERSION: 01.02.30
|
VERSION: 01.02.01
|
||||||
PATH: /GOVERNANCE.md
|
PATH: /GOVERNANCE.md
|
||||||
BRIEF: Project governance rules, roles, and decision process for Template-Joomla
|
BRIEF: Project governance rules, roles, and decision process for Template-Joomla
|
||||||
-->
|
-->
|
||||||
|
|
||||||
[](https://github.com/mokoconsulting-tech/MokoStandards)
|
[](https://github.com/mokoconsulting-tech/MokoStandards)
|
||||||
|
|
||||||
# Project Governance
|
# Project Governance
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
This document defines the governance model for the `Template-Joomla` repository within the
|
This document defines the governance model for the `Template-Joomla` repository within the
|
||||||
`mokoconsulting-tech` organization. It is automatically maintained by
|
`mokoconsulting-tech` organization. It is automatically maintained by
|
||||||
[MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) v04.00.04.
|
[MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/.mokogitea/wiki) v04.00.04.
|
||||||
|
|
||||||
Full governance policy is defined in the MokoStandards source repository:
|
Full governance policy is defined in the MokoStandards source repository:
|
||||||
[docs/policy/GOVERNANCE.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/GOVERNANCE.md)
|
[docs/policy/GOVERNANCE.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/GOVERNANCE.md)
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME]
|
|||||||
INGROUP: [PROJECT_NAME].Documentation
|
INGROUP: [PROJECT_NAME].Documentation
|
||||||
REPO: [REPOSITORY_URL]
|
REPO: [REPOSITORY_URL]
|
||||||
PATH: /SECURITY.md
|
PATH: /SECURITY.md
|
||||||
VERSION: 01.02.30
|
VERSION: 01.02.01
|
||||||
BRIEF: Security vulnerability reporting and handling policy
|
BRIEF: Security vulnerability reporting and handling policy
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
<field
|
<field
|
||||||
name="parent_id"
|
name="parent_id"
|
||||||
type="sql"
|
type="sql"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_CATEGORY_PARENT"
|
label="COM_MOKOJOOMSTORELOCATOR_CATEGORY_PARENT"
|
||||||
default="0"
|
default="0"
|
||||||
query="SELECT id AS value, title AS text FROM #__mokosuitestorelocator_categories WHERE published = 1 ORDER BY ordering"
|
query="SELECT id AS value, title AS text FROM #__mokosuitestorelocator_categories WHERE published = 1 ORDER BY ordering"
|
||||||
>
|
>
|
||||||
<option value="0">COM_MOKOSUITESTORELOCATOR_CATEGORY_NO_PARENT</option>
|
<option value="0">COM_MOKOJOOMSTORELOCATOR_CATEGORY_NO_PARENT</option>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
@@ -52,18 +52,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="appearance" label="COM_MOKOSUITESTORELOCATOR_FIELDSET_APPEARANCE">
|
<fieldset name="appearance" label="COM_MOKOJOOMSTORELOCATOR_FIELDSET_APPEARANCE">
|
||||||
<field
|
<field
|
||||||
name="color"
|
name="color"
|
||||||
type="color"
|
type="color"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_CATEGORY_COLOR"
|
label="COM_MOKOJOOMSTORELOCATOR_CATEGORY_COLOR"
|
||||||
default=""
|
default=""
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
name="marker_icon"
|
name="marker_icon"
|
||||||
type="media"
|
type="media"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_CATEGORY_MARKER_ICON"
|
label="COM_MOKOJOOMSTORELOCATOR_CATEGORY_MARKER_ICON"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<field
|
<field
|
||||||
name="search"
|
name="search"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FILTER_SEARCH_LABEL"
|
label="COM_MOKOJOOMSTORELOCATOR_FILTER_SEARCH_LABEL"
|
||||||
hint="JSEARCH_FILTER"
|
hint="JSEARCH_FILTER"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<field
|
<field
|
||||||
name="search"
|
name="search"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FILTER_SEARCH_LABEL"
|
label="COM_MOKOJOOMSTORELOCATOR_FILTER_SEARCH_LABEL"
|
||||||
hint="JSEARCH_FILTER"
|
hint="JSEARCH_FILTER"
|
||||||
inputmode="search"
|
inputmode="search"
|
||||||
/>
|
/>
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
>
|
>
|
||||||
<option value="a.title ASC">JGLOBAL_TITLE_ASC</option>
|
<option value="a.title ASC">JGLOBAL_TITLE_ASC</option>
|
||||||
<option value="a.title DESC">JGLOBAL_TITLE_DESC</option>
|
<option value="a.title DESC">JGLOBAL_TITLE_DESC</option>
|
||||||
<option value="a.city ASC">COM_MOKOSUITESTORELOCATOR_CITY_ASC</option>
|
<option value="a.city ASC">COM_MOKOJOOMSTORELOCATOR_CITY_ASC</option>
|
||||||
<option value="a.city DESC">COM_MOKOSUITESTORELOCATOR_CITY_DESC</option>
|
<option value="a.city DESC">COM_MOKOJOOMSTORELOCATOR_CITY_DESC</option>
|
||||||
<option value="a.published ASC">JSTATUS_ASC</option>
|
<option value="a.published ASC">JSTATUS_ASC</option>
|
||||||
<option value="a.published DESC">JSTATUS_DESC</option>
|
<option value="a.published DESC">JSTATUS_DESC</option>
|
||||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
|||||||
@@ -43,58 +43,58 @@
|
|||||||
</field>
|
</field>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="categories" label="COM_MOKOSUITESTORELOCATOR_FIELDSET_CATEGORIES">
|
<fieldset name="categories" label="COM_MOKOJOOMSTORELOCATOR_FIELDSET_CATEGORIES">
|
||||||
<field
|
<field
|
||||||
name="categories"
|
name="categories"
|
||||||
type="sql"
|
type="sql"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_CATEGORIES"
|
label="COM_MOKOJOOMSTORELOCATOR_CATEGORIES"
|
||||||
multiple="true"
|
multiple="true"
|
||||||
query="SELECT id AS value, title AS text FROM #__mokosuitestorelocator_categories WHERE published = 1 ORDER BY ordering"
|
query="SELECT id AS value, title AS text FROM #__mokosuitestorelocator_categories WHERE published = 1 ORDER BY ordering"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="address" label="COM_MOKOSUITESTORELOCATOR_FIELDSET_ADDRESS">
|
<fieldset name="address" label="COM_MOKOJOOMSTORELOCATOR_FIELDSET_ADDRESS">
|
||||||
<field
|
<field
|
||||||
name="address"
|
name="address"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_ADDRESS"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_ADDRESS"
|
||||||
size="60"
|
size="60"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
name="city"
|
name="city"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_CITY"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_CITY"
|
||||||
size="40"
|
size="40"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
name="state"
|
name="state"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_STATE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_STATE"
|
||||||
size="40"
|
size="40"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
name="postcode"
|
name="postcode"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_POSTCODE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_POSTCODE"
|
||||||
size="20"
|
size="20"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
name="country"
|
name="country"
|
||||||
type="text"
|
type="text"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_COUNTRY"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_COUNTRY"
|
||||||
size="40"
|
size="40"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="coordinates" label="COM_MOKOSUITESTORELOCATOR_FIELDSET_COORDINATES">
|
<fieldset name="coordinates" label="COM_MOKOJOOMSTORELOCATOR_FIELDSET_COORDINATES">
|
||||||
<field
|
<field
|
||||||
name="latitude"
|
name="latitude"
|
||||||
type="number"
|
type="number"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_LATITUDE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_LATITUDE"
|
||||||
step="0.00000001"
|
step="0.00000001"
|
||||||
min="-90"
|
min="-90"
|
||||||
max="90"
|
max="90"
|
||||||
@@ -103,18 +103,18 @@
|
|||||||
<field
|
<field
|
||||||
name="longitude"
|
name="longitude"
|
||||||
type="number"
|
type="number"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_LONGITUDE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_LONGITUDE"
|
||||||
step="0.00000001"
|
step="0.00000001"
|
||||||
min="-180"
|
min="-180"
|
||||||
max="180"
|
max="180"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="contact" label="COM_MOKOSUITESTORELOCATOR_FIELDSET_CONTACT">
|
<fieldset name="contact" label="COM_MOKOJOOMSTORELOCATOR_FIELDSET_CONTACT">
|
||||||
<field
|
<field
|
||||||
name="phone"
|
name="phone"
|
||||||
type="tel"
|
type="tel"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_PHONE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_PHONE"
|
||||||
size="30"
|
size="30"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -128,23 +128,23 @@
|
|||||||
<field
|
<field
|
||||||
name="website"
|
name="website"
|
||||||
type="url"
|
type="url"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_WEBSITE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_WEBSITE"
|
||||||
size="60"
|
size="60"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<field
|
<field
|
||||||
name="hours"
|
name="hours"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_HOURS"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_HOURS"
|
||||||
rows="5"
|
rows="5"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="image" label="COM_MOKOSUITESTORELOCATOR_FIELDSET_IMAGE">
|
<fieldset name="image" label="COM_MOKOJOOMSTORELOCATOR_FIELDSET_IMAGE">
|
||||||
<field
|
<field
|
||||||
name="image"
|
name="image"
|
||||||
type="media"
|
type="media"
|
||||||
label="COM_MOKOSUITESTORELOCATOR_FIELD_IMAGE"
|
label="COM_MOKOJOOMSTORELOCATOR_FIELD_IMAGE"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
+65
-65
@@ -3,79 +3,79 @@
|
|||||||
; License: GNU General Public License version 3 or later; see LICENSE
|
; License: GNU General Public License version 3 or later; see LICENSE
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR="MokoSuite Store Locator"
|
COM_MOKOSUITESTORELOCATOR="MokoSuite Store Locator"
|
||||||
COM_MOKOSUITESTORELOCATOR_SHORT="Store Locator"
|
COM_MOKOJOOMSTORELOCATOR="Store Locator"
|
||||||
COM_MOKOSUITESTORELOCATOR_DESC="A store locator component for managing and displaying location listings."
|
COM_MOKOJOOMSTORELOCATOR_DESC="A store locator component for managing and displaying location listings."
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS="Locations"
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS="Locations"
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATION_NEW="New Location"
|
COM_MOKOJOOMSTORELOCATOR_LOCATION_NEW="New Location"
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATION_EDIT="Edit Location"
|
COM_MOKOJOOMSTORELOCATOR_LOCATION_EDIT="Edit Location"
|
||||||
COM_MOKOSUITESTORELOCATOR_TABLE_CAPTION="Store Location List"
|
COM_MOKOJOOMSTORELOCATOR_TABLE_CAPTION="Store Location List"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_CITY="City"
|
COM_MOKOJOOMSTORELOCATOR_CITY="City"
|
||||||
COM_MOKOSUITESTORELOCATOR_STATE="State"
|
COM_MOKOJOOMSTORELOCATOR_STATE="State"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_ADDRESS="Address"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_ADDRESS="Address"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_COORDINATES="Coordinates"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_COORDINATES="Coordinates"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_CONTACT="Contact Information"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_CONTACT="Contact Information"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_IMAGE="Image"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_IMAGE="Image"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_ADDRESS="Street Address"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_ADDRESS="Street Address"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_CITY="City"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_CITY="City"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_STATE="State / Province"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_STATE="State / Province"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_POSTCODE="Postal Code"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_POSTCODE="Postal Code"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_COUNTRY="Country"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_COUNTRY="Country"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_LATITUDE="Latitude"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_LATITUDE="Latitude"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_LONGITUDE="Longitude"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_LONGITUDE="Longitude"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_PHONE="Phone"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_PHONE="Phone"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_WEBSITE="Website"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_WEBSITE="Website"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_HOURS="Business Hours"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_HOURS="Business Hours"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_IMAGE="Location Image"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_IMAGE="Location Image"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_FILTER_SEARCH_LABEL="Search Locations"
|
COM_MOKOJOOMSTORELOCATOR_FILTER_SEARCH_LABEL="Search Locations"
|
||||||
COM_MOKOSUITESTORELOCATOR_CITY_ASC="City ascending"
|
COM_MOKOJOOMSTORELOCATOR_CITY_ASC="City ascending"
|
||||||
COM_MOKOSUITESTORELOCATOR_CITY_DESC="City descending"
|
COM_MOKOJOOMSTORELOCATOR_CITY_DESC="City descending"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATION_SAVE_SUCCESS="Location saved successfully."
|
COM_MOKOJOOMSTORELOCATOR_LOCATION_SAVE_SUCCESS="Location saved successfully."
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS_N_ITEMS_PUBLISHED="%d location(s) published."
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS_N_ITEMS_PUBLISHED="%d location(s) published."
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS_N_ITEMS_UNPUBLISHED="%d location(s) unpublished."
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS_N_ITEMS_UNPUBLISHED="%d location(s) unpublished."
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS_N_ITEMS_DELETED="%d location(s) deleted."
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS_N_ITEMS_DELETED="%d location(s) deleted."
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_ERROR_TITLE_REQUIRED="A location title is required."
|
COM_MOKOJOOMSTORELOCATOR_ERROR_TITLE_REQUIRED="A location title is required."
|
||||||
COM_MOKOSUITESTORELOCATOR_ERROR_LATITUDE_RANGE="Latitude must be between -90 and 90."
|
COM_MOKOJOOMSTORELOCATOR_ERROR_LATITUDE_RANGE="Latitude must be between -90 and 90."
|
||||||
COM_MOKOSUITESTORELOCATOR_ERROR_LONGITUDE_RANGE="Longitude must be between -180 and 180."
|
COM_MOKOJOOMSTORELOCATOR_ERROR_LONGITUDE_RANGE="Longitude must be between -180 and 180."
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_GEOCODING_SUCCESS="Coordinates were auto-populated from the address via OpenStreetMap."
|
COM_MOKOJOOMSTORELOCATOR_GEOCODING_SUCCESS="Coordinates were auto-populated from the address via OpenStreetMap."
|
||||||
COM_MOKOSUITESTORELOCATOR_GEOCODING_FAILED="Geocoding failed: %s. You can enter coordinates manually."
|
COM_MOKOJOOMSTORELOCATOR_GEOCODING_FAILED="Geocoding failed: %s. You can enter coordinates manually."
|
||||||
COM_MOKOSUITESTORELOCATOR_GET_DIRECTIONS="Get Directions"
|
COM_MOKOJOOMSTORELOCATOR_GET_DIRECTIONS="Get Directions"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT="Import Locations"
|
COM_MOKOJOOMSTORELOCATOR_IMPORT="Import Locations"
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_DESC="Import store locations from a CSV file."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_DESC="Import store locations from a CSV file."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_UPLOAD="Upload CSV File"
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_UPLOAD="Upload CSV File"
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FILE="CSV File"
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FILE="CSV File"
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FILE_DESC="Select a CSV file with location data. First row must be column headers."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FILE_DESC="Select a CSV file with location data. First row must be column headers."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_DELIMITER="Delimiter"
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_DELIMITER="Delimiter"
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_DELIMITER_DESC="The character separating fields in your CSV file."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_DELIMITER_DESC="The character separating fields in your CSV file."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_SUCCESS="%d location(s) imported successfully."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_SUCCESS="%d location(s) imported successfully."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_SKIPPED="%d row(s) skipped due to errors."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_SKIPPED="%d row(s) skipped due to errors."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_NO_FILE="No file was uploaded."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_NO_FILE="No file was uploaded."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_INVALID_FILE="The uploaded file is not a valid CSV."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_INVALID_FILE="The uploaded file is not a valid CSV."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_NO_ROWS="The CSV file contains no data rows."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_NO_ROWS="The CSV file contains no data rows."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_MISSING_TITLE="Row %d: Title is required."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_MISSING_TITLE="Row %d: Title is required."
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FP_TITLE="Import from FocalPoint"
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_TITLE="Import from FocalPoint"
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FP_DESC="Migrate locations from an installed FocalPoint (Shack Locations) component. Coordinates, custom fields (email, website, hours), and metadata are mapped automatically."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_DESC="Migrate locations from an installed FocalPoint (Shack Locations) component. Coordinates, custom fields (email, website, hours), and metadata are mapped automatically."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FP_BUTTON="Import FocalPoint Locations"
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_BUTTON="Import FocalPoint Locations"
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FP_SUCCESS="%d location(s) imported from FocalPoint."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_SUCCESS="%d location(s) imported from FocalPoint."
|
||||||
COM_MOKOSUITESTORELOCATOR_IMPORT_FILE_TOO_LARGE="The uploaded file exceeds the 2 MB size limit."
|
COM_MOKOJOOMSTORELOCATOR_IMPORT_FILE_TOO_LARGE="The uploaded file exceeds the 2 MB size limit."
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORIES="Categories"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORIES="Categories"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORY_NEW="New Category"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORY_NEW="New Category"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORY_EDIT="Edit Category"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORY_EDIT="Edit Category"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORY_PARENT="Parent Category"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORY_PARENT="Parent Category"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORY_NO_PARENT="- No Parent -"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORY_NO_PARENT="- No Parent -"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORY_COLOR="Color"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORY_COLOR="Color"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORY_MARKER_ICON="Custom Marker Icon"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORY_MARKER_ICON="Custom Marker Icon"
|
||||||
COM_MOKOSUITESTORELOCATOR_CATEGORIES_TABLE_CAPTION="Store Location Categories"
|
COM_MOKOJOOMSTORELOCATOR_CATEGORIES_TABLE_CAPTION="Store Location Categories"
|
||||||
COM_MOKOSUITESTORELOCATOR_ERROR_CATEGORY_TITLE_REQUIRED="A category title is required."
|
COM_MOKOJOOMSTORELOCATOR_ERROR_CATEGORY_TITLE_REQUIRED="A category title is required."
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_CATEGORIES="Categories"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_CATEGORIES="Categories"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_APPEARANCE="Appearance"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_APPEARANCE="Appearance"
|
||||||
|
|||||||
+3
-3
@@ -3,6 +3,6 @@
|
|||||||
; License: GNU General Public License version 3 or later; see LICENSE
|
; License: GNU General Public License version 3 or later; see LICENSE
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR="MokoSuite Store Locator"
|
COM_MOKOSUITESTORELOCATOR="MokoSuite Store Locator"
|
||||||
COM_MOKOSUITESTORELOCATOR_SHORT="Store Locator"
|
COM_MOKOJOOMSTORELOCATOR="Store Locator"
|
||||||
COM_MOKOSUITESTORELOCATOR_DESC="A store locator component for managing and displaying location listings."
|
COM_MOKOJOOMSTORELOCATOR_DESC="A store locator component for managing and displaying location listings."
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS="Locations"
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS="Locations"
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class ImportController extends BaseController
|
|||||||
|
|
||||||
if (!$csvFile || $csvFile['error'] !== UPLOAD_ERR_OK || !is_uploaded_file($csvFile['tmp_name']))
|
if (!$csvFile || $csvFile['error'] !== UPLOAD_ERR_OK || !is_uploaded_file($csvFile['tmp_name']))
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_NO_FILE'), 'error');
|
$this->setMessage(Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_NO_FILE'), 'error');
|
||||||
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -68,7 +68,7 @@ class ImportController extends BaseController
|
|||||||
// Enforce 2 MB file size limit
|
// Enforce 2 MB file size limit
|
||||||
if ($csvFile['size'] > 2 * 1024 * 1024)
|
if ($csvFile['size'] > 2 * 1024 * 1024)
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_FILE_TOO_LARGE'), 'error');
|
$this->setMessage(Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_FILE_TOO_LARGE'), 'error');
|
||||||
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -79,7 +79,7 @@ class ImportController extends BaseController
|
|||||||
|
|
||||||
if ($ext !== 'csv' && $ext !== 'txt')
|
if ($ext !== 'csv' && $ext !== 'txt')
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_INVALID_FILE'), 'error');
|
$this->setMessage(Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_INVALID_FILE'), 'error');
|
||||||
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -92,7 +92,7 @@ class ImportController extends BaseController
|
|||||||
|
|
||||||
if (!$mime || !\in_array($mime, $allowedMimes, true))
|
if (!$mime || !\in_array($mime, $allowedMimes, true))
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_INVALID_FILE'), 'error');
|
$this->setMessage(Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_INVALID_FILE'), 'error');
|
||||||
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=import', false));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -102,12 +102,12 @@ class ImportController extends BaseController
|
|||||||
|
|
||||||
if ($result['imported'] > 0)
|
if ($result['imported'] > 0)
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::sprintf('COM_MOKOSUITESTORELOCATOR_IMPORT_SUCCESS', $result['imported']));
|
$this->setMessage(Text::sprintf('COM_MOKOJOOMSTORELOCATOR_IMPORT_SUCCESS', $result['imported']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result['skipped'] > 0)
|
if ($result['skipped'] > 0)
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::sprintf('COM_MOKOSUITESTORELOCATOR_IMPORT_SKIPPED', $result['skipped']), 'warning');
|
$this->setMessage(Text::sprintf('COM_MOKOJOOMSTORELOCATOR_IMPORT_SKIPPED', $result['skipped']), 'warning');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=locations', false));
|
$this->setRedirect(Route::_('index.php?option=com_mokosuitestorelocator&view=locations', false));
|
||||||
@@ -138,12 +138,12 @@ class ImportController extends BaseController
|
|||||||
|
|
||||||
if ($result['imported'] > 0)
|
if ($result['imported'] > 0)
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::sprintf('COM_MOKOSUITESTORELOCATOR_IMPORT_FP_SUCCESS', $result['imported']));
|
$this->setMessage(Text::sprintf('COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_SUCCESS', $result['imported']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result['skipped'] > 0)
|
if ($result['skipped'] > 0)
|
||||||
{
|
{
|
||||||
$this->setMessage(Text::sprintf('COM_MOKOSUITESTORELOCATOR_IMPORT_SKIPPED', $result['skipped']), 'warning');
|
$this->setMessage(Text::sprintf('COM_MOKOJOOMSTORELOCATOR_IMPORT_SKIPPED', $result['skipped']), 'warning');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($result['errors'] as $error)
|
foreach ($result['errors'] as $error)
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ class LocationController extends FormController
|
|||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $text_prefix = 'COM_MOKOSUITESTORELOCATOR_LOCATION';
|
protected $text_prefix = 'COM_MOKOJOOMSTORELOCATOR_LOCATION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The view list to redirect to after save.
|
* The view list to redirect to after save.
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ class LocationsController extends AdminController
|
|||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $text_prefix = 'COM_MOKOSUITESTORELOCATOR_LOCATIONS';
|
protected $text_prefix = 'COM_MOKOJOOMSTORELOCATOR_LOCATIONS';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Proxy for getModel.
|
* Proxy for getModel.
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class LocationModel extends AdminModel
|
|||||||
$data['latitude'] = $coords['lat'];
|
$data['latitude'] = $coords['lat'];
|
||||||
$data['longitude'] = $coords['lng'];
|
$data['longitude'] = $coords['lng'];
|
||||||
Factory::getApplication()->enqueueMessage(
|
Factory::getApplication()->enqueueMessage(
|
||||||
Text::_('COM_MOKOSUITESTORELOCATOR_GEOCODING_SUCCESS'),
|
Text::_('COM_MOKOJOOMSTORELOCATOR_GEOCODING_SUCCESS'),
|
||||||
'success'
|
'success'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -252,7 +252,7 @@ class LocationModel extends AdminModel
|
|||||||
catch (\Exception $e)
|
catch (\Exception $e)
|
||||||
{
|
{
|
||||||
Factory::getApplication()->enqueueMessage(
|
Factory::getApplication()->enqueueMessage(
|
||||||
Text::sprintf('COM_MOKOSUITESTORELOCATOR_GEOCODING_FAILED', $e->getMessage()),
|
Text::sprintf('COM_MOKOJOOMSTORELOCATOR_GEOCODING_FAILED', $e->getMessage()),
|
||||||
'warning'
|
'warning'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
|
|
||||||
protected function addToolbar(): void
|
protected function addToolbar(): void
|
||||||
{
|
{
|
||||||
ToolbarHelper::title(Text::_('COM_MOKOSUITESTORELOCATOR_CATEGORIES'), 'folder');
|
ToolbarHelper::title(Text::_('COM_MOKOJOOMSTORELOCATOR_CATEGORIES'), 'folder');
|
||||||
ToolbarHelper::addNew('category.add');
|
ToolbarHelper::addNew('category.add');
|
||||||
ToolbarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
|
ToolbarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
|
||||||
ToolbarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
|
ToolbarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
$isNew = ($this->item->id == 0);
|
$isNew = ($this->item->id == 0);
|
||||||
|
|
||||||
ToolbarHelper::title(
|
ToolbarHelper::title(
|
||||||
Text::_('COM_MOKOSUITESTORELOCATOR_CATEGORY_' . ($isNew ? 'NEW' : 'EDIT')),
|
Text::_('COM_MOKOJOOMSTORELOCATOR_CATEGORY_' . ($isNew ? 'NEW' : 'EDIT')),
|
||||||
'folder'
|
'folder'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
*/
|
*/
|
||||||
public function display($tpl = null): void
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
ToolbarHelper::title(Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT'), 'upload');
|
ToolbarHelper::title(Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT'), 'upload');
|
||||||
|
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
$isNew = ($this->item->id == 0);
|
$isNew = ($this->item->id == 0);
|
||||||
|
|
||||||
ToolbarHelper::title(
|
ToolbarHelper::title(
|
||||||
Text::_('COM_MOKOSUITESTORELOCATOR_LOCATION_' . ($isNew ? 'NEW' : 'EDIT')),
|
Text::_('COM_MOKOJOOMSTORELOCATOR_LOCATION_' . ($isNew ? 'NEW' : 'EDIT')),
|
||||||
'location'
|
'location'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -82,11 +82,11 @@ class HtmlView extends BaseHtmlView
|
|||||||
*/
|
*/
|
||||||
protected function addToolbar(): void
|
protected function addToolbar(): void
|
||||||
{
|
{
|
||||||
ToolbarHelper::title(Text::_('COM_MOKOSUITESTORELOCATOR_LOCATIONS'), 'location');
|
ToolbarHelper::title(Text::_('COM_MOKOJOOMSTORELOCATOR_LOCATIONS'), 'location');
|
||||||
ToolbarHelper::addNew('location.add');
|
ToolbarHelper::addNew('location.add');
|
||||||
ToolbarHelper::publish('locations.publish', 'JTOOLBAR_PUBLISH', true);
|
ToolbarHelper::publish('locations.publish', 'JTOOLBAR_PUBLISH', true);
|
||||||
ToolbarHelper::unpublish('locations.unpublish', 'JTOOLBAR_UNPUBLISH', true);
|
ToolbarHelper::unpublish('locations.unpublish', 'JTOOLBAR_UNPUBLISH', true);
|
||||||
ToolbarHelper::deleteList('', 'locations.delete', 'JTOOLBAR_DELETE');
|
ToolbarHelper::deleteList('', 'locations.delete', 'JTOOLBAR_DELETE');
|
||||||
ToolbarHelper::custom('import.display', 'upload', '', 'COM_MOKOSUITESTORELOCATOR_IMPORT', false);
|
ToolbarHelper::custom('import.display', 'upload', '', 'COM_MOKOJOOMSTORELOCATOR_IMPORT', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ use Joomla\CMS\Router\Route;
|
|||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<table class="table" id="categoryList">
|
<table class="table" id="categoryList">
|
||||||
<caption class="visually-hidden">
|
<caption class="visually-hidden">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_CATEGORIES_TABLE_CAPTION'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_CATEGORIES_TABLE_CAPTION'); ?>
|
||||||
</caption>
|
</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -42,10 +42,10 @@ use Joomla\CMS\Router\Route;
|
|||||||
<?php echo Text::_('JGLOBAL_TITLE'); ?>
|
<?php echo Text::_('JGLOBAL_TITLE'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="w-5 text-center">
|
<th scope="col" class="w-5 text-center">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_CATEGORY_COLOR'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_CATEGORY_COLOR'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="w-10 text-center d-none d-md-table-cell">
|
<th scope="col" class="w-10 text-center d-none d-md-table-cell">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_LOCATIONS'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_LOCATIONS'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="w-5 text-center">
|
<th scope="col" class="w-5 text-center">
|
||||||
<?php echo Text::_('JSTATUS'); ?>
|
<?php echo Text::_('JSTATUS'); ?>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ HTMLHelper::_('behavior.keepalive');
|
|||||||
</div>
|
</div>
|
||||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||||
|
|
||||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'appearance', Text::_('COM_MOKOSUITESTORELOCATOR_FIELDSET_APPEARANCE')); ?>
|
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'appearance', Text::_('COM_MOKOJOOMSTORELOCATOR_FIELDSET_APPEARANCE')); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<?php echo $this->form->renderField('color'); ?>
|
<?php echo $this->form->renderField('color'); ?>
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ use Joomla\CMS\Session\Session;
|
|||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_UPLOAD'); ?></h3>
|
<h3><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_UPLOAD'); ?></h3>
|
||||||
<p class="text-muted"><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_FILE_DESC'); ?></p>
|
<p class="text-muted"><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_FILE_DESC'); ?></p>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="csv_file" class="form-label">
|
<label for="csv_file" class="form-label">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_FILE'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_FILE'); ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="file" name="jform[csv_file]" id="csv_file"
|
<input type="file" name="jform[csv_file]" id="csv_file"
|
||||||
class="form-control" accept=".csv,text/csv" required />
|
class="form-control" accept=".csv,text/csv" required />
|
||||||
@@ -35,7 +35,7 @@ use Joomla\CMS\Session\Session;
|
|||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="delimiter" class="form-label">
|
<label for="delimiter" class="form-label">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_DELIMITER'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_DELIMITER'); ?>
|
||||||
</label>
|
</label>
|
||||||
<select name="delimiter" id="delimiter" class="form-select" style="width: auto;">
|
<select name="delimiter" id="delimiter" class="form-select" style="width: auto;">
|
||||||
<option value=","><?php echo Text::_('Comma (,)'); ?></option>
|
<option value=","><?php echo Text::_('Comma (,)'); ?></option>
|
||||||
@@ -48,7 +48,7 @@ use Joomla\CMS\Session\Session;
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
<span class="icon-upload" aria-hidden="true"></span>
|
<span class="icon-upload" aria-hidden="true"></span>
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT'); ?>
|
||||||
</button>
|
</button>
|
||||||
<a href="<?php echo Route::_('index.php?option=com_mokosuitestorelocator&view=locations'); ?>"
|
<a href="<?php echo Route::_('index.php?option=com_mokosuitestorelocator&view=locations'); ?>"
|
||||||
class="btn btn-secondary ms-2">
|
class="btn btn-secondary ms-2">
|
||||||
@@ -62,13 +62,13 @@ use Joomla\CMS\Session\Session;
|
|||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_FP_TITLE'); ?></h4>
|
<h4><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_TITLE'); ?></h4>
|
||||||
<p class="text-muted"><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_FP_DESC'); ?></p>
|
<p class="text-muted"><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_DESC'); ?></p>
|
||||||
<form action="<?php echo Route::_('index.php?option=com_mokosuitestorelocator&task=import.focalpoint'); ?>"
|
<form action="<?php echo Route::_('index.php?option=com_mokosuitestorelocator&task=import.focalpoint'); ?>"
|
||||||
method="post">
|
method="post">
|
||||||
<button type="submit" class="btn btn-outline-primary w-100">
|
<button type="submit" class="btn btn-outline-primary w-100">
|
||||||
<span class="icon-download" aria-hidden="true"></span>
|
<span class="icon-download" aria-hidden="true"></span>
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_IMPORT_FP_BUTTON'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_IMPORT_FP_BUTTON'); ?>
|
||||||
</button>
|
</button>
|
||||||
<?php echo HTMLHelper::_('form.token'); ?>
|
<?php echo HTMLHelper::_('form.token'); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ HTMLHelper::_('behavior.keepalive');
|
|||||||
</div>
|
</div>
|
||||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||||
|
|
||||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'categories', Text::_('COM_MOKOSUITESTORELOCATOR_FIELDSET_CATEGORIES')); ?>
|
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'categories', Text::_('COM_MOKOJOOMSTORELOCATOR_FIELDSET_CATEGORIES')); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-9">
|
<div class="col-lg-9">
|
||||||
<?php echo $this->form->renderField('categories'); ?>
|
<?php echo $this->form->renderField('categories'); ?>
|
||||||
@@ -45,7 +45,7 @@ HTMLHelper::_('behavior.keepalive');
|
|||||||
</div>
|
</div>
|
||||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||||
|
|
||||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'address', Text::_('COM_MOKOSUITESTORELOCATOR_FIELDSET_ADDRESS')); ?>
|
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'address', Text::_('COM_MOKOJOOMSTORELOCATOR_FIELDSET_ADDRESS')); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<?php echo $this->form->renderField('address'); ?>
|
<?php echo $this->form->renderField('address'); ?>
|
||||||
@@ -61,7 +61,7 @@ HTMLHelper::_('behavior.keepalive');
|
|||||||
</div>
|
</div>
|
||||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||||
|
|
||||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'contact', Text::_('COM_MOKOSUITESTORELOCATOR_FIELDSET_CONTACT')); ?>
|
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'contact', Text::_('COM_MOKOJOOMSTORELOCATOR_FIELDSET_CONTACT')); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<?php echo $this->form->renderField('phone'); ?>
|
<?php echo $this->form->renderField('phone'); ?>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ use Joomla\CMS\Router\Route;
|
|||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<table class="table" id="locationList">
|
<table class="table" id="locationList">
|
||||||
<caption class="visually-hidden">
|
<caption class="visually-hidden">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_TABLE_CAPTION'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_TABLE_CAPTION'); ?>
|
||||||
</caption>
|
</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -42,10 +42,10 @@ use Joomla\CMS\Router\Route;
|
|||||||
<?php echo Text::_('JGLOBAL_TITLE'); ?>
|
<?php echo Text::_('JGLOBAL_TITLE'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="w-10 d-none d-md-table-cell">
|
<th scope="col" class="w-10 d-none d-md-table-cell">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_CITY'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_CITY'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="w-10 d-none d-md-table-cell">
|
<th scope="col" class="w-10 d-none d-md-table-cell">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_STATE'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_STATE'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="w-5 text-center">
|
<th scope="col" class="w-5 text-center">
|
||||||
<?php echo Text::_('JSTATUS'); ?>
|
<?php echo Text::_('JSTATUS'); ?>
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
-->
|
-->
|
||||||
<extension type="component" method="upgrade">
|
<extension type="component" method="upgrade">
|
||||||
<name>com_mokosuitestorelocator</name>
|
<name>com_mokosuitestorelocator</name>
|
||||||
<version>01.02.30</version>
|
<version>01.02.01</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
<authorUrl>https://mokoconsulting.tech</authorUrl>
|
||||||
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
|
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
|
||||||
<license>GNU General Public License version 3 or later; see LICENSE</license>
|
<license>GNU General Public License version 3 or later; see LICENSE</license>
|
||||||
<description>COM_MOKOSUITESTORELOCATOR_DESC</description>
|
<description>COM_MOKOJOOMSTORELOCATOR_DESC</description>
|
||||||
|
|
||||||
<namespace path="src">Moko\Component\MokoSuiteStoreLocator</namespace>
|
<namespace path="src">Moko\Component\MokoSuiteStoreLocator</namespace>
|
||||||
|
|
||||||
@@ -67,11 +67,11 @@
|
|||||||
<folder>tmpl</folder>
|
<folder>tmpl</folder>
|
||||||
</files>
|
</files>
|
||||||
|
|
||||||
<menu>COM_MOKOSUITESTORELOCATOR_SHORT</menu>
|
<menu>COM_MOKOJOOMSTORELOCATOR</menu>
|
||||||
<submenu>
|
<submenu>
|
||||||
<menu link="option=com_mokosuitestorelocator&view=locations">COM_MOKOSUITESTORELOCATOR_LOCATIONS</menu>
|
<menu link="option=com_mokosuitestorelocator&view=locations">COM_MOKOJOOMSTORELOCATOR_LOCATIONS</menu>
|
||||||
<menu link="option=com_mokosuitestorelocator&view=categories">COM_MOKOSUITESTORELOCATOR_CATEGORIES</menu>
|
<menu link="option=com_mokosuitestorelocator&view=categories">COM_MOKOJOOMSTORELOCATOR_CATEGORIES</menu>
|
||||||
<menu link="option=com_mokosuitestorelocator&view=import">COM_MOKOSUITESTORELOCATOR_IMPORT</menu>
|
<menu link="option=com_mokosuitestorelocator&view=import">COM_MOKOJOOMSTORELOCATOR_IMPORT</menu>
|
||||||
</submenu>
|
</submenu>
|
||||||
</administration>
|
</administration>
|
||||||
</extension>
|
</extension>
|
||||||
|
|||||||
+14
-14
@@ -3,19 +3,19 @@
|
|||||||
; License: GNU General Public License version 3 or later; see LICENSE
|
; License: GNU General Public License version 3 or later; see LICENSE
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR="MokoSuite Store Locator"
|
COM_MOKOSUITESTORELOCATOR="MokoSuite Store Locator"
|
||||||
COM_MOKOSUITESTORELOCATOR_SHORT="Store Locator"
|
COM_MOKOJOOMSTORELOCATOR="Store Locator"
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS="Locations"
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS="Locations"
|
||||||
COM_MOKOSUITESTORELOCATOR_NO_LOCATIONS="No locations found."
|
COM_MOKOJOOMSTORELOCATOR_NO_LOCATIONS="No locations found."
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_ADDRESS="Address"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_ADDRESS="Address"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELDSET_CONTACT="Contact Information"
|
COM_MOKOJOOMSTORELOCATOR_FIELDSET_CONTACT="Contact Information"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_PHONE="Phone"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_PHONE="Phone"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_WEBSITE="Website"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_WEBSITE="Website"
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_HOURS="Business Hours"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_HOURS="Business Hours"
|
||||||
|
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS_VIEW_DEFAULT_TITLE="All Locations"
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS_VIEW_DEFAULT_TITLE="All Locations"
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATIONS_VIEW_DEFAULT_DESC="Displays a list of all store locations."
|
COM_MOKOJOOMSTORELOCATOR_LOCATIONS_VIEW_DEFAULT_DESC="Displays a list of all store locations."
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATION_VIEW_DEFAULT_TITLE="Location Detail"
|
COM_MOKOJOOMSTORELOCATOR_LOCATION_VIEW_DEFAULT_TITLE="Location Detail"
|
||||||
COM_MOKOSUITESTORELOCATOR_LOCATION_VIEW_DEFAULT_DESC="Displays a single store location with full details."
|
COM_MOKOJOOMSTORELOCATOR_LOCATION_VIEW_DEFAULT_DESC="Displays a single store location with full details."
|
||||||
COM_MOKOSUITESTORELOCATOR_FIELD_LOCATION="Select Location"
|
COM_MOKOJOOMSTORELOCATOR_FIELD_LOCATION="Select Location"
|
||||||
COM_MOKOSUITESTORELOCATOR_GET_DIRECTIONS="Get Directions"
|
COM_MOKOJOOMSTORELOCATOR_GET_DIRECTIONS="Get Directions"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ if ($item->latitude && $item->longitude)
|
|||||||
|
|
||||||
<div class="com-mokosuitestorelocator-location__details">
|
<div class="com-mokosuitestorelocator-location__details">
|
||||||
<div class="com-mokosuitestorelocator-location__address" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
<div class="com-mokosuitestorelocator-location__address" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
||||||
<h3><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_FIELDSET_ADDRESS'); ?></h3>
|
<h3><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_FIELDSET_ADDRESS'); ?></h3>
|
||||||
<?php if ($item->address) : ?>
|
<?php if ($item->address) : ?>
|
||||||
<span itemprop="streetAddress"><?php echo $this->escape($item->address); ?></span><br>
|
<span itemprop="streetAddress"><?php echo $this->escape($item->address); ?></span><br>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@@ -68,17 +68,17 @@ if ($item->latitude && $item->longitude)
|
|||||||
data-lat="<?php echo (float) $item->latitude; ?>"
|
data-lat="<?php echo (float) $item->latitude; ?>"
|
||||||
data-lng="<?php echo (float) $item->longitude; ?>"
|
data-lng="<?php echo (float) $item->longitude; ?>"
|
||||||
data-title="<?php echo $this->escape($item->title); ?>">
|
data-title="<?php echo $this->escape($item->title); ?>">
|
||||||
<?php echo Text::_('COM_MOKOSUITESTORELOCATOR_GET_DIRECTIONS'); ?>
|
<?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_GET_DIRECTIONS'); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="com-mokosuitestorelocator-location__contact">
|
<div class="com-mokosuitestorelocator-location__contact">
|
||||||
<h3><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_FIELDSET_CONTACT'); ?></h3>
|
<h3><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_FIELDSET_CONTACT'); ?></h3>
|
||||||
<?php if ($item->phone) : ?>
|
<?php if ($item->phone) : ?>
|
||||||
<div>
|
<div>
|
||||||
<strong><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_FIELD_PHONE'); ?>:</strong>
|
<strong><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_FIELD_PHONE'); ?>:</strong>
|
||||||
<?php $safePhone = preg_replace('/[^0-9+\-() ]/', '', $item->phone); ?>
|
<?php $safePhone = preg_replace('/[^0-9+\-() ]/', '', $item->phone); ?>
|
||||||
<a href="tel:<?php echo $this->escape($safePhone); ?>" itemprop="telephone">
|
<a href="tel:<?php echo $this->escape($safePhone); ?>" itemprop="telephone">
|
||||||
<?php echo $this->escape($item->phone); ?>
|
<?php echo $this->escape($item->phone); ?>
|
||||||
@@ -97,7 +97,7 @@ if ($item->latitude && $item->longitude)
|
|||||||
|
|
||||||
<?php if ($item->website && preg_match('#^https?://#i', $item->website)) : ?>
|
<?php if ($item->website && preg_match('#^https?://#i', $item->website)) : ?>
|
||||||
<div>
|
<div>
|
||||||
<strong><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_FIELD_WEBSITE'); ?>:</strong>
|
<strong><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_FIELD_WEBSITE'); ?>:</strong>
|
||||||
<a href="<?php echo $this->escape($item->website); ?>" itemprop="url" target="_blank" rel="noopener">
|
<a href="<?php echo $this->escape($item->website); ?>" itemprop="url" target="_blank" rel="noopener">
|
||||||
<?php echo $this->escape($item->website); ?>
|
<?php echo $this->escape($item->website); ?>
|
||||||
</a>
|
</a>
|
||||||
@@ -107,7 +107,7 @@ if ($item->latitude && $item->longitude)
|
|||||||
|
|
||||||
<?php if ($item->hours) : ?>
|
<?php if ($item->hours) : ?>
|
||||||
<div class="com-mokosuitestorelocator-location__hours">
|
<div class="com-mokosuitestorelocator-location__hours">
|
||||||
<h3><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_FIELD_HOURS'); ?></h3>
|
<h3><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_FIELD_HOURS'); ?></h3>
|
||||||
<div itemprop="openingHours">
|
<div itemprop="openingHours">
|
||||||
<?php echo nl2br($this->escape($item->hours)); ?>
|
<?php echo nl2br($this->escape($item->hours)); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ use Joomla\CMS\Router\Route;
|
|||||||
/** @var \Moko\Component\MokoSuiteStoreLocator\Site\View\Locations\HtmlView $this */
|
/** @var \Moko\Component\MokoSuiteStoreLocator\Site\View\Locations\HtmlView $this */
|
||||||
?>
|
?>
|
||||||
<div class="com-mokosuitestorelocator-locations">
|
<div class="com-mokosuitestorelocator-locations">
|
||||||
<h2><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_LOCATIONS'); ?></h2>
|
<h2><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_LOCATIONS'); ?></h2>
|
||||||
|
|
||||||
<?php if (empty($this->items)) : ?>
|
<?php if (empty($this->items)) : ?>
|
||||||
<p><?php echo Text::_('COM_MOKOSUITESTORELOCATOR_NO_LOCATIONS'); ?></p>
|
<p><?php echo Text::_('COM_MOKOJOOMSTORELOCATOR_NO_LOCATIONS'); ?></p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div class="com-mokosuitestorelocator-locations__list">
|
<div class="com-mokosuitestorelocator-locations__list">
|
||||||
<?php foreach ($this->items as $item) : ?>
|
<?php foreach ($this->items as $item) : ?>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<extension type="module" client="site" method="upgrade">
|
<extension type="module" client="site" method="upgrade">
|
||||||
<name>mod_mokosuitestorelocator_map</name>
|
<name>mod_mokosuitestorelocator_map</name>
|
||||||
<version>01.02.30</version>
|
<version>01.02.01</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ if ($provider === 'leaflet')
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$directionsText = Text::_('COM_MOKOSUITESTORELOCATOR_GET_DIRECTIONS', true);
|
$directionsText = Text::_('COM_MOKOJOOMSTORELOCATOR_GET_DIRECTIONS', true);
|
||||||
$clusteringJs = $enableClustering ? 'true' : 'false';
|
$clusteringJs = $enableClustering ? 'true' : 'false';
|
||||||
|
|
||||||
$wa->addInlineScript(<<<JS
|
$wa->addInlineScript(<<<JS
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<extension type="module" client="site" method="upgrade">
|
<extension type="module" client="site" method="upgrade">
|
||||||
<name>mod_mokosuitestorelocator_search</name>
|
<name>mod_mokosuitestorelocator_search</name>
|
||||||
<version>01.02.30</version>
|
<version>01.02.01</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
========================================================================= -->
|
========================================================================= -->
|
||||||
<extension type="plugin" group="webservices" method="upgrade">
|
<extension type="plugin" group="webservices" method="upgrade">
|
||||||
<name>plg_webservices_mokosuitestorelocator</name>
|
<name>plg_webservices_mokosuitestorelocator</name>
|
||||||
<version>01.02.30</version>
|
<version>01.02.01</version>
|
||||||
<creationDate>2026-06-24</creationDate>
|
<creationDate>2026-06-24</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<extension type="package" method="upgrade">
|
<extension type="package" method="upgrade">
|
||||||
<name>MokoSuite Store Locator</name>
|
<name>MokoSuite Store Locator</name>
|
||||||
<packagename>mokosuitestorelocator</packagename>
|
<packagename>mokosuitestorelocator</packagename>
|
||||||
<version>01.02.30</version>
|
<version>01.02.01</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -128,121 +128,12 @@ class Pkg_MokosuitestorelocatorInstallerScript implements InstallerScriptInterfa
|
|||||||
*/
|
*/
|
||||||
public function postflight(string $type, InstallerAdapter $parent): bool
|
public function postflight(string $type, InstallerAdapter $parent): bool
|
||||||
{
|
{
|
||||||
// Housekeeping runs unconditionally.
|
|
||||||
$this->restoreDownloadKey();
|
$this->restoreDownloadKey();
|
||||||
|
|
||||||
// Be honest about success. Joomla's package installer only LOGS a failed
|
|
||||||
// child sub-install but still runs this postflight, so don't show the
|
|
||||||
// license / next-steps message if a bundled extension is actually missing.
|
|
||||||
// Fails open (see missingChildExtensions) so a query/IO glitch never fakes
|
|
||||||
// a failure.
|
|
||||||
$missing = $this->missingChildExtensions($parent);
|
|
||||||
|
|
||||||
if (!empty($missing))
|
|
||||||
{
|
|
||||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage(
|
|
||||||
'<h4>MokoSuiteStoreLocator did not install correctly.</h4>'
|
|
||||||
. '<p>The following bundled extensions are missing: '
|
|
||||||
. htmlspecialchars(implode(', ', $missing), ENT_QUOTES) . '</p>'
|
|
||||||
. '<p>Please uninstall MokoSuiteStoreLocator and reinstall the full package.</p>',
|
|
||||||
'error'
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Success / next-steps path — only reached when every child installed.
|
|
||||||
$this->warnMissingLicenseKey();
|
$this->warnMissingLicenseKey();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify every child extension declared in the package manifest actually landed
|
|
||||||
* in #__extensions. Returns readable labels of any that are missing.
|
|
||||||
*
|
|
||||||
* Matching per Joomla's #__extensions uniqueness:
|
|
||||||
* - type = the <file> "type" attribute
|
|
||||||
* - element = the <file> "id" attribute, EXCEPT for plugins the manifest often
|
|
||||||
* declares the full `plg_<group>_<element>` id, so strip a leading
|
|
||||||
* `plg_<group>_` to get the real element; components/modules use id as-is
|
|
||||||
* - plugins ALSO match folder = the <file> "group" attribute
|
|
||||||
*
|
|
||||||
* FAILS OPEN: any error (unreadable manifest, query failure) returns [] so a
|
|
||||||
* transient glitch never turns a good install into a false failure.
|
|
||||||
*
|
|
||||||
* @param InstallerAdapter $parent The parent installer object.
|
|
||||||
*
|
|
||||||
* @return array Readable labels of missing child extensions.
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private function missingChildExtensions(InstallerAdapter $parent): array
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
$manifest = $parent->getParent()->getManifest();
|
|
||||||
|
|
||||||
if (!$manifest || !isset($manifest->files) || !isset($manifest->files->file))
|
|
||||||
{
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$db = \Joomla\CMS\Factory::getDbo();
|
|
||||||
$missing = [];
|
|
||||||
|
|
||||||
foreach ($manifest->files->file as $file)
|
|
||||||
{
|
|
||||||
$attrs = $file->attributes();
|
|
||||||
$id = isset($attrs['id']) ? (string) $attrs['id'] : '';
|
|
||||||
$exType = isset($attrs['type']) ? (string) $attrs['type'] : '';
|
|
||||||
|
|
||||||
if ($id === '' || $exType === '')
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$group = isset($attrs['group']) ? (string) $attrs['group'] : '';
|
|
||||||
$element = $id;
|
|
||||||
|
|
||||||
// Plugin element in #__extensions is the id minus any leading plg_<group>_.
|
|
||||||
if ($exType === 'plugin' && $group !== '')
|
|
||||||
{
|
|
||||||
$prefix = 'plg_' . $group . '_';
|
|
||||||
|
|
||||||
if (strpos($element, $prefix) === 0)
|
|
||||||
{
|
|
||||||
$element = substr($element, \strlen($prefix));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = $db->getQuery(true)
|
|
||||||
->select('COUNT(*)')
|
|
||||||
->from($db->quoteName('#__extensions'))
|
|
||||||
->where($db->quoteName('element') . ' = ' . $db->quote($element))
|
|
||||||
->where($db->quoteName('type') . ' = ' . $db->quote($exType));
|
|
||||||
|
|
||||||
if ($exType === 'plugin' && $group !== '')
|
|
||||||
{
|
|
||||||
$query->where($db->quoteName('folder') . ' = ' . $db->quote($group));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((int) $db->setQuery($query)->loadResult() === 0)
|
|
||||||
{
|
|
||||||
$label = trim((string) $file);
|
|
||||||
$missing[] = $label !== '' ? preg_replace('/\.zip$/i', '', $label) : $id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $missing;
|
|
||||||
}
|
|
||||||
catch (\Throwable $e)
|
|
||||||
{
|
|
||||||
// Fail open — never fake a failure on a glitch.
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private ?string $savedDownloadKey = null;
|
private ?string $savedDownloadKey = null;
|
||||||
|
|
||||||
private function saveDownloadKey(): void
|
private function saveDownloadKey(): void
|
||||||
|
|||||||
Reference in New Issue
Block a user