Show
Ignore:
Timestamp:
07/09/06 15:40:22 (3 years ago)
Author:
michiel
Message:

rewrote functions_blog.php to class in mvblog.php
Made the whole thing 'short_open_tags = Off' compatible

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/class-rewrite/common/rss.php

    r154 r188  
    1 <? 
     1<?php 
    22/* 
    33 * MvBlog -- An open source no-noncence blogtool 
     
    1616 * at the top of the source tree. 
    1717 */ 
    18 require("functions_blog.php"); 
     18require("mvblog.php"); 
     19$mvblog = new MvBlog(); 
    1920//get all the authors in an array 
    20 $res =& $db->query("SELECT * FROM authors"); 
     21$res =& $mvblog->db->query("SELECT * FROM authors"); 
    2122 
    2223if (PEAR::isError($res)) { 
     
    2728        $authors[$row["id"]]["fullname"] = $row["fullname"]; 
    2829        $authors[$row["id"]]["email"]    = $row["email"]; 
    29 } 
    30 //same with categories 
    31 $res =& $db->query("SELECT * FROM categories"); 
    32  
    33 if (PEAR::isError($res)) { 
    34         die($res->getMessage()); 
    35 } 
    36  
    37 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) { 
    38         $categories[$row["id"]] = $row["name"]; 
    3930} 
    4031 
     
    5546        $comments = false; 
    5647} 
    57 $res =& $db->limitQuery($sql, 0, 20); 
     48$res =& $mvblog->db->limitQuery($sql, 0, 20); 
    5849 
    5950if (PEAR::isError($res)) { 
     
    8273        } else { 
    8374                echo "\t\t\t<link>".$url."index.php?action=view&amp;id=".$row["id"]."$link</link>\n"; 
    84                 echo "\t\t\t<category>".$categories[$row["categories_id"]]."</category>\n"; 
     75                echo "\t\t\t<category>".$mvblog->categories[$row["categories_id"]]."</category>\n"; 
    8576                echo "\t\t\t<guid isPermaLink=\"true\">".$url."index.php?action=view&amp;id=".$row["id"]."$link</guid>\n"; 
    8677                if (!$comments) { 
     
    8980                } 
    9081        } 
    91         echo "\t\t\t<description>".strip_bbcode(strip_tags(str_replace("##BREAKPOINT##", "", stripslashes($row["body"]))))."</description>\n"; 
     82        echo "\t\t\t<description>".$mvblog->strip_bbcode(strip_tags(str_replace("##BREAKPOINT##", "", stripslashes($row["body"]))))."</description>\n"; 
    9283        echo "\t\t\t<pubDate>".date("r", $row["date"])."</pubDate>\n"; 
    9384