]> git.mxchange.org Git - quix0rs-gnu-social.git/log
quix0rs-gnu-social.git
11 years agoRemoving rel='ostatus:attention' in favor of Salmon's rel='mentioned'
Mikael Nordfeldth [Mon, 21 Oct 2013 16:42:15 +0000 (18:42 +0200)]
Removing rel='ostatus:attention' in favor of Salmon's rel='mentioned'

This was introduced in StatusNet 0.9.x, which is the oldest branch
on the web today as far as I know.

11 years agoUse pre-defined const instead of strings
Mikael Nordfeldth [Mon, 21 Oct 2013 16:28:04 +0000 (18:28 +0200)]
Use pre-defined const instead of strings

11 years agoReplace common_good_random with common_random_hexstr
Mikael Nordfeldth [Mon, 21 Oct 2013 11:20:30 +0000 (13:20 +0200)]
Replace common_good_random with common_random_hexstr

11 years agoGenerate better salt for crypt()
Mikael Nordfeldth [Mon, 21 Oct 2013 11:16:03 +0000 (13:16 +0200)]
Generate better salt for crypt()

11 years agocommon_good_rand was _not_ a "good rand", only hex
Mikael Nordfeldth [Mon, 21 Oct 2013 11:09:40 +0000 (13:09 +0200)]
common_good_rand was _not_ a "good rand", only hex

0-F isn't random enough to be called rand, so we rename the function
to avoid confusion with something that is actually good at random.

11 years agoException wasn't thrown. How does PHP handle daisychained calls, really?
Mikael Nordfeldth [Mon, 21 Oct 2013 07:09:32 +0000 (09:09 +0200)]
Exception wasn't thrown. How does PHP handle daisychained calls, really?

11 years agoplugins/Xmpp/README fixed typos
Florian Schmaus [Sat, 19 Oct 2013 16:48:37 +0000 (18:48 +0200)]
plugins/Xmpp/README fixed typos

11 years agoImproved plugins/Xmpp/README
Florian Schmaus [Sat, 19 Oct 2013 10:19:00 +0000 (12:19 +0200)]
Improved plugins/Xmpp/README

Added the relevant section in INSTALL about queues and daemons to get
the plugin runnig.

Made resource required, as otherwise XMPPHP will send invalid from JIDs
in it's stanzas. For example when my configuration didn't had the
resource part, outbound stanzas looked like this:

<message
from="gnusocial@example.de/"
to="flow@example.de"
type='chat'>
<body>
User &quot;flow&quot; on GNU Social has said that your
XMPP/Jabber/GTalk screenname belongs to them.

</body>
</message>

Note the '/' at the end of the from attribute, without an actual
XMPP resource. But according to RFC6122 2.1 "every allowable portion of
a JID MUST NOT be zero bytes in length". Causing a jid-malformed
response from the server.

Also, it's nice to know that debug=true will print out all sent and
received stanzas, which helped me to debug the problem.

Furthermore I add a note that if the XMPP services uses DNS SRV records,
'host' has to be configured (in cases where service host != xmpp domain).

11 years agoprintv doesn't exist. Use echo to always print on errors.
Mikael Nordfeldth [Sun, 20 Oct 2013 19:02:47 +0000 (21:02 +0200)]
printv doesn't exist. Use echo to always print on errors.

11 years agoProfile creation always failed because we didn't COMMIT
Mikael Nordfeldth [Sun, 20 Oct 2013 15:22:20 +0000 (17:22 +0200)]
Profile creation always failed because we didn't COMMIT

11 years agoMinor function definitions so they match Action parent
Mikael Nordfeldth [Sun, 20 Oct 2013 15:21:56 +0000 (17:21 +0200)]
Minor function definitions so they match Action parent

11 years agoStrict type check against false in User_group
Mikael Nordfeldth [Sun, 20 Oct 2013 15:15:46 +0000 (17:15 +0200)]
Strict type check against false in User_group

11 years agoWebFingerResource introduced, instead of strict Profile object
Mikael Nordfeldth [Sun, 20 Oct 2013 13:32:56 +0000 (15:32 +0200)]
WebFingerResource introduced, instead of strict Profile object

This is the beginning of getting notice URI info via WebFinger

*XrdActionLinks is renamed *WebFingerProfileLinks, check EVENTS.txt
in WebFinger plugin for new events.

11 years agoApparently only one atom:content is allowed
Mikael Nordfeldth [Sun, 20 Oct 2013 11:15:37 +0000 (13:15 +0200)]
Apparently only one atom:content is allowed

11 years agoSwitch order of html/text for StatusNet backwards compatibility
Mikael Nordfeldth [Sun, 20 Oct 2013 10:50:27 +0000 (12:50 +0200)]
Switch order of html/text for StatusNet backwards compatibility

StatusNet chooses the first content element in an Atom feed, while
it should really choose the 'html' representation for its 'rendered'
and 'text' representation for the (text-only) 'content'.

GNU social will implement a better algorithm for retrieving Atom
feeds, but that is yet to be done. So to avoid having link-less posts
on remote nodes, we'll just do the old switch-a-roo.

Other Atom readers, such as Mozilla Firefox, has the reverse priority
(choosing the last of the content elements).

11 years agoCore plugin list would not merge into $config
Mikael Nordfeldth [Sat, 19 Oct 2013 13:25:59 +0000 (15:25 +0200)]
Core plugin list would not merge into $config

11 years agoAlways generate local HTTPS links if ssl is 'always'
Mikael Nordfeldth [Sat, 19 Oct 2013 12:52:09 +0000 (14:52 +0200)]
Always generate local HTTPS links if ssl is 'always'

The isHTTPS call won't work in cli mode, so install_cli.php should
solve it some other way for initial profile url and User uri.

11 years agoCore and Default plugins separated, now loads on install
Mikael Nordfeldth [Sat, 19 Oct 2013 12:35:04 +0000 (14:35 +0200)]
Core and Default plugins separated, now loads on install

_flow_ reported on IRC that install.php had stopped working. This was
because default plugins had been put into two separate lists, and the
list with AuthCrypt was never loaded when performing an installation.

Core plugins cannot be disabled.

I also removed the Memcache autodetection thing since it should be
solved in a more elegant manner.

11 years agoInstaller redirects to HTTPS if ssl is set to 'always'
Mikael Nordfeldth [Fri, 18 Oct 2013 16:17:37 +0000 (18:17 +0200)]
Installer redirects to HTTPS if ssl is set to 'always'

11 years agoREAD THIS UPGRADE SCRIPT. ON EVERY PULL.
Mikael Nordfeldth [Thu, 17 Oct 2013 15:17:39 +0000 (17:17 +0200)]
READ THIS UPGRADE SCRIPT. ON EVERY PULL.

11 years agoMove nick updating of User entry to Profile->update()
Mikael Nordfeldth [Thu, 17 Oct 2013 14:38:42 +0000 (16:38 +0200)]
Move nick updating of User entry to Profile->update()

Also, timezone and language in User table weren't indexes. So no need
to do them separately.

11 years agoAuthCrypt now tidied up and enabled by default.
Mikael Nordfeldth [Thu, 17 Oct 2013 14:32:53 +0000 (16:32 +0200)]
AuthCrypt now tidied up and enabled by default.

11 years agoWhen updating a User_group nickname, correlate Local_group and Profile
Mikael Nordfeldth [Thu, 17 Oct 2013 11:00:13 +0000 (13:00 +0200)]
When updating a User_group nickname, correlate Local_group and Profile

...no need to make a separate call to Local_group's setNickname all the time,
or a bunch of redundant code for the Profile table.

Next up is User->update()...

11 years agoLocal_group and User are now assumed to be in same namespace
Mikael Nordfeldth [Wed, 16 Oct 2013 23:16:03 +0000 (01:16 +0200)]
Local_group and User are now assumed to be in same namespace

11 years agoNoProfileException now parent to User* and Group*
Mikael Nordfeldth [Wed, 16 Oct 2013 22:32:54 +0000 (00:32 +0200)]
NoProfileException now parent to User* and Group*

11 years agoBetter use of Nickname validation functions
Mikael Nordfeldth [Wed, 16 Oct 2013 12:58:22 +0000 (14:58 +0200)]
Better use of Nickname validation functions

Nickname verifications on registration and updates for profiles (not yet
groups) have been improved.

Minor bugs in RegisterAction were also fixed, where multiple forms would
be outputed because the function did not return after showForm(). This
will be solved more permanently with throwing exceptions in the future.

11 years agoBetter checks during User::register and improved Nickname checks
Mikael Nordfeldth [Wed, 16 Oct 2013 11:55:32 +0000 (13:55 +0200)]
Better checks during User::register and improved Nickname checks

11 years agoMinor changes to ApiCheckNicknameAction, syntax and exception handling mostly
Mikael Nordfeldth [Wed, 16 Oct 2013 11:43:10 +0000 (13:43 +0200)]
Minor changes to ApiCheckNicknameAction, syntax and exception handling mostly

11 years agoNickname::normalize now checks for path name collision too.
Mikael Nordfeldth [Wed, 16 Oct 2013 11:22:43 +0000 (13:22 +0200)]
Nickname::normalize now checks for path name collision too.

11 years agoAdd support (and upgrade path) for group profiles
Mikael Nordfeldth [Tue, 15 Oct 2013 09:12:50 +0000 (11:12 +0200)]
Add support (and upgrade path) for group profiles

11 years agoLegacy fixup script from bad block/sub interaction
Mikael Nordfeldth [Tue, 15 Oct 2013 09:00:11 +0000 (11:00 +0200)]
Legacy fixup script from bad block/sub interaction

11 years agoRemoving legacy code and fixup_* for Status_network tags
Mikael Nordfeldth [Tue, 15 Oct 2013 08:54:03 +0000 (10:54 +0200)]
Removing legacy code and fixup_* for Status_network tags

11 years agoMaking many of the API actions more consistent with coding style
Mikael Nordfeldth [Tue, 15 Oct 2013 00:54:10 +0000 (02:54 +0200)]
Making many of the API actions more consistent with coding style

clientError and serverError exit after they're done so no need for
break or return. Also, $this->format is default.

We also got rid of the incredibly verbose version of $this->isPost()
which was spread all over the place.

Not all of this cleaning up is done yet.

11 years agoDo calls straight to the result of getProfile
Mikael Nordfeldth [Tue, 15 Oct 2013 00:34:10 +0000 (02:34 +0200)]
Do calls straight to the result of getProfile

11 years agoMoved favoriteNotices from User to Profile class
Mikael Nordfeldth [Tue, 15 Oct 2013 00:15:58 +0000 (02:15 +0200)]
Moved favoriteNotices from User to Profile class

11 years agogetTaggedSub-stuff moved to Profile class
Mikael Nordfeldth [Tue, 15 Oct 2013 00:00:27 +0000 (02:00 +0200)]
getTaggedSub-stuff moved to Profile class

11 years agoNow using common_local_url properly
Mikael Nordfeldth [Mon, 14 Oct 2013 23:20:21 +0000 (01:20 +0200)]
Now using common_local_url properly

11 years agoWe never accept a user without a Profile
Mikael Nordfeldth [Mon, 14 Oct 2013 23:00:27 +0000 (01:00 +0200)]
We never accept a user without a Profile

11 years agoGNU social is with a minor s.
Mikael Nordfeldth [Mon, 14 Oct 2013 22:20:36 +0000 (00:20 +0200)]
GNU social is with a minor s.

11 years agoNaming stuff GNUsocial rather than StatusNet
Mikael Nordfeldth [Mon, 14 Oct 2013 22:19:03 +0000 (00:19 +0200)]
Naming stuff GNUsocial rather than StatusNet

11 years agodocs: mysqlnd extension clarification
Mikael Nordfeldth [Mon, 14 Oct 2013 17:08:50 +0000 (19:08 +0200)]
docs: mysqlnd extension clarification

11 years agostatic:: call are less cluttery
Mikael Nordfeldth [Mon, 14 Oct 2013 16:18:11 +0000 (18:18 +0200)]
static:: call are less cluttery

11 years agoprotected handle function without args for Action
Mikael Nordfeldth [Mon, 14 Oct 2013 12:00:12 +0000 (14:00 +0200)]
protected handle function without args for Action

11 years agocommon_sql_now() is recommended before DB_DataObject_Cast::dateTime()
Mikael Nordfeldth [Mon, 14 Oct 2013 11:42:27 +0000 (13:42 +0200)]
common_sql_now() is recommended before DB_DataObject_Cast::dateTime()

11 years agoLegacy StatusNet <0.8 stuff, not needed anymore
Mikael Nordfeldth [Mon, 14 Oct 2013 11:40:38 +0000 (13:40 +0200)]
Legacy StatusNet <0.8 stuff, not needed anymore

11 years agoMDB2 now works with UTF-8
Mikael Nordfeldth [Mon, 14 Oct 2013 11:18:26 +0000 (13:18 +0200)]
MDB2 now works with UTF-8

11 years agoRemote Profile Action from ModPlus now more generic
Mikael Nordfeldth [Tue, 8 Oct 2013 19:08:02 +0000 (21:08 +0200)]
Remote Profile Action from ModPlus now more generic

11 years agoRemoved deprecated activity:subject
Mikael Nordfeldth [Tue, 8 Oct 2013 13:06:19 +0000 (15:06 +0200)]
Removed deprecated activity:subject

11 years agoAtom output of ActivityObject now has html AND text
Mikael Nordfeldth [Tue, 8 Oct 2013 13:00:54 +0000 (15:00 +0200)]
Atom output of ActivityObject now has html AND text

11 years agoRevert "Don't set the title of a notice to its plain-text content."
Mikael Nordfeldth [Tue, 8 Oct 2013 12:06:27 +0000 (14:06 +0200)]
Revert "Don't set the title of a notice to its plain-text content."

This reverts commit 74ec87c27c64585f4e0488e0a2b377865f452abb.

11 years agocommon_sql_now() is recommended
Mikael Nordfeldth [Tue, 8 Oct 2013 09:40:23 +0000 (11:40 +0200)]
common_sql_now() is recommended

11 years agoNoResultException returns the failed object
Mikael Nordfeldth [Mon, 7 Oct 2013 22:21:24 +0000 (00:21 +0200)]
NoResultException returns the failed object

11 years agoLet's not limit qvitter stuff to 'json' requests
Mikael Nordfeldth [Mon, 7 Oct 2013 17:56:57 +0000 (19:56 +0200)]
Let's not limit qvitter stuff to 'json' requests

Also, cleanup and report errors properly when we try unsupported media types.

11 years agoCleaning up clientError and serverError
Mikael Nordfeldth [Mon, 7 Oct 2013 17:44:57 +0000 (19:44 +0200)]
Cleaning up clientError and serverError

11 years agoCalling parent::handle in ApiCheckHubAction
Mikael Nordfeldth [Mon, 7 Oct 2013 12:51:23 +0000 (14:51 +0200)]
Calling parent::handle in ApiCheckHubAction

11 years agoValidate::uri replaced with filter_var for HTTP[S] URL checks
Mikael Nordfeldth [Mon, 7 Oct 2013 12:46:09 +0000 (14:46 +0200)]
Validate::uri replaced with filter_var for HTTP[S] URL checks

Also, a bug in checking the OAuth callback URL for validity was fixed,
where it referenced the wrong variable when going through form data.

11 years agoLet the SearchEngine take care of the search, and showJsonTimeline is good enough...
Mikael Nordfeldth [Sun, 6 Oct 2013 20:52:34 +0000 (22:52 +0200)]
Let the SearchEngine take care of the search, and showJsonTimeline is good enough for now

I bet JSONSearchResultsList is a good idea, but we have no immediate use of it right now.

And it's better if the SearchEngine can take care of all that jazz.

11 years agoURL shortening can now be disabled for the 'maxurllength'
Mikael Nordfeldth [Sun, 6 Oct 2013 20:35:26 +0000 (22:35 +0200)]
URL shortening can now be disabled for the 'maxurllength'

Also, URL shortening now consistently uses 'maxurllength'...

11 years agoQvitter API changes (thanks hannes2peer)
Mikael Nordfeldth [Sun, 6 Oct 2013 19:30:29 +0000 (21:30 +0200)]
Qvitter API changes (thanks hannes2peer)

I implemented changes from quitter.se's new API that their front-end qvitter
uses, https://github.com/hannesmannerheim/qvitter/blob/master/api-changes-1.1.1/CHANGES

However I left out the URL shortening commens, since I believe whatever behaviour
they experienced that caused them to implement this was a bug (or many) and should
be fixed in their proper areas and that shortening should not be entirely left
out in API calls.

11 years ago60 chars was too little, 100 chars seems better. For me.
Mikael Nordfeldth [Sun, 6 Oct 2013 18:28:07 +0000 (20:28 +0200)]
60 chars was too little, 100 chars seems better. For me.

11 years agopkeyGet unfortunately returns null (should throw NoResultException) on empty result
Mikael Nordfeldth [Sun, 6 Oct 2013 18:03:56 +0000 (20:03 +0200)]
pkeyGet unfortunately returns null (should throw NoResultException) on empty result

11 years agoMissed an exclamation mark. Still doesn't linkify groups?
Mikael Nordfeldth [Sun, 6 Oct 2013 15:26:55 +0000 (17:26 +0200)]
Missed an exclamation mark. Still doesn't linkify groups?

11 years agolistFind throws NoResultException on no results
Mikael Nordfeldth [Sun, 6 Oct 2013 14:37:51 +0000 (16:37 +0200)]
listFind throws NoResultException on no results

11 years agoMoved Avatar retrieval into Avatar class
Mikael Nordfeldth [Sun, 6 Oct 2013 13:54:06 +0000 (15:54 +0200)]
Moved Avatar retrieval into Avatar class

Backwards compatible functions are still in Profile class.

11 years agoAdded Profile_prefs class for profile preferences
Mikael Nordfeldth [Sun, 6 Oct 2013 11:40:53 +0000 (13:40 +0200)]
Added Profile_prefs class for profile preferences

Profile_prefs aims to consolidate all the profile preferences into a
single table. Otherwise we end up with a bajillion *_prefs classes, like
User_urlshortener_prefs, or new fields in existing User/Profile classes,
like 'urlshorteningservice', 'homepage', 'phone_number', 'pet_name' etc.

Eventually we should migrate as many user-settable preferences as we can
into this system.

The data in Profile_prefs is organized by:
    * profile_id    Identify the current Profile.
    * namespace     Which plugin/section the preference is for.
    * topic         Preference name (like 'homepage')
    * data          Preference data (like 'https://gnu.org/')

The names 'topic' and 'data' are because 'key' and 'value' may be rather
ambigous when dealing with our DB_DataObject classes etc.

11 years agoMoved shareLocation preference check to Profile class
Mikael Nordfeldth [Sun, 6 Oct 2013 11:38:09 +0000 (13:38 +0200)]
Moved shareLocation preference check to Profile class

11 years agoOAuth related syntax fixes, nothing big
Mikael Nordfeldth [Sun, 6 Oct 2013 10:40:58 +0000 (12:40 +0200)]
OAuth related syntax fixes, nothing big

Making better use of class autoloading too.

11 years agoI missed a preg_replace with /e
Mikael Nordfeldth [Sun, 6 Oct 2013 10:37:55 +0000 (12:37 +0200)]
I missed a preg_replace with /e

11 years agoTyping and static declaration in PoCo class
Mikael Nordfeldth [Sun, 6 Oct 2013 01:48:41 +0000 (03:48 +0200)]
Typing and static declaration in PoCo class

11 years agoSome PHP strict warning fixes
Mikael Nordfeldth [Sun, 6 Oct 2013 01:37:12 +0000 (03:37 +0200)]
Some PHP strict warning fixes

11 years agoPCRE modifier /e is deprecated in favour of preg_replace_callback()
Mikael Nordfeldth [Sun, 6 Oct 2013 01:27:16 +0000 (03:27 +0200)]
PCRE modifier /e is deprecated in favour of preg_replace_callback()

11 years agofillAvatars would avoid the *ProfileGetAvatar events
Mikael Nordfeldth [Sat, 5 Oct 2013 23:56:27 +0000 (01:56 +0200)]
fillAvatars would avoid the *ProfileGetAvatar events

11 years agoGroup logos would not be fetched
Mikael Nordfeldth [Sat, 5 Oct 2013 23:30:44 +0000 (01:30 +0200)]
Group logos would not be fetched

update_ostatus_profiles.php did this correctly, but not Ostatus_profile.php

11 years agoLOG_WARNING, not LOG_WARN
Mikael Nordfeldth [Sat, 5 Oct 2013 23:15:21 +0000 (01:15 +0200)]
LOG_WARNING, not LOG_WARN

11 years agoMediaFile code improvements, preparing to implement multi-attachments
Mikael Nordfeldth [Sat, 5 Oct 2013 16:43:41 +0000 (18:43 +0200)]
MediaFile code improvements, preparing to implement multi-attachments

Maybe in the future we can use this for anonymous file uploads too?
With some kind of anonymous/pseudonymous profile. That'd be neat.

11 years agoOAuth extlib updated and Twitter comments removed
Mikael Nordfeldth [Sat, 5 Oct 2013 13:59:43 +0000 (15:59 +0200)]
OAuth extlib updated and Twitter comments removed

Source: http://oauth.googlecode.com/svn/code/php/OAuth.php

Should we use PECL OAuth?

11 years agoForgot to clean some debug logging
Mikael Nordfeldth [Sat, 5 Oct 2013 12:33:02 +0000 (14:33 +0200)]
Forgot to clean some debug logging

11 years agoUpdating external libraries for net access
Mikael Nordfeldth [Sat, 5 Oct 2013 12:29:02 +0000 (14:29 +0200)]
Updating external libraries for net access

11 years agoINSTALL docs updated, htaccess.sample more generic
Mikael Nordfeldth [Sat, 5 Oct 2013 12:28:41 +0000 (14:28 +0200)]
INSTALL docs updated, htaccess.sample more generic

11 years agoWe don't need _that_ noisy queue managers...
Mikael Nordfeldth [Sat, 5 Oct 2013 11:12:16 +0000 (13:12 +0200)]
We don't need _that_ noisy queue managers...

11 years agoIM/XMPP Plugin classes use throwing getParent
Mikael Nordfeldth [Sat, 5 Oct 2013 10:30:52 +0000 (12:30 +0200)]
IM/XMPP Plugin classes use throwing getParent

11 years agogetParent throws exception
Mikael Nordfeldth [Sat, 5 Oct 2013 10:30:14 +0000 (12:30 +0200)]
getParent throws exception

Should we get another Exception for if there's no parent? I think so,
because it's not really the same context as 'no result'.

11 years agoMerge-request 3 by pztrn, IM reply more intuitive
Mikael Nordfeldth [Sat, 5 Oct 2013 09:33:25 +0000 (11:33 +0200)]
Merge-request 3 by pztrn, IM reply more intuitive

11 years agoFix Avatar-unlink plus better logging in TwitterImport
Mikael Nordfeldth [Sat, 5 Oct 2013 09:32:43 +0000 (11:32 +0200)]
Fix Avatar-unlink plus better logging in TwitterImport

11 years agoAdopted merge request #232 from statusnet to gnusocial
pztrn [Sat, 5 Oct 2013 08:36:48 +0000 (12:36 +0400)]
Adopted merge request #232 from statusnet to gnusocial

11 years agoLatest phpseclib stuff and moved into its own dir.
Mikael Nordfeldth [Fri, 4 Oct 2013 22:16:07 +0000 (00:16 +0200)]
Latest phpseclib stuff and moved into its own dir.

Source: https://github.com/phpseclib/phpseclib/
Commit: 77447a3fc7869773007fa3beeb8d6f8de842ec2a

There were bugs.

11 years agois_a() with 3 params only supported in 5.3.9 anyway
Mikael Nordfeldth [Fri, 4 Oct 2013 21:10:59 +0000 (23:10 +0200)]
is_a() with 3 params only supported in 5.3.9 anyway

So I removed those safety-checks, because now we can assume it works.

11 years agoProperly defined globals, $_PEAR caused install to fail. (thanks DRiKE)
Mikael Nordfeldth [Fri, 4 Oct 2013 18:49:07 +0000 (20:49 +0200)]
Properly defined globals, $_PEAR caused install to fail. (thanks DRiKE)

11 years agoTwitter Import improvements. Still buggy?
Mikael Nordfeldth [Fri, 4 Oct 2013 11:36:45 +0000 (13:36 +0200)]
Twitter Import improvements. Still buggy?

Apparently mrvdb has problems with duplicate inserts and missing files when
unlinking. It could be due to coding, or it could be due to parallelizing.

11 years agoTwitter Import + avatar fixes (cleaning up + fixing)
Mikael Nordfeldth [Wed, 2 Oct 2013 18:16:08 +0000 (20:16 +0200)]
Twitter Import + avatar fixes (cleaning up + fixing)

...there was also a typo in OstatussubAction ($avatarUrl not defined)

11 years agoDo not name anything getOriginal (because DB_DataObject calls that)
Mikael Nordfeldth [Wed, 2 Oct 2013 13:01:11 +0000 (15:01 +0200)]
Do not name anything getOriginal (because DB_DataObject calls that)

Avatar->getOriginal has been renamed getUploaded
Notice->getOriginal has been renamed getParent

11 years agoVarious minor Avatar fixes, but pretty necessary.
Mikael Nordfeldth [Wed, 2 Oct 2013 12:37:10 +0000 (14:37 +0200)]
Various minor Avatar fixes, but pretty necessary.

One typing thing. And a missed exception case.

Get src from displayUrl() instead of url for example.

11 years agoPlugin onAutoload replaces _ with / in lib paths, this renames some classes.
Mikael Nordfeldth [Wed, 2 Oct 2013 12:07:53 +0000 (14:07 +0200)]
Plugin onAutoload replaces _ with / in lib paths, this renames some classes.

11 years agoPHP Notice: Trying to get property of non-object
Mikael Nordfeldth [Tue, 1 Oct 2013 15:43:46 +0000 (17:43 +0200)]
PHP Notice:  Trying to get property of non-object

The notice was reported in /srv/www/vhosts/se/umeahackerspace/social/%/htdocs/lib/inboxtagcloudsection.php on line 63

11 years agoPHP Notice: Undefined variable: logo
Mikael Nordfeldth [Tue, 1 Oct 2013 15:07:16 +0000 (17:07 +0200)]
PHP Notice:  Undefined variable: logo

It was reported in actions/apitimelinetag.php on line 142

11 years agoProperly unlink all old avatars when deleting/uploading a new
Mikael Nordfeldth [Tue, 1 Oct 2013 09:37:59 +0000 (11:37 +0200)]
Properly unlink all old avatars when deleting/uploading a new

We're also now using $config['image']['jpegquality'] to determine the
quality setting for resized images.

To set Avatar max size, adjust $config['avatar']['maxsize']

The getAvatar call now throws exceptions too. Related changes applied.
Now let's move Profile->avatarUrl to the Avatar class!

11 years agoFixed regression in OStatus sub from WebFinger/XML_XRD update
Mikael Nordfeldth [Mon, 30 Sep 2013 21:12:35 +0000 (23:12 +0200)]
Fixed regression in OStatus sub from WebFinger/XML_XRD update

XML_XRD::getAll requires arguments (at least relation). If one really
want all links, just get the 'links' array. It's public!

Also, not all XML_XRD_Element_Link were migrated from the previous
array style.

11 years agoFixed regression in latest Avatar fixes
Mikael Nordfeldth [Mon, 30 Sep 2013 20:49:47 +0000 (22:49 +0200)]
Fixed regression in latest Avatar fixes

I thought typing would fix it, but there's a problem earlier in the
execution chain which will be fixed in the future.

11 years agoFix regression from WebFinger update for singleuser sites
Mikael Nordfeldth [Mon, 30 Sep 2013 20:42:20 +0000 (22:42 +0200)]
Fix regression from WebFinger update for singleuser sites

11 years agoAvatar resizing improvements and better code reuse
Mikael Nordfeldth [Mon, 30 Sep 2013 20:13:37 +0000 (22:13 +0200)]
Avatar resizing improvements and better code reuse

* getOriginal added to Avatar class
    This is a static function that retrieves the original avatar in a leaner
    way than Profile->getOriginalAvatar() did (see below).
    This will throw an Exception if there was none to be found.

* getProfileAvatars added to Avatar class
    This gets all Avatars from a profile and returns them in an array.

* newSize added to Avatar class
    This will scale an original avatar or throw an Exception (originally from
    Avatar::getOriginal) if one wasn't found.

* deleteFromProfile added to Avatar class
    Deletes all avatars for a Profile. This makes the code much smarter when
    removing all avatars from a user.
    Previously only specific, hardcoded (through constants) sizes would be
    deleted. If you ever changed lib/framework.php then many oddsized avatars
    would remain with the old method.

* Migrated Profile class to new Avatar::getOriginal support
    Profile class now uses Avatar::getOriginal through its own
    $this->getOriginalAvatar and thus remains backwards compatible.

* Updating stock GNU Social to use Avatar::getOriginal
    All places where core StatusNet code used the
    $profile->getOriginalAvatar, it will now useAvatar::getOriginal with
    proper error handling.

* Updated Profile class to use Avatar::newSize
    When doing setOriginal, the scaling will be done with the new method
    introduced in this merge.
    This also edits the _fillAvatar function to avoid adding NULL values to
    the array (which causes errors when attempting to access array entries as
    objects). See issue #3478 at http://status.net/open-source/issues/3478