Commit 681b027a authored by mose's avatar mose

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

parent 067eebfc
......@@ -1724,6 +1724,7 @@ tiki/db/tiki.sql -text
tiki/db/tiki_1.7to1.8.sql -text
tiki/db/tiki_1.8to1.9.sql -text
tiki/db/tiki_1.9to1.10.sql -text
tiki/db/tiki_1.9to1.9.1.sql -text
tiki/db/tiki_ddl.sql -text
tiki/db/tiki_mysql.sql -text
tiki/db/tiki_oracle.err.sql -text
......@@ -1736,6 +1737,7 @@ tiki/doc/99_tiki-apache.conf -text
tiki/doc/devtools/README.txt -text
tiki/doc/devtools/add1tiki2multi.py -text
tiki/doc/devtools/cleanCatTrackers.php -text
tiki/doc/devtools/cleanwatch.sh -text
tiki/doc/devtools/csscheck.sh -text
tiki/doc/devtools/cvsup.sh -text
tiki/doc/devtools/diffsql.sh -text svneol=unset#application/octet-stream
......
......@@ -38,7 +38,7 @@ Step one: unpack the archive
Unpack the Tiki files to the document root of where you want Tiki installed, e.g. /var/www/tiki/
To unpack the bz2 file, use:
tar xjf tikiwiki-1.9.0.tar.bz2
tar xjf tikiwiki-1.9.1.tar.bz2
Step two: run setup.sh to set permissions
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.12 2005-05-18 10:58:51 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.13 2005-08-29 03:14:43 mose 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.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.12 2005-05-18 10:58:51 mose Exp $
# $Header: /cvsroot/tikiwiki/tiki/banner_image.php,v 1.13 2005-08-29 03:14:43 mose Exp $
// application to display an image from the database with
// option to resize the image dynamically creating a thumbnail on the fly.
......@@ -21,7 +21,7 @@ $bannercachefile = "temp";
if ($tikidomain) { $bannercachefile.= "/$tikidomain"; }
$bannercachefile.= "/banner.".$_REQUEST["id"];
if (is_file($bannerchefile) and (!isset($_REQUEST["reload"]))) {
if (is_file($bannercachefile) and (!isset($_REQUEST["reload"]))) {
$size = getimagesize($bannercachefile);
$type = $size['mime'];
} else {
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,7 +38,7 @@ REPLACE INTO tiki_preferences VALUES ('short_time_format','%H:%M');
REPLACE INTO tiki_preferences VALUES ('user_assigned_modules','y');
REPLACE INTO tiki_preferences VALUES ('warn_on_edit_time','30');
REPLACE INTO tiki_preferences VALUES ('wiki_creator_admin','y');
REPLACE INTO users_groups VALUES ('admins','Site Administrators',NULL);
REPLACE INTO users_groups VALUES ('admins','Site Administrators',NULL,NULL,NULL,NULL,NULL);
REPLACE INTO users_grouppermissions VALUES ('admins','tiki_p_admin','');
REPLACE INTO users_grouppermissions VALUES ('admins','tiki_p_admin_banners','');
REPLACE INTO users_grouppermissions VALUES ('admins','tiki_p_admin_categories','');
......
......@@ -47,7 +47,7 @@ REPLACE INTO tiki_preferences VALUES ('use_load_threshold','n');
REPLACE INTO tiki_preferences VALUES ('user_assigned_modules','y');
REPLACE INTO tiki_preferences VALUES ('warn_on_edit_time','30');
REPLACE INTO tiki_preferences VALUES ('wiki_creator_admin','y');
REPLACE INTO users_groups VALUES ('admins','Site Administrators',NULL);
REPLACE INTO users_groups VALUES ('admins','Site Administrators',NULL,NULL,NULL,NULL,NULL);
REPLACE INTO users_grouppermissions VALUES ('admins','tiki_p_admin','');
REPLACE INTO users_grouppermissions VALUES ('admins','tiki_p_admin_banners','');
REPLACE INTO users_grouppermissions VALUES ('admins','tiki_p_admin_categories','');
......
This source diff could not be displayed because it is too large. You can view the blob instead.
# $Rev$
# $Date: 2005-08-26 16:24:25 $
# $Author: michael_davey $
# $Date: 2005-08-29 03:14:44 $
# $Author: mose $
# $Name: not supported by cvs2svn $
# phpMyAdmin MySQL-Dump
# version 2.5.1
......@@ -369,6 +369,7 @@ CREATE TABLE tiki_articles (
KEY heading (heading(255)),
KEY body (body(255)),
KEY reads (reads),
KEY author (author(32)),
FULLTEXT KEY ft (title,heading,body)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
# --------------------------------------------------------
......@@ -2069,7 +2070,7 @@ INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupn
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'s','Articles','tiki-view_articles.php',350,'feature_articles','tiki_p_read_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Articles home','tiki-view_articles.php',355,'feature_articles','tiki_p_read_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','List articles','tiki-list_articles.php',360,'feature_articles','tiki_p_read_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Rankings','tiki-cms_rankings.php',365,'feature_cms_rankings','tiki_p_read_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Rankings','tiki-cms_rankings.php',365,'feature_articles,feature_cms_rankings','tiki_p_read_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Submit article','tiki-edit_submission.php',370,'feature_articles,feature_submissions','tiki_p_read_article,tiki_p_submit_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','View submissions','tiki-list_submissions.php',375,'feature_articles,feature_submissions','tiki_p_read_article,tiki_p_submit_article','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','View submissions','tiki-list_submissions.php',375,'feature_articles,feature_submissions','tiki_p_read_article,tiki_p_approve_submission','');
......
# $Header: /cvsroot/tikiwiki/tiki/db/tiki_1.8to1.9.sql,v 1.101 2005-08-12 13:01:58 sylvieg Exp $
# $Header: /cvsroot/tikiwiki/tiki/db/tiki_1.8to1.9.sql,v 1.102 2005-08-29 03:14:44 mose Exp $
# The following script will update a tiki database from verion 1.8 to 1.9
#
......@@ -1094,70 +1094,4 @@ update tiki_menu_options set section="feature_score" where url="tiki-admin_score
# 2005-04-25 ohertel: switch for (dis/en)abling tiki-mobile
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('feature_mobile', 'n');
# 2005-04-28 get synchronised with tiki.sql
ALTER TABLE tiki_newsletter_groups modify code varchar(32) default NULL;
# 2005-04-29 rv540
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('trk_with_mirror_tables', 'n');
# 2005-05-03
UPDATE tiki_menu_options SET perm="tiki_p_view_trackers" WHERE url="tiki-list_trackers.php";
#2005-05-04 sg
INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_tiki_calendar', 'Can view TikiWiki tools calendar', 'basic', 'calendar');
DROP TABLE IF EXISTS temp_users_grouppermissions;
CREATE TABLE temp_users_grouppermissions (
groupName varchar(255) NOT NULL default '',
permName varchar(30) NOT NULL default '',
value char(1) default '',
PRIMARY KEY (groupName(30),permName)
) TYPE=MyISAM;
INSERT into temp_users_grouppermissions SELECT groupName, 'tiki_p_view_tiki_calendar', value FROM users_grouppermissions WHERE permName='tiki_p_view_calendar';
INSERT into users_grouppermissions SELECT * FROM temp_users_grouppermissions;
DROP TABLE temp_users_grouppermissions;
# 2005-05-10 redflo
alter table tiki_sessions add tikihost varchar(200) default NULL;
#2005-06-08 sylvieg
UPDATE users_objectpermissions set permName='tiki_p_add_events' where permName='tiki_p_add_calendar';
UPDATE users_objectpermissions set permName='tiki_p_change_events' where permName='tiki_p_edit_calendar';
# 2005-06-14 rv540
alter table tiki_referer_stats change referer referer varchar(255) not null;
#2005-06-20 amette: added on request of toggg(currently without CVS-access)
ALTER TABLE `tiki_pages` ADD created int(14);
ALTER TABLE `tiki_cookies` CHANGE cookie cookie text;
#2005-07-14 avgasse: these tables appeared to be missing when comparing a fresh and an upgraded database
CREATE TABLE `tiki_features` (
`featureId` int(11) NOT NULL auto_increment,
`Name` varchar(200) NOT NULL default '',
`Description` text,
`Helplink` varchar(200) NOT NULL default '',
`Variable` varchar(200) NOT NULL default '',
PRIMARY KEY (`featureId`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
CREATE TABLE `tiki_object_ratings` (
`catObjectId` int(12) NOT NULL default '0',
`pollId` int(12) NOT NULL default '0',
PRIMARY KEY (`catObjectId`,`pollId`)
) TYPE=MyISAM;
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('feature_bot_bar_icons', 'y');
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('feature_bot_bar_debug', 'y');
ALTER TABLE tiki_articles DROP COLUMN `bibliographical_references`;
ALTER TABLE tiki_articles DROP COLUMN `resume`;
#2005-07-28 gg: added preference for file gallery to have duplicates
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('fgal_allow_duplicates', 'n');
#2005-08-05 franck: New table to handle statistics per object
CREATE TABLE `tiki_stats` (
`object` varchar(255) NOT NULL default '',
`type` varchar(20) NOT NULL default '',
`day` int(14) NOT NULL default '0',
`hits` int(14) NOT NULL default '0',
PRIMARY KEY (`object`,`type`,`day`)
) TYPE=MyISAM;
# $Header $
# The following script will update a tiki database from verion 1.9 to 1.9.1
#
# To execute this file do the following:
#
# $ mysql -f dbname < tiki_1.9to1.9.1.sql
#
# where dbname is the name of your tiki database.
#
# For example, if your tiki database is named tiki, type:
#
# $ mysql -f tiki < tiki_1.9to1.9.1.sql
#
# You may execute this command as often as you like,
# and may safely ignore any error messages that appear.
# 2005-04-28 get synchronised with tiki.sql
ALTER TABLE tiki_newsletter_groups modify code varchar(32) default NULL;
# 2005-04-29 rv540
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('trk_with_mirror_tables', 'n');
# 2005-05-03
UPDATE tiki_menu_options SET perm="tiki_p_view_trackers" WHERE url="tiki-list_trackers.php";
#2005-05-04 sg
INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_tiki_calendar', 'Can view TikiWiki tools calendar', 'basic', 'calendar');
DROP TABLE IF EXISTS temp_users_grouppermissions;
CREATE TABLE temp_users_grouppermissions (
groupName varchar(255) NOT NULL default '',
permName varchar(30) NOT NULL default '',
value char(1) default '',
PRIMARY KEY (groupName(30),permName)
) TYPE=MyISAM;
INSERT into temp_users_grouppermissions SELECT groupName, 'tiki_p_view_tiki_calendar', value FROM users_grouppermissions WHERE permName='tiki_p_view_calendar';
INSERT into users_grouppermissions SELECT * FROM temp_users_grouppermissions;
DROP TABLE temp_users_grouppermissions;
# 2005-05-10 redflo
alter table tiki_sessions add tikihost varchar(200) default NULL;
#2005-06-08 sylvieg
UPDATE users_objectpermissions set permName='tiki_p_add_events' where permName='tiki_p_add_calendar';
UPDATE users_objectpermissions set permName='tiki_p_change_events' where permName='tiki_p_edit_calendar';
# 2005-06-14 rv540
alter table tiki_referer_stats change referer referer varchar(255) not null;
#2005-06-20 amette: added on request of toggg(currently without CVS-access)
ALTER TABLE `tiki_pages` ADD created int(14);
ALTER TABLE `tiki_cookies` CHANGE cookie cookie text;
CREATE TABLE `tiki_object_ratings` (
`catObjectId` int(12) NOT NULL default '0',
`pollId` int(12) NOT NULL default '0',
PRIMARY KEY (`catObjectId`,`pollId`)
) TYPE=MyISAM;
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('feature_bot_bar_icons', 'y');
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('feature_bot_bar_debug', 'y');
ALTER TABLE tiki_articles DROP COLUMN `bibliographical_references`;
ALTER TABLE tiki_articles DROP COLUMN `resume`;
#2005-07-28 gg: added preference for file gallery to have duplicates
INSERT IGNORE INTO tiki_preferences(name,value) VALUES ('fgal_allow_duplicates', 'n');
#2005-08-05 franck: New table to handle statistics per object
CREATE TABLE `tiki_stats` (
`object` varchar(255) NOT NULL default '',
`type` varchar(20) NOT NULL default '',
`day` int(14) NOT NULL default '0',
`hits` int(14) NOT NULL default '0',
PRIMARY KEY (`object`,`type`,`day`)
) TYPE=MyISAM;
# 2005-08-20 : fix by mose
update tiki_menu_options set section="feature_articles,feature_cms_rankings" where url="tiki-cms_rankings.php";
# 2005-08-22 : fix to get in sync with tiki.sql amette
ALTER TABLE `users_users` CHANGE score score int(11) NOT NULL default '0';
# 2005-08-27 : small speedup
create index `author` on `tiki_articles`(`author`(32));
#!/bin/bash
# $Header: /cvsroot/tikiwiki/tiki/doc/devtools/cleanwatch.sh,v 1.2 2005-08-29 03:14:44 mose Exp $
# [email protected]
# Usage: ./doc/devtools/cleanwatch.sh <email> [multi]
# it has to be launched from tiki root dir
FIND='/usr/bin/find'
SED='/bin/sed'
MYSQL='/usr/bin/mysql'
if [ -z $1 ];then
echo "Usage: cleanwatch.sh <email> [multi]"
exit 0
fi
MULTI=/${2:-''}
loc="db$MULTI/local.php"
echo -n "Removing watch for $1 ... "
eval `sed -e '/[\?#]/d' -e "s/\$\([-_a-z]*\)[[:space:]]*=[[:space:]]*\([-_a-zA-Z0-9\"'\.]*\);/\\1=\\2/" $loc`
LDBHOST=${host_tiki:-'localhost'}
LDBNAME=${dbs_tiki:-'tikiwiki'}
LDBUSER=${user_tiki:-'root'}
LDBPASS=${pass_tiki:-''}
mysql -f -h$LDBHOST -u$LDBUSER -p$LDBPASS -e "delete from tiki_user_watches where email='$1';" $LDBNAME
#mysql -f -h$LDBHOST -u$LDBUSER -p$LDBPASS -e "select count(*) as a, email from tiki_user_watches group by email order by a" $LDBNAME
echo "Done."
exit 0
#!/bin/sh
# $Id: tikirelease.sh,v 1.10 2005-05-18 10:59:14 mose Exp $
# $Id: tikirelease.sh,v 1.11 2005-08-29 03:14:44 mose Exp $
# written and maintained by [email protected]
#
# HOWTO release TikiWiki ?
......@@ -48,6 +48,12 @@
# on devel mailing-list and ask marc to launch the announce-speading process
# (Freshmeat, SourceForge and tikiwiki.org (manually for now).
#
# post/ After release, update templates/tiki-install.tpl and
# templates/tiki-top_bar.tpl (including templates/styles/*/tiki-top_bar.tpl)
# to next version number with CVS ex.: 1.9.2 (CVS) . This helps later on to
# know exactly which files were included or not in a release.
#
#
#
# All that process has to be relayed on live irc channel :
# irc://irc.freenode.net/#tikiwiki
......
<?php
// $Id: notificationemaillib.php,v 1.12 2005-08-29 03:14:44 mose Exp $
/** \brief send the email notifications dealing with the forum changes to
* \brief outbound address + admin notification addresses / forum admin email + watching users addresses
* \param $event = 'forum_post_topic' or 'forum_post_thread'
......@@ -8,7 +9,7 @@
* \param $topicName name of the parent topic
*/
function sendForumEmailNotification($event, $object, $forum_info, $title, $data, $author, $topicName, $messageId='', $inReplyTo='', $threadId='', $parentId='') {
function sendForumEmailNotification($event, $object, $forum_info, $title, $data, $author, $topicName, $messageId='', $inReplyTo='', $threadId='', $parentId='') {
global $tikilib, $feature_user_watches, $smarty, $userlib, $sender_email;
// Per-forum From address overrides global default.
......@@ -67,7 +68,7 @@ function sendForumEmailNotification($event, $object, $forum_info, $title, $data,
}
// Special forward address
//TODO: merge or use the admin notification feature
//TODO: merge or use the admin notification feature
if ($forum_info["useMail"] == 'y') {
$not['email'] = $forum_info['mail'];
if ($not['user'] = $userlib->get_user_by_email($forum_info['mail']) )
......@@ -112,7 +113,7 @@ function sendForumEmailNotification($event, $object, $forum_info, $title, $data,
/** \brief test if email already in the notification list
*/
function testEmailInList($nots, $email) {
for ($i = count($nots) - 1; $i >=0; --$i) {
foreach (array_keys($nots) as $i) {
if ($nots[$i]['email'] == $email)
return true;
}
......@@ -138,7 +139,7 @@ function sendWikiEmailNotification($event, $pageName, $edit_user, $edit_comment,
break;
}
}
for ($i = count($nots) - 1; $i >=0; --$i) {
foreach (array_keys($nots) as $i) {
$nots[$i]['language'] = $tikilib->get_user_preference($nots[$i]['user'], "language", $defaultLanguage);
}
}
......@@ -160,7 +161,7 @@ function sendWikiEmailNotification($event, $pageName, $edit_user, $edit_comment,
if ($wiki_watch_editor != "y" && $email == $edit_user)
continue;
if (!testEmailInList($nots, $email)) {
$not['email'] = $email;
$not = array('email' => $email);
if ($not['user'] = $userlib->get_user_by_email($email))
$not['language'] = $tikilib->get_user_preference($not['user'], "language", $defaultLanguage);
else
......@@ -169,7 +170,7 @@ function sendWikiEmailNotification($event, $pageName, $edit_user, $edit_comment,
}
}
}
if ($edit_user=='') $edit_user = tra('Anonymous');
if (count($nots)) {
......@@ -212,7 +213,7 @@ function sendWikiEmailNotification($event, $pageName, $edit_user, $edit_comment,
}
}
/** \brief Send email notification to a list of emails or a list of (email, user) in a charset+language associated with each email
/** \brief Send email notification to a list of emails or a list of (email, user) in a charset+language associated with each email
* \param $list : emails list or (users, email) list
* \param $type: type of the list element = 'email'|'watch'
* \param $subjectTpl: subject template file or null (ex: "submission_notifcation.tpl")
......@@ -233,7 +234,7 @@ function sendEmailNotification($list, $type, $subjectTpl, $subjectParam, $txtTpl
$email = $elt['email'];
$userEmail = $elt['user'];
$smarty->assign('mail_hash', $elt['hash']);
}
}
else {
$email = $elt;
$userEmail = $userlib->get_user_by_email($email);
......@@ -258,7 +259,7 @@ function sendEmailNotification($list, $type, $subjectTpl, $subjectParam, $txtTpl
if ($mail->send(array($email)))
$sent++;
}
return $sent;
return $sent;
}
function activeErrorEmailNotivation() {
set_error_handler("sendErrorEmailNotification");
......@@ -277,16 +278,16 @@ function sendErrorEmailNotification($errno, $errstr, $errfile='?', $errline= '?'
// include_once('lib/webmail/tikimaillib.php');
// $mail = new TikiMail();
mail($email,
"PHP: $errfile, $errline",
"$errfile, Line $errline\n$err($errno)\n$errstr");
}
"PHP: $errfile, $errline",
"$errfile, Line $errline\n$err($errno)\n$errstr");
}
function sendFileGalleryEmailNotification($event, $galleryId, $galleryName, $name, $filename, $description, $action, $user) {
global $tikilib, $feature_user_watches, $smarty, $userlib, $sender_email;
$nots = array();
$defaultLanguage = $tikilib->get_preference("language", "en");
// Users watching this gallery
if ($feature_user_watches == 'y') {
$nots = $tikilib->get_event_watches($event, $galleryId);
......@@ -294,7 +295,7 @@ function sendFileGalleryEmailNotification($event, $galleryId, $galleryName, $nam
$nots[$i]['language'] = $tikilib->get_user_preference($nots[$i]['user'], "language", $defaultLanguage);
}
}
if (count($nots)) {
include_once('lib/webmail/tikimaillib.php');
$mail = new TikiMail();
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ function random_refresh_index_comments( $times = 1 ) {
function random_refresh_index_blogs() {
global $tikilib;
// get random blog
// get random blog
$cant=$tikilib->getOne("select count(*) from `tiki_blogs`",array());
if($cant>0) {
$query="select * from `tiki_blogs`";
......@@ -100,7 +100,7 @@ function random_refresh_index_dir_sites() {
function random_refresh_index_faqs() {
global $tikilib;
// get random faq
// get random faq
$cant=$tikilib->getOne("select count(*) from `tiki_faqs`",array());
if($cant>0) {
$query="select * from `tiki_faqs`";
......@@ -113,7 +113,7 @@ function random_refresh_index_faqs() {
function random_refresh_index_faq_questions() {
global $tikilib;
// get random faq
// get random faq
$cant=$tikilib->getOne("select count(*) from `tiki_faq_questions`",array());
if($cant>0) {
$query="select * from `tiki_faq_questions`";
......@@ -126,7 +126,7 @@ function random_refresh_index_faq_questions() {
function random_refresh_index_blog_posts() {
global $tikilib;
// get random blog
// get random blog
$cant=$tikilib->getOne("select count(*) from `tiki_blog_posts`",array());
if($cant>0) {
$query="select * from `tiki_blog_posts`";
......@@ -179,7 +179,7 @@ function random_refresh_index_trackers() {
function random_refresh_index_tracker_items() {
global $tikilib;
$cant=$tikilib->getOne("select count(*) from `tiki_tracker_item_fields` f, `tiki_tracker_fields` tf
$cant=$tikilib->getOne("select count(*) from `tiki_tracker_item_fields` f, `tiki_tracker_fields` tf
where tf.`type` in (?,?) and tf.`fieldId`=f.`fieldId`",array("t","a"));
if($cant>0) {
$query="select f.`value`, f.`itemId`, f.`fieldId`
......@@ -283,7 +283,7 @@ function &search_index($data) {
$words[strtolower($value)]++;
}
return($words);
return $words;
}
function insert_index(&$words,$location,$page) {
......
This diff is collapsed.
<?php
// $Id: outputfilter.highlight.php,v 1.9 2005-08-29 03:14:44 mose 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");
......@@ -17,10 +17,10 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
* Version: 1.0
* Date: Aug 10, 2003
* Purpose: Adds Google-cache-like highlighting for terms in a
* template after its rendered. This can be used
* template after its rendered. This can be used
* easily integrated with the wiki search functionality
* to provide highlighted search terms.
* Install: Drop into the plugin directory, call
* Install: Drop into the plugin directory, call
* $smarty->load_filter('output','highlight');
* from application.
* Author: Greg Hinkle <[email protected]>
......@@ -30,8 +30,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
*/
function smarty_outputfilter_highlight($source, &$smarty) {
global $feature_referer_highlight;
$highlight = $_REQUEST['highlight'];
$highlight = $_REQUEST['highlight'];
if(isset($feature_referer_highlight) && $feature_referer_highlight == 'y') {
$refererhi = _refererhi();
if(isset($refererhi) && !empty($refererhi)) {
......@@ -49,12 +49,12 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
// Pull out the head block
preg_match_all("!<head>.*?</head>!is", $source, $match);
$_head_blocks = $match[0];
$source = preg_replace("!<head>.*</head>!is", '@@@==:[email protected]@@', $source);
$source = preg_replace("!<head>.*?</head>!is", '@@@==:[email protected]@@', $source);
// Pull out the div with nohightlight
preg_match_all("!<div[^>]*nohighlight.*</div>\{\*nohighlight!is", $source, $match);
preg_match_all("!<div[^>]*nohighlight.*?</div>\{\*nohighlight!is", $source, $match);
$_div_blocks = $match[0];
$source = preg_replace("!<div[^>]*nohighlight.*</div>\{\*nohighlight!is", '@@@=:[email protected]@@', $source);
$source = preg_replace("!<div[^>]*nohighlight.*?</div>\{\*nohighlight!is", '@@@=:[email protected]@@', $source);
// Pull out the script blocks
preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
......@@ -62,15 +62,15 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
$source = preg_replace("!<script[^>]+>.*?</script>!is", '@@@[email protected]@@', $source);
//pull out the onmouseover (for the user popup)
preg_match_all('!onmouseover="[^"]*"!is', $source, $match);
preg_match_all('!onmouseover=("[^"]*"|\'[^\']*\')!is', $source, $match);
$_mouse_blocks = $match[0];
$source = preg_replace('!onmouseover="[^"]*"!is', '@@@[email protected]@@', $source);
$source = preg_replace('!onmouseover=("[^"]*"|\'[^\']*\')!is', '@@@[email protected]@@', $source);
// pull out all html tags
preg_match_all("'<[\/\!]*?[^<>]*?>'si", $source, $match);
$_tag_blocks = $match[0];
$source = preg_replace("'<[\/\!]*?[^<>]*?>'si", '@@@:=====:@@@', $source);
// This array is used to choose colors for supplied highlight terms
$colorArr = array('#ffff66','#ff9999','#A0FFFF','#ff66ff','#99ff99');
......@@ -79,8 +79,8 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
$i = 0;
$wordArr = split('(%20)|[\+ ]',$highlight); // htmlentities is safe but it would be better to do strip_tags() only the performance hit is too great -> htmlentities is not safe with accent
foreach($wordArr as $word) {
$word = preg_quote($word);
$source = preg_replace('~('.$word.')~si', '<span style=\\"color:black;background-color:'.$colorArr[$i].';">$1</span>', $source);
$word = preg_quote($word, '~');
$source = preg_replace('~('.$word.')~si', '<span style=\\"color:black;background-color:'.$colorArr[$i].';">$1</span>', $source);
$i++;
}
......
......@@ -335,7 +335,7 @@ class StatsLib extends TikiLib {
}
}
global $dbTiki;
$statslib = new StatsLib($dbTiki);
?>
<?php
// CVS: $Id: tikilib.php,v 1.600 2005-08-29 03:14:44 mose 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");
......@@ -429,7 +429,7 @@ class TikiLib extends TikiDB {
foreach ($groups as $group) {
$query = "select ttf.`trackerId`, tti.`itemId` from `tiki_tracker_fields` ttf, `tiki_tracker_items` tti, `tiki_tracker_item_fields` ttif ";
$query .= " where ttf.`fieldId`=ttif.`fieldId` and ttif.`itemId`=tti.`itemId` and `type`=? and tti.`status`=? and value=?";
$query .= " where ttf.`fieldId`=ttif.`fieldId` and ttif.`itemId`=tti.`itemId` and `type`=? and tti.`status`=? and `value`=?";
$result = $this->query($query,array('g','o',$group));
while ($res = $result->fetchRow()) {
......@@ -2263,7 +2263,7 @@ function add_pageview() {
$bindvars=array();
if ($find) {
$findesc = '%' . $find . '%';
$mid .= " and (`title` like ? or `heading` like ? or `body` like ?) ";
$mid = " where (`title` like ? or `heading` like ? or `body` like ?) ";
$bindvars=array($findesc,$findesc,$findesc);
}
......@@ -2391,7 +2391,7 @@ function add_pageview() {
`tiki_article_types`.`show_image_caption`,
`tiki_article_types`.`show_lang`,
`tiki_article_types`.`creator_edit`
from `tiki_articles`, `tiki_article_types`, `users_users`
from `tiki_articles`, `tiki_article_types`, `users_users`
$mid $mid2 order by ".$this->convert_sortmode($sort_mode);
$query_cant = "select count(*) from `tiki_articles`, `tiki_article_types`, `users_users` $mid $mid2";
$result = $this->query($query,$bindvars,$maxRecords,$offset);
......@@ -3856,7 +3856,7 @@ function add_pageview() {
$data1 = $data;
if (isset($noparsed["key"]) and count($noparsed["key"]) and count($noparsed["key"]) == count($noparsed["data"]))
{
$data = str_replace($noparsed["key"], $noparsed["data"], $data);
$data = preg_replace($noparsed["key"], $noparsed["data"], $data);
}
if (isset($preparsed["key"]) and count($preparsed["key"]) and count($preparsed["key"]) == count($preparsed["data"]))
......@@ -3914,6 +3914,7 @@ function add_pageview() {
$curlies--;
} else if( $data[$i] == ")" ) {
$parens--;
$lastParens = $i;
}
// If we found the end of the match...
......@@ -3927,7 +3928,7 @@ function add_pageview() {
if( $curlies == 0 && $parens == 0 )
{
$plugins[2] = (string) substr($data, $pos_end, $i - $pos_end - 1);
$plugins[2] = (string) substr($data, $pos_end, $lastParens - $pos_end);
$plugins[0] = $plugins[0] . (string) substr($data, $pos_end, $i - $pos_end + 1);
/*
print "<pre>Match found: ";
......@@ -4226,12 +4227,23 @@ function add_pageview() {
// global $feature_autolinks;
// if ($feature_autolinks == "y") {
global $feature_wiki_ext_icon;
$attrib = '';
if ($this->get_preference('popupLinks', 'n') == 'y')
$attrib .= 'target="_blank" ';
if ($feature_wiki_ext_icon == 'y') {
$attrib .= 'class="wiki external" ';
$ext_icon = "<img border=\"0\" class=\"externallink\" src=\"img/icons/external_link.gif\" alt=\"external link\" />";
} else {
$attrib .= 'class="wiki" ';
$ext_icon = "";
}
// add a space so we can match links starting at the beginning of the first line
$text = " " . $text;
// match prefix://suffix, www.prefix.suffix/optionalpath, [email protected]
$patterns = array("#([\n ])([a-z0-9]+?)://([^, \n\r]+)#i", "#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^, \n\r]*)?)#i", "#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "#([\n ])magnet\:\?([^, \n\r]+)#i");
$replacements = array("\\1<a class='wiki' href=\"\\2://\\3\">\\2://\\3</a>", "\\1<a class='wiki' href=\"http://www.\\2.\\3\\4\">www.\\2.\\3\\4</a>", "\\1<a class='wiki' href=\"mailto:\\[email protected]\\3\">\\[email protected]\\3</a>", "\\1<a class='wiki' href=\"magnet:?\\2\">magnet:?\\2</a>");
$replacements = array("\\1<a $attrib href=\"\\2://\\3\">\\2://\\3$ext_icon</a>", "\\1<a $attrib href=\"http://www.\\2.\\3\\4\">www.\\2.\\3\\4$ext_icon</a>", "\\1<a class='wiki' href=\"mailto:\\[email protected]\\3\">\\[email protected]\\3</a>", "\\1<a class='wiki' href=\"magnet:?\\2\">magnet:?\\2</a>");
$text = preg_replace($patterns, $replacements, $text);
// strip the space we added
$text = substr($text, 1);
......@@ -6473,6 +6485,7 @@ if (!$simple_wiki) {
}
// end of class ------------------------------------------------------
// function to check if a file or directory is in the path
......
......@@ -1065,7 +1065,7 @@ class TrackerLib extends TikiLib {
$type['y'] = array(
'label'=>tra('country selector'),
'opt'=>true,
'help'=>tra('Country Selector options: 0|1|2 where 0 show both country flag and country name, 1 show only country name and 2 show only country flag') );
'help'=>tra('Country Selector options: 1|2 where 1 show only country name and 2 show only country flag. By default show both country name and flag') );
$type['f'] = array(
'label'=>tra('date and time'),
'opt'=>false);
......
......@@ -557,7 +557,7 @@ class UsersLib extends TikiLib {
// Read page AuthPAM at tw.o, it says about a php module required.
// maybe and if extension line could be added here... module requires $error
// as reference.
if (pam_auth($user, $pass, &$error)) {
if (pam_auth($user, $pass, $error)) {
return USER_VALID;
} else {
// Uncomment the following to see errors on that
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/lib/wiki-plugins/wikiplugin_attach.php,v 1.13 2005-08-06 21:56:45 rlpowell Exp $
// $Header: /cvsroot/tikiwiki/tiki/lib/wiki-plugins/wikiplugin_attach.php,v 1.14 2005-08-29 03:14:44 mose Exp $
// Displays an attachment or a list of attachments
// Currently works with wiki pages and tracker items.
// Parameters:
......@@ -34,6 +34,7 @@ function wikiplugin_attach($data, $params) {
global $wikilib;
global $tikilib;
global $user;
include_once('lib/wiki/wikilib.php'