Skip to content

Commit

Permalink
Adding the public release of 7.7 onto the GitHub repo.
Browse files Browse the repository at this point in the history
This version has the following changes and new features:

- A redesigned admin toolbar.
- Lazy-loading of images available to Multiple Image Container plugins.
- Untranslated "placeholder" pages for multi-lingual sites.
- The ability for visitors to see "embed" links.

For more information please see http://zenar.io/zenario-77


Excluding patch releases, this will be the last release for
the Zenario 7 line.

The next major release will be Zenario 8.0; expect to see a change log
for this at some point in the next few weeks.
  • Loading branch information
Chris-Turnbull committed Sep 15, 2017
1 parent 68113de commit cb25f8c
Show file tree
Hide file tree
Showing 2,243 changed files with 160,599 additions and 33,065 deletions.
21 changes: 12 additions & 9 deletions .htaccess
Expand Up @@ -8,17 +8,11 @@ Options -Indexes
ModPagespeed off
</IfModule>

<IfModule mod_deflate.c>
#SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/css text/csv text/html text/plain text/xml text/javascript application/javascript application/x-javascript
php_flag zlib.output_compression Off
</IfModule>
<IfModule !mod_deflate.c>
php_flag zlib.output_compression On
</IfModule>

<IfModule mod_expires.c>
AddType application/font-woff .woff
AddType text/css .css
AddType text/javascript .js


ExpiresActive On
ExpiresByType application/font-woff "access plus 1 month"
Expand All @@ -33,6 +27,15 @@ Options -Indexes
ExpiresByType application/javascript "access plus 1 month"
</IfModule>

<IfModule mod_deflate.c>
#SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/css text/csv text/html text/plain text/xml text/javascript application/javascript application/x-javascript
php_flag zlib.output_compression Off
</IfModule>
<IfModule !mod_deflate.c>
php_flag zlib.output_compression On
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On

Expand Down
16 changes: 14 additions & 2 deletions composer.json
Expand Up @@ -6,12 +6,24 @@
"homepage": "https://github.com/TribalSystems/Zenario",
"license": "MIT",
"require": {
"cboden/ratchet": "*",
"defuse/php-encryption": "^2.0",
"mongodb/mongodb": "^1.0.0",
"php-amqplib/php-amqplib": "2.5.*",
"ps/image-optimizer": "*"
"powder96/numbers.php": "@dev",
"ps/image-optimizer": "*",
"textalk/websocket": "*",
"twig/twig": "^2.0"
},
"_temporarily_removed": {
"duoshuo/php-cassandra": "dev-master",
"kachkaev/php-r": "dev-master"
},
"autoload": {
"psr-4": { "Ze\\": "zenario/autoload" }
},
"config": {
"vendor-dir": "zenario/libraries/by_vendor"
"vendor-dir": "zenario/libraries/by_vendor",
"optimize-autoloader": true
}
}
51 changes: 27 additions & 24 deletions zenario/admin/admin_boxes.ajax.php
Expand Up @@ -46,7 +46,7 @@
$mode = false;
$tagPath = '';
$modules = array();
$debugMode = (bool) get('_debug');
$debugMode = (bool) ($_GET['_debug'] ?? false);
$loadDefinition = true;
$settingGroup = '';
$compatibilityClassNames = array();
Expand All @@ -60,7 +60,7 @@


