260 Commits

Author SHA1 Message Date
Jacek
e92c14c9ab docs: changelog ver_0.335 v0.335 2026-03-12 09:23:02 +01:00
Jacek
394d09d3e1 security: faza 2 - safeUnlink() i escaping XSS w szablonach artykulow
- ProductRepository: dodano safeUnlink() z walidacja realpath() - zapobiega path traversal
- ArticleRepository: to samo, 4 metody usuwania plikow zaktualizowane
- templates/articles/article-full.php: htmlspecialchars() na tytule, SERVER_NAME i $url
- templates/articles/article-entry.php: htmlspecialchars() na tytule i $url (3 miejsca)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 09:22:32 +01:00
Jacek
564b4eab40 build: ver_0.334 - poprawki bezpieczenstwa, usunieto RedBeanPHP 2026-03-12 09:19:33 +01:00
Jacek
b1a15b4895 docs: changelog ver_0.334 - poprawki bezpieczenstwa
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.334
2026-03-12 09:19:15 +01:00
Jacek
167b11679d security: faza 1 - usuniecie debug logu tpay, naprawa SQL i usun rb.php
- ShopOrderController: usunieto file_put_contents do tpay.txt (ujawnial dane platnicze)
- ShopOrderController: hardcoded sekret HotPay przeniesiony do stałej HOTPAY_HASH_SEED
- IntegrationsRepository: zastapiono raw SQL query('SELECT * FROM $table') metodą Medoo select()
- index.php + admin/index.php: usunieto RedBeanPHP (rb.php) - biblioteka byla ladowana ale nieuzywana
- libraries/rb.php: usunieto plik (536 KB, zero uzyc w kodzie aplikacji)
- Testy IntegrationsRepository zaktualizowane do nowego API (select zamiast query)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 09:18:37 +01:00
Jacek
f268e3b5d4 feat: update workflow documentation and add release process steps 2026-03-10 23:33:52 +01:00
Jacek
3e073d2719 build: ver_0.333 - ochrona przed podwójnym składaniem zamówienia
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:50:58 +01:00
Jacek
c7be154d57 feat: ochrona przed podwójnym składaniem zamówienia (order submit token)
Token CSRF w sesji zapobiega duplikowaniu zamówień przy wielokrotnym
kliknięciu przycisku. Przy duplikacie przekierowanie do istniejącego
zamówienia. JS naprawiony — nasłuch na submit formularza zamiast click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.333
2026-03-10 21:50:21 +01:00
Jacek
e0a1847127 feat(api): Introduce shopPRO API documentation and endpoints
- Added api-reference.json for API specifications including authentication, response formats, and available endpoints.
- Created index.html for public API documentation, dynamically loading endpoint details from api-reference.json.
- Removed htaccess.conf file and migrated routing logic to pp_routes for improved maintainability.
- Added new 'type' column in pp_routes to differentiate between entity and system routes.
2026-03-08 10:29:06 +01:00
Jacek
b085c597ca build: ver_0.332 - nowy ZIP z plikami API i ProductRepository
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 22:09:11 +01:00
Jacek
34916b2dad feat: API produktów - nowe pola new_to_date i additional_message (v0.332)
- ProductRepository::getProductForApi() eksportuje new_to_date, additional_message,
  additional_message_required, additional_message_text
- ProductsApiController obsługuje te pola w PUT/PATCH
- Zaktualizowana dokumentacja API.md i CHANGELOG

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.332
2026-03-01 22:08:12 +01:00
Jacek
6fa48129f8 update 2026-03-01 00:58:14 +01:00
Jacek
4b3208f824 build: ver_0.330 - nowy ZIP z index.php, zaktualizowany manifest
Poprzedni ZIP był uszkodzony (brak end of central directory).
Nowy ZIP zawiera index.php (v0.330), SHA256 zaktualizowany w manifeście.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 00:57:31 +01:00
Jacek
7d0e4558ab build: paczki v0.330 manifest + v0.331; aktualizacja KONIEC PRACY w CLAUDE.md
- Dodano ver_0.330_manifest.json (brakujący manifest pobrany z serwera)
- Nowa paczka ver_0.331.zip: fix getProductLayout fallback (LayoutsRepository)
- versions.php: current_ver=331
- CLAUDE.md: KONIEC PRACY rozszerzony o kroki 6-7 (build paczki + commit paczki)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 00:53:47 +01:00
Jacek
9bbcc032c2 fix: getProductLayout używał layoutu kategorii zamiast domyślnego (v0.331)
Fallback w LayoutsRepository::getProductLayout() zmieniony z
categories_default=1 na status=1 — produkty bez przypisanego layoutu
pobierają teraz właściwy domyślny szablon zamiast szablonu kategorii.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.331
2026-03-01 00:42:41 +01:00
c9cb10950f update 2026-02-28 12:08:31 +01:00
1cd18c052f update 2026-02-27 23:42:35 +01:00
d60e335ca6 build: update package v0.329 — routing przez pp_routes + eliminacja htaccess.conf
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:05:24 +01:00
eb7badab65 docs: update CHANGELOG for v0.329 and v0.330
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.330
2026-02-27 22:50:24 +01:00
d83d0ecdea feat: eliminate htaccess.conf, move all URL routes to pp_routes (v0.329-0.330)
- Add category_id, page_id, article_id, type columns to pp_routes (migration 0.329)
- Move routing block in index.php before checkUrlParams() with Redis cache
- Routes for categories, pages, articles now stored in pp_routes instead of .htaccess
- Delete category/page/article routes on entity delete in respective repositories
- Eliminate libraries/htaccess.conf: generate .htaccess content entirely from PHP
- Move 32 static system routes (koszyk, logowanie, newsletter, AJAX modules, etc.)
  plus dynamic language/producer routes to pp_routes with type='system'
- Invalidate pp_routes Redis cache on every htacces() regeneration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.329
2026-02-27 22:06:33 +01:00
b8ed7a46d8 build: update package v0.328 — copy icon for order attribute values
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 20:51:20 +01:00
f9e5efbffb docs: update CHANGELOG for v0.328
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.328
2026-02-27 20:50:51 +01:00
7fc8cff474 feat: copy icon for attribute values in order details
Each attribute in .atributes div gets a clipboard icon button.
Click copies the value, icon switches to checkmark for 1.5s.
Uses Clipboard API with textarea fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 20:49:01 +01:00
218a0e8956 build: update package v0.327 — bulk delete in product archive
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 20:40:22 +01:00
0a14c92109 feat: bulk delete in product archive (v0.327)
- Add bulk_delete_permanent() endpoint (POST ids[], returns JSON)
- Checkbox column + bulk action bar with count label
- Select-all in table header, confirmation dialog before delete
- 2 new tests for bulk_delete_permanent method signature

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.327
2026-02-27 20:37:22 +01:00
c59501603d build: update package v0.326 — API categories/list endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 20:17:14 +01:00
6f94daeb76 docs: update API.md, CHANGELOG, PROJECT_STRUCTURE for categories/list endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.326
2026-02-27 20:13:36 +01:00
72159062f5 fix: remove dead CategoryRepository param, fix N+1 queries in categories/list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:54:48 +01:00
2461087d9b feat: add categories/list API endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:51:26 +01:00
6434933dfb Add configuration for cron key and document code style conventions
- Added cron key to config.php for scheduled tasks.
- Created code_style_and_conventions.md to outline PHP version, file naming, DI pattern, controller wiring, Medoo ORM pitfalls, test conventions, caching, and database structure.
- Added project_overview.md detailing the purpose, tech stack, architecture, entry points, and key classes of the shopPRO project.
- Introduced suggested_commands.md for testing and system utilities commands.
- Added task_completion_checklist.md for a structured approach to completing tasks.
- Included .DS_Store files in autoload and templates directories for macOS compatibility.
2026-02-27 14:57:02 +01:00
28f53b7998 fix: broken SQL in update manifests — line-by-line instead of complete statements
build-update.ps1 was reading SQL migrations line-by-line, causing
multi-line CREATE TABLE/INSERT statements to be stored as fragments
in manifests. Fixed to strip comments, join lines, and split by
semicolons. Fixed ver_0.324_manifest.json with correct SQL statements.
Added try-catch in UpdateRepository to prevent fatal crashes on SQL errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:48:08 +01:00
98029b1720 build: update package v0.325
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 13:52:59 +01:00
a531fabeaf fix: changelog encoding (mojibake) + limit display to 5 versions back
Rebuilt changelog data from manifest JSON files to fix garbled Polish
characters. Converted changelog.php from static HTML to PHP script that
filters entries by instance version (?ver= parameter).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.325
2026-02-27 13:46:09 +01:00
c53778ab36 build: update package v0.324
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 13:32:36 +01:00
52119a0724 feat: database-backed cron job queue replacing JSON file system
Replace file-based JSON cron queue with DB-backed job queue (pp_cron_jobs,
pp_cron_schedules). New Domain\CronJob module: CronJobType (constants),
CronJobRepository (CRUD, atomic fetch, retry/backoff), CronJobProcessor
(orchestration with handler registration). Priority ordering guarantees
apilo_send_order (40) runs before sync tasks (50). Includes cron.php auth
protection, race condition fix in fetchNext, API response validation,
and DI wiring across all entry points. 41 new tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.324
2026-02-27 13:29:11 +01:00
97d7473753 feat: add language backend configuration and update documentation
- Added `language_backend` option to project.yml for specifying the language backend (LSP or JetBrains).
- Updated CLAUDE.md with a note on downloading log files from the FTP server.
- Removed unnecessary .DS_Store files from autoload and templates directories.
- Deleted outdated log files from the logs directory.
2026-02-24 21:14:14 +01:00
754f004096 build: update package v0.323
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:12:48 +01:00
3b2d156e84 ver. 0.323: fix import zdjęć, trwałe usuwanie produktów, fix API upload path
- IntegrationsRepository: refactor importu zdjęć — walidacja HTTP, curl timeouty, logi, czytelny komunikat
- ProductRepository: saveCustomFields tylko gdy klucz istnieje (partial API update), delete() czyści custom_fields
- ProductArchiveController: przycisk i metoda delete_permanent() do trwałego usunięcia z archiwum
- ProductsApiController: fix ścieżki upload (api.php działa z rootu projektu)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.323
2026-02-24 21:05:23 +01:00
c44f59894e build: update package v0.322
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 14:13:19 +01:00
fe2a77e995 ver. 0.322: fix custom_fields — jawne mapowanie kluczy w ProductRepository, spójne !empty w ProductsApiController
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.322
2026-02-24 14:11:50 +01:00
f0b1152ab1 build: update package v0.321
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 14:00:08 +01:00
44ac25b063 ver. 0.321: API produkty — obsługa custom_fields w create/update
- ProductsApiController: parsowanie custom_fields z body (name, type, is_required)
- Zaktualizowano docs/API.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.321
2026-02-24 13:54:33 +01:00
ee8459ca2a build: update package v0.320
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 13:35:13 +01:00
8e2e070eb7 ver. 0.320: API słowniki — ensure_producer; ProductRepository — producer_name w odpowiedzi
- DictionariesApiController: nowy endpoint POST ensure_producer (znajdź lub utwórz producenta)
- ProducerRepository: metoda ensureProducerForApi()
- ProductRepository: pole producer_name w odpowiedzi GET product
- ApiRouter: wstrzyknięto ProducerRepository do DictionariesApiController
- Zaktualizowano docs/API.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.320
2026-02-24 13:32:25 +01:00
ec4e25946d build: update package v0.319
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 12:35:35 +01:00
4f66dbe42c ver. 0.319: usunięcie shopPRO eksportu produktów + rozszerzenie API o custom_fields i security_information
- Usunięto shopproExportProduct() z IntegrationsRepository
- Usunięto shoppro_product_export() z IntegrationsController
- Usunięto przycisk "Eksportuj do shopPRO" z ShopProductController
- ProductRepository: dodano custom_fields i security_information do odpowiedzi API
- Zaktualizowano docs/API.md i testy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.319
2026-02-24 12:29:13 +01:00
4e720c5689 build: update package v0.318
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 11:59:04 +01:00
702e3a94be ver. 0.318: shopPRO export produktów + nowe API endpoints
- NEW: IntegrationsRepository::shopproExportProduct() — eksport produktu do
  zdalnej instancji shopPRO (pola główne, tłumaczenia, custom fields, zdjęcia)
