Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Jan 20, 2025
2 parents 2723003 + f64fda1 commit e7215b8
Show file tree
Hide file tree
Showing 333 changed files with 14,422 additions and 4,967 deletions.
2 changes: 1 addition & 1 deletion .run/Build.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 npm run build" />
<option name="SCRIPT_TEXT" value="if [ -z &quot;$(docker compose ls | grep $(basename &quot;$PWD&quot;))&quot; ]; then docker stop $(docker ps -a -q) &amp;&amp; docker network prune -f &amp;&amp; docker compose up -d --force-recreate &amp;&amp; docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 npm run build; else docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 npm run build; fi " />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down
2 changes: 1 addition & 1 deletion .run/SSH.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SSH" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 bash" />
<option name="SCRIPT_TEXT" value="if [ -z &quot;$(docker compose ls | grep $(basename &quot;$PWD&quot;))&quot; ]; then docker stop $(docker ps -a -q) &amp;&amp; docker network prune -f &amp;&amp; docker compose up -d --force-recreate &amp;&amp; docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 bash; else docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 bash; fi" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down
2 changes: 1 addition & 1 deletion .run/Start.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Start" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="docker stop $(docker ps -a -q) &amp;&amp; docker compose up -d &amp;&amp; docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 npm start" />
<option name="SCRIPT_TEXT" value="if [ -z &quot;$(docker compose ls | grep $(basename &quot;$PWD&quot;))&quot; ]; then docker stop $(docker ps -a -q) &amp;&amp; docker network prune -f &amp;&amp; docker compose up -d --force-recreate &amp;&amp; docker exec -it $(basename &quot;$PWD&quot;)-php-fpm-1 npm start; else echo &quot;Docker compose is already running\!&quot;; fi " />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down
17 changes: 17 additions & 0 deletions .run/Stop.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Stop" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="docker stop $(docker ps -a -q)" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/zsh" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@
This file contains the code changes that were introduced into each release (starting from v1.1.0) so that is easy for
developers to maintain and readjust their custom modifications on the main project codebase.

## [1.5.1] - 2025-01-20

### Added

- Add support for PHP 8.4 (#1640)
- Add new secret token header field to webhooks and default to X-EA-Token (#1607)
- Add company colors to notifications (#1569)
- Add Albanian Language Translations (#1646)

### Fixed

- Fix the date parsing issue on Safari web browsers during the booking process (#1584)
- Fix working plan configuration am/pm hour parsing so that it works in all languages (#1606)
- Improve the CalDAV syncing mechanism so that it connects to more systems without problems (#1622)
- Fix various 1.5.0 API issues (#1562)
- Correct email issues by replacing the internal email library with phpmailer (#1587)
- Fix ICS file mimetype (#1630)∏
- Incorrect Timezone Handling in CalDAV Synchronization Causes Time Shifts (#1626)
- No color change in the appointment modal window (in the backend calendar) (#1641)
- The plain user password might appear in the log messages in case of an error (#1590)
- Fix loop when going a month back in an edge case (#1577)
- Dedicated provider links do not pre-select the relevant provider on the booking page (#1651)
- Correct the service / provider booking header display (#1650)



## [1.5.0] - 2024-07-07

### Added
Expand Down
4 changes: 2 additions & 2 deletions application/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
|
*/

$config['version'] = '1.5.0'; // This must be changed manually.
$config['version'] = '1.5.1'; // This must be changed manually.

$config['url'] = Config::BASE_URL;

$config['debug'] = Config::DEBUG_MODE;

$config['cache_busting_token'] = 'ZV954';
$config['cache_busting_token'] = 'TSJ77';
47 changes: 31 additions & 16 deletions application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

$domain = $_SERVER['HTTP_HOST'] ?? 'localhost';

$request_uri = dirname($_SERVER['SCRIPT_NAME']);
$request_uri = dirname($_SERVER['SCRIPT_NAME'] ?? 'index.php');

if ($request_uri === '.') {
$request_uri = '';
}

$config['base_url'] = trim($protocol . $domain . $request_uri, '/');
$config['base_url'] = !is_cli() ? trim($protocol . $domain . $request_uri, '/') : Config::BASE_URL;

/*
|--------------------------------------------------------------------------
Expand All @@ -53,7 +53,7 @@
| URI string. The default setting of 'AUTO' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO' Default - auto detects
| 'AUTO' Default - auto-detects
| 'PATH_INFO' Uses the PATH_INFO
| 'QUERY_STRING' Uses the QUERY_STRING
| 'REQUEST_URI' Uses the REQUEST_URI
Expand Down Expand Up @@ -87,47 +87,55 @@
*/

$languages = [
'sq' => 'albanian',
'ar' => 'arabic',
'bs' => 'bosnian',
'bu' => 'bulgarian',
'ca' => 'catalan',
'zh' => 'chinese',
'hr' => 'croatian',
'cs' => 'czech',
'da' => 'danish',
'nl' => 'dutch',
'de' => 'german',
'el' => 'greek',
'en' => 'english',
'es' => 'spanish',
'et' => 'estonian',
'fa' => 'persian',
'fi' => 'finnish',
'fr' => 'french',
'de' => 'german',
'el' => 'greek',
'he' => 'hebrew',
'hi' => 'hindi',
'hr' => 'croatian',
'hu' => 'hungarian',
'it' => 'italian',
'ja' => 'japanese',
'fa' => 'persian',
'lb' => 'luxembourgish',
'lt' => 'lithuanian',
'lv' => 'latvian',
'mr' => 'marathi',
'nl' => 'dutch',
'no' => 'norwegian',
'pl' => 'polish',
'pt' => 'portuguese',
'ro' => 'romanian',
'ru' => 'russian',
'rs' => 'serbian',
'ru' => 'russian',
'sk' => 'slovak',
'es' => 'spanish',
'sl' => 'slovenian',
'sv' => 'swedish',
'th' => 'thai',
'tr' => 'turkish',
'zh' => 'chinese',
];

$config['language_codes'] = $languages;

$language_code = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) : 'en';

$config['language'] = isset($_SERVER['HTTP_ACCEPT_LANGUAGE'], $languages[$language_code])
? $languages[$language_code]
: Config::LANGUAGE;
$config['language'] =
$_GET['language'] ??
(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'], $languages[$language_code])
? $languages[$language_code]
: Config::LANGUAGE);

$config['language_code'] = array_search($config['language'], $languages) ?: 'en';

Expand All @@ -142,7 +150,9 @@
|
*/
$config['available_languages'] = [
'albanian',
'arabic',
'bosnian',
'bulgarian',
'catalan',
'chinese',
Expand All @@ -161,8 +171,11 @@
'hungarian',
'italian',
'japanese',
'latvian',
'lithuanian',
'luxembourgish',
'marathi',
'norwegian',
'persian',
'polish',
'portuguese',
Expand All @@ -171,9 +184,11 @@
'russian',
'serbian',
'slovak',
'slovenian',
'spanish',
'swedish',
'thai',
'traditional-chinese',
'turkish',
];

Expand Down Expand Up @@ -223,7 +238,7 @@
| characters they will get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
| as few characters as possible. By default, only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
Expand Down Expand Up @@ -452,7 +467,7 @@
|--------------------------------------------------------------------------
|
| Toggle the rate limiting feature in your application. Using rate limiting
| will control the number of requests a client can sent to the app.
| will control the number of requests a client can send to the app.
|
*/
$config['rate_limiting'] = true;
Expand Down
14 changes: 7 additions & 7 deletions application/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['autoinit'] Whether or not to automatically initialize the database.
| ['autoinit'] Whether to automatically initialize the database.
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
|
Expand All @@ -47,23 +47,23 @@
*/

$active_group = 'default';
$query_builder = TRUE;
$query_builder = true;

$db['default']['hostname'] = Config::DB_HOST;
$db['default']['username'] = Config::DB_USERNAME;
$db['default']['password'] = Config::DB_PASSWORD;
$db['default']['database'] = Config::DB_NAME;
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = 'ea_';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['pconnect'] = true;
$db['default']['db_debug'] = true;
$db['default']['cache_on'] = false;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_unicode_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$db['default']['autoinit'] = true;
$db['default']['stricton'] = false;

/* End of file database.php */
/* Location: ./application/config/database.php */
6 changes: 3 additions & 3 deletions application/config/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| whenever you intend to do a schema migration.
|
*/
$config['migration_enabled'] = TRUE;
$config['migration_enabled'] = true;

/*
|--------------------------------------------------------------------------
Expand All @@ -28,9 +28,9 @@
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Path to your "migrations" folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
| Also, writing permission is required within the "migrations" path.
|
*/
$config['migration_path'] = APPPATH . 'migrations/';
Expand Down
2 changes: 1 addition & 1 deletion application/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

route_api_resource($route, 'admins', 'api/v1/');

route_api_resource($route, 'categories', 'api/v1/');
route_api_resource($route, 'service_categories', 'api/v1/');

route_api_resource($route, 'customers', 'api/v1/');

Expand Down
13 changes: 13 additions & 0 deletions application/controllers/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,17 @@ class Account extends EA_Controller
'language',
'settings',
];

public array $optional_user_fields = [
//
];

public array $allowed_user_setting_fields = ['username', 'password', 'notifications', 'calendar_view'];

public array $optional_user_setting_fields = [
//
];

/**
* Account constructor.
*/
Expand Down Expand Up @@ -110,8 +119,12 @@ public function save(): void

$this->users_model->only($account, $this->allowed_user_fields);

$this->users_model->optional($account, $this->optional_user_fields);

$this->users_model->only($account['settings'], $this->allowed_user_setting_fields);

$this->users_model->optional($account['settings'], $this->optional_user_setting_fields);

if (empty($account['password'])) {
unset($account['password']);
}
Expand Down
12 changes: 12 additions & 0 deletions application/controllers/Admins.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ class Admins extends EA_Controller
'settings',
];

public array $optional_admin_fields = [
//
];

public array $allowed_admin_setting_fields = ['username', 'password', 'notifications', 'calendar_view'];

public array $optional_admin_setting_fields = [
//
];

/**
* Admins constructor.
*/
Expand Down Expand Up @@ -139,8 +147,12 @@ public function store(): void

$this->admins_model->only($admin, $this->allowed_admin_fields);

$this->admins_model->optional($admin, $this->optional_admin_fields);

$this->admins_model->only($admin['settings'], $this->allowed_admin_setting_fields);

$this->admins_model->optional($admin['settings'], $this->optional_admin_setting_fields);

$admin_id = $this->admins_model->save($admin);

$admin = $this->admins_model->find($admin_id);
Expand Down
Loading

0 comments on commit e7215b8

Please sign in to comment.