6.0.0-alpha10
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
5/15/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8991] Check for active rules
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..__ .__ . ..___. |\ |[__)[__)| | _/ | \|| [__)|__|./__.
Comment
> We added some code to check if any rules are active: > > --- ingo-h3-1.2.3/lib/Storage.php 2009-07-24 10:57:03.000000000 +0200 > +++ /var/www/html/horde/ingo/lib/Storage.php 2010-03-09 > 11:30:49.000000000 +0100 > @@ -896,6 +896,21 @@ > } > > /** > + * Checks, if all rules are disabled. > + * > + * @return boolean True on success. > + */ > + function allRulesDisabled() > + { > + foreach ($this->_filters as $id => $rule) { > + if ($rule['disable'] == false) { > + return false; > + } > + } > + return true; > + } > + > + /** > * Searches for the first rule of a certain action type and returns its > * number. > * > > If all rules are disabled then we remove the script on the backend: > > --- ingo-h3-1.2.3/lib/Ingo.php 2008-12-15 03:33:08.000000000 +0100 > +++ /var/www/html/horde/ingo/lib/Ingo.php 2010-03-09 > 11:34:17.000000000 +0100 > @@ -153,6 +153,11 @@ > global $notification; > > $driver = Ingo::getDriver(); > + $filters = > &$GLOBALS['ingo_storage']->retrieve(INGO_STORAGE_ACTION_FILTERS); > + if ($filters->allRulesDisabled()) { > + $script = ''; > + $deactivate = true; > + } > $res = $driver->setScriptActive($script); > if (is_a($res, 'PEAR_Error')) { > $msg = ($deactivate) > > I appreciate your comment. > > Kind regards, > > René Plattner
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers