prepare upgrade for htmlarea cleanup
This commit is contained in:
parent
ee98b0c128
commit
b3b76bfc35
@ -209,6 +209,18 @@ $tasks = array(array('version' => '0.5.1',
|
|||||||
'title' => 'Move internal plugins to "normal" plugin directory structure.',
|
'title' => 'Move internal plugins to "normal" plugin directory structure.',
|
||||||
'desc' => 'A list of internal plugins that previously lived in include/plugin_internal.inc.php were moved into the proper plugins/ subdirectory structure. This task will migrate any possible references to such plugins to the new format.'),
|
'desc' => 'A list of internal plugins that previously lived in include/plugin_internal.inc.php were moved into the proper plugins/ subdirectory structure. This task will migrate any possible references to such plugins to the new format.'),
|
||||||
|
|
||||||
|
array('version' => '2.0-alpha4',
|
||||||
|
'function' => 'serendipity_removeDeadFiles_SPL',
|
||||||
|
'title' => 'Removal of obsolete and dead htmlarea files',
|
||||||
|
'arguments' => array($serendipity['serendipityPath'] . 'htmlarea', $dead_htmlarea_files, array('internals'), true),
|
||||||
|
'desc' => 'Serendipity 2.0 replaces old WYSIWYG-Editors in htmlarea directory with CKEDITOR. The following dead files will be removed from "/htmlarea".<br /><pre>' . implode(', ', $dead_htmlarea_files) . '</pre>'),
|
||||||
|
|
||||||
|
array('version' => '2.0-alpha4',
|
||||||
|
'function' => 'recursive_directory_iterator',
|
||||||
|
'title' => 'Removal of obsolete and dead htmlarea directories',
|
||||||
|
'arguments' => array($dead_htmlarea_dirs),
|
||||||
|
'desc' => 'Serendipity 2.0 replaces old WYSIWYG-Editors in htmlarea directory with CKEDITOR. The following dead directories will be completely removed from "/htmlarea".<br /><pre>' . implode(', ', $dead_htmlarea_dirs) . '</pre>'),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Fetch SQL files which needs to be run */
|
/* Fetch SQL files which needs to be run */
|
||||||
|
@ -123,6 +123,50 @@ $dead_smarty_files = array(
|
|||||||
'TODO'
|
'TODO'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* A list of old WYSIWYG-Editor lib files which got obsoleted in 2.0 */
|
||||||
|
$dead_htmlarea_files = array(
|
||||||
|
'htmlarea.css',
|
||||||
|
'htmlarea.js',
|
||||||
|
'index.html',
|
||||||
|
'license.txt',
|
||||||
|
'my_custom.js',
|
||||||
|
'popupdiv.js',
|
||||||
|
'popupwin.js',
|
||||||
|
'reference.html',
|
||||||
|
'release-notes.txt',
|
||||||
|
'Xinha.css',
|
||||||
|
'XinhaCore.js',
|
||||||
|
'XinhaLoader.js',
|
||||||
|
'XinhaLoader_readme.txt',
|
||||||
|
'ckeditor/build-config.js',
|
||||||
|
'ckeditor/skins/moono/images/mini.png'
|
||||||
|
);
|
||||||
|
|
||||||
|
/* A list of old WYSIWYG-Editor lib directories which got obsoleted in 2.0 */
|
||||||
|
$dead_htmlarea_dirs = array(
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/contrib',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/examples',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/images',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/lang',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/modules',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/plugins',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/popups',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/skins',
|
||||||
|
$serendipity['serendipityPath'] . 'htmlarea/ckeditor/samples'
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $directory
|
||||||
|
* @param array $files
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function recursive_directory_iterator($dir = array()) {
|
||||||
|
foreach ($dir AS $path) {
|
||||||
|
serendipity_removeDeadFiles_SPL($path);
|
||||||
|
@rmdir($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix inpropper plugin constant names
|
* Fix inpropper plugin constant names
|
||||||
*
|
*
|
||||||
@ -268,7 +312,7 @@ function serendipity_removeDeadFiles_SPL($dir=null, $deadfiles=null, $purgedir=n
|
|||||||
if (is_array($purgedir) && !empty($purgedir) ) {
|
if (is_array($purgedir) && !empty($purgedir) ) {
|
||||||
foreach ($purgedir AS $pdir) {
|
foreach ($purgedir AS $pdir) {
|
||||||
if (basename($thisfile) == $pdir) {
|
if (basename($thisfile) == $pdir) {
|
||||||
//echo '<b><u>LIST & REMOVE EMPTY DIRECTORY</u></b>: '.$thisfile."<br><br>\n";
|
#echo '<b><u>LIST & REMOVE EMPTY DIRECTORY</u></b>: '.$thisfile."<br><br>\n";
|
||||||
@rmdir($thisfile);
|
@rmdir($thisfile);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user