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)
|
||||
else {
|
||||
$reply_notification_to = false;
|
||||
// check for reply to insert in notifications
|
||||
if($notice->reply_to) {
|
||||
$replyparent = $notice->getParent();
|
||||
|
|
|
@ -55,9 +55,10 @@ class ApiNewNotificationsAction extends ApiAction
|
|||
{
|
||||
parent::handle();
|
||||
|
||||
$user_id = Profile::current()->id;
|
||||
|
||||
$new_notifications = array();
|
||||
if($user_id) {
|
||||
if(Profile::current()) {
|
||||
$user_id = Profile::current()->id;
|
||||
$notification = new QvitterNotification();
|
||||
|
||||
$notification->selectAdd();
|
||||
|
|
|
@ -128,6 +128,10 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
|
|||
|
||||
$profile = ($this->auth_user) ? $this->auth_user->getProfile() : null;
|
||||
|
||||
if(!$profile instanceof Profile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$stream = new NotificationStream($profile);
|
||||
|
||||
$notifications = $stream->getNotifications(($this->page - 1) * $this->count,
|
||||
|
|
|
@ -102,9 +102,9 @@ class QvitterAction extends ApiAction
|
|||
<title><?php print $sitetitle; ?></title>
|
||||
<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">
|
||||
<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="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
|
||||
|
||||
// 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.registrationsClosed = <?php print json_encode($registrationsclosed) ?>;
|
||||
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.apiRoot = '<?php print common_path("api/", true); ?>';
|
||||
window.avatarRoot = '<?php print common_path("avatar/", true); ?>';
|
||||
|
@ -212,9 +218,7 @@ class QvitterAction extends ApiAction
|
|||
<span class="caret-inner"></span>
|
||||
</li>
|
||||
<li><a id="settings"></a></li>
|
||||
<?php
|
||||
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 class="dropdown-divider"></li>
|
||||
<li><a id="logout"></a></li>
|
||||
<li class="language dropdown-divider"></li>
|
||||
<li class="language"><a class="language-link" title="Arabic" data-lang-code="ar">العربيّة</a></li>
|
||||
|
@ -233,6 +237,7 @@ class QvitterAction extends ApiAction
|
|||
<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>
|
||||
</ul>
|
||||
<div id="birds-top"></div>
|
||||
<div class="global-nav">
|
||||
<div class="global-nav-inner">
|
||||
<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.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/dom-functions.js?v=23"></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/ajax-functions.js?v=10"></script>
|
||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=24"></script>
|
||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=19"></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=19"></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=25"></script>
|
||||
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=20"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ button.icon.nav-search,
|
|||
.upload-cover-photo,
|
||||
button.shorten i,
|
||||
.reload-stream {
|
||||
background-image: url("../img/sprite.png?v=5");
|
||||
background-image: url("../img/sprite.png?v=6");
|
||||
background-size: 500px 1329px;
|
||||
}
|
||||
|
||||
|
@ -411,9 +411,9 @@ body.rtl .dropdown-menu li:not(.dropdown-caret) {
|
|||
}
|
||||
|
||||
#birds-top {
|
||||
background-position: -193px -3px;
|
||||
background-position: -385px -5px;
|
||||
display: block;
|
||||
height: 64px;
|
||||
height: 75px;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
width: 103px;
|
||||
|
@ -3730,9 +3730,10 @@ body.rtl #feed {
|
|||
float: left;
|
||||
}
|
||||
body.rtl #birds-top {
|
||||
background-position: -205px -74px;
|
||||
background-position: -400px -100px;
|
||||
right:auto;
|
||||
left:-3px;
|
||||
width:100px;
|
||||
}
|
||||
body.rtl .language-dropdown {
|
||||
float:left;
|
||||
|
|
|
@ -88,7 +88,7 @@ class ApiAuthAction extends ApiAction
|
|||
|
||||
// qvitterfix, accepts regular login session
|
||||
if ($this->scoped) {
|
||||
$this->auth_user = $this->scoped;
|
||||
$this->auth_user = $this->scoped->getUser();
|
||||
$this->access = self::READ_WRITE;
|
||||
}
|
||||
|
||||
|
|
|
@ -933,7 +933,7 @@ function expand_queet(q,doScrolling) {
|
|||
getFromAPI("attachment/" + attachmentId + ".json",function(data){
|
||||
if(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
|
||||
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).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
|
||||
|
@ -863,6 +854,7 @@ $(document).on('click','a', function(e) {
|
|||
|
||||
// external groups
|
||||
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).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
|
||||
|
|
|
@ -19,8 +19,10 @@ GitHub: => https://github.com/knuthollund
|
|||
|
||||
|
||||
$query = $_SERVER['QUERY_STRING'];
|
||||
if(strlen($query)>0) {
|
||||
$shortenerUrl = 'http://qttr.at/yourls-api.php?' . $query;
|
||||
print file_get_contents($shortenerUrl);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user