]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
merge 0.9.x into 1.0.x
authorEvan Prodromou <evan@status.net>
Wed, 4 May 2011 21:59:39 +0000 (14:59 -0700)
committerEvan Prodromou <evan@status.net>
Wed, 4 May 2011 21:59:39 +0000 (14:59 -0700)
1  2 
README
actions/newapplication.php
classes/Notice.php
lib/action.php
lib/activityimporter.php
lib/default.php
lib/router.php
lib/statusnet.php
plugins/Bookmark/Bookmark.php
plugins/Bookmark/deliciousbackupimporter.php
plugins/GroupPrivateMessage/Group_message_profile.php

diff --cc README
Simple merge
index ca5d902a268d1f7bd2ab8d09c2546b15aa17ce67,657c7bcb71c4b3a64422708c311d7c874fded1ad..93ef417f63900064c133651c3fd3de56ff68d177
@@@ -295,9 -294,8 +295,8 @@@ class NewApplicationAction extends Owne
              $app->uploadLogo();
          } catch (Exception $e) {
              $app->query('ROLLBACK');
-             // TRANS: Form validation error on New application page when providing an invalid image upload.
              $this->showForm(_('Invalid image.'));
-           return;
 -          return;      
++              return;  
        }
  
          $app->query('COMMIT');
index ba66dd8054440ffd1297f0fd3b2d37e93d5dc5c9,d513695192ce3d5cefd67c3754cd17ba9f79db97..87363158dd7bd9353ed06b07f27f087d1ec84488
@@@ -570,11 -454,10 +570,11 @@@ class Notice extends Memcached_DataObje
          // XXX: Before we were blowing the casche only if the notice id
          // was not the root of the conversation.  What to do now?
  
 -        $this->blowStream('notice:conversation_ids:%d', $this->conversation);
 +        self::blow('notice:conversation_ids:%d', $this->conversation);
 +        self::blow('conversation::notice_count:%d', $this->conversation);
  
          if (!empty($this->repeat_of)) {
-             self::blow('notice:repeats:%d', $this->repeat_of);
+             $this->blowStream('notice:repeats:%d', $this->repeat_of);
          }
  
          $original = Notice::staticGet('id', $this->repeat_of);
          if ($this->isPublic()) {
              self::blow('public;last');
          }
 +
 +        self::blow('fave:by_notice', $this->id);
 +
 +        if ($this->conversation) {
 +            // In case we're the first, will need to calc a new root.
 +            self::blow('notice:conversation_root:%d', $this->conversation);
 +        }
 +
 +        $ptags = $this->getProfileTags();
 +        foreach ($ptags as $ptag) {
 +            $ptag->blowNoticeStreamCache(true);
 +        }
      }
  
+     function blowStream()
+     {
+         $c = self::memcache();
+         if (empty($c)) {
+             return false;
+         }
+         $args = func_get_args();
+         $format = array_shift($args);
+         $keyPart = vsprintf($format, $args);
+         $cacheKey = Cache::key($keyPart);
+         
+         $c->delete($cacheKey);
+         // delete the "last" stream, too, if this notice is
+         // older than the top of that stream
+         $lastKey = $cacheKey.';last';
+         $lastStr = $c->get($lastKey);
+         if ($lastStr !== false) {
+             $window     = explode(',', $lastStr);
+             $lastID     = $window[0];
+             $lastNotice = Notice::staticGet('id', $lastID);
+             if (empty($lastNotice) // just weird
+                 || strtotime($lastNotice->created) >= strtotime($this->created)) {
+                 $c->delete($lastKey);
+             }
+         }
+     }
      /** save all urls in the notice to the db
       *
       * follow redirects and save all available file information
diff --cc lib/action.php
index a16a02757309f7c73aef92e3df6fd21af30f3e98,fef425926436e58d64a3dcda0f973e1f5ab29775..3492873c5981574b7d29e71a08641759f901cca6
@@@ -324,18 -295,12 +324,20 @@@ class Action extends HTMLOutputter // l
              }
              if (Event::handle('StartShowStatusNetScripts', array($this)) &&
                  Event::handle('StartShowLaconicaScripts', array($this))) {
 -                $this->script('util.min.js');
 +                if (common_config('site', 'minify')) {
 +                    $this->script('util.min.js');
 +                } else {
 +                    $this->script('util.js');
 +                    $this->script('xbImportNode.js');
 +                    $this->script('geometa.js');
 +                }
 +                $this->inlineScript('var _peopletagAC = "' .
 +                    common_local_url('peopletagautocomplete') . '";');
                  $this->showScriptMessages();
                  // Frame-busting code to avoid clickjacking attacks.
-                 $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+                 if (common_config('javascript', 'bustframes')) {
+                     $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+                 }
                  Event::handle('EndShowStatusNetScripts', array($this));
                  Event::handle('EndShowLaconicaScripts', array($this));
              }
Simple merge
diff --cc lib/default.php
Simple merge
diff --cc lib/router.php
Simple merge
Simple merge
Simple merge