Commit 1d13db8c authored by Jonny Bradley's avatar Jonny Bradley

[MRG] Automatic merge, branches/6.x 30823 to 30869

Conflicts manually resolved this time:
	tiki-list_posts.php
	lib/wiki-plugins/wikiplugin_flash.php
	lib/wiki-plugins/wikiplugin_youtube.php
	lib/setup/prefs.php
	tiki-setup_base.php
	templates/tiki-list_posts.tpl
(white space characters count!)
parent 8ca9e722
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5845,9 +5845,9 @@ $lang=Array(
// "Posted to" => "Posted to",
// "(Read More)" => "(Read More)",
// "Tracker name" => "Tracker name",
// "Incoming" => "Incoming",
"Incoming" => "Bejövő",
// "To <strong>continue translating</strong>, select the language to translate from" => "To <strong>continue translating</strong>, select the language to translate from",
// "Outgoing" => "Outgoing",
"Outgoing" => "Kimenő",
// "click to view" => "click to view",
// "Done" => "Done",
// "select" => "select",
......@@ -6441,19 +6441,19 @@ $lang=Array(
// "The following pages are in categories that the structure is not in. You may wish to recategorize them in order to be consistent" => "The following pages are in categories that the structure is not in. You may wish to recategorize them in order to be consistent",
// "Delete with the pages" => "Delete with the pages",
// "Create New structure" => "Create New structure",
// "This survey stats" => "This survey stats",
"This survey stats" => "Ezen kérdőív statisztikája",
// "Edit Survey Question" => "Edit Survey Question",
// "Add a New Question to this survey" => "Add a New Question to this survey",
// "Multiple choices of thumbnails from a file gallery" => "Multiple choices of thumbnails from a file gallery",
"Add a New Question to this survey" => "Kérdés hozzáadása a kérdőívhez",
"Multiple choices of thumbnails from a file gallery" => "Több előnézeti kép kiválasztása fájlgalériából",
// "Answer is mandatory" => "Answer is mandatory",
// "Number of required answers (for multiple choices)" => "Number of required answers (for multiple choices)",
// "For a multiple answer question put the answers into the following field, separated by a comma. Example: one,two,many,lots" => "For a multiple answer question put the answers into the following field, separated by a comma. Example: one,two,many,lots",
// "For a rate, you can give the maximum value" => "For a rate, you can give the maximum value",
// "For the 'multiple choices of thumbnail from a file gallery' type, options are: Gallery ID. Example: 4" => "For the 'multiple choices of thumbnail from a file gallery' type, options are: Gallery ID. Example: 4",
// "For the 'wiki textarea' type, options are: rows,columns. Example: 10,60" => "For the 'wiki textarea' type, options are: rows,columns. Example: 10,60",
// "Create Survey" => "Create Survey",
// "Create/Edit Surveys" => "Create/Edit Surveys",
// "Closed" => "Closed",
"For the 'wiki textarea' type, options are: rows,columns. Example: 10,60" => "A 'wiki szövegterület' típushoz, opciók: sor, oszlop. Például: 10,60",
"Create Survey" => "Kérdőív létrehozása",
"Create/Edit Surveys" => "Kérdőív létrehozása / szerkesztése",
"Closed" => "Lezárva",
// "View mode" => "View mode",
// "Wiki and WYSIWYG" => "Wiki and WYSIWYG",
// "Wiki only" => "Wiki only",
......@@ -6768,8 +6768,8 @@ $lang=Array(
// "If you click \"Download database translations\", you will download a file with all the translations in the database" => "If you click \"Download database translations\", you will download a file with all the translations in the database",
// "If you click \"Write to language.php\", the translations in the database will be merged with the other translations in language.php. Note that after writing translations to language.php they are removed from the database" => "If you click \"Write to language.php\", the translations in the database will be merged with the other translations in language.php. Note that after writing translations to language.php they are removed from the database",
// "To be able to write your translations back to language.php make sure that the web server has write permission in the lang/ directory" => "To be able to write your translations back to language.php make sure that the web server has write permission in the lang/ directory",
// "Download database translations" => "Download database translations",
// "Write to language.php" => "Write to language.php",
"Download database translations" => "Adatbázisban lévő fordítások letöltése",
"Write to language.php" => "Kiírás language.php fájlba",
// "Beware that when importing a language, all translations in the database for that language are deleted" => "Beware that when importing a language, all translations in the database for that language are deleted",
// "Return to default perspective" => "Return to default perspective",
// "Switch to" => "Switch to",
......@@ -6836,7 +6836,7 @@ $lang=Array(
// "Translate from" => "Translate from",
// "Changes that need to be translated are highlighted below" => "Changes that need to be translated are highlighted below",
// "No comment" => "No comment",
// "All Versions" => "All Versions",
"All Versions" => "Összes verzió",
// "Edit wiki page" => "Edit wiki page",
// "Select the style used to display differences to be translated" => "Select the style used to display differences to be translated",
// "html" => "html",
......@@ -7050,8 +7050,8 @@ $lang=Array(
// "\$type" => "\$type",
// "Post Title" => "Post Title",
// "Edit New Submission" => "Edit New Submission",
// "Survey stats" => "Survey stats",
// "Take Survey" => "Take Survey",
"Survey stats" => "Kérdőív statisztika",
"Take Survey" => "Kérdőív kitöltése",
// "users registered" => "users registered",
// "Distance (km)" => "Distance (km)",
// "Page aliases found" => "Page aliases found",
......@@ -11540,7 +11540,7 @@ $lang=Array(
"Use single spaces to indent structure levels" => "Szóköz használatával lehetséges a struktúra szintjeinek megadása",
"Create New Structure" => "Új struktúra létrehozása",
"Add a New Question" => "Új kérdés hozzáadása",
"List surveys" => "Kérdőívek listázása",
"List surveys" => "Kérdőív lista",
"Survey Stats" => "Kérdőív statisztika",
"Edit this Survey" => "Kérdőív szerkesztése",
"Admin Surveys" => "Kérdőívek adminisztrálása",
......@@ -11551,10 +11551,10 @@ $lang=Array(
"Wiki textarea" => "Wiki szöveges terület",
"Rate (1..5)" => "Súlyozás (1..5)",
"Rate (1..10)" => "Súlyozás (1..10)",
"Options (if apply)" => "Beállítások (ha kéri)",
"Options (if apply)" => "Beállítások (ha szükséges)",
"Questions" => "Kérdések",
"Admin surveys" => "Kérdőívek adminisztrálása",
"List Surveys" => "Kérdőívek listázása",
"List Surveys" => "Kérdőív lista",
"Edit this Survey:" => "Ezt a kérdőívet szerkeszd:",
"Create New Survey" => "Új kérdőív létrehozása",
"There are individual permissions set for this survey" => "Ehhez a kérdőívhez egyéni jogosultságok vannak beállítva",
......@@ -13165,4 +13165,10 @@ $lang=Array(
"Subject:" => "Tárgy:",
"To include the article clipping into your newsletter, cut and paste it into the contents." => "Cikkek beillesztésének lehetőségéhez ki kell vágni és be kell illeszteni a tartalomba.",
"Translate a string using Tikiwiki translation table." => "Szövegdarab lefordítása a Tiki fordítói adatbázisa segíségével",
"Answer is mandatory:" => "Kötelező válasz",
"Edit survey questions:" => "Kérdőív kérdések szerkesztése:",
"For a rate, you can give the maximum value." => "Értékelés maximális értéke",
"Note:" => "Megjegyzés:",
"Number of required answers (for multiple choices):" => "Szükséges válaszok száma (többszörös választás esetén):",
"Warning:" => "Figyelmeztetés:",
"###end###"=>"###end###");
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -413,8 +413,9 @@ class ArtLib extends TikiLib
$expireDate = $publishDate;
}
$hash = md5($title . $heading . $body);
if (empty($imgdata))
if (empty($imgdata) || $useImage === 'n') { // remove image data if not using it
$imgdata = '';
}
$query = 'select `name` from `tiki_topics` where `topicId` = ?';
$topicName = $this->getOne($query, array($topicId) );
......
......@@ -38,20 +38,28 @@ class Breadcrumb
/* static */
function breadcrumb_buildHeadTitle($crumbs) {
global $prefs;
if( _is_assoc($crumbs) ) {
return false;
}
if( is_array($crumbs) ) {
$ret = array();
foreach($crumbs as $crumb) {
$ret[] = breadcrumb_buildHeadTitle($crumb);
}
return implode(" : ", $ret);
} elseif ($prefs['site_title_breadcrumb'] == 'desc') {
return $crumbs->description;
} else {
return htmlspecialchars($crumbs->title);
}
if ($prefs['feature_breadcrumbs'] === 'y') {
if( _is_assoc($crumbs) ) {
return false;
}
if( is_array($crumbs) ) {
$ret = array();
foreach($crumbs as $crumb) {
$ret[] = breadcrumb_buildHeadTitle($crumb);
}
return implode(" : ", $ret);
} elseif ($prefs['site_title_breadcrumb'] == 'desc') {
return $crumbs->description;
} else {
return htmlspecialchars($crumbs->title);
}
} else {
if( is_array($crumbs) ) {
return $crumbs[count($crumbs) - 1]->title;
} else {
return $crumbs->title;
}
}
}
/**
......
......@@ -110,6 +110,10 @@ class Smarty_Tikiwiki extends Smarty
$this->assign('headtitle', tra('View ' . $str));
// get_strings tra('View Articles') tra('View Banner') tra('View Blog Post Image') tra('View Blog Post') tra('View Blog') tra('View Cache') tra('View Faq') tra('View Forum Thread')
// tra('View Minical Topic') tra('View Sheets') tra('View Tracker Item') tra('View Tracker More Info') tra('View Tracker')
} else { // still not set? guess...
$str = str_replace(array('tiki-', '.php', '_'), array('', '', ' '), $script_name);
$str = ucwords($str);
$this->assign('headtitle', tra($str)); // for files where no title has been set or can be reliably calculated - translators: please add comments here as you find them
}
}
......
......@@ -556,8 +556,8 @@ function prefs_feature_list() {
'type' => 'flag',
),
'feature_userlevels' => array(
'name' => tra('User Levels'),
'description' => tra('User Levels'),
'name' => tra('Menu User Levels'),
'description' => tra('Allows to control the menu options that can be seen by a user'),
'help' => 'User+Levels',
'type' => 'flag',
),
......
......@@ -8,7 +8,8 @@
function prefs_menus_list() {
return array(
'menus_items_icons' => array(
'name' => tra('Allow users to define icons for menus entries'),
'name' => tra('Menu icons'),
'description' => tra('Allows to define icons for menu entries'),
'type' => 'flag',
),
'menus_items_icons_path' => array(
......
......@@ -207,6 +207,7 @@ function get_default_prefs() {
'wikiplugin_articles' => 'y',
'wikiplugin_attach' => 'y',
'wikiplugin_attributes' => 'n',
'wikiplugin_author' => 'y',
'wikiplugin_avatar' => 'n',
'wikiplugin_back' => 'n',
'wikiplugin_backlinks' => 'n',
......@@ -340,13 +341,12 @@ function get_default_prefs() {
'wikiplugin_userlist' => 'n',
'wikiplugin_userpref' => 'n',
'wikiplugin_versions' => 'n',
'wikiplugin_vimeo' => 'y',
'wikiplugin_vimeo' => 'y',
'wikiplugin_vote' => 'y',
'wikiplugin_watershed' => 'n',
'wikiplugin_wantedpages' => 'n',
'wikiplugin_webservice' => 'n',
'wikiplugin_youtube' => 'y',
'wikiplugin_author' => 'y',
// Inline wiki plugins have their edit plugin icon disabled
'wikiplugininline_addtocart' => 'n',
......@@ -1496,7 +1496,7 @@ function get_default_prefs() {
'feature_htmlpurifier_output' => 'n',
'feature_ajax' => 'y',
'ajax_autosave' => 'y',
'ajax_xajax' => 'y',
'ajax_xajax' => 'n',
'feature_antibot' => 'y',
'feature_banners' => 'n',
'feature_banning' => 'n',
......
......@@ -4834,8 +4834,10 @@ if( \$('#$id') ) {
}
global $prefs;
if( isset($prefs['pluginaliaslist']) )
if( isset($prefs['pluginaliaslist']) ) {
$alias = @unserialize($prefs['pluginaliaslist']);
$alias = array_filter($alias);
}
if( $includeReal && $includeAlias )
$plugins = array_merge( $real, $alias );
......@@ -4846,8 +4848,8 @@ if( \$('#$id') ) {
else
$plugins = array();
sort($plugins);
sort(array_filter($plugins));
return $plugins;
}
......
......@@ -45,7 +45,7 @@ class TrackerLib extends TikiLib
function __construct() {
parent::__construct();
$this->imgMimeTypes = array('image/jpeg', 'image/gif', 'image/png', 'image/pjpeg');
$this->imgMimeTypes = array('image/jpeg', 'image/gif', 'image/png', 'image/pjpeg', 'image/bmp');
$this->imgMaxSize = (1048576 * 4); // 4Mo
}
......
......@@ -10,8 +10,9 @@ function wikiplugin_file_info()
return array(
'name' => tra( 'File' ),
'documentation' => 'PluginFile',
'description' => tra("Displays a link to a file (either from the file gallery or an attachment to a wiki page) and can display an image attachment."),
'description' => tra("Displays a link to a file (either from the file gallery or an attachment to a wiki page) and can display an image attachment. For more than one file from file galleries, or more optional information shown from the file/s, use the plugin FILES instead"),
'prefs' => array( 'wikiplugin_file' ),
'body' => tra('Label for the link to the file'),
'icon' => 'pics/icons/file-manager.png',
'inline' => true,
'params' => array(
......@@ -78,6 +79,14 @@ function wikiplugin_file_info()
'parent' => array('name' => 'type', 'value' => 'gallery'),
'advanced' => true,
),
'showicon' => array(
'required' => false,
'name' => tra('Show icon'),
'description' => 'y|n',
'filter' => 'alpha',
'parent' => array('name' => 'type', 'value' => 'gallery'),
'advanced' => true,
),
)
);
}
......@@ -118,7 +127,11 @@ function wikiplugin_file( $data, $params )
if (empty($data)) { // to avaoid problem with parsing
$data = empty($info['name'])?$info['filename']: $info['name'];
}
return "[tiki-download_file.php?fileId=$fileId|$data]";
if (isset($params['showicon']) & $params['showicon'] == "y") {
return "{img src=tiki-download_file.php?fileId=$fileId&amp;thumbnail=y&amp;x=16 link=tiki-download_file.php?fileId=$fileId} [tiki-download_file.php?fileId=$fileId|$data]";
} else {
return "[tiki-download_file.php?fileId=$fileId|$data]";
}
}
if ($prefs['feature_wiki_attachments'] != 'y') {
......
......@@ -23,7 +23,7 @@ function wikiplugin_flash_info() {
'description' => tra('Whether you want to insert a Flash from a URL, a fileId from a podcast file gallery or a link to a specific service like Youtube or Vimeo'),
'options' => array(
array('text' => tra('Select an option'), 'value' => ''),
array('text' => tra('Blip.tv'), 'value' => 'bliptv'),
array('text' => tra('Blip.tv'), 'value' => 'bliptv'),
array('text' => tra('FileId from a podcast file gallery'), 'value' => 'fileId'),
array('text' => tra('Movie URL'), 'value' => 'url'),
array('text' => tra('Vimeo'), 'value' => 'vimeo'),
......
......@@ -599,7 +599,7 @@ function wikiplugin_img_info() {
if (!empty($imgdata['id']) || !empty($imgdata['fileId']) || !empty($imgdata['attId']) || !empty($imgdata['randomGalleryId'])) {
if( ! $dbinfo ) {
return '^' . tra('File not found.') . '^';
} elseif( substr($dbinfo['filetype'], 0, 5) != 'image' ) {
} elseif( substr($dbinfo['filetype'], 0, 5) != 'image' AND !preg_match('/thumbnail/i', $imgdata['fileId'])) {
return '^' . tra('File is not an image.') . '^';
} else {
require_once('lib/images/images.php');
......
......@@ -71,6 +71,11 @@ function wikiplugin_tracker_info()
'name' => tra('Email'),
'description' => tra('from').'|'.tra('to').'|'.tra('template'),
),
'emailformat' => array(
'required' => false,
'name' => tra('Email format'),
'description' => tra('text or html setting'),
),
'url' => array(
'required' => false,
'name' => tra('URL'),
......@@ -217,7 +222,7 @@ function wikiplugin_tracker($data, $params)
static $iTRACKER = 0;
++$iTRACKER;
include_once('lib/trackers/trackerlib.php');
$default = array('overwrite' => 'n', 'embedded' => 'n', 'showtitle' => 'n', 'showdesc' => 'n', 'sort' => 'n', 'showmandatory'=>'y', 'status' => '', 'registration' => 'n');
$default = array('overwrite' => 'n', 'embedded' => 'n', 'showtitle' => 'n', 'showdesc' => 'n', 'sort' => 'n', 'showmandatory'=>'y', 'status' => '', 'registration' => 'n', 'emailformat' => 'text');
$params = array_merge($default, $params);
$item = array();
......@@ -704,7 +709,11 @@ function wikiplugin_tracker($data, $params)
$mail_data = tra('Tracker was modified at '). $_SERVER["SERVER_NAME"];
$mail->setSubject($mail_data);
$mail_data = $smarty->fetch('mail/'.$emailOptions[2][$itpl]);
if ($emailformat == 'html') {
$mail->setHtml($mail_data);
} else {
$mail->setText($mail_data);
}
$mail->buildMessage(array('text_encoding' => '8bit'));
$mail->send($ueo);
if (isset($tplSubject[$itpl+1]))
......
......@@ -49,7 +49,7 @@ function wikiplugin_youtube_info() {
),
'allowFullScreen' => array(
'required' => false,
'name' => tra('Full screen'),
'name' => tra('Allow Fullscreen'),
'description' => tra('Expand to full screen'),
'default' => 'false',
'filter' => 'alpha',
......@@ -63,7 +63,7 @@ function wikiplugin_youtube_info() {
'required' => false,
'name' => tra('Related'),
'description' => tra('Show related videos'),
'introduced' => 7.0,
'introduced' => 6.1,
'filter' => 'alpha',
'options' => array(
array('text' => tra('Yes'), 'value' => 'y'),
......@@ -77,7 +77,7 @@ function wikiplugin_youtube_info() {
'name' => tra('Background'),
'description' => tra('Toolbar background color'),
'accepted' => tra('HTML color code, e.g. ffffff'),
'introduced' => 7.0,
'introduced' => 6.1,
'filter' => 'striptags',
'default' => '',
'advanced' => true
......@@ -87,7 +87,7 @@ function wikiplugin_youtube_info() {
'name' => tra('Borders'),
'description' => tra('Toolbar border colors'),
'accepted' => tra('HTML color code, e.g. ffffff'),
'introduced' => 7.0,
'introduced' => 6.1,
'filter' => 'striptags',
'default' => '',
'advanced' => true
......
......@@ -69,7 +69,7 @@
{* add $description|escape if you want to put the description + update breadcrumb_build replace return $crumbs->title; with return empty($crumbs->description)? $crumbs->title: $crumbs->description; *}
{elseif !empty($arttitle)}
{$arttitle|escape}
{elseif !empty($title)}
{elseif !empty($title) and !is_array($title)}
{$title|escape}
{elseif !empty($thread_info.title)}
{$thread_info.title|escape}
......
......@@ -162,18 +162,13 @@ function capLock(e){
{/if}
</form>
{/if}
{if $prefs.auth_method eq 'openid' and !$user and $registration eq 'n'}
{if $prefs.auth_method eq 'openid' and !$user and (!isset($registration) || $registration neq 'y')}
<form method="get" action="tiki-login_openid.php">
<fieldset>
<legend>{tr}OpenID Log in{/tr}</legend>
<input class="openid_url" type="text" name="openid_url"/>
<input type="submit" value="{tr}Go{/tr}"/>
<a class="linkmodule tikihelp" target="_blank" href="http://doc.tiki.org/OpenID">{tr}What is OpenID?{/tr}</a>
{*<div>
<input type="checkbox" name="action" value="force" id="openid_force"/>
<label for="openid_force">{tr}Force assign of new OpenID user link{/tr}</label>
</div>*}
</fieldset>
</form>
{/if}
......
......@@ -164,6 +164,7 @@
<div class="adminoptionbox">
{preference name=feature_phplayers}
{preference name=feature_cssmenus}
{preference name=feature_userlevels}
{preference name=feature_featuredLinks}
{preference name=feature_menusfolderstyle}
{preference name=menus_items_icons}
......
......@@ -72,6 +72,14 @@
{preference name=auth_token_tellafriend}
{preference name=auth_token_share}
{/tab}
{tab name="{tr}Clipperz online password management{/tr}"}
<fieldset>
{tr}Tiki doesn't offer a built-in password management feature.{/tr} <a href="http://doc.tiki.org/clipperz" target="_blank">{tr}Learn more about Clipperz{/tr}</a>
</fieldset>
{/tab}
{/tabset}
<div class="input_submit_container" style="margin-top: 5px; text-align: center">
......
{title help="i18n" admpage="i18n"}{tr}Translate:{/tr}&nbsp;{$source_page|escape}{if isset($languageName)}&nbsp;({$languageName}, {$langpage|escape}){/if}{/title}
{title help="i18n" admpage="i18n"}{tr}Translate:{/tr}&nbsp;{$name|escape}{if isset($languageName)}&nbsp;({$languageName}, {$langpage|escape}){/if}{/title}
<div class="navbar">
{if $type eq 'wiki page'}
{assign var=thisname value=$target_page|escape:'url'}
{assign var=thisname value=$name|escape:'url'}
{button href="tiki-index.php?page=$thisname&no_bl=y" _text="{tr}View Page{/tr}"}
{else}
{button href="tiki-read_article.php?articleId=$id" _text="{tr}View Article{/tr}"}
......@@ -66,7 +66,7 @@
</p>
<p>{tr}Enter the page title:{/tr}
<input type="text" size="40" name="page" id="translation_name"/>
<input type="hidden" name="source_page" value="{$page|escape}"/>
<input type="hidden" name="source_page" value="{$name|escape}"/>
<input type="hidden" name="oldver" value="-1"/>
<input type="hidden" name="is_new_translation" value="y"/>
</p>
......@@ -80,7 +80,7 @@
</fieldset>
</form>
{/if}
{if !isset($articles)}
{jq}
{literal}
// Make the translation name have the focus.
......@@ -115,16 +115,16 @@ function validate_translation_request() {
}
{/literal}
{/jq}
{/if}
{if !empty($langpage)}
<br />
<hr />
<br />
<a name="attach_detach_translations"></a>
<h3>{tr}Attach or detach existing translations of this page{/tr}</h3>
<h3>{if isset($articles)}{tr}Attach or detach existing translations of this article{/tr}{else}{tr}Attach or detach existing translations of this page{/tr}{/if}</h3>
<table class="normal">
<tr><th>{tr}Language{/tr}</th><th>{tr}Page{/tr}</th><th>{tr}Actions{/tr}</th></tr>
<tr><th>{tr}Language{/tr}</th><th>{if isset($articles)}{tr}Article{/tr}{else}{tr}Page{/tr}{/if}</th><th>{tr}Actions{/tr}</th></tr>
{cycle values="odd,even" print=false}
{section name=i loop=$trads}
<tr class="{cycle}">
......@@ -132,7 +132,7 @@ function validate_translation_request() {
<td>{if $type == 'wiki page'}<a href="tiki-index.php?page={$trads[i].objName|escape:url}&no_bl=y">{else}<a href="tiki-read_article.php?articleId={$trads[i].objId|escape:url}">{/if}{$trads[i].objName|escape}</a></td>
<td>
{if $tiki_p_detach_translation eq 'y' }
<a rel="nofollow" class="link" href="tiki-edit_translation.php?detach&amp;page={$target_page|escape}&amp;id={$id|escape:url}&amp;srcId={$trads[i].objId|escape:url}&amp;type={$type|escape:url}">{icon _id='cross' alt="{tr}detach{/tr}"}</a>
<a rel="nofollow" class="link" href="tiki-edit_translation.php?detach&amp;id={$id|escape:url}&amp;srcId={$trads[i].objId|escape:url}&amp;type={$type|escape:url}">{icon _id='cross' alt="{tr}detach{/tr}"}</a>
{/if}
</td></tr>
{/section}
......@@ -146,8 +146,7 @@ function validate_translation_request() {
<fieldset>
<input type="hidden" name="id" value="{$id}" />
<input type="hidden" name="type" value="{$type|escape}" />
<input type="hidden" name="page" value="{$target_page|escape}" />
<p>{tr}Add existing page as a translation of this page:{/tr}<br />
<p>{if isset($articles)}{tr}Mark existing article as a translation of this one:{/tr}{else}{tr}Add existing page as a translation of this page:{/tr}{/if}<br />
{if $articles}
<select name="srcId">{section name=ix loop=$articles}{if !empty($articles[ix].lang) and $langpage ne $articles[ix].lang}<option value="{$articles[ix].articleId|escape}" {if $articles[ix].articleId == $srcId}checked="checked"{/if}>{$articles[ix].title|truncate:80:"(...)":true|escape}</option>{/if}{/section}</select>
......@@ -175,7 +174,8 @@ function validate_translation_request() {
<option value="{$lang.value|escape}">{$lang.name}</option>
{/foreach}
</select>
<input type="hidden" name="page" value="{$target_page|escape}"/>
<input type="hidden" name="id" value="{$id}"/>
<input type="hidden" name="type" value="{$type}" />
<input type="submit" name="switch" value="{tr}Change Language{/tr}"/>
</div>
</form>
......@@ -195,7 +195,6 @@ function validate_translation_request() {
</select>
<input type="hidden" name="id" value="{$id}" />
<input type="hidden" name="type" value="{$type|escape}" />
<input type="hidden" name="page" value="{$target_page|escape}"/>
<input type="submit" value="{tr}Set Current Page's Language{/tr}"/>
</p>
</form>
......
......@@ -217,7 +217,8 @@
{if $print_page eq 'y'}
<br />
{tr}The original document is available at{/tr} <a href="{$base_url}{$page|sefurl}">{$base_url}{$page|sefurl}</a>
{capture name=url}{$base_url}{$page|sefurl}{if !empty($smarty.request.itemId)}&amp;itemId={$smarty.request.itemId}{/if}{/capture}
{tr}The original document is available at{/tr} <a href="{$smarty.capture.url}">{$smarty.capture.url}</a>
{/if}
{/strip}{/capture}
......
......@@ -25,11 +25,13 @@
{if count($uploads) > 0}
{button href="#upload" _text="{tr}Upload File{/tr}"}
{/if}
{if $simpleMode eq 'y'}{button simpleMode='n' galleryId=$galleryId href="" _text="{tr}Advanced mode{/tr}" _ajax="n"}{else}{button galleryId=$galleryId href="" _text="{tr}Simple mode{/tr}" _ajax="n"}{/if}
<span{if $simpleMode eq 'y'} style="display:none;"{/if}>
<label for="keepOpenCbx">{tr}Keep gallery window open{/tr}</label>
<input type="checkbox" id="keepOpenCbx" checked="checked">
</span>
{if isset($filegals_manager)}
{if $simpleMode eq 'y'}{button simpleMode='n' galleryId=$galleryId href="" _text="{tr}Advanced mode{/tr}" _ajax="n"}{else}{button galleryId=$galleryId href="" _text="{tr}Simple mode{/tr}" _ajax="n"}{/if}
<span{if $simpleMode eq 'y'} style="display:none;"{/if}>
<label for="keepOpenCbx">{tr}Keep gallery window open{/tr}</label>
<input type="checkbox" id="keepOpenCbx" checked="checked">
</span>
{/if}
</div>
{/if}
......
......@@ -423,7 +423,7 @@ if (isset($_REQUEST['batch']) && is_uploaded_file($_FILES['csvlist']['tmp_name']
$smarty->display('error.tpl');
die;
}
$mail->setText($text);
$mail->setHtml($text);
$mail->send($userlib->get_user_email($mail_user));
}
$smarty->assign_by_ref('user', $user);
......
......@@ -5,24 +5,14 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
$tracesOn = false;
require_once('tiki-setup.php');
include_once('lib/multilingual/multilinguallib.php');
include_once('modules/mod-func-translation.php');
if ($tracesOn) {
echo "<pre>-- tiki-edit_translation: \$_REQUEST="; var_dump($_REQUEST); echo "</pre>\n";
}
execute_module_translation();
$access->check_feature('feature_multilingual');
if (isset($_REQUEST['page'])) {
$smarty->assign('page', $_REQUEST['page']);
}
if (!(isset($_REQUEST['page']) && $_REQUEST['page']) && !(isset($_REQUEST['id']) && $_REQUEST['id'])) {
$smarty->assign('msg',tra("No object indicated"));
......@@ -50,7 +40,6 @@ if ((!isset($_REQUEST['type']) || $_REQUEST['type'] == 'wiki page' || $_REQUEST[
$langpage = $info['lang'];
$fullLangName = $langmapping[$langpage][0];
$smarty->assign( 'languageName', $fullLangName );
$smarty->assign( 'source_page', $name );
$cat_type = 'wiki page';
$cat_objid = $name;
......@@ -78,8 +67,18 @@ else if ($_REQUEST['id']) {
$type = "wiki page";
$objId = $info['page_id'];
$langpage = $info['lang'];
$fullLangName = $langmapping[$langpage][0];
$smarty->assign( 'languageName', $fullLangName );
$cat_type = 'wiki page';
$cat_objid = $name;
$edit_data = $info['data'];
$smarty->assign('pagedata', TikiLib::htmldecode($edit_data));
if ($prefs['feature_translation_incomplete_notice'] == 'y') {
$smarty->assign('translate_message', "^".tra("Translation of this page is incomplete.")."^\n\n");
}
}
else if ($_REQUEST['type'] == "article") {
global $artlib; require_once 'lib/articles/artlib.php';
......@@ -93,20 +92,14 @@ else if ($_REQUEST['id']) {
$type = "article";
$objId = $_REQUEST['id'];
$langpage = $info['lang'];
$articles = $artlib->list_articles(0, -1, 'title_asc', '', '', '', $user);
$smarty->assign('articles', $articles["data"]);
$cat_type = 'article';
$cat_objid = $objId;
$fullLangName = $langmapping[$langpage][0];
$smarty->assign( 'languageName', $fullLangName );
$smarty->assign( 'source_page', $name );
}
}
$smarty->assign('name', $name);
$smarty->assign('target_page', $name);
$smarty->assign('type', $type);
$smarty->assign('id', $objId);
......@@ -292,6 +285,11 @@ ask_ticket('edit-translation');
// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');
if ($type == 'article') {
$articles = $artlib->list_articles(0, -1, 'title_asc', '', '', '', $user);
$smarty->assign('articles', $articles["data"]);
}
// Display the template
$smarty->assign('mid', 'tiki-edit_translation.tpl');
$smarty->display("tiki.tpl");
......
......@@ -237,13 +237,17 @@ if(empty($info) && !($user && $prefs['feature_wiki_userpage'] == 'y' && strcasec
}
}
$access->redirect( $url );
} else if ($prefs['feature_wiki_pagealias'] == 'y' && count($likepages) > 1) {
// if two different pages use the same wiki page alias display an error
$smarty->assign('msg', tra("There are more than one page using this alias: ") . join(', ', $likepages));
$smarty->display('error.tpl');
die;
}
$smarty->assign_by_ref('likepages', $likepages);
$smarty->assign('create', $isUserPage? 'n': 'y');
$access->display_error( $page, tra('Page cannot be found'), '404' );
}
if (empty($info) && $user && $prefs['feature_wiki_userpage'] == 'y' && (strcasecmp($prefs['feature_wiki_userpage_prefix'].$user, $page) == 0 || strcasecmp($prefs['feature_wiki_userpage_prefix'], $page) == 0 )) {
header('Location: tiki-editpage.php?page='.$prefs['feature_wiki_userpage_prefix'].$user);
......
......@@ -35,7 +35,6 @@ if (isset($_REQUEST["find"])) {
$find = '';
}
$smarty->assign('find', $find);
if (isset($_REQUEST['blogId'])) {
$blogId = $_REQUEST['blogId'];
$blog = $bloglib->get_blog($blogId);
......
......@@ -325,7 +325,13 @@ if ($isvalid) {
}
}
}
} else {
} else { // if ($isvalid)
// not valid - check if site is closed first
if ($prefs['site_closed'] === 'y') {
unset($bypass_siteclose_check);
include 'lib/setup/site_closed.php';
}
if (isset($_REQUEST['url'])) {
$smarty->assign('url', $_REQUEST['url']);
}
......
......@@ -19,6 +19,7 @@ if (empty($_REQUEST['objectType'])) {
$_REQUEST['objectId'] = '';
}