- NEW: sendImageToShopproApi() — wysyłka zdjęć przez API shopPRO (base64 POST)
- REFACTOR: shopproImportProduct() — wydzielono shopproDb() i
  missingShopproSetting(); dodano security_information, producer_id,
  custom fields, alt zdjęcia
- NEW: AttributeRepository::ensureAttributeForApi() i
  ensureAttributeValueForApi() — idempotent find-or-create dla słowników
- NEW: API POST dictionaries/ensure_attribute — utwórz lub znajdź atrybut
- NEW: API POST dictionaries/ensure_attribute_value — utwórz lub znajdź wartość
- NEW: API POST products/upload_image — przyjmuje base64, zapisuje plik i DB
- NEW: IntegrationsController::shoppro_product_export() — akcja admina
- NEW: przycisk "Eksportuj do shopPRO" w liście produktów
- NEW: pole API key w ustawieniach integracji shopPRO

Tests: 765 tests, 2153 assertions — all green

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.318
2026-02-24 11:43:17 +01:00
9a351c16ee build: update package v0.317
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:31:39 +01:00
4056296dab ver. 0.317: klucz API — przycisk generowania + fix zapisu
- fix: api_key brakowało w whiteliście saveSettings() — wartość tracona przy zapisie
- feat: przycisk "Generuj" losowy 32-znakowy klucz, usunięto "(ordersPRO)" z nazwy
- fix: api.php routing przeniesiony przed global settings + Throwable error handling
- fix: ApiRouter catch Throwable zamiast Exception

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.317
2026-02-23 23:30:41 +01:00