#54 Extended renderldap function in class criteria

XOOPS_2.2
closed
5
2012-09-25
2004-08-31
pemen
No

extended function to run with 'IN' SQL operator and
others.

function renderLDAP(){
    if ($this->operator == '>') $this->operator = '>=';
    if ($this->operator == '<') $this->operator = '<=';

    if ($this->operator == '!=' || $this->operator ==

'<>')
{
$operator = '=';
$clause = "(!(" . $this->column . $operator .
$this->value . "))";
}
else
{
if ($this->operator == 'IN')
{
$newvalue = str_replace(array('(',')'),'',
$this->value);
$tab = explode(',',$newvalue);
foreach ($tab as $uid)
{
$clause .= '(' . $this->column . '=' . $uid
.')';
}
$clause = '(|' . $clause . ')';
}
else
$clause = "(" . $this->column .
$this->operator . $this->value . ")";
}
trigger_error('renderLDAP = '.$clause,
E_USER_NOTICE);
return $clause;
}

Discussion

  • pemen

    pemen - 2004-08-31

    criteria.php in class folder

     
  • Jan Pedersen

    Jan Pedersen - 2005-05-07

    Logged In: YES
    user_id=841117

    Added to 2.1 CVS

    I have no way of testing this, so please give feedback. Thanks

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks