Esse commit está contido em:
Hannes Mannerheim
2016-01-18 01:24:37 +01:00
commit 33bf3e2912
25 arquivos alterados com 95 adições e 95 exclusões
+1 -1
Ver Arquivo
@@ -5,7 +5,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+2 -2
Ver Arquivo
@@ -10,7 +10,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· ·
@@ -169,7 +169,7 @@ class ApiQvitterAllFollowingAction extends ApiBareAuthAction
$this->since_id,
$this->max_id
);
if(!empty($group)) {
while ($group->fetch()) {
$groups[] = clone($group);
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -10,7 +10,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -10,7 +10,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -4,7 +4,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -4,7 +4,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+8 -8
Ver Arquivo
@@ -1,11 +1,11 @@
<?php
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -15,7 +15,7 @@
· o> \\\\_\ ·
· \\) \____) ·
· ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
@@ -31,7 +31,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
if (!defined('GNUSOCIAL')) { exit(1); }
@@ -70,16 +70,16 @@ class ApiQvitterUpdateBackgroundColorAction extends ApiAuthAction
protected function handle()
{
parent::handle();
$validhex = preg_match('/^[a-f0-9]{6}$/i',$this->backgroundcolor);
if ($validhex === false || $validhex == 0) {
$this->clientError(_('Not a valid hex color.'), 400);
}
Profile_prefs::setData($this->scoped, 'theme', 'backgroundcolor', $this->backgroundcolor);
// unset background-image
Profile_prefs::setData($this->scoped, 'qvitter', 'background_image', '');
Profile_prefs::setData($this->scoped, 'qvitter', 'background_image', '');
$twitter_user = $this->twitterUserArray($this->scoped, true);
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+8 -8
Ver Arquivo
@@ -1,11 +1,11 @@
<?php
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -15,7 +15,7 @@
· o> \\\\_\ ·
· \\) \____) ·
· ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
@@ -31,10 +31,10 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
if (!defined('GNUSOCIAL')) { exit(1); }
class ApiQvitterUpdateLinkColorAction extends ApiAuthAction
@@ -72,12 +72,12 @@ class ApiQvitterUpdateLinkColorAction extends ApiAuthAction
protected function handle()
{
parent::handle();
$validhex = preg_match('/^[a-f0-9]{6}$/i',$this->linkcolor);
if ($validhex === false || $validhex == 0) {
$this->clientError(_('Not a valid hex color.'), 400);
}
// save the new color
Profile_prefs::setData($this->scoped, 'theme', 'linkcolor', $this->linkcolor);
+4 -4
Ver Arquivo
@@ -1,10 +1,10 @@
<?php
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -14,7 +14,7 @@
· o> \\\\_\ ·
· \\) \____) ·
· ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
@@ -30,7 +30,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
if (!defined('STATUSNET')) {
+2 -2
Ver Arquivo
@@ -5,7 +5,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -93,7 +93,7 @@ class ApiToggleQvitterAction extends ApiAuthAction
if(!$pref_saved) {
$result['success'] = false;
$result['error'] = 'Probably couldn\'t get topic from pref table';
$result['error'] = 'Probably couldn\'t get topic from pref table';
}
$this->initDocument('json');
+13 -13
Ver Arquivo
@@ -1,14 +1,14 @@
<?php
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
· ·
· Update the avatar
· ·
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· ·
@@ -17,9 +17,9 @@
· (____/ ·
· (o< ·
· o> \\\\_\ ·
· \\) \____) ·
· \\) \____) ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
· the Free Software Foundation, either version three of the License or (at ·
@@ -34,7 +34,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
@@ -63,8 +63,8 @@ class ApiUpdateAvatarAction extends ApiAuthAction
$this->cropH = $this->trimmed('cropH');
$this->cropX = $this->trimmed('cropX');
$this->cropY = $this->trimmed('cropY');
$this->img = $this->trimmed('img');
$this->img = $this->trimmed('img');
return true;
}
@@ -87,7 +87,7 @@ class ApiUpdateAvatarAction extends ApiAuthAction
$base64img_mime = 'image/png';
}
$base64img = str_replace('data:image/jpeg;base64,', '', $base64img);
$base64img = str_replace('data:image/png;base64,', '', $base64img);
$base64img = str_replace('data:image/png;base64,', '', $base64img);
$base64img = str_replace(' ', '+', $base64img);
$base64img_hash = md5($base64img);
$base64img = base64_decode($base64img);
@@ -98,8 +98,8 @@ class ApiUpdateAvatarAction extends ApiAuthAction
$base64img_mimetype = MediaFile::getUploadedMimeType($base64img_path, $base64img_filename);
$mediafile = new MediaFile($profile, $base64img_filename, $base64img_mimetype);
$imagefile = new ImageFile($mediafile->fileRecord->id, File::path($mediafile->filename));
$imagefile->resizeTo(File::path($mediafile->filename), array('width'=>$this->cropW, 'height'=>$this->cropH, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH));
$imagefile->resizeTo(File::path($mediafile->filename), array('width'=>$this->cropW, 'height'=>$this->cropH, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH));
$type = $imagefile->preferredType();
$filename = Avatar::filename(
$profile->id,
@@ -114,7 +114,7 @@ class ApiUpdateAvatarAction extends ApiAuthAction
$profile = $this->user->getProfile();
$profile->setOriginal($filename);
$mediafile->delete();
$twitter_user = $this->twitterUserArray($profile, true);
+15 -15
Ver Arquivo
@@ -1,14 +1,14 @@
<?php
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
· ·
· Update the cover photo ·
· ·
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· ·
@@ -17,9 +17,9 @@
· (____/ ·
· (o< ·
· o> \\\\_\ ·
· \\) \____) ·
· \\) \____) ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
· the Free Software Foundation, either version three of the License or (at ·
@@ -34,7 +34,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
@@ -63,8 +63,8 @@ class ApiUpdateBackgroundImageAction extends ApiAuthAction
$this->cropH = $this->trimmed('cropW'); // note W, we want a square
$this->cropX = $this->trimmed('cropX');
$this->cropY = $this->trimmed('cropY');
$this->img = $this->trimmed('img');
$this->img = $this->trimmed('img');
return true;
}
@@ -87,7 +87,7 @@ class ApiUpdateBackgroundImageAction extends ApiAuthAction
$base64img_mime = 'image/png';
}
$base64img = str_replace('data:image/jpeg;base64,', '', $base64img);
$base64img = str_replace('data:image/png;base64,', '', $base64img);
$base64img = str_replace('data:image/png;base64,', '', $base64img);
$base64img = str_replace(' ', '+', $base64img);
$base64img_hash = md5($base64img);
$base64img = base64_decode($base64img);
@@ -98,13 +98,13 @@ class ApiUpdateBackgroundImageAction extends ApiAuthAction
$base64img_mimetype = MediaFile::getUploadedMimeType($base64img_path, $base64img_filename);
$mediafile = new MediaFile($profile, $base64img_filename, $base64img_mimetype);
$imagefile = new ImageFile($mediafile->fileRecord->id, File::path($mediafile->filename));
$imagefile->resizeTo(File::path($mediafile->filename), array('width'=>1280, 'height'=>1280, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH));
$imagefile->resizeTo(File::path($mediafile->filename), array('width'=>1280, 'height'=>1280, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH));
$result['url'] = File::url($mediafile->filename);
Profile_prefs::setData($profile, 'qvitter', 'background_image', $result['url']);
Profile_prefs::setData($profile, 'qvitter', 'background_image', $result['url']);
$this->initDocument('json');
$this->showJsonObjects($result);
$this->endDocument('json');
$this->endDocument('json');
}
}
+15 -15
Ver Arquivo
@@ -1,14 +1,14 @@
<?php
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
· ·
· Update the cover photo ·
· ·
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· ·
@@ -17,9 +17,9 @@
· (____/ ·
· (o< ·
· o> \\\\_\ ·
· \\) \____) ·
· \\) \____) ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
· the Free Software Foundation, either version three of the License or (at ·
@@ -34,7 +34,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
@@ -63,8 +63,8 @@ class ApiUpdateCoverPhotoAction extends ApiAuthAction
$this->cropH = $this->trimmed('cropH');
$this->cropX = $this->trimmed('cropX');
$this->cropY = $this->trimmed('cropY');
$this->img = $this->trimmed('img');
$this->img = $this->trimmed('img');
return true;
}
@@ -87,7 +87,7 @@ class ApiUpdateCoverPhotoAction extends ApiAuthAction
$base64img_mime = 'image/png';
}
$base64img = str_replace('data:image/jpeg;base64,', '', $base64img);
$base64img = str_replace('data:image/png;base64,', '', $base64img);
$base64img = str_replace('data:image/png;base64,', '', $base64img);
$base64img = str_replace(' ', '+', $base64img);
$base64img_hash = md5($base64img);
$base64img = base64_decode($base64img);
@@ -98,13 +98,13 @@ class ApiUpdateCoverPhotoAction extends ApiAuthAction
$base64img_mimetype = MediaFile::getUploadedMimeType($base64img_path, $base64img_filename);
$mediafile = new MediaFile($profile, $base64img_filename, $base64img_mimetype);
$imagefile = new ImageFile($mediafile->fileRecord->id, File::path($mediafile->filename));
$imagefile->resizeTo(File::path($mediafile->filename), array('width'=>$this->cropW, 'height'=>$this->cropH, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH));
$imagefile->resizeTo(File::path($mediafile->filename), array('width'=>$this->cropW, 'height'=>$this->cropH, 'x'=>$this->cropX, 'y'=>$this->cropY, 'w'=>$this->cropW, 'h'=>$this->cropH));
$result['url'] = File::url($mediafile->filename);
Profile_prefs::setData($profile, 'qvitter', 'cover_photo', $result['url']);
Profile_prefs::setData($profile, 'qvitter', 'cover_photo', $result['url']);
$this->initDocument('json');
$this->showJsonObjects($result);
$this->endDocument('json');
$this->endDocument('json');
}
}
+1 -1
Ver Arquivo
@@ -5,7 +5,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -5,7 +5,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+5 -5
Ver Arquivo
@@ -1,11 +1,11 @@
<?php
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -15,7 +15,7 @@
· o> \\\\_\ ·
· \\) \____) ·
· ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
@@ -31,7 +31,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
if (!defined('GNUSOCIAL')) { exit(1); }
@@ -106,7 +106,7 @@ class QvitterLoginAction extends FormAction
}
common_real_login(true);
$this->updateScopedProfile();
$this->updateScopedProfile();
if ($this->boolean('rememberme')) {
common_rememberme($user);
+1 -1
Ver Arquivo
@@ -5,7 +5,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+8 -8
Ver Arquivo
@@ -1,11 +1,11 @@
<?php
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
/* · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· ·
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
@@ -15,7 +15,7 @@
· o> \\\\_\ ·
· \\) \____) ·
· ·
· ·
· ·
· ·
· Qvitter is free software: you can redistribute it and / or modify it ·
· under the terms of the GNU Affero General Public License as published by ·
@@ -31,7 +31,7 @@
· along with Qvitter. If not, see <http://www.gnu.org/licenses/>. ·
· ·
· Contact h@nnesmannerhe.im if you have any questions. ·
· ·
· ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */
@@ -43,7 +43,7 @@ class PublicAndExternalNoticeStream extends ScopingNoticeStream
{
function __construct($profile=null)
{
parent::__construct(new CachingNoticeStream(new RawPublicAndExternalNoticeStream(),
'publicAndExternal'),
$profile);
@@ -69,7 +69,7 @@ class RawPublicAndExternalNoticeStream extends NoticeStream
$notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC);
$notice->whereAdd('is_local !='. Notice::GATEWAY);
$notice->whereAdd('repeat_of IS NULL');
$notice->whereAdd('repeat_of IS NULL');
Notice::addWhereSinceId($notice, $since_id);
Notice::addWhereMaxId($notice, $max_id);
@@ -84,7 +84,7 @@ class RawPublicAndExternalNoticeStream extends NoticeStream
$notice->free();
$notice = NULL;
return $ids;
}
}
}
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -3,7 +3,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -4,7 +4,7 @@
· ·
· Q V I T T E R ·
· ·
· http://github.com/hannesmannerheim/qvitter ·
· https://git.gnu.io/h2p/Qvitter ·
· ·
· ·
· <o) ·
+1 -1
Ver Arquivo
@@ -1,7 +1,7 @@
<?php
/*
This is an example file of how you can utilise http://qttr.at/yourls-api.php URL shortener service from a GNUSocial instance, which is using https.
This is an example file of how you can utilise http://qttr.at/yourls-api.php URL shortener service from a GNUSocial instance, which is using https.
If you run the qvitter code «as is» the browser will stop you from communicate to qttr.at which is currently running http protocol.
This «proxy» return the result from http://qttr.at/yourls-api.php