Commit 43f653b8 authored by mose's avatar mose

merge from BRANCH-1-9 to HEAD : many conflicts, possibly borking head for the time to fix issues

parent 30cd5ce1
......@@ -1856,6 +1856,7 @@ tiki/doc/devtools/tikirelease.sh -text
tiki/doc/devtools/tikireleasediff.sh -text
tiki/doc/devtools/tikiwiki.spec -text
tiki/doc/devtools/twcvsbackup.cron -text
tiki/doc/devtools/usergeo.php -text
tiki/doc/htaccess -text
tiki/doc/htaccess.readme -text
tiki/doc/index.php -text
......@@ -2207,6 +2208,8 @@ tiki/img/icons/admin_general.png -text
tiki/img/icons/admin_homework.png -text
tiki/img/icons/admin_imagegal.png -text
tiki/img/icons/admin_imagegal_grey.png -text
tiki/img/icons/admin_intertiki.png -text
tiki/img/icons/admin_intertiki_grey.png -text
tiki/img/icons/admin_jukebox.png -text
tiki/img/icons/admin_jukebox_grey.png -text
tiki/img/icons/admin_login.png -text
......@@ -3725,6 +3728,7 @@ tiki/lib/wiki-plugins/wikiplugin_sort.php -text
tiki/lib/wiki-plugins/wikiplugin_split.php -text
tiki/lib/wiki-plugins/wikiplugin_sql.php -text
tiki/lib/wiki-plugins/wikiplugin_sub.php -text
tiki/lib/wiki-plugins/wikiplugin_tag.php -text
tiki/lib/wiki-plugins/wikiplugin_thumb.php -text
tiki/lib/wiki-plugins/wikiplugin_titlesearch.php -text
tiki/lib/wiki-plugins/wikiplugin_topfriends.php -text
......@@ -3762,6 +3766,42 @@ tiki/lib/wiki3d/Vertex.java -text
tiki/lib/wiki3d/XmlReader.class -text svneol=unset#unset
tiki/lib/wiki3d/XmlReader.java -text
tiki/lib/wiki3d/morcego-0.3.jar -text
tiki/lib/wiki3d/morcego-0.4.0.jar -text
tiki/lib/wiki3d/src/java/br/arca/morcego/Config.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/Morcego.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/component/DescriptionBox.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/component/LocalImage.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/image/Arca.jpg -text
tiki/lib/wiki3d/src/java/br/arca/morcego/image/Logo.jpg -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/Camera.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/Matrix2x3.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/Matrix3x3.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/PositionedObject.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/PunctualBody.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/Spring.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/Vector3D.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/physics/VisibleObject.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/run/Animator.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/run/Balancer.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/run/Feeder.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/run/Renderer.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/run/Rotator.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/Graph.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/GraphElement.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/GraphElementFactory.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/Link.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/Node.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/NodeFactory.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/link/SolidLink.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/structure/node/RoundNode.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/transport/Transport.java -text
tiki/lib/wiki3d/src/java/br/arca/morcego/transport/XmlrpcTransport.java -text
tiki/lib/wiki3d/src/java/org/apache/xmlrpc/XmlRpcAppletClient.java -text
tiki/lib/wiki3d/src/test/br/arca/morcego/BalancerTest.java -text
tiki/lib/wiki3d/src/test/br/arca/morcego/CameraTest.java -text
tiki/lib/wiki3d/src/test/br/arca/morcego/ConfigTest.java -text
tiki/lib/wiki3d/src/test/br/arca/morcego/Matrix3DTest.java -text
tiki/lib/wiki3d/src/test/br/arca/morcego/Vertex3DTest.java -text
tiki/lib/wiki3d/xmlrpc-1.2-b1.jar -text
tiki/lib/xmlrpc.inc -text
tiki/lib/xmlrpcs.inc -text
......@@ -3878,6 +3918,7 @@ tiki/popups/old_insert_image.html -text
tiki/popups/popup.js -text
tiki/popups/select_color.html -text
tiki/received_article_image.php -text
tiki/remote.php -text
tiki/robots.txt -text
tiki/select_banner.php -text
tiki/setup.sh -text
......@@ -4357,6 +4398,9 @@ tiki/templates/styles/simple/module.tpl -text
tiki/templates/styles/simple/modules/index.php -text
tiki/templates/styles/simple/modules/mod-application_menu.tpl -text
tiki/templates/styles/simple/modules/mod-forums_last_posts.tpl -text
tiki/templates/styles/simple/modules/mod-last_blog_posts.tpl -text
tiki/templates/styles/simple/modules/mod-last_files.tpl -text
tiki/templates/styles/simple/modules/mod-last_images_th.tpl -text
tiki/templates/styles/simple/modules/mod-last_modif_pages.tpl -text
tiki/templates/styles/simple/modules/mod-quick_edit.tpl -text
tiki/templates/styles/simple/modules/mod-switch_lang2.tpl -text
......@@ -4410,6 +4454,7 @@ tiki/templates/tiki-admin-include-fgal.tpl -text
tiki/templates/tiki-admin-include-forums.tpl -text
tiki/templates/tiki-admin-include-gal.tpl -text
tiki/templates/tiki-admin-include-general.tpl -text
tiki/templates/tiki-admin-include-intertiki.tpl -text
tiki/templates/tiki-admin-include-list-sections.tpl -text
tiki/templates/tiki-admin-include-login.tpl -text
tiki/templates/tiki-admin-include-maps.tpl -text
......@@ -4764,6 +4809,7 @@ tiki/tiki-admin_include_fgal.php -text
tiki/tiki-admin_include_forums.php -text
tiki/tiki-admin_include_gal.php -text
tiki/tiki-admin_include_general.php -text
tiki/tiki-admin_include_intertiki.php -text
tiki/tiki-admin_include_jukebox.php -text
tiki/tiki-admin_include_login.php -text
tiki/tiki-admin_include_maps.php -text
......
......@@ -13,6 +13,11 @@ Use the following tags to distinguish changes :
Please wrap your lines at 80 characters and indent them with spaces only.
Version 1.10
<http://tikiwiki.org/ReleaseProcess110>
- 2005/05/18 : http://dev.tikiwiki.org/RefreshHEAD
Version 1.9.2
<http://tikiwiki.org/ReleaseProcess192>
- 10/30/2005
......@@ -243,6 +248,8 @@ ohertel
[FIX] more translated strings in Czech - luciash
[FIX] multiple Wiki-parsing erros fixed in several features - amette, mose
Version 1.9.1.1
<http://tikiwiki.org/ReleaseProcess1911>
......@@ -250,13 +257,7 @@ Version 1.9.1.1
* [MOD] Improved Tiki Security Admin
* [FIX] tweaks to fixperms.sh, /img/tracker included
Version 1.10
<http://tikiwiki.org/ReleaseProcess110>
- 2005/05/18 : http://dev.tikiwiki.org/RefreshHEAD
=======
Version 1.9.1
<http://tikiwiki.org/ReleaseProcess19>
......
# $Rev$
# $Date: 2005-12-06 20:10:54 $
# $Author: lfagundes $
# $Date: 2005-12-12 15:18:47 $
# $Author: mose $
# $Name: not supported by cvs2svn $
# phpMyAdmin MySQL-Dump
# version 2.5.1
......@@ -318,7 +318,7 @@ CREATE TABLE tiki_actionlog (
lastModif int(14) default NULL,
object varchar(255) default NULL,
objectType varchar(32) NOT NULL default '',
user varchar(200) default NULL,
user varchar(40) default NULL,
ip varchar(15) default NULL,
comment varchar(200) default NULL,
categId int(12) NOT NULL default '0',
......@@ -2112,7 +2112,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,'o','Admin forums','tiki-admin_forums.php',515,'feature_forums','tiki_p_forum_read,tiki_p_admin_forum','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'s','Directory','tiki-directory_browse.php',550,'feature_directory','tiki_p_view_directory','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Submit a new link','tiki-directory_add_site.php',555,'feature_directory','tiki_p_view_directory','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Submit a new link','tiki-directory_add_site.php',555,'feature_directory','tiki_p_submit_link','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Browse directory','tiki-directory_browse.php',560,'feature_directory','tiki_p_view_directory','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Admin directory','tiki-directory_admin.php',565,'feature_directory','tiki_p_view_directory,tiki_p_admin_directory_cats','');
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Admin directory','tiki-directory_admin.php',565,'feature_directory','tiki_p_view_directory,tiki_p_admin_directory_sites','');
......@@ -2863,8 +2863,7 @@ CREATE TABLE tiki_searchindex(
count int(11) NOT NULL default '1',
last_update int(11) NOT NULL default '0',
PRIMARY KEY (searchword,location,page(80)),
KEY last_update (last_update),
KEY locationPage (location, page)
KEY last_update (last_update)
) TYPE=MyISAM;
# LRU (last recently used) list for searching parts of words
......@@ -3740,7 +3739,7 @@ DROP TABLE IF EXISTS tiki_user_tasks;
CREATE TABLE tiki_user_tasks (
taskId integer(14) NOT NULL auto_increment, -- task id
last_version integer(4) NOT NULL DEFAULT 0, -- last version of the task starting with 0
user varchar(40) NOT NULL, -- task user
user varchar(40) NOT NULL DEFAULT '', -- task user
creator varchar(200) NOT NULL, -- username of creator
public_for_group varchar(30) DEFAULT NULL, -- this group can also view the task, if it is null it is not public
rights_by_creator char(1) DEFAULT NULL, -- null the user can delete the task,
......@@ -4905,101 +4904,16 @@ INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('colored text','~~#FF0000:text~~','images/fontfamily.gif','forums');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('dynamic variable','%text%','images/book.gif','forums');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('image','{img src= width= height= align= desc= link= }','images/ed_image.gif','forums');
#
# Homework tables start
#
# Created Feb 22, 2004
# Revised May 04, 2004
#
# DROP TABLE IF EXISTS hw_actionlog;
# DROP TABLE IF EXISTS tiki_hw_actionlog;
# CREATE TABLE tiki_hw_actionlog (
# action varchar(255) NOT NULL default '',
# lastModif int(14) NOT NULL default '0',
# pageId int(14) default NULL,
# user varchar(200) default NULL,
# ip varchar(15) default NULL,
# comment varchar(200) default NULL,
# PRIMARY KEY (lastModif)
# ) TYPE=MyISAM;
# DROP TABLE IF EXISTS hw_assignments;
# DROP TABLE IF EXISTS tiki_hw_assignments;
# CREATE TABLE tiki_hw_assignments (
# assignmentId int(8) NOT NULL auto_increment,
# title varchar(80) default NULL,
# teacherName varchar(40) NOT NULL default '',
# created int(14) NOT NULL default '0',
# dueDate int(14) default NULL,
# modified int(14) NOT NULL default '0',
# heading text,
# body text,
# deleted tinyint(4) NOT NULL default '0',
# PRIMARY KEY (assignmentId),
# KEY dueDate (dueDate)
# ) TYPE=MyISAM;
# DROP TABLE IF EXISTS hw_grading_queue;
# DROP TABLE IF EXISTS tiki_hw_grading_queue;
# CREATE TABLE tiki_hw_grading_queue (
# id int(14) NOT NULL auto_increment,
# status int(4) default NULL,
# submissionDate int(14) default NULL,
# userLogin varchar(40) NOT NULL default '',
# userIp varchar(15) default NULL,
# pageId int(14) default NULL,
# pageDate int(14) default NULL,
# pageVersion int(14) default NULL,
# assignmentId int(14) default NULL,
# PRIMARY KEY (id)
# ) TYPE=MyISAM;
# DROP TABLE IF EXISTS hw_history;
# DROP TABLE IF EXISTS tiki_hw_history;
# CREATE TABLE tiki_hw_history (
# id int(14) NOT NULL default '0',
# version int(8) NOT NULL default '0',
# lastModif int(14) NOT NULL default '0',
# user varchar(200) NOT NULL default '',
# ip varchar(15) NOT NULL default '',
# comment varchar(200) default NULL,
# data text,
# PRIMARY KEY (id,version)
# ) TYPE=MyISAM;
# DROP TABLE IF EXISTS hw_pages;
# DROP TABLE IF EXISTS tiki_hw_pages;
# CREATE TABLE tiki_hw_pages (
# id int(14) NOT NULL auto_increment,
# assignmentId int(14) NOT NULL default '0',
# studentName varchar(200) NOT NULL default '',
# data text,
# description varchar(200) default NULL,
# lastModif int(14) default NULL,
# user varchar(200) default NULL,
# comment varchar(200) default NULL,
# version int(8) NOT NULL default '0',
# ip varchar(15) default NULL,
# flag char(1) default NULL,
# points int(8) default NULL,
# votes int(8) default NULL,
# cache text,
# wiki_cache int(10) default '0',
# cache_timestamp int(14) default NULL,
# page_size int(10) unsigned default '0',
# lockUser varchar(200) default NULL,
# lockExpires int(14) default '0',
# PRIMARY KEY (studentName,assignmentId),
# KEY id (id),
# KEY assignmentId (assignmentId),
# KEY studentName (studentName)
# ) TYPE=MyISAM;
#
# Homework tables end
#
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New wms Metadata','METADATA\r\n \"wms_name\" \"myname\"\r\n \"wms_srs\" \"EPSG:4326\"\r\n \"wms_server_version\" \" \"\r\n \"wms_layers\" \"mylayers\"\r\n \"wms_request\" \"myrequest\"\r\n \"wms_format\" \" \"\r\n \"wms_time\" \" \"\r\n END','img/icons/admin_metatags.png','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Class','CLASS\r\n EXPRESSION ()\r\n SYMBOL 0\r\n OUTLINECOLOR\r\n COLOR\r\n NAME \"myclass\"\r\nEND #end of class','img/icons/mini_triangle.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Query','#\r\n#Start of query definitions\r\n QUERYMAP\r\n STATUS ON\r\n STYLE HILITE\r\nEND','img/icons/question.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Scalebar','#\r\n#start of scalebar\r\nSCALEBAR\r\n IMAGECOLOR 255 255 255\r\n STYLE 1\r\n SIZE 400 2\r\n COLOR 0 0 0\r\n UNITS KILOMETERS\r\n INTERVALS 5\r\n STATUS ON\r\nEND','img/icons/desc_lenght.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Layer','LAYER\r\n NAME \"mylayer\"\r\n TYPE\r\n STATUS ON\r\n DATA \"mydata\"\r\nEND #end of layer','img/ed_copy.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Label','LABEL\r\n COLOR\r\n ANGLE\r\n FONT arial\r\n TYPE TRUETYPE\r\n POSITION\r\n PARTIALS TRUE\r\n SIZE 6\r\n BUFFER 0\r\n OUTLINECOLOR\r\nEND #end of label','img/icons/fontfamily.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Reference','#\r\n#start of reference\r\nREFERENCE\r\n SIZE 120 60\r\n STATUS ON\r\n EXTENT -180 -90 182 88\r\n OUTLINECOLOR 255 0 0\r\n IMAGE \"myimagedata\"\r\nCOLOR -1 -1 -1\r\nEND','images/ed_image.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Legend','#\r\n#start of legend\r\n#\r\nLEGENDr\n KEYSIZE 18 12\r\n POSTLABELCACHE TRUE\r\n STATUS ON\r\nEND','images/ed_about.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Web','#\r\n#Start of web interface definition\r\n#\r\nWEB\r\n TEMPLATE \"myfile/url\"\r\n MINSCALE 1000\r\n MAXSCALE 40000\r\n IMAGEPATH \"myimagepath\"\r\n IMAGEURL \"mypath\"\r\nEND','img/icons/ico_link.gif','maps');
INSERT INTO tiki_quicktags (taglabel, taginsert, tagicon, tagcategory) VALUES ('New Mapfile','#\r\n#Start of mapfile\r\n#\r\nNAME MYMAPFILE\r\n STATUS ON\r\nSIZE \r\nEXTENT\r\n UNITS\r\nSHAPEPATH \" \"\r\nIMAGETYPE \" \"\r\nFONTSET \" \"\r\nIMAGECOLOR -1 -1 -1\r\n\r\n#remove this text and add objects here\r\n\r\nEND # end of mapfile','img/icons/global.gif','maps');
#translated objects table
DROP TABLE IF EXISTS tiki_translated_objects;
......
# $Header: /cvsroot/tikiwiki/tiki/db/tiki_1.8to1.9.sql,v 1.103 2005-11-07 21:42:29 sylvieg Exp $
# $Header: /cvsroot/tikiwiki/tiki/db/tiki_1.8to1.9.sql,v 1.104 2005-12-12 15:18:48 mose Exp $
# The following script will update a tiki database from verion 1.8 to 1.9
#
......@@ -1255,3 +1255,5 @@ ALTER TABLE users_groups DROP groupHomeLocalized;
# missing field in primary key:
ALTER TABLE `users_objectpermissions` DROP PRIMARY KEY , ADD PRIMARY KEY ( `objectId` , `objectType` , `groupName` ( 30 ), `permName` ) ;
# 2005-05-03 - amette - correct perm for submitting link - WYSIWYCA
UPDATE tiki_menu_options SET perm="tiki_p_submit_link" WHERE url="tiki-directory_add_site.php";
......@@ -73,4 +73,18 @@ ALTER TABLE `tiki_user_taken_quizzes` DROP PRIMARY KEY , ADD PRIMARY KEY ( `user
ALTER TABLE `tiki_user_votings` DROP PRIMARY KEY , ADD PRIMARY KEY ( `user` , `id` ( 100 ) ) ;
ALTER TABLE `tiki_user_watches` DROP PRIMARY KEY , ADD PRIMARY KEY ( `user` , `event` , `object` ( 100 ) ) ;
# 2005-10-30: ohertel - added Tiki Mobile to the menu
INSERT IGNORE INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Mobile','tiki-mobile.php',37,'feature_mobile','','');
# not needed anymore, so drop it:
# -- no you don't. NO destructive action should EVER occur in this file
#DROP TABLE IF EXISTS tiki_features;
#DROP TABLE IF EXISTS users_score;
ALTER TABLE users_users DROP KEY score_2;
ALTER TABLE users_groups DROP groupHomeLocalized;
# missing field in primary key:
ALTER TABLE `users_objectpermissions` DROP PRIMARY KEY , ADD PRIMARY KEY ( `objectId` , `objectType` , `groupName` ( 30 ), `permName` ) ;
# 2005-05-03 - amette - correct perm for submitting link - WYSIWYCA
UPDATE tiki_menu_options SET perm="tiki_p_submit_link" WHERE url="tiki-directory_add_site.php";
#!/usr/bin/php
<?php
dl('mysql.so');
include "/usr/local/tikiwiki/db/local.php";
$db = mysql_connect($host_tiki, $user_tiki, $pass_tiki);
mysql_select_db($dbs_tiki);
$pre = "usermap_". date("Y-m-d");
$mif = "mif_$pre.mif";
$mid = "mif_$pre.mid";
if (file_exists("maps/$mif")) @ unlink("maps/$mif");
if (file_exists("maps/$mid")) @ unlink("maps/$mid");
$fmif = fopen("maps/$mif","w");
$fmid = fopen("maps/$mid","w");
fputs($fmif,"Version 300\n");
fputs($fmif,"Charset \"WindowsLatin1\"\n");
fputs($fmif,"Delimiter \",\"\n");
fputs($fmif,"CoordSys Earth Projection 1, 104\n");
fputs($fmif,"Columns 3\n");
fputs($fmif," user Char(40)\n");
fputs($fmif," Lon float\n");
fputs($fmif," Lat float\n");
fputs($fmif,"Data\n");
$query = "select login from users_users";
$results = mysql_query($query);
while ($r = mysql_fetch_row($results)) {
$retlat = mysql_query("select value from tiki_user_preferences where prefName='lat' and user='". addslashes($r[0]) ."'");
$lat = number_format(@ mysql_result($retlat,0),5);
$retlon = mysql_query("select value from tiki_user_preferences where prefName='lon' and user='". addslashes($r[0]) ."'");
$lon = number_format(@ mysql_result($retlon,0),5);
if ($lon != 0 and $lat != 0 and !strpos($lon.$lat,',')) {
fputs($fmif,"Point ".$lon." ".$lat."\n");
fputs($fmif," Symbol (34,16711680,9)\n");
fputs($fmid,"\"".$r[0]."\",$lon,$lat\n");
}
}
fclose($fmif);
fclose($fmid);
?>
......@@ -218,8 +218,8 @@ class BlogLib extends TikiLib {
if ($find) {
$findesc = '%' . $find . '%';
$mid = " where `blogId`=? and (`data` like ?) ";
$bindvars = array((int)$blogId,$findesc);
$mid = " where `blogId`=? and (`data` like ? or `title` like ?) ";
$bindvars = array((int)$blogId,$findesc, $findesc);
} else {
$mid = " where `blogId`=? ";
$bindvars = array((int) $blogId);
......@@ -500,6 +500,20 @@ class BlogLib extends TikiLib {
// Purge old activity
$query = "delete from `tiki_blog_activity` where `day`<?";
$result = $this->query($query,array((int) $day2));
/* this code enables you to reset blog activity if activity too old at each blog post
$query = "select b.`blogId` from `tiki_blogs` b left join `tiki_blog_activity`a on a.`blogId`= b.`blogId` where b.`activity` > 0 and a.`blogId` is null";
$result = $this->query($query);
$dead = '';
while ($res = $result->fetchRow()) {
if ($dead)
$dead .= ',';
$dead .= $res['blogId'];
}
if ($dead) {
$query = "update `tiki_blogs` set `activity`=NULL where `blogId` in (?)";
$result = $this->query($query, array($dead));
}
*/
// Register new activity
$query = "select count(*) from `tiki_blog_activity` where `blogId`=? and `day`=?";
$result = $this->getOne($query,array((int) $blogId,(int)$today));
......
<?php
/**
* $Header: /cvsroot/tikiwiki/tiki/lib/breadcrumblib.php,v 1.3 2005-05-18 10:59:48 mose Exp $
* $Header: /cvsroot/tikiwiki/tiki/lib/breadcrumblib.php,v 1.4 2005-12-12 15:18:49 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.
......@@ -187,7 +187,7 @@ class Breadcrumb {
function breadcrumb_getTitle($crumbs, $loc) {
global $feature_siteidentity, $feature_wiki_description, $print_page, $info, $feature_siteloc, $feature_breadcrumbs;
global $feature_page_title;
if ((($feature_siteidentity == 'n') || $feature_breadcrumbs == 'n' ) && ($feature_wiki_description == 'y' && $info)) {
return _breadcrumb_getTitle($crumbs, $loc);
} else if ($feature_breadcrumbs == 'n' && $loc == "admin") {
......@@ -200,7 +200,9 @@ class Breadcrumb {
}
} else if ($loc == "admin") {
return _breadcrumb_getTitle($crumbs, 'page');
}
} else if ($feature_breadcrumbs != 'y' && $loc == "page" && $feature_page_title == 'y') {// for previous compatibility
return _breadcrumb_getTitle($crumbs, 'page');
}
return;
}
......
<?php
/** \file
* $Header: /cvsroot/tikiwiki/tiki/lib/debug/debug-command_sql.php,v 1.3 2003-08-07 04:34:03 rossta Exp $
* $Header: /cvsroot/tikiwiki/tiki/lib/debug/debug-command_sql.php,v 1.4 2005-12-12 15:18:49 mose Exp $
*
* \brief Exec SQL query on Tiki DB
*
......@@ -36,8 +36,8 @@ class DbgSQLQuery extends DebuggerCommand {
/// Execute command with given set of arguments.
function execute($params) {
//
// FUCK! Due limitations of STUPID Smarty I forced to use
// HTML_RESULT... DAMN!
// Due to limitations of Smarty, I am forced to use
// HTML_RESULT... (not fun!)
//
$this->set_result_type(HTML_RESULT);
......
This diff is collapsed.
......@@ -976,8 +976,10 @@ class ImageGalsLib extends TikiLib {
function get_subgalleries($offset, $maxRecords, $sort_mode, $find, $galleryId = -1) {
//filesize is for listing images. equivalent is numimages
$sort_mode=preg_replace('/(filesize_)/','numimages_',$sort_mode);
if ($sort_mode == '')
$sort_mode = 'name_asc';
else //filesize is for listing images. equivalent is numimages
$sort_mode=preg_replace('/(filesize_)/','numimages_',$sort_mode);
if ($find) {
$findesc = '%' . $find . '%';
......@@ -1197,14 +1199,14 @@ class ImageGalsLib extends TikiLib {
$old_sort_mode = '';
if (in_array($sort_mode, array(
'images desc',
'images asc'
'images_desc',
'images_asc'
))) {
$old_offset = $offset;
$old_maxRecords = $maxRecords;
$old_sort_mode = $sort_mode;
$sort_mode = 'user desc';
$sort_mode = 'name_desc';
$offset = 0;
$maxRecords = -1;
}
......@@ -1214,7 +1216,7 @@ class ImageGalsLib extends TikiLib {
$whuser = "";
$bindvars=array();
} else {
$whuser = "where `user`=? or public=?";
$whuser = "where g.`user`=? or g.public=?";
$bindvars=array($user,'y');
}
......@@ -1222,10 +1224,10 @@ class ImageGalsLib extends TikiLib {
$findesc = '%' . $find . '%';
if (empty($whuser)) {
$whuser = "where `name` like ? or `description` like ?";
$whuser = "where g.`name` like ? or g.`description` like ?";
$bindvars=array($findesc,$findesc);
} else {
$whuser .= " and `name` like ? or `description` like ?";
$whuser .= " and g.`name` like ? or g.`description` like ?";
$bindvars[]=$findesc;
$bindvars[]=$findesc;
}
......@@ -1234,8 +1236,8 @@ class ImageGalsLib extends TikiLib {
// If sort mode is versions then offset is 0, maxRecords is -1 (again) and sort_mode is nil
// If sort mode is links then offset is 0, maxRecords is -1 (again) and sort_mode is nil
// If sort mode is backlinks then offset is 0, maxRecords is -1 (again) and sort_mode is nil
$query = "select * from `tiki_galleries` $whuser order by ".$this->convert_sortmode($sort_mode);
$query_cant = "select count(*) from `tiki_galleries` $whuser";
$query = "select g.*, a.`name` as parentgalleryName from `tiki_galleries` g left join `tiki_galleries` a on g.`parentgallery` = a.`galleryId` $whuser order by ".$this->convert_sortmode($sort_mode);
$query_cant = "select count(*) from `tiki_galleries` g $whuser";
$result = $this->query($query,$bindvars,$maxRecords,$offset);
$cant = $this->getOne($query_cant,$bindvars);
$ret = array();
......@@ -1276,37 +1278,22 @@ class ImageGalsLib extends TikiLib {
}
if ($add) {
$aux = array();
$aux["name"] = $res["name"];
$gid = $res["galleryId"];
$aux["visible"] = $res["visible"];
$aux["id"] = $gid;
$aux["galleryId"] = $res["galleryId"];
$aux["description"] = $res["description"];
$aux["created"] = $res["created"];
$aux["lastModif"] = $res["lastModif"];
$aux["user"] = $res["user"];
$aux["hits"] = $res["hits"];
$aux["public"] = $res["public"];
$aux["theme"] = $res["theme"];
$aux["geographic"] = $res["geographic"];
$aux["images"] = $this->getOne("select count(*) from `tiki_images` where `galleryId`=?",array($gid));
$ret[] = $aux;
$res['images'] = $this->getOne("select count(*) from `tiki_images` where `galleryId`=?",array($res['galleryId']));
$ret[] = $res;
}
}
if ($old_sort_mode == 'images asc') {
if ($old_sort_mode == 'images_asc') {
usort($ret, 'compare_images');
}
if ($old_sort_mode == 'images desc') {
if ($old_sort_mode == 'images_desc') {
usort($ret, 'r_compare_images');
}
if (in_array($old_sort_mode, array(
'images desc',
'images asc'
'images_desc',
'images_asc'
))) {
$ret = array_slice($ret, $old_offset, $old_maxRecords);
}
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/lib/newsletters/nllib.php,v 1.43 2005-12-12 15:18:50 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");
......@@ -378,17 +379,20 @@ print_r($ret);
$ret = array();
while ($res = $result->fetchRow()) {
$res['tiki_p_admin_newsletters'] = $this->user_has_perm_on_object($user, $res['nlId'], 'newsletter', 'tiki_p_admin_newsletters')? 'y': 'n';
$res['tiki_p_send_newsletters'] = $this->user_has_perm_on_object($user, $res['nlId'], 'newsletter', 'tiki_p_send_newsletters')? 'y': 'n';
$res['tiki_p_subscribe_newsletters'] = $this->user_has_perm_on_object($user, $res['nlId'], 'newsletter', 'tiki_p_subscribe_newsletters')? 'y': 'n';
if (!empty($perms)) {
$hasPerm = false;
if (is_array($perms)) {
foreach ($perms as $perm) {
if ($this->user_has_perm_on_object($user,$res['nlId'],'newsletter',$perm)) {
if ($res[$perm] == 'y') {
$hasPerm = true;
break;
}
}
} else {
$hasPerm = $this->user_has_perm_on_object($user,$res['nlId'],'newsletter',$perms);
$hasPerm = $res[$perm];
}
if (!$hasPerm)
continue;
......@@ -419,12 +423,16 @@ print_r($ret);
return $res;
}
function list_editions($nlId, $offset, $maxRecords, $sort_mode, $find, $drafts=false) {
function list_editions($nlId, $offset, $maxRecords, $sort_mode, $find, $drafts=false, $perm='') {
global $user;
$bindvars = array();
$mid = "";
if ($nlId) {
$mid.= " and tn.`nlId`=". intval($nlId);
$tiki_p_admin_newsletters = $this->user_has_perm_on_object($user, $nlId, 'newsletter', 'tiki_p_admin_newsletters')? 'y': 'n';
$tiki_p_send_newsletters = $this->user_has_perm_on_object($user, $nlId, 'newsletter', 'tiki_p_send_newsletters')? 'y': 'n';
$tiki_p_subscribe_newsletters = $this->user_has_perm_on_object($user, $nlId, 'newsletter', 'tiki_p_subscribe_newsletters')? 'y': 'n';
}
if ($find) {
......@@ -442,13 +450,26 @@ print_r($ret);
$query = "select tsn.`editionId`,tn.`nlId`,`subject`,`data`,tsn.`users`,`sent`,`name` from `tiki_newsletters` tn, `tiki_sent_newsletters` tsn ";
$query.= " where tn.`nlId`=tsn.`nlId` $mid order by ".$this->convert_sortmode("$sort_mode");
$query_cant = "select count(*) from `tiki_newsletters` tn, `tiki_sent_newsletters` tsn where tn.`nlId`=tsn.`nlId` $mid";
$result = $this->query($query,$bindvars,$maxRecords,$offset);
$cant = $this->getOne($query_cant,$bindvars);
$ret = array();
$cant = 0;
while ($res = $result->fetchRow()) {
if ($nlId) {
if ($perm && $$perm == 'n')
continue;
$res['tiki_p_admin_newsletters'] = $tiki_p_admin_newsletters;
$res['tiki_p_send_newsletters'] = $tiki_p_send_newsletters;
$res['tiki_p_subscribe_newsletters'] = $tiki_p_subscribe_newsletters;
} else {
$res['tiki_p_admin_newsletters'] = $this->user_has_perm_on_object($user, $res['nlId'], 'newsletter', 'tiki_p_admin_newsletters')? 'y': 'n';
$res['tiki_p_send_newsletters'] = $this->user_has_perm_on_object($user, $res['nlId'], 'newsletter', 'tiki_p_send_newsletters')? 'y': 'n';
$res['tiki_p_subscribe_newsletters'] = $this->user_has_perm_on_object($user, $res['nlId'], 'newsletter', 'tiki_p_subscribe_newsletters')? 'y': 'n';
if ($perm && $res[$perm] == 'n')
continue;
}
$ret[] = $res;
++$cant;
}
$retval = array();
......
......@@ -32,7 +32,7 @@
* @author Martin Jansen <mj@php.net>
* @author Daniel Convissor <danielc@php.net>
* @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group
* @version CVS: $Id: Server.php,v 1.2 2005-08-18 16:23:06 mose Exp $
* @version CVS: $Id: Server.php,v 1.3 2005-12-12 15:18:51 mose Exp $
* @link http://pear.php.net/package/XML_RPC
*/
......@@ -543,7 +543,7 @@ class XML_RPC_Server
$plist .= "$i - " . var_export($XML_RPC_xh[$parser]['params'][$i], true) . " \n";
$m->addParam($XML_RPC_xh[$parser]['params'][$i]);
}
XML_RPC_Server_debugmsg($plist);
if ($this->debug) XML_RPC_Server_debugmsg($plist);
// now to deal with the method
$methName = $XML_RPC_xh[$parser]['method'];
......
......@@ -320,7 +320,7 @@ function refresh_index_files() {
global $tikilib;