minor fixes from upstream

This commit is contained in:
zotlabs 2019-01-24 19:03:14 -08:00
parent 0bee1bdb49
commit c43173109e
4 changed files with 4 additions and 101 deletions

View file

@ -61,7 +61,6 @@ class Permissions {
'write_storage' => t('Can upload/modify my file storage and photos'),
'post_wall' => t('Can post on my channel (wall) page'),
'post_comments' => t('Can comment on or like my posts'),
'post_mail' => t('Can send me private mail messages'),
'post_like' => t('Can like/dislike profiles and profile things'),
'tag_deliver' => t('Can forward to all my channel connections via ! mentions in posts'),
'republish' => t('Can source my public posts in derived channels'),

View file

@ -2004,7 +2004,7 @@ class Activity {
}
if($act->obj['type'] === 'Image') {
if($act->obj['type'] === 'Image' && strpos($s['body'],'zrl=' === false) {
$ptr = null;

View file

@ -1,8 +1,7 @@
<?php /** @file */
/**
* OAuth server
* Based on oauth2-php <http://code.google.com/p/oauth2-php/>
* OAuth-1 server
*
*/
@ -11,7 +10,6 @@ define('ACCESS_TOKEN_DURATION', 31536000);
require_once("library/OAuth1.php");
//require_once("library/oauth2-php/lib/OAuth2.inc");
class ZotOAuth1DataStore extends OAuth1DataStore {
@ -177,97 +175,3 @@ class ZotOAuth1 extends OAuth1Server {
}
/*
*
not yet used
class FKOAuth2 extends OAuth2 {
private function db_secret($client_secret){
return hash('whirlpool',$client_secret);
}
public function addClient($client_id, $client_secret, $redirect_uri) {
$client_secret = $this->db_secret($client_secret);
$r = q("INSERT INTO clients (client_id, pw, redirect_uri) VALUES ('%s', '%s', '%s')",
dbesc($client_id),
dbesc($client_secret),
dbesc($redirect_uri)
);
return $r;
}
protected function checkClientCredentials($client_id, $client_secret = NULL) {
$client_secret = $this->db_secret($client_secret);
$r = q("SELECT pw FROM clients WHERE client_id = '%s'",
dbesc($client_id));
if ($client_secret === NULL)
return $result !== FALSE;
return $result["client_secret"] == $client_secret;
}
protected function getRedirectUri($client_id) {
$r = q("SELECT redirect_uri FROM clients WHERE client_id = '%s'",
dbesc($client_id));
if ($r === FALSE)
return FALSE;
return isset($r[0]["redirect_uri"]) && $r[0]["redirect_uri"] ? $r[0]["redirect_uri"] : NULL;
}
protected function getAccessToken($oauth_token) {
$r = q("SELECT client_id, expires, scope FROM tokens WHERE id = '%s'",
dbesc($oauth_token));
if (count($r))
return $r[0];
return null;
}
protected function setAccessToken($oauth_token, $client_id, $expires, $scope = NULL) {
$r = q("INSERT INTO tokens (id, client_id, expires, scope) VALUES ('%s', '%s', %d, '%s')",
dbesc($oauth_token),
dbesc($client_id),
intval($expires),
dbesc($scope));
return $r;
}
protected function getSupportedGrantTypes() {
return array(
OAUTH2_GRANT_TYPE_AUTH_CODE,
);
}
protected function getAuthCode($code) {
$r = q("SELECT id, client_id, redirect_uri, expires, auth_scope FROM auth_codes WHERE id = '%s'",
dbesc($code));
if (count($r))
return $r[0];
return null;
}
protected function setAuthCode($code, $client_id, $redirect_uri, $expires, $scope = NULL) {
$r = q("INSERT INTO auth_codes
(id, client_id, redirect_uri, expires, auth_scope) VALUES
('%s', '%s', '%s', %d, '%s')",
dbesc($code),
dbesc($client_id),
dbesc($redirect_uri),
intval($expires),
dbesc($scope));
return $r;
}
}
*/

View file

@ -743,7 +743,7 @@ function updateConvItems(mode,data) {
/* autocomplete bbcode */
$(".comment-edit-form textarea").bbco_autocomplete('bbcode');
var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; }));
var bimgs = ((preloadImages) ? false : $(".wall-item-body img, .wall-photo-item img").not(function() { return this.complete; }));
var bimgcount = bimgs.length;
if (bimgcount) {
@ -969,7 +969,7 @@ function liveUpdate(notify_id) {
$("#profile-jot-text-loading").hide();
// adjust scroll position if new content was added above viewport
if(update_mode === 'update') {
if(update_mode === 'update' && !justifiedGalleryActive) {
$(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
}