Thread:Project:Support desk/APCOND Errors. For user IP autopromote.

Hey I tried to do a test and check for making autopromote work for certain IP addresses and added the following to my localsettings.php file:

$wgAutopromote['reader'] = array( APCOND,_ISIP,'192.168.10.14'); $wgGroupPermissions['reader'] = true; $wgImplicitGroups[] = 'reader'; $wgGroupPermissions['*']['read'] = false; $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false;

When I tried to test it I got the following logs:

Internal error

Unrecognized condition APCOND for autopromotion!

Backtrace:


 * 1) 0 /usr/share/mediawiki/includes/Autopromote.php(77): Autopromote::checkCondition(Array, Object(User))
 * 2) 1 /usr/share/mediawiki/includes/Autopromote.php(18): Autopromote::recCheckCondition(Array, Object(User))
 * 3) 2 /usr/share/mediawiki/includes/User.php(2009): Autopromote::getAutopromoteGroups(Object(User))
 * 4) 3 /usr/share/mediawiki/includes/User.php(1975): User->getEffectiveGroups
 * 5) 4 /usr/share/mediawiki/includes/User.php(2125): User->getRights
 * 6) 5 [internal function]: User->isAllowed('read')
 * 7) 6 /usr/share/mediawiki/includes/StubObject.php(58): call_user_func_array(Array, Array)
 * 8) 7 /usr/share/mediawiki/includes/StubObject.php(184): StubObject->_call('isAllowed', Array)
 * 9) 8 /usr/share/mediawiki/includes/Title.php(1529): StubUser->__call('isAllowed', Array)
 * 10) 9 /usr/share/mediawiki/includes/Title.php(1529): StubUser->isAllowed('read')
 * 11) 10 /usr/share/mediawiki/includes/Wiki.php(151): Title->userCanRead
 * 12) 11 /usr/share/mediawiki/includes/Wiki.php(55): MediaWiki->preliminaryChecks(Object(Title), Object(OutputPage), Object(WebRequest))
 * 13) 12 /usr/share/mediawiki/index.php(116): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
 * 14) 13 {main}

Can anyone point me into the direction in where I am going wrong?

Thanks,

Alan