Skip to content

Commit 03a977b

Browse files
authored
Merge pull request #826 from ExpressionEngine/7.dev
Pushing 7.4.4 change log and docs live
2 parents 1b46746 + d4a5f44 commit 03a977b

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed

docs/development/legacy/libraries/output.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ Example:
159159

160160
NOTE: **Note:** Calling this method manually without aborting script execution will result in duplicated output.
161161

162-
### `send_ajax_response($msg, [$error = false])`
162+
### `send_ajax_response($msg, [$statusCode = false])`
163163

164164
| Parameter | Type | Description |
165165
| --------- | -------- | -------------------- |
166166
| \$msg | `Array` | Object to be sent to the client. |
167-
| \$error | `Bool` | TRUE to set header status to `500` |
167+
| \$error | `Bool|Int` | HTTP status code. If `false`, status code is `200`. If `true`, status code is 500 |
168168
| Returns | `Void` | void |
169169

170170
Calling this method encode the given `$msg` parameter and will set the header `Content-Type: application/json`.
@@ -176,3 +176,22 @@ Example:
176176
'foo' => 'bar'
177177
);
178178
ee()->output->send_ajax_response($output);
179+
180+
With status code (401):
181+
182+
```
183+
$output = array(
184+
'sucess' => 'false',
185+
'message' => 'not allowed',
186+
);
187+
ee()->output->send_ajax_response($output, 401);
188+
```
189+
190+
As error with standard 500 error code:
191+
192+
```
193+
$output = array(
194+
'sucess' => 'false',
195+
'message' => 'not allowed',
196+
);
197+
ee()->output->send_ajax_response($output, true);

docs/general/system-configuration-overrides.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ WARN: **Warning:** This article covers advanced topics.
1919

2020
By default, ExpressionEngine's system settings are managed in the Control Panel and stored in the database, but these settings can be overridden with one of 3 configuration files: the main configuration file, the site index file, and the CP index file.
2121

22+
You can also [set your own global variables](templates/globals/single-variables.md#custom-global-variables) in the above mentioned files.
23+
2224
##### Main configuration file
2325

2426
The **main configuration file**, found at `system/user/config/config.php`, is loaded every time the system is run, meaning that config overrides set in `config.php` always affect the system's configuration.

docs/installation/changelog.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@
88
-->
99
# ExpressionEngine v7 Change Log
1010

11+
## Version 7.4.4
12+
(Release: March 11, 2024)
13+
14+
- **Contributors** 🙌
15+
<div class="max-w-7xl mx-autotext-center">
16+
<div class="space-y-8 sm:space-y-12">
17+
<ul role="list" class="mx-auto grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4 md:gap-x-6 lg:max-w-5xl lg:gap-x-8 lg:gap-y-1 xl:grid-cols-5">
18+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/752126?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">Yuri Salimovskiy</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=intoeetive" target="_BLANK">@intoeetive</a></p></div></div></div></li>
19+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/6020323?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">Doug Black</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=dougblackjr" target="_BLANK">@dougblackjr</a></p></div></div></div></li>
20+
</ul>
21+
</div>
22+
</div>
23+
24+
**Enhancements** 🚀
25+
26+
- Enable setting global variables in config file; [#3015](https://github.com/ExpressionEngine/ExpressionEngine/issues/3015)
27+
28+
**Bug Fixes** 💃🐛
29+
30+
- Resolved issue where Enum validation was not working when using PHP8+
31+
- Resolved [#987](https://github.com/ExpressionEngine/ExpressionEngine/issues/987) where pagination could be wrong on Entry Manager if Categories column present
32+
- Resolved [#4077](https://github.com/ExpressionEngine/ExpressionEngine/issues/4077) where PHP deprecation notice could have been shown for some migrated Pro Variables
33+
- Resolved [#4079](https://github.com/ExpressionEngine/ExpressionEngine/issues/4079) where orphan relationship record could cause PHP notices
34+
- Resolved [#4116](https://github.com/ExpressionEngine/ExpressionEngine/issues/4116) where PHP warning could be shown when using template layouts
35+
36+
**Developers** 💻
37+
38+
- Added ability to send http status code with ajax response, [#4108](https://github.com/ExpressionEngine/ExpressionEngine/issues/4108)
39+
1140
## Version 7.4.3
1241
(Release: March 4, 2024)
1342

docs/templates/globals/single-variables.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,32 @@ NOTE: **Note:** Like the `{current_time}` variable, `{variable_time}` is availab
255255

256256
The email address for the site, as specified in [Email Configuration](control-panel/settings/email.md).
257257

258+
## Custom Global Variables
259+
260+
You can define your own global variables as overrides in your `config.php` file or `index.php` file using `global_vars` property (which itself needs to be an associative array). These variables will be available to all of your templates.
261+
262+
NOTE: Do not confuse these with [Site Template Variables](templates/variable.md), which are defined in the control panel.
263+
264+
When using `index.php` file, you need set `global_vars` property in `$assign_to_config` array. For example:
265+
266+
$assign_to_config['global_vars'] = array(
267+
'show_banner' => 'y',
268+
);
269+
270+
When using `config.php` file, you need to set the `$config` array variable. For example:
271+
272+
$config['global_vars'] = array(
273+
'show_banner' => 'n',
274+
);
275+
276+
You can use the [environment variables](advanced-usage/env-support.md) for the values of global variables. For example:
277+
278+
$config['global_vars'] = array(
279+
'show_banner' => $_ENV['SHOW_BANNER'],
280+
);
281+
282+
Note that the global variables defined in `config.php` file will be overridden by the global variables defined in `index.php` file when a name conflict occurs.
283+
258284
## Member Variables
259285

260286
[TOC=3]

0 commit comments

Comments
 (0)