From de21d661570c24e74a9d684b62b014ad8b072923 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 14 Sep 2011 16:25:50 -0700 Subject: [PATCH 1/4] Fix undefined variable --- lib/groupprofileblock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/groupprofileblock.php b/lib/groupprofileblock.php index df383f0696..fc0679247b 100644 --- a/lib/groupprofileblock.php +++ b/lib/groupprofileblock.php @@ -117,7 +117,7 @@ class GroupProfileBlock extends ProfileBlock array('nickname' => $this->group->nickname)), // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators. // TRANS: %s is the nickname of the group. - 'title' => sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname)), + 'title' => sprintf(_m('TOOLTIP','Edit %s group properties'), $this->group->nickname)), // TRANS: Link text for link on user profile. _m('BUTTON','Edit')); $this->out->elementEnd('li'); @@ -126,7 +126,7 @@ class GroupProfileBlock extends ProfileBlock array('nickname' => $this->group->nickname)), // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators. // TRANS: %s is the nickname of the group. - 'title' => sprintf(_m('TOOLTIP','Add or edit %s logo'), $nickname)), + 'title' => sprintf(_m('TOOLTIP','Add or edit %s logo'), $this->group->nickname)), // TRANS: Link text for link on user profile. _m('MENU','Logo')); $this->out->elementEnd('li'); From 5eb6c0d73132a4fb408aca8ce88e4f75e1e79997 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 14 Sep 2011 16:25:50 -0700 Subject: [PATCH 2/4] Fix undefined variable --- lib/groupprofileblock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/groupprofileblock.php b/lib/groupprofileblock.php index df383f0696..fc0679247b 100644 --- a/lib/groupprofileblock.php +++ b/lib/groupprofileblock.php @@ -117,7 +117,7 @@ class GroupProfileBlock extends ProfileBlock array('nickname' => $this->group->nickname)), // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators. // TRANS: %s is the nickname of the group. - 'title' => sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname)), + 'title' => sprintf(_m('TOOLTIP','Edit %s group properties'), $this->group->nickname)), // TRANS: Link text for link on user profile. _m('BUTTON','Edit')); $this->out->elementEnd('li'); @@ -126,7 +126,7 @@ class GroupProfileBlock extends ProfileBlock array('nickname' => $this->group->nickname)), // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators. // TRANS: %s is the nickname of the group. - 'title' => sprintf(_m('TOOLTIP','Add or edit %s logo'), $nickname)), + 'title' => sprintf(_m('TOOLTIP','Add or edit %s logo'), $this->group->nickname)), // TRANS: Link text for link on user profile. _m('MENU','Logo')); $this->out->elementEnd('li'); From 70fbdb6f94848c5c08b0b6e30905d875156b8233 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sat, 17 Sep 2011 13:27:14 -0700 Subject: [PATCH 3/4] Change time format to work with older PHP (before 5.3) --- plugins/Event/eventform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Event/eventform.php b/plugins/Event/eventform.php index f62571ce63..8100e5903b 100644 --- a/plugins/Event/eventform.php +++ b/plugins/Event/eventform.php @@ -124,7 +124,7 @@ class EventForm extends Form $this->li(); $times = EventTimeList::getTimes($today->format('m/d/Y 12:00') . ' am ' . $today->format('T')); - $start = EventTimeList::nearestHalfHour('@' . $today->getTimestamp()); + $start = EventTimeList::nearestHalfHour($today->format('c')); $start->setTimezone(new DateTimeZone(common_timezone())); $this->out->dropdown( @@ -160,7 +160,7 @@ class EventForm extends Form 'event-endtime', // TRANS: Field label on event form. _m('LABEL','End time'), - EventTimeList::getTimes('@' . $start->getTimestamp(), true), + EventTimeList::getTimes($start->format('c'), true), // TRANS: Field title on event form. _m('Time the event ends.'), false, From a4593f9cd33905124042dd95d4b849853c3dc394 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sat, 17 Sep 2011 13:36:05 -0700 Subject: [PATCH 4/4] Don't try to verify URL if the user has left it out when making a new event --- plugins/Event/newevent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Event/newevent.php b/plugins/Event/newevent.php index 34e83cd7e0..4c2157e01e 100644 --- a/plugins/Event/newevent.php +++ b/plugins/Event/newevent.php @@ -206,7 +206,7 @@ class NeweventAction extends Action throw new ClientException(_m('Event must have an end time.')); } - if (isset($this->url) && Validate::uri($this->url) === false) { + if (!empty($this->url) && Validate::uri($this->url) === false) { // TRANS: Client exception thrown when trying to post an event with an invalid URL. throw new ClientException(_m('URL must be valid.')); }