|
From: Jon O. <jon...@us...> - 2008-02-08 23:45:37
|
Update of /cvsroot/mxbb/mx_slash/includes/models In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16613 Modified Files: NewsModels.php Log Message: Removing trailing newlines... Index: NewsModels.php =================================================================== RCS file: /cvsroot/mxbb/mx_slash/includes/models/NewsModels.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NewsModels.php 30 Jan 2004 20:40:24 -0000 1.1 --- NewsModels.php 8 Feb 2008 23:45:33 -0000 1.2 *************** *** 14,29 **** $this->number_news = 0; $this->getNewsPosts($id, $start); ! ! } // end constructor ! function getNewsPosts($news_id = null, $start = null) { global $db, $board_config, $userdata; ! if (is_null($start)) { $start = 0; } ! $sql = 'SELECT t.*, p.*, pt.*, x.*, u.username, n.* --- 14,29 ---- $this->number_news = 0; $this->getNewsPosts($id, $start); ! ! } // end constructor ! function getNewsPosts($news_id = null, $start = null) { global $db, $board_config, $userdata; ! if (is_null($start)) { $start = 0; } ! $sql = 'SELECT t.*, p.*, pt.*, x.*, u.username, n.* *************** *** 55,63 **** message_die(GENERAL_ERROR, 'Could not query forum news information', '', __LINE__, __FILE__, $sql); } ! while ($row = $db->sql_fetchrow($result)) { $this->news_items[$this->number_news] = new NewsPost(); ! $this->news_items[$this->number_news]->news_image = $row['news_image']; $this->news_items[$this->number_news]->post_text = $row['post_text']; --- 55,63 ---- message_die(GENERAL_ERROR, 'Could not query forum news information', '', __LINE__, __FILE__, $sql); } ! while ($row = $db->sql_fetchrow($result)) { $this->news_items[$this->number_news] = new NewsPost(); ! $this->news_items[$this->number_news]->news_image = $row['news_image']; $this->news_items[$this->number_news]->post_text = $row['post_text']; *************** *** 77,83 **** $this->number_news++; } // end row loop ! } // end getNewsPost ! // this function initializes the objects with the news configuration // information --- 77,83 ---- $this->number_news++; } // end row loop ! } // end getNewsPost ! // this function initializes the objects with the news configuration // information *************** *** 85,89 **** { global $db; ! $sql = "SELECT * FROM " . NEWS_CONFIG_TABLE; --- 85,89 ---- { global $db; ! $sql = "SELECT * FROM " . NEWS_CONFIG_TABLE; *************** *** 92,96 **** message_die(CRITICAL_ERROR, "Could not query config information in news_config", "", __LINE__, __FILE__, $sql); } ! while( $row = $db->sql_fetchrow($result) ) { --- 92,96 ---- message_die(CRITICAL_ERROR, "Could not query config information in news_config", "", __LINE__, __FILE__, $sql); } ! while( $row = $db->sql_fetchrow($result) ) { *************** *** 99,106 **** $this->$news_config[$config_name] = $config_value; } ! } // end initConfig ! ! } --- 99,106 ---- $this->$news_config[$config_name] = $config_value; } ! } // end initConfig ! ! } *************** *** 108,116 **** { ! function TopicsModel() { ! } // end constructor ! function getTopics() { --- 108,116 ---- { ! function TopicsModel() { ! } // end constructor ! function getTopics() { *************** *** 178,184 **** return $cats; } ! ! } ! ?> --- 178,184 ---- return $cats; } ! ! } ! ?> \ No newline at end of file |