[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #16 from Chad H.   2009-07-18 16:29:51 
UTC ---
* JS file should be as an external file, use addScriptFile().
* Use consistent function casing (addHTML vs AddHTML)
* Use XML functions rather than building all HTML by hand


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621


Al Maghi  changed:

   What|Removed |Added

Attachment #6334 is|0   |1
   obsolete||




--- Comment #15 from Al Maghi   2009-07-16 17:11:00 UTC 
---
Created an attachment (id=6345)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6345)
parent class in constructor


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621


Al Maghi  changed:

   What|Removed |Added

Attachment #6331 is|0   |1
   obsolete||
Attachment #6332 is|0   |1
   obsolete||




--- Comment #14 from Al Maghi   2009-07-14 23:14:45 UTC 
---
Created an attachment (id=6334)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6334)
use addQuotes instead of strencode, plus other improvements thks to Roan.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #13 from Al Maghi   2009-07-14 19:33:09 UTC 
---
Created an attachment (id=6332)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6332)
Alternative patch: further improvement with namespaceSelector

(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > why not use the namespace selector in the XML class?
> > 
> > Because I didn't need statistics on other namespaces. 
> > 
> 
> You may not, but while you're patching you might as well go for the better
> implementation and it'll be more helpful to everybody :)
> 
There is a patch using nsSelector... That alternative patch can be cleaned up.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #12 from Chad H.   2009-07-14 15:29:40 
UTC ---
(In reply to comment #11)
> (In reply to comment #10)
> > why not use the namespace selector in the XML class?
> 
> Because I didn't need statistics on other namespaces. 
> 

You may not, but while you're patching you might as well go for the better
implementation and it'll be more helpful to everybody :)

> This could be an improvement, could you submit a patch or detail how
> namespace-selector looks like?
> 

Check out the Xml::namespaceSelector() method.

> To patch, we should keep in mind that we need a "all NS" value in selection.
> 

namespaceSelector() could use a generic way to do this, which it doesn't
currently do. Might be worth patching that in too.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #11 from Al Maghi   2009-07-14 15:22:03 UTC 
---
(In reply to comment #10)
> why not use the namespace selector in the XML class?

Because I didn't need statistics on other namespaces. 

This could be an improvement, could you submit a patch or detail how
namespace-selector looks like?

To patch, we should keep in mind that we need a "all NS" value in selection.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621


Chad H.  changed:

   What|Removed |Added

 CC||innocentkil...@gmail.com




--- Comment #10 from Chad H.   2009-07-14 15:14:01 
UTC ---
IMHO, rather than hard-coding this to be "all NS or NS-0 only", why not use the
namespace selector in the XML class? It's already designed for this and handles
all namespaces.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621


Al Maghi  changed:

   What|Removed |Added

Attachment #6329 is|0   |1
   obsolete||
Attachment #6330 is|0   |1
   obsolete||




--- Comment #9 from Al Maghi   2009-07-14 15:11:37 UTC 
---
Created an attachment (id=6331)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6331)
Patch extension and extension messages. Correction thks to Roan


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #8 from Roan Kattouw   2009-07-14 14:43:26 
UTC ---
(In reply to comment #7)
> Created an attachment (id=6330)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6330) [details]
> alternative with addition of a message to inform users
> 

These patches are still ugly as they pass >= or = as part of the namespace
parameter. Instead, you should make the namespace parameter default to null and
not set the page_namespace part of the query if it's null. If a namespace was
selected, you should just pass the number, without the = sign.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #7 from Al Maghi   2009-07-14 14:37:07 UTC 
---
Created an attachment (id=6330)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6330)
alternative with addition of a message to inform users


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621


Al Maghi  changed:

   What|Removed |Added

Attachment #6315 is|0   |1
   obsolete||




--- Comment #6 from Al Maghi   2009-07-14 14:19:17 UTC 
---
Created an attachment (id=6329)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6329)
Patch corrected with no SQL through form fields

Correction thanks to Roan.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621





--- Comment #5 from Roan Kattouw   2009-07-14 13:08:49 
UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > That shouldn't work. If it does, that's an SQL injection vulnerability.
> > 
> 
> Is it not rather a selection than an injection; indeed that query does not
> change the DB:
> 
> 'SELECT ... FROM ... WHERE rev_page=page_id AND page_namespace=0 AND
> page_is_redirect=0'
> 

I don't think you understand. It should not be possible to inject SQL through
form fields EVER, or someone will find a way to exploit it. To fix this, you
should use "AND page_namespace " . $db->addQuotes( $ns )


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 19621] Add-on to Extension:Usage_Statistics: statistics per namespace

2009-07-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=19621


Al Maghi  changed:

   What|Removed |Added

Summary|Add-on: statistics per  |Add-on to
   |namespace   |Extension:Usage_Statistics:
   ||statistics per namespace




-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l