Well, without really consulting anyone, I've decided to make a rather drastic change. (isn't being in charge fun?)
I've decided that CMSMS should work off of an adodb lite or adodb install downloaded without any tweaks. This is on that "things I should've done a year ago" list.
So, tonight I've modified the entire core and "core" modules to work with things that only come in a stock ADODB Lite install. It only comes down basically to 3 things...
1. Use RecordCount instead of RowCount. This is an adodb lite change. Not totally sure why they don't support it, but oh well.
2. DBTimeStamp() now returns time stamps with the single quotes around them. This is a huge deal, because you have to modify each SQL query that uses this thing accordingly. If you're using it in your Execute statement, then you have to either move it in the query string itself, or trim out the single quotes.
3. Datetime fields in your Install/Upgrade calls now have to be DT instead of T.
After i did all this work, I downloaded a stock adodb 4.90 from the net and changed config.php to use it. It didn't flinch, so I think I did an ok job.
I mainly did this for the people who are trying to marry other applications (namely gallery2) into CMSMS but have conflicts with a stock version and hacked version of the adodb libs. This should solve the problem from here on out.
I hope I didn't mess too many module devs up. This change WILL be in 1.0, so modify your modules accordingly.
Thanks!
Relatively Large Change
Re: Relatively Large Change
Someone has been very busy
Makes sense to me to use the standard version and it will save a whole heap of headaches down the line. So Ted pat yourself on the back and have a well earned beer....
Do we have a definative list for what it is in the next version and when? Will it be "1,0" or perhaps an RC!?? Perhaps with all these changes it might be better to do another beta?
1. I'm thinking about optimistic locking as we talked about earlier - to stop two people editing the same page, there was some code which needed to be re-worked.
2. A change to news to allow setting the source page for clean URL's. I know Elijah has been reworking the Album module to this effect, but I've yet to have a look at the his latest version,(I've been away.) but I hope to take a look tomorrow. (When I was palying with the piSearch module - I found it easiest to place this in the tag - but Elijah has gone for a much more sophisticated route.)
There were a few other things, but my time away from CMS has made me forget... I'm sure it will come back to me...
Russ
Makes sense to me to use the standard version and it will save a whole heap of headaches down the line. So Ted pat yourself on the back and have a well earned beer....
Do we have a definative list for what it is in the next version and when? Will it be "1,0" or perhaps an RC!?? Perhaps with all these changes it might be better to do another beta?
1. I'm thinking about optimistic locking as we talked about earlier - to stop two people editing the same page, there was some code which needed to be re-worked.
2. A change to news to allow setting the source page for clean URL's. I know Elijah has been reworking the Album module to this effect, but I've yet to have a look at the his latest version,(I've been away.) but I hope to take a look tomorrow. (When I was palying with the piSearch module - I found it easiest to place this in the tag - but Elijah has gone for a much more sophisticated route.)
There were a few other things, but my time away from CMS has made me forget... I'm sure it will come back to me...
Russ
Re: Relatively Large Change
Can you do a mass query through subversion to see what modules use any of the offending techniques?
Re: Relatively Large Change
I'm not really sure what is the use of adopting AdodB lite. I think the current version of CMS MS is ok now.
But if Ted really wants to push on this project, maybe I should start reading more topics about adodb lite too. ^^
btw, are you also planning to use pear framework for this changes?
But if Ted really wants to push on this project, maybe I should start reading more topics about adodb lite too. ^^
btw, are you also planning to use pear framework for this changes?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Relatively Large Change
In essence, pretty much every module does, some more, some less... HitCounter took me less than 10 minutes to convert.... others too up to an hour. but it wasn't a hard process.lemkepf wrote: Can you do a mass query through subversion to see what modules use any of the offending techniques?
In essence, most modules will need to be converted to be compatible with 1.0.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Relatively Large Change
To ensure timestamps work well on all CMSMS versions, from my modules I do:
Also note that DT only exists in the adodb_lite datadict, not in full/original adodb.
So, to ensure your module install/upgrade creates a DATETIME field on a CMSMS installation that uses config['use_adodb_lite'] = false; you'd have to do something like:
Code: Select all
$db = &$this->cms->GetDb();
$timestamp = $db->DBTimeStamp(time());
// add the single quotes if neccesary
$timestamp = (($timestamp[0] != "'") ? $timestamp : "'$timestamp'");
So, to ensure your module install/upgrade creates a DATETIME field on a CMSMS installation that uses config['use_adodb_lite'] = false; you'd have to do something like:
Code: Select all
$datetime = $gCms->config['use_adodb_lite'] ? 'DT' : 'T';
$flds = '
id I KEY,
date ' . $datetime . ' NOTNULL
';
Last edited by Anonymous on Wed Aug 16, 2006 3:29 am, edited 1 time in total.