Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the ckeditor url to the latest version #1065

Open
wants to merge 3 commits into
base: release-3.7.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
<!---Thanks for contributing to phpList!-->
<!--- Thanks for contributing to phpList!-->

## Description
<!--- Please provide a general description of your changes in the Pull Request -->

## Contributor License Agreement

<!--

before we can accept your PR, if you haven't done this yet, please sign the

Contributor License Agreement at https://www.phplist.com/cla

Many thanks

the phpList Team

-->


## Related Issue


Expand Down
17 changes: 16 additions & 1 deletion public_html/lists/admin/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ function output($message)
cl_output(s('Creating new table "admin_login"'));
createTable('admin_login');
## add an entry for current admin to avoid being kicked out
Sql_Query(sprintf('insert into %s (moment,adminid,remote_ip4,remote_ip6,sessionid,active)
Sql_Query(sprintf('insert into %s (moment,adminid,remote_ip4,remote_ip6,sessionid,active)
values(%d,%d,"%s","%s","%s",1)',
$GLOBALS['tables']['admin_login'],time(),$_SESSION['logindetails']['id'],$_SESSION['adminloggedin'],"",session_id()));
}
Expand Down Expand Up @@ -370,6 +370,21 @@ function output($message)
));
}

if (isset($plugins['CKEditorPlugin'])) {
// Update the version of CKEditor if the CDN is being used
$latestUrl = $plugins['CKEditorPlugin']->settings['ckeditor_url']['value'];

if (preg_match('/\d+\.\d+\.\d+/', $latestUrl, $matches)) {
$latestVersion = $matches[0];
$currentUrl = getConfig('ckeditor_url');

if (strpos($currentUrl, 'cdn.ckeditor.com') !== false) {
$newUrl = preg_replace('/\d+\.\d+\.\d+/', $latestVersion, $currentUrl);
SaveConfig('ckeditor_url', $newUrl);
}
}
}

//# longblobs are better at mixing character encoding. We don't know the encoding of anything we may want to store in cache
//# before converting, it's quickest to clear the cache
clearPageCache();
Expand Down
Loading