Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU General Public |
|
18 |
// | You should have received a copy of the GNU General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: document.class.php,v 1.4 2005-09-28 16:29:39 ddelon Exp $
|
22 |
// CVS : $Id: document.class.php,v 1.5 2006-01-18 10:52:03 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Application projet
|
24 |
* Application projet
|
25 |
*
|
25 |
*
|
26 |
* La classe document
|
26 |
* La classe document
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@author Aucun
|
32 |
*@author Aucun
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.4 $
|
34 |
*@version $Revision: 1.5 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
Line 558... |
Line 558... |
558 |
* @param int nombre Le nombre de document à renvoyer
|
558 |
* @param int nombre Le nombre de document à renvoyer
|
559 |
* @return Array
|
559 |
* @return Array
|
560 |
* @static
|
560 |
* @static
|
561 |
* @access public
|
561 |
* @access public
|
562 |
*/
|
562 |
*/
|
563 |
function getDocumentsRecents( $nombre = 10, &$objetDB, $chemin, $chemin_icones, $id_projet = '' )
|
563 |
function getDocumentsRecents( $nombre = 10, &$objetDB, $chemin, $chemin_icones, $id_projet = '', $visible = true)
|
564 |
{
|
564 |
{
|
565 |
// on recherche les documents, hors répertoire
|
565 |
// on recherche les documents, hors répertoire
|
566 |
$requete = 'select pd_id from projet_documents where pd_ce_type<>0 ';
|
566 |
$requete = 'select pd_id from projet_documents where pd_ce_type<>0 ';
|
567 |
if ($id_projet != '') $requete .= ' and pd_ce_projet='.$id_projet.' ';
|
567 |
if ($id_projet != '') $requete .= ' and pd_ce_projet='.$id_projet.' ';
|
- |
|
568 |
if (!$visible) $requete .= ' and pd_visibilite="public" ';
|
568 |
$requete .= 'order by pd_date_de_mise_a_jour desc limit 0,'.$nombre ;
|
569 |
$requete .= 'order by pd_date_de_mise_a_jour desc limit 0,'.$nombre ;
|
569 |
$resultat = $objetDB->query ($requete) ;
|
570 |
$resultat = $objetDB->query ($requete) ;
|
570 |
if (DB::isError ($resultat)) {
|
571 |
if (DB::isError ($resultat)) {
|
571 |
die ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ;
|
572 |
die ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ;
|
572 |
}
|
573 |
}
|