]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge commit '5c4a7a10' into nightly
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 14 Dec 2015 20:42:08 +0000 (21:42 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 14 Dec 2015 20:42:08 +0000 (21:42 +0100)
hannes making sure notice is a repeat and not a delete activity notice

20 files changed:
classes/File_redirection.php
classes/Notice.php
lib/action.php
lib/default.php
lib/form.php
lib/framework.php
lib/groupsnav.php
lib/httpclient.php
lib/util.php
plugins/Autocomplete/actions/autocomplete.php
plugins/Event/EventPlugin.php
plugins/Event/actions/events.php [new file with mode: 0644]
plugins/Event/lib/eventsnoticestream.php [new file with mode: 0644]
plugins/Favorite/FavoritePlugin.php
plugins/Oembed/OembedPlugin.php
plugins/Oembed/classes/File_oembed.php
plugins/Oembed/lib/oembedhelper.php
plugins/Oembed/scripts/poll_oembed.php
scripts/upgrade.php
theme/neo-gnu/css/display.css

index 0d90b9e82c0016040e8bf9f3fd83f7653be04d07..bb8ffc8c61301d3cf281382d719406354bf0dd81 100644 (file)
@@ -192,16 +192,18 @@ class File_redirection extends Managed_DataObject
             if (!empty($r->file_id)) {
                 return $r;
             }
-        }
 
-        $redir->httpcode = $redir_info['code'];
-        $redir->redirections = intval($redir_info['redirects']);
-        $redir->file = new File();
-        $redir->file->url = $redir_info ? $redir_info['url'] : $in_url;
-        $redir->file->mimetype = $redir_info['type'];
-        $redir->file->size = $redir_info['size'];
-        $redir->file->date = $redir_info['time'];
-        if($redir_info['protected']) $redir->file->protected = true;
+            $redir->httpcode = $redir_info['code'];
+            $redir->redirections = intval($redir_info['redirects']);
+            $redir->file = new File();
+            $redir->file->url = $redir_info ? $redir_info['url'] : $in_url;
+            $redir->file->mimetype = $redir_info['type'];
+            $redir->file->size = $redir_info['size'];
+            $redir->file->date = $redir_info['time'];
+            if ($redir_info['protected']) {
+                $redir->file->protected = true;
+            }
+        }
 
         return $redir;
     }
index 8f4d63c8927a6a4e7e5809c4ea44a65b6b8bba43..6fe2e4c76ad6e9dfee40f509932792dc13f9a499 100644 (file)
@@ -814,7 +814,7 @@ class Notice extends Managed_DataObject
         // Use the local user's shortening preferences, if applicable.
         $stored->rendered = $actor->isLocal()
                                 ? $actor->shortenLinks($act->content)
-                                : $act->content;
+                                : common_purify($act->content);
         $stored->content = common_strip_html($stored->rendered);
 
         // Maybe a missing act-time should be fatal if the actor is not local?
index 4a815c148360efa6d0064c411cc6b06a669a245e..c2d60e11e974bec1414fe2b9b143b4babdb4ce0d 100644 (file)
@@ -1490,7 +1490,7 @@ class Action extends HTMLOutputter // lawsuit
             }
             $this->initDocument('json');
             $error_array = array('error' => $msg, 'request' => $_SERVER['REQUEST_URI']);
-            $this->text(json_encode($error_array));
+            print(json_encode($error_array));
             $this->endDocument('json');
             break;
         case 'text':
index 490553f80b21ea1163cd4e995f8a284b18d985a6..7894dbb6745e4027be32f9351119f171fce0cce2 100644 (file)
@@ -276,10 +276,6 @@ $default =
               'maxpeople' => 500, // maximum no. of people with the same tag by the same user
               'allow_tagging' => array('all' => true), // equivalent to array('local' => true, 'remote' => true)
               'desclimit' => null),
-        'oembed' =>
-        array('endpoint' => null,   // 'https://noembed.com/embed/' for proxied oEmbed data
-              'order' => array('built-in', 'well-known', 'service', 'discovery'),
-        ),
         'search' =>
         array('type' => 'like'),
         'sessions' =>
index ee97f7a32f571b52e0cf0e4ab79766a5763298bb..fcccb9c7524b4f4f78f4a5f35ec91842923485ec 100644 (file)
@@ -190,9 +190,9 @@ class Form extends Widget
         return 'form';
     }
 
-    function li()
+    function li($class=null)
     {
-        $this->out->elementStart('li');
+        $this->out->elementStart('li', $class);
     }
 
     function unli()
index 57c775d4c33e773f0b6c160cb3bd4c745bfbad29..8b47197e76a6226330a578b0c95fe1ab0e164375 100644 (file)
@@ -23,7 +23,7 @@ define('GNUSOCIAL_ENGINE', 'GNU social');
 define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/social/');
 
 define('GNUSOCIAL_BASE_VERSION', '1.2.0');
-define('GNUSOCIAL_LIFECYCLE', 'beta1'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
+define('GNUSOCIAL_LIFECYCLE', 'beta2'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
 
 define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);
 
index f047e16a60e4a916111d8e07a00cf345192149fd..738604583ca3f07c35391ea6e35b3dd00987a4b9 100644 (file)
@@ -72,9 +72,9 @@ class GroupsNav extends MoreMenu
 
         while ($this->groups instanceof User_group && $this->groups->fetch()) {
             $items[] = array('placeholder',
-                             array('nickname' => $this->groups->nickname,
+                             array('nickname' => $this->groups->getNickname(),
                                    'mainpage' => $this->groups->homeUrl()),
-                             $this->groups->getBestName(),
+                             $this->groups->getNickname(),
                              $this->groups->getBestName()
                             );
         }
index 865fc9029e847134b0668fc3ba9eee7b8eab33aa..4b854914c929ac0dd54d3f7787fc4556e5e90050 100644 (file)
@@ -177,8 +177,17 @@ class HTTPClient extends HTTP_Request2
     /**
      * Quick static function to GET a URL
      */
-    public static function quickGet($url, $accept=null)
+    public static function quickGet($url, $accept=null, $params=array())
     {
+        if (!empty($params)) {
+            $params = http_build_query($params, null, '&');
+            if (strpos($url, '?') === false) {
+                $url .= '?' . $params;
+            } else {
+                $url .= '&' . $params;
+            }
+        }
+
         $client = new HTTPClient();
         if (!is_null($accept)) {
             $client->setHeader('Accept', $accept);
@@ -191,6 +200,16 @@ class HTTPClient extends HTTP_Request2
         return $response->getBody();
     }
 
+    public static function quickGetJson($url, $params=array())
+    {
+        $data = json_decode(self::quickGet($url, null, $params));
+        if (is_null($data)) {
+            common_debug('Could not decode JSON data from URL: '.$url);
+            throw new ServerException('Could not decode JSON data from URL');
+        }
+        return $data;
+    }
+
     /**
      * Convenience function to run a GET request.
      *
index f58e8cd112a8b980aa9b75b0730054c0d6b48885..c6005718d6233aea3e368a7593c74f5a40086457 100644 (file)
@@ -877,7 +877,7 @@ function common_replace_urls_callback($text, $callback, $arg = null) {
         '(?:'.
             '(?:'. //Known protocols
                 '(?:'.
-                    '(?:(?:https?|ftps?|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|irc)://)'.
+                    '(?:(?:https?|ftps?|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|ircs?)://)'.
                     '|'.
                     '(?:(?:mailto|aim|tel|xmpp):)'.
                 ')'.
index 56df4eb6d8b6c205c2775745d33ab2297a01c238..d5370fe0e1e66eeaf383de3cf62fdaec58342c9b 100644 (file)
@@ -141,10 +141,13 @@ class AutocompleteAction extends Action
         $results = array();
         foreach($this->profiles as $profile){
             $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
+            $acct = $profile->getAcctUri();
+            $identifier = split(':', $profile->getAcctUri(), 2)[1];
             $results[] = array(
-                'value' => '@'.$profile->nickname,
-                'nickname' => $profile->nickname,
-                'label'=> $profile->getFancyName(),
+                'value' => '@'.$identifier,
+                'nickname' => $profile->getNickname(),
+                'acct_uri' => $acct,
+                'label'=> "${identifier} (".$profile->getFullname().")",
                 'avatar' => $avatarUrl,
                 'type' => 'user'
             );
@@ -156,10 +159,13 @@ class AutocompleteAction extends Action
             } else {
                 $avatarUrl = User_group::defaultLogo(AVATAR_MINI_SIZE);
             }
+            $acct = $profile->getAcctUri();
+            $identifier = split(':', $profile->getAcctUri(), 2)[1];
             $results[] = array(
-                'value' => '!'.$group->nickname,
-                'nickname' => $group->nickname,
-                'label'=> $group->getFancyName(),
+                'value' => '!'.$group->getNickname(),
+                'nickname' => $group->getNickname(),
+                'acct_uri' => $acct,
+                'label'=> "${identifier} (".$group->getFullname().")",
                 'avatar' => $avatarUrl,
                 'type' => 'group');
         }
index 7f2712b148ea45debbb13263cea78877f099a20a..0c520ddb7a7a916df87f6c33276ad18112cdae3f 100644 (file)
@@ -90,6 +90,10 @@ class EventPlugin extends MicroAppPlugin
                     array('id' => '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'));
         $m->connect('main/event/updatetimes',
                     array('action' => 'timelist'));
+
+        $m->connect(':nickname/events',
+                    array('action' => 'events'),
+                    array('nickname' => Nickname::DISPLAY_FMT));
         return true;
     }
 
@@ -516,4 +520,14 @@ class EventPlugin extends MicroAppPlugin
         $out->raw($rsvp->asHTML());
         $out->elementEnd('div');
     }
+
+    function onEndPersonalGroupNav(Menu $menu, Profile $target, Profile $scoped=null)
+    {
+        $menu->menuItem(common_local_url('events', array('nickname' => $target->getNickname())),
+                          // TRANS: Menu item in sample plugin.
+                          _m('Happenings'),
+                          // TRANS: Menu item title in sample plugin.
+                          _m('A list of your events'), false, 'nav_timeline_events');
+        return true;
+    }
 }
diff --git a/plugins/Event/actions/events.php b/plugins/Event/actions/events.php
new file mode 100644 (file)
index 0000000..1de46a7
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/**
+ * List events
+ */
+
+if (!defined('GNUSOCIAL')) { exit(1); }
+
+class EventsAction extends ShowstreamAction
+{
+    public function getStream()
+    {
+                                     /* whose events */   /* are these the user's own events? */
+        $stream = new EventsNoticeStream($this->target, $this->scoped);
+        return $stream;
+    }
+
+    function title()
+    {
+        // TRANS: Page title for sample plugin. %s is a user nickname.
+        return sprintf(_m('%s\'s happenings'), $this->target->getNickname());
+    }
+
+    function getFeeds()
+    {
+        return array(
+                    );
+    }
+
+    function showEmptyList() {
+        $message = sprintf(_('This is %1$s\'s event stream, but %1$s hasn\'t received any events yet.'), $this->target->getNickname()) . ' ';
+
+        $this->elementStart('div', 'guide');
+        $this->raw(common_markup_to_html($message));
+        $this->elementEnd('div');
+    }
+
+    /**
+     * Return true if read only.
+     *
+     * Some actions only read from the database; others read and write.
+     * The simple database load-balancer built into StatusNet will
+     * direct read-only actions to database mirrors (if they are configured),
+     * and read-write actions to the master database.
+     *
+     * This defaults to false to avoid data integrity issues, but you
+     * should make sure to overload it for performance gains.
+     *
+     * @param array $args other arguments, if RO/RW status depends on them.
+     *
+     * @return boolean is read only action?
+     */
+    function isReadOnly($args)
+    {
+        return true;
+    }
+}
diff --git a/plugins/Event/lib/eventsnoticestream.php b/plugins/Event/lib/eventsnoticestream.php
new file mode 100644 (file)
index 0000000..1e8c4fe
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+
+class RawEventsNoticeStream extends NoticeStream
+{
+    protected $target;
+    protected $own;
+
+    function __construct(Profile $target)
+    {
+        $this->target   = $target;
+    }
+
+    function getNoticeIds($offset, $limit, $since_id, $max_id)
+    {
+        $notice = new Notice();
+        $qry = null;
+
+        $qry =  'SELECT notice.* FROM notice ';
+        $qry .= 'INNER JOIN happening ON happening.uri = notice.uri ';
+        $qry .= 'WHERE happening.profile_id = ' . $this->target->getID() . ' ';
+        $qry .= 'AND notice.is_local != ' . Notice::GATEWAY . ' ';
+
+        if ($since_id != 0) {
+            $qry .= 'AND notice.id > ' . $since_id . ' ';
+        }
+
+        if ($max_id != 0) {
+            $qry .= 'AND notice.id <= ' . $max_id . ' ';
+        }
+
+        // NOTE: we sort by bookmark time, not by notice time!
+        $qry .= 'ORDER BY created DESC ';
+        if (!is_null($offset)) {
+            $qry .= "LIMIT $limit OFFSET $offset";
+        }
+
+        $notice->query($qry);
+        $ids = array();
+        while ($notice->fetch()) {
+            $ids[] = $notice->id;
+        }
+
+        $notice->free();
+        unset($notice);
+        return $ids;
+    }
+}
+
+class EventsNoticeStream extends ScopingNoticeStream
+{
+    function __construct(Profile $target, Profile $scoped=null)
+    {
+        $stream = new RawEventsNoticeStream($target);
+
+        if ($target->sameAs($scoped)) {
+            $key = 'bookmark:ids_by_user_own:'.$target->getID();
+        } else {
+            $key = 'bookmark:ids_by_user:'.$target->getID();
+        }
+
+        parent::__construct(new CachingNoticeStream($stream, $key), $scoped);
+    }
+}
index 438ea803ae999c184f56dc77af9988c86c5906d2..b10a5f06ac9525cef1798250fce92fa6adcc8178 100644 (file)
@@ -96,7 +96,7 @@ class FavoritePlugin extends ActivityVerbHandlerPlugin
                                          '    modified = "%s" '.
                                          'WHERE user_id = %d '.
                                          'AND notice_id = %d',
-                                         Fave::newUri($fave->user_id, $fave->notice_id, $fave->modified),
+                                         Fave::newUri($fave->getActor(), $fave->getTarget(), $fave->modified),
                                          common_sql_date(strtotime($fave->modified)),
                                          $fave->user_id,
                                          $fave->notice_id));
index 5e715e895b78463c25f225d5466bb297d317038e..c51e0bfad1626e983e0a5bf8f1581b37856628bf 100644 (file)
@@ -35,6 +35,24 @@ class OembedPlugin extends Plugin
         $m->connect('main/oembed', array('action' => 'oembed'));
     }
 
+    public function onGetRemoteUrlMetadataFromDom($url, DOMDocument $dom, stdClass &$metadata)
+    {
+        try {
+            common_log(LOG_INFO, 'Trying to discover an oEmbed endpoint using link headers.');
+            $api = oEmbedHelper::oEmbedEndpointFromHTML($dom);
+            common_log(LOG_INFO, 'Found API endpoint ' . $api . ' for URL ' . $url);
+            $params = array(
+                'maxwidth' => common_config('thumbnail', 'width'),
+                'maxheight' => common_config('thumbnail', 'height'),
+            );
+            $metadata = oEmbedHelper::getOembedFrom($api, $url, $params);
+
+        } catch (Exception $e) {
+            common_log(LOG_INFO, 'Could not find an oEmbed endpoint using link headers.');
+            // Just ignore it!
+        }
+    }
+
     public function onEndShowHeadElements(Action $action)
     {
         switch ($action->getActionName()) {
index e557e70ddb452fd6dc8a930b3f495b0612f9f69d..c7650a1ff379228869739ad510c800a8da895db9 100644 (file)
@@ -68,12 +68,8 @@ class File_oembed extends Managed_DataObject
     }
 
     static function _getOembed($url) {
-        $parameters = array(
-            'maxwidth' => common_config('thumbnail', 'width'),
-            'maxheight' => common_config('thumbnail', 'height'),
-        );
         try {
-            return oEmbedHelper::getObject($url, $parameters);
+            return oEmbedHelper::getObject($url);
         } catch (Exception $e) {
             common_log(LOG_INFO, "Error during oembed lookup for $url - " . $e->getMessage());
             return false;
index 3454ac7fc76e9791cf95ce7f91611a82c7f2c61f..7abd76109a0e488f4cd8cb31fc6f5b063fcb8a01 100644 (file)
@@ -17,9 +17,7 @@
  * along with this program.     If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 
 /**
@@ -47,8 +45,6 @@ class oEmbedHelper
         'revision3.com' => 'https://revision3.com/api/oembed/',
         'vimeo.com' => 'https://vimeo.com/api/oembed.json',
     );
-    protected static $functionMap = array(
-    );
 
     /**
      * Perform or fake an oEmbed lookup for the given resource.
@@ -71,76 +67,31 @@ class oEmbedHelper
      */
     public static function getObject($url, $params=array())
     {
-        $host = parse_url($url, PHP_URL_HOST);
-        if (substr($host, 0, 4) == 'www.') {
-            $host = substr($host, 4);
-        }
+        common_log(LOG_INFO, 'Checking for remote URL metadata for ' . $url);
 
-        common_log(LOG_INFO, 'Checking for oEmbed data for ' . $url);
+        // TODO: Make this class something like UrlMetadata, or use a dataobject?
+        $metadata = new stdClass();
 
-        // You can fiddle with the order of discovery -- either skipping
-        // some types or re-ordering them.
+        if (Event::handle('GetRemoteUrlMetadata', array($url, &$metadata))) {
+            // If that event didn't return anything, try downloading the body and parse it
+            $body = HTTPClient::quickGet($url);
 
-        $order = common_config('oembed', 'order');
+            // DOMDocument::loadHTML may throw warnings on unrecognized elements,
+            // and notices on unrecognized namespaces.
+            $old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
+            $dom = new DOMDocument();
+            $ok = $dom->loadHTML($body);
+            unset($body);   // storing the DOM in memory is enough...
+            error_reporting($old);
 
-        foreach ($order as $method) {
-
-            switch ($method) {
-            case 'built-in':
-                common_log(LOG_INFO, 'Considering built-in oEmbed methods...');
-                // Blacklist: systems with no oEmbed API of their own, which are
-                // either missing from or broken on noembed.com's proxy.
-                // we know how to look data up in another way...
-                if (array_key_exists($host, self::$functionMap)) {
-                    common_log(LOG_INFO, 'We have a built-in method for ' . $host);
-                    $func = self::$functionMap[$host];
-                    return call_user_func($func, $url, $params);
-                }
-                break;
-            case 'well-known':
-                common_log(LOG_INFO, 'Considering well-known oEmbed endpoints...');
-                // Whitelist: known API endpoints for sites that don't provide discovery...
-                if (array_key_exists($host, self::$apiMap)) {
-                    $api = self::$apiMap[$host];
-                    common_log(LOG_INFO, 'Using well-known endpoint "' . $api . '" for "' . $host . '"');
-                    break 2;
-                }
-                break;
-            case 'discovery':
-                try {
-                    common_log(LOG_INFO, 'Trying to discover an oEmbed endpoint using link headers.');
-                    $api = self::discover($url);
-                    common_log(LOG_INFO, 'Found API endpoint ' . $api . ' for URL ' . $url);
-                    break 2;
-                } catch (Exception $e) {
-                    common_log(LOG_INFO, 'Could not find an oEmbed endpoint using link headers.');
-                    // Just ignore it!
-                }
-                break;
-            case 'service':
-                $api = common_config('oembed', 'endpoint');
-                common_log(LOG_INFO, 'Using service API endpoint ' . $api);
-                break;
+            if (!$ok) {
+                throw new oEmbedHelper_BadHtmlException();
             }
-        }
 
-        if (empty($api)) {
-            // TRANS: Server exception thrown in oEmbed action if no API endpoint is available.
-            throw new ServerException(_('No oEmbed API endpoint available.'));
+            Event::handle('GetRemoteUrlMetadataFromDom', array($url, $dom, &$metadata));
         }
 
-        return self::getObjectFrom($api, $url, $params);
-    }
-
-    /**
-     * Perform basic discovery.
-     * @return string
-     */
-    static function discover($url)
-    {
-        // @fixme ideally skip this for non-HTML stuff!
-        $body = self::http($url);
-        return self::discoverFromHTML($url, $body);
+        return self::normalize($metadata);
     }
 
     /**
@@ -150,19 +101,8 @@ class oEmbedHelper
      * @param string $body HTML body text
      * @return mixed string with URL or false if no target found
      */
-    static function discoverFromHTML($url, $body)
+    static function oEmbedEndpointFromHTML(DOMDocument $dom)
     {
-        // DOMDocument::loadHTML may throw warnings on unrecognized elements,
-        // and notices on unrecognized namespaces.
-        $old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
-        $dom = new DOMDocument();
-        $ok = $dom->loadHTML($body);
-        error_reporting($old);
-
-        if (!$ok) {
-            throw new oEmbedHelper_BadHtmlException();
-        }
-
         // Ok... now on to the links!
         $feeds = array(
             'application/json+oembed' => false,
@@ -206,16 +146,19 @@ class oEmbedHelper
      * @param array $params
      * @return object
      */
-    static function getObjectFrom($api, $url, $params=array())
+    static function getOembedFrom($api, $url, $params=array())
     {
+        if (empty($api)) {
+            // TRANS: Server exception thrown in oEmbed action if no API endpoint is available.
+            throw new ServerException(_('No oEmbed API endpoint available.'));
+        }
         $params['url'] = $url;
         $params['format'] = 'json';
         $key=common_config('oembed','apikey');
         if(isset($key)) {
             $params['key'] = common_config('oembed','apikey');
         }
-        $data = self::json($api, $params);
-        return self::normalize($data);
+        return HTTPClient::quickGetJson($api, $params);
     }
 
     /**
@@ -224,14 +167,11 @@ class oEmbedHelper
      * @param object $orig
      * @return object
      */
-    static function normalize($orig)
+    static function normalize(stdClass $data)
     {
-        $data = clone($orig);
-
         if (empty($data->type)) {
             throw new Exception('Invalid oEmbed data: no type field.');
         }
-
         if ($data->type == 'image') {
             // YFrog does this.
             $data->type = 'photo';
@@ -247,44 +187,6 @@ class oEmbedHelper
 
         return $data;
     }
-
-    /**
-     * Fetch some URL and return JSON data.
-     *
-     * @param string $url
-     * @param array $params query-string params
-     * @return object
-     */
-    static protected function json($url, $params=array())
-    {
-        $data = self::http($url, $params);
-        return json_decode($data);
-    }
-
-    /**
-     * Hit some web API and return data on success.
-     * @param string $url
-     * @param array $params
-     * @return string
-     */
-    static protected function http($url, $params=array())
-    {
-        $client = HTTPClient::start();
-        if ($params) {
-            $query = http_build_query($params, null, '&');
-            if (strpos($url, '?') === false) {
-                $url .= '?' . $query;
-            } else {
-                $url .= '&' . $query;
-            }
-        }
-        $response = $client->get($url);
-        if ($response->isOk()) {
-            return $response->getBody();
-        } else {
-            throw new Exception('Bad HTTP response code: ' . $response->getStatus());
-        }
-    }
 }
 
 class oEmbedHelper_Exception extends Exception
index e49e1a50ddfcd121a941f0c4462f7731f8d608cd..a7e8c9bbc1202d2dac6c7f92110975c74005d7f5 100755 (executable)
@@ -23,7 +23,7 @@ if (!have_option('u', 'url')) {
 
 $url = get_option_value('u', 'url');
 
-print "Contacting URL";
+print "Contacting URL\n";
 
 $oEmbed = oEmbedHelper::getObject($url);
 var_dump($oEmbed);
index 06a2f74771bb8e2be374a38434e30a45f1f9b098..cfdd260591a6198ea9068ad0bfdc215949ca5b12 100755 (executable)
@@ -333,7 +333,7 @@ function initSubscriptionURI()
                                     'set uri = "%s" '.
                                     'where subscriber = %d '.
                                     'and subscribed = %d',
-                                    Subscription::newURI($sub->subscriber, $sub->subscribed, $sub->created),
+                                    $sub->escape(Subscription::newUri($sub->getSubscriber(), $sub->getSubscribed(), $sub->created)),
                                     $sub->subscriber,
                                     $sub->subscribed));
             } catch (Exception $e) {
index be9b80d41c5b9fbad12b35f552d2a408cccd3490..db814aa28e6d808b3c3a7622222181dd6306cb6f 100644 (file)
@@ -236,10 +236,10 @@ address img {
 
 /* site nav local views */
 
-#site_nav_local_views H3 {
-    margin-bottom: 10px;
-    padding-bottom: 6px;
-    background: url('../images/brdr_black_dot.png') repeat-x bottom left;
+#site_nav_local_views h3 {
+    border-bottom: 1px dashed gray;
+    margin-bottom: 1ex;
+    padding-bottom: 1ex;
     color: #7a7c87;
     font-size: 1.1em;
     letter-spacing: 2px;
@@ -249,11 +249,9 @@ address img {
 
 #site_nav_local_views a {
     display: block;
-    width: 118px;
-    padding: 0px 10px 1px 10px;
-    -webkit-border-radius: 4px;
-    -moz-border-radius: 4px;
-    border-radius: 4px;
+    line-height: 1em;
+    padding: 1ex;
+    border-radius: 0.5ex;
     text-transform: uppercase;
     text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.5);
     word-wrap: break-word;