|
Lines 1214-1219
|
Link Here
|
|---|
|
| 1214 |
|
1214 |
|
| 1215 |
if ($submitForm->validate()) { |
1215 |
if ($submitForm->validate()) { |
| 1216 |
$submitForm->execute(); |
1216 |
$submitForm->execute(); |
|
|
1217 |
|
| 1218 |
// Send a notification to associated users |
| 1219 |
import('notification.Notification'); |
| 1220 |
$articleDao =& DAORegistry::getDAO('ArticleDAO'); |
| 1221 |
$article =& $articleDao->getArticle($articleId); |
| 1222 |
$notificationUsers = $article->getAssociatedUserIds(true, false); |
| 1223 |
foreach ($notificationUsers as $user) { |
| 1224 |
$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId()) . "#layout"; |
| 1225 |
Notification::createNotification($user['id'], "notification.type.suppFileModified", |
| 1226 |
$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED, 1); |
| 1227 |
} |
| 1228 |
|
| 1217 |
Request::redirect(null, null, SubmissionEditHandler::getFrom(), $articleId); |
1229 |
Request::redirect(null, null, SubmissionEditHandler::getFrom(), $articleId); |
| 1218 |
} else { |
1230 |
} else { |
| 1219 |
parent::setupTemplate(true, $articleId, 'summary'); |
1231 |
parent::setupTemplate(true, $articleId, 'summary'); |
|
Lines 1463-1468
|
Link Here
|
|---|
|
| 1463 |
$galleyForm =& new ArticleGalleyForm($articleId); |
1475 |
$galleyForm =& new ArticleGalleyForm($articleId); |
| 1464 |
$galleyId = $galleyForm->execute($fileName); |
1476 |
$galleyId = $galleyForm->execute($fileName); |
| 1465 |
|
1477 |
|
|
|
1478 |
// Send a notification to associated users |
| 1479 |
import('notification.Notification'); |
| 1480 |
$articleDao = &DAORegistry::getDAO('ArticleDAO'); |
| 1481 |
$article = &$articleDao->getArticle($articleId); |
| 1482 |
$notificationUsers = $article->getAssociatedUserIds(true, false); |
| 1483 |
foreach ($notificationUsers as $user) { |
| 1484 |
$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId()) . "#layout"; |
| 1485 |
Notification::createNotification($user['id'], "notification.type.galleyAdded", |
| 1486 |
$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_GALLEY_ADDED, 1); |
| 1487 |
} |
| 1488 |
|
| 1466 |
Request::redirect(null, null, 'editGalley', array($articleId, $galleyId)); |
1489 |
Request::redirect(null, null, 'editGalley', array($articleId, $galleyId)); |
| 1467 |
} |
1490 |
} |
| 1468 |
|
1491 |
|
|
Lines 1507-1513
|
Link Here
|
|---|
|
| 1507 |
$submitForm->readInputData(); |
1530 |
$submitForm->readInputData(); |
| 1508 |
if ($submitForm->validate()) { |
1531 |
if ($submitForm->validate()) { |
| 1509 |
$submitForm->execute(); |
1532 |
$submitForm->execute(); |
| 1510 |
|
1533 |
|
|
|
1534 |
// Send a notification to associated users |
| 1535 |
import('notification.Notification'); |
| 1536 |
$articleDao =& DAORegistry::getDAO('ArticleDAO'); |
| 1537 |
$article =& $articleDao->getArticle($articleId); |
| 1538 |
$notificationUsers = $article->getAssociatedUserIds(true, false); |
| 1539 |
foreach ($notificationUsers as $user) { |
| 1540 |
$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId()) . "#layout"; |
| 1541 |
Notification::createNotification($user['id'], "notification.type.galleyModified", |
| 1542 |
$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_GALLEY_MODIFIED, 1); |
| 1543 |
} |
| 1544 |
|
| 1511 |
if (Request::getUserVar('uploadImage')) { |
1545 |
if (Request::getUserVar('uploadImage')) { |
| 1512 |
$submitForm->uploadImage(); |
1546 |
$submitForm->uploadImage(); |
| 1513 |
Request::redirect(null, null, 'editGalley', array($articleId, $galleyId)); |
1547 |
Request::redirect(null, null, 'editGalley', array($articleId, $galleyId)); |
|
Lines 1626-1631
|
Link Here
|
|---|
|
| 1626 |
$suppFileForm->setData('title', Locale::translate('common.untitled')); |
1660 |
$suppFileForm->setData('title', Locale::translate('common.untitled')); |
| 1627 |
$suppFileId = $suppFileForm->execute($fileName); |
1661 |
$suppFileId = $suppFileForm->execute($fileName); |
| 1628 |
|
1662 |
|
|
|
1663 |
// Send a notification to associated users |
| 1664 |
import('notification.Notification'); |
| 1665 |
$articleDao =& DAORegistry::getDAO('ArticleDAO'); |
| 1666 |
$article =& $articleDao->getArticle($articleId); |
| 1667 |
$notificationUsers = $article->getAssociatedUserIds(true, false); |
| 1668 |
foreach ($notificationUsers as $user) { |
| 1669 |
$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId()) . "#layout"; |
| 1670 |
Notification::createNotification($user['id'], "notification.type.suppFileAdded", |
| 1671 |
$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_ADDED, 1); |
| 1672 |
} |
| 1673 |
|
| 1629 |
Request::redirect(null, null, 'editSuppFile', array($articleId, $suppFileId)); |
1674 |
Request::redirect(null, null, 'editSuppFile', array($articleId, $suppFileId)); |
| 1630 |
} |
1675 |
} |
| 1631 |
|
1676 |
|