aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/comanche.php9
-rwxr-xr-xinclude/items.php4
-rw-r--r--include/oauth.php8
3 files changed, 7 insertions, 14 deletions
diff --git a/include/comanche.php b/include/comanche.php
index 9fe7dc255..65f64be5c 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -170,17 +170,12 @@ function comanche_block($s, $class = '') {
if($r) {
$o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">');
- if($r[0]['title'] && trim($r[0]['title']) != '$content') {
+ if($r[0]['title'] && trim($r[0]['body']) != '$content') {
$o .= '<h3>' . $r[0]['title'] . '</h3>';
}
- if($r[0]['title'] && trim($r[0]['title']) === '$content' && get_app()->data['webpage'][0]['title']) {
- $o .= '<h3>' . get_app()->page['title'] . '</h3>';
- }
-
-
if(trim($r[0]['body']) === '$content') {
- $o .= prepare_text(get_app()->page['content'], get_app()->data['webpage'][0]['mimetype']);
+ $o .= get_app()->page['content'];
}
else {
$o .= prepare_text($r[0]['body'], $r[0]['mimetype']);
diff --git a/include/items.php b/include/items.php
index 57a7774fd..71d4213b7 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4389,8 +4389,6 @@ function zot_feed($uid,$observer_hash,$arr) {
$mindate = null;
$message_id = null;
- require_once('include/security.php');
-
if(array_key_exists('mindate',$arr)) {
$mindate = datetime_convert('UTC','UTC',$arr['mindate']);
}
@@ -4404,7 +4402,7 @@ function zot_feed($uid,$observer_hash,$arr) {
$mindate = dbesc($mindate);
- logger('zot_feed: requested for uid ' . $uid . ' from observer ' . $observer_xchan, LOGGER_DEBUG);
+ logger('zot_feed: requested for uid ' . $uid . ' from observer ' . $observer_hash, LOGGER_DEBUG);
if($message_id)
logger('message_id: ' . $message_id,LOGGER_DEBUG);
diff --git a/include/oauth.php b/include/oauth.php
index ec754db95..a9509c68e 100644
--- a/include/oauth.php
+++ b/include/oauth.php
@@ -75,12 +75,12 @@ class FKOAuthDataStore extends OAuthDataStore {
$k = $consumer;
}
- $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP()+%d)",
+ $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', %d)",
dbesc($key),
dbesc($sec),
dbesc($k),
'request',
- intval(REQUEST_TOKEN_DURATION));
+ time()+intval(REQUEST_TOKEN_DURATION));
if (!$r) return null;
return new OAuthToken($key,$sec);
@@ -104,12 +104,12 @@ class FKOAuthDataStore extends OAuthDataStore {
$key = $this->gen_token();
$sec = $this->gen_token();
- $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP()+%d, %d)",
+ $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', %d, %d)",
dbesc($key),
dbesc($sec),
dbesc($consumer->key),
'access',
- intval(ACCESS_TOKEN_DURATION),
+ time()+intval(ACCESS_TOKEN_DURATION),
intval($uverifier));
if ($r)