}
if (is_string($rawtags)) {
- $rawtags = preg_split('/[\s,]+/', $rawtags);
+ if (empty($rawtags)) {
+ $rawtags = array();
+ } else {
+ $rawtags = preg_split('/[\s,]+/', $rawtags);
+ }
}
$nb = new Bookmark();
// Use user's preferences for short URLs, if possible
- $user = User::staticGet('id', $profile->id);
+ try {
+ $user = User::staticGet('id', $profile->id);
- $shortUrl = File_redirection::makeShort($url,
- empty($user) ? null : $user);
+ $shortUrl = File_redirection::makeShort($url,
+ empty($user) ? null : $user);
+ } catch (Exception $e) {
+ // Don't let this stop us.
+ $shortUrl = $url;
+ }
$content = sprintf(_('"%s" %s %s %s'),
$title,
{
public $loadCSS = false;
- /**
- * Load related modules when needed
- *
- * @param string $cls Name of the class to be loaded
- *
- * @return boolean hook value; true means continue processing, false means stop.
- */
-
- function onAutoload($cls)
- {
- $dir = dirname(__FILE__);
-
- switch ($cls)
- {
- case 'HelloAction':
- include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
- return false;
- case 'User_greeting_count':
- include_once $dir . '/'.$cls.'.php';
- return false;
- default:
- return true;
- }
- }
-
/**
* Modify the default menu
*