select * from -> we do not need

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Sonya

select * from -> we do not need

Post by Sonya »

While trying to solve an issue in this topic http://forum.cmsmadesimple.org/index.ph ... #msg106408 I have found some "select * from " queries in the core. Here is the list:

File class.contentoperations.inc.php

function GetDefaultPageId
replace select * from... with
select content_id from...

function GetPageIDFromAlias
replace select * from... with
select content_id from...

function CheckAliasError
replace select * from... with
select content_alias from...

File modtemplates.inc.php

function cms_module_ListTemplates
replace select * from... with
select template_name from...

function cms_module_GetTemplate
replace select * from... with
select content from...

I do not know if it is something that will be corrected in CMSMS 2.0. If yes just ignore :)
Last edited by Sonya on Tue May 13, 2008 2:09 pm, edited 1 time in total.
Pierre M.

Re: select * from -> we do not need

Post by Pierre M. »

It is somewhat difficult for the DevTeam to track issues/suggestions/patches in the forum. Please submit them in the forge instead.

BTW, thank you very much for this code review and the quality improvement suggestions.

Pierre M.
Sonya

Re: select * from -> we do not need

Post by Sonya »

Pierre M. wrote: It is somewhat difficult for the DevTeam to track issues/suggestions/patches in the forum. Please submit them in the forge instead.
Hello Pierre,

again I am not a developer and I have never developed in team so far  :-\ How do I commit the patch? Is it enough just to give link to this thread here? I do not really know what the developer needs to understand what I mean :) and to review the changes.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am
Location: Stuttgart / Germany

Re: select * from -> we do not need

Post by Wiedmann »

Pierre M. wrote:It is somewhat difficult for the DevTeam to track issues/suggestions/patches in the forum.
You know your (CMSMS) own rules about providing code to the core?:
a) Discuss your potential change with the project admin(s), or others in the forum or IRC channel
Of course, I tried that, and got many times no real helpfull answer. The question about "select *" I have also ask in the forge: no answer. Thus, why should anyone spend time in writing code/patches, if there is no real dialog? Just use freetime for writing code, putting it into the forge (tracker), and hoping someone is interested, you are using the way things are done in CMSMS or a dev have the knowledge to understand the problem, is IMHO not the correct course. (and a forum is a place for discussions)
Sonya wrote:How do I commit the patch?
a) you patch should be in standard diff format.

b) go to the projects trackers in the forge. There you can open a new bug or patch report and attach your diff to the report.
http://dev.cmsmadesimple.org/tracker/?group_id=6
Post Reply

Return to “Developers Discussion”