Commit d7697ec7 authored by jonnybradley's avatar jonnybradley

[MRG] Automatic merge, branches/5.x 27604 to 27625

parent f7792911
......@@ -43,7 +43,7 @@ function prefs_wysiwyg_list() {
),
),
'wysiwyg_ckeditor' => array(
'name' => tra('Use CKEditor 3.1'),
'name' => tra('Use CKEditor'),
'description' => tra('Experimental, new in Tiki 5: Use New CKEditor instead of previous FCKEditor'),
'type' => 'flag',
),
......
......@@ -292,12 +292,13 @@ function wikiplugin_tracker($data, $params)
}
}
if (empty($_SERVER['SCRIPT_NAME']) || !strstr($_SERVER['SCRIPT_NAME'], 'tiki-register.php')) {
$perms = $tikilib->get_perm_object($trackerId, 'tracker', $tracker, false);
if (empty($_SERVER['SCRIPT_NAME']) || strpos($_SERVER['SCRIPT_NAME'], 'tiki-register.php') === false) {
if (!empty($itemId) && $tracker['writerCanModify'] == 'y' && isset($usertracker) && $usertracker) { // user tracker he can modify
} elseif (!empty($itemId) && $tracker['writerCanModify'] == 'y' && $user && (($itemUser = $trklib->get_item_creator($trackerId, $itemId)) == $user || ($tracker['userCanTakeOwnership'] == 'y' && empty($itemUser)))) {
} elseif (!empty($itemId) && isset($grouptracker) && $grouptracker) {
} else {
$perms = $tikilib->get_perm_object($trackerId, 'tracker', $tracker, false);
if ($perms['tiki_p_create_tracker_items'] == 'n' && empty($itemId)) {
return '<b>'.tra("You do not have permission to insert an item").'</b>';
} elseif (!empty($itemId)) {
......
......@@ -401,7 +401,8 @@ function wikiplugin_trackerlist($data, $params) {
}
}
if ($hasVoted) {
$url = preg_replace('/[(\?)|&]vote=y/', '$1', preg_replace('/[(\?)|&]itemId=[0-9]+/', '$1', preg_replace('/[(\?)|&]ins_[0-9]+=-?[0-9]*/', '$1', $_SERVER['REQUEST_URI'])));
// Must strip NULL for remove my vote case
$url = preg_replace('/[(\?)|&]vote=y/', '$1', preg_replace('/[(\?)|&]itemId=[0-9]+/', '$1', preg_replace('/[(\?)|&]ins_[0-9]+=-?[0-9|N|U|L]*/', '$1', $_SERVER['REQUEST_URI'])));
header("Location: $url");
die;
}
......
......@@ -152,10 +152,13 @@
</select>
</td></tr>
<tr class="formcolor"><td>{tr}Start of day{/tr}:</td><td>
<select name="startday_Hour">{foreach item=h from=$hours}<option value="{$h}"{if $h eq $startday} selected="selected"{/if}>{$h}</option>{/foreach}</select>{tr}h{/tr}
<select name="startday_Hour">{foreach key=h item=d from=$hours}<option
value="{$h}"{if $h eq $startday}
selected="selected"{/if}>{$d}</option>{/foreach
}</select>
</td></tr>
<tr class="formcolor"><td>{tr}End of day{/tr}:</td><td>
<select name="endday_Hour">{foreach item=h from=$hours}<option value="{$h}"{if $h eq $endday} selected="selected"{/if}>{$h}</option>{/foreach}</select>{tr}h{/tr}
<select name="endday_Hour">{foreach key=h item=d from=$hours}<option value="{$h}"{if $h eq $endday} selected="selected"{/if}>{$d}</option>{/foreach}</select>
</td></tr>
<tr class="formcolor"><td>{tr}Days to display{/tr}:</td><td>
{section name="viewdays" start=0 loop=7}
......
......@@ -24,19 +24,19 @@
{if $group_by_item ne 'y'}
<strong{if $cellstatus eq '2'} style="text-decoration:line-through"{/if}>
{if $allday}
{tr}All day{/tr}
{$cellstart|tiki_short_date} ({tr}All day{/tr})
{else}
{if ($cellend - $cellstart < 86400)}
{$cellstart|tiki_date_format:"%H:%M"} &gt; {$cellend|tiki_date_format:"%H:%M"}
{$cellstart|tiki_date_format:"%H:%M"} &ndash; {$cellend|tiki_date_format:"%H:%M"}
{else}
{$cellstart|tiki_date_format:"%e %B (%H:%M)"} &gt; {$cellend|tiki_date_format:"%e %B (%H:%M)"}
{$cellstart|tiki_date_format:"%e %B (%H:%M)"} &ndash; {$cellend|tiki_date_format:"%e %B (%H:%M)"}
{/if}
{/if}
</strong>
<br />
{/if}
<a href="tiki-calendar_edit_item.php?viewcalitemId={$cellid}" title="{tr}Details{/tr}"{if $cellstatus eq '2'} style="text-decoration:line-through"{/if}>{$cellname|escape}</a><br />
{if $show_description eq 'y'}<div class="box-data">{$celldescription}</div><br />{/if}
{if $show_description eq 'y'}<div class="box-data">{$celldescription|truncate:250:'...'}</div><br />{/if}
{if $show_participants eq 'y' and $cellparticipants}
<span class="box-title">{tr}Organized by:{/tr}</span> {$cellorganizers}<br />
<span class="box-title">{tr}Participants:{/tr}</span> {$cellparticipants}<br />
......
......@@ -58,7 +58,7 @@
{if $module neq 'y'}
{button _ajax=$ajax href="?viewmode=quarter" _title="{tr}Quarter{/tr}" _text="{tr}Quarter{/tr}" _selected_class="buttonon" _selected="'$viewmode' == 'quarter'"}
{button href="?viewmode=semester" _title="{tr}Semester{/tr}" _text="{tr}Semester{/tr}" _selected_class="buttonon" _selected="'$viewmode' == 'semester'"}
{button _ajax=$ajax viewmode=year _title="{tr}Year{/tr}" _text="{tr}Year{/tr}" _selected_class="buttonon" _selected="'$viewmode' == 'year'"}
{button href="?viewmode=year" _ajax=$ajax viewmode=year _title="{tr}Year{/tr}" _text="{tr}Year{/tr}" _selected_class="buttonon" _selected="'$viewmode' == 'year'"}
{/if}
{*next*}
......
......@@ -313,7 +313,7 @@
{section name=i loop=$field_value.options_array}
{if $tiki_p_tracker_vote_ratings eq 'y' and isset($field_value.my_rate) and $field_value.options_array[i] === $field_value.my_rate}
<b class="highlight">
{if $field_value.voteavg >= $field_value.options_array[i]}
{if $field_value.numvotes && $field_value.voteavg >= $field_value.options_array[i]}
{icon _id='star' alt=$field_value.options_array[i] title=$smarty.capture.myvote}
{else}
{icon _id='star_grey' alt=$field_value.options_array[i] title=$smarty.capture.myvote}
......@@ -325,7 +325,7 @@
{capture name=thisvote}{tr}Click to vote for this value:{/tr} {$field_value.options_array[i]}{/capture}
<a href="{$smarty.server.REQUEST_URI}{if empty($smarty.server.QUERY_STRING)}?{else}&amp;{/if}itemId={$item.itemId}&amp;ins_{$field_value.fieldId}={$field_value.options_array[i]}&amp;vote=y">
{/if}
{if $field_value.voteavg >= $field_value.options_array[i]}
{if $field_value.numvotes && $field_value.voteavg >= $field_value.options_array[i]}
{icon _id='star' alt=$field_value.options_array[i] title=$smarty.capture.thisvote}
{else}
{icon _id='star_grey' alt=$field_value.options_array[i] title=$smarty.capture.thisvote}
......
......@@ -59,13 +59,17 @@ if (isset($_REQUEST["find"])) {
$find = '';
}
$smarty->assign('find', $find);
if (!isset($_REQUEST["offset"])) {
if ( !isset($_REQUEST['offset']) || !empty($_REQUEST['export']) ) {
$offset = 0;
} else {
$offset = $_REQUEST["offset"];
}
if (isset($_REQUEST["max"])) {
$maxRecords = $_REQUEST["max"];
if ( !empty($_REQUEST['export']) ) {
$maxRecords = -1;
} elseif (isset($_REQUEST['max'])) {
$maxRecords = $_REQUEST['max'];
} else {
$maxRecords = $prefs['maxRecords'];
}
if ($tiki_p_admin == 'y') {
......
......@@ -201,31 +201,32 @@ $smarty->assign('personal', $info["personal"]);
$smarty->assign('startday', $info["startday"] < 0 ? 0 : round($info['startday'] / (60 * 60)));
$smarty->assign('endday', $info["endday"] < 0 ? 0 : round($info['endday'] / (60 * 60)));
$smarty->assign('hours', array(
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'10',
'11',
'12',
'13',
'14',
'15',
'16',
'17',
'18',
'19',
'20',
'21',
'22',
'23'
'0' => '12:00 midnight',
'1' => '1:00 am',
'2' => '2:00 am',
'3' => '3:00 am',
'4' => '4:00 am',
'5' => '5:00 am',
'6' => '6:00 am',
'7' => '7:00 am',
'8' => '8:00 am',
'9' => '9:00 am',
'10' => '10:00 am',
'11' => '11:00 am',
'12' => '12:00 noon',
'13' => '1:00 pm',
'14' => '2:00 pm',
'15' => '3:00 pm',
'16' => '4:00 pm',
'17' => '5:00 pm',
'18' => '6:00 pm',
'19' => '7:00 pm',
'20' => '8:00 pm',
'21' => '9:00 pm',
'22' => '10:00 pm',
'23' => '11:00 pm'
));
$smarty->assign('defaulteventstatus', $info['defaulteventstatus']);
$smarty->assign('eventstatus', array(
0 => tra('Tentative') ,
......
......@@ -343,7 +343,9 @@ if (isset($_REQUEST["upload"])) {
if (($data = fread($fp, 8192 * 16)) === false) {
$errors[] = tra('Cannot read the file:') . ' ' . $tmp_dest;
}
fwrite($fw, $data);
if (fwrite($fw, $data) === false) {
$errors[] = tra('Cannot write to this file:') . $savedir . $fhash;
}
}
}
fclose($fp);
......
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