From: Jeff D. <da...@da...> - 2001-09-18 19:29:09
|
As those of you who are on the phpwiki-checkins mailing list are now painfully aware, I've just checked my latest hacks into the CVS repository (main branch). (I tagged the last pre-hack version of the code with the 'pre_jeffs_hacks2' tag.) Directions on how to access the CVS repository are available at: http://sourceforge.net/cvs/?group_id=6121 If you're going to 'cvs update' your source tree, remember to use the -d option ('cvs update -d') or you won't pick up the new subdirectories. For those of you not on phpwiki-checkins, here's the log message: Jeff's hacks II. This is a major change, to say the least. Some highlights: o Completely new database API. WARNING: all database schemas (currently MySQL, Postgres and DBA support is working) use completely revised schema, so you must start this new code with a new blank database... o WikiPlugins o New template engine. In addition, some more incremental changes: o Cascading Style Sheets reworked. o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page". o PhpWiki should now work with register_globals off. (Security issue.) o Edit preview button. (and probably more, which I'm forgetting about now.) Much of this code is still in a state of flux (particularly the new template engine code, and to a lesser extent the API for the plugins.) Feel free to play and hack on this, just be warned that some of it may still change quite a bit... See pgsrc/ReleaseNotes for a few more notes. And feel free to post questions or comments either publicly on <php...@li...>, or privately, to <da...@da...>. Jeff |
From: Reini U. <ru...@x-...> - 2001-09-18 20:20:51
|
Jeff Dairiki schrieb: > WARNING: all database schemas (currently MySQL, Postgres and DBA > support is working) use completely revised schema, so you must > start this new code with a new blank database... db_upgrade-1.3.sh or db_upgrade-1.3.php anyone? In a recent mysql upgrade for another e-commerce project I wrote a shell script which ran a mysql query which created a mysql query which updated the mysql db. I'll try to use this trick for PHPWIKI. Simplier than a php script. p2c_simplify: #!/bin/sh TEP_DB=catalog MYSQL_USER=rurban MYSQL_PASSWD= MYSQL_DATA=/var/mysql # create an update query on the fly. MYSQL_CMD="mysql -u$MYSQL_USER" if [ ! -z $MYSQL_PASSWD ]; then MYSQL_CMD="$MYSQL_CMD -p$MYSQL_PASSWD"; fi TMPFILE=$MYSQL_DATA/tmp.sql rm $TMPFILE ./tmp.sql $MYSQL_CMD $TEP_DB <p2c_simplify.sql mv $TMPFILE . $MYSQL_CMD $TEP_DB <tmp.sql p2c_simplify.sql: ## move essentially unsupported n:m products : categories into 1:n ## remove products_to_categories ## Usage: mysql db <p2c_simplify.sql ALTER TABLE products ADD COLUMN categories_id int(5) default '0' not null; ALTER TABLE products ADD INDEX categories_id (categories_id); ## hacking around stupid mysql limitations: ##UPDATE products AS p LEFT JOIN products_to_categories AS p2c USING (products_id) SET p.categories_id = p2c.categories_id; SELECT "UPDATE products SET categories_id=",p2c.categories_id," WHERE products_id=",p.products_id,";" INTO OUTFILE './tmp.sql' FROM products as p LEFT JOIN products_to_categories as p2c ON p.products_id = p2c.products_id; # Got the idea? -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Steve W. <sw...@pa...> - 2001-09-18 21:17:06
|
On Tue, 18 Sep 2001, Reini Urban wrote: > Jeff Dairiki schrieb: > > WARNING: all database schemas (currently MySQL, Postgres and DBA > > support is working) use completely revised schema, so you must > > start this new code with a new blank database... > > db_upgrade-1.3.sh or db_upgrade-1.3.php anyone? I would hope that we can still save the pages from any version of PhpWiki as a zip file, and use that to load the new version. In theory it works. :-) ~swain --- http://www.panix.com/~swain/ "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." -- Frank Zappa http://pgp.document_type.org:11371/pks/lookup?op=get&search=0xF7323BAC |
From: Jeff D. <da...@da...> - 2001-09-18 21:38:20
|
On Sep 18, 2001, Steve Wainstead said: > On Tue, 18 Sep 2001, Reini Urban wrote: > > db_upgrade-1.3.sh or db_upgrade-1.3.php anyone? > > I would hope that we can still save the pages from any version of PhpWiki > as a zip file, and use that to load the new version. In theory it works. > :-) Yes, this is what I would suggest. Currently the file/zip upload seems to broken --- I'm not sure why, I'll work on it right now. Loading a (server-local) file or zip-archive still works, AFAIK. Also, if you're loading up a virgin wiki, you can point WIKI_PGSRC (in index.php) to a zip dump of your previous wiki to initialize the new db to more-or-less an exact copy of the old one. Jeff |