Changeset 191702
- Timestamp:
- 01/08/2010 11:48:08 PM (16 years ago)
- Location:
- lifestream/trunk
- Files:
-
- 6 edited
-
CHANGES (modified) (1 diff)
-
extensions/github/extension.inc.php (modified) (2 diffs)
-
inc/core.php (modified) (2 diffs)
-
inc/labels.php (modified) (1 diff)
-
inc/widget.php (modified) (1 diff)
-
pages/add-feed.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lifestream/trunk/CHANGES
r191672 r191702 7 7 * Updated SimplePie to 1.2. 8 8 * Upon activating the plugin the default feed is now owned by the user performing the activation. 9 * Added much needed "less suck" to the GitHub extension. 9 10 10 11 0.99.9.5 -
lifestream/trunk/extensions/github/extension.inc.php
r153349 r191702 13 13 return $match[1]; 14 14 } 15 15 function parse_repo($text) 16 { 17 preg_match('/pushed to (.+) at (.+\/.+)/', $text, $match); 18 return array($match[1], $match[2]); 19 } 20 21 function get_repository_name(&$event, &$bit) 22 { 23 return $bit['repository']; 24 } 25 26 function get_repository_link(&$event, &$bit) 27 { 28 $name = $this->get_repository_name($event, $bit); 29 if (!$name) return; 30 return $this->lifestream->get_anchor_html($this->get_repository_name($event, $bit), sprintf('http://www.github.com/%s/', $name)); 31 } 32 33 16 34 function yield($row, $url, $key) 17 35 { … … 23 41 $message = $this->parse_message($description); 24 42 $data['title'] = $message; 43 $repo = $this->parse_repo($row->get_title()); 44 $data['branch'] = $repo[0]; 45 $data['repository'] = $repo[1]; 25 46 return $data; 26 47 } -
lifestream/trunk/inc/core.php
r191676 r191702 68 68 $this->owner_id = $row->owner_id; 69 69 $this->visible = $row->visible; 70 $this->link = (!empty($this->data['link']) ? $this->data['link'] : $row->link);70 $this->link = @(!empty($this->data['link']) ? $this->data['link'] : $row->link); 71 71 $cls = $this->lifestream->get_feed($row->feed); 72 72 $this->feed = new $cls($this->lifestream, unserialize($row->options), $row->feed_id); … … 2000 2000 $this->_owner_id = $row->owner_id; 2001 2001 $this->version = $row->version; 2002 $this->events = $row->events; 2002 $this->events = 'n/a'; 2003 //$this->events = $row->events; 2003 2004 $this->feed = $row->feed; 2004 2005 } -
lifestream/trunk/inc/labels.php
r181924 r191702 365 365 function get_label_single() 366 366 { 367 return $this->lifestream->__('Committed code.', $this->get_feed_label()); 368 } 369 370 function get_label_plural() 371 { 372 return $this->lifestream->__('Made %s commits.', $this->_get_show_details_link(), $this->get_feed_label()); 373 } 374 375 function get_label_single_user() 376 { 377 return $this->lifestream->__('%s committed code.', $this->get_user_label(), $this->get_feed_label()); 378 } 379 380 function get_label_plural_user() 381 { 382 return $this->lifestream->__('%s made %s commits.', $this->get_user_label(), $this->_get_show_details_link(), $this->get_feed_label()); 367 $repo = $this->feed->get_repository_link($this->event, $this->event->data[0]); 368 if ($repo) 369 { 370 return $this->lifestream->__('Committed %2$s to %3$s.', $this->get_feed_label(), $this->get_single_link(), $repo); 371 } 372 return $this->lifestream->__('Committed %2$s.', $this->get_feed_label(), $this->get_single_link()); 373 } 374 375 function get_label_plural() 376 { 377 $repo = $this->feed->get_repository_link($this->event, $this->event->data[0]); 378 if ($repo) 379 { 380 return $this->lifestream->__('Made %s commits to %3$s.', $this->_get_show_details_link(), $this->get_feed_label(), $repo); 381 } 382 return $this->lifestream->__('Made %s commits to %s.', $this->_get_show_details_link(), $this->get_feed_label()); 383 } 384 385 function get_label_single_user() 386 { 387 $repo = $this->feed->get_repository_link($this->event, $this->event->data[0]); 388 if ($repo) 389 { 390 return $this->lifestream->__('%1$s committed %3$s to %4$s.', $this->get_user_label(), $this->get_feed_label(), $this->get_single_link(), $repo); 391 } 392 return $this->lifestream->__('%1$s committed %3$s', $this->get_user_label(), $this->get_feed_label(), $this->get_single_link()); 393 } 394 395 function get_label_plural_user() 396 { 397 $repo = $this->feed->get_repository_link($this->event, $this->event->data[0]); 398 if ($repo) 399 { 400 return $this->lifestream->__('%s made %s commits to %3$s.', $this->get_user_label(), $this->_get_show_details_link(), $this->get_feed_label(), $repo); 401 } 402 return $this->lifestream->__('%s made %s commits to %s.', $this->get_user_label(), $this->_get_show_details_link(), $this->get_feed_label()); 383 403 } 384 404 } -
lifestream/trunk/inc/widget.php
r124986 r191702 105 105 'amount' => 10, 106 106 'title' => 'Lifestream', 107 'break_groups' => false, 108 'feeds' => array(), 109 'hide_metadata' => false, 107 110 ); 108 111 $number = '%i%'; -
lifestream/trunk/pages/add-feed.inc.php
r149363 r191702 79 79 <th> </th> 80 80 <td> 81 <label><input type="checkbox" name="grouped" id="id_grouped" value="1"<?php if ( $_POST['grouped'] == '1') echo ' checked="checked"'; ?>/> <?php $lifestream->_e('Group events from the same day together.'); ?></label>81 <label><input type="checkbox" name="grouped" id="id_grouped" value="1"<?php if (isset($_POST['grouped']) && $_POST['grouped'] == '1') echo ' checked="checked"'; ?>/> <?php $lifestream->_e('Group events from the same day together.'); ?></label> 82 82 </td> 83 83 </tr>
Note: See TracChangeset
for help on using the changeset viewer.