1
ralf57
XoopsModuleHandler and $criteria
  • 2005/3/18 10:15

  • ralf57

  • Quite a regular

  • Posts: 231

  • Since: 2003/2/3 1


Hi all,
i'm trying to count all active modules which also have admin menu with this code:
$module_handler =& xoops_gethandler('module');
    
$criteria = new CriteriaCompo(new Criteria('isactive'1));
    
$criteria->add(new Criteria('hasadmin'1));
    
$criteria->add(new Criteria('mid''>1'));

    
$valid_mods =& $module_handler->getCount($criteria);

I also need to exclude the "system" module so,as you may see,
i've added another line:
$criteria->add(new Criteria('mid''>1'));

but it doesn't work.
Where is the error?
Thanks in advance,ralf.

2
zoullou
Re: XoopsModuleHandler and $criteria
  • 2005/3/18 10:30

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Try with this code
$criteria->add(new Criteria('mid''1''>'));

3
ralf57
Re: XoopsModuleHandler and $criteria
  • 2005/3/18 14:14

  • ralf57

  • Quite a regular

  • Posts: 231

  • Since: 2003/2/3 1


Thank you zoullou,
your code works fine.

Login

Who's Online

151 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 151


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits