various bugfixes
This commit is contained in:
parent
45adaa560a
commit
0c9bf23e80
|
@ -395,6 +395,7 @@ class QvitterPlugin extends Plugin {
|
||||||
|
|
||||||
// replies and mentions (no notifications for these if this is a repeat)
|
// replies and mentions (no notifications for these if this is a repeat)
|
||||||
else {
|
else {
|
||||||
|
$reply_notification_to = false;
|
||||||
// check for reply to insert in notifications
|
// check for reply to insert in notifications
|
||||||
if($notice->reply_to) {
|
if($notice->reply_to) {
|
||||||
$replyparent = $notice->getParent();
|
$replyparent = $notice->getParent();
|
||||||
|
|
|
@ -55,9 +55,10 @@ class ApiNewNotificationsAction extends ApiAction
|
||||||
{
|
{
|
||||||
parent::handle();
|
parent::handle();
|
||||||
|
|
||||||
$user_id = Profile::current()->id;
|
|
||||||
$new_notifications = array();
|
$new_notifications = array();
|
||||||
if($user_id) {
|
if(Profile::current()) {
|
||||||
|
$user_id = Profile::current()->id;
|
||||||
$notification = new QvitterNotification();
|
$notification = new QvitterNotification();
|
||||||
|
|
||||||
$notification->selectAdd();
|
$notification->selectAdd();
|
||||||
|
|
|
@ -127,7 +127,11 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
|
||||||
$notices = array();
|
$notices = array();
|
||||||
|
|
||||||
$profile = ($this->auth_user) ? $this->auth_user->getProfile() : null;
|
$profile = ($this->auth_user) ? $this->auth_user->getProfile() : null;
|
||||||
|
|
||||||
|
if(!$profile instanceof Profile) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$stream = new NotificationStream($profile);
|
$stream = new NotificationStream($profile);
|
||||||
|
|
||||||
$notifications = $stream->getNotifications(($this->page - 1) * $this->count,
|
$notifications = $stream->getNotifications(($this->page - 1) * $this->count,
|
||||||
|
|
|
@ -102,9 +102,9 @@ class QvitterAction extends ApiAction
|
||||||
<title><?php print $sitetitle; ?></title>
|
<title><?php print $sitetitle; ?></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
|
||||||
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/qvitter.css?v=19" />
|
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/qvitter.css?v=20" />
|
||||||
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/jquery.minicolors.css" />
|
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/jquery.minicolors.css" />
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?>favicon.ico?v=2">
|
<link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?>favicon.ico?v=3">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// if qvitter is a webapp and this is a users url we add feeds
|
// if qvitter is a webapp and this is a users url we add feeds
|
||||||
|
@ -155,7 +155,13 @@ class QvitterAction extends ApiAction
|
||||||
window.textLimit = <?php print json_encode((int)common_config('site','textlimit')) ?>;
|
window.textLimit = <?php print json_encode((int)common_config('site','textlimit')) ?>;
|
||||||
window.registrationsClosed = <?php print json_encode($registrationsclosed) ?>;
|
window.registrationsClosed = <?php print json_encode($registrationsclosed) ?>;
|
||||||
window.siteTitle = <?php print json_encode($sitetitle) ?>;
|
window.siteTitle = <?php print json_encode($sitetitle) ?>;
|
||||||
window.loggedIn = <?php print json_encode($logged_in_user_obj) ?>;
|
window.loggedIn = <?php
|
||||||
|
|
||||||
|
$logged_in_user_json = json_encode($logged_in_user_obj);
|
||||||
|
$logged_in_user_json = str_replace('http:\/\/quitter.se\/','https:\/\/quitter.se\/',$logged_in_user_json);
|
||||||
|
print $logged_in_user_json;
|
||||||
|
|
||||||
|
?>;
|
||||||
window.timeBetweenPolling = <?php print QvitterPlugin::settings("timebetweenpolling"); ?>;
|
window.timeBetweenPolling = <?php print QvitterPlugin::settings("timebetweenpolling"); ?>;
|
||||||
window.apiRoot = '<?php print common_path("api/", true); ?>';
|
window.apiRoot = '<?php print common_path("api/", true); ?>';
|
||||||
window.avatarRoot = '<?php print common_path("avatar/", true); ?>';
|
window.avatarRoot = '<?php print common_path("avatar/", true); ?>';
|
||||||
|
@ -212,9 +218,7 @@ class QvitterAction extends ApiAction
|
||||||
<span class="caret-inner"></span>
|
<span class="caret-inner"></span>
|
||||||
</li>
|
</li>
|
||||||
<li><a id="settings"></a></li>
|
<li><a id="settings"></a></li>
|
||||||
<?php
|
<li class="dropdown-divider"></li>
|
||||||
if($siterootdomain == 'quitter.se') { print '<li><a id="classic" href="https://old.quitter.se/">Classic Quitter</a></li>'; } // sry for this junk
|
|
||||||
?><li class="dropdown-divider"></li>
|
|
||||||
<li><a id="logout"></a></li>
|
<li><a id="logout"></a></li>
|
||||||
<li class="language dropdown-divider"></li>
|
<li class="language dropdown-divider"></li>
|
||||||
<li class="language"><a class="language-link" title="Arabic" data-lang-code="ar">العربيّة</a></li>
|
<li class="language"><a class="language-link" title="Arabic" data-lang-code="ar">العربيّة</a></li>
|
||||||
|
@ -232,7 +236,8 @@ class QvitterAction extends ApiAction
|
||||||
<li class="language"><a class="language-link" title="Norwegian" data-lang-code="no">Norsk</a></li>
|
<li class="language"><a class="language-link" title="Norwegian" data-lang-code="no">Norsk</a></li>
|
||||||
<li class="language"><a class="language-link" title="Português-Brasil" data-lang-code="pt_br">Português-Brasil</a></li>
|
<li class="language"><a class="language-link" title="Português-Brasil" data-lang-code="pt_br">Português-Brasil</a></li>
|
||||||
<li class="language"><a class="language-link" title="Swedish" data-lang-code="sv">svenska</a></li>
|
<li class="language"><a class="language-link" title="Swedish" data-lang-code="sv">svenska</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div id="birds-top"></div>
|
||||||
<div class="global-nav">
|
<div class="global-nav">
|
||||||
<div class="global-nav-inner">
|
<div class="global-nav-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -381,11 +386,11 @@ class QvitterAction extends ApiAction
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.minicolors.min.js"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.minicolors.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.jWindowCrop.js"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.jWindowCrop.js"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/load-image.min.js"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/load-image.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?v=23"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?v=24"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=18"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=19"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?v=10"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?v=11"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=24"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=25"></script>
|
||||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=19"></script>
|
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=20"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ button.icon.nav-search,
|
||||||
.upload-cover-photo,
|
.upload-cover-photo,
|
||||||
button.shorten i,
|
button.shorten i,
|
||||||
.reload-stream {
|
.reload-stream {
|
||||||
background-image: url("../img/sprite.png?v=5");
|
background-image: url("../img/sprite.png?v=6");
|
||||||
background-size: 500px 1329px;
|
background-size: 500px 1329px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,9 +411,9 @@ body.rtl .dropdown-menu li:not(.dropdown-caret) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#birds-top {
|
#birds-top {
|
||||||
background-position: -193px -3px;
|
background-position: -385px -5px;
|
||||||
display: block;
|
display: block;
|
||||||
height: 64px;
|
height: 75px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 103px;
|
width: 103px;
|
||||||
|
@ -3730,9 +3730,10 @@ body.rtl #feed {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
body.rtl #birds-top {
|
body.rtl #birds-top {
|
||||||
background-position: -205px -74px;
|
background-position: -400px -100px;
|
||||||
right:auto;
|
right:auto;
|
||||||
left:-3px;
|
left:-3px;
|
||||||
|
width:100px;
|
||||||
}
|
}
|
||||||
body.rtl .language-dropdown {
|
body.rtl .language-dropdown {
|
||||||
float:left;
|
float:left;
|
||||||
|
|
|
@ -88,7 +88,7 @@ class ApiAuthAction extends ApiAction
|
||||||
|
|
||||||
// qvitterfix, accepts regular login session
|
// qvitterfix, accepts regular login session
|
||||||
if ($this->scoped) {
|
if ($this->scoped) {
|
||||||
$this->auth_user = $this->scoped;
|
$this->auth_user = $this->scoped->getUser();
|
||||||
$this->access = self::READ_WRITE;
|
$this->access = self::READ_WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -933,7 +933,7 @@ function expand_queet(q,doScrolling) {
|
||||||
getFromAPI("attachment/" + attachmentId + ".json",function(data){
|
getFromAPI("attachment/" + attachmentId + ".json",function(data){
|
||||||
if(data) {
|
if(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
q.children('.queet').find('.queet-text').html($.trim(data.replace(/@<span class="vcard">/gi,'<span class="vcard">').replace(/@<span class="vcard">/gi,'<span class="vcard">').replace(/!<span class="vcard">/gi,'<span class="vcard">').replace(/#<span class="tag">/gi,'<span class="tag">')));
|
q.children('.queet').find('.queet-text').html($.trim(data.replace(/@<a href="/gi,'<a href="').replace(/!<a href="/gi,'<a href="').replace(/@<span class="vcard">/gi,'<span class="vcard">').replace(/!<span class="vcard">/gi,'<span class="vcard">').replace(/#<span class="tag">/gi,'<span class="tag">').replace(/@<span class="vcard">/gi,'<span class="vcard">').replace(/@<span class="vcard">/gi,'<span class="vcard">').replace(/!<span class="vcard">/gi,'<span class="vcard">').replace(/#<span class="tag">/gi,'<span class="tag">')));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -427,16 +427,6 @@ function keyupSetBGColor(hex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// go to standard settingspage
|
|
||||||
$('body').on('click','#moresettings',function(){
|
|
||||||
$(document.body).append('<iframe id="logout-iframe" src="https://quitter.se/main/logout" style="display:none;">'); // we need to logout before login, otherwise redirection to settingspage doesn't work
|
|
||||||
$('iframe#logout-iframe').load(function() {
|
|
||||||
$('#moresettings').children('form').submit(); // submit hidden form and open settingspage in new tab
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ·
|
/* ·
|
||||||
|
@ -807,6 +797,7 @@ $(document).on('click','a', function(e) {
|
||||||
|
|
||||||
// external profiles
|
// external profiles
|
||||||
else if (($(this).children('span.mention').length>0 // if it's a mention
|
else if (($(this).children('span.mention').length>0 // if it's a mention
|
||||||
|
|| $(this).hasClass('h-card mention') // if it's a newer gnusocial group mention
|
||||||
|| ($(this).hasClass('account-group') && $(this).attr('href').indexOf('/group/')==-1) // or if this is queet stream item header but not a group
|
|| ($(this).hasClass('account-group') && $(this).attr('href').indexOf('/group/')==-1) // or if this is queet stream item header but not a group
|
||||||
|| ($(this).closest('.stream-item').hasClass('activity') && $(this).attr('href').indexOf('/group/')==-1)) // or if it's a activity notice but not a group link
|
|| ($(this).closest('.stream-item').hasClass('activity') && $(this).attr('href').indexOf('/group/')==-1)) // or if it's a activity notice but not a group link
|
||||||
&& typeof window.loggedIn.screen_name != 'undefined') { // if logged in
|
&& typeof window.loggedIn.screen_name != 'undefined') { // if logged in
|
||||||
|
@ -863,6 +854,7 @@ $(document).on('click','a', function(e) {
|
||||||
|
|
||||||
// external groups
|
// external groups
|
||||||
else if (($(this).children('span.group').length>0 // if it's a group mention
|
else if (($(this).children('span.group').length>0 // if it's a group mention
|
||||||
|
|| $(this).hasClass('h-card group') // if it's a newer gnusocial group mention
|
||||||
|| ($(this).hasClass('account-group') && $(this).attr('href').indexOf('/group/')>-1) // or if this is group stream item header
|
|| ($(this).hasClass('account-group') && $(this).attr('href').indexOf('/group/')>-1) // or if this is group stream item header
|
||||||
|| ($(this).closest('.stream-item').hasClass('activity') && $(this).attr('href').indexOf('/group/')>-1)) // or if it's a activity notice
|
|| ($(this).closest('.stream-item').hasClass('activity') && $(this).attr('href').indexOf('/group/')>-1)) // or if it's a activity notice
|
||||||
&& typeof window.loggedIn.screen_name != 'undefined') { // if logged in
|
&& typeof window.loggedIn.screen_name != 'undefined') { // if logged in
|
||||||
|
|
|
@ -19,8 +19,10 @@ GitHub: => https://github.com/knuthollund
|
||||||
|
|
||||||
|
|
||||||
$query = $_SERVER['QUERY_STRING'];
|
$query = $_SERVER['QUERY_STRING'];
|
||||||
$shortenerUrl = 'http://qttr.at/yourls-api.php?' . $query;
|
if(strlen($query)>0) {
|
||||||
print file_get_contents($shortenerUrl);
|
$shortenerUrl = 'http://qttr.at/yourls-api.php?' . $query;
|
||||||
|
print file_get_contents($shortenerUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user