Skip to content

Commit

Permalink
Use constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 24, 2015
1 parent f2f1139 commit d5e9b1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions imp/lib/Mime/Viewer/Itip.php
Expand Up @@ -27,6 +27,10 @@
*/
class IMP_Mime_Viewer_Itip extends Horde_Mime_Viewer_Base
{
const AUTO_UPDATE_EVENT_REPLY = 'auto_update_eventreply';
const AUTO_UPDATE_FB_PUBLISH = 'auto_update_fbpublish';
const AUTO_UPDATE_FB_REPLY = 'auto_update_fbreply';

/**
* This driver's display capabilities.
*
Expand Down Expand Up @@ -225,7 +229,7 @@ protected function _vFreebusy($vfb, $id, $method)
case 'PUBLISH':
case 'REPLY':
if ($registry->hasMethod('calendar/import_vfreebusy')) {
if ($this->_autoUpdateReply(($method == 'PUBLISH') ? 'auto_update_fbpublish' : 'auto_update_fbreply', $sender)) {
if ($this->_autoUpdateReply(($method == 'PUBLISH') ? self::AUTO_UPDATE_FB_PUBLISH : self::AUTO_UPDATE_EVENT_REPLY, $sender)) {
try {
$registry->call('calendar/import_vfreebusy', array($vfb));
$notification->push(_("The user's free/busy information was sucessfully stored."), 'horde.success');
Expand Down Expand Up @@ -346,7 +350,7 @@ protected function _vEvent($vevent, $id, $method = 'PUBLISH', $components = arra
? $from->getAddressList(true)->first()->bare_address
: null;
if ($registry->hasMethod('calendar/updateAttendee') &&
$this->_autoUpdateReply('auto_update_eventreply', $sender)) {
$this->_autoUpdateReply(self::AUTO_UPDATE_EVENT_REPLY, $sender)) {
try {
$registry->call('calendar/updateAttendee', array(
$vevent,
Expand Down

0 comments on commit d5e9b1d

Please sign in to comment.