[pLog-svn] r2823 - plog/trunk/class/dao/userdata

Jon Daley plogworld at jon.limedaley.com
Fri Jan 20 02:21:57 GMT 2006


This looks wrong to me:
line 104 of baseuserdataprovider.class.php:
$owner .= " AND status = '".Db::qstr( $status )."'";

Seems to have extra quotes in it.


Also, in adminmainaction.class.php, it seems that blogs.class.php is not 
included?  So the BLOG_STATUS_ACTIVE on line 38 is treated as a string?

(I don't have a copy of 1.1 running so I can't debug it currently.

I don't see the include in adminaction.class.php either, though there is a 
long list of includes there, so maybe it gets included somewhere.

I would print out the value of $status in getUsersBlogs, and if it is 
'BLOG_STATUS_ACTIVE', print out a stack trace, to see where it is coming 
from.  I think the trace will be different depending on if it is '1' or 
'BLOG_STATUS_ACTIVE'?


On Fri, 20 Jan 2006, Mark Wu wrote:

> The same line.....
>
> The same program(script), the same input (BLOG_STATUS_ACTIVE) but generte
> two different results...
>
> For example, in the newPost page,
>
> When I echo the BLOG_STATUS_ACTIVE, it just show me 1, and the query (echo
> $owner variable) is  SELECT * FROM lt_blogs WHERE owner_id = 1 AND status =
> '1'
>
> But, in editPost page,
>
> When I echo the BLOG_STATUS_ACTIVE, it also show me 1, but the query (echo
> $owner variable) is  SELECT * FROM lt_blogs WHERE owner_id = 1 AND status =
> 'BLOG_STATUS_ACTIVE'
>
> That's why the blog selection does not show anything, because the $result of
> the sql statement is EMPTY...
>
> That's what I said "sometimes" ...
>
> Really weird..
>
> Mark
>> -----Original Message-----
>> From: plog-svn-bounces at devel.lifetype.net
>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
>> Sent: Friday, January 20, 2006 9:56 AM
>> To: plog-svn at devel.lifetype.net
>> Subject: RE: [pLog-svn] r2823 - plog/trunk/class/dao/userdata
>>
>> On Fri, 20 Jan 2006, Mark Wu wrote:
>>> I echo BLOG_STATUS_ACTIVE, it always show "1" without any
>> problems ...
>>>
>>> But, when I echo $owner (the squery statement), it show .....='1'
>>> sometimes and ......='BLOG_STATUS_ACTIVE' sometimes ...
>>
>>  	When you say "sometimes" do you mean on the same line,
>> or in different places in the file?
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

After your hands become coated with grease,
   your nose will begin to itch.
-- Lorenz's Law of Mechanical Repair


More information about the pLog-svn mailing list