[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 // Base class for Forum business persistence abstraction. 20 // 21 22 if (defined("_BD_FORUMMYSQL")) 23 return; 24 25 define("_BD_FORUMMYSQL", "1"); 26 27 require_once dirname(__FILE__). "/../forum.php"; 28 29 /** 30 * BD_forum_mysql is an implementation for MySQL of BD_forum business class. 31 * @package BD_mysql 32 * @author Yannick Lepetit 33 * @access public 34 */ 35 class BD_forum_mssql extends BD_forum { 36 37 // {{{ getAllEmptyMessagesForStatut($statut) 38 39 function &getAllEmptyMessagesForStatut ($statut) { 40 $forums = array(); 41 $db = &$this->_getDB(); 42 43 if (DB::isError($db)) { 44 return PEAR::raiseError( 45 "[" . get_class($this). " DB_forum : getAllEmptyMessagesForStatut()] " . $db->getMessage(). "", 46 null, 47 null, 48 null, 49 null, 50 null, 51 false); 52 } 53 54 $query 55 = "SELECT * FROM " . $GLOBALS['table_prefix']. "_forum WHERE statut='$statut' AND DATALENGTH(`texte`) <= 0"; 56 57 $queryResult = $db->query($query); 58 59 if (DB::isError($queryResult)) { 60 return PEAR::raiseError( 61 "[" . get_class( 62 $this). " DB_forum : getAllEmptyMessagesForStatut()] " . $queryResult->getMessage(). "", 63 null, 64 null, 65 null, 66 null, 67 null, 68 false); 69 } 70 71 while ($row = $queryResult->fetchRow()) { 72 $resultForum = &BD_forum::factory($this->getDbParameters(), $this->getDbOptions()); 73 74 $maDate = new Date($row['maj']); 75 $row['maj'] = $maDate->getDate(DATE_FORMAT_TIMESTAMP); 76 77 $resultForum->_fetchData($row); 78 $forums[] = &$resultForum; 79 } 80 81 $queryResult->free(); 82 return $forums; 83 } 84 85 // }}} 86 87 } 88 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |