Skip to content
Snippets Groups Projects
class.thread.php 31 KiB
Newer Older
  • Learn to ignore specific revisions
  • Peter Rotich's avatar
    Peter Rotich committed
    
            if($errors) return false;
    
            //TODO: use array_intersect_key  when we move to php 5 to extract just what we need.
            $vars['type'] = 'N';
            $vars['body'] = $vars['note'];
    
            return ThreadEntry::add($vars);
        }
    
        function lookup($id, $tid=0, $type='N') {
    
            return ($id
    
                    && is_numeric($id)
    
    Peter Rotich's avatar
    Peter Rotich committed
                    && ($n = new Note($id, $tid))
    
                    && $n->getId()==$id
                    )?$n:null;