Skip to content

Commit

Permalink
Merge pull request #262 from robiso/develop
Browse files Browse the repository at this point in the history
Rock and roll with version 3.3.2.

Thanks to all contributors! Special props to @slavenstancic 😍
  • Loading branch information
robiso committed May 22, 2022
2 parents 9e0a48b + 3659ab7 commit 7618737
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Expand Up @@ -3,7 +3,7 @@
<img src="https://github.com/robiso/wondercms-cdn-files/blob/master/logo.svg?raw=true" alt="WonderCMS logo" title="WonderCMS" align="center" height="150" />
</a>
<br>WonderCMS - Free Website Builder<br>
<sup>Smallest CMS (5 files • 40KB zip) - 1 step install</sup>
<sup>Smallest CMS (5 files • 48KB zip) - 1 step install</sup>
</h1>

<p align="center"><a href="https://github.com/robiso/wondercms/wiki#wondercms-documentation"><img src="https://camo.githubusercontent.com/45b2b4156eee6b315080fad3c417be62fb10b7d3/68747470733a2f2f696d672e736869656c64732e696f2f72656164746865646f63732f7069702f737461626c652e7376673f6c6f6e6743616368653d7472756526763d313030" alt="Docs" data-canonical-src="https://img.shields.io/readthedocs/pip/stable.svg?longCache=true&amp;v=100" style="max-width:100%;"></a>
Expand Down
14 changes: 11 additions & 3 deletions index.php
Expand Up @@ -7,7 +7,7 @@
*/

session_start();
define('VERSION', '3.3.1');
define('VERSION', '3.3.2');
mb_internal_encoding('UTF-8');

if (defined('PHPUNIT_TESTING') === false) {
Expand Down Expand Up @@ -789,12 +789,14 @@ public function deletePageKey(array $slugTree, string $fieldname): void
}

unset($selectedPage->{$slug}->{$fieldname});
$this->save();
}

/**
* Delete existing page by slug
*
* @param array|null $slugTree
* @throws Exception
*/
public function deletePageFromDb(array $slugTree = null): void
{
Expand All @@ -808,13 +810,15 @@ public function deletePageFromDb(array $slugTree = null): void
}

unset($selectedPage->{$slug});
$this->save();
}

/**
* Update existing page slug
*
* @param array $slugTree
* @param string $newSlugName
* @throws Exception
*/
public function updatePageSlug(array $slugTree, string $newSlugName): void
{
Expand Down Expand Up @@ -1275,6 +1279,10 @@ private function updateModulesCache(): void
{
$wcmsModules = trim($this->getFileFromRepo('wcms-modules.json', self::WCMS_CDN_REPO));
$jsonObject = json_decode($wcmsModules);
if (empty($jsonObject)) {
return;
}

$parsedCache = $this->moduleCacheMapper($jsonObject);
if (empty($parsedCache)) {
return;
Expand Down Expand Up @@ -2151,7 +2159,7 @@ public function settings(): string
<div id="save" class="loader-overlay"><h2><i class="animationLoader"></i><br />Saving</h2></div>
<div id="cache" class="loader-overlay"><h2><i class="animationLoader"></i><br />Checking for updates</h2></div>
<div id="adminPanel">
<a data-toggle="wcms-modal" class="wbtn wbtn-secondary wbtn-sm settings button" href="#settingsModal"><i class="settingsIcon"></i> Settings </a> <a href="' . self::url('logout&token=' . $this->getToken()) . '" class="wbtn wbtn-danger wbtn-sm button logout" title="Logout" onclick="return confirm(\'Log out?\')"><i class="logoutIcon"></i></a>
<a data-toggle="wcms-modal" class="wbtn wbtn-secondary wbtn-sm settings button" href="#settingsModal"><i class="settingsIcon"></i> Settings </a> <a href="' . self::url('logout?token=' . $this->getToken()) . '" class="wbtn wbtn-danger wbtn-sm button logout" title="Logout" onclick="return confirm(\'Log out?\')"><i class="logoutIcon"></i></a>
<div class="wcms-modal modal" id="settingsModal">
<div class="modal-dialog modal-xl">
<div class="modal-content">
Expand Down Expand Up @@ -2775,7 +2783,7 @@ public static function url(string $location = ''): string
}

return ($showHttps ? 'https' : 'http')
. '://' . $_SERVER['SERVER_NAME']
. '://' . ($_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'])
. ((($_SERVER['SERVER_PORT'] == '80') || ($_SERVER['SERVER_PORT'] == '443')) ? '' : ':' . $_SERVER['SERVER_PORT'])
. ((dirname($_SERVER['SCRIPT_NAME']) === '/') ? '' : dirname($_SERVER['SCRIPT_NAME']))
. '/' . $location;
Expand Down
2 changes: 1 addition & 1 deletion version
@@ -1 +1 @@
3.3.1
3.3.2

0 comments on commit 7618737

Please sign in to comment.