//If this isn't the first load, attempt to load the defintion from the Storage
if (!post('_fill') && !$debugMode) {
if (!($_POST['_fill'] ?? false) && !$debugMode) {
//Load the information that we have from the client
if (empty($_POST['_box'])) {
echo adminPhrase('An error occurred when syncing this floating admin box with the server.');
Expand All @@ -87,18 +87,18 @@
//The Plugin Settings Admin Boxes are a special case for looking up XML files.
//They need to include the Settings from the Plugin in question, and any modules it is compatable with
if ($requestedPath == 'plugin_settings') {
if (get('refiner__nest') && get('id')) {
$egg = getNestDetails(get('id'), get('refiner__nest'));
if (($_GET['refiner__nest'] ?? false) && ($_GET['id'] ?? false)) {
$egg = getNestDetails($_GET['id'] ?? false, ($_GET['refiner__nest'] ?? false));
$module = getModuleDetails($egg['module_id']);

} elseif (!get('instanceId') && get('refiner__plugin')) {
$module = getModuleDetails(get('refiner__plugin'));
} elseif (!($_GET['instanceId'] ?? false) && ($_GET['refiner__plugin'] ?? false)) {
$module = getModuleDetails($_GET['refiner__plugin'] ?? false);

} elseif (get('moduleId')) {
$module = getModuleDetails(get('moduleId'));
} elseif ($_GET['moduleId'] ?? false) {
$module = getModuleDetails($_GET['moduleId'] ?? false);

} else {
$module = getPluginInstanceDetails(ifNull(get('instanceId'), get('id')));
$module = getPluginInstanceDetails(ifNull($_GET['instanceId'] ?? false, ($_GET['id'] ?? false)));
}

if ($module) {
Expand All @@ -111,7 +111,7 @@
}

} elseif ($requestedPath == 'site_settings') {
$settingGroup = request('id');
$settingGroup = $_REQUEST['id'] ?? false;
}


Expand Down Expand Up @@ -201,12 +201,12 @@
exit;

//Special logic for Validating and Saving
} elseif (!post('_fill')) {
} elseif (!($_POST['_fill'] ?? false)) {
$doSave = false;
$doFormat = true;
$errorsReset = false;

if (post('_read_values')) {
if ($_POST['_read_values'] ?? false) {
//Given the JSON object for an Admin Box, strip everything out and just return the tabs/values
$fields = array();
$values = array();
Expand All @@ -231,7 +231,7 @@
jsonEncodeForceObject($values2d);
exit;

} else if (post('_validate') || post('_save') || post('_download')) {
} else if (($_POST['_validate'] ?? false) || ($_POST['_save'] ?? false) || ($_POST['_download'] ?? false)) {
//Take the current state of the box as a JSON object, and validate it

//Create a (read only) shortcut array to the values
Expand All @@ -245,19 +245,19 @@
if (TUIXLooksLikeFAB($tags)) {
foreach ($tags['tabs'] as $tabName => &$tab) {
//Check if the tab is in edit mode
if (engToBooleanArray($tab, 'edit_mode', 'on')) {
if (engToBoolean($tab['edit_mode']['on'] ?? false)) {
applyValidationFromTUIXOnTab($tab);
}
}
}

//Apply the modules' specific validation
foreach ($modules as $className => &$module) {
$module->validateAdminBox($requestedPath, $settingGroup, $tags, $fields, $values, $changes, (bool) post('_save'));
$module->validateAdminBox($requestedPath, $settingGroup, $tags, $fields, $values, $changes, (bool) ($_POST['_save'] ?? false));
}

//If the Admin is trying to save, and the box was valid, fire the save methods
if (post('_save') || post('_download')) {
if (($_POST['_save'] ?? false) || ($_POST['_download'] ?? false)) {

//Check if there are any errors
if (TUIXLooksLikeFAB($tags)) {
Expand Down Expand Up @@ -291,22 +291,22 @@
'saved' => false
);

if (!post('_download')) {
if (!($_POST['_download'] ?? false)) {
$tags['_sync']['flags']['valid'] = true;
}

$download =
engToBooleanArray($tags, 'download')
engToBoolean($tags['download'] ?? false)
//For backwards compatability with old code
|| engToBooleanArray($tags, 'confirm', 'download');
|| engToBoolean($tags['confirm']['download'] ?? false);

//Check if a confirmation is needed
if (engToBooleanArray($tags, 'confirm', 'show') && !(post('_confirm') || post('_download'))) {
if (engToBoolean($tags['confirm']['show'] ?? false) && !(($_POST['_confirm'] ?? false) || ($_POST['_download'] ?? false))) {
$tags['_sync']['flags']['confirm'] = true;

} else if ($download && !post('_download')) {
} else if ($download && !($_POST['_download'] ?? false)) {
$tags['_sync']['flags']['download'] = true;
$doFormat = post('_save_and_continue');
$doFormat = $_POST['_save_and_continue'] ?? false;

} else {
$fields = array();
Expand Down Expand Up @@ -398,7 +398,7 @@

} else {
$tags['_sync']['flags']['saved'] = true;
$doFormat = post('_save_and_continue');
$doFormat = $_POST['_save_and_continue'] ?? false;
}
}
}
Expand Down Expand Up @@ -546,7 +546,10 @@
$cFieldName = '__custom_field__'. ifNull($cfield['db_column'], $cfield['id']);

if (!isset($tags['tabs'][$cfield['tab_name']])
|| !is_array($tags['tabs'][$cfield['tab_name']])) {
|| !is_array($tags['tabs'][$cfield['tab_name']])
//Drawing of repeating dataset fields not implemented
|| $cfield['type'] == 'repeat_start'
|| $cfield['type'] == 'repeat_end') {
continue;
}
if (!isset($tags['tabs'][$cfield['tab_name']]['fields'])
Expand Down
8 changes: 4 additions & 4 deletions zenario/admin/admin_toolbar.ajax.php
Expand Up @@ -40,7 +40,7 @@
$mode = false;
$tagPath = '';
$modules = array();
$debugMode = (bool) get('_debug');
$debugMode = (bool) ($_GET['_debug'] ?? false);
$loadDefinition = true;
$settingGroup = '';
$compatibilityClassNames = array();
Expand Down Expand Up @@ -101,20 +101,20 @@

//Apply the modules' specific logic
foreach ($modules as $className => &$module) {
$module->fillAdminToolbar($tags, (int) request('cID'), request('cType'), (int) request('cVersion'));
$module->fillAdminToolbar($tags, (int) ($_REQUEST['cID'] ?? false), ($_REQUEST['cType'] ?? false), (int) ($_REQUEST['cVersion'] ?? false));
}



//Display the output as JSON
header('Content-Type: text/javascript; charset=UTF-8');

if (request('_script')) {
if ($_REQUEST['_script'] ?? false) {
echo 'zenarioAT.init2(';
}

jsonEncodeForceObject($tags);

if (request('_script')) {
if ($_REQUEST['_script'] ?? false) {
echo ');';
}
10 changes: 5 additions & 5 deletions zenario/admin/db_updates/latest_revision_no.inc.php
Expand Up @@ -27,15 +27,15 @@
*/
if (!defined('NOT_ACCESSED_DIRECTLY')) exit('This file may not be directly accessed');

define('LATEST_REVISION_NO', 40196); //N.b. 7.7 starts at revision #40300
define('LATEST_BIG_CHANGE_REVISION_NO', 40191);
define('LATEST_REVISION_NO', 41253); //N.b. 8.0 starts at revision #41550
define('LATEST_BIG_CHANGE_REVISION_NO', 41252);
define('INSTALLER_REVISION_NO', 33430);
define('INSTALLER_DEFAULT_THEME', 'duke_street');

define('ZENARIO_MAJOR_VERSION', '7');
define('ZENARIO_MINOR_VERSION', '6');
define('ZENARIO_REVISION', '42591');
define('ZENARIO_VERSION', '7.6');
define('ZENARIO_MINOR_VERSION', '7');
define('ZENARIO_REVISION', '42682');
define('ZENARIO_VERSION', '7.7');
define('ZENARIO_IS_HEAD', false);

define('TINYMCE_DIR', 'zenario/libraries/lgpl/tinymce_4_5_7/');

0 comments on commit cb25f8c

Please sign in to comment.