Loading...
 

Cvs18

Warning
This page has not been updated since 20031109, so much of the information is outdated. Read other CVS pages or ask on #tikiwiki if something written here seems wrong or incomplete. Chealer9 20040214

How to checkout and install the latest CVS HEAD code


Team,

This needs a little explaining. The adodb code is a separate module (_adodb). It can be brought in from the cvs repository into
tiki in one of several ways:

1. Clean checkout:

$ cvs co tikiwiki

The 'tikiwiki' module actually represents the 'tiki', '_adodb' and '_smarty' modules. Here's the CVSROOT/modules file:

tiki tiki
_adodb _adodb
adodb -d lib/adodb _adodb
_smarty _smarty
smarty -d lib/smarty _smarty
tikiwiki tiki &adodb &smarty

This tell us there are three "real" modules: tiki, _smarty and _adodb. The 'adodb' and 'smarty' modules will checkout the _adodb and _smarty modules into their respective directories, lib/adodb and lib/smarty.

The 'tikiwiki' module will checkout:

  1. The tiki module into the tikiwiki directory (or whatever directory you specify with -d),
  2. The _adodb module into the lib/adodb directory.
  3. The _smarty module into the lib/smarty directory.



2. Update of existing code:

$ cd tiki
$ cvs co adodb
$ cvs co smarty

This also checks out the _adodb and _smarty module into their respective directories, lib/adodb and lib/smarty.

3. Update of existing code (alternate method):

(for me this doesn't work. redflo)
$ cd tiki
$ cvs co -d lib/adodb _adodb
$ cvs co -d lib/smarty _smarty

Same as 2. above. Shown as an example only. 2. is obviously the preferred method.

4. Update of existing code (2nd alternate method):

$ cd tiki
$ cd lib
$ cvs co -d adodb _adodb
$ cvs co -d smarty _smarty

Same as 2. above. Shown as an example only. 2. is obviously the preferred method.

Remember to set your ENV variables correctly:
export CVS_RSH=ssh
export CVSROOT=:ext:youraccount@cvs.sourceforge.net:/cvsroot/tikiwiki

For more information, see CvsForDevelopers.

You can also submit patches here:
http://sourceforge.net/tracker/?group_id=64258&atid=506848

Why have the adodb code as a separate module?


Well, whenever a new version of adodb is released, we can simply:

wget http://phplens.com/lens/dl/adodb370.tgz
tar xzvf adodb370.tgz
cd adodb
cvs import -I ! -m 'Import of adodb 3.70' _adodb PHPLENS_COM R3_70

Which I just did a few minutes ago as it now includes support for sqllite.

I am very interested to see if we can begin supporting sqllite, which is included by default in PHP 5.

-Ross


Help with the conversion to ADOdb


Hi Team,

I just added the changes to make tiki independent of mysql. We also have
switched from PEAR to adodb. Some things you all have to do now:

You all can help to rewrite the SQL queries. We use bind variables now.
Therefore we don't need to do addslashes before inserting data into the
DB. Instead of the values, please set a "?" as placeholder in the SQL
query. The bind variables are passed via a array to the
tikilib->query and tikilib->GetOne.
Next, we need to quote all identifiers with backquotes: ` . Everybody
can help: take a file in the lib/* dirs and look for SQL queries and
rewrite them. Example:

$user=addslashes($user);
$query = "select value from tiki_user_preferences where prefName=$name and user=$user";
$result = $this->query($query);


should be rewritten to:

$query = "select `value` from `tiki_user_preferences` where `prefName`=? and `user`=?";
$result = $this->query($query,array($name,$user));


Next: the "limit $offset,$numrows" in SQL queries should be deleted and
passed as parameters to the tikilib->query function. Example:

$query = "select value,prefName from tiki_user_preferences limit $offset, $numrows";
$result = $this->query($query);

should be rewritten to:

$query = "select value,prefName from tiki_user_preferences";
$result = $this->query($query,array(),$numrows,$offset);


And what you can do else: install other DB servers like postgres, Oracle,
MSSQL, Sybase, ... and test!

That's all for now,

Flo


Page last modified on Thursday 01 April 2004 12:36:11 GMT-0000

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.