Skip to content

Commit

Permalink
⚑ πŸ”¨ 🎨 Update CKEditor4 v4.19.0
Browse files Browse the repository at this point in the history
Language (En, Fr, Ja, Pt) + plugin codemirror
  • Loading branch information
gigamaster committed May 26, 2022
1 parent 69455b7 commit 16001e0
Show file tree
Hide file tree
Showing 501 changed files with 21,366 additions and 12,523 deletions.
63 changes: 0 additions & 63 deletions html/class/smarty/plugins/function.ck4dhtmltarea.php

This file was deleted.

20 changes: 0 additions & 20 deletions html/modules/ckeditor4/README.txt

This file was deleted.

65 changes: 36 additions & 29 deletions html/modules/ckeditor4/admin/index.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
<?php

require_once '../../../mainfile.php';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once XOOPS_ROOT_PATH . '/modules/ckeditor4/class/Ckeditor4Utiles.class.php';

$mid = Ckeditor4_Utils::getMid();
if (defined('LEGACY_BASE_VERSION')) {
$pref = XOOPS_MODULE_URL . '/legacy/admin/index.php?action=PreferenceEdit&amp;confmod_id=';
$help = '<li><a href="'.XOOPS_MODULE_URL.'/legacy/admin/index.php?action=Help&amp;dirname=ckeditor4">'._HELP.'</a></li>';
} else {
$pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod=';
$help = '';
}
?>

<h3>CKEditor 4 for XOOPS Cube Legacy</h3>

<hr />

<ul>
<li><a href="<?php echo $pref.$mid ?>"><?php echo _PREFERENCES ?></a></li>
<?php echo $help ?>
</ul>

<?php
require_once XOOPS_ROOT_PATH . "/footer.php";

?>
<?php
/**
* CKEditor4 module for XCL
* @package CKEditor4
* @version 2.3.1
* @author Other authors Nuno Luciano (aka gigamaster), 2020, XCL PHP7
* @author Naoki Sawada (aka nao-pon) <https://xoops.hypweb.net/>
* @copyright 2005-2022 The XOOPSCube Project
* @license GPL 2.0
*/

require_once '../../../mainfile.php';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once XOOPS_ROOT_PATH . '/modules/ckeditor4/class/Ckeditor4Utiles.class.php';

$mid = Ckeditor4_Utils::getMid();
if (defined('LEGACY_BASE_VERSION')) {
$pref = XOOPS_MODULE_URL . '/legacy/admin/index.php?action=PreferenceEdit&amp;confmod_id=';
$help = '<li><a href="' . XOOPS_MODULE_URL . '/legacy/admin/index.php?action=Help&amp;dirname=ckeditor4">' . _HELP . '</a></li>';
} else {
$pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod=';
$help = '';
}
?>

<h3>CKEditor 4 for XCL</h3>

<hr>

<ul>
<li><a href="<?php echo $pref . $mid ?>"><?php echo _PREFERENCES ?></a></li>
<?php echo $help ?>
</ul>

<?php
require_once XOOPS_ROOT_PATH . "/footer.php";
19 changes: 17 additions & 2 deletions html/modules/ckeditor4/admin/onupdate.inc.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
<?php
function xoops_module_update_ckeditor4() {
/**
* CKEditor4 module for XCL
* @package CKEditor4
* @version 2.3.1
* @author Other authors Nuno Luciano (aka gigamaster), 2020, XCL PHP7
* @author Naoki Sawada (aka nao-pon) <https://xoops.hypweb.net/>
* @copyright 2005-2022 The XOOPSCube Project
* @license GPL 2.0
*/

function xoops_module_update_ckeditor4()
{
$module_handler = xoops_gethandler('module');
$Module = $module_handler->getByDirname('ckeditor4');
$config_handler = xoops_gethandler('config');
$mid = $Module->mid();
$ModuleConfig = $config_handler->getConfigsByCat(0, $mid);

if (substr($ModuleConfig['toolbar_user'], -4) === '""]]') {
//fix typo '""]]' to '"]]' for version <= 0.37
$criteria = new CriteriaCompo(new Criteria('conf_modid', $mid));
$criteria->add(new Criteria('conf_catid', 0));
$criteria->add(new Criteria('conf_name', 'toolbar_user'));

if ($configs = $config_handler->_cHandler->getObjects($criteria)) {
$val = str_replace('""]]', '"]]', $ModuleConfig['toolbar_user']);
$configs[0]->setVar('conf_value', $val, true);
$config_handler->insertConfig($configs[0]);
}
}

if (preg_match('/^head\s*$/m', $ModuleConfig['contentsCss'])) {
//fix typo 'head' to '<head>' for version <= 0.38
$criteria = new CriteriaCompo(new Criteria('conf_modid', $mid));
$criteria->add(new Criteria('conf_catid', 0));
$criteria->add(new Criteria('conf_name', 'contentsCss'));

if ($configs = $config_handler->_cHandler->getObjects($criteria)) {
$val = preg_replace('/^head(\s*)$/m', '<head>$1', $ModuleConfig['contentsCss']);
$configs[0]->setVar('conf_value', $val, true);
$config_handler->insertConfig($configs[0]);
}
}
return true;
}
}
Loading

0 comments on commit 16001e0

Please sign in to comment.