本文整理汇总了PHP中Notification::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Notification::add方法的具体用法?PHP Notification::add怎么用?PHP Notification::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notification
的用法示例。
在下文中一共展示了Notification::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: login
public function login()
{
RoutingEngine::setPage("runnDAILY Login", "PV__400");
if (RoutingEngine::getInstance()->requirePermission("PV__300")) {
Notification::add("You are already logged in.");
Page::redirect("/");
}
}
示例2: addNotice
public function addNotice($replytouid, $logid, $info, $type = 'comment')
{
$data = array('uid' => $replytouid, 'content' => $info, 'new' => 1, 'type' => $type, 'cTime' => time(), 'from_id' => $logid, 'from_num' => 1);
if (Notification::add($data)) {
return true;
} else {
return false;
}
}
示例3: action_elevation_add_packed
public function action_elevation_add_packed()
{
if ($_FILES["packed_hdr"]) {
move_uploaded_file($_FILES["packed_hdr"]["tmp_name"], SYSTEM_ROOT . "/elev_packed.hdr");
}
if ($_FILES["packed_flt"]) {
move_uploaded_file($_FILES["packed_flt"]["tmp_name"], SYSTEM_ROOT . "/elev_packed.flt");
}
$region = array_safe($_POST, "region_name", "Elevation data");
Elevation::addElevationToDatabase(SYSTEM_ROOT . "/elev_packed", 1, $region);
unlink(SYSTEM_ROOT . "/elev_packed.hdr");
unlink(SYSTEM_ROOT . "/elev_packed.flt");
Notification::add("Elevation data has been added");
Page::redirect("/admin/elevation");
}
示例4: delete
function delete()
{
//check permissions
if (!isset($_POST["e_eid"])) {
Notification::add("Could not delete the event.");
Page::redirect("/events");
}
$event = new Event($_POST);
if ($event->delete()) {
Notification::add("Event was deleted.");
Page::redirect("/events");
}
Notification::add("Error deleting.");
Page::redirect("/events");
}
示例5: install
/**
* Install mreporting notifications.
*
* @return array 'success' => true on success
*/
static function install()
{
global $LANG, $DB;
// Création du template de la notification
$template = new NotificationTemplate();
$found_template = $template->find("itemtype = 'PluginMreportingNotification'");
if (count($found_template) == 0) {
$template_id = $template->add(array('name' => $LANG['plugin_mreporting']['notification_name'], 'comment' => $LANG['plugin_mreporting']['notification_comment'], 'itemtype' => 'PluginMreportingNotification'));
// Ajout d'une traduction (texte) en Français
$translation = new NotificationTemplateTranslation();
$translation->add(array('notificationtemplates_id' => $template_id, 'language' => '', 'subject' => $LANG['plugin_mreporting']['notification_subject'], 'content_text' => $LANG['plugin_mreporting']['notification_text'], 'content_html' => $LANG['plugin_mreporting']['notification_html']));
// Création de la notification
$notification = new Notification();
$notification_id = $notification->add(array('name' => $LANG['plugin_mreporting']['notification_name'], 'comment' => $LANG['plugin_mreporting']['notification_comment'], 'entities_id' => 0, 'is_recursive' => 1, 'is_active' => 1, 'itemtype' => 'PluginMreportingNotification', 'notificationtemplates_id' => $template_id, 'event' => 'sendReporting', 'mode' => 'mail'));
}
$DB->query('INSERT INTO glpi_notificationtargets (items_id, type, notifications_id)
VALUES (1, 1, ' . $notification_id . ');');
return array('success' => true);
}
示例6: install
public static function install()
{
$notifications = array('plugin_formcreator_form_created' => array('name' => __('A form has been created', 'formcreator'), 'subject' => __('Your request have been saved', 'formcreator'), 'content' => __('Hi,\\nYour request from GLPI have been successfully saved with number ##formcreator.request_id## and transmetted to the helpdesk team.\\nYou can see your answers onto the following link:\\n##formcreator.validation_link##', 'formcreator'), 'notified' => self::AUTHOR), 'plugin_formcreator_need_validation' => array('name' => __('A form need to be validate', 'formcreator'), 'subject' => __('A form from GLPI need to be validate', 'formcreator'), 'content' => __('Hi,\\nA form from GLPI need to be validate and you have been choosen as the validator.\\nYou can access it by clicking onto this link:\\n##formcreator.validation_link##', 'formcreator'), 'notified' => self::APPROVER), 'plugin_formcreator_refused' => array('name' => __('The form is refused', 'formcreator'), 'subject' => __('Your form have been refused by the validator', 'formcreator'), 'content' => __('Hi,\\nWe are sorry to inform you that your form have been refused by the validator for the reason below:\\n##formcreator.validation_comment##\\n\\nYou can still modify and resubmit it by clicking onto this link:\\n##formcreator.validation_link##', 'formcreator'), 'notified' => self::AUTHOR), 'plugin_formcreator_accepted' => array('name' => __('The form is accepted', 'formcreator'), 'subject' => __('Your form have been accepted by the validator', 'formcreator'), 'content' => __('Hi,\\nWe are pleased to inform you that your form have been accepted by the validator.\\nYour request will be considered soon.', 'formcreator'), 'notified' => self::AUTHOR), 'plugin_formcreator_deleted' => array('name' => __('The form is deleted', 'formcreator'), 'subject' => __('Your form have been deleted by an administrator', 'formcreator'), 'content' => __('Hi,\\nWe are sorry to inform you that your request cannot be considered and have been deleted by an administrator.', 'formcreator'), 'notified' => self::AUTHOR));
// Create the notification template
$notification = new Notification();
$notification_target = new NotificationTarget();
$template = new NotificationTemplate();
$translation = new NotificationTemplateTranslation();
foreach ($notifications as $event => $datas) {
// Check if notification allready exists
$exists = $notification->find("itemtype = 'PluginFormcreatorFormanswer' AND event = '{$event}'");
// If it doesn't exists, create it
if (count($exists) == 0) {
$template_id = $template->add(array('name' => addslashes($datas['name']), 'comment' => '', 'itemtype' => 'PluginFormcreatorFormanswer'));
// Add a default translation for the template
$translation->add(array('notificationtemplates_id' => $template_id, 'language' => '', 'subject' => addslashes($datas['subject']), 'content_text' => addslashes($datas['content']), 'content_html' => '<p>' . str_replace('\\n', '<br />', $datas['content']) . '</p>'));
// Create the notification
$notification_id = $notification->add(array('name' => addslashes($datas['name']), 'comment' => '', 'entities_id' => 0, 'is_recursive' => 1, 'is_active' => 1, 'itemtype' => 'PluginFormcreatorFormanswer', 'notificationtemplates_id' => $template_id, 'event' => $event, 'mode' => 'mail'));
// Add default notification targets
$notification_target->add(array("items_id" => $datas['notified'], "type" => Notification::USER_TYPE, "notifications_id" => $notification_id));
}
}
}
示例7: merge
public function merge($ids)
{
// get the first sequence
$firstID = array_pop($ids);
$sequence = LevelUp::find($firstID);
// Check the sequences are the same
foreach ($ids as $id) {
$oldSeq = LevelUp::find($id);
foreach ($oldSeq->data as $data) {
$newData = $sequence->data->where('level', $data->level)->first();
if ($newData) {
if ($newData->fish !== $data->fish || $newData->wood !== $data->wood || $newData->iron !== $data->iron || $newData->time !== $data->time) {
\Notification::add('warning', 'Sequences are different at level ' . $newData->level . '!');
return false;
}
}
}
}
foreach ($ids as $id) {
// then reattach the other dragons to this sequence
foreach ($oldSeq->dragons as $dragon) {
$dragon->levelUp()->associate($sequence);
$dragon->save();
}
// Copy data across or delete the data
foreach ($oldSeq->data as $data) {
$newData = $sequence->data->where('level', $data->level)->first();
if (!$newData) {
$sequence->data()->save($data);
} else {
$data->delete();
}
}
// and delete the sequence
$oldSeq->delete();
}
}
示例8: favorite
public static function favorite($code, $type, $from = 'web', $uid = '')
{
if (!$code || !$type) {
return array('status' => 0, 'msg' => '数据不全,请核实');
}
if (!in_array($type, array('post'))) {
return array('status' => 0, 'msg' => '暂不允许的分类');
}
if (is_numeric($code)) {
$id = $code;
} else {
$codeArr = Posts::decode($code);
if ($codeArr['type'] != $type || !is_numeric($codeArr['id']) || $codeArr['id'] < 1) {
$this->jsonOutPut(0, '您所查看的内容不存在');
}
$id = $codeArr['id'];
}
if (!$uid) {
$uid = zmf::uid();
}
if ($uid) {
if (zmf::actionLimit('favorite-' . $type, $id)) {
return array('status' => 0, 'msg' => '操作太频繁,请稍后再试');
}
} else {
//没有登录的访客点收藏时判断是否已收藏过
if (zmf::actionLimit('favorite-' . $type, $id, 1, 86400, true)) {
return array('status' => 1, 'msg' => '已点赞', 'state' => 1);
}
$uid = 0;
}
$postInfo = Posts::model()->findByPk($id);
if (!$postInfo || $postInfo['status'] != Posts::STATUS_PASSED) {
return array('status' => 0, 'msg' => '文章不存在');
}
$attr = array('uid' => $uid, 'logid' => $id, 'classify' => $type);
$info = false;
if ($uid) {
$info = Favorites::model()->findByAttributes($attr);
}
if ($info) {
if (Favorites::model()->deleteByPk($info['id'])) {
if ($type == 'post') {
Posts::updateCount($id, 'Posts', -1, 'favorite');
}
return array('status' => 1, 'msg' => '取消点赞', 'state' => 3);
} else {
return array('status' => 0, 'msg' => '取消点赞失败', 'state' => 4);
}
} else {
$attr['cTime'] = zmf::now();
$model = new Favorites();
$model->attributes = $attr;
if ($model->save()) {
if ($type == 'post') {
Posts::updateCount($id, 'Posts', 1, 'favorite');
}
//点赞后给对方发提醒
$_noticedata = array('uid' => $postInfo['uid'], 'authorid' => $uid, 'content' => "您的文章【{$postInfo['title']}】有了新的赞", 'new' => 1, 'type' => 'favorite', 'cTime' => zmf::now(), 'from_id' => $model->id, 'from_num' => 1);
Notification::add($_noticedata);
return array('status' => 1, 'msg' => '点赞成功', 'state' => 1);
} else {
return array('status' => 0, 'msg' => '点赞失败', 'state' => 2);
}
}
}
示例9: addAllNotifications
/**
* Returns an Event specified by the provided proxy_id, content_type and record_id, as well
* as a record_proxy_id in the case of some types of content.
*
* @param string $content_type
* @param int $record_id
* @param int $record_proxy_id
* @return array
*/
public static function addAllNotifications($content_type, $record_id, $record_proxy_id = 0, $proxy_id, $content_id)
{
global $db;
$query = "SELECT * FROM `notification_users` \n\t\t\t\t\tWHERE `content_type` = " . $db->qstr($content_type) . "\n\t\t\t\t\tAND `notify_active` = 1\n\t\t\t\t\tAND `record_id` = " . $db->qstr($record_id) . ($record_proxy_id ? "\n\t\t\t\t\tAND `record_proxy_id` = " . $db->qstr($record_proxy_id) : "");
$results = $db->getAll($query);
if ($results) {
require_once "Models/notifications/Notification.class.php";
foreach ($results as $result) {
if ($result["proxy_id"] != $proxy_id) {
$notification = Notification::add($result["nuser_id"], $proxy_id, $content_id);
}
}
}
return false;
}
示例10: action_copy_view
public function action_copy_view()
{
RoutingEngine::setPage("runnDAILY Routes", "PV__300");
$route = new Route($_POST);
if ($route->copy()) {
Notification::add("Your route - {$route->name} - was copied.");
Page::redirect("/routes/view/{$route->id}");
}
Notification::add("There was an error copying the route. Try again.");
Page::redirect("/routes/view/{$route->id}");
}
示例11: afterCreate
public function afterCreate($image)
{
Notification::add($image->id, 'Image');
}
示例12: install
public static function install(Migration $migration)
{
global $DB;
$migration->displayMessage("Migrate PluginOrderOrder notifications");
$template = new NotificationTemplate();
$templates_id = false;
$query_id = "SELECT `id`\n FROM `glpi_notificationtemplates`\n WHERE `itemtype`='PluginOrderOrder'\n AND `name` = 'Order Validation'";
$result = $DB->query($query_id) or die($DB->error());
if ($DB->numrows($result) > 0) {
$templates_id = $DB->result($result, 0, 'id');
} else {
$tmp = array('name' => 'Order Validation', 'itemtype' => 'PluginOrderOrder', 'date_mod' => $_SESSION['glpi_currenttime'], 'comment' => '', 'css' => '');
$templates_id = $template->add($tmp);
}
if ($templates_id) {
$translation = new NotificationTemplateTranslation();
if (!countElementsInTable($translation->getTable(), "`notificationtemplates_id`='{$templates_id}'")) {
$tmp['notificationtemplates_id'] = $templates_id;
$tmp['language'] = '';
$tmp['subject'] = '##lang.ordervalidation.title##';
$tmp['content_text'] = '##lang.ordervalidation.url## : ##ordervalidation.url##
##lang.ordervalidation.entity## : ##ordervalidation.entity##
##IFordervalidation.name####lang.ordervalidation.name## : ##ordervalidation.name##
##ENDIFordervalidation.name##
##IFordervalidation.numorder####lang.ordervalidation.numorder## : ##ordervalidation.numorder##
##ENDIFordervalidation.numorder##
##IFordervalidation.orderdate####lang.ordervalidation.orderdate## : ##ordervalidation.orderdate####ENDIFordervalidation.orderdate##
##IFordervalidation.state####lang.ordervalidation.state## : ##ordervalidation.state####ENDIFordervalidation.state##
##IFordervalidation.users####lang.ordervalidation.users## : ##ordervalidation.users####ENDIFordervalidation.users##
##IFordervalidation.comment####lang.ordervalidation.comment## : ##ordervalidation.comment####ENDIFordervalidation.comment##';
$tmp['content_html'] = '<p><strong>##lang.ordervalidation.url##</strong> : ' . '<a href=\\"##ordervalidation.url##\\">##ordervalidation.url##</a><br />' . '<br /><strong>##lang.ordervalidation.entity##</strong> : ##ordervalidation.entity##<br />' . ' ##IFordervalidation.name##<strong>##lang.ordervalidation.name##</strong>' . ' : ##ordervalidation.name####ENDIFordervalidation.name##<br />' . '##IFordervalidation.numorder##<strong>##lang.ordervalidation.numorder##</strong>' . ' : ##ordervalidation.numorder####ENDIFordervalidation.numorder##<br />##IFordervalidation.orderdate##<strong>##lang.ordervalidation.orderdate##</strong>' . ' : ##ordervalidation.orderdate####ENDIFordervalidation.orderdate##<br />' . '##IFordervalidation.state##<strong>##lang.ordervalidation.state##</strong>' . ' : ##ordervalidation.state####ENDIFordervalidation.state##<br />' . '##IFordervalidation.users##<strong>##lang.ordervalidation.users##</strong>' . ' : ##ordervalidation.users####ENDIFordervalidation.users##<br /><br />' . '##IFordervalidation.comment##<strong>##lang.ordervalidation.comment##</strong> : ##ordervalidation.comment####ENDIFordervalidation.comment##</p>';
$translation->add($tmp);
}
$notifs = array('New Order Validation' => 'ask', 'Confirm Order Validation' => 'validation', 'Cancel Order Validation' => 'undovalidation', 'Cancel Order' => 'cancel');
$notification = new Notification();
foreach ($notifs as $label => $name) {
if (!countElementsInTable("glpi_notifications", "`itemtype`='PluginOrderOrder' AND `event`='{$name}'")) {
$tmp = array('name' => $label, 'entities_id' => 0, 'itemtype' => 'PluginOrderOrder', 'event' => $name, 'mode' => 'mail', 'comment' => '', 'is_recursive' => 1, 'is_active' => 1, 'date_mod' => $_SESSION['glpi_currenttime'], 'notificationtemplates_id' => $templates_id);
$notification->add($tmp);
}
}
}
$query_id = "SELECT `id`\n FROM `glpi_notificationtemplates`\n WHERE `itemtype`='PluginOrderOrder'\n AND `name` = 'Due date overtaken'";
$result = $DB->query($query_id) or die($DB->error());
if ($DB->numrows($result) > 0) {
$templates_id = $DB->result($result, 0, 'id');
} else {
$tmp = array('name' => 'Due date overtaken', 'itemtype' => 'PluginOrderOrder', 'date_mod' => $_SESSION['glpi_currenttime'], 'comment' => '', 'css' => '');
$templates_id = $template->add($tmp);
}
if ($templates_id) {
$translation = new NotificationTemplateTranslation();
if (!countElementsInTable($translation->getTable(), "`notificationtemplates_id`='{$templates_id}'")) {
$tmp = array();
$tmp['notificationtemplates_id'] = $templates_id;
$tmp['language'] = '';
$tmp['subject'] = '##order.action## ##order.entity##';
$tmp['content_text'] = '##lang.order.entity## : ##order.entity##\\n' . ' \\n##FOREACHorders##\\n' . '##lang.order.item.name## : ##order.item.name##\\n ' . '##lang.order.item.numorder## : ##order.item.numorder##\\n ' . '##lang.order.item.orderdate## : ##order.item.orderdate##\\n ' . '##lang.order.item.duedate## : ##order.item.duedate##\\n ' . '##lang.order.item.deliverydate## : ##order.item.deliverydate##\\n ' . '##order.item.url## \\n ##ENDFOREACHorders##';
$tmp['content_html'] = "##lang.order.entity## : ##order.entity##<br /> " . "<br />##FOREACHorders##<br />" . "##lang.order.item.name## : ##order.item.name##<br /> " . "##lang.order.item.numorder## : ##order.item.numorder##<br /> " . "##lang.order.item.orderdate## : ##order.item.orderdate##<br /> <a>" . "##lang.order.item.duedate## : ##order.item.duedate##<br /> </a><a>" . "##lang.order.item.deliverydate## : ##order.item.deliverydate##<br /> </a><a>" . "##order.item.url##</a><br /> ##ENDFOREACHorders##";
$translation->add($tmp);
}
$notifs = array('Due date overtaken' => 'duedate');
$notification = new Notification();
foreach ($notifs as $label => $name) {
if (!countElementsInTable("glpi_notifications", "`itemtype`='PluginOrderOrder' AND `event`='{$name}'")) {
$tmp = array('name' => $label, 'entities_id' => 0, 'itemtype' => 'PluginOrderOrder', 'event' => $name, 'mode' => 'mail', 'comment' => '', 'is_recursive' => 1, 'is_active' => 1, 'date_mod' => $_SESSION['glpi_currenttime'], 'notificationtemplates_id' => $templates_id);
$notification->add($tmp);
}
}
}
$template = new NotificationTemplate();
$templates_id = false;
$query_id = "SELECT `id`\n FROM `glpi_notificationtemplates`\n WHERE `itemtype`='PluginOrderOrder'\n AND `name` = 'Order Delivered'";
$result = $DB->query($query_id) or die($DB->error());
if ($DB->numrows($result) > 0) {
$templates_id = $DB->result($result, 0, 'id');
} else {
$tmp = array('name' => 'Order Delivered', 'itemtype' => 'PluginOrderOrder', 'date_mod' => $_SESSION['glpi_currenttime'], 'comment' => '', 'css' => '');
$templates_id = $template->add($tmp);
}
if ($templates_id) {
$translation = new NotificationTemplateTranslation();
if (!countElementsInTable($translation->getTable(), "`notificationtemplates_id`='{$templates_id}'")) {
$tmp['notificationtemplates_id'] = $templates_id;
$tmp['language'] = '';
$tmp['subject'] = '##order.action## ##ordervalidation.name## ##ordervalidation.numorder##';
$tmp['content_text'] = '##order.action##
##lang.ordervalidation.name## :
##ordervalidation.name##
##lang.ordervalidation.orderdate## :
##ordervalidation.orderdate##
##lang.ordervalidation.entity## :
##ordervalidation.entity##';
$tmp['content_html'] = '<p>##order.action## <br /><br /> 
##lang.ordervalidation.name## : <br /> 
##ordervalidation.name## <br /> 
##lang.ordervalidation.orderdate## : <br /> 
##ordervalidation.orderdate## <br />  <br /> 
##lang.ordervalidation.entity## : <br /> ##ordervalidation.entity##</p>';
//.........这里部分代码省略.........
示例13: processPostRequestUpdateVars
/**
* Используется для сохранения настроек.
*
* @author Anthony Boutinov
*
* @param array $short_names CM$DICTIONARY.SHORT_NAME массив
* @retval bool Возвращает статус: успешно или нет
*/
public function processPostRequestUpdateVars($short_names)
{
function processFileToSQL($key, &$sql)
{
$user_file_key = $key . '_file';
$fileName = $_FILES[$user_file_key]['name'];
$tmpName = $_FILES[$user_file_key]['tmp_name'];
$fileSize = $_FILES[$user_file_key]['size'];
$fileType = $_FILES[$user_file_key]['type'];
$fp = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);
if (!get_magic_quotes_gpc()) {
$fileName = addslashes($fileName);
}
$sql = $sql . 'BLOB_VALUE="' . $content . '"';
}
$rows = $this->getDataTypesForParentByShortName($short_names);
// sanitized inside
$post_is_fine = true;
foreach ($rows as $key => $value) {
if ($value['DATA_TYPE'] == 'file' || $value['DATA_TYPE'] == 'text&file') {
if ($_FILES[$key . '_file']['size'] == 0) {
$rows[$key]['field_doesnt_need_an_update'] = true;
}
} else {
if ($value['DATA_TYPE'] == 'checkbox') {
if (isset($_POST[$key])) {
$_POST[$key] = "T";
} else {
$_POST[$key] = "F";
}
} else {
if (!isset($_POST[$key])) {
Notification::add("POST value for '{$key}' is not set.", 'danger');
$post_is_fine = false;
}
}
}
}
if (!$post_is_fine) {
return false;
}
foreach ($rows as $key => $value) {
if (isset($value['field_doesnt_need_an_update']) && $value['field_doesnt_need_an_update']) {
continue;
}
$sql = 'update SP$VAR set ';
if ($value['DATA_TYPE'] == 'file') {
processFileToSQL($key, $sql);
} else {
if ($value['DATA_TYPE'] == 'text&file') {
processFileToSQL($key, $sql);
$sql = $sql . ', ';
}
$sql = $sql . 'VALUE="' . htmlspecialchars($_POST[$key]) . '"';
}
$sql = $sql . ' WHERE ID_DB_USER=' . $this->id_db_user . ' AND ID_DICTIONARY=' . $value['ID_DICTIONARY'];
$this->getQueryResultWithErrorNoticing($sql);
}
Notification::add("Изменения сохранены!", 'success');
return true;
}
示例14: addNotification
/**
* @param $text string
* @param $type string Notification type
* @param $list_id integer|null
* @param $task_id integer|null
*/
function addNotification($text, $type, $list_id = null, $task_id = null)
{
// only add Notifications if we are on multi user mode
if (Config::get('multiuser') == 1) {
try {
Notification::add($text, $type, $list_id, $task_id);
} catch (Exception $e) {
var_dump($e->getMessage());
}
}
}
示例15: Comment
$content_comment = $_POST['my_comment'];
$id_article = $_POST['id_article'];
$author = $_SESSION['login'];
$new_comment = new Comment($id_article, $author, $content_comment);
$new_comment->add();
$bdd = new PDO('mysql:host=localhost;dbname=bavn', 'root', '');
$auteur_article = $bdd->query('SELECT id FROM members WHERE id IN(SELECT id_author FROM articles WHERE id="' . $id_article . '")');
$auteur_article = $auteur_article->fetch()[0];
$commentateurs_article = $bdd->query('SELECT id, pseudo FROM members WHERE pseudo IN(SELECT pseudo FROM comments WHERE id_article="' . $id_article . '")');
$commentateurs_article = $commentateurs_article->fetchAll();
$nombre_commentateurs = count($commentateurs_article);
for ($i = 0; $i < $nombre_commentateurs + 1; $i++) {
if ($i < $nombre_commentateurs) {
$cur_id = $commentateurs_article[$i]['id'];
$cur_pseudo = $commentateurs_article[$i]['pseudo'];
if ($cur_pseudo != $author) {
$new_not = new Notification($cur_id, $id_article, "Un nouveau commentaire sur une publication que vous suivez est apparu", '', 0);
} else {
$auteur_article = -1;
}
} else {
if ($auteur_article != -1) {
$new_not = new Notification($auteur_article, $id_article, "Un nouveau commentaire sur votre publication est apparu", '', 0);
}
}
if (isset($new_not)) {
$new_not->add();
}
}
unset($new_comment);
}