[PR #385] [MERGED] add WEB_ROOT constant to allow theme and static asset files loaded fr… #802

Closed
opened 2026-02-25 21:36:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/385
Author: @kroky
Created: 4/10/2020
Status: Merged
Merged: 4/16/2020
Merged by: @jasonmunro

Base: masterHead: feature/webroot


📝 Commits (1)

  • c54d8c7 add WEB_ROOT constant to allow theme and static asset files loaded from a different web root URL

📊 Changes

11 files changed (+19 additions, -10 deletions)

View changed files

📝 index.php (+1 -0)
📝 modules/api_login/api.php (+2 -0)
📝 modules/pgp/modules.php (+3 -3)
📝 modules/smtp/modules.php (+6 -6)
📝 modules/themes/modules.php (+1 -1)
📝 scripts/config_gen.php (+1 -0)
📝 scripts/create_account.php (+1 -0)
📝 scripts/create_config.php (+1 -0)
📝 scripts/delete_account.php (+1 -0)
📝 scripts/update_password.php (+1 -0)
📝 tests/phpunit/bootstrap.php (+1 -0)

📄 Description

…om a different web root URL

Hey Jason,

Just realized that static assets from smtp module were not properly integrated into Tiki as we serve cypht from a different URL than the site/ one you assume as the default URL. I had to add an empty WEB_ROOT constant and prepend all those and

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/385 **Author:** [@kroky](https://github.com/kroky) **Created:** 4/10/2020 **Status:** ✅ Merged **Merged:** 4/16/2020 **Merged by:** [@jasonmunro](https://github.com/jasonmunro) **Base:** `master` ← **Head:** `feature/webroot` --- ### 📝 Commits (1) - [`c54d8c7`](https://github.com/cypht-org/cypht/commit/c54d8c724ed33b8cdd9f055994fdef3ebcc0c06f) add WEB_ROOT constant to allow theme and static asset files loaded from a different web root URL ### 📊 Changes **11 files changed** (+19 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `index.php` (+1 -0) 📝 `modules/api_login/api.php` (+2 -0) 📝 `modules/pgp/modules.php` (+3 -3) 📝 `modules/smtp/modules.php` (+6 -6) 📝 `modules/themes/modules.php` (+1 -1) 📝 `scripts/config_gen.php` (+1 -0) 📝 `scripts/create_account.php` (+1 -0) 📝 `scripts/create_config.php` (+1 -0) 📝 `scripts/delete_account.php` (+1 -0) 📝 `scripts/update_password.php` (+1 -0) 📝 `tests/phpunit/bootstrap.php` (+1 -0) </details> ### 📄 Description …om a different web root URL Hey Jason, Just realized that static assets from smtp module were not properly integrated into Tiki as we serve cypht from a different URL than the site/ one you assume as the default URL. I had to add an empty WEB_ROOT constant and prepend all those <link> and <script> tag urls. By default, it stays empty, so previous behavior stays intact. For us with Tiki, I override it to point to the proper vendor place where cypht resides. Let me know if you see any issues with that! Not sure we need it for all scripts/*.php files but added there just in case. Also spotted a missing VENDOR_PATH in the api and added that as well. Btw, running unit tests with phpunit 5 and 6 fails for different reasons. Which version of phpunit do you use to run tests? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:36:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#802
No description provided.