|
@@ 204-211 (lines=8) @@
|
| 201 |
|
|
| 202 |
|
// The comments |
| 203 |
|
$comments =& $comment_handler->getByItemId($ams_mid, $ams_newsid, 'ASC'); |
| 204 |
|
if (is_array($comments) && count($comments) > 0) { |
| 205 |
|
foreach ($comments as $onecomment) { |
| 206 |
|
$onecomment->setNew(); |
| 207 |
|
$onecomment->setVar('com_modid', $news_mid); |
| 208 |
|
$onecomment->setVar('com_itemid', $news_newsid); |
| 209 |
|
$comment_handler->insert($onecomment); |
| 210 |
|
} |
| 211 |
|
} |
| 212 |
|
unset($comments); |
| 213 |
|
|
| 214 |
|
// The notifications of this news |
|
@@ 220-227 (lines=8) @@
|
| 217 |
|
$criteria->add(new Criteria('not_itemid', $ams_newsid)); |
| 218 |
|
$criteria->setOrder('ASC'); |
| 219 |
|
$notifications = $notification_handler->getObjects($criteria); |
| 220 |
|
if (is_array($notifications) && count($notifications) > 0) { |
| 221 |
|
foreach ($notifications as $onenotification) { |
| 222 |
|
$onenotification->setNew(); |
| 223 |
|
$onenotification->setVar('not_modid', $news_mid); |
| 224 |
|
$onenotification->setVar('not_itemid', $news_newsid); |
| 225 |
|
$notification_handler->insert($onenotification); |
| 226 |
|
} |
| 227 |
|
} |
| 228 |
|
unset($notifications); |
| 229 |
|
} |
| 230 |
|
} |
|
@@ 236-243 (lines=8) @@
|
| 233 |
|
$criteria->add(new Criteria('not_category', 'global')); |
| 234 |
|
$criteria->setOrder('ASC'); |
| 235 |
|
$notifications = $notification_handler->getObjects($criteria); |
| 236 |
|
if (is_array($notifications) && count($notifications) > 0) { |
| 237 |
|
foreach ($notifications as $onenotification) { |
| 238 |
|
$onenotification->setNew(); |
| 239 |
|
$onenotification->setVar('not_modid', $news_mid); |
| 240 |
|
$onenotification->setVar('not_itemid', $news_newsid); |
| 241 |
|
$notification_handler->insert($onenotification); |
| 242 |
|
} |
| 243 |
|
} |
| 244 |
|
unset($notifications); |
| 245 |
|
echo "<p><a href='" . XOOPS_URL . "/modules/news/admin/groupperms.php'>The import is finished, don't forget to verify and set the topics permissions !</a></p>"; |
| 246 |
|
} |