Commit a1eaefda authored by sylvieg's avatar sylvieg

[MRG] Automatic merge, branches/7.x 34460 to 34501

parent 3baa1a10
......@@ -354,6 +354,10 @@ a.admbox.off img {
display: none;
}
.modules {
min-height: 1em;
}
/* end modules revamp */
/* tiki 7 theme generator *
......
......@@ -3498,7 +3498,6 @@ CREATE TABLE `tiki_invited` (
KEY `used_on_user` (`used_on_user`)
) ENGINE=MyISAM;
DROP TABLE IF EXISTS `tiki_credits`;
CREATE TABLE `tiki_credits` (
`creditId` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
......
......@@ -680,7 +680,7 @@ As of $now, the community has:
This list is automatically generated and alphabetically sorted
from subversion repository by the following script:
doc/devtools/release_copyright.php
doc/devtools/release.php
Counting the commits is not as trivial as it may sound. If your number of commits
seems incorrect, it could be that the script is not detecting them all. This
......@@ -905,63 +905,7 @@ function display_howto() {
HOWTO release Tiki
--------------------------
0/ When branching for 5.x, name it branches/5.x to be
clearer than branches/3.0, because branches/5.x is
indeed 5.1, 5.2, etc.
http://dev.tiki.org/SVNTips#Handling_branches
1/ Preliminary manual tasks
- Check that all JavaScript can be safely minified with [http://www.jslint.com/|JSLint]
- Check DB structure to make sure fresh install and upgrade from previous version have the same structure
-- Checkout a fresh Tiki 4.0, upgrade to Tiki5.0
-- Checkout a fresh Tiki5.0
-- Compare the mysqldump files of each and resolve any differences
- Run the tiki installer and correct anything obviously wrong
- The "function update_readme_file" in this script will output to the top-level README:
-- Check if anyone has committed anything manually to README that needs to be brought back into this script
-- Check links
- Run doc/devtools/securitycheck.php and check each "potentially unsafe" file.
- in lib/setup/twversion.class.php
- increment the version number in the constructor
- update list of valid releases in getVersions()
- Make sure you add all Tiki versions (not just the one you are doing now). Ex.: when 5.0 is released, 4.2 will probably exist, and this was added to branches/4.x but not merged by script.
- change the version branch to "unstable", "stable", or "head" as explained in that file
- Delete tiki-secdb_x.y_mysql.sql files from previous versions
- Commit your changes with this commit message (change \$VERSION by the version of the release):
[REL] Preparing \$VERSION release
2/ Create and test pre-release packages by executing the script with the release
version as argument, using the format major.minor.sub
Use the --help option of the release script for advanced help on options (like using a web proxy)
>> php doc/devtools/release.php 3.0 preRC4
3/ Test the produced "tarballs" and share the testing
In case of a major version (x.0), you need at least 3 installations from 3 different people
4/ After testing, launch the release script and follow the answer 'y' to every steps
( This will make automated tests, update README / copyrights / changelog / languages files,
tag the release, build the release "tarballs" ... )
>> php doc/devtools/release.php 3.0 RC4
5/ Test the produced "tarballs" and share the testing
In case of a major version (x.0), you need at least 3 installations from 3 different people
6/ When the "tarballs" are tested, follow the steps to upload on SourceForge:
http://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download
7/ Announce the good news on devel mailing-list
and ask the Communications Team to launch the announce-spreading process as described on
http://tiki.org/Communications+Team+Release
post/
Update appropriate http://tiki.org/stable.version file with new release version
(or ask the TAG to do this)
Increment/update lib/setup/twversion.class.php (depending if major or minor release)
All that process has to be relayed on live irc channel :
irc://irc.freenode.net/#tikiwiki
Please see: http://dev.tiki.org/How+to+release
EOS;
exit;
......
......@@ -22,7 +22,7 @@ jQuery.fn.extend({
var o = jQuery(this);
if (!settings.force && !o.is('pre')) {
if (!o.data('codemirror')) return false;
if (!o.data('codemirror') || o.data("nocodemirror")) return false;
}
var textarea;
......@@ -40,8 +40,6 @@ jQuery.fn.extend({
if (textarea.attr('codeMirrorRelationshipFullscreen')) return false;
//ensure that codemirror is running and CKEditor isn't, if so run
if (window.CKEDITOR) return false;
if (!textarea.length) return false;
if (!window.CodeMirror) return false;
......
......@@ -172,7 +172,11 @@ abstract class Tracker_Field_Abstract implements Tracker_Field_Interface
protected function renderInnerOutput($context = array())
{
if ($context['list_mode'] === 'csv') {
return $this->getConfiguration('value');
$val = $this->getConfiguration('value');
$default = array('CR'=>'%%%', 'delimitorL'=>'"', 'delimitorR'=>'"');
$context = array_merge($default, $context);
$val = str_replace(array("\r\n", "\n", '<br />', $context['delimitorL'], $context['delimitorR']), array($context['CR'], $context['CR'], $context['CR'], $context['delimitorL'].$context['delimitorL'], $context['delimitorR'].$context['delimitorR']), $val);
return $val;
} else {
return $this->getConfiguration('pvalue', $this->getConfiguration('value'));
}
......
......@@ -60,7 +60,8 @@ class Tracker_Field_Text extends Tracker_Field_Abstract
$data = array(
'value' => $thisVal,
'pvalue' => TikiLib::lib('tiki')->parse_data(htmlspecialchars($thisVal)),
//'pvalue' => TikiLib::lib('tiki')->parse_data(htmlspecialchars($thisVal)),
'pvalue' => $thisVal,
'lingualvalue' => array(),
'lingualpvalue' => array(),
);
......
......@@ -798,8 +798,8 @@ class ModLib extends TikiLib
}
if (isset($info['parse']) && $info['parse'] == 'y') {
$info['data'] = $tikilib->parse_data($info['data']);
$info['title'] = $tikilib->parse_data($info['title'], array('noparseplugins' => true));
$info['data'] = $tikilib->parse_data($info['data'], array('is_html' => true));
$info['title'] = $tikilib->parse_data($info['title'], array('noparseplugins' => true, 'is_html' => true));
}
$smarty->assign('user_title', tra($info['title']));
......
......@@ -8,7 +8,7 @@ $(function() { // wrapping
// drag & drop ones first
var dragZonesSelector = "#top_modules, #topbar_modules, #bottom_modules, #pagetop_modules, #pagebottom_modules";
$(dragZonesSelector).droppable({});
$(dragZonesSelector).droppable({ hoverClass: "ui-state-active" });
$(".module", dragZonesSelector).each(function() {
if ($(this).css("position") === "absolute") {
var el = this;
......@@ -47,15 +47,17 @@ $(".modules").sortable( {
items: ".module:not('.ui-draggable')",
placeholder: "module-placeholder",
revert: 200,
tolerance: 'pointer',
stop: function (event, ui) {
if ($("#save_modules a:visible").length === 0) {
$("#save_modules a").show("fast").attr("sortable", $(this).attr("id"))
.parent().show("fast");
modAdminDirty = true;
}
$(this).removeClass("ui-state-active");
},
start: function (event, ui) {
$(this).addClass("ui-state-active");
},
receive: function(event, ui) {
......
......@@ -11,7 +11,7 @@ function prefs_auth_list() {
'name' => tra('Authentication method'),
'description' => tra('Multiple authentication backends are supported by Tikiwiki. The default value is to use the internal user database.'),
'type' => 'list',
'help' => 'Login+Authentication+Method',
'help' => 'External+Authentication',
'perspective' => false,
'options' => array(
'tiki' => tra('Tiki'),
......
......@@ -11,7 +11,7 @@ function prefs_contact_list() {
'name' => tra('Allow anonymous visitors to use the "Contact Us" feature.'),
'description' => tra('Allow anonymous visitors to use the "Contact Us" feature.'),
'type' => 'flag',
'help' => 'Contact+Us',
'help' => 'Contact+us',
'dependencies' => array(
'feature_contact',
),
......
......@@ -26,12 +26,13 @@ function prefs_feature_list($partial = false) {
return array(
'feature_blog_mandatory_category' => array(
'name' => tra('Force and limit categorization to within subtree of'),
'name' => tra('Blog:').' '.tra('Force and limit categorization to within subtree of'),
'description' => tra('If you get an error message indicating a mandatory category is required when editing a blog post, this is the option to blame. Set it to None.'),
'type' => 'list',
'options' => $catree,
'dependencies' => array(
'feature_categories',
'feature_blogs',
),
'default' => '-1',
),
......@@ -105,7 +106,7 @@ function prefs_feature_list($partial = false) {
'feature_articles' => array(
'name' => tra('Articles'),
'description' => tra('Articles can be used for date-specific news and announcements. You can configure articles to automatically publish and expire at specific times or to require that submissions be approved before becoming "live."'),
'help' => 'Article',
'help' => 'Articles',
'type' => 'flag',
'default' => 'n',
),
......@@ -477,7 +478,7 @@ function prefs_feature_list($partial = false) {
'name' => tra('Friendship Network'),
'description' => tra('Users can identify other users as their friends'),
'warning' => tra('Neglected feature'),
'help' => 'Friendship',
'help' => 'Friendship+Network',
'type' => 'flag',
'default' => 'n',
),
......@@ -963,7 +964,7 @@ function prefs_feature_list($partial = false) {
),
'feature_modulecontrols' => array(
'name' => tra('Show module controls'),
'help' => 'Module+Control',
'help' => 'Module',
'type' => 'flag',
'default' => 'n',
),
......@@ -1040,7 +1041,7 @@ function prefs_feature_list($partial = false) {
'name' => tra('Ignore category viewing restrictions'),
'hint' => tra('Will improve performance, but may show forbidden results'),
'type' => 'flag',
'help' => 'WYSIWYCA+Search',
'help' => 'Search',
'default' => 'n',
),
'feature_listPages' => array(
......@@ -1783,15 +1784,26 @@ function prefs_feature_list($partial = false) {
'default' => 'n',
),
'feature_wiki_mandatory_category' => array(
'name' => tra('Force and limit categorization to within subtree of'),
'name' => tra('Wiki:').' '.tra('Force and limit categorization to within subtree of'),
'description' => tra('If you get an error message indicating a mandatory category is required when editing a wiki page, this is the option to blame. Set it to None.'),
'type' => 'list',
'options' => $catree,
'dependencies' => array(
'feature_categories',
'feature_wiki',
),
'default' => -1,
),
'feature_image_gallery_mandatory_category' => array(
'name' => tra('Image Gallery:').' '.tra('Force and limit categorization to within subtree of'),
'description' => tra('If you get an error message indicating a mandatory category is required when editing an image (in an image gallery), this is the option to blame. Set it to None.'),
'type' => 'list',
'options' => $catree,
'dependencies' => array(
'feature_categories',
'feature_galleries',
),
),
'feature_wiki_show_hide_before' => array(
'name' => tra('Display show/hide icon displayed before headings'),
'type' => 'flag',
......
......@@ -35,20 +35,20 @@ function prefs_fgal_list() {
'fgal_prevent_negative_score' => array(
'name' => tra('Prevent download if score becomes negative'),
'type' => 'text',
'help' => 'File+Gallery+Config',
'help' => 'File+Gallery+config',
'size' => 50,
'default' => 'n',
),
'fgal_limit_hits_per_file' => array(
'name' => tra('Allow download limit per file'),
'type' => 'flag',
'help' => 'File+Gallery+Config',
'help' => 'File+Gallery+config',
'default' => 'n',
),
'fgal_allow_duplicates' => array(
'name' => tra('Allow same file to be uploaded more than once'),
'type' => 'list',
'help' => 'File+Gallery+Config',
'help' => 'File+Gallery+config',
'perspective' => false,
'options' => array(
'n' => tra('Never'),
......@@ -61,7 +61,7 @@ function prefs_fgal_list() {
'name' => tra('Display zip option in gallery'),
'type' => 'flag',
'description' => tra('Display in the gallery the zip option (in upload and gallery file)'),
'help' => 'File+Zip+Gallery+Config',
'help' => 'File+Gallery+config',
'default' => 'y',
),
'fgal_upload_progressbar' => array(
......@@ -71,7 +71,7 @@ function prefs_fgal_list() {
'n' => tra('None'),
'ajax_flash' => tra('Ajax / Flash (Browser-based)'),
),
'help' => 'File+Upload+Gallery+Config',
'help' => 'File+Gallery+config',
'default' => 'n',
),
'fgal_match_regex' => array(
......
......@@ -63,7 +63,7 @@ function prefs_global_list($partial = false) {
'name' => tra('Use group homepages'),
'description' => tra('Users can be sent to different pages upon login, depending on their default group.'),
'type' => 'flag',
'help' => 'Group',
'help' => 'Groups',
'keywords' => 'group home page pages',
'default' => 'n',
),
......
......@@ -33,7 +33,7 @@ function prefs_style_list($partial = false) {
'style_option' => array(
'name' => tra('Theme options'),
'type' => 'list',
'help' => 'Theme+options',
'help' => 'Themes',
'description' => tra('Style options'),
'options' => $style_options,
'default' => '',
......
......@@ -74,7 +74,6 @@ function prefs_wiki_list($partial = false) {
'description' => tra('Character to use as a delimiter in the page name. The portion of the name after this character will not be displayed.'),
'type' => 'text',
'size' => 5,
'help' => '#',
'default' => '',
),
'wiki_authors_style' => array(
......
......@@ -1410,7 +1410,7 @@ class Tiki_Profile_InstallHandler_Menu extends Tiki_Profile_InstallHandler // {{
$modtitle = $data['title'];
}
// Set up module only as a user module if position is set to 'none'
// Set up module only as a custom module if position is set to 'none'
if( $data['position'] == 'none' )
{
// but still allow module_arguments but keep it simple and don't include the $key=
......
......@@ -56,7 +56,7 @@ function smarty_block_textarea($params, $content, &$smarty, $repeat) {
unset($params['codemirror']);
unset($params['syntax']);
// mainly for modules admin - preview is for the module, not the user module so don;t need to confirmExit
// mainly for modules admin - preview is for the module, not the custom module so don;t need to confirmExit
$params['_previewConfirmExit'] = isset($params['_previewConfirmExit']) ? $params['_previewConfirmExit'] : 'y';
$params['_simple'] = isset($params['_simple']) ? $params['_simple'] : 'n';
......@@ -217,9 +217,9 @@ $( "#'.$as_id.'" ).ckeditor(CKeditor_OnComplete, {
});
', 20); // after dialog tools init (10)
$html .= '<textarea class="wikiedit" name="'.$params['name'].'" id="'.$as_id.'" style="visibility:hidden;'; // missing closing quotes, closed in condition
$html .= '<textarea class="wikiedit" name="'.$params['name'].'" id="'.$as_id.'" data-nocodemirror="y" style="visibility:hidden;'; // missing closing quotes, closed in condition
if (empty($params['cols'])) {
$html .= 'width:100%;'. (empty($params['cols']) ? 'height:500px;' : '') .'"';
$html .= 'width:100%;'. (empty($params['rows']) ? 'height:500px;' : '') .'"';
} else {
$html .= '" cols="'.$params['cols'].'"';
}
......
......@@ -6684,7 +6684,7 @@ if( \$('#$id') ) {
$links->insert(array(
'fromPage' => $pageFrom,
'toPage' => $pageTo,
));
), true);
$relationlib = TikiLib::lib('relation');
foreach( $types as $type ) {
......
......@@ -10,7 +10,7 @@ require_once('lib/wiki-plugins/wikiplugin_flash.php');
function wikiplugin_bliptv_info() {
return array(
'name' => tra('Bliptv'),
'documentation' => 'PluginBliptv',
'documentation' => 'PluginBlipTV',
'description' => tra('Display a Blip.tv video'),
'prefs' => array( 'wikiplugin_bliptv' ),
'icon' => 'pics/icons/bliptv.png',
......
......@@ -10,7 +10,7 @@ function wikiplugin_slideshow_info() {
'name' => tra('Slideshow'),
'documentation' => 'Slideshow',
'description' => tra('Configure a slideshow. Extends the existing wiki page slideshow with notes & styles.'),
'prefs' => array( 'wikiplugin_slideshow', 'feature_slideshow' ),
'prefs' => array( 'wikiplugin_slideshow', 'feature_slideshow', 'wiki_uses_slides' ),
'body' => tra('Slideshow notes - Separate with "/////"'),
'icon' => 'pics/icons/images.png',
'params' => array(
......
......@@ -10,6 +10,7 @@ function wikiplugin_trackercomments_info() {
'name' => tra('Tracker Comments'),
'documentation' => 'PluginTrackerComments',
'description' => tra('Display the number of tracker comments'),
'prefs' => array( 'feature_trackers', 'wikiplugin_trackercomments' ),
'icon' => 'pics/icons/comments.png',
'params' => array(
'trackerId' => array(
......
......@@ -14,7 +14,7 @@ function wikiplugin_trackerif_info()
'name' => tra('Tracker If'),
'documentation' => 'PluginTrackerIf',
'description' => tra('Display content based on results of a tracker field test'),
'prefs' => array( 'wikiplugin_trackerif', 'feature_trackers', 'wikiplugin_tracker' ),
'prefs' => array( 'wikiplugin_trackerif', 'feature_trackers', 'wikiplugin_tracker' ), // ML: is wikiplugin_tracker necessary?
'icon' => 'pics/icons/database_table.png',
'params' => array(
'test' => array(
......
......@@ -7,7 +7,7 @@
function wikiplugin_trackertoggle_info() {
return array(
'name' => tra('trackertoggle'),
'name' => tra('Tracker Toggle'),
'documentation' => 'PluginTrackerToggle',
'description' => tra('Toggle element display on a field value'),
'prefs' => array('wikiplugin_trackertoggle', 'feature_jquery', 'feature_trackers'),
......
......@@ -381,7 +381,7 @@ class WikiLib extends TikiLib
$wiki_cache = !is_null($info['wiki_cache']) ? $info['wiki_cache'] : $prefs['wiki_cache'];
if ($wiki_cache > 0 && empty($user) ) {
$cache_info = $this->get_cache_info($page);
if (!empty($cache_info['cache_timestamp']) && $cache_info['cache_timestamp'] + $prefs['wiki_cache'] > $this->now) {
if (!empty($cache_info['cache_timestamp']) && $cache_info['cache_timestamp'] + $wiki_cache > $this->now) {
$content = $cache_info['cache'];
// get any cached JS and add to headerlib JS
$headerlib->add_js( implode( "\n", $headerlib->getJsFromHTML( $content )));
......
......@@ -130,7 +130,7 @@
</div>
<div class="q234">
<textarea id="assign_params" name="assign_params" rows="1" cols="60" >{$assign_params|escape}</textarea>
{self_link um_edit=$assign_name cookietab="2" _anchor="editcreate"}{tr}Edit user module{/tr} {icon _id="arrow_right"}{/self_link}
{self_link um_edit=$assign_name cookietab="2" _anchor="editcreate"}{tr}Edit custom module{/tr} {icon _id="arrow_right"}{/self_link}
</div>
</div>
{/if}
......
......@@ -2,6 +2,7 @@
<div class="navbar">
{button href="tiki-browse_categories.php" _text="{tr}Browse categories{/tr}"}
{button href="tiki-admin_categories.php" _text="{tr}Administer categories{/tr}"}
{button href="tiki-edit_categories.php" _text="{tr}Organize Objects{/tr}" _title="{tr}Organize Objects{/tr}"}
</div>
<form action="tiki-admin.php?page=category" method="post">
......@@ -43,6 +44,11 @@
{preference name=category_i18n_synced}
</div>
{preference name=feature_wiki_mandatory_category}
{preference name=feature_blog_mandatory_category}
{preference name=feature_image_gallery_mandatory_category}
</fieldset>
<fieldset>
......
......@@ -135,13 +135,13 @@
{/tab}
{/if}
{tab name="{tr}User Modules{/tr}"}
{tab name="{tr}Custom Modules{/tr}"}
{if $prefs.feature_tabs neq 'y'}
<legend class="heading">
<a href="#usertheme" name="usertheme"><span>{tr}User Modules{/tr}</span></a>
<a href="#usertheme" name="usertheme"><span>{tr}Custom Modules{/tr}</span></a>
</legend>
{/if}
<h2>{tr}User Modules{/tr}</h2>
<h2>{tr}Custom Modules{/tr}</h2>
<table class="normal">
<tr>
<th>{tr}Name{/tr}</th>
......@@ -165,9 +165,9 @@
</table>
<br />
{if $um_name eq ''}
<h2>{tr}Create new user module{/tr}</h2>
<h2>{tr}Create new custom module{/tr}</h2>
{else}
<h2>{tr}Edit this user module:{/tr} {$um_name}</h2>
<h2>{tr}Edit this custom module:{/tr} {$um_name}</h2>
{/if}
{remarksbox type="tip" title="{tr}Tip{/tr}"}
{tr}Create your new custom module below. Make sure to preview first and make sure all is OK before <a href="#assign">assigning it</a>. Using html, you will be fine. However, if you improperly use wiki syntax or Smarty code, you could lock yourself out of the site.{/tr}
......@@ -178,7 +178,7 @@
<tr valign="top">
<td valign="top" class="odd">
{if $um_name ne ''}
<a href="tiki-admin_modules.php#editcreate">{tr}Create new user module{/tr}</a>
<a href="tiki-admin_modules.php#editcreate">{tr}Create new custom module{/tr}</a>
{/if}
<table>
<tr>
......
......@@ -23,7 +23,7 @@
</span>
<span id="editState">
{if $sheetId}
{button _id="edit_button" _text="{tr}Edit{/tr}" _htmlelement="role_main" _template="tiki-view_sheets.tpl" parse="edit" _auto_args="*" _class="" _title="{tr}New jQuery.sheet based editing{/tr}"}
{button _id="edit_button" _text="{tr}Edit{/tr}" _htmlelement="role_main" _template="tiki-view_sheets.tpl" parse="edit" _auto_args="*" _class=""}
{if $tiki_p_view_sheet eq 'y' || $tiki_p_admin eq 'y'}
{button href="tiki-sheets.php" _text="{tr}List Sheets{/tr}"}
......
......@@ -148,7 +148,7 @@ if (isset($_REQUEST["um_update"])) {
$smarty->assign_by_ref('um_data', $_REQUEST["um_data"]);
$smarty->assign_by_ref('um_parse', $_REQUEST["um_parse"]);
$modlib->replace_user_module($_REQUEST["um_name"], $_REQUEST["um_title"], $_REQUEST["um_data"], $_REQUEST["um_parse"]);
$logslib->add_log('adminmodules', 'changed user module ' . $_REQUEST["um_name"]);
$logslib->add_log('adminmodules', 'changed custom module ' . $_REQUEST["um_name"]);
}
if (!isset($_REQUEST["groups"])) {
$_REQUEST["groups"] = array();
......@@ -279,9 +279,9 @@ if (isset($_REQUEST["assign"])) {
if (isset($_REQUEST["um_remove"])) {
$_REQUEST["um_remove"] = urldecode($_REQUEST["um_remove"]);
$access->check_authenticity(tra('Are you sure you want to delete this User Module?') . '&nbsp;&nbsp;(&quot;' . $_REQUEST["um_remove"] . '&quot;)');
$access->check_authenticity(tra('Are you sure you want to delete this Custom Module?') . '&nbsp;&nbsp;(&quot;' . $_REQUEST["um_remove"] . '&quot;)');
$modlib->remove_user_module($_REQUEST["um_remove"]);
$logslib->add_log('adminmodules', 'removed user module ' . $_REQUEST["um_remove"]);
$logslib->add_log('adminmodules', 'removed custom module ' . $_REQUEST["um_remove"]);
$cookietab = 1;
}
if (isset($_REQUEST["um_edit"])) {
......@@ -388,13 +388,13 @@ foreach( $modlib->module_zones as $initial => $zone) {
$smarty->assign_by_ref( 'assigned_modules', $assigned_modules );
$smarty->assign_by_ref( 'module_zones', $module_zones );
$prefs['module_zones_top'] = 'y';
$prefs['module_zones_topbar'] = 'y';
$prefs['module_zones_pagetop'] = 'y';
$prefs['feature_left_column'] = 'y';
$prefs['feature_right_column'] = 'y';
$prefs['module_zones_pagebottom'] = 'y';
$prefs['module_zones_bottom'] = 'y';
$prefs['module_zones_top'] = 'fixed';
$prefs['module_zones_topbar'] = 'fixed';
$prefs['module_zones_pagetop'] = 'fixed';
$prefs['feature_left_column'] = 'fixed';
$prefs['feature_right_column'] = 'fixed';
$prefs['module_zones_pagebottom'] = 'fixed';
$prefs['module_zones_bottom'] = 'fixed';
$headerlib->add_css('.module:hover {
cursor: move;
......
......@@ -107,18 +107,13 @@ if (isset($_REQUEST["template"])) {
if ($mode == 'listing') {
// Get templates from the templates directory
$local = 'styles/'.str_replace('.css', '', $prefs['style']).'/';
$where = array('', 'modules/', 'mail/', 'map/', $local);
$where = array('', 'mail/', 'map/', 'modules/', $local);
$files = array();
chdir($smarty->template_dir);
foreach ($where as $w) {
$h = opendir($smarty->template_dir.$w);
while (($file = readdir($h)) !== false) {
if (substr($file,-4,4) == '.tpl' && ($w != $local || !in_array($file, $files))) {
$files[] = $w.$file;
$files = array_merge($files, glob($w . '*.tpl'));
}
}
closedir ($h);
}
sort ($files);
chdir($tikipath);
$smarty->assign('files', $files);
}
$smarty->assign('mode', $mode);
......
......@@ -316,16 +316,15 @@ while (($items = $trklib->list_items($_REQUEST['trackerId'], $offset, $chunkSize
case 'd': // text etc
$data = $field_value['value'];
if (is_array($data)) { // TODO handle other types of field better here (preferably in a function in $trklib)
$data = implode('%%%', $data);
$data = implode($CR, $data);
}
$data = str_replace(array("\r\n", "\n", '<br />', $delimitorL, $delimitorR), array($CR, $CR, $CR, $delimitorL.$delimitorL, $delimitorR.$delimitorR), $data);
break;
default:
$data = $trklib->get_field_handler($field_value, $item)->renderOutput(array(
'list_mode' => 'csv',
'list_mode' => 'csv', 'CR'=>$CR, 'delimitorL'=>$delimitorL, 'delimitorR'=>$delimitorR
));
}
}
$str .= needs_separator($str) ? '' : $separator;
$str .= $delimitorL.$data.$delimitorR;
......
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