Commit Graph

5554 Commits

Author SHA1 Message Date
Mikael Nordfeldth
72015d499f Actually show all images as <img /> tags.
Browsers should be secure enough by now for this.
2015-03-05 11:59:31 +01:00
Mikael Nordfeldth
3755faf558 SVG files can be used as thumbnails I guess 2015-03-05 11:59:11 +01:00
Mikael Nordfeldth
ff6969302b Some SVG files are "text/html" according to 'file' 2015-03-05 11:54:30 +01:00
Mikael Nordfeldth
22dbeaef29 Used ->find(true) on wrong object 2015-03-04 13:46:51 +01:00
Mikael Nordfeldth
f6df1f1dd3 Documentation and more understandable code. 2015-03-04 13:29:18 +01:00
Mikael Nordfeldth
286b54e527 Use getUrl() on File and File_thumbnail instead of ->url 2015-03-04 13:13:20 +01:00
Mikael Nordfeldth
a4af51b5ba Move thumbnail algorithm mainly to ImageFile class 2015-03-04 13:12:42 +01:00
Mikael Nordfeldth
ec4e432d55 Subscription::ensureStart skips AlreadyFulfilledException
Sometimes we just want to accept the user's wrong, but when it comes
to remote APIs etc. we probably want to let the client know it has
done something already (in this case multiple identical subscription
requests - which might indicate to it that it should refresh the sub
lists or something).
2015-03-04 11:38:04 +01:00
Mikael Nordfeldth
bece816ec7 User class throws exception on register failure 2015-03-01 12:36:19 +01:00
Mikael Nordfeldth
746e658f3e Don't log every included config file
but let us retrieve the list by running GNUsocial::configFiles()
2015-02-28 13:04:17 +01:00
Mikael Nordfeldth
7e65f4f6ea StatusNet to GNU social renaming in minor places 2015-02-27 12:55:25 +01:00
Mikael Nordfeldth
8fac7a9f6c StatusNet class renamed GNUsocial
also added backward compatible StatusNet class for the two calls I know
third party plugins use, isHTTPS and getActivePlugins
2015-02-27 12:44:15 +01:00
Mikael Nordfeldth
f25e5e3860 Start and EndActionExecute added/fixed/documented 2015-02-27 12:11:43 +01:00
Mikael Nordfeldth
4e26527447 Change branch to 1.2.x since we're utf8mb4 now 2015-02-27 10:04:29 +01:00
Mikael Nordfeldth
c214aa5149 Merge branch 'master' into nightly
Conflicts:
	lib/apiaction.php
2015-02-27 10:01:55 +01:00
Mikael Nordfeldth
c81cd18796 I hereby dub thee 1.1.3 - The Spanish Invasion 2015-02-27 09:58:38 +01:00
Mikael Nordfeldth
d524ad8b59 Pass Profile to asAtomEntry 2015-02-27 09:57:49 +01:00
Mikael Nordfeldth
48f8f3f5cf php5-intl is recommended but not required 2015-02-26 22:58:36 +01:00
Mikael Nordfeldth
b0e767eaf1 NoticeOptions above NoticeAttachments 2015-02-25 16:22:59 +01:00
Mikael Nordfeldth
38729133e2 HTML5 media <source> tags are short tags 2015-02-25 12:49:15 +01:00
Mikael Nordfeldth
220a13b87f mimetype added to ImageFile 2015-02-25 01:33:32 +01:00
Mikael Nordfeldth
4b8301d39e ImageFile constructor changed to align with existing code
Noone passed type, width or height to new ImageFile(...) and
in all instances, both parameters were set (though $id is null on occasion).
2015-02-25 01:31:44 +01:00
Mikael Nordfeldth
0854a84eb9 Throw more explicit exception in ImageFile 2015-02-25 01:14:27 +01:00
Mikael Nordfeldth
325e784ccd Don't store duplicates of files.
If a new file is uploaded, it will be matched with a previously uploaded
file so we don't have to store duplicates. SHA256 is random enough and
also unlikely enough to cause collisions.
2015-02-24 21:11:25 +01:00
Mikael Nordfeldth
96099807e1 Default install to site profile community 2015-02-20 01:00:28 +01:00
Mikael Nordfeldth
0590f2975e Merge branch 'utf8mb4' into nightly
Conflicts because of urlhash fixes:
	classes/File.php
	classes/File_redirection.php
	classes/File_thumbnail.php
2015-02-19 20:50:40 +01:00
Mikael Nordfeldth
5b940f255f Mediafile updated to insert urlhash and lookup properly 2015-02-19 19:19:47 +01:00
Mikael Nordfeldth
45dc76de26 File and File_redirection adhoc storage methods updated for urlhash 2015-02-19 19:05:24 +01:00
Mikael Nordfeldth
66df043c19 Add php5-intl dependency to Installer class 2015-02-18 00:47:00 +01:00
Mikael Nordfeldth
0deaf6c50c use common_purify to purify HTML, one function to rule them all 2015-02-18 00:14:28 +01:00
Mikael Nordfeldth
3dce6d9f6a Implement a common_purify for htmLawed and more
We're removing unicode formatting characters as well, such as RTL marks.
For more info on why we're because extra cautious (but may accept the
characters in later versions) you can read:
https://blog.malwarebytes.org/online-security/2014/01/the-rtlo-method/
2015-02-18 00:10:31 +01:00
Mikael Nordfeldth
7ba7f43199 Don't linkify bare domains by default
It's too farfetched to assume any text.com in a notice is an HTTP URL.
For example stuff like pasting from log entries, with domain.com:1234
where 1234 is a _PID_ or something, not a port number for http://...
2015-02-17 20:54:32 +01:00
Mikael Nordfeldth
c31c2d10b9 PHP>=5.4.0 lets us use Transliterator, tags now asciified!
For example: #REVOLUCIÓN becomes #revolucion instead of #revolución
2015-02-17 20:17:22 +01:00
Mikael Nordfeldth
6cdedf6049 Replace $this->user/auth_user with $this->scoped in lib/apiaction.php
We prefer handling a Profile class rather than the User class, as some
functions might be useful for remote users as well, which cannot be
handled via the User class.
2015-02-17 17:16:33 +01:00
Chimo
fb03fc073a ApiTimelineList: Fixes ServerErrorAction
"No matches for action 'ApiTimelineList' with arguments 'format=atom
id=1'"

for 'api/:user/lists/:id/statuses.:format' URLs
2015-02-15 16:00:23 -05:00
Mikael Nordfeldth
b6b9036821 StartSubMenu and EndSubMenu events 2015-02-14 17:32:35 +01:00
Mikael Nordfeldth
dc0b62f636 Merge commit 'refs/merge-requests/45' of https://gitorious.org/social/mainline into merge-requests/45 2015-02-14 16:45:04 +01:00
buttle
9a8ccbaef2 Call HomeStubNav instead of duplicating code
adminpanelnav.php adds a homeStub but does not use the code created for the job.
2015-02-13 16:38:22 +01:00
buttle
d0347bb98f Removing home stub if empty
Added an Event HomeStubNavItems
menu->subMenu() returns false if empty
2015-02-13 16:26:41 +01:00
Mikael Nordfeldth
b3e80f5c32 Updated README.md and framework.php 2015-02-13 12:09:12 +01:00
Mikael Nordfeldth
6620ad793a Deja vu of user->getProfile() from 4f9b70d 2015-02-13 11:55:37 +01:00
Mikael Nordfeldth
4f9b70d51f Profile expected in Notice::asActivity from UAS 2015-02-13 11:41:21 +01:00
Mikael Nordfeldth
a063bb43a8 EndSetApiUser will always contain a User 2015-02-13 01:19:59 +01:00
Mikael Nordfeldth
2f86cd8602 utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
buttle
2a0a0287d4 Added EVENT to homestubnav
Changed menu->submenu(). if (! $menu->getItems()) then do nothing
2015-02-10 19:20:01 +01:00
Mikael Nordfeldth
c6b1b3e5e3 Merge commit 'refs/merge-requests/30' of https://gitorious.org/social/mainline into merge-requests/30 2015-02-08 23:19:53 +01:00
Mikael Nordfeldth
4c9a74cb12 ROLLBACK which may or may not be useful
There were problems with queries that were executed but didn't seem to
be committed. Trying to patch that up by calling a ROLLBACK on transactions
where the loading of the page isn't stopped after the BEGIN statement's
intended function fails (like with the rememberme cookie in this commit).
2015-02-08 11:09:19 +01:00
Mikael Nordfeldth
a89e91da79 By default, don't allow nick changes for profiles
This goes for both users and groups, since they share nickname namespace.

If you want to enable nickname changes, just add this to your config:

   $config['profile']['changenick'] = true;

This commit should cover all changes in our usual web forms as well as through
the API.
2015-02-04 21:25:14 +01:00
Mikael Nordfeldth
5155854339 HTMLOutputter input element can take arbitrary attributes now 2015-02-04 20:52:10 +01:00
Mikael Nordfeldth
f0a707cfc6 A single user instance also has the same URLs as multiuser instances 2015-02-04 16:47:43 +01:00
Mikael Nordfeldth
6a4cb43f67 showstream for singleuser instance too
singleuser instances shouldn't be too special and have too many
alternative methods of doing stuff.
2015-02-03 22:33:01 +01:00
Mikael Nordfeldth
660e8c6efc Fave::addNew now calls Notice::saveActivity
as a bonus we've fixed several FIXME issues for favorite email notification
and updated parts of the codebase for these activities to a more modern style.
2015-02-03 16:34:11 +01:00
Mikael Nordfeldth
e41d324a53 NoticeStream already handles "getNotices" 2015-02-03 12:12:11 +01:00
Mikael Nordfeldth
40416c2c69 Don't email users who are sandboxed
If sandboxed or silenced, don't email the user any notifications.
2015-02-03 11:41:20 +01:00
Mikael Nordfeldth
fdae6f0fb3 neo-gnu is now default-theme. perty. 2015-02-02 18:22:59 +01:00
Mikael Nordfeldth
f05f701764 HTML5 placeholder for notice input form. 2015-02-01 21:35:25 +01:00
Mikael Nordfeldth
c7dd595984 Run onEndSetApiUser also when already logged in! 2015-01-31 16:02:01 +01:00
Mikael Nordfeldth
4c14794cae ApiTimelineNetworkPublicAction available now
Feeds added in NetworkpublicAction too.
2015-01-29 23:01:53 +01:00
Mikael Nordfeldth
dfdfe4143a Set siteprofile default values for config public/localonly 2015-01-29 20:49:19 +01:00
Mikael Nordfeldth
4daa2e4644 Use 'StartpageAction' to determine what to show on / 2015-01-29 20:48:49 +01:00
Mikael Nordfeldth
a5d27d9ce7 /main/all will give a network-wide public stream
Qvitter had implemented this as a "PublicAndExternal" stream, but
I figured we might as well put it into the GNU social core.
2015-01-28 20:25:39 +01:00
Mikael Nordfeldth
eaaef2aec9 'zone' is a valid top domain
We should get another form of URL identifier for interpreting links on notices...
It was hard editing this line in vim even, because of wide, multibyte characters...
2015-01-27 15:07:00 +01:00
Mikael Nordfeldth
cc996f58db Test in Ostatus_profile if avatar is an image before writing to filesystem
This clears one FIXME...

We also fix HTTPClient::quickGet() (and a related call in OStatus testfeed.php).
2015-01-27 14:00:39 +01:00
Mikael Nordfeldth
bcb6dadc9f Corrected message in NoSuchGroupException 2015-01-27 13:37:35 +01:00
Mikael Nordfeldth
d140e135c0 Default textlimit for notices is now 1000 chars 2015-01-26 23:32:08 +01:00
Mikael Nordfeldth
67d09532dd Improved animated image thumbnail freedom of choice
Default is now to take still thumbnails of animated GIFs and then
show them as originals in an AttachmentListItem. The still frames
are mostly used with front-ends like qvitter.
2015-01-26 16:33:39 +01:00
Mikael Nordfeldth
97812549b9 Unnecessarily spammy logs for getThumbnail()
When trying to create thumbnails for remote media that don't have the
filename field set, we got a lot of output in the debug log.
2015-01-26 01:16:28 +01:00
Mikael Nordfeldth
a8e613e508 Animated GIF restructuring, ImageMagick only used for resizing animated sequences. 2015-01-25 23:00:00 +01:00
Mikael Nordfeldth
2a7d45c986 No need for ImageMagick to detected animated GIF 2015-01-25 22:45:25 +01:00
Mikael Nordfeldth
4dd6d7869e Maybe we can detect animated files in core 2015-01-25 22:11:46 +01:00
Mikael Nordfeldth
2b62077fc1 1.1.3-beta2 2015-01-25 02:43:29 +01:00
Mikael Nordfeldth
a9135080c3 barename wasn't used, let's rename it filename and use it 2015-01-25 02:27:02 +01:00
Mikael Nordfeldth
2dd1f3fe67 Default value for max thumbnail size increased
Because people have high resolution screens nowadays ;)
2015-01-23 15:04:54 +01:00
Mikael Nordfeldth
015e95829b MediaFile->getFile() instead of accessing fileRecord 2015-01-23 14:46:47 +01:00
Mikael Nordfeldth
9f87359d04 Non-ajax file submissions should throw NoUploadedMediaException 2015-01-22 12:38:57 +01:00
Mikael Nordfeldth
964d13792b ssl_verify_host option in config (default is true) 2015-01-22 12:21:57 +01:00
Mikael Nordfeldth
5c7ad2e031 Added a quickGet in HTTPClient 2015-01-22 12:16:01 +01:00
Mikael Nordfeldth
fac9f4e545 Merge branch 'nightly' of gitorious.org:social/mainline into nightly 2015-01-21 23:45:49 +01:00
Mikael Nordfeldth
9c5aa67a63 Enable AntiBrute by default. 2015-01-21 23:43:04 +01:00
Mikael Nordfeldth
8d7230a2b9 EndCheckPassword should run after Start even if pre-exited
StartCheckPassword can exit beforehand either with success or failure,
and we want EndCheckPassword to check for stuff like failed login attempts.
2015-01-21 22:31:05 +01:00
Mikael Nordfeldth
8b585ff647 MediaFile upload simplifying 2015-01-21 17:39:48 +01:00
Mikael Nordfeldth
b2d332c914 These were meant for lower classes 2015-01-18 21:13:52 +01:00
Mikael Nordfeldth
06c93faa2d PHP BUG??? Cannot figure out why this throws warning
I kept getting this on "Quitter España" (which seems to be the name
causing the commotion, as it's part of this sprintf algorithm):

   PHP Warning:  sprintf(): Argument number must be greater than zero
    in /srv/www/vhosts/quitter.es/%/htdocs/lib/action.php on line 1175

I'll just make it quiet for now so it doesn't spam other sites with
UTF-8 characters in their name (if that's what's causing this).
2015-01-18 12:52:33 +01:00
Mikael Nordfeldth
371f4b4874 A bit more readable code. 2015-01-18 01:43:30 +01:00
aroquen
e45c784451 Fix footer in plugins' notices.
Make it look like like normal notices. Footer element was missing.
2015-01-17 00:39:07 +01:00
Mikael Nordfeldth
8892702f0c Initially hide input forms on the top
The status input element would attract focus after page load, meaning
if you'd scrolled down a bit then you would be rocketed back up again!
2015-01-16 11:19:22 +01:00
Mikael Nordfeldth
96f30dd924 version push, we've got some HTML/CSS changes 2015-01-16 01:12:19 +01:00
Mikael Nordfeldth
0193c7548f RSS feed items did not get a type assigned 2015-01-15 21:13:21 +01:00
Mikael Nordfeldth
cbb7ec07a5 When called in offline queue, File::url was HTTP
Despite having the site configured "always" for HTTPS, File generated
thumbnails and such with HTTP urls.
2015-01-12 19:19:41 +01:00
Mikael Nordfeldth
c7df5594d0 Simplified by adding an abstract AtompubAction 2015-01-12 03:15:41 +01:00
Mikael Nordfeldth
aca5ff1b23 Found some unreachable code in Favorite
The portion after StartAtomPubNewActivity would never be reached since
Favorite handles that activity through ActivityHandlerPlugin nowadays.
So I cleaned it up and followed a couple of paths, making stuff prettier.
2015-01-12 02:23:23 +01:00
Mikael Nordfeldth
773441c2c5 abstract declaration of GroupSection 2015-01-10 01:46:54 +01:00
Mikael Nordfeldth
51f97c7e84 section control over their notice lists + HTML id stuff 2015-01-09 15:46:35 +01:00
Mikael Nordfeldth
a3b9367c9a new noticelist classes for primary and section lists 2015-01-08 20:19:43 +01:00
Mikael Nordfeldth
5a76390d46 Reuse NoticeList for NoticeSection listing
Something smarter than the 'addressees' and 'attachments' booleans etc.
is desired.
2015-01-08 20:07:27 +01:00
Mikael Nordfeldth
5981b5c8d9 CC license fixes (no remote image, https for href) 2015-01-08 18:13:33 +01:00
Mikael Nordfeldth
40412b6b79 status update placeholder removed, javascript not required to post 2015-01-08 18:04:46 +01:00
Mikael Nordfeldth
b2f0595d04 HTML5 + CSS adaptions, may cause visual breaks 2015-01-08 16:42:26 +01:00
Mikael Nordfeldth
d3a8896b2a Merge commit 'refs/merge-requests/26' of https://gitorious.org/social/mainline into merge-requests/26 2014-12-09 13:45:15 +01:00
Joshua Judson Rosen
238095a719 Parse remote users' fullnames from PoCo::displayName elements
Try this first; use activity:subject->atom:title only as a fallback.

The code that output activity:subject was removed 2013-10-08,
and it it was deprecated for years before that....
2014-12-08 21:55:51 -05:00
Mikael Nordfeldth
e7c6c6fc76 Merge commit 'refs/merge-requests/19' of https://gitorious.org/social/mainline into merge-requests/19 2014-12-06 20:18:52 +01:00
Mikael Nordfeldth
bb31394cce Merge commit 'refs/merge-requests/23' of https://gitorious.org/social/mainline into merge-requests/23 2014-12-06 20:12:17 +01:00
Joshua Judson Rosen
9a9f6f0502 Use HTTPS links for Google and Yahoo!
They both support it--so why not?
2014-12-03 22:55:34 -05:00
Joshua Judson Rosen
c52c090298 Add Ixquick as a fallback search link
People like that one, too.
2014-12-03 22:54:27 -05:00
Joshua Judson Rosen
67539fd1cc Add DuckDuckGo as a fallback search link
People like it.
2014-12-03 22:48:28 -05:00
Joshua Judson Rosen
f9d815db64 Correctly spell "Yahoo!"
With the trailing bang(!).
2014-12-03 22:46:50 -05:00
Joshua Judson Rosen
b45b7c153e SearchAction: don't list dead web search-engines
tweetscan.com is a parked domain.

http://www.twingly.com/search?content=microblog says:
"Microblog search has been removed. Use https://twitter.com/search-home".

http://collecta.com/ says "We have removed our consumer facing site".
2014-12-03 22:44:54 -05:00
Joshua Judson Rosen
69fec16de2 common_path(): use HTTPS if current URL is HTTPS
Bring common_path() back into harmony with common_local_url(),
which started doing this 2013-03-25.

Shouldn't need to spread "StatusNet::isHTTPS()" logic all over
wherever common_path() is called; just DTRT automatically instead.
2014-12-02 14:47:03 +01:00
Mikael Nordfeldth
8ad4d1baf8 Version bump to 1.1.3 since conversation tracking 2014-11-27 17:12:36 +01:00
Mikael Nordfeldth
343291262e ostatus:conversation element instead of link rel=""
Mainly because the atom:link element requires a "web resource" but we
wish to supply a URI which might not be HTTP. We'll leave the old
atom:link element however since it's in the OStatus 1.0 Draft2 docs
and nothing newer has been released yet.
2014-11-27 13:47:31 +01:00
Mikael Nordfeldth
a3ded586b6 Namespaced elements now available in xmloutputter 2014-11-27 13:36:29 +01:00
Joshua Judson Rosen
9fd2541b52 QueueManager: don't assume all non-XML strings are JSON
Some of the standard plugins queue simple, unstructured numbers--
e.g.: EmailSummary and OfflineBackup both queue user-IDs.
2014-11-23 23:24:16 -05:00
Mikael Nordfeldth
34f6ea1d04 Present WWW-Authenticate on failure to authenticate 2014-11-10 12:17:39 +01:00
Mikael Nordfeldth
b6a168c82e Unnecessary to check PHP_AUTH_USER here
it was implied from $this->auth_user_nickname above
2014-11-10 12:10:21 +01:00
Mikael Nordfeldth
17647dc3ff $header was always true due to previous if statement 2014-11-10 11:59:01 +01:00
Mikael Nordfeldth
e91deb683f Checking user properties for instanceof User 2014-11-10 11:57:53 +01:00
Mikael Nordfeldth
403cb858be Less verbose logic for checking api authentication 2014-11-10 11:43:08 +01:00
Mikael Nordfeldth
6f5086fc52 Integrate qvitter ApiAuthAction (thanks hannes2peer) 2014-11-10 11:39:19 +01:00
Mikael Nordfeldth
769febf22e DirectMessage added to default plugins
I think the migration from core to plugin is done now for DMs.

This is required since we support the Twitter-based API by default,
which is implemented in many of the mobile clients etc. But you can
disable the DirectMessage for your instance of you wish, of course.
2014-11-07 16:37:00 +01:00
Mikael Nordfeldth
48ba963ddd Inline documentation updated to reflect on plugin move of DMs 2014-11-07 16:26:29 +01:00
Mikael Nordfeldth
046d070ad4 MessageCommand moved to DirectMessage plugin 2014-11-07 16:23:34 +01:00
Mikael Nordfeldth
38d9b4d3a4 UserActivityStream export of DMs moved to plugin 2014-11-07 16:08:16 +01:00
Mikael Nordfeldth
d493fd0772 DirectMessage API functions moved to plugin 2014-11-07 16:00:27 +01:00
Mikael Nordfeldth
68143ff916 DirectMessage moved into a plugin, not done yet
We still have to move some API calls into the new plugin.
2014-11-07 15:53:35 +01:00
Mikael Nordfeldth
e90a1f44c4 Show permalinks only for local notices
the "from [site]" already links to the permalink
2014-11-05 19:53:59 +01:00
Mikael Nordfeldth
7ea067a0dc Notice_source checks in better code style 2014-11-05 19:44:22 +01:00
Mikael Nordfeldth
5e4f93cc7d Conversation link as default, permalink for /notice 2014-11-05 19:34:39 +01:00
Stanislav N. aka pztrn
fa4311fa17 Add "Date" header to mail, some clients require this to show corrent message receiving time. 2014-11-03 19:00:19 +01:00
Mikael Nordfeldth
636ad44f0b BookmarkListItem removed in favor of event-driven rendering 2014-10-26 22:07:16 +01:00
Mikael Nordfeldth
9f8761f709 Adding event StartShowNoticeItemNotice with corresponding End
Runs just before outputting the "top" part of a NoticeListItem to HTML
so plugins can jump in and do their thing.
2014-10-26 21:53:10 +01:00
Mikael Nordfeldth
f69f713360 PollListItem freed from noticeListItemAdapter clutches
In the future, use events for formatting microapp notices, more specifically
through the plugin's function "showNoticeContent" or similar, which is called
from MicroAppPlugin, which is extended from ActivityHandlerPlugin.
2014-10-26 14:48:02 +01:00
Mikael Nordfeldth
fe92d7cf95 args argument must be array for menu item 2014-10-25 20:58:58 +02:00
Mikael Nordfeldth
60b1fe650c Bumping base version number to 1.1.2 2014-10-25 15:00:40 +02:00
Roland Haeder
419c2cd5b3 Some fixes/improvements - added getter getGroup() for https://bugz.foocorp.net/T44 - added type-hints in method signatures
---------------------------------------------------------
WARNING: Some plugins attempt to get a property 'group' from (basicly) a Menu
class which does NOT have such property. This badly needs fixing.
---------------------------------------------------------

Signed-off-by: Roland Haeder <roland@mxchange.org>
2014-10-25 14:25:12 +02:00
Hannes Mannerheim
852924799f isSubscribed and hasBlocked need instance of Profile, not User
used by actions/apifriendshipsshow.php
2014-10-20 16:10:11 +02:00
Hannes Mannerheim
5a72a25905 Bug, attachments stored double in file table
This if-statement looked like this before:

if (empty($file_redir))

and so it needs a ! when rewritten as instanceof
2014-09-30 13:10:43 +02:00
Mikael Nordfeldth
681c94b577 alpha number bump 2014-08-18 10:23:55 +02:00
Roland Haeder
571ba1369b Check for valid database connection object.
Signed-off-by: Roland Haeder <roland@mxchange.org>
2014-08-18 10:10:55 +02:00
Mikael Nordfeldth
8825aef1de local variable format in ApiAction declared in class 2014-08-08 11:35:06 +02:00
Mikael Nordfeldth
e32178d3ce Don't auto-enable Twitter and Facebook bridges (singleuser)
Multiuser instances already had them disabled.
2014-08-05 11:37:39 +02:00
Mikael Nordfeldth
1c04601a9c Removing excessive "inline" attachment listings 2014-08-05 11:30:45 +02:00
Mikael Nordfeldth
17b9614ff8 File->getEnclosure improvements (text/html is not an attachment) 2014-08-05 10:54:00 +02:00
Mikael Nordfeldth
33a85ae945 Inline attachment layout improvement 2014-08-04 18:33:57 +02:00
Mikael Nordfeldth
89704bcdee Fixes some non-defined variables in commit eb2f93a 2014-07-28 10:57:45 +02:00
Mikael Nordfeldth
483b2d3d29 quick fix for when there is no $cur defined 2014-07-28 10:11:28 +02:00
Mikael Nordfeldth
eb2f93ad2b More use of Profile, less User 2014-07-28 09:34:46 +02:00
Mikael Nordfeldth
d11ce2ef3b Consistently use "email-notify_fave" syntax for preference 2014-07-27 23:25:49 +02:00
Mikael Nordfeldth
f4be42c597 Sorry, left some debug lines in the pushed source :) 2014-07-16 13:06:29 +02:00
Mikael Nordfeldth
618e31a780 Further column collisions in ReplyNoticeStream 2014-07-16 13:02:55 +02:00
Mikael Nordfeldth
d6cc13ac33 Replies caused column name collision on joinAdd 2014-07-15 18:54:42 +02:00
Mikael Nordfeldth
0cefab3603 Replies and Conversation noticestreams should only get POSTs by default 2014-07-15 14:27:03 +02:00
Mikael Nordfeldth
c96f0aa30f More Activity-based reasoning for saveActivity in Notice
If we can, get the activity ID from the activity itself, instead of the
supplied $options array.
2014-07-14 23:54:58 +02:00
Mikael Nordfeldth
eb955fe629 "Notice posted" message in Ajax title for NewnoticeAction 2014-07-14 17:11:54 +02:00
Mikael Nordfeldth
60016b0a8f Bad variable reference in lib/mail.php 2014-07-14 17:01:52 +02:00
Mikael Nordfeldth
ae62b91940 Unifying HTML stripping functions to common_strip_html 2014-07-14 13:52:23 +02:00
Mikael Nordfeldth
5ebe01ba36 NoticeStream fixes regarding non-post verbs 2014-07-14 00:59:04 +02:00
Mikael Nordfeldth
6de410bb6b Properly output error messages in AJAX mode 2014-07-13 19:46:51 +02:00
Mikael Nordfeldth
0a20abf1d8 Email notify-on-fave moved to Profile_prefs (run upgrade.php) 2014-07-13 19:46:40 +02:00
Mikael Nordfeldth
6f593a79d4 making more sense in mail_notify_fav
We should probably get rid of this function, at least storing everything in
lib/mail.php - but until then, at least let's make it more understandable.
2014-07-13 12:56:43 +02:00
Mikael Nordfeldth
b3d6c51c79 Strict standards and deprecation warnings are good, but confusing
we know we have to get rid of PEAR::DB, but don't alarm users with hundreds
of lines of output.
2014-07-10 13:23:10 +02:00
Mikael Nordfeldth
a2360f7538 check-fancy test gave confusing output (not the real message) 2014-07-10 13:10:48 +02:00
Mikael Nordfeldth
e15f322187 Replies don't have verbs (we'll do some join magic later) 2014-07-09 21:53:21 +02:00
Mikael Nordfeldth
efa3e8f3f4 Only get POST verbs for noticestreams for now
Since we store 'favorite' verbs as notices now too, they caused a lot of
"null" notices that might not be interesting before we handle them better
in the UIs.
2014-07-09 13:37:09 +02:00
Mikael Nordfeldth
2eea7a2d4b Do proper Activity-plugin based mention notification 2014-07-07 01:15:43 +02:00
Mikael Nordfeldth
9a92b8ba33 Form- and ManagedAction improvements 2014-07-06 12:55:18 +02:00
Mikael Nordfeldth
aadc7398dc ModPlus and some layouting issues regarding fixes 2014-07-06 01:37:31 +02:00
Mikael Nordfeldth
fffacaa27c FavorAction now uses Notice::saveActivity 2014-07-06 01:37:03 +02:00
Mikael Nordfeldth
ffb9d7ad3f Rewriting code for notice representation
Getting rid of NoticeListItemAdapter, putting more into ActivityHandlerPlugin
and relying on plugins to handle rendering code of the content. This gives us
a lot more structure and consistency in notice structure and allows activity
plugins to stop rendering certain kinds of notices more easily.

There should also be a property for an ActivityHandlerPlugin class to avoid
rendering notices in the ordinary stream, so we don't have to overload stuff.
2014-07-04 14:14:49 +02:00
Mikael Nordfeldth
b9a8b2ad05 missing file for 4b40d6bb2a 2014-07-04 14:13:48 +02:00
Mikael Nordfeldth
a35838be9e FormAction->showContent had to be 'protected' 2014-07-04 11:22:32 +02:00
Mikael Nordfeldth
53b794342c Saved incoming activites for Favorite as wrong profile
also removed some debugging lines

Now we have to get rid of OStatus dependency in lib/activityhandlerplugin.php
2014-07-03 14:08:26 +02:00
Mikael Nordfeldth
7f0c7e8e80 Widgets require Action not HTMLOutputter (getScoped) 2014-07-03 14:02:01 +02:00
Mikael Nordfeldth
2e77cbfa86 FormAction updates, also fixing NoticeForm CSS 2014-07-03 14:01:12 +02:00
Mikael Nordfeldth
b63f6e949c Converted all ActivityObject::fromProfile to $profile->asActivityObject 2014-07-03 10:51:36 +02:00
Mikael Nordfeldth
1d981b826a ActivityObject::fromProfile implemented in Profile 2014-07-02 18:39:53 +02:00
Mikael Nordfeldth
c44146d6f8 Favorites are now being stored from activities 2014-07-02 18:38:19 +02:00
Mikael Nordfeldth
2e6a32c7be Most of the activityobject-saving for Favorite implemented 2014-07-02 11:38:55 +02:00
Mikael Nordfeldth
9f4bcbad8a checkAuthorship events, Ostatus_profile rewrite to handle it
Lost dependency of OStatus plugin for lib/microappplugin.php, whoo!

also noting which plugins should be upgraded to new saveActivity support.

Favorite plugin won't work with the new system just yet, it doesn't have
the necessary functions to extract activity objects, but that's coming
in the next (few) commits.
2014-07-02 11:38:45 +02:00
Mikael Nordfeldth
96babc59f5 getIdentifiers, resolveUri, findLocalObject Activity algorithms
Also modified related classes to support this feature.
2014-07-02 11:38:20 +02:00
Mikael Nordfeldth
38bea34562 Moved functions into ActivityHandlerPlugin from MicroAppPlugin
Dummy functions in Favorite plugin so far
2014-07-02 11:37:46 +02:00
Mikael Nordfeldth
3f21d22a31 Failed to reference an object property 2014-06-28 20:19:49 +02:00
Mikael Nordfeldth
138d26d488 Favorite "aside"-sections moved, also small fixes left from before
Action now has 'isAction' which compares the loaded Action with names
of classes in an array (added without the 'Action') to its own type.
2014-06-28 16:09:46 +02:00
Mikael Nordfeldth
7e597ea7cc More Favorite pluginification (favecount, cache, menus(favecount, cache, menus)) 2014-06-28 14:03:30 +02:00
Mikael Nordfeldth
f200d708bd Simplify NoticeSimpleStatusArray inclusion in lib/apiaction.php 2014-06-28 11:52:51 +02:00
Mikael Nordfeldth
fcdd061b4f pluginified most of hasFave, getFaves and related calls
The code is now more event-driven when it comes to rendering notices
and their related HTML elements, since we can't have direct calls from
core to a plugin.

lib/activitymover.php has a function to move a Favorite activity which
will not happen now. The move must be pluginified and performed as an
event which plugins can catch on to.
2014-06-27 14:09:02 +02:00
Mikael Nordfeldth
b864caa665 MicroAppPlugin extends to intermediate ActivityHandlerPlugin 2014-06-24 16:46:11 +02:00
Mikael Nordfeldth
db7cc7fa75 Favorite functionality put into plugin (not done yet)
Now we have to fix any code in the core which directly uses the Fave class
or any other favorite stuff, since it is pluginised and thus might not be
available on some installations.
2014-06-24 15:58:53 +02:00
Mikael Nordfeldth
67ed1ec77e Repeated and Favorited CSS/mf2 fixes
For some reason I'd added an 'e-content' class for repeats and faves
2014-06-24 15:34:36 +02:00
Mikael Nordfeldth
53fb39a1d0 Nicknames in subscriptions list 2014-06-24 01:56:55 +02:00
Mikael Nordfeldth
faa12e63c0 No nickname in profile listing 2014-06-23 18:59:32 +02:00
Mikael Nordfeldth
734287cfd3 showAvatar requires a profile 2014-06-22 22:49:28 +02:00
Mikael Nordfeldth
783cc20586 We don't have the thumbnail title in attachment list 2014-06-22 19:17:49 +02:00
Mikael Nordfeldth
414a95a784 Initial move towards microformats2
No validation has been attempted yet. Lots of changes left. This
is visibly not (very) different from the previous CSS layout. But
some simplifications have been made.

Might cause issues with local changes to themes and CSS. Also maybe
javascript which depends on certain legacy microformats elements.

The move to microformats2 is motivated by the announcement that all
microformats should be migrated to version 2, as of 2014-06-20 at:
http://microformats.org/2014/06/20/microformats-org-turns-9-upgrade-to-microformats2
2014-06-22 17:11:04 +02:00
Mikael Nordfeldth
e4f1c77d6b showAvatar functions deduplicated into Widget class 2014-06-21 23:25:50 +02:00
Mikael Nordfeldth
10105a9965 No more Internet Explorer exception CSS files
IE versions older than 8 (which these were for) should no longer
be used anyway, since they are filled with security holes and not
even Microsoft recommends or supports their use anymore.
2014-06-21 19:47:24 +02:00
Mikael Nordfeldth
79824a3625 Could not update avatar due to Bad Thumbnail parameters 2014-06-17 12:48:10 +02:00
Mikael Nordfeldth
5a3d74d9a8 UseFileAsThumbnailException (helps support GIFs) 2014-06-17 12:15:11 +02:00
Mikael Nordfeldth
ad264b70e1 Revert "Slightly larger avatars and some box-shadow"
This reverts commit 38f5038cf0.

Random problems with, I assume, Chromium users. Ranted:
   "FUCK YOU CHROMIUM WITH VARYING FUNCTIONALITY AND CRAPPY
    INTEROPERABILITY THE NEW FUCKING INTERNET EXPLORER"

This will be back in the future with a vengeance (patches).
2014-06-06 22:11:50 +02:00
Mikael Nordfeldth
a70d43a685 Start tracking alpha release numbers
Some changes should be implied as larger with an incrementing alpha
release number. Not all commits will increase this of course, but it
will give an indication on which major reworks, features or layout
changes have been made for the version being used on an instance.
2014-06-06 11:48:48 +02:00
Mikael Nordfeldth
38f5038cf0 Slightly larger avatars and some box-shadow 2014-06-06 11:42:58 +02:00
Mikael Nordfeldth
cc3841a623 Profile sized avatar in DefaultProfileBlock
Don't know why it was overriding ProfileBlock...
2014-06-06 01:01:07 +02:00
Mikael Nordfeldth
adf896bc12 Add support for plugins to resize images
This also adds an event hook to get more metadata of the ImageFile.
Such as if it's animated or so.
2014-06-05 13:29:36 +02:00
Mikael Nordfeldth
167740456b Show inline repeats-list in ThreadedNoticeList
Also, don't show repeats _as_ separate notices in the list either.
2014-06-05 00:59:49 +02:00
Mikael Nordfeldth
70cb488106 ActivityObject::fromProfile used some non-included class definitions 2014-06-03 03:18:13 +02:00
Mikael Nordfeldth
9a1109bd14 Revert "There were referenced in ActivityObject not autoloaded"
This reverts commit 6e35544a67.
2014-06-03 03:16:18 +02:00
Mikael Nordfeldth
6e35544a67 There were referenced in ActivityObject not autoloaded 2014-06-03 01:33:48 +02:00
Mikael Nordfeldth
db443e9374 File::processNew now static and always throws exception on failure 2014-06-02 02:11:23 +02:00
Mikael Nordfeldth
d6f52f5939 File::processNew can return -1 which was not true for empty()
Also, File->getEnclosure() now throws exception if not enough metadata.
2014-06-02 01:46:09 +02:00
Mikael Nordfeldth
d596513e39 Stronger typing for NoticeListItem and so 2014-06-02 00:20:27 +02:00
Mikael Nordfeldth
2f97d5d206 Stronger typing in Widget class (HTMLOutputter) 2014-06-01 13:09:47 +02:00
Mikael Nordfeldth
cc5aff5de3 StatusNet::delPlugin($name) added to disable plugins
Instead of setting some weird $config['plugins']['disable-Blah'] yourself.
The class name, StatusNet, will probably change in the future to GNU social.
No global function added, as it exists for addPlugin().
2014-05-31 00:27:23 +02:00
Mikael Nordfeldth
49fa34e234 Make Profile::fromUri use UnknownUriException 2014-05-26 15:05:14 +02:00
Mikael Nordfeldth
89e817e5b0 UnknownUriException added for better error handling 2014-05-26 14:59:45 +02:00
Mikael Nordfeldth
e83b2e147a NoProfileException collision avoidance fix 2014-05-26 14:39:03 +02:00
Mikael Nordfeldth
d2c749c7de NoUriException added and implemented in FeedSub class
This is a specific exception for objects which require URI but lack it,
first implemented in FeedSub to allow for identification of bad entries.
2014-05-19 17:30:04 +02:00
Mikael Nordfeldth
fb82c75b49 adminUpdates setting not available now
We don't run a service similar to update.status.net yet. Maybe we should,
but that's for the future to decide. Currently I view it as a callback
that we want to avoid.
2014-05-19 14:53:52 +02:00
Mikael Nordfeldth
d7c40e77b2 Show more links work with AJAX-retrieved HTML
Attachment_ajaxAction has been removed since AttachmentAction handles
AJAX calls splendidly.
2014-05-19 00:56:21 +02:00
Mikael Nordfeldth
202eaa53e0 Don't report all linked URLs to remote sites
noembed.com acts as a proxy for oEmbed requests, but that also means they
get all the links we post on our instances, given that they're used as a
default endpoint.
2014-05-18 23:25:40 +02:00
Mikael Nordfeldth
c93a5252c1 Don't show or preview text/html attachments
htmLawed cleans stuff out properly, but there's no very good way right
now to show text/html attachments, since everything gets jumbled up with
our own CSS etc. Best would be an iframe or just a new tab or so.
2014-05-18 23:11:49 +02:00
Mikael Nordfeldth
b0cc9292b1 Notice->repeat() function takes Profile as argument now 2014-05-18 21:03:10 +02:00
Mikael Nordfeldth
39137a08e6 Action->showContent now defined as protected
All the rendering functions should only be called form within the Action.
2014-05-18 20:47:30 +02:00
Mikael Nordfeldth
d56d97a439 Only POST Form widgets send a session token. 2014-05-18 20:19:05 +02:00
Mikael Nordfeldth
bfaa700763 GET request would send 'search' parameter because it had a name 2014-05-18 20:18:18 +02:00
Mikael Nordfeldth
22481b1de6 Making FormAction subclasses use same sessionToken() code 2014-05-18 19:59:40 +02:00
Mikael Nordfeldth
80fbec173b Improved imageboard-style notice feeds on web UI 2014-05-18 14:05:29 +02:00
Mikael Nordfeldth
23c288c699 FormAction extends ManagedAction
handlePost is now more naturally called and doesn't require a separate
'handle' function for each subclass.
2014-05-18 13:31:51 +02:00
Mikael Nordfeldth
b48e3a22bf AttachmentAction extends to ManagedAction
Also moved AttachmentListItem and its extended class Attachment are moved
into separate files (autoloaded from lib/).
2014-05-18 12:59:33 +02:00
Mikael Nordfeldth
db90e2bb65 Apparently exif_read_data wasn't globally available. 2014-05-14 10:35:05 +02:00
Mikael Nordfeldth
0e4b7148c1 Some getActionName fiddling in Action class 2014-05-12 22:46:32 +02:00
Mikael Nordfeldth
e086ef3a84 ProfileAction derivatives somewhat migrated to ManagedAction 2014-05-12 22:41:05 +02:00
Mikael Nordfeldth
ca67e848eb Only JPEG files (and TIFF, which we don't support) have EXIF 2014-05-12 14:45:23 +02:00
Mikael Nordfeldth
214a10ddec File_thumbnail fixes (run scripts/upgrade.php)
We're now capable of doing image rotation for thumbnails based on
EXIF orientation data. Also, thumbnails are tracked by filenames and
thus we can delete them from storage when we feel like it.
2014-05-12 14:33:41 +02:00
Mikael Nordfeldth
cd3cff451f ConversationTree is now a plugin (not oldschool setting)
Conversation trees works pretty bad with the current layout, javascript
etc. So it's best if we separate it and work on it as a side-project. The
oldschool settings are currently being deprecated (or broken out like this).

I'll wait with removing User preferences for oldschool conversation tree,
since that might be reusable data. But I guess it will go in the near future.
2014-05-12 11:51:11 +02:00
Mikael Nordfeldth
e0014b6736 FilteringNoticeStream now uses OOP for getNotices
getNoticeIds gives the notices to fetch, which are caught by getNotices
in a parent class.
2014-05-12 11:08:25 +02:00
Mikael Nordfeldth
8f8a7dbde0 Bad variable reference in ProfileNoticeStream 2014-05-12 11:07:00 +02:00
Mikael Nordfeldth
4358ac0675 More SQL in the conversation notice fetching 2014-05-11 22:46:40 +02:00
Mikael Nordfeldth
aa0fbf89c2 Initial version of ManagedAction
This will simplify actions for future development and maintenance
since we can automate much more (such as auto-running show[Ajax|Page])
and handle errors of various kinds. Essentially the same kind of
improvements as Managed_DataObject gives us.
2014-05-11 21:06:59 +02:00
Mikael Nordfeldth
be14634c5f ConversationRepliesAction removed, Conversation is enough 2014-05-11 21:05:25 +02:00
Mikael Nordfeldth
b0d4825976 Order InboxNoticeStream by id instead of created
notice.id will give us even really old posts, which were
recently imported. For example if a remote instance had
problems and just managed to post here. Another solution
would be to have a 'notice.imported' field.
2014-05-10 15:06:31 +02:00
Mikael Nordfeldth
ce23c68d1c FileAction removed (we have AttachmentAction).
It seems it was only used to get a _single_ file attachment from
the posted notice, with no possibility to get multiple attachments.

If one fetches metadata about attachments for the notice, we have
enough data there to fulfill anyone's fetching dreams.
2014-05-10 12:29:34 +02:00
Mikael Nordfeldth
c075b9f730 Removed 'bookmarklet' since we have Bookmark plugin 2014-05-10 02:50:56 +02:00
Mikael Nordfeldth
d2881757a4 Remote profiles in AccountProfileBlock generated errors 2014-05-10 02:33:36 +02:00
Mikael Nordfeldth
52738b0267 Directory to default plugins (disabled for singleuser) 2014-05-09 10:49:00 +02:00
Mikael Nordfeldth
c664efcf1f curry.php can always be included (we use PHP>5.2) 2014-05-09 10:46:46 +02:00
Mikael Nordfeldth
c15216f00b OStatus enabled by default, only disabled for private siteprofile 2014-05-09 10:31:55 +02:00
Mikael Nordfeldth
de5049bf15 since_id and max_id for RawInboxNoticeStream
Otherwise you could only fetch a strict limit since the latest notice.
2014-05-07 11:50:40 +02:00
Mikael Nordfeldth
34114e87be OpportunisticQM moved from core to default plugins.
This makes it easier to disable, but remember that you must then
either enable and maintain queue daemons or disable queueing (and
handle whatever remaining queue items are stored in the database)!
2014-05-06 23:32:32 +02:00
Mikael Nordfeldth
1776c90cb9 Moved oEmbed stuff out to a plugin (Oembed). 2014-05-06 23:32:13 +02:00
Mikael Nordfeldth
b0c4e8fc3d Enable events for showing Attachment representation 2014-05-06 21:49:42 +02:00
Mikael Nordfeldth
b16d8cba1d AlreadyFulfilledException added, for acceptable exceptions 2014-05-05 23:20:43 +02:00