Skip to content

Commit 4c3ff53

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.3
2 parents 4a6fa4c + 3459fed commit 4c3ff53

19 files changed

Lines changed: 89 additions & 45 deletions

File tree

.github/scripts/deploy-userguide

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ cd $TARGET
2323
git checkout master
2424
rm -rf docs
2525

26+
# Copy common files
27+
cp -Rf ${SOURCE}/LICENSE ./
28+
29+
# Copy repo-specific files
30+
cp -Rf ${SOURCE}/admin/userguide/. ./
31+
2632
# Copy files
2733
cp -Rf ${SOURCE}/user_guide_src/build/html ./docs
2834
cp -Rf ${SOURCE}/user_guide_src/build/epub/CodeIgniter.epub ./CodeIgniter${VERSION}.epub

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2019 British Columbia Institute of Technology
4-
Copyright (c) 2019-2022 CodeIgniter Foundation
4+
Copyright (c) 2019-2023 CodeIgniter Foundation
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh -e
2+
3+
# Deploys the User Guide to the production
4+
# website. Triggered by updates to the GitHub
5+
# repo's master branch.
6+
7+
REPO=/opt/userguide
8+
SITE=/home/public_html/userguides/userguide4
9+
10+
cd "$REPO"
11+
git switch master
12+
git pull
13+
14+
rm -rf "$SITE"
15+
cp -R "$REPO/docs" "$SITE"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Deploys the User Guide to the production
2+
# website whenever master branch is updated
3+
name: Deploy Production
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: executing remote ssh commands using ssh key
16+
uses: appleboy/ssh-action@master
17+
with:
18+
host: ${{ secrets.HOST }}
19+
username: ${{ secrets.USERNAME }}
20+
key: ${{ secrets.KEY }}
21+
port: ${{ secrets.PORT }}
22+
script: /opt/userguide/.github/scripts/deploy

admin/userguide/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*/config/development
2+
*/logs/log-*.php
3+
!*/logs/index.html
4+
*/cache/*
5+
!*/cache/index.html
6+
!*/cache/.htaccess
7+
8+
user_guide_src/build/*
9+
user_guide_src/cilexer/build/*
10+
user_guide_src/cilexer/dist/*
11+
user_guide_src/cilexer/pycilexer.egg-info/*
12+
13+
/vendor/

admin/userguide/README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
# CodeIgniter 4 User Guide
22

3-
## What is CodeIgniter?
4-
5-
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure.
3+
CodeIgniter 4 is a PHP web framework that is light, fast, flexible, and secure.
64
More information can be found at the [official site](http://codeigniter.com).
75

8-
This repository holds a composer-installable pre-built user guide for the framework.
9-
It has been built from the
10-
[development repository](https://github.com/codeigniter4/CodeIgniter4).
11-
12-
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
13-
14-
## Installation & updates
6+
**This is a read-only repository used to publish the user guide for the current release.**
7+
It is built automatically as part of the framework release workflow, and pull
8+
requests are not accepted here.
159

16-
`composer require codeigniter4/userguide` will install a copy
17-
of the user guide inside your project, at
18-
`vendor/codeigniter4/userguide`. You can then `composer update` whenever
19-
there is a new release of the framework.
10+
Development is done in the [main repository](https://github.com/codeigniter4/codeigniter4).
11+
If you find problems with the user guide, please submit a correcting pull request there.
2012

13+
If you feel that features are missing or unclear, please comment on our
14+
[forum](https://forum.codeigniter.com/index.php),
15+
in the appropriate CodeIgniter4 subforum.

admin/userguide/composer.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/Config/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Cache extends BaseConfig
122122
*
123123
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
124124
*
125-
* @var array<string, boolean|int|string>
125+
* @var array<string, bool|int|string>
126126
*/
127127
public array $memcached = [
128128
'host' => '127.0.0.1',

system/CLI/CLI.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,10 @@ public static function init()
161161
static::parseCommandLine();
162162

163163
static::$initialized = true;
164-
} else {
164+
} elseif (! defined('STDOUT')) {
165165
// If the command is being called from a controller
166166
// we need to define STDOUT ourselves
167+
// For "! defined('STDOUT')" see: https://github.com/codeigniter4/CodeIgniter4/issues/7047
167168
define('STDOUT', 'php://output'); // @codeCoverageIgnore
168169
}
169170
}

system/Email/Email.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,11 @@ protected function getHostname()
21012101
return '[' . $_SERVER['SERVER_ADDR'] . ']';
21022102
}
21032103

2104+
$hostname = gethostname();
2105+
if ($hostname !== false) {
2106+
return $hostname;
2107+
}
2108+
21042109
return '[127.0.0.1]';
21052110
}
21062111

0 commit comments

Comments
 (0)