par
katagoto » 26 févr. 2009, 08:32
Pas de problème (j'ai mis toute la liste là) :
/libs/sujet.class.php:271: Warning: argument 'integer' of command @param is not found in the argument list of sujet::change_grade($pk_sujet,$grade)
/libs/sujet.class.php:271: Warning: argument 'integer' of command @param is not found in the argument list of sujet::change_grade($pk_sujet,$grade)
/libs/sujet.class.php:271: Warning: The following parameters of sujet::change_grade($pk_sujet,$grade) are not documented:
parameter 'pk_sujet'
parameter 'grade'
/libs/sujet.class.php:239: Warning: argument 'integer' of command @param is not found in the argument list of sujet::deplace($pk_sujet,$fk_forum)
/libs/sujet.class.php:239: Warning: argument 'integer' of command @param is not found in the argument list of sujet::deplace($pk_sujet,$fk_forum)
/libs/sujet.class.php:239: Warning: The following parameters of sujet::deplace($pk_sujet,$fk_forum) are not documented:
parameter 'pk_sujet'
parameter 'fk_forum'
/libs/sujet.class.php:101: Warning: argument 'integer' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: argument 'string' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: argument 'string' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: argument 'string' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: The following parameters of sujet::edite($pk_sujet,$titre,$sous_titre,$message) are not documented:
parameter 'pk_sujet'
parameter 'titre'
parameter 'sous_titre'
parameter 'message'
/libs/sujet.class.php:215: Warning: argument 'integer' of command @param is not found in the argument list of sujet::ferme($pk_sujet)
/libs/sujet.class.php:215: Warning: The following parameters of sujet::ferme($pk_sujet) are not documented:
parameter 'pk_sujet'
/libs/sujet.class.php:141: Warning: argument 'integer' of command @param is not found in the argument list of sujet::fils_arianne($pk_forum)
/libs/sujet.class.php:141: Warning: The following parameters of sujet::fils_arianne($pk_forum) are not documented:
parameter 'pk_forum'
/libs/sujet.class.php:55: Warning: argument 'integer' of command @param is not found in the argument list of sujet::liste($fk_forum,$debut,$nombre)
/libs/sujet.class.php:55: Warning: argument 'integer' of command @param is not found in the argument list of sujet::liste($fk_forum,$debut,$nombre)
/libs/sujet.class.php:55: Warning: argument 'integer' of command @param is not found in the argument list of sujet::liste($fk_forum,$debut,$nombre)
/libs/sujet.class.php:55: Warning: The following parameters of sujet::liste($fk_forum,$debut,$nombre) are not documented:
parameter 'fk_forum'
parameter 'debut'
parameter 'nombre'
/libs/sujet.class.php:11: Warning: argument 'integer' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'string' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'string' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'string' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'integer' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: The following parameters of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade) are not documented:
parameter 'fk_forum'
parameter 'titre'
parameter 'sous_titre'
parameter 'message'
parameter 'grade'
/libs/sujet.class.php:227: Warning: argument 'integer' of command @param is not found in the argument list of sujet::reouvre($pk_sujet)
/libs/sujet.class.php:227: WarnGenerating docs for compound TPDO...
<?php
/**
* Class de gestion des sujets
*
* @author Katagoto
*/
abstract class sujet
{
/**
* Ouvre un nouveau sujet
*
* @param integer $fk_forum id du forum
* @param string $titre titre du sujet
* @param string $sous_titre sous_titre du sujet
* @param string $message contenu du message
* @param integer $grade
* @return integer
*/
public static function nouveau($fk_forum, $titre, $sous_titre, $message, $grade)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_nouveau(
:fk_membre,
:date,
:titre,
:sous_titre,
:message,
:fk_forum,
:fk_communaute,
:droit,
:droit,
:grade);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':fk_membre' => (integer)$session->id,
':date' => (integer)time(),
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...'],
':fk_forum' => (integer)$fk_forum,
':titre' => Base::html($titre),
':sous_titre' => Base::html($sous_titre),
':message' => Base::html($message),
':grade' => (integer)($grade<3 && $grade>=0 ? $grade : 0)
))
->fetch(PDO::FETCH_OBJ)
->fk_sujet;
}
/**
* Liste les sujets d'un forum
*
* @param integer $fk_forum id du forum
* @param integer $debut début de la lecture
* @param integer $nombre nombre de forums par page
* @return array
*/
public static function liste($fk_forum, $debut, $nombre)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
forum_r_sujets.*,
forum_r_messages.date_post,
reponse.pseudo AS pseudo_dernier_posteur,
maitre.pseudo AS pseudo_maitre_sujet
lecture_r_forums_com.dernier_lu,
lecture_r_forums_com.poste
FROM
forum_r_sujets,
forum_r_messages,
membre_t_membre AS reponse,
membre_t_membre AS maitre
LEFT OUTER JOIN
lecture_r_forums_com
ON(lecture_r_forums_com.fk_entite=forum_r_sujets.pk_sujet
AND lecture_r_forums_com.fk_membre=:fk_membre)
WHERE
forum_r_sujets.fk_forum=:fk_forum
AND forum_r_sujets.etat<2
AND forum_r_messages.pk_message=forum_r_sujets.dernier_message
AND reponse.pk_membre=forum_r_messages.fk_membre
AND maitre.pk_membre=forum_r_sujets.fk_membre
ORDER BY forum_r_sujets.grade, forum_r_sujets.date_post
LIMIT '.(integer)$debut.' OFFSET '.(integer)$nombre)
->execute(array(
':fk_forum' => (integer)$fk_forum,
':fk_membre' => (integer)$session->id,
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...']
))
->fetchAll();
}
/**
* Edite un sujet
*
* @param integer $pk_sujet id du sujet
* @param string $titre titre du sujet
* @param string $sous_titre sous titre du sujet
* @param string $message nouveau message
* @return boolean
*/
public static function edite($pk_sujet, $titre, $sous_titre, $message)
{
global $connexion, $session, $droit;
return $connexion ->prepare(' SELECT
sujet_edite(
:pk_sujet,
:fk_membre,
:fk_group,
:date,
:titre
:sous_titre,
:message
:droit,
:droit);')
->execute(array(
':fk_forum' => (integer)$fk_forum,
':fk_membre' => (integer)$session->id,
':fk_group' => (integer)PK_GROUP,
':date' => (integer)time(),
':titre' => Base::html($titre),
':sous_titre' => Base::html($sous_titre),
':message' => Base::html($message),
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...']
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
/**
* Retourne le fils d'arriane d'un forum
*
* @param integer $pk_forum id du forum
* @return array
*/
public static function fils_arianne($pk_forum)
{
global $connexion, $droit;
return $connexion ->prepare(' SELECT
forum_r_forums.nom AS forum_nom,
forum_r_forums.pk_forum AS forum_id,
forum_r_categorie.nom AS categorie_nom,
forum_r_categorie.pk_categorie AS categorie_id
FROM
forum_r_forums,
forum_r_categorie
WHERE
forum_r_forums.pk_forum=:pk_forum
AND forum_r_forums.etat=1
AND forum_r_categorie.pk_categorie=forum_r_forums.fk_categorie
AND forum_r_forums.etat=1
AND forum_r_forums.grade<=:droit;
')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':pk_forum' => (integer)$pk_forum,
':droit' => $droit['...']
))
->fetch(PDO::FETCH_ASSOC);
}
/**
* Change l'état d'un sujet
*
* @param integer $pk_sujet id du sujet à fermer
* @param integer $etat nouvel etat du sujet
* @return boolean
*/
private static function change_etat($pk_sujet, $etat)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_ferme(
:pk_sujet,
:fk_group,
:etat
:droit,
:droit);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...'],
':etat' => (integer)$etat
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
/**
* Supprime un sujet (le ferme et la rend invisible)
*
* @param integer $pk_sujet id du sujet
* @return boolean
*/
public static function supprime($pk_sujet)
{
return self::change_etat((integer)$pk_sujet, 2);
}
/**
* Ferme un sujet
*
* @param integer $pk_sujet
* @return boolean
*/
public static function ferme($pk_sujet)
{
return self::change_etat((integer)$pk_sujet, 0);
}
/**
* Réouvre un sujet
*
* @param integer $pk_sujet
* @return boolean
*/
public static function reouvre($pk_sujet)
{
return self::change_etat((integer)$pk_sujet, 1);
}
/**
* Déplace un sujet dans un autre forum
*
* @param integer $pk_sujet
* @param integer $fk_forum
* @return boolean
*/
public static function deplace($pk_sujet, $fk_forum)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_deplace(
:pk_sujet,
:fk_forum,
:fk_group,
:droit,
:droit);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...'],
':pk_sujet' => (integer)$pk_sujet,
':fk_forum' => (integer)$fk_forum
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
/**
* Change le grade d'un sujet (annonce, post-it, normal)
*
* @param integer $pk_sujet id su sujet
* @param integer $grade nouveau grade
* @return boolean
*/
public static function change_grade($pk_sujet, $grade)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_change_grade(
:pk_sujet,
:grade,
:fk_group,
:droit,
:droit);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':pk_sujet' => (integer)$pk_sujet,
':grade' => (integer)($grade<3 && $grade>=0 ? $grade : 0),
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...']
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
}
Voilà
Pas de problème (j'ai mis toute la liste là) :
[quote]/libs/sujet.class.php:271: Warning: argument 'integer' of command @param is not found in the argument list of sujet::change_grade($pk_sujet,$grade)
/libs/sujet.class.php:271: Warning: argument 'integer' of command @param is not found in the argument list of sujet::change_grade($pk_sujet,$grade)
/libs/sujet.class.php:271: Warning: The following parameters of sujet::change_grade($pk_sujet,$grade) are not documented:
parameter 'pk_sujet'
parameter 'grade'
/libs/sujet.class.php:239: Warning: argument 'integer' of command @param is not found in the argument list of sujet::deplace($pk_sujet,$fk_forum)
/libs/sujet.class.php:239: Warning: argument 'integer' of command @param is not found in the argument list of sujet::deplace($pk_sujet,$fk_forum)
/libs/sujet.class.php:239: Warning: The following parameters of sujet::deplace($pk_sujet,$fk_forum) are not documented:
parameter 'pk_sujet'
parameter 'fk_forum'
/libs/sujet.class.php:101: Warning: argument 'integer' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: argument 'string' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: argument 'string' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: argument 'string' of command @param is not found in the argument list of sujet::edite($pk_sujet,$titre,$sous_titre,$message)
/libs/sujet.class.php:101: Warning: The following parameters of sujet::edite($pk_sujet,$titre,$sous_titre,$message) are not documented:
parameter 'pk_sujet'
parameter 'titre'
parameter 'sous_titre'
parameter 'message'
/libs/sujet.class.php:215: Warning: argument 'integer' of command @param is not found in the argument list of sujet::ferme($pk_sujet)
/libs/sujet.class.php:215: Warning: The following parameters of sujet::ferme($pk_sujet) are not documented:
parameter 'pk_sujet'
/libs/sujet.class.php:141: Warning: argument 'integer' of command @param is not found in the argument list of sujet::fils_arianne($pk_forum)
/libs/sujet.class.php:141: Warning: The following parameters of sujet::fils_arianne($pk_forum) are not documented:
parameter 'pk_forum'
/libs/sujet.class.php:55: Warning: argument 'integer' of command @param is not found in the argument list of sujet::liste($fk_forum,$debut,$nombre)
/libs/sujet.class.php:55: Warning: argument 'integer' of command @param is not found in the argument list of sujet::liste($fk_forum,$debut,$nombre)
/libs/sujet.class.php:55: Warning: argument 'integer' of command @param is not found in the argument list of sujet::liste($fk_forum,$debut,$nombre)
/libs/sujet.class.php:55: Warning: The following parameters of sujet::liste($fk_forum,$debut,$nombre) are not documented:
parameter 'fk_forum'
parameter 'debut'
parameter 'nombre'
/libs/sujet.class.php:11: Warning: argument 'integer' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'string' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'string' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'string' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: argument 'integer' of command @param is not found in the argument list of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade)
/libs/sujet.class.php:11: Warning: The following parameters of sujet::nouveau($fk_forum,$titre,$sous_titre,$message,$grade) are not documented:
parameter 'fk_forum'
parameter 'titre'
parameter 'sous_titre'
parameter 'message'
parameter 'grade'
/libs/sujet.class.php:227: Warning: argument 'integer' of command @param is not found in the argument list of sujet::reouvre($pk_sujet)
/libs/sujet.class.php:227: WarnGenerating docs for compound TPDO...[/quote]
[php]<?php
/**
* Class de gestion des sujets
*
* @author Katagoto
*/
abstract class sujet
{
/**
* Ouvre un nouveau sujet
*
* @param integer $fk_forum id du forum
* @param string $titre titre du sujet
* @param string $sous_titre sous_titre du sujet
* @param string $message contenu du message
* @param integer $grade
* @return integer
*/
public static function nouveau($fk_forum, $titre, $sous_titre, $message, $grade)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_nouveau(
:fk_membre,
:date,
:titre,
:sous_titre,
:message,
:fk_forum,
:fk_communaute,
:droit,
:droit,
:grade);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':fk_membre' => (integer)$session->id,
':date' => (integer)time(),
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...'],
':fk_forum' => (integer)$fk_forum,
':titre' => Base::html($titre),
':sous_titre' => Base::html($sous_titre),
':message' => Base::html($message),
':grade' => (integer)($grade<3 && $grade>=0 ? $grade : 0)
))
->fetch(PDO::FETCH_OBJ)
->fk_sujet;
}
/**
* Liste les sujets d'un forum
*
* @param integer $fk_forum id du forum
* @param integer $debut début de la lecture
* @param integer $nombre nombre de forums par page
* @return array
*/
public static function liste($fk_forum, $debut, $nombre)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
forum_r_sujets.*,
forum_r_messages.date_post,
reponse.pseudo AS pseudo_dernier_posteur,
maitre.pseudo AS pseudo_maitre_sujet
lecture_r_forums_com.dernier_lu,
lecture_r_forums_com.poste
FROM
forum_r_sujets,
forum_r_messages,
membre_t_membre AS reponse,
membre_t_membre AS maitre
LEFT OUTER JOIN
lecture_r_forums_com
ON(lecture_r_forums_com.fk_entite=forum_r_sujets.pk_sujet
AND lecture_r_forums_com.fk_membre=:fk_membre)
WHERE
forum_r_sujets.fk_forum=:fk_forum
AND forum_r_sujets.etat<2
AND forum_r_messages.pk_message=forum_r_sujets.dernier_message
AND reponse.pk_membre=forum_r_messages.fk_membre
AND maitre.pk_membre=forum_r_sujets.fk_membre
ORDER BY forum_r_sujets.grade, forum_r_sujets.date_post
LIMIT '.(integer)$debut.' OFFSET '.(integer)$nombre)
->execute(array(
':fk_forum' => (integer)$fk_forum,
':fk_membre' => (integer)$session->id,
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...']
))
->fetchAll();
}
/**
* Edite un sujet
*
* @param integer $pk_sujet id du sujet
* @param string $titre titre du sujet
* @param string $sous_titre sous titre du sujet
* @param string $message nouveau message
* @return boolean
*/
public static function edite($pk_sujet, $titre, $sous_titre, $message)
{
global $connexion, $session, $droit;
return $connexion ->prepare(' SELECT
sujet_edite(
:pk_sujet,
:fk_membre,
:fk_group,
:date,
:titre
:sous_titre,
:message
:droit,
:droit);')
->execute(array(
':fk_forum' => (integer)$fk_forum,
':fk_membre' => (integer)$session->id,
':fk_group' => (integer)PK_GROUP,
':date' => (integer)time(),
':titre' => Base::html($titre),
':sous_titre' => Base::html($sous_titre),
':message' => Base::html($message),
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...']
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
/**
* Retourne le fils d'arriane d'un forum
*
* @param integer $pk_forum id du forum
* @return array
*/
public static function fils_arianne($pk_forum)
{
global $connexion, $droit;
return $connexion ->prepare(' SELECT
forum_r_forums.nom AS forum_nom,
forum_r_forums.pk_forum AS forum_id,
forum_r_categorie.nom AS categorie_nom,
forum_r_categorie.pk_categorie AS categorie_id
FROM
forum_r_forums,
forum_r_categorie
WHERE
forum_r_forums.pk_forum=:pk_forum
AND forum_r_forums.etat=1
AND forum_r_categorie.pk_categorie=forum_r_forums.fk_categorie
AND forum_r_forums.etat=1
AND forum_r_forums.grade<=:droit;
')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':pk_forum' => (integer)$pk_forum,
':droit' => $droit['...']
))
->fetch(PDO::FETCH_ASSOC);
}
/**
* Change l'état d'un sujet
*
* @param integer $pk_sujet id du sujet à fermer
* @param integer $etat nouvel etat du sujet
* @return boolean
*/
private static function change_etat($pk_sujet, $etat)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_ferme(
:pk_sujet,
:fk_group,
:etat
:droit,
:droit);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...'],
':etat' => (integer)$etat
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
/**
* Supprime un sujet (le ferme et la rend invisible)
*
* @param integer $pk_sujet id du sujet
* @return boolean
*/
public static function supprime($pk_sujet)
{
return self::change_etat((integer)$pk_sujet, 2);
}
/**
* Ferme un sujet
*
* @param integer $pk_sujet
* @return boolean
*/
public static function ferme($pk_sujet)
{
return self::change_etat((integer)$pk_sujet, 0);
}
/**
* Réouvre un sujet
*
* @param integer $pk_sujet
* @return boolean
*/
public static function reouvre($pk_sujet)
{
return self::change_etat((integer)$pk_sujet, 1);
}
/**
* Déplace un sujet dans un autre forum
*
* @param integer $pk_sujet
* @param integer $fk_forum
* @return boolean
*/
public static function deplace($pk_sujet, $fk_forum)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_deplace(
:pk_sujet,
:fk_forum,
:fk_group,
:droit,
:droit);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...'],
':pk_sujet' => (integer)$pk_sujet,
':fk_forum' => (integer)$fk_forum
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
/**
* Change le grade d'un sujet (annonce, post-it, normal)
*
* @param integer $pk_sujet id su sujet
* @param integer $grade nouveau grade
* @return boolean
*/
public static function change_grade($pk_sujet, $grade)
{
global $session, $connexion, $droit;
return $connexion ->prepare(' SELECT
sujet_change_grade(
:pk_sujet,
:grade,
:fk_group,
:droit,
:droit);')
->execute(array(
':fk_group' => (integer)PK_GROUP,
':pk_sujet' => (integer)$pk_sujet,
':grade' => (integer)($grade<3 && $grade>=0 ? $grade : 0),
':droit' => (integer)$droit['...'],
':droit' => (integer)$droit['...']
))
->fetch(PDO::FETCH_OBJ)
->retour;
}
}[/php]
Voilà