Commit 3c42a121 authored by jonnybradley's avatar jonnybradley

[MRG] Automatic merge, branches/7.x 34928 to 34970

parent 16064771
......@@ -7,6 +7,7 @@ var auto_save_submit = false;
var sending_auto_save = false;
var auto_save_timeoutId = 0;
var auto_save_timeout_interval = 60000;
var auto_save_debug = false; // for development use
function remove_save(editorId, autoSaveId) {
if (typeof editorId !== 'string' || !editorId || !autoSaveId || auto_save_submit) {
......@@ -27,7 +28,9 @@ function remove_save(editorId, autoSaveId) {
},
// bad callback - no good info in the params :(
error: function(req, status, error) {
//alert(tr("Auto Save removal returned an error: ") + error);
if (error && auto_save_debug) {
alert(tr("Auto Save removal returned an error: ") + error);
}
}
});
}
......@@ -62,7 +65,9 @@ function toggle_autosaved(editorId, autoSaveId) {
},
// bad callback - no good info in the params :(
error: function(req, status, error) {
alert(tr("Auto Save get returned an error: ") + error);
if (error && auto_save_debug) {
alert(tr("Auto Save get returned an error: ") + error);
}
}
});
} else { // toggle back to original
......@@ -115,7 +120,7 @@ function auto_save( editorId, autoSaveId ) {
},
// bad callback - no good info in the params :(
error: function(req, status, error) {
if (error) {
if (error && auto_save_debug) {
alert(tr("Auto Save error: ") + error);
}
sending_auto_save = false;
......@@ -177,7 +182,9 @@ function ajax_preview(editorId, autoSaveId, inPage) {
}
}
} else {
alert("Auto save data not found");
if (auto_save_debug) {
alert("Auto save data not found");
}
}
}
......
......@@ -17,7 +17,7 @@ require_once ("Net/LDAP2.php");
class TikiLdapLib
{
// var to hold a esablished connection
// var to hold a established connection
protected $ldaplink = NULL;
// var for ldap configuration parameters
......@@ -44,12 +44,10 @@ class TikiLdapLib
'groupoc' => 'groupOfNames',
'groupnameattr' => '',
'groupdescattr' => '',
//neu
'groupmemberattr' => '',
'groupmemberisdn' => true,
'usergroupattr' => '',
'groupgroupattr' => '',
// end neu
'debug' => false
);
......@@ -173,7 +171,7 @@ class TikiLdapLib
}
}
// Set the bindnpw with the options['password']
// Set the bindpw with the options['password']
if ($this->options['bind_type'] != 'explicit') {
$this->options['bindpw'] = $this->options['password'];
}
......@@ -463,7 +461,7 @@ class TikiLdapLib
}
/**
* Setter to set an otpion value
* Setter to set an option value
* @param string $name The name of the option
* @param mixed $value The value
* @return void
......
......@@ -2101,7 +2101,7 @@ class Comments extends TikiLib
$existingThread = $comments->fetchColumn('threadId', array('hash' => $hash));
// if exactly same title and data comment does not already exist, and is not the current thread
if (!$result->numRows() || in_array($threadId, $existingThread))
if (empty($existingThread) || in_array($threadId, $existingThread))
{
$object = explode( ":", $objectId, 2);
if ($prefs['feature_actionlog'] == 'y') {
......
......@@ -163,16 +163,6 @@ class TikiImporter_Wiki extends TikiImporter
$tikilib->create_page($page['name'], 0, $rev['data'], $rev['lastModif'],
$rev['comment'], $rev['user'], $rev['ip'], '', '',
isset($rev['is_html']) ? $rev['is_html'] : false);
if (!empty($rev['categories'])) {
global $categlib; include_once('lib/categories/categlib.php');
foreach ($rev['categories'] as $cat) {
$categId = $categlib->get_category_id($cat);
if (empty($categId)) {
$categId = $categlib->add_category(0, $cat, '');
}
$categlib->categorize_page( $page['name'], $categId);
}
}
} else {
$tikilib->cache_page_info = null;
$tikilib->update_page($page['name'], $rev['data'], $rev['comment'], $rev['user'],
......@@ -180,6 +170,16 @@ class TikiImporter_Wiki extends TikiImporter
}
$first = false;
}
if (!empty($rev['categories'])) {
global $categlib; include_once('lib/categories/categlib.php');
foreach ($rev['categories'] as $cat) {
$categId = $categlib->get_category_id($cat);
if (empty($categId)) {
$categId = $categlib->add_category(0, $cat, '');
}
$categlib->categorize_page( $page['name'], $categId);
}
}
}
return $page['name'];
......
......@@ -143,6 +143,7 @@ class TWVersion
'7.0beta1',
'7.0beta2',
'7.0RC1',
'7.0',
);
}
......
......@@ -52,6 +52,13 @@ function smarty_function_preference( $params, $smarty ) {
return $smarty->fetch( 'prefs/' . $info['type'] . '.tpl' );
} else {
return tr( 'Preference %0 is not defined.', $params['name'] );
$info = array('value' => tra('Error'), 'default_val' => tra('Error'),
'name' => tr( 'Preference %0 is not defined', $params['name'] )
);
if (strpos($_SERVER["SCRIPT_NAME"], 'tiki-edit_perspective.php') !== false) {
$info['hint'] = tra('Drag this out of the perspective and resave it.');
}
$smarty->assign( 'p', $info );
return $smarty->fetch( 'prefs/text.tpl' );
}
}
......@@ -35,6 +35,11 @@ function smarty_function_select_all($params, &$smarty) {
if (!is_array($checkbox_names)) {
$checkbox_names = explode(',', $checkbox_names);
}
if (! function_exists('smarty_modifier_escape')) {
require_once 'lib/smarty_tiki/modifier.escape.php';
}
foreach ( $checkbox_names as $cn ) $onclick .= "switchCheckboxes(this.form,'" . htmlspecialchars(smarty_modifier_escape($cn, 'javascript')) . "',this.checked);";
return "<div>\n"
......
......@@ -6390,7 +6390,7 @@ if( \$('#$id') ) {
// Leave it as is.
// }
}
} elseif (($prefs['wysiwyg_htmltowiki'] === 'y' && !empty($tline) && strpos($tline, '<br />') === false) || !$options['is_html']) {
} else {
$line .= "<br />";
}
}
......
......@@ -18,12 +18,21 @@ function wikiplugin_redirect_info() {
'required' => false,
'name' => tra('Page Name'),
'description' => tra('Wiki page name to redirect to.'),
'filter' => 'pagename',
'default' => '',
),
'url' => array(
'required' => false,
'name' => tra('URL'),
'description' => tra('Complete URL, internal or external.'),
'filter' => 'url',
'default' => '',
),
'perspective' => array(
'required' => false,
'name' => tra('Perspective'),
'description' => tra('The ID of a perspective to switch to (requires feature_perspective).'),
'filter' => 'int',
'default' => '',
),
),
......@@ -36,8 +45,8 @@ function wikiplugin_redirect($data, $params, $offset, $options) {
$areturn = '';
if (!isset($page)) {$areturn = "REDIRECT plugin: No page specified!";}
if (!isset($url)) {$areturn += "REDIRECT plugin: No url specified!";}
$location = isset($page) ? $page : $url;
if (!isset($url)) {$areturn .= "REDIRECT plugin: No url specified!";}
$location = isset($page) ? $page : isset($url) ? $url : isset($perspective) ? tra('perspective ') . $perspective : tra('nowhere');
if ($just_saved) {
$areturn = sprintf(tra("REDIRECT plugin: The redirection to '%s' is disabled just after saving the page."), $location);
} else if ($options['indexing']) {
......@@ -50,6 +59,24 @@ function wikiplugin_redirect($data, $params, $offset, $options) {
$info = $tikilib->get_page_info( $location );
return $tikilib->parse_data($info['data'], $options);
} else {
if (isset($perspective)) {
global $access, $perspectivelib, $base_host;
require_once 'lib/perspectivelib.php';
$access->check_feature( 'feature_perspective' );
if ($_SESSION['current_perspective'] !== $perspective) {
if( $perspectivelib->perspective_exists( $perspective ) ) {
$_SESSION['need_reload_prefs'] = true;
$_SESSION['current_perspective'] = $perspective;
}
if (empty($page) && empty($url)) {
$url = $base_host . $_SERVER['REQUEST_URI'];
}
}
$areturn = ''; // errors set above not relevant if using perspective
}
/* SEO: Redirect with HTTP status 301 - Moved Permanently than default 302 - Found */
if (isset($page)) {
header("Location: tiki-index.php?page=$page&redirectpage=".$_REQUEST['page'], true, 301);
......
......@@ -1526,6 +1526,15 @@ label.error {
overflow: hidden;
}
#fgalexplorer > div > ul {
padding: 0;
margin: 0;
}
#fgalexplorer > div > ul ul {
padding-left: 16px;
}
.comment.archived {
display: none;
}
......
......@@ -81,7 +81,7 @@
{elseif !empty($tracker_info.name)}
{$tracker_info.name|escape}
{elseif !empty($headtitle)}
{$headtitle|escape}{* use $headtitle last if feature specific title not found *}
{$headtitle|stringfix:"&nbsp;"|escape}{* use $headtitle last if feature specific title not found *}
{/if}
{/if}
{if $prefs.site_title_location eq 'after'} {$prefs.site_nav_seper} {$prefs.browsertitle|tr_if|escape}{/if}
......
......@@ -36,7 +36,7 @@
<tr>
{if isset($tree) && count($tree) gt 0 && $tiki_p_list_file_galleries != 'n' && $fgal_options.show_explorer.value eq 'y' && $tiki_p_view_fgal_explorer eq 'y'}
<td width="25%" class="fgalexplorer" id="fgalexplorer" style="{if ( isset($smarty.session.tiki_cookie_jar.show_fgalexplorer) and $smarty.session.tiki_cookie_jar.show_fgalexplorer neq 'y') and ( ! isset($smarty.request.show_fgalexplorer) or $smarty.request.show_fgalexplorer neq 'y' )}display:none;{/if} width: 25%">
<div style="overflow-x:auto; overflow-y:hidden">
<div>
{include file='file_galleries.tpl'}
</div>
</td>
......
......@@ -17,7 +17,10 @@
{preference name=smarty_security}
{preference name=feature_purifier}
{preference name=feature_htmlpurifier_output}
{preference name=menus_item_names_raw}
{preference name=menus_item_names_raw_teaser}
<div class="adminoptionboxchild" id="menus_item_names_raw_teaser_childcontainer">
{preference name=menus_item_names_raw}
</div>
{preference name=session_protected}
......
......@@ -13,12 +13,12 @@
{if count($feedback)}<div class="simplebox highlight">{section name=i loop=$feedback}{$feedback[i]}<br />{/section}</div>{/if}
<h2>{$totimg} {tr}Available Files{/tr} {$dirsize}</h2>
<h2>{$totfile} {tr}Available Files{/tr} {$totalsize|kbsize}</h2>
<form method="post" action="tiki-batch_upload_files.php" name="f">
<table class="formcolor" id="filelist" width="100%">
<tr>
<th width="80">
{select_all checkbox_names='files[]' label="{tr}Select All{/tr}"}
<th>
{select_all checkbox_names='files[]'}
</th>
<th><a href="javascript:void(0);">{tr}Filename{/tr}</a></th>
<th width="80"><a href="javascript:void(0);">{tr}Filesize{/tr}</a></th>
......@@ -27,7 +27,7 @@
{cycle print=false values="even,odd"}
{foreach key=k item=it from=$filestring}
<tr class="{cycle}">
<td>
<td class="checkbox">
<input type="checkbox" name="files[]" value="{$it[0]}" id="box_{$k}" />
</td>
<td><label for="box_{$k}">{$it[0]}</label></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment