Commit Graph

15299 Commits

Author SHA1 Message Date
Mikael Nordfeldth
ba481d1e31 LOG_WARNING, not LOG_WARN 2013-10-06 01:33:10 +02:00
Mikael Nordfeldth
48da97f204 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.
2013-10-05 18:47:45 +02:00
Mikael Nordfeldth
b43be41643 OAuth extlib updated and Twitter comments removed
Source: http://oauth.googlecode.com/svn/code/php/OAuth.php

Should we use PECL OAuth?
2013-10-05 16:04:23 +02:00
Mikael Nordfeldth
e376905d93 Forgot to clean some debug logging 2013-10-05 14:33:02 +02:00
Mikael Nordfeldth
c51086b302 Updating external libraries for net access 2013-10-05 14:29:02 +02:00
Mikael Nordfeldth
ce37edc1b0 INSTALL docs updated, htaccess.sample more generic 2013-10-05 14:28:41 +02:00
Mikael Nordfeldth
eb5097aecb We don't need _that_ noisy queue managers... 2013-10-05 13:12:16 +02:00
Mikael Nordfeldth
8fdc999be4 IM/XMPP Plugin classes use throwing getParent 2013-10-05 12:30:52 +02:00
Mikael Nordfeldth
29de09a63d 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'.
2013-10-05 12:30:14 +02:00
Mikael Nordfeldth
e1b5798ba4 Merge-request 3 by pztrn, IM reply more intuitive 2013-10-05 11:36:03 +02:00
Mikael Nordfeldth
d1558a1d8b Fix Avatar-unlink plus better logging in TwitterImport 2013-10-05 11:32:43 +02:00
pztrn
9824b00f4b Adopted merge request #232 from statusnet to gnusocial 2013-10-05 12:36:48 +04:00
Mikael Nordfeldth
1795267df9 Latest phpseclib stuff and moved into its own dir.
Source: https://github.com/phpseclib/phpseclib/
Commit: 77447a3fc7869773007fa3beeb8d6f8de842ec2a

There were bugs.
2013-10-05 00:22:14 +02:00
Mikael Nordfeldth
597eb97bec 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.
2013-10-04 23:10:59 +02:00
Mikael Nordfeldth
636a8fcaf5 Properly defined globals, $_PEAR caused install to fail. (thanks DRiKE) 2013-10-04 21:29:16 +02:00
Mikael Nordfeldth
fb4e9b234d 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.
2013-10-04 13:36:45 +02:00
Mikael Nordfeldth
cd6fa512ac Twitter Import + avatar fixes (cleaning up + fixing)
...there was also a typo in OstatussubAction ($avatarUrl not defined)
2013-10-03 15:28:51 +02:00
Mikael Nordfeldth
39f43e415d Do not name anything getOriginal (because DB_DataObject calls that)
Avatar->getOriginal has been renamed getUploaded
Notice->getOriginal has been renamed getParent
2013-10-02 15:01:11 +02:00
Mikael Nordfeldth
7979918ba9 Various minor Avatar fixes, but pretty necessary.
One typing thing. And a missed exception case.

Get src from displayUrl() instead of url for example.
2013-10-02 14:49:01 +02:00
Mikael Nordfeldth
ba5e90164c Plugin onAutoload replaces _ with / in lib paths, this renames some classes. 2013-10-02 14:07:53 +02:00
Mikael Nordfeldth
3e15bab965 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
2013-10-01 17:43:46 +02:00
Mikael Nordfeldth
1d46ca45d1 PHP Notice: Undefined variable: logo
It was reported in actions/apitimelinetag.php on line 142
2013-10-01 17:07:16 +02:00
Mikael Nordfeldth
b0dfc70a54 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!
2013-10-01 17:00:10 +02:00
Mikael Nordfeldth
a7e748479c 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.
2013-09-30 23:33:28 +02:00
Mikael Nordfeldth
cced063e47 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.
2013-09-30 22:49:47 +02:00
Mikael Nordfeldth
24e0535001 Fix regression from WebFinger update for singleuser sites 2013-09-30 22:42:20 +02:00
Mikael Nordfeldth
a23c4aa236 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
2013-09-30 22:23:03 +02:00
Mikael Nordfeldth
a0e107f17f Implemented WebFinger and replaced our XRD with PEAR XML_XRD
New plugins:
* LRDD
    LRDD implements client-side RFC6415 and RFC7033 resource descriptor
    discovery procedures. I.e. LRDD, host-meta and WebFinger stuff.

    OStatus and OpenID now depend on the LRDD plugin (XML_XRD).

* WebFinger
    This plugin implements the server-side of RFC6415 and RFC7033. Note:
    WebFinger technically doesn't handle XRD, but we serve both that and
    JRD (JSON Resource Descriptor), depending on Accept header and one
    ugly hack to check for old StatusNet installations.

    WebFinger depends on LRDD.

We might make this even prettier by using Net_WebFinger, but it is not
currently RFC7033 compliant (no /.well-known/webfinger resource GETs).

Disabling the WebFinger plugin would effectively render your site non-
federated (which might be desired on a private site).

Disabling the LRDD plugin would make your site unable to do modern web
URI lookups (making life just a little bit harder).
2013-09-30 22:04:52 +02:00
Joshua Judson Rosen
44f7ad612a Correctly distribute notices from remote posters through local groups to remote group-members via OStatus.
Allow the OStatus queue-handler to handle all posts,
and give it the smarts required to make correct decisions
about whether it should or shouldn't relay notices
over OStatus.
cf. http://status.net/open-source/issues/3540

Conflicts (staticGet => getKV):

	plugins/OStatus/lib/ostatusqueuehandler.php
2013-09-29 23:19:11 +02:00
Joshua Judson Rosen
8e53eb2b4c Correct a logic-inverting typo in handling of replies to group-posts.
The typo causes a tautology, which makes replies to group-posts always (or almost-always) go to the group(s).
cf. http://status.net/open-source/issues/3638
2013-09-29 23:14:00 +02:00
Joshua Judson Rosen
90858804bc Allow the hostmeta to indirect from one domain to another.
e.g.: rozzin@hackerposse.com => rozzin@status.hackerposse.com.
2013-09-29 23:13:45 +02:00
Joshua Judson Rosen
9844ec76e9 Make the ForceGroup plugin work consistently for notices from remote users. 2013-09-29 23:12:40 +02:00
Joshua Judson Rosen
8e5d58fe2a Make paging work correctly in the user-directory
even with the default filter set (i.e.: `all' = `no filter', so intrepret `filter=all' as `no filter').
2013-09-29 23:10:40 +02:00
Joshua Judson Rosen
562d5bc5fb Remove bad common_path() call in context of cssLink(). 2013-09-29 23:09:55 +02:00
Mikael Nordfeldth
981295f44c Autocomplete action must exist on user registration
No need to restrict the autocomplete suggestion system to logged in users.
It only botched the registration process, because the 'autocomplete' action
had not been connected in the routing system.
2013-09-29 15:28:25 +02:00
Mikael Nordfeldth
633191d808 Making sure scripts and tests check for GNUSOCIAL defined (instead of STATUSNET)
Orbited plugin may not work at all anymore, I had no means to try it.
But there's a check whether 'LACONICA' is defined there, which is a
very unlikely thing in the future. So far only tests and scripts have
been migrated consistently, though.
2013-09-28 15:20:10 +02:00
Mikael Nordfeldth
80c6af0ffe Uncaught exception when no subscribers/subscriptions in ProfileList 2013-09-26 00:47:56 +02:00
Mikael Nordfeldth
858d9cc3c4 maxNoticeLength test for url-shortening failed on maxContent==0
maxContent==0 implies that a notice text can be infinitely long, but
this value was directly transferred to maxNoticeLength, where 0 was
tested if it was longer than the notice length - which of course always
was false.

This commit fixes the problem for infinite length notices that always
got shortened.
2013-09-25 22:48:32 +02:00
Mikael Nordfeldth
e9cc87f5b9 Updated some of the INSTALL documentation
Also we now recommend the mysqlnd driver, instead of 'mysql', so no need
to mention deprecation in daemon.php comments.
2013-09-25 13:19:03 +02:00
Mikael Nordfeldth
3ffe0e480f Added queue daemon notice about disabled forking functions 2013-09-24 11:45:30 +02:00
Mikael Nordfeldth
64df40e409 Filling in missing endHTML calls for Action AJAX
This completes 1c6f9df80e where a lot
of other functions were fixed (by conforming to startHTML and endHTML)
2013-09-24 02:32:17 +02:00
Mikael Nordfeldth
f7719b57f2 phpseclib extlib updated from phpseclib.sf.net 2013-09-24 02:09:37 +02:00
Mikael Nordfeldth
49b755912f Updating Janrain OpenID auth library
Source: https://github.com/openid/php-openid
2013-09-24 01:49:34 +02:00
Mikael Nordfeldth
f01c478aab htmLawed extlib updated 2013-09-24 01:37:38 +02:00
Mikael Nordfeldth
f268c3f877 Completing extra-element-without-text patch from 4015a58d1c 2013-09-24 01:26:51 +02:00
Mikael Nordfeldth
1c6f9df80e PHP5.5 fix: Better use of startXML for Action classes (mostly AJAX)
I had a problem with PHP5.5 that caused ajax responses to be empty. This
fixes it, as the problem was related to pretty inconsistent calling to
headers, XMLWriter::startDocument etc. etc.
2013-09-24 01:18:33 +02:00
Mikael Nordfeldth
1744fec89f Array to string conversion in queuemanager logger 2013-09-24 00:40:23 +02:00
Mikael Nordfeldth
4015a58d1c Sometimes there's no text content, so pad the array (thanks mrvdb)
mrvdb used '' rather than null for the padding argument. MMN-o changed that.
2013-09-24 00:12:30 +02:00
Mikael Nordfeldth
9d3abc3600 $_PEAR now defined globally as new PEAR, so no static calls are made 2013-09-23 22:27:43 +02:00
Mikael Nordfeldth
8205c56e25 Stylesheet event now removed of StatusNet-remnants 2013-09-23 22:13:12 +02:00