Commit 79683bb9 authored by sylvieg's avatar sylvieg

Instant-Auto-Merge from BRANCH-1-9 to HEAD

parent e2f3a8cf
......@@ -2,7 +2,7 @@
// $start_time = microtime(true);
// $Header: /cvsroot/tikiwiki/tiki/comments.php,v 1.67 2007-01-17 14:09:18 sylvieg Exp $
// $Header: /cvsroot/tikiwiki/tiki/comments.php,v 1.68 2007-01-17 14:55:53 sylvieg Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -529,10 +529,13 @@ $comments_coms = $commentslib->get_comments($comments_objectId, $_REQUEST["comme
$_REQUEST['comments_threshold'], $_REQUEST["comments_style"], $threadId_if_reply);
// $end_time = microtime(true);
// print "TIME5 in comments.php: ".($end_time - $start_time)."\n";
$comments_cant = $commentslib->count_comments($comments_objectId);
if ($comments_prefix_var == 'forum:') {
$comments_cant = $commentslib->count_comments('topic:'. $_REQUEST['comments_parentId']); // comments in the topic not in the forum
} else {
$comments_cant = $commentslib->count_comments($comments_objectId);
}
$comments_cant_page = $comments_coms['cant'];
$smarty->assign('comments_below', $comments_coms["below"]);
......
......@@ -1263,8 +1263,13 @@ class Comments extends TikiLib {
function count_comments($objectId) {
$object = explode( ":", $objectId, 2);
$query = "select count(*) from `tiki_comments` where `objectType`=? and `object`=?";
$cant = $this->getOne($query, $object );
if ($object[0] == 'topic') {
$query = 'select count(*) from `tiki_comments` where `objectType`=? and `parentId`=?';
$cant = $this->getOne($query, array('forum', $object[1]));
} else {
$query = 'select count(*) from `tiki_comments` where `objectType`=? and `object`=?';
$cant = $this->getOne($query, $object );
}
return $cant;
}
......
<?php
class TikiPhplayers extends TikiLib {
/* Build the input to the phplayers lib for a category tree */
function mkCatEntry($categId, $indent="", $back, $categories, $urlEnd, $tpl='') {
global $smarty, $language,$categlib;
$kids = array();
foreach ($categories as $cat) {
if ($cat['parentId'] == $categId) {
$kids[] = $cat;
}
}
if (count($kids)) {
$total = 0;
foreach ($kids as $k) {
$k['name']= $categlib->get_category_name($k['categId']);
list($subTree, $count) = $this->mkCatEntry($k['categId'],".$indent",'', $categories, $urlEnd, $tpl);
$count += $k['objects'];
$total += $count;
$back .= "$indent|";
if ($tpl != '') {
$smarty->assign('categoryName', $k['name']);
$smarty->assign('categoryLocal', $k['objects']);
$smarty->assign('categoryTotal', $count);
$back .= $smarty->fetchLang($language, $tpl);
} else
$back .= $k['name'];
$back .= '|tiki-browse_categories.php?parentId='.$k['categId'].$urlEnd;
$back .= $subTree;
}
return array($back, $total);
} else {
return array('', 0);
}
}
function mkMenuEntry($idMenu) {
global $tikilib;
$menu_info = $tikilib->get_menu($idMenu);
$channels = $tikilib->list_menu_options($idMenu, 0, -1, 'position_asc', '');
$indented = false;
$res = '';
foreach ($channels["data"] as $cd) {
$cd["name"] = tra($cd["name"]);
if ($cd["type"] == 'o' and $indented) {
$res .= ".";
} elseif ($cd["type"] == 's') {
$indented = true;
}
$res .= ".|".$cd["name"]."|".$cd["url"]."\n";
}
return $res;
}
function getParamsStyle($style) {
switch ($style) {
case 'vert':
$type = 'layersmenu.inc.php';
$class = 'LayersMenu';
$new = 'newVerticalMenu';
$tplFct = 'setVerticalMenuTpl';
$tpl = 'layersmenu-vertical_menu-galaxy.ihtml';
break;
case 'horiz':
$type = 'layersmenu.inc.php';
$class = 'LayersMenu';
$new = 'newHorizontalMenu';
$tplFct = 'setHorizontalMenuTpl';
$tpl = 'layersmenu-horizontal_menu.ihtml';
break;
case 'tree':
default:
$type = 'treemenu.inc.php';
$class = 'TreeMenu';
$new = 'newTreeMenu';
$tplFct = '';
$tpl = '';
break;
case 'phptree':
$type = 'phptreemenu.inc.php';
$class = 'PHPTreeMenu';
$new = 'newPHPTreeMenu';
$tplFct = '';
$tpl = '';
break;
case 'plain':
$type = 'plainmenu.inc.php';
$class = 'PlainMenu';
$new = 'newPlainMenu';
$tplFct = '';
$tpl = '';
break;
}
return array($type, $class, $new, $tplFct, $tpl);
}
function mkMenu($itall, $name, $style, $file='') {
list($plType, $plClass, $plNew, $plTplFct, $plTpl) = $this->getParamsStyle($style);
include_once ("lib/phplayers/lib/PHPLIB.php");
include_once ("lib/phplayers_tiki/lib/layersmenu-common.inc.php"); // include Tiki's modified version of that file to keep original intact (luci)
include_once ('lib/phplayers/lib/layersmenu.inc.php');
include_once ("lib/phplayers/lib/".$plType);
global $$plClass;
if (!isset($$plClass)) {
$$plClass = new $plClass(); // to have 2 menus of the same type need no reinstanciation
}
$$plClass->setDirrootCommon("lib/phplayers");
$$plClass->setLibjsdir("lib/phplayers/libjs/");
$$plClass->setImgdir("lib/phplayers/images/");
$$plClass->setImgwww("lib/phplayers/images/");
$$plClass->setTpldirCommon("lib/phplayers/templates/");
if ($itall) {
$$plClass->setMenuStructureString($itall);
} elseif ($file && is_file($file)) {
$$plClass->setMenuStructureFile($file);
}
$$plClass->parseStructureForMenu($name);
$res = '';
if ($style == 'vert' || $style == 'horiz') {
$$plClass->setDownArrowImg('down-galaxy.png');
$$plClass->setForwardArrowImg('forward-galaxy.png');
$$plClass->$plTplFct($plTpl);
$$plClass->setSubMenuTpl('layersmenu-sub_menu-galaxy.ihtml');
$$plClass->$plNew($name);
$res .= $$plClass->getMenu($name);
// makeHeader and makeFooter are done in the footer.tpl (if there is more than one LayersMenus)
} else {
$res .= $$plClass->$plNew($name);
}
return $res;
}
}
global $dbTiki;
$tikiphplayers = new TikiPhpLayers($dbTiki);
?>
<?php
// $Header: /cvsroot/tikiwiki/tiki/lib/phplayers_tiki/tiki-phplayers.php,v 1.7 2007-01-17 14:55:54 sylvieg Exp $
class TikiPhplayers extends TikiLib {
/* Build the input to the phplayers lib for a category tree */
function mkCatEntry($categId, $indent="", $back, $categories, $urlEnd, $tpl='') {
global $smarty, $language,$categlib;
$kids = array();
foreach ($categories as $cat) {
if ($cat['parentId'] == $categId) {
$kids[] = $cat;
}
}
if (count($kids)) {
$total = 0;
foreach ($kids as $k) {
$k['name']= $categlib->get_category_name($k['categId']);
list($subTree, $count) = $this->mkCatEntry($k['categId'],".$indent",'', $categories, $urlEnd, $tpl);
$count += $k['objects'];
$total += $count;
$back .= "$indent|";
if ($tpl != '') {
$smarty->assign('categoryName', $k['name']);
$smarty->assign('categoryLocal', $k['objects']);
$smarty->assign('categoryTotal', $count);
$back .= $smarty->fetchLang($language, $tpl);
} else
$back .= $k['name'];
$back .= '|tiki-browse_categories.php?parentId='.$k['categId'].$urlEnd;
$back .= $subTree;
}
return array($back, $total);
} else {
return array('', 0);
}
}
function mkMenuEntry($idMenu, &$curOption) {
global $tikilib;
$menu_info = $tikilib->get_menu($idMenu);
$channels = $tikilib->list_menu_options($idMenu, 0, -1, 'position_asc', '');
$indented = false;
$res = '';
$curOption = -1;
$url = urldecode($_SERVER['REQUEST_URI']);
include_once('lib/wiki/wikilib.php');
$homePage = strtolower($wikilib->get_default_wiki_page());
if (preg_match('/.*tiki.index.php$/', $url)) {
$url .= "?page=$homePage";
} elseif (preg_match('/tiki-index.php/', $url)) {
$url = strtolower($url);
}
foreach ($channels["data"] as $cd) {
$cd["name"] = tra($cd["name"]);
if ($cd["type"] == 'o' and $indented) {
$res .= ".";
} elseif ($cd["type"] == 's') {
$indented = true;
}
$res .= ".|".$cd["name"]."|".$cd["url"]."\n";
if (!empty($cd['url']) && empty($curOption)) {
if ($cd['url'] == 'tiki-index.php') {
$cd['url'] .= "?page=$homePage";
}
if (($pos = strpos($url, strtolower($cd['url']))) !== false && ($pos == 0 || $url[$pos -1] == '/' || $url[$pos - 1] == '\\')) {
$curOption = $key+1;
}
}
}
return $res;
}
function getParamsStyle($style) {
switch ($style) {
case 'vert':
$type = 'layersmenu.inc.php';
$class = 'LayersMenu';
$new = 'newVerticalMenu';
$tplFct = 'setVerticalMenuTpl';
$tpl = 'layersmenu-vertical_menu-galaxy.ihtml';
break;
case 'horiz':
$type = 'layersmenu.inc.php';
$class = 'LayersMenu';
$new = 'newHorizontalMenu';
$tplFct = 'setHorizontalMenuTpl';
$tpl = 'layersmenu-horizontal_menu.ihtml';
break;
case 'tree':
default:
$type = 'treemenu.inc.php';
$class = 'TreeMenu';
$new = 'newTreeMenu';
$tplFct = '';
$tpl = '';
break;
case 'phptree':
$type = 'phptreemenu.inc.php';
$class = 'PHPTreeMenu';
$new = 'newPHPTreeMenu';
$tplFct = '';
$tpl = '';
break;
case 'plain':
$type = 'plainmenu.inc.php';
$class = 'PlainMenu';
$new = 'newPlainMenu';
$tplFct = '';
$tpl = '';
break;
}
return array($type, $class, $new, $tplFct, $tpl);
}
function mkMenu($itall, $name, $style, $file='', $curOption = -1) {
list($plType, $plClass, $plNew, $plTplFct, $plTpl) = $this->getParamsStyle($style);
include_once ("lib/phplayers/lib/PHPLIB.php");
include_once ("lib/phplayers_tiki/lib/layersmenu-common.inc.php"); // include Tiki's modified version of that file to keep original intact (luci)
include_once ('lib/phplayers/lib/layersmenu.inc.php');
include_once ("lib/phplayers/lib/".$plType);
global $$plClass;
if (!isset($$plClass)) {
$$plClass = new $plClass(); // to have 2 menus of the same type need no reinstanciation
}
$$plClass->setDirrootCommon("lib/phplayers");
$$plClass->setLibjsdir("lib/phplayers/libjs/");
$$plClass->setImgdir("lib/phplayers/images/");
$$plClass->setImgwww("lib/phplayers/images/");
$$plClass->setTpldirCommon("lib/phplayers/templates/");
if ($itall) {
$$plClass->setMenuStructureString($itall);
} elseif ($file && is_file($file)) {
$$plClass->setMenuStructureFile($file);
}
$$plClass->parseStructureForMenu($name);
if ($curOption != -1)
$phplayers->setSelectedItemByCount($struct[$type], $curOption);
$res = '';
if ($style == 'vert' || $style == 'horiz') {
$$plClass->setDownArrowImg('down-galaxy.png');
$$plClass->setForwardArrowImg('forward-galaxy.png');
$$plClass->$plTplFct($plTpl);
$$plClass->setSubMenuTpl('layersmenu-sub_menu-galaxy.ihtml');
$$plClass->$plNew($name);
$res .= $$plClass->getMenu($name);
// makeHeader and makeFooter are done in the footer.tpl (if there is more than one LayersMenus)
} else {
$res .= $$plClass->$plNew($name);
}
return $res;
}
}
global $dbTiki;
$tikiphplayers = new TikiPhpLayers($dbTiki);
?>
......@@ -28,12 +28,12 @@ function smarty_function_phplayers($params, &$smarty) {
}
if (!empty($id)) {
$output = $tikiphplayers->mkMenuEntry($id);
$output = $tikiphplayers->mkMenuEntry($id, $curOption);
}
$name = 'usermenu'.$id;
if (!isset($file))
$file = '';
echo $tikiphplayers->mkMenu($output, $name, $type, $file);
echo $tikiphplayers->mkMenu($output, $name, $type, $file, $curOption);
}
?>
<?php
// CVS: $Id: tikilib.php,v 1.699 2007-01-12 13:59:38 mose Exp $
// CVS: $Id: tikilib.php,v 1.700 2007-01-17 14:55:53 sylvieg Exp $
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
......@@ -2386,7 +2386,7 @@ function add_pageview() {
}
/*shared*/
function list_articles($offset = 0, $maxRecords = -1, $sort_mode = 'publishDate_desc', $find = '', $date = '', $user=false, $type = '', $topicId = '', $visible_only = 'y', $topic='', $categId='',$creator='',$group='') {
function list_articles($offset = 0, $maxRecords = -1, $sort_mode = 'publishDate_desc', $find = '', $date = '', $user=false, $type = '', $topicId = '', $visible_only = 'y', $topic='', $categId='',$creator='',$group='', $lang='') {
global $userlib, $user;
$mid = '';
......@@ -2497,6 +2497,12 @@ function add_pageview() {
$mid .= " where $condition";
}
}
if (!empty($lang)) {
$condition = '`tiki_articles`.`lang`=?';
$mid .= ($mid)? ' and ': ' where ';
$mid .= $condition.' ';
$bindvars[] = $lang;
}
if ($mid)
$mid2 = " and ";
else
......
......@@ -9,8 +9,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
/**
* Filename.......: class.html.mime.mail.inc
* Project........: HTML Mime mail class
* Last Modified..: $Date: 2006-01-20 09:54:56 $
* CVS Revision...: $Revision: 1.15 $
* Last Modified..: $Date: 2007-01-17 14:55:54 $
* CVS Revision...: $Revision: 1.16 $
* Copyright......: 2001, 2002 Richard Heyes
*/
......@@ -439,7 +439,8 @@ class htmlMimeMail {
if (is_object($obj)) {
return $obj->addSubpart('', $params);
} else {
return new Mail_mimePart('', $params);
$m = new Mail_mimePart('', $params);
return $m;
}
}
......@@ -889,7 +890,7 @@ class htmlMimeMail {
* re-build the message.
*
* @author Richard Heyes <[email protected]>
* @version $Revision: 1.15 $
* @version $Revision: 1.16 $
* @package Mail
*/
class Mail_mimePart {
......@@ -1179,7 +1180,7 @@ class Mail_mimePart {
*
* @author Richard Heyes <[email protected]>
* @author Chuck Hagenbuch <[email protected]>
* @version $Revision: 1.15 $
* @version $Revision: 1.16 $
* @package Mail
*/
class Mail_RFC822 {
......
......@@ -42,12 +42,15 @@ function wikiplugin_articles($data,$params) {
if (!isset($categId))
$categId = '';
if (!isset($lang))
$lang = '';
$now = date("U");
include_once("lib/commentslib.php");
$commentslib = new Comments($dbTiki);
$listpages = $tikilib->list_articles($start, $max, 'publishDate_desc', '', $now, 'admin', $type, $topicId, 'y', $topic, $categId);
$listpages = $tikilib->list_articles($start, $max, 'publishDate_desc', '', $now, 'admin', $type, $topicId, 'y', $topic, $categId, '', '', $lang);
if ($feature_multilingual == 'y') {
global $multilinguallib;
include_once("lib/multilingual/multilinguallib.php");
......
<?php
/**
* \file
* $Header: /cvsroot/tikiwiki/tiki/lib/wiki-plugins/wikiplugin_split.php,v 1.35 2006-10-01 13:22:01 ohertel Exp $
* $Header: /cvsroot/tikiwiki/tiki/lib/wiki-plugins/wikiplugin_split.php,v 1.36 2007-01-17 14:55:55 sylvieg Exp $
*
* \brief {SPLIT} wiki plugin implementation
* Usage:
......@@ -149,6 +149,7 @@ function wikiplugin_split($data, $params, $pos) {
}
if ($edit == 'y' && $perm) {
$result .= '<div class="split"><div style="float:right">';
$result .= "$pos-$icell-".htmlspecialchars(substr($data,$pos, 10));
$result .= '<a href="tiki-edit_wiki_section.php?object='.$object.'&amp;type='.$type.'&amp;pos='.$pos.'&amp;cell='.$icell.'">'
.'<img src="pics/icons/page_edit.png" alt="'.tra('edit').'" title="'.tra('edit').'" border="0" width="16" height="16" /></a></div><br />';
$ind += strlen($i);
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/comments.tpl,v 1.70 2007-01-09 17:17:09 sylvieg Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/comments.tpl,v 1.71 2007-01-17 14:55:55 sylvieg Exp $ *}
{if $forum_mode eq 'y'}
<tr><td>
......@@ -68,6 +68,7 @@
<h2> {tr}Posted messages{/tr} </h2>
<table class="normal">
<tr>
{if $comments_cant > 10}
<td class="heading"><label for="comments-maxcomm">{tr}Messages{/tr} </label>
<select name="comments_maxComments" id="comments-maxcomm">
<option value="10" {if $comments_maxComments eq 10 }selected="selected"{/if}>10</option>
......@@ -76,6 +77,7 @@
<option value="999999" {if $comments_maxComments eq 999999 }selected="selected"{/if}>{tr}All{/tr}</option>
</select>
</td>
{/if}
<td class="heading"><label for="comments-style">{tr}Style{/tr}</label>
<select name="comments_style" id="comments-style">
<option value="commentStyle_plain" {if $comments_style eq 'commentStyle_plain'}selected="selected"{/if}>{tr}Plain{/tr}</option>
......
......@@ -54,7 +54,7 @@
<option value="20" {if $refresh eq 1200}selected="selected"{/if}>20 {tr}minutes{/tr}</option>
<option value="30" {if $refresh eq 1800}selected="selected"{/if}>30 {tr}minutes{/tr}</option>
<option value="45" {if $refresh eq 2700}selected="selected"{/if}>45 {tr}minutes{/tr}</option>
<option value="60" {if $refresh eq 3600}selected{/if}>1 {tr}hour{/tr}</option>
<option value="60" {if $refresh eq 3600}selected="selected"{/if}>1 {tr}hour{/tr}</option>
<option value="90" {if $refresh eq 5400}selected="selected"{/if}>1.5 {tr}hours{/tr}</option>
<option value="120" {if $refresh eq 7200}selected="selected"{/if}>2 {tr}hours{/tr}</option>
<option value="360" {if $refresh eq 21600}selected="selected"{/if}>6 {tr}hours{/tr}</option>
......
......@@ -31,7 +31,7 @@
</td><td>
<select name="type" id='trkfldtype' onchange='javascript:chgTrkFld("{$fld}",this.options[selectedIndex].value);javascript:chgTrkFld("{$fld}",this.options[selectedIndex].value);javascript:chgTrkLingual(this.options[selectedIndex].value);'>
{foreach key=fk item=fi from=$field_types}
<option value="{$fk}" {if $type eq $fk}{if $fi.opt}{assign var=showit value=true}{/if}selected="selected"{/if}>{$fi.label}</option>
<option value="{$fk}" {if $type eq $fk}selected="selected"{/if}{if $fi.opt and ($type eq $fk or $type eq 'o' or $type eq '')}{assign var=showit value=true}{/if}>{$fi.label}</option>
{/foreach}
</select>
<div id='z' {if $showit}style="display:block;"{else}style="display:none;"{/if}><input type="text" name="options" value="{$options|escape}" size="50" /></div>
......
<h1><a href="{$smarty.server.REQUEST_URI}">{tr}Edit Translation:{/tr}&nbsp;{$name}</a>
<h1><a href="tiki-edit_translation.php?type={$type}&amp;{if $type eq 'wiki page'}page={$page}{else}id={$id}{/if}">{tr}Edit Translation:{/tr}&nbsp;{$name}</a>
{if $feature_help eq 'y'}
<a href="http://tikiwiki.org/tiki-index.php?page=Internationalization" target="tikihelp" class="tikihelp" title="{tr}Tikiwiki.org help{/tr}: {tr}edit translations{/tr}"><img src="img/icons/help.gif" border="0" height="16" width="16" alt='{tr}help{/tr}' /></a>
{/if}
......@@ -59,7 +59,7 @@
<h2>{tr}Set of Translations{/tr}</h2>
{if count($trads) > 1}
{if $trads|@count > 1}
<table class="normal">
<tr><td class="heading">{tr}Language{/tr}</td><td class="heading">{tr}Page{/tr}</td><td class="heading">{tr}Actions{/tr}</td></tr>
{cycle values="odd,even" print=false}
......@@ -71,28 +71,31 @@
</td></tr>
{/section}
</table>
<table><tr><td>
{if $articles}
<select name="srcId">{section name=ix loop=$articles}<option value="{$articles[ix].articleId|escape}" {if $articles[ix].articleId == $srcId}checked="checked"{/if}>{$articles[ix].title|truncate:80:"(...)":true}</option>{/section}</select>
{else}
<select name="srcName">{section name=ix loop=$pages}<option value="{$pages[ix].pageName|escape}" {if $pages[ix].pageName == $srcId}checked="checked"{/if}>{$pages[ix].pageName|truncate:80:"(...)":true}</option>{/section}</select>
{/if}
&nbsp;<input type="submit" class="wikiaction" value="{tr}add to the set{/tr}"/>
</td></tr></table>
{/if}
{else} {* first translation *}
{if $trads|@count <= 1}
{if $articles}
<p>{tr}Select the article for which the current article is the translation.{/tr}</p>
{tr}Translation of:{/tr}&nbsp;
<select name="srcId">{section name=ix loop=$articles}<option value="{$articles[ix].articleId|escape}">{$articles[ix].title|truncate:80:"(...)":true}</option>{/section}</select>
&nbsp;<input type="submit" class="wikiaction" value="{tr}go{/tr}"/>
{else}
<p>{tr}Enter the name of the page for which the current page is the translation.{/tr}</p>
{tr}Translation of:{/tr}&nbsp;
<select name="srcName">{section name=ix loop=$pages}<option value="{$pages[ix].pageName|escape}">{$pages[ix].pageName|truncate:80:"(...)":true}</option>{/section}</select>
&nbsp;<input type="submit" class="wikiaction" value="{tr}go{/tr}"/>
{tr}or create a new page{/tr} <input type="text" name="newpage" id="newpage" value="" /> <a href="#" onclick="document.location='tiki-editpage.php?page='+document.getElementById('newpage').value;return false;">{tr}Create{/tr}</a>
{/if}
{/if}
{if $articles}
<select name="srcId">{section name=ix loop=$articles}{if empty($language) or (!empty($langpage) && $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}</option>{/if}{/section}</select>
{else}
<select name="srcName">{section name=ix loop=$pages}<option value="{$pages[ix].pageName|escape}" {if $pages[ix].pageName == $srcId}checked="checked"{/if}>{$pages[ix].pageName|truncate:80:"(...)":true}</option>{/section}</select>
{/if}
&nbsp;
{if $trads|@count <= 1}
<input type="submit" class="wikiaction" name="set" value="{tr}go{/tr}"/>
{else}
<input type="submit" class="wikiaction" value="{tr}add to the set{/tr}"/>
{/if}
{if !$articles}
{tr}or create a new page{/tr} <input type="text" name="newpage" id="newpage" value="" /> <a href="#" onclick="document.location='tiki-editpage.php?page='+document.getElementById('newpage').value;return false;">{tr}Create{/tr}</a>
{/if}
</form>
<h1><a href="tiki-newsletters.php" class="pagetitle">{tr}Newsletters{/tr}</a></h1>
{if $subscribed eq 'y'}
{tr}Thanks for your subscription. You will receive an email soon to confirm your subscription. No newsletters will be sent to you until the subscription is confirmed.{/tr}<br /><br />
<div class="simplebox highlight">
{tr}Thanks for your subscription. You will receive an email soon to confirm your subscription. No newsletters will be sent to you until the subscription is confirmed.{/tr}</div>
{/if}
{if $unsub eq 'y'}
{tr}Your email address was removed from the list of subscriptors.{/tr}<br /><br />
<div class="highlight">
{tr}Your email address was removed from the list of subscriptors.{/tr}</div>
{/if}
{if $confirm eq 'y'}
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-adminusers.php,v 1.64 2007-01-13 11:22:17 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-adminusers.php,v 1.65 2007-01-17 14:55:53 sylvieg Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -22,6 +22,7 @@ function discardUser($u, $reason) {
}
function batchImportUsers() {
$patterns['login'] = "/^[[email protected]\.]*$/";
global $userlib, $smarty, $logslib, $tiki_p_admin, $user;
$fname = $_FILES['csvlist']['tmp_name'];
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-edit_translation.php,v 1.11 2006-09-19 16:33:15 ohertel Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-edit_translation.php,v 1.12 2007-01-17 14:55:53 sylvieg Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -75,7 +75,7 @@ else if ($_REQUEST['id']) {
}
if ($type == "wiki page") {
if ($tiki_p_edit != 'y') {
if ($tiki_p_admin_wiki== 'y' || $tikilib->user_has_perm_on_object($user, $page, 'wiki page', 'tiki_p_edit') || ($wiki_creator_admin == 'y' && $user && $info['creator'] == $user)) {
$smarty->assign('msg', tra("Permission denied you cannot edit this page"));
$smarty->display("error.tpl");
die;
......@@ -84,7 +84,7 @@ if ($type == "wiki page") {
$smarty->assign_by_ref('pages', $pages["data"]);
}
else if ($type == "article") {
if ($tiki_p_edit_article != 'y') {
if ($tiki_p_admin_cms != 'y' && !$tikilib->user_has_perm_on_object($user, $id, 'article', 'tiki_p_edit_article') and ($info['author'] != $user or $info['creator_edit'] != 'y')) {
$smarty->assign('msg', tra("Permission denied you cannot edit this article"));
$smarty->display("error.tpl");
die;
......@@ -112,7 +112,7 @@ if (isset($_REQUEST['detach']) && isset($_REQUEST['srcId'])) { // detach from a
check_ticket('edit-translation');
$multilinguallib->detachTranslation($type, $_REQUEST['srcId']);
}
else if (isset($_REQUEST['srcName']) && $_REQUEST['srcName']) { // attach to a translation set
else if (isset($_REQUEST['set']) && !empty($_REQUEST['srcName'])) { // attach to a translation set
check_ticket('edit-translation');
if (empty($langpage) || $langpage == "NULL") {
$error = "traLang";
......@@ -139,7 +139,7 @@ else if (isset($_REQUEST['srcName']) && $_REQUEST['srcName']) { // attach to a t
}
$smarty->assign('srcName', $_REQUEST['srcName']);
}
else if (isset($_REQUEST['srcId']) && $_REQUEST['srcId']) {
else if (isset($_REQUEST['set']) && !empty($_REQUEST['srcId'])) {
check_ticket('edit-translation');
if (empty($langpage) || $langpage == "NULL") {
$error = "traLang";
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-view_tracker.php,v 1.111 2007-01-04 17:42:25 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-view_tracker.php,v 1.112 2007-01-17 14:55:53 sylvieg Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -74,10 +74,18 @@ if ($userlib->object_has_one_permission($_REQUEST["trackerId"], 'tracker')) {
}
}
if (!($tiki_p_view_trackers == 'y' || $tiki_p_admin == 'y' || $tiki_p_admin_trackers == 'y') && $tiki_p_create_tracker_items == 'y')
$cookietab = "2";
else
$cookietab = "1";
if (!empty($_REQUEST['tab']) && $_REQUEST['tab'] == 'view') {
$cookietab = '1';
} elseif (!empty($_REQUEST['tab']) && $_REQUEST['tab'] == 'edit') {
$cookietab = '2';
} elseif (empty($_REQUEST['cookietab'])) {
if (!($tiki_p_view_trackers == 'y' || $tiki_p_admin == 'y' || $tiki_p_admin_trackers == 'y') && $tiki_p_create_tracker_items == 'y')
$cookietab = "2";
else
$cookietab = "1";
} else {
$cookietab = $_REQUEST['cookietab'];
}
$defaultvalues = array();
if (isset($_REQUEST['vals']) and is_array($_REQUEST['vals'])) {
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-view_tracker_item.php,v 1.106 2007-01-04 17:28:50 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-view_tracker_item.php,v 1.107 2007-01-17 14:55:53 sylvieg Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -208,7 +208,7 @@ $ins_fields = array();
$usecategs = false;
$ins_categs = array();
$textarea_options = false;
$tabi = 1;
foreach($xfields["data"] as $i=>$array) {
$fid = $xfields["data"][$i]["fieldId"];
......@@ -551,7 +551,7 @@ if ($tiki_p_modify_tracker_items == 'y') {
}
else {
$error = $ins_fields;
$cookietab = "2";
$tabi = "2";
$smarty->assign('input_err', '1'); // warning to display
// can't go back if there are errors
......@@ -922,7 +922,6 @@ if ($tracker_info["useAttachments"] == 'y') {
$smarty->assign('attfields', $attfields);
$smarty->assign('attextra', $attextra);
}
$tabi = 1;