Skip to content

Commit

Permalink
Merge branch 'release-4.8.7' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	HISTORY.txt
#	package.json
#	textpattern/checksums.txt
#	textpattern/index.php
#	textpattern/setup/lang/en.ini
#	textpattern/setup/themes/four-point-nine/manifest.json
#	textpattern/setup/themes/zero/manifest.json
#	textpattern/textpattern.js
#	textpattern/vendors/Textpattern/DB/Data/core.prefs
  • Loading branch information
petecooper committed May 30, 2021
2 parents 602e641 + 3e4373f commit 0963e24
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 216 deletions.
2 changes: 1 addition & 1 deletion HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Changes in 4.9.0 (upcoming)
* Changed: Plugins of all types trigger verify step.
* jQuery 3.6.0.

Changes in 4.8.7 (upcoming)
Changes in 4.8.7 (30 May 2021)

* High priority maintenance release to address functionality and setup issues
discovered after 4.8.6 release.
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Textpattern CMS 4.8.6
Textpattern CMS 4.8.7

== Install ==

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Ensure the server meets or exceeds the [system requirements](https://textpattern

## Download Textpattern

The current production release is version 4.8.6. It can be downloaded from the Textpattern website or GitHub in .zip and .tar.gz varieties.
The current production release is version 4.8.7. It can be downloaded from the Textpattern website or GitHub in .zip and .tar.gz varieties.

If you want to use the multi-site functionality in Textpattern, get the .tar.gz archive.

| | textpattern.com | GitHub |
|--------|:-------:|:-----:|
| .zip | [Download](https://textpattern.com/file_download/111/textpattern-4.8.6.zip) | [Download](https://github.com/textpattern/textpattern/releases/download/4.8.6/textpattern-4.8.6.zip) |
| .tar.gz | [Download](https://textpattern.com/file_download/110/textpattern-4.8.6.tar.gz) | [Download](https://github.com/textpattern/textpattern/releases/download/4.8.6/textpattern-4.8.6.tar.gz) |
| .zip | [Download](https://textpattern.com/file_download/113/textpattern-4.8.7.zip) | [Download](https://github.com/textpattern/textpattern/releases/download/4.8.7/textpattern-4.8.7.zip) |
| .tar.gz | [Download](https://textpattern.com/file_download/112/textpattern-4.8.7.tar.gz) | [Download](https://github.com/textpattern/textpattern/releases/download/4.8.7/textpattern-4.8.7.tar.gz) |


## Install Textpattern
Expand Down Expand Up @@ -112,8 +112,8 @@ npm run get-dependencies
To request a specific tag or branch:

```ShellSession
npm run get-default-theme 4.8.6
npm run get-classic-admin-theme 4.8.6
npm run get-default-theme 4.8.7
npm run get-classic-admin-theme 4.8.7
npm run get-classic-admin-theme 4.8.x
npm run get-hive-admin-theme 4.8.x
npm run get-textpacks 4.8.x
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Textpattern CMS 4.8.6
Textpattern CMS 4.8.7

Released under the GNU General Public License.
See LICENSE.txt for terms and conditions.
Expand Down
2 changes: 1 addition & 1 deletion UPGRADE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Textpattern CMS 4.8.6
Textpattern CMS 4.8.7

== Upgrade ==

Expand Down
205 changes: 48 additions & 157 deletions textpattern/checksums.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion textpattern/include/txp_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function author_list($message = '')
),
);

$sql_from = 'txp_users';
$sql_from = safe_pfx('txp_users');

callback_event_ref('user', 'fields', 'list', $fields);
callback_event_ref('user', 'from', 'list', $sql_from);
Expand Down
10 changes: 0 additions & 10 deletions textpattern/lib/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,16 +709,6 @@

define('REQUIRED_OPENSSL_VERSION', '268439567');

/**
* Required and recommended SQL permissions.
*
* @since 4.8.6
* @package System
*/

define('REQUIRED_SQL_GRANTS', 'SELECT, CREATE, ALTER, INSERT, UPDATE, DELETE, DROP, INDEX, LOCK TABLES');
define('RECOMMENDED_SQL_GRANTS', REQUIRED_SQL_GRANTS.', CREATE TEMPORARY TABLES, CREATE VIEW');

/**
* File integrity status good.
*
Expand Down
4 changes: 3 additions & 1 deletion textpattern/lib/txplib_misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5305,7 +5305,9 @@ function get_context($context = true, $internals = array('id', 's', 'c', 'contex
$out = array();

foreach ($context as $q => $v) {
if (isset($pretext[$q]) && in_array($q, $internals)) {
if (isset($v)) {
$out[$q] = $v;
} elseif (isset($pretext[$q]) && in_array($q, $internals)) {
$out[$q] = $q === 'author' ? $pretext['realname'] : $pretext[$q];
} else {
$out[$q] = gps($q, $v);
Expand Down
6 changes: 4 additions & 2 deletions textpattern/setup/lang/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ creating_db_tables="Creating database tables"
db_cant_connect="Cannot connect to database"
db_connected="Connected"
db_doesnt_exist="Database <strong>{dbname}</strong> does not exist or your specified user name does not have permission to access it."
db_must_exist="Note that the database you specify must already exist, Textpattern will not create it."
did_it="I did it"
download="Download"
email_required="Please provide a valid email address."
Expand All @@ -35,6 +34,7 @@ multisite_admin_domain="Admin subdomain"
multisite_config="Multi-site installation details"
multisite_cookie_domain="Cookie domain (usually main domain)"
multisite_please_enter_details="Please enter domain info for this site’s admin area."
mysql_create="Create database?"
mysql_database="MySQL database"
mysql_login="MySQL user name"
mysql_password="MySQL password"
Expand All @@ -53,6 +53,8 @@ progress_steps="There are 4 steps to this installation process:"
public_theme="Public theme"
required="Required"
setup_comment_invite="Comment"
setup_db_create="Create if needed"
setup_db_none="No, I've created it already"
setup_help="Help"
setup_login="Choose a login name"
setup_show_password="Show password"
Expand All @@ -64,7 +66,7 @@ tables_exist="It appears the tables in <strong>{dbname}</strong> already exist.
table_prefix="Table prefix (optional)"
thanks_for_interest="Thank you for your interest in Textpattern"
that_went_well="That went well!"
using_db="Using {dbname}."
using_db="Using <strong>{dbname} ({charset})</strong>."
warn_mail_unavailable="Your PHP installation is missing the <code>mail()</code> function. Therefore no emails can be sent from Textpattern, which limits certain functionality."
welcome_to_textpattern="Welcome to Textpattern"
your_email="Your email address"
Expand Down
25 changes: 0 additions & 25 deletions textpattern/setup/setup_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,31 +348,6 @@ function setup_connect()

echo msg(gTxt('db_connected'));

// Check user database GRANT permissions.
$result = mysqli_query($mylink, "SELECT PRIVILEGE_TYPE FROM INFORMATION_SCHEMA.USER_PRIVILEGES WHERE GRANTEE = \"'".mysqli_real_escape_string($mylink, $cfg['database']['user'])."'@'".mysqli_real_escape_string($mylink, $dhost)."'\"");

if (mysqli_num_rows($result) > 0) {
$grants = array();

while ($a = mysqli_fetch_assoc($result)) {
$grants[] = array_shift($a);
}

mysqli_free_result($result);

$missing = array_diff(do_list(REQUIRED_SQL_GRANTS), $grants);

if (!empty($missing)) {
msg(gTxt('db_insufficient_grants',
array(
'{user}' => txpspecialchars($cfg['database']['user'].'@'.$dhost),
'{privs}' => txpspecialchars(implode(', ', $missing)),
)),
MSG_ERROR, true
);
}
}

if (!($cfg['database']['table_prefix'] == '' || preg_match('#^[a-zA-Z_][a-zA-Z0-9_]*$#', $cfg['database']['table_prefix']))) {
msg(gTxt('prefix_bad_characters',
array('{dbprefix}' => txpspecialchars($cfg['database']['table_prefix']))),
Expand Down
2 changes: 1 addition & 1 deletion textpattern/setup/themes/four-point-nine/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"description": "The default theme shipped with Textpattern CMS 4.9.",
"author": "Team Textpattern",
"author_uri": "https://github.com/textpattern/textpattern-default-theme"
}
}
14 changes: 4 additions & 10 deletions textpattern/textpattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ jQuery.fn.txpAsyncForm = function (options) {
{
data : typeof extra.form !== 'undefined' ? extra.form : ( typeof window.FormData === 'undefined' ? $this.serialize() : new FormData(this) ),
extra : new Object,
spinner: typeof extra['_txp_spinner'] !== 'undefined' ? $(extra['_txp_spinner']) : $('<span class="spinner-sticker" /><span class="spinner ui-icon ui-icon-refresh" />')
spinner: typeof extra['_txp_spinner'] !== 'undefined' ? $(extra['_txp_spinner']) : $('<span />').addClass('spinner ui-icon ui-icon-refresh')
};

$inputs.prop('disabled', false);// Safari workaround.
Expand Down Expand Up @@ -1584,13 +1584,7 @@ $(document).keydown(function (e) {
if (obj.length)
{
e.preventDefault();
var target = obj.attr('form');

if(typeof target !== 'undefined') {
$('#' + target).submit();
} else {
obj.eq(0).closest('form').submit();
}
obj.eq(0).closest('form').submit();
}
}
});
Expand Down Expand Up @@ -2696,8 +2690,8 @@ $(document).ready(function () {
textpattern.Relay.callback('updateList', {data: $(this).serializeArray()});
}).on('submit', 'form.txp-search', function(e) {
e.preventDefault();
if ($(this).find('input[name="crit"]').val()) $(this).find('.txp-search-clear').removeClass('hidden');
else $(this).find('.txp-search-clear').addClass('hidden');
if ($(this).find('input[name="crit"]').val()) $(this).find('.txp-search-clear').removeClass('ui-helper-hidden');
else $(this).find('.txp-search-clear').addClass('ui-helper-hidden');
textpattern.Relay.callback('updateList', {data: $(this).serializeArray()});
}).on('updateList', '#txp-list-container', function() {
if ($(this).find('.multi_edit_form').txpMultiEditForm('select', {value: textpattern.Relay.data.selected}).find('table.txp-list').txpColumnize().length == 0) {
Expand Down

0 comments on commit 0963e24

Please sign in to comment.