Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
fixed #120
Browse files Browse the repository at this point in the history
Условие оказалось лишним!
  • Loading branch information
devkont committed Mar 4, 2015
1 parent 77dc8f1 commit 68acee2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
29 changes: 13 additions & 16 deletions modules/projects/inc/projects.offers.php
Expand Up @@ -72,22 +72,19 @@
$db->insert($db_projects_offers, $roffer);
$offerid = $db->lastInsertId();

if (!$usr['isadmin'])
{
$urlparams = empty($item['item_alias']) ?
array('c' => $item['item_cat'], 'id' => $item['item_id']) :
array('c' => $item['item_cat'], 'al' => $item['item_alias']);

$rsubject = cot_rc($L['project_added_offer_header'], array('prtitle' => $item['item_title']));
$rbody = cot_rc($L['project_added_offer_body'], array(
'user_name' => $item['user_name'],
'offeruser_name' => $usr['profile']['user_name'],
'prj_name' => $item['item_title'],
'sitename' => $cfg['maintitle'],
'link' => COT_ABSOLUTE_URL . cot_url('projects', $urlparams, '', true)
));
cot_mail ($item['user_email'], $rsubject, $rbody);
}
$urlparams = empty($item['item_alias']) ?
array('c' => $item['item_cat'], 'id' => $item['item_id']) :
array('c' => $item['item_cat'], 'al' => $item['item_alias']);

$rsubject = cot_rc($L['project_added_offer_header'], array('prtitle' => $item['item_title']));
$rbody = cot_rc($L['project_added_offer_body'], array(
'user_name' => $item['user_name'],
'offeruser_name' => $usr['profile']['user_name'],
'prj_name' => $item['item_title'],
'sitename' => $cfg['maintitle'],
'link' => COT_ABSOLUTE_URL . cot_url('projects', $urlparams, '', true)
));
cot_mail ($item['user_email'], $rsubject, $rbody);

$offerscount = $db->query("SELECT COUNT(*) FROM $db_projects_offers WHERE item_pid=" . (int)$id . "")->fetchColumn();
$db->update($db_projects, array("item_offerscount" => (int)$offerscount), "item_id=" . (int)$id);
Expand Down
2 changes: 1 addition & 1 deletion modules/projects/lang/projects.en.lang.php
Expand Up @@ -117,7 +117,7 @@
$L['offers_add_msg'] = 'Send a message';
$L['offers_posts_title'] = 'Posts';

$L['project_added_offer_header'] = "New msg of your project";
$L['project_added_offer_header'] = 'New msg of project «{$prtitle}»';
$L['project_added_offer_header2'] = 'New msg of project "{$prtitle}"';
$L['project_added_offer_body'] = 'Hi, {$user_name}. '."\n\n".'.{$offeruser_name} sent a message of your project "{$prj_name}".'."\n\n".'{$link}';

Expand Down
2 changes: 1 addition & 1 deletion modules/projects/lang/projects.ru.lang.php
Expand Up @@ -117,7 +117,7 @@
$L['offers_add_msg'] = 'Написать сообщение';
$L['offers_posts_title'] = 'Переписка по заказу';

$L['project_added_offer_header'] = "Новое предложение по Вашему проекту";
$L['project_added_offer_header'] = 'Новое предложение по проекту «{$prtitle}»';
$L['project_added_offer_header2'] = 'Новое сообщение по проекту «{$prtitle}»';
$L['project_added_offer_body'] = 'Здравствуйте, {$user_name}. '."\n\n".'Пользователь {$offeruser_name} оставил вам сообщение по проекту «{$prj_name}».'."\n\n".'{$link}';

Expand Down

0 comments on commit 68acee2

Please sign in to comment.