Commit 43284736 authored by ohertel's avatar ohertel

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

parent 3ac2f9c9
......@@ -2186,6 +2186,7 @@ tiki/games/thumbs/index.php -text
tiki/get_strings.php -text
tiki/green.favicon.png -text
tiki/help.php -text
tiki/htaccess.sh -text
tiki/images/_htaccess -text
tiki/images/book.gif -text
tiki/images/code.png -text
......@@ -3053,6 +3054,7 @@ tiki/img/silk/locked.png -text
tiki/img/silk/locked_new.png -text
tiki/img/silk/page.png -text
tiki/img/silk/page_new.png -text
tiki/img/silk/readme.txt -text
tiki/img/silk/sticky.png -text
tiki/img/silk/sticky_new.png -text
tiki/img/smarty.gif -text
......
......@@ -14,6 +14,8 @@ tiki/img/wiki/*.pad_xml
tiki/img/wiki_up/*
tiki/lib/Galaxia/processes/*
tiki/lib/smarty
tiki/maps
tiki/mods
tiki/modules/cache
tiki/modules/cache/*
tiki/phpmyadmin
......
......@@ -6,6 +6,9 @@ tiki-emptycache.php
project.index
ZendPlatform
ZendStudioServer
ZendPlatform
dummy.php
.htaccess
.settings
maps
mods
This directory contains source code to Tiki! The wiki with lots of features!
DOCUMENTATION
ABOUT DOCUMENTATION
-------------------
* official TikiWiki documentation website (for all versions) :
http://doc.tikiwiki.org
......@@ -8,13 +8,15 @@ DOCUMENTATION
* It is highly recommended that you refer to the online documentation:
* http://tikiwiki.org/InstallTiki for a setup guide
* http://tikiwiki.org/InstallTikiHelp for what to do in case of problems
* It might also be helpful to look into the official Manual. Last released documentation, in pdf
format (350 pages) (outdated at the time of this writing) and a pdf snapshot of doc.tikiwiki.org:
* It might also be helpful to look into the official Manual. Last released
documentation, in pdf format (350 pages) (outdated at the time of this
writing) and a pdf snapshot of doc.tikiwiki.org:
http://sourceforge.net/project/showfiles.php?group_id=64258&package_id=68737
* TikiWiki also has an active IRC channel: #tikiwiki on irc.freenode.net
see http://tikiwiki.org/ConnectingToIRC for how to join the IRC channel
The rest of this document includes parts of the online documentation that might be enough to get you running Tiki.
The rest of this document includes parts of the online documentation that
might be enough to get you running Tiki.
INSTALL TIKI WITH POSTGRESQL
----------------------------
......@@ -25,23 +27,27 @@ INSTALL TIKI WITH MYSQL
-----------------------
Before you get started it is a good idea to know:
* your database user name and password
* your Apache user and group ID
* your database name, database user name and password
* your Apache user and group ID (e.g. www-user and www-data)
If you are using the RPM that is available you can skip down to browser-based install.
If you are using the RPM that is available you can skip down to browser-based
install.
These are notes on how to setup and configure Tiki.
----------------------------
Step one: unpack the archive
----------------------------
Unpack the Tiki files to the document root of where you want Tiki installed, e.g. /var/www/tiki/
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-[version].tar.bz2
-----------------------------------------
Step two: run setup.sh to set permissions
-----------------------------------------
CHMOD the file setup.sh to 755. "chmod 755 setup.sh"
......@@ -49,8 +55,9 @@ CHMOD the file setup.sh to 755. "chmod 755 setup.sh"
* Set permissions and virtual host domains with setup.sh:
o Determine what user and group your web server runs as
The script setup.sh in this directory assigns necessary permissions for the directories that the
web server writes files to. It also creates the (initially empty) cache directories.
The script setup.sh in this directory assigns necessary permissions for the
directories that the web server writes files to. It also creates the
(initially empty) cache directories.
Usage ./setup.sh user [group] [rights] [list of virtual host domains]
......@@ -99,32 +106,56 @@ or, if you can't become root:
./setup.sh $YOURUSER $AGROUP 02777 domain1 domain2 domain3
Step three: browser-based setup
-------------------------------
--------------------------------------------------------------------
Step three: run htaccess.sh to make tiki more secure (OPTIONAL STEP)
--------------------------------------------------------------------
NOTE: you only should do this if the settings of your servers allow the usage
of .htaccess files. But you can try it out, if it doesn't work for you, you
can revert the changes with one step.
CHMOD the file htaccess.sh to 755. "chmod 755 htaccess.sh"
Usage ./htaccess.sh [off]
If you call the script without parameters, it renames all the files named
_htaccess to .htaccess, making them functional. If you get problems with
active .htaccess files, just call the script with the parameter off to rename
the .htaccess files back to _htaccess. That's it!
------------------------------
Step four: browser-based setup
------------------------------
* create a database for Tiki
- often using PhpMyAdmin and MySQL
- or on the command line "mysqladmin create dbname"
the database name is usually called "tiki"
* Point your browser to the web address that corresponds to the file tiki-install.php (e.g.
http://localhost/tiki/tiki-install.php)
* Point your browser to the web address that corresponds to the file
tiki-install.php (e.g. http://localhost/tiki/tiki-install.php)
* Follow the instructions there
you'll need the password and user name for your database
* use a profile to populate your database.
default values are very minimal, and basicEnabled maybe suits more immediate use
default values are very minimal, and basicEnabled maybe suits more
immediate use
* To log into Tiki for the first time:
- user: admin
- password: admin
Step four: configure your site
-------------------------------
------------------------------
Step five: configure your site
------------------------------
Next you can configure Tiki to your suit needs:
* Choose which features you want enabled
- go to tiki-admin.php by clicking on the "Admin" or "Admin Home" link on the left side of your screen
- go to tiki-admin.php by clicking on the "Admin" or "Admin Home" link
on the left side of your screen
* (Optionally) create groups of users that share permissions
* Assign appropriate permissions
Good luck!
Good luck and have fun with Tiki!
ps:
......
Tiki! The wiki with a lot of features!
version 1.10 -Arcturus-
version 1.10 (CVS) -Arcturus-
DOCUMENTATION
......
......@@ -10,8 +10,8 @@ Use the following tags to distinguish changes :
* [NEW] apply if something new was added in tikiwiki
* [MOD] is an enhancement; not really new but makes things work better
* [FIX] can be used for bug fixes of any sort
* [SEC] (new in 1.9.4) for security fix operations
* -[DB] (new in 1.9.4) for changes in the database
* [SEC] (new since 1.9.4) for security fix operations
* -[DB] (new since 1.9.4) for changes in the database
Please wrap your lines at 80 characters and indent them with spaces only.
......@@ -24,27 +24,109 @@ Version 1.9.5
<http://tikiwiki.org/ReleaseProcess195>
------------------
[MOD] Images galleries links simplyfied
[SEC] Security: fix in tiki-editpage.php
[SEC] Security: fixes in jhot.php
[SEC] Security: Parameter highlight may not countain & , " , ' , < or >
[SEC] Security: Script htaccess.sh for dis/enabling .htaccess files
[FIX] Avoid some messages due to undefined variables
[FIX] Tracker: fixed tracker data import when no status indicated in csv
[FIX] Trackers: check we have a right image handle before taking its info
[FIX] Avoid notice and insert message case id xxx does not exist in {rss id=xxx}
[FIX] Optional 's' for $groupHome protocol as https://... ,correct the
https: goup home case for logout too
[FIX] Installer shows memory limit warning
[FIX] No more take offset from cookies
[FIX] Image Gallery: Check we have a right image handle before taking its info
[FIX] Image Gallery: Strengthen get_one_image_from_disk() to refuse non image data
[FIX] Image Gallery: Check and get image sizes even if .gif or no
imagecreatefromstring()
[FIX] Image Gallery: All files are now checked against being right images
[FIX] Image Gallery: Double link to image gallery when returning from edit
[FIX] Image Gallery: Get optional thumbnail image size so it works if same scale
as thumbs scale from gallery
[FIX] Image Gallery: Double link to image gallery when returning from edit
[FIX] Image Gallery: Use gallery's default for image scale or sort order
if none in browse and show images
[FIX] Image Gallery: Image permissions
[FIX] Image Gallery: Navigation / scale control in image browsing
[FIX] Image Gallery: Once image gallery saved, avoid double create link display
[FIX] Image Gallery: small change in images batch upload to respect name
order in batch
[FIX] Keep menus wide open if javascript or cookies not allowed
[FIX] Styles: Simple style fixes for PLM and other enhancements
[FIX] Tiki-index_p.php: typo feature_wiki_usrlock
[FIX] Blogs: Trackback pings for blog posts accepted only if the feature
blog is enabled
[FIX] Blogs: Secured and fixed blogs trackback pings display
[FIX] Wikiplugin snarf: don't change line feeds in <br />
[FIX] Wikiplugin code: uses proper <br />
[FIX] mk_profile.sh: accepts optionals backticks around table names,
better autodoc
[FIX] Module quick_edit: fixed collision with edit article: 'heading'
used in both of them, thus preventing 'heading' showing up in
edit article, if you have quick_edit module activated
[FIX] Admin/login: fixing 1 day bug & adding more options
[FIX] pcllib: removed call by reference to functions
[FIX] Broken links to documentation
[FIX] Some fixes in display of country flag
[FIX] Galaxia: conformed to db abstract
[FIX] Wiki RSS Feed: avoid sql error, show whole file for new wiki pages,
cleanup of output in rss data
[FIX] Wiki: fixed undefined 'index' variable in page history
[FIX] Wikiplugin TrackerFilter: fix sort and pagination
[FIX] Wikiplugin Trackerlist: several fixes
[MOD] Smarty updated to 2.6.14
[MOD] Modules allow user to create a module without title and display error
message if no name or data is given to a new module
[MOD] Trackers: add the fulltext index for tracker search with mysql
[MOD] Trackers: many fixes and enhancements
[MOD] change in the message body messu-compose to messu-mailbox to be
directly in the mailbox when notification from the message box
[MOD] Some clean up and organization on wiki help
[MOD] Trackers: added a new optional behaviour for isHidden field
type, to make hidden fields only editable by tracker admin
but still visible to modifier
[MOD] Admin survey questions: longer options field and hint box for
multiple answer questions where to places those answers
[MOD] at least yahoo and google ignore our robots.txt entries completely,
so we set META ROBOTS tags on all pages we don't want indexed/followed.
Thats all admin/submit/print/rename/remove/send pages and pages that
will make search box go wild (categories, lengthy lists, calendar, ...)
[MOD] Hide MultiTiki info when not in use
[MOD] lang/de, lang/ca, lang/pt-br, lang/fr updates
[MOD] Edit article: allow to preselect categories when creating a new
article, like this:
/tiki-edit_article.php?cat_categories[]=1&cat_categorize=on for
category '1'
[MOD] Plugins: Extended div wikiplugin to accept justify text align
[MOD] Blogs: Possibility to delete blog post level trackback pings
[MOD] Changed behaviour for description label when no desc is provided
[MOD] Enables relative url for group home as http:tiki-xxx.php...
(no double slash after ":" )
[MOD] Enables included php to ask extra external js
[MOD] Image slideshow in page , controlled by feature slideshow in admin
image galleries
[MOD] Images slideshow preloads images and works autonomous when
cycle complete
[MOD] Images galleries links simplified, only scalesize controls the scale
(0=original size)
[MOD] Images galleries controls enhanced
[FIX] Use gallery's default for image scale or sort order if none in browse and show images
[FIX] Navigation in image browsing
[FIX] Once image gallery saved , avoid double create link display
[FIX] keep menus wide open if javascript or cookies not allowed
[MOD] update to latest version of PhpLayersMenu (3.2.0-rc)
[MOD] new files (copy for Tiki for modifications) to prevent overriding of original files of the PLM package
[FIX] styles: Simple style fixes for PLM and other enhancements
[MOD] calendar: added categories support for theme control purpose
[MOD] users: added an option to make optional the optionality of recieving internal messages
[MOD] imagegal: added in admin panel a way to move images from db to filesystem
[MOD] users: added an option to have new users accept internal messages by default
[FIX] tiki-index_p.php: typo feature_wiki_usrlock
[FIX] Trackback pings for blog posts accepted only if the feature blog is enabled
[MOD] Blogs trackback pings considered as comments so depend on their settings / perms (temporary, should be separated on own settings )
[MOD] View blogs post refactored
[FIX] wikiplugin snarf : don't change line feeds in <br />
[FIX] wikiplugin code : uses proper <br />
[FIX] mk_profile.sh : accepts optionals backticks around table names , better autodoc
[MOD] Update to latest version of PhpLayersMenu (3.2.0-rc)
[MOD] New files (copy for Tiki for modifications) to prevent overriding
of original files of the PLM package
[MOD] Calendar: added categories support for theme control purpose
[MOD] Imagegal: added a way in admin panel to move images from db
to filesystem
[MOD] Users: added an option to have new users accept internal messages
by default
[MOD] Users: switch on receiving internal messages by default
[MOD] Blogs: Added feature/allow blogs trackback pings enabling general and
on a blog basis
[MOD] Blogs: View blogs post refactored
[MOD] Clearer install & upgrade intructions. Moving 1.7.x stuff to a wiki
page. Add information about secdb
[NEW] Plugins: Skype plugin to create a clickable link to call or chat
with a Skype user
Version 1.9.4
<http://tikiwiki.org/ReleaseProcess194>
......@@ -52,15 +134,18 @@ Version 1.9.4
[MOD] cms: added an option for availability of print option in cms
[NEW] google-map: new feature, used for usermap and self-location
[FIX] polls: changed polls admin access permission to be distinct from admin one
[FIX] polls: changed polls admin access permission to be distinct from
admin one
[MOD] user: added an option to remove all pages from user when deleting user
[NEW] trackers: new export page in csv format
[FIX] trackers: made filter work with categ field type
[FIX] trackers: fixed trackers to accept zero when a numeric field type is mandatory
[FIX] trackers: fixed trackers to accept zero when a numeric field type
is mandatory
[FIX] galaxia: added a check for name of start activity
[FIX] maps: freeing now image memory after request to avoid bloating
[FIX] cms: fixed db commpat for print view (reads->nbreads)
[FIX] newsletter: set up the from address to default from when sending newsletter
[FIX] newsletter: set up the from address to default from when sending
newsletter
[MOD] multi: added $local_php and $multi optional vars for geeks only
[SEC] several vars added to sanitization to avoid cross-site scripting
[FIX] devtools: improved sqlupgrade script for when password includes a quote
......
Tiki Copyright
----------------
$Header: /cvsroot/tikiwiki/tiki/copyright.txt,v 1.11 2006-05-22 17:09:07 mose Exp $
$Header: /cvsroot/tikiwiki/tiki/copyright.txt,v 1.12 2006-09-19 16:33:04 ohertel Exp $
The following list gathers the copyrights holders for tikiwiki
at the state of 1.9.4 (CVS) version. Each member of that list wrote at
at the state of 1.9.5 (CVS) version. Each member of that list wrote at
least one line, directly or indirectly, in tikiwiki code source.
The exact proportion of the contribution of each is not an issue,
as any copyright change will involve the agreement of everybody.
......@@ -1425,6 +1425,6 @@ contributor can have been omitted, and some of above
information can be inadequate or outdated.
In case of need for modification, please contact
admin@tikiwiki.org (alias to damian, dennis, luis, marc,
admin@tikiwiki.org (alias to dennis, luci, luis, marc,
mose, oliver, sylvie and redflo)
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -3,10 +3,10 @@
rem tool for diffing an old tiki.sql+upgrade script against new tiki.sql.
rem --- temporary table used by this script:
set db=tikisqldiff
set db=tikidiff
rem --- older sql + patch file to newer:
set first=tiki-18.sql
set first=tiki-1.8.sql
set patch=tiki_1.8to1.9.sql
rem --- newer sql
......@@ -14,15 +14,25 @@ set second=tiki.sql
rem --- do not edit below this line!
echo --- drop db
mysqladmin -uroot -f drop %db%
echo --- create db
mysqladmin -uroot create %db%
echo --- insert %first%
mysql -uroot %db% < %first%
echo --- update %first% with %patch%
mysql -uroot -f %db% < %patch%
echo --- dump result to %first%.dump
mysqldump -uroot %db% > %first%.dump
echo --- drop db
mysqladmin -uroot -f drop %db%
echo --- create db
mysqladmin -uroot create %db%
echo --- insert %second%
mysql -uroot %db% < %second%
echo --- dump result to %second%.dump
mysqldump -uroot %db% > %second%.dump
diff %first%.dump %second%.dump
echo --- diff %first%.dump and %second%.dump to tikidb.diff
diff %first%.dump %second%.dump > tikidb.diff
#!/bin/bash
# enable/disable .htaccess files
OLD=_htaccess
NEW=.htaccess
ACTION=activating
if [ "$1" = "off" ]; then
OLD=.htaccess
NEW=_htaccess
ACTION=deactivating
fi
ENTRIES=`/bin/ls -Rd *`
for ENTRY in ${ENTRIES}
do
# only work on directories:
if [ -d "$ENTRY" ]; then
# do nothing if $NEW already available
if [ ! -e ${ENTRY}/${NEW} ]; then
# if $OLD available, rename it
if [ -e ${ENTRY}/${OLD} ]; then
echo "${ACTION} ${ENTRY}/.htaccess"
chmod 644 ${ENTRY}/${OLD}
mv ${ENTRY}/${OLD} ${ENTRY}/${NEW}
fi
fi
fi
done
Silk icon set 1.3
_________________________________________
Mark James
http://www.famfamfam.com/lab/icons/silk/
_________________________________________
This work is licensed under a
Creative Commons Attribution 2.5 License.
[ http://creativecommons.org/licenses/by/2.5/ ]
This means you may use it for any purpose,
and make any changes you like.
All I ask is that you include a link back
to this page in your credits.
Are you using this icon set? Send me an email
(including a link or picture if available) to
mjames@gmail.com
Any other questions about this icon set please
contact mjames@gmail.com
\ No newline at end of file
......@@ -41,7 +41,7 @@ class ProcessManager extends BaseManager {
function deactivate_process($pId)
{
$query = "update ".GALAXIA_TABLE_PREFIX."processes set isActive='n' where pId=?";
$this->query($query, array($pid));
$this->query($query, array($pId));
$msg = sprintf(tra('Process %d has been deactivated'),$pId);
$this->notify_all(3,$msg);
}
......@@ -444,7 +444,7 @@ class ProcessManager extends BaseManager {
$amid[] = "`name`=?";
$bindvars[] = $filtername;
}
if ($filteactive) {
if ($filteractive) {
$amid[] = "`isActive`=?";
$bindvars[] = $filteractive;
}
......@@ -471,7 +471,7 @@ class ProcessManager extends BaseManager {
function invalidate_process($pid)
{
$query = "update `".GALAXIA_TABLE_PREFIX."processes` set `isValid`='n' where `pId`=?";
$this->query($query,array($pId));
$this->query($query,array($pid));
}
/*!
......
<?php
/** \file
* $Header: /cvsroot/tikiwiki/tiki/lib/categories/categlib.php,v 1.82 2006-09-17 13:01:59 ohertel Exp $
* $Header: /cvsroot/tikiwiki/tiki/lib/categories/categlib.php,v 1.83 2006-09-19 16:33:22 ohertel Exp $
*
* \brief Categories support class
*
......@@ -884,8 +884,7 @@ class CategLib extends ObjectLib {
if ($catObjectId) {
$query = "delete from `tiki_category_objects` where `catObjectId`=?";
$result = $this->query($query,array((int) $catObjectId));
$query = "delete from `tiki_categorized_objects` where `catObjectId`=?";
$result = $this->query($query,array((int) $catObjectId));
// must keep tiki_categorized object because poll or ... can use it
}
}
......
......@@ -27,6 +27,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Changelog:
v1.7.2-tiki-1 09-19-06
RSS0.9 added (ohertel)
v1.7.2 10-11-04
license changed to LGPL
......@@ -348,6 +351,12 @@ class UniversalFeedCreator extends FeedCreator {
$this->_feed = new RSSCreator10();
break;
case "0.9":
// fall through
case "RSS0.9":
$this->_feed = new RSSCreator09();
break;
case "0.91":
// fall through
case "RSS0.91":
......@@ -402,7 +411,7 @@ class UniversalFeedCreator extends FeedCreator {
*
* @see FeedCreator::addItem()
* @param string format format the feed should comply to. Valid values are:
* "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS"
* "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS", "RSS0.9"
* @return string the contents of the feed.
*/
function createFeed($format = "RSS0.91") {
......@@ -418,7 +427,7 @@ class UniversalFeedCreator extends FeedCreator {
* @since 1.4
*
* @param string format format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS", "RSS0.9"
* @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
* @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
*/
......@@ -1006,6 +1015,63 @@ class RSSCreator091 extends FeedCreator {
}
/**
* RSSCreator09 is a FeedCreator that implements RSS 0.9 Spec (for older applications)
*
* @since 1.7.2-tiki-1
* @author Oliver Hertel <ohertel@tikiwiki.org>
*/
class RSSCreator09 extends FeedCreator {
/**
* Stores this RSS feed's version number.
* @access private
*/
var $RSSVersion;
function RSSCreator091() {
$this->_setRSSVersion("0.9");
$this->contentType = "application/rss+xml";
}
/**
* Sets this RSS feed's version number.
* @access private
*/
function _setRSSVersion($version) {
$this->RSSVersion = $version;
}
/**
* Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 0.9.
* The feed will contain all items previously added in the same order.
* @return string the feed's complete text
*/
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
// $feed.= $this->_createGeneratorComment();
// $feed.= $this->_createStylesheetReferences();
$feed.= "<rdf:RDF\nxmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\nxmlns=\"http://my.netscape.com/rdf/simple/0.9/\">\n";
$feed.= "<channel>\n";
$feed.= "<title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
$feed.= "<link>".$this->link."</link>\n";
$this->descriptionTruncSize = 500;
$feed.= "<description>".$this->getDescription()."</description>\n";
// $now = new FeedDate();
// $feed.= " <lastBuildDate>".htmlspecialchars($now->rfc822())."</lastBuildDate>\n";
// $feed.= " <generator>".FEEDCREATOR_VERSION."</generator>\n";
$feed.= "</channel>\n";
for ($i=0;$i<count($this->items);$i++) {
$feed.= "<item>\n";
$feed.= "<title>".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."</title>\n";
$feed.= "<link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
$feed.= "</item>\n";
}
$feed.= "</rdf:RDF>\n";
return $feed;
}
}
/**
* RSSCreator20 is a FeedCreator that implements RDF Site Summary (RSS) 2.0.
......
......@@ -12,7 +12,10 @@ include_once ('lib/feedcreator/feedcreator.class.php');
$userslib = new Userslib($dbTiki);
global $rss_cache_time;
class RSSLib extends TikiLib {
function RSSLib($db) {
# this is probably uneeded now
if (!$db) {
......@@ -22,6 +25,10 @@ class RSSLib extends TikiLib {
$this->db = $db;
}
// ------------------------------------
// functions for rss feeds we syndicate
// ------------------------------------
function get_rss_version($ver) {
if ($ver=='') {
// get default rss feed version from database or set to 0.91 if none in there
......@@ -30,12 +37,15 @@ class RSSLib extends TikiLib {
$rss_version=$ver;
// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS
// valid format ids : 9 , 1 , 2 , 3 , 4 , 6 , 5 , 7 , 8
// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS, RSS0.9
// valid format ids : 9 , 1 , 2 , 3 , 4 , 6 , 5 , 7 , 8, a
switch ($ver) {
case "RSS0.91":
$rss_version=9;
break;
case "RSS0.9":
$rss_version="a";
break;
case "RSS1.0":
$rss_version=1;
break;
......@@ -72,12 +82,15 @@ class RSSLib extends TikiLib {
$rss_version_name=$ver;
// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS
// valid format ids : 9 , 1 , 2 , 3 , 4 , 6 , 5 , 7 , 8
// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS, RSS0.9
// valid format ids : 9 , 1 , 2 , 3 , 4 , 6 , 5 , 7 , 8, a
switch ($ver) {
case "9":
$rss_version_name="RSS0.91";
break;
case "a":
$rss_version_name="RSS0.9";
break;
case "1":
$rss_version_name="RSS1.0";
break;
......@@ -106,38 +119,55 @@ class RSSLib extends TikiLib {
return $rss_version_name;
}
/* return the rss version we currently have to use (user param or default value) */
function get_current_rss_version() {
global $rss_version;
if ($rss_version=='') {
// override version if set as request parameter
if (isset($_REQUEST["ver"])) {
$ver = $_REQUEST["ver"];
$rss_version = $this->get_rss_version($ver);
} else {
$rss_version = 9; // default to RSS 0.91
}