Changeset 11701

Show
Ignore:
Timestamp:
08/23/07 17:08:26 (1 year ago)
Author:
bergie
Message:

Backport [11700]: Fix constraint usage in RSS feed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/net.nemein.wiki/handler/feed.php

    r11130 r11701  
    4242    { 
    4343        $qb = net_nemein_wiki_wikipage::new_query_builder(); 
    44         //$qb->add_constraint('topic.component', '=', 'net.nemein.wiki'); 
    45         $qb->add_constraint('topic', 'INTREE', $this->_topic->id); 
     44        $qb->add_constraint('topic.component', '=', $_MIDCOM->get_context_data(MIDCOM_CONTEXT_COMPONENT)); 
     45        $qb->add_constraint('topic.id', 'INTREE', $this->_topic->id); 
    4646        $qb->add_order('metadata.revised', 'DESC'); 
    4747        $qb->set_limit($this->_config->get('rss_count')); 
    48         $result = $qb->execute();         
     48        $result = $qb->execute(); 
    4949         
    5050        foreach ($result as $wikipage) 
  • branches/MidCOM_2_8/net.nemein.wiki/wikipage.php

    r11130 r11701  
    414414 
    415415    /** 
    416      * Links to other wiki pages tagged with arbitary tags 
     416     * Links to other wiki pages tagged with arbitrary tags 
    417417     */ 
    418418    function _replace_wikiwords_macro_tagged($macro_content, $fulltag, $after) 
     
    550550                    $folder = $wikipage_match['latest_parent']; 
    551551                } 
    552                  
    553                 if ($folder[MIDCOM_NAV_OBJECT]->can_do('midgard:create')) 
     552                                 
     553                if (   isset($folder[MIDCOM_NAV_OBJECT]) 
     554                    && $folder[MIDCOM_NAV_OBJECT]->can_do('midgard:create')) 
    554555                { 
    555556                    $wikilink = rawurlencode($wikilink); 
     
    713714            // Traverse the NAP tree upwards until we get the root-most wiki folder 
    714715            $folder = $nap->get_node($this->topic); 
     716             
    715717            $root_folder = $folder; 
    716718            $max = 100; 
     
    807809        } 
    808810         
     811        if (empty($folder)) 
     812        { 
     813            return null; 
     814        } 
     815         
    809816        // Check if the wikipage exists 
    810817        $qb = net_nemein_wiki_wikipage::new_query_builder();