1
0

space cleanup

This commit is contained in:
Ian
2014-11-02 15:05:12 +01:00
parent dee5033c0a
commit a22f0ec65e
3 changed files with 49 additions and 51 deletions

View File

@ -1,4 +1,4 @@
<?php # $Id: functions_entries.inc.php 435 2005-08-25 12:36:39Z garvinhicking $
<?php
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
@ -53,7 +53,6 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
$template_vars['moderate_comments'] = false;
}
if (isset($entry['allow_comments']) && (serendipity_db_bool($entry['allow_comments']))) {
$template_vars['allow_comments'] = true;
$allow_comments = ' checked="checked"';
@ -129,20 +128,20 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
$template_vars['wysiwyg_advanced'] = true;
$template_vars['timestamp'] = serendipity_serverOffsetHour(isset($entry['timestamp']) && $entry['timestamp'] > 0 ? $entry['timestamp'] : time());
$template_vars['reset_timestamp'] = serendipity_serverOffsetHour(time());
$template_vars['hiddens'] = $hiddens;
$template_vars['errMsg'] = $errMsg;
$template_vars['entry'] =& $entry;
$template_vars['targetURL'] = $targetURL;
$template_vars['cat_count'] = count($cats)+1;
$template_vars['wysiwyg'] = $serendipity['wysiwyg'];
$template_vars['serendipityRightPublish'] = $_SESSION['serendipityRightPublish'];
$template_vars['wysiwyg_blocks'] = array(
$template_vars['timestamp'] = serendipity_serverOffsetHour(isset($entry['timestamp']) && $entry['timestamp'] > 0 ? $entry['timestamp'] : time());
$template_vars['reset_timestamp'] = serendipity_serverOffsetHour(time());
$template_vars['hiddens'] = $hiddens;
$template_vars['errMsg'] = $errMsg;
$template_vars['entry'] =& $entry;
$template_vars['targetURL'] = $targetURL;
$template_vars['cat_count'] = count($cats)+1;
$template_vars['wysiwyg'] = $serendipity['wysiwyg'];
$template_vars['serendipityRightPublish'] = $_SESSION['serendipityRightPublish'];
$template_vars['wysiwyg_blocks'] = array(
'body' => 'serendipity[body]',
'extended' => 'serendipity[extended]'
);
$template_vars['entry_template'] = serendipity_getTemplateFile('admin/entries.tpl', 'serendipityPath');
serendipity_smarty_init();
@ -161,14 +160,15 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
if ($init && $spawnMulti) {
return;
}
if (isset($serendipity['wysiwyg']) && $serendipity['wysiwyg']) {
$eventData = array(
'init' => &$init,
'item' => &$item,
'jsname' => &$jsname,
'skip' => false,
'buttons'=> array()
'init' => &$init,
'item' => &$item,
'jsname' => &$jsname,
'skip' => false,
'buttons' => array(),
);
serendipity_plugin_api::hook_event('backend_wysiwyg', $eventData);
@ -178,7 +178,6 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
}
$data = array('init' => $init, 'spawnMulti' => $spawnMulti, 'jsname' => $jsname, 'item' => $item, 'buttons' => $eventData['buttons']);
echo serendipity_smarty_show('admin/wysiwyg_init.tpl', $data);
}
$init = true;

View File

@ -1,4 +1,4 @@
<?php # $Id:$
<?php
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
@ -231,23 +231,22 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
if (empty($config_names)) {
return false;
}
$tfile = "/admin/plugin_config_item.tpl";
$data = array();
if ($showSubmit && $postKey != 'plugin') {
if ($showSubmit && $postKey != 'plugin') {
$data['showSubmit_head'] = true;
}
if ($showTable) {
if ($showTable) {
$data['showTable'] = true;
}
$elcount = 0;
$htmlnugget = array();
$plugin_options = array();
$data['config_names'] = $config_names;
@ -256,9 +255,9 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$cbag = new serendipity_property_bag;
$plugin->introspect_config_item($config_item, $cbag);
$data['cname'] = $cname = htmlspecialchars($cbag->get('name'));
$data['cdesc'] = $cdesc = htmlspecialchars($cbag->get('description'));
$value = $plugin->get_config($config_item, 'unset');
$data['cname'] = $cname = htmlspecialchars($cbag->get('name'));
$data['cdesc'] = $cdesc = htmlspecialchars($cbag->get('description'));
$value = $plugin->get_config($config_item, 'unset');
$lang_direction = htmlspecialchars($cbag->get('lang_direction'));
if (empty($lang_direction)) {
@ -311,15 +310,15 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
switch ($ctype) {
case 'seperator':
case 'seperator':
$assign_plugin_config($data);
break;
case 'multiselect':
case 'multiselect':
$data['is_multi_select'] = $is_multi_select = true;
case 'select':
case 'select':
$data['ctype'] = 'select';
if (is_array($hvalue)) {
$selected_options = $hvalue;
@ -332,19 +331,19 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['selected_options'] = $selected_options;
$data['pre_selected'] = $pre_selected = (array)$cbag->get('select_preselected');
$data['select_size'] = $select_size = $cbag->get('select_size');
$data['select'] = $select = $cbag->get('select_values');
$data['select'] = $select = $cbag->get('select_values');
$assign_plugin_config($data);
break;
case 'tristate':
case 'tristate':
$data['ctype'] = 'tristate';
$per_row = 3;
$radio['value'][] = 'default';
$radio['desc'][] = USE_DEFAULT;
case 'boolean':
case 'boolean':
$data['ctype'] = 'boolean';
$radio['value'][] = 'true';
$radio['desc'][] = YES;
@ -352,7 +351,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$radio['value'][] = 'false';
$radio['desc'][] = NO;
case 'radio':
case 'radio':
$data['ctype'] = 'radio';
if (!count($radio) > 0) {
$radio = $cbag->get('radio');
@ -390,7 +389,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
break;
case 'string':
case 'string':
$data['ctype'] = 'string';
if (empty($input_type)) {
$input_type = $cbag->get('input_type');
@ -423,28 +422,28 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
break;
case 'content':
case 'content':
$data['ctype'] = 'content';
$data['cbag_default'] = $cbag->get('default');
$assign_plugin_config($data);
break;
case 'custom':
case 'custom':
$data['ctype'] = 'custom';
$data['cbag_custom'] = $cbag->get('custom');
$assign_plugin_config($data);
break;
case 'hidden':
case 'hidden':
$data['ctype'] = 'hidden';
$data['cbag_value'] = $cbag->get('value');
$assign_plugin_config($data);
break;
case 'media':
case 'media':
$data['ctype'] = 'media';
// Print the HTML to display the popup media selector
$preview_width = $cbag->get('preview_width');
@ -463,7 +462,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
break;
case 'sequence':
case 'sequence':
$data['ctype'] = 'sequence';
// For the drag-n-drop to work, the list must be included in
// a container (probably an <ol>) that JavaScript can access
@ -516,7 +515,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
}
// Make sure all the items are in the order list; new items
// go on the end (new items could have been added without
// go on the end (new items could have been added without
// this config item being updated)
// Also fill out thumbnails and display names
foreach ($items as $id => $junk) {
@ -590,7 +589,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
break;
default:
default:
$data['ctype'] = 'default';
// Unknown configuration key. Let the plugin handle it.
$addData = func_get_args();
@ -610,7 +609,6 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
break;
}
}
$data['config_groups'] = $config_groups;
$data['plugin_options'] = $plugin_options;
@ -625,16 +623,16 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['plugin_options_ungrouped'] = $plugin_options;
if ($showSubmit) {
if ($showSubmit) {
$data['showSubmit_foot'] = true;
}
if ($showExample && method_exists($plugin, 'example') ) {
if ($showExample && method_exists($plugin, 'example') ) {
$data['showExample'] = true;
$data['plugin_example'] = $plugin->example();
}
if ($spawnNuggets && isset($serendipity['wysiwyg']) && $serendipity['wysiwyg'] && count($htmlnugget) > 0) {
if ($spawnNuggets && isset($serendipity['wysiwyg']) && $serendipity['wysiwyg'] && count($htmlnugget) > 0) {
$data['spawnNuggets'] = true;
$ev = array('nuggets' => $htmlnugget, 'skip_nuggets' => false);
serendipity_plugin_api::hook_event('backend_wysiwyg_nuggets', $ev);

View File

@ -398,12 +398,14 @@
'type' => 'bool',
'default' => false,
'permission' => 'blogConfiguration'),
array('var' => 'updateCheck',
'title' => UPDATE_NOTIFICATION,
'description' => UPDATE_NOTIFICATION_DESC,
'type' => 'list',
'default' => array('stable' => UPDATE_STABLE, 'beta' => UPDATE_BETA, 'false' => NO),
'permission' => 'blogConfiguration'),
array('var' => 'logLevel',
'title' => LOG_LEVEL,
'description' => LOG_LEVEL_DESC,
@ -436,7 +438,6 @@
'default' => false,
'permission' => 'blogConfiguration'),
array('var' => 'searchsort',
'title' => QUICKSEARCH_SORT,
'description' => '',
@ -501,6 +502,7 @@
'permission' => 'siteConfiguration',
'flags' => array('probeDefault'))
));
if(function_exists('date_default_timezone_set')) {
$res['display']['items'][] = array('var' => 'useServerOffset',
'title' => INSTALL_OFFSET_ON_SERVER_TIME,
@ -509,9 +511,6 @@
'default' => true,
'permission' => 'blogConfiguration'
);
}
array_push( $res['display']['items'],
@ -604,12 +603,14 @@
'type' => 'bool',
'default' => true,
'permission' => 'blogConfiguration'),
array ('var' => 'feedCustom',
'title' => FEED_CUSTOM,
'description' => FEED_CUSTOM_DESC,
'type' => 'string',
'default' => '',
'permission' => 'blogConfiguration'),
array ('var' => 'feedForceCustom',
'title' => FEED_FORCE,
'description' => FEED_FORCE_DESC,