Merge branch '2.0' of github.com:s9y/Serendipity into 2.0
This commit is contained in:
commit
0d43f5dea7
@ -4,11 +4,16 @@
|
||||
Version 2.0-beta3 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Prevent "new" plugin api to install double instances of plugins
|
||||
that are not stackable (issue #45)
|
||||
|
||||
* Back button in plugin-config
|
||||
|
||||
* Adapted serendipity_editor.js to provide more global (though
|
||||
deprecated) API access methods for plugins like amazonchooser
|
||||
and linktrimmer, to perform insertion. Also fixed the
|
||||
insertion of text when the ID of the element is not prefixed
|
||||
|
||||
|
||||
* Move sort by name to simple filter in ML, replace file extension
|
||||
|
||||
* Remember selected media library folder
|
||||
@ -23,6 +28,8 @@ Version 2.0-beta3 ()
|
||||
|
||||
* Fixed media insert target bug (issued by #143, #145, #121)
|
||||
|
||||
* Fixed publish drafted-entries via dashboard (issue #160)
|
||||
|
||||
* All frontend themes that rely on the bundled Core jQuery library
|
||||
are currently using the jquery.noConflict-mode for compatibility
|
||||
to older plugins.
|
||||
|
@ -282,6 +282,12 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
/* get sidebar locations */
|
||||
serendipity_smarty_init();
|
||||
|
||||
if (isset($template_config['sidebars'])) {
|
||||
// we save the sidebars set by the template here, because serendipity_loadThemeOption
|
||||
// will otherwise overwrite it, since the move to a separate backend
|
||||
$sidebars = $template_config['sidebars'][0];
|
||||
}
|
||||
|
||||
if (is_array($template_config)) {
|
||||
$template_vars =& serendipity_loadThemeOptions($template_config);
|
||||
}
|
||||
@ -290,6 +296,11 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
'event_col' => 'event',
|
||||
'eventh_col' => 'eventh'
|
||||
);
|
||||
|
||||
if ((! isset($template_vars['sidebars'])) && isset($sidebars)) {
|
||||
$template_vars['sidebars'] = $sidebars;
|
||||
}
|
||||
|
||||
if (isset($template_vars['sidebars'])) {
|
||||
$sidebars = explode(',', $template_vars['sidebars']);
|
||||
} elseif (isset($serendipity['sidebars'])) {
|
||||
@ -334,7 +345,25 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
'install' => true);
|
||||
serendipity_plugin_api::hook_event('backend_plugins_fetchplugin', $fetchplugin_data);
|
||||
|
||||
if ($fetchplugin_data['install']) {
|
||||
// we now have to check that the plugin is not already installed, or stackable, to prevent invalid double instances
|
||||
$new_plugin = true;
|
||||
foreach (serendipity_plugin_api::get_installed_plugins() as $pluginName) {
|
||||
if ($serendipity['GET']['install_plugin'] === $pluginName) {
|
||||
$existingPlugin =& serendipity_plugin_api::load_plugin($serendipity['GET']['install_plugin']);
|
||||
if (is_object($existingPlugin)) {
|
||||
$bag = new serendipity_property_bag();
|
||||
$existingPlugin->introspect($bag);
|
||||
if ($bag->get('stackable') != true) {
|
||||
$new_plugin = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$data['new_plugin_failed'] = ! $new_plugin;
|
||||
|
||||
if ($fetchplugin_data['install'] && $new_plugin) {
|
||||
$serendipity['debug']['pluginload'] = array();
|
||||
$inst = serendipity_plugin_api::create_plugin_instance($serendipity['GET']['install_plugin'], null, (serendipity_plugin_api::is_event_plugin($serendipity['GET']['install_plugin']) ? 'event': 'right'), $authorid, serendipity_db_escape_string($serendipity['GET']['pluginPath']));
|
||||
|
||||
|
@ -1403,12 +1403,11 @@ function serendipity_updertEntry($entry) {
|
||||
}
|
||||
|
||||
if ($entry['isdraft'] === 0) {
|
||||
$entry['isdraft'] = 'false'; // make sure to commit a string value with dashboards entry publish (only!)
|
||||
$entry['isdraft'] = 'false'; // make sure to commit a string value with dashboards entry publish (only!)
|
||||
$entry['timestamp'] = $_entry['timestamp']; // dashboard publishing a draft shall not set a new entry timestamp
|
||||
}
|
||||
|
||||
//if (!serendipity_db_bool($entry['isdraft']) && !serendipity_db_bool($_entry['isdraft'])) {
|
||||
$entry['last_modified'] = time();
|
||||
//}
|
||||
$entry['last_modified'] = time();
|
||||
|
||||
$res = serendipity_db_update('entries', array('id' => $entry['id']), $entry);
|
||||
$newEntry = 0;
|
||||
|
@ -1988,7 +1988,7 @@ function serendipity_getImageFields() {
|
||||
'type' => 'date'
|
||||
),
|
||||
|
||||
'i.extension' => array('desc' => SORT_ORDER_EXTENSION
|
||||
'i.name' => array('desc' => SORT_ORDER_NAME
|
||||
),
|
||||
|
||||
'i.authorid' => array('desc' => AUTHOR,
|
||||
|
@ -42,6 +42,9 @@
|
||||
{if $postKey == "template"}
|
||||
<a class="button_link" href="?serendipity[adminModule]=templates">{$CONST.BACK}</a>
|
||||
{/if}
|
||||
{if $postKey == "plugin"}
|
||||
<a class="button_link" href="?serendipity[adminModule]=plugins">{$CONST.BACK}</a>
|
||||
{/if}
|
||||
<input name="SAVECONF" type="submit" value="{$CONST.SAVE}">
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -146,6 +146,9 @@
|
||||
{if $save}
|
||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span>
|
||||
{/if}
|
||||
{if $new_plugin_failed}
|
||||
<span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.ERROR}: Plugin not stackable and already installed</span> {* i18n *}
|
||||
{/if}
|
||||
<script src="{serendipity_getFile file="admin/js/jquery.autoscroll.js"}"></script>
|
||||
<script src="{serendipity_getFile file="admin/js/jquery.sortable.js"}"></script>
|
||||
<script src="{serendipity_getFile file="admin/js/dragdrop.js"}"></script>
|
||||
|
@ -164,7 +164,7 @@
|
||||
|
||||
// Opens media db image selection in new window
|
||||
serendipity.choose_media = function(id) {
|
||||
serendipity.openPopup('serendipity_admin.php?serendipity[adminModule]=media&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[showMediaToolbar]=false&serendipity[htmltarget]=' + id + '&serendipity[filename_only]=true');
|
||||
serendipity.openPopup('serendipity_admin.php?serendipity[adminModule]=media&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[showMediaToolbar]=false&serendipity[showUpload]=true&serendipity[htmltarget]=' + id + '&serendipity[filename_only]=true');
|
||||
}
|
||||
|
||||
// "Transfer" value from media db popup to form element, used for example for selecting a category-icon
|
||||
@ -1404,7 +1404,18 @@ $(function() {
|
||||
progress.disabled = true;
|
||||
progressContainer.innerHTML += "{$CONST.ERROR_UNKNOWN_NOUPLOAD}";
|
||||
$(progressContainer).find('.uploadIcon').replaceWith(errorIcon.cloneNode(true));
|
||||
})
|
||||
}).always(function() {
|
||||
if ($('#ml_link').length == 0) {
|
||||
var mlLink = document.createElement('a');
|
||||
mlLink.id = "ml_link";
|
||||
mlLink.className = "button_link";
|
||||
mlLink.href = $('#uploadform').attr('action');
|
||||
mlLink.innerHTML = "{$CONST.MEDIA_LIBRARY}";
|
||||
$(mlLink).hide();
|
||||
$('.form_buttons').prepend(mlLink);
|
||||
$(mlLink).fadeIn();
|
||||
}
|
||||
});
|
||||
}, type);
|
||||
}
|
||||
image.src = readerEvent.target.result;
|
||||
|
@ -6,12 +6,6 @@ if (IN_serendipity !== true) { die ("Don't hack!"); }
|
||||
$serendipity['smarty']->assign(array('currpage' => "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
|
||||
'currpage2' => $_SERVER['REQUEST_URI']));
|
||||
|
||||
if (!function_exists('serendipity_smarty_html5time')) {
|
||||
function serendipity_smarty_html5time($timestamp) { return date("c", $timestamp); }
|
||||
|
||||
$serendipity['smarty']->registerPlugin('modifier', 'serendipity_html5time', 'serendipity_smarty_html5time');
|
||||
}
|
||||
|
||||
if (class_exists('serendipity_event_spamblock')) {
|
||||
$required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%spamblock%required_fields'", true, 'assoc');
|
||||
} elseif (class_exists('serendipity_event_commentspice')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user