]> git.mxchange.org Git - quix0rs-gnu-social.git/log
quix0rs-gnu-social.git
10 years agoUpdating Janrain OpenID auth library
Mikael Nordfeldth [Mon, 23 Sep 2013 23:49:34 +0000 (01:49 +0200)]
Updating Janrain OpenID auth library

Source: https://github.com/openid/php-openid

10 years agohtmLawed extlib updated
Mikael Nordfeldth [Mon, 23 Sep 2013 23:37:38 +0000 (01:37 +0200)]
htmLawed extlib updated

10 years agoCompleting extra-element-without-text patch from 4015a58d1cfaa257fcf2b01aa6b1c9daa268c997
Mikael Nordfeldth [Mon, 23 Sep 2013 23:26:18 +0000 (01:26 +0200)]
Completing extra-element-without-text patch from 4015a58d1cfaa257fcf2b01aa6b1c9daa268c997

10 years agoPHP5.5 fix: Better use of startXML for Action classes (mostly AJAX)
Mikael Nordfeldth [Mon, 23 Sep 2013 23:17:04 +0000 (01:17 +0200)]
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.

10 years agoArray to string conversion in queuemanager logger
Mikael Nordfeldth [Mon, 23 Sep 2013 22:40:23 +0000 (00:40 +0200)]
Array to string conversion in queuemanager logger

10 years agoSometimes there's no text content, so pad the array (thanks mrvdb)
Mikael Nordfeldth [Mon, 23 Sep 2013 22:12:30 +0000 (00:12 +0200)]
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.

10 years ago$_PEAR now defined globally as new PEAR, so no static calls are made
Mikael Nordfeldth [Mon, 23 Sep 2013 20:27:17 +0000 (22:27 +0200)]
$_PEAR now defined globally as new PEAR, so no static calls are made

10 years agoStylesheet event now removed of StatusNet-remnants
Mikael Nordfeldth [Tue, 17 Sep 2013 18:41:54 +0000 (20:41 +0200)]
Stylesheet event now removed of StatusNet-remnants

10 years agoIMPORTANT: 'GNUSOCIAL' defined, or daemons wouldn't work
Mikael Nordfeldth [Mon, 23 Sep 2013 20:10:26 +0000 (22:10 +0200)]
IMPORTANT: 'GNUSOCIAL' defined, or daemons wouldn't work

Apparently I forgot scripts/commandline.inc in the commit for 'GNUSOCIAL'
definition 4c6803a0540243c2ae1e36b6fafc8728e69473cc.

define('GNUSOCIAL', true); indicates that we're running GNUSOCIAL, and that
one should be aware of this if applying patches.

10 years agoWrong call signature used for Event::handle
Marcel van der Boom [Mon, 23 Sep 2013 10:32:30 +0000 (12:32 +0200)]
Wrong call signature used for Event::handle

Call needs 2nd parameter to be array.

10 years agoFavorAction upgraded to extend FormAction
Mikael Nordfeldth [Mon, 23 Sep 2013 09:34:15 +0000 (11:34 +0200)]
FavorAction upgraded to extend FormAction

Includes some minor changes to other things as well, such as the session
token input element now having the same 'name' attribute as everyone else.
(it still retains a 'token-'+noticeid 'id' attribute for clientside JS)

10 years agoFixed regression in bookmark.js that caused double-submits (jquery 2.x stuff)
Mikael Nordfeldth [Mon, 23 Sep 2013 10:07:37 +0000 (12:07 +0200)]
Fixed regression in bookmark.js that caused double-submits (jquery 2.x stuff)

In 6de3fc02173017f6fb46e8e86c87228c3d7237a0 bookmark.js was patched to
jquery 2.x (removed '.die' call) but unfortunately the 'submit' event
was attached to an input element instead of a form element (which got
a 'click' event).

10 years agoShouldn't define static classes as abstract.
Mikael Nordfeldth [Sat, 21 Sep 2013 16:44:05 +0000 (18:44 +0200)]
Shouldn't define static classes as abstract.

New Exception class added (MethodNotImplementedException)

10 years agoSubscription "get by" functions now don't use ArrayWrappers
Mikael Nordfeldth [Sat, 21 Sep 2013 16:26:58 +0000 (18:26 +0200)]
Subscription "get by" functions now don't use ArrayWrappers

They were getting in the way of some strict-typing stuff.

10 years agoNew Managed_DataObject retrieval: listFind
Mikael Nordfeldth [Sat, 21 Sep 2013 14:55:18 +0000 (16:55 +0200)]
New Managed_DataObject retrieval: listFind

This will return a proper DB_DataObject instance (as the desired class)
and not an array, or ArrayWrapper.

10 years agoMake better use of Subscription class
Mikael Nordfeldth [Thu, 19 Sep 2013 15:20:44 +0000 (17:20 +0200)]
Make better use of Subscription class

removed lib/subs.php as it was essentially only a wrapper for Subscription

10 years agoinstanceof instead of is_a is faster (thanks quix0r)
Mikael Nordfeldth [Thu, 19 Sep 2013 14:37:39 +0000 (16:37 +0200)]
instanceof instead of is_a is faster (thanks quix0r)

10 years agoStatusNet_HTTPResponse now prefixed with GNUSocial_
Mikael Nordfeldth [Thu, 19 Sep 2013 14:11:04 +0000 (16:11 +0200)]
StatusNet_HTTPResponse now prefixed with GNUSocial_

10 years agourl shortening fixes for api config and not ur1.ca
Mikael Nordfeldth [Wed, 18 Sep 2013 23:11:47 +0000 (01:11 +0200)]
url shortening fixes for api config and not ur1.ca

Will have to change the 'maxnoticelength' code to stop shortening ALL
links if the setting for infinitely long notices is configured.

10 years ago8 chars was too little, 32 should be enough.
Mikael Nordfeldth [Tue, 17 Sep 2013 23:21:53 +0000 (01:21 +0200)]
8 chars was too little, 32 should be enough.

10 years agoGNUSOCIAL is the new defined indicator
Mikael Nordfeldth [Tue, 17 Sep 2013 22:35:49 +0000 (00:35 +0200)]
GNUSOCIAL is the new defined indicator

STATUSNET is still there for compatibility, so we don't have to change
all scripts at once yet...

10 years agominor fixes and cleanups in the scripts directory
Mikael Nordfeldth [Tue, 17 Sep 2013 22:25:11 +0000 (00:25 +0200)]
minor fixes and cleanups in the scripts directory

10 years agoPHP 5.3 dependency declared in INSTALL file
Mikael Nordfeldth [Tue, 17 Sep 2013 22:10:44 +0000 (00:10 +0200)]
PHP 5.3 dependency declared in INSTALL file

10 years agoBad call to joinAdd in Profile.php
Mikael Nordfeldth [Mon, 16 Sep 2013 20:36:44 +0000 (22:36 +0200)]
Bad call to joinAdd in Profile.php

10 years agoAutocomplete migrated to jquery-ui autocomplete
Mikael Nordfeldth [Mon, 16 Sep 2013 20:10:08 +0000 (22:10 +0200)]
Autocomplete migrated to jquery-ui autocomplete

No longer bundled with the library (as jquery-ui is bundled with the
main software, including the autocomplete part).

Rewrites had to be made to migrate, as several API things had changed
when jquery-ui took over the library.

Currently (like before, right?) this only autocompletes in the end of
the current textarea. So you can't jump back in the middle of a text
and autocomplete a user or group. This is a serious deficiency, though
not a regression.

10 years agoGravatar pretty much equals disregarding privacy
Mikael Nordfeldth [Mon, 16 Sep 2013 19:49:32 +0000 (21:49 +0200)]
Gravatar pretty much equals disregarding privacy

Not only that one can often correlate email address md5 hash sums, but
the "functionality" depends on a bunch of external calls.

10 years agoEvents on user registrations now strictly typed
Mikael Nordfeldth [Sat, 14 Sep 2013 16:36:35 +0000 (18:36 +0200)]
Events on user registrations now strictly typed

10 years agoEvent::handle only takes array $args
Mikael Nordfeldth [Sat, 14 Sep 2013 16:32:52 +0000 (18:32 +0200)]
Event::handle only takes array $args

This is because it calls call_user_func_array with that exact $args argument.

10 years agoAdded new config for lighttpd.conf that worked on my 1.28 setup.
Brian Tegtmeier [Sat, 24 Dec 2011 00:28:31 +0000 (19:28 -0500)]
Added new config for lighttpd.conf that worked on my 1.28 setup.

Modified and additionally commented by MMN-o

10 years agoMinified javascripts are evil! Human readable source, please!
Mikael Nordfeldth [Sat, 14 Sep 2013 11:41:49 +0000 (13:41 +0200)]
Minified javascripts are evil! Human readable source, please!

10 years agojquery 2.x update related fix (.die no longer defined)
Mikael Nordfeldth [Sat, 14 Sep 2013 11:41:04 +0000 (13:41 +0200)]
jquery 2.x update related fix (.die no longer defined)

10 years agoFixed regression from jquery-cookie update
Mikael Nordfeldth [Sat, 14 Sep 2013 11:38:50 +0000 (13:38 +0200)]
Fixed regression from jquery-cookie update

cookieValue was matched against null, not undefined.

10 years agoupdated and moved jquery-cookie
Mikael Nordfeldth [Sat, 14 Sep 2013 10:58:03 +0000 (12:58 +0200)]
updated and moved jquery-cookie

Also added to minification Makefile in js/ as it was not delivered from
upstream as .min.js

10 years agoupdated and moved jquery-jcrop (no longer .min.js)
Mikael Nordfeldth [Sat, 14 Sep 2013 10:31:53 +0000 (12:31 +0200)]
updated and moved jquery-jcrop (no longer .min.js)

This won't run properly if other scripts stop javascript execution before
it's time to crop (such as in the Bookmark plugin, which when writing this
hasn't been migrated to Jquery 2.x - so it stops on a '.die' call).

Some images were cleaned up from the theme/base/images/illustrations too.

10 years agoupdated jquery-infieldlabel from 0.1.2 to 0.2.1
Mikael Nordfeldth [Sat, 14 Sep 2013 10:26:21 +0000 (12:26 +0200)]
updated jquery-infieldlabel from 0.1.2 to 0.2.1

Source: https://github.com/instanceofme/jquery-infieldlabels/

10 years agoRemoved jOverlay as it's outdated and not referenced
Mikael Nordfeldth [Thu, 12 Sep 2013 13:57:32 +0000 (15:57 +0200)]
Removed jOverlay as it's outdated and not referenced

10 years agojquery form updated and moved to js/extlib
Mikael Nordfeldth [Thu, 12 Sep 2013 13:53:14 +0000 (15:53 +0200)]
jquery form updated and moved to js/extlib

10 years agojquery-ui updated and moved to js/extlib
Mikael Nordfeldth [Thu, 12 Sep 2013 13:48:28 +0000 (15:48 +0200)]
jquery-ui updated and moved to js/extlib

It seems we don't need all the development files. Though it feels a bit
evil not to keep them. Then again we didn't have the whole dev-tree there.

Really we should maybe use git submodules for this?

I also made sure that if we don't have minify enabled, a non-minified
version of jquery-ui is loaded, as minification is the most evil of all.
Bad as hell to debug, and anyone visiting the site should be allowed to
view all scripts that are run in an overseeable manner.

10 years agojquery javascript was moved to js/extlib
Mikael Nordfeldth [Tue, 10 Sep 2013 17:02:55 +0000 (19:02 +0200)]
jquery javascript was moved to js/extlib

10 years agoChanging js .live calls to .on for jquery 2.x
Mikael Nordfeldth [Tue, 10 Sep 2013 16:52:09 +0000 (18:52 +0200)]
Changing js .live calls to .on for jquery 2.x

10 years agofarbtastic removed along with userdesign stuff
Mikael Nordfeldth [Tue, 10 Sep 2013 13:18:18 +0000 (15:18 +0200)]
farbtastic removed along with userdesign stuff

...I couldn't find anywhere this was being used in current code...

10 years agoFixed regression from util.js updates + syntax cleanup
Mikael Nordfeldth [Tue, 10 Sep 2013 13:14:42 +0000 (15:14 +0200)]
Fixed regression from util.js updates + syntax cleanup

We introduced a regression in 6fa9062d28713e81d508854fa232ce65a8a59319
based on syntax error, as a curly brace ({) was lost. This is now fixed.

10 years agoUpdated jquery extlib to v2.0.3
Mikael Nordfeldth [Tue, 10 Sep 2013 11:56:51 +0000 (13:56 +0200)]
Updated jquery extlib to v2.0.3

Includes pre-minimized version from code.jquery.com

10 years agojson2 extlib updated to 2013-05-26 version
Mikael Nordfeldth [Tue, 10 Sep 2013 11:43:50 +0000 (13:43 +0200)]
json2 extlib updated to 2013-05-26 version

Includes minification and Makefile update

10 years agoShortcut for (document).ready(). Changed .attr() to .prop() for checked and disabled.
Brian Tegtmeier [Fri, 23 Dec 2011 19:56:55 +0000 (14:56 -0500)]
Shortcut for (document).ready(). Changed .attr() to .prop() for checked and disabled.

10 years agoChanged .attr() to .prop() for checked and disabled. Removed "style" removal which...
Brian Tegtmeier [Fri, 23 Dec 2011 19:54:58 +0000 (14:54 -0500)]
Changed .attr() to .prop() for checked and disabled. Removed "style" removal which I assume was tied to opacity setting on line 9. Replaced "style" setting via attr() on line 12 with css().

10 years agoChanged bind() and live() to on(). Changed .attr() to .prop() for checked and disable...
Brian Tegtmeier [Sat, 24 Dec 2011 00:24:47 +0000 (19:24 -0500)]
Changed bind() and live() to on(). Changed .attr() to .prop() for checked and disabled. Shortcut for (document).ready(). This is the first attempt to convert live() elements to on() according to http://api.jquery.com/live/.

10 years agoChanged bind() and unbind() to on() and off(). Shortcut for (document).ready().
Brian Tegtmeier [Sat, 24 Dec 2011 00:13:44 +0000 (19:13 -0500)]
Changed bind() and unbind() to on() and off(). Shortcut for (document).ready().

10 years agoAdd 'twitter:title' meta tag support.
Jean Baptiste Favre [Tue, 18 Sep 2012 14:20:10 +0000 (16:20 +0200)]
Add 'twitter:title' meta tag support.

10 years agoTwitter cards implementation. Currently only supports 'photo' cards.
Jean Baptiste Favre [Sun, 16 Sep 2012 17:27:31 +0000 (19:27 +0200)]
Twitter cards implementation. Currently only supports 'photo' cards.

10 years agoPutting in functionality so that sites with the "Sometimes" SSL setting allow for...
Emily O'Leary [Mon, 25 Mar 2013 05:52:10 +0000 (01:52 -0400)]
Putting in functionality so that sites with the "Sometimes" SSL setting allow for users with plugins such as HTTPSEVERYWHERE who wish to use HTTPS to do so without having errors pop up. Specifically this references this issue: http://status.net/open-source/issues/3855#comment-48988.

(Port detection test removed by MMN-o. Also switched order on the test for
isHTTPS/SensitiveAction.)

10 years agoDeclaring some more static functions properly
Mikael Nordfeldth [Mon, 9 Sep 2013 21:08:43 +0000 (23:08 +0200)]
Declaring some more static functions properly

As a bonus I added type declaration on Profile_block::exists and
Subscription::exists respectively.

10 years agoRemoving unnecessary require_once lines (autoload!)
Mikael Nordfeldth [Mon, 9 Sep 2013 21:05:33 +0000 (23:05 +0200)]
Removing unnecessary require_once lines (autoload!)

10 years agoTidying up getUser calls to profiles and some events
Mikael Nordfeldth [Mon, 9 Sep 2013 19:35:16 +0000 (21:35 +0200)]
Tidying up getUser calls to profiles and some events

getUser calls are much more strict, and one place where this was found was
in the (un)subscribe start/end event handlers, which resulted in making the
Subscription class a bit stricter, regarding ::start and ::cancel at least.
Several minor fixes in many files were made due to this.

This does NOT touch the Foreign_link function, which should also have a more
strict getUser call. That is a future project.

10 years agoUsing a bit more of $this->scoped (Action parent class)
Mikael Nordfeldth [Mon, 9 Sep 2013 18:45:20 +0000 (20:45 +0200)]
Using a bit more of $this->scoped (Action parent class)

$this->scoped is the currently active profile, which is intended
to replace the $user object in the long run...

10 years agoNewapplicationAction converted to FormAction
Mikael Nordfeldth [Mon, 2 Sep 2013 10:13:46 +0000 (12:13 +0200)]
NewapplicationAction converted to FormAction

Cutting down on a bunch of redundant code. We're reusing a lot of stuff
from FormAction and Action now instead of having copies of code all over.

10 years agoneedLogin renamed checkLogin and made a property
Mikael Nordfeldth [Mon, 2 Sep 2013 09:58:47 +0000 (11:58 +0200)]
needLogin renamed checkLogin and made a property

Action extended classes now can set 'needLogin' as a protected property,
which is defaulted to 'false'. However, FormAction defaults this to 'true'
because most of the form actions will require a current login to be valid.

NewgroupAction, NewmessageAction, NewnoticeAction are all affected by this
commit and in the future we will migrate each potential formaction to the
proper class parent tree. :)

10 years agonewmessage (and Message class) fixed for FormAction
Mikael Nordfeldth [Mon, 2 Sep 2013 08:59:02 +0000 (10:59 +0200)]
newmessage (and Message class) fixed for FormAction

Also added a needLogin function to the Action class, which will do
redirect to login page with proper returnto setting.

10 years agoIMPORTANT: parent::handlePost() in NewnoticeAction
Mikael Nordfeldth [Sun, 1 Sep 2013 19:45:10 +0000 (21:45 +0200)]
IMPORTANT: parent::handlePost() in NewnoticeAction

otherwise we don't do csrf checking etc...

10 years agoNewnoticeAction converted to extend FormAction
Mikael Nordfeldth [Sun, 1 Sep 2013 18:56:35 +0000 (20:56 +0200)]
NewnoticeAction converted to extend FormAction

There are still several improvements which can be made, such as not
having an entirely separate setup of ajax form functions. Instead
those should be implemented in FormAction. But at least now we got
rid of the redundant code use in prepare/handle.

10 years agoConforming to code layout
Mikael Nordfeldth [Sun, 1 Sep 2013 18:52:11 +0000 (20:52 +0200)]
Conforming to code layout

10 years agoProper definition of $args array in NewgroupAction->prepare
Mikael Nordfeldth [Sun, 1 Sep 2013 17:28:57 +0000 (19:28 +0200)]
Proper definition of $args array in NewgroupAction->prepare

Also, there is no need to do 'return' after throwing a ClientError
Exception. And we'll use the Action->clientError for logging benefits
until the error handling is properly done all the way to backend.

10 years agoNewgroupAction converted to extend FormAction
Mikael Nordfeldth [Sat, 31 Aug 2013 13:03:59 +0000 (15:03 +0200)]
NewgroupAction converted to extend FormAction

Had to change Action function 'prepare' to 'protected', as you can't
(of course) protect something that's been public in a parent class. The
other way around seems fine for PHP... Eventually all actions will have
protected 'prepare' (use execute/run)

A feature of the previously fixed initialization of Action classes, is
that we now have $this->scoped which is the current profile in use. As
of now that is always a local User, except the corresponding Profile
object.

Also, instead of calling 'showForm' everywhere, in case of an error we
just throw an exception of some sort and pass the message along there.

I've also introduced in FormAction the 'showInstructions' function in
order to get a unified instructions/info/error display method.

TODO: Improve info/error message handling, and what/when/where to show.

10 years agoAdded a FormAction extension
Mikael Nordfeldth [Fri, 30 Aug 2013 08:28:57 +0000 (10:28 +0200)]
Added a FormAction extension

FormAction will act as a parent class to Action classes that use forms
of various sorts, such as newgroup creation, settings actions etc.

10 years agohandle no longer uses $argarray or $args
Mikael Nordfeldth [Thu, 29 Aug 2013 22:22:22 +0000 (00:22 +0200)]
handle no longer uses $argarray or $args

10 years agoPreparing more object-oriented Action handling
Mikael Nordfeldth [Thu, 29 Aug 2013 21:30:04 +0000 (23:30 +0200)]
Preparing more object-oriented Action handling

Action classes can now be run by calling the static function 'run'.
Eventually actions will be migrated so most functionality gets put
into parent classes, and the children don't have to have as much
duplicate code as they have now.

10 years agodb/core.php lacked User_username (Issue 3299)
Thomas Johnson [Mon, 30 Jul 2012 14:10:36 +0000 (16:10 +0200)]
db/core.php lacked User_username (Issue 3299)

Commit message edited by MMN-o (User_username schemaDef already patched).

10 years agoFixed comment description in STS plugin
Mikael Nordfeldth [Thu, 29 Aug 2013 14:20:43 +0000 (16:20 +0200)]
Fixed comment description in STS plugin

10 years agoChanges to GNUsocial plugins
Mikael Nordfeldth [Thu, 29 Aug 2013 14:18:56 +0000 (16:18 +0200)]
Changes to GNUsocial plugins

These aren't ready for production use. Might be insecure, probably broken.

10 years agoremoving empty "planned" GNU Social plugins
Mikael Nordfeldth [Thu, 29 Aug 2013 14:11:32 +0000 (16:11 +0200)]
removing empty "planned" GNU Social plugins

10 years agoMoved multiGet into Managed_DataObject
Mikael Nordfeldth [Thu, 29 Aug 2013 08:38:11 +0000 (10:38 +0200)]
Moved multiGet into Managed_DataObject

10 years agoStronger typing, require array where param array
Mikael Nordfeldth [Thu, 29 Aug 2013 08:27:39 +0000 (10:27 +0200)]
Stronger typing, require array where param array

10 years agopivotGet moved into Managed_DataObject
Mikael Nordfeldth [Thu, 29 Aug 2013 08:13:07 +0000 (10:13 +0200)]
pivotGet moved into Managed_DataObject

10 years agoSyntax error in XMPP config example
Mikael Nordfeldth [Wed, 28 Aug 2013 16:00:23 +0000 (18:00 +0200)]
Syntax error in XMPP config example

10 years agoplugins onAutoload now only overloads if necessary (extlibs etc.)
Mikael Nordfeldth [Wed, 28 Aug 2013 13:54:26 +0000 (15:54 +0200)]
plugins onAutoload now only overloads if necessary (extlibs etc.)

lib/plugin.php now has a parent onAutoload function that finds most common
files that are used in plugins (actions, dataobjects, forms, libs etc.) if
they are put in the standardised directories ('actions', 'classes', 'forms',
'lib' and perhaps some others in the future).

10 years agoMore info for a proper, fancy-url lighttpd setup
Mikael Nordfeldth [Wed, 28 Aug 2013 08:51:43 +0000 (10:51 +0200)]
More info for a proper, fancy-url lighttpd setup

10 years agoWoops, forgot auto_increment (comes with 'serial')
Mikael Nordfeldth [Wed, 21 Aug 2013 12:33:45 +0000 (14:33 +0200)]
Woops, forgot auto_increment (comes with 'serial')

There are still some classes not ported (like Yammer import)

10 years agoGNU Social extensions fixes (please read note)
Mikael Nordfeldth [Wed, 21 Aug 2013 12:12:18 +0000 (14:12 +0200)]
GNU Social extensions fixes (please read note)

These extensions are not considered secure nor stable right now, so don't
use them for a while.

10 years agoIMPORTANT - fixed HubSub to properly fetch primary keys
Mikael Nordfeldth [Wed, 21 Aug 2013 09:25:08 +0000 (11:25 +0200)]
IMPORTANT - fixed HubSub to properly fetch primary keys

In commit e95f77d34c501d345e731ccf6bc722034d155b77 HubSub lost the
'staticGet' function in a consolidation into the Managed_DataObject class.
This was done carelessly by me as HubSub::staticGet was actually taking
two arguments, none of which was a key and merging them in HubSub::hashkey()
(staticGet was renamed getKV 2a4dc77a633cc78907934fd93200ac16d55be78e).

NOTE: This complements commit 7e4718a4eb8d0e932398d6f150339fa6aec05267 which
fixed a similar issue for the Magicsig class.

10 years agoOStatus classes now has modern schemaDef
Mikael Nordfeldth [Wed, 21 Aug 2013 09:01:31 +0000 (11:01 +0200)]
OStatus classes now has modern schemaDef

10 years agoIMPORTANT: Making prev. Memcached_DataObject working again with schemaDef
Mikael Nordfeldth [Mon, 19 Aug 2013 15:08:18 +0000 (17:08 +0200)]
IMPORTANT: Making prev. Memcached_DataObject working again with schemaDef

Lots of the Memcached_DataObject classes stopped working when upgraded to
Managed_DataObject because they lacked schemaDef().

I have _hopefully_ made it so that all the references to the table uses
each class' schemaDef, rather than the more manual ColumnDef stuff. Not
all plugins have been tested thoroughly yet.

NOTE: This is applied with getKV calls instead of staticGet, as it was
important for PHP Strict Standards compliance to avoid calling the non-
static functions statically. (unfortunately DB and DB_DataObject still do
this within themselves...)

10 years agoWe can now do late static binding (PHP >= 5.3)
Mikael Nordfeldth [Tue, 20 Aug 2013 07:43:51 +0000 (09:43 +0200)]
We can now do late static binding (PHP >= 5.3)

10 years agoUnnecessary UTF-8 declaration for database
Mikael Nordfeldth [Tue, 20 Aug 2013 07:43:23 +0000 (09:43 +0200)]
Unnecessary UTF-8 declaration for database

10 years agoFurther static declarations of functions
Mikael Nordfeldth [Mon, 19 Aug 2013 12:26:44 +0000 (14:26 +0200)]
Further static declarations of functions

Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)

10 years agoClass wasn't used anywhere, and file contained wrong class
Mikael Nordfeldth [Mon, 19 Aug 2013 12:09:57 +0000 (14:09 +0200)]
Class wasn't used anywhere, and file contained wrong class

10 years agoDon't use DB_DataObject::factory (statically at least)
Mikael Nordfeldth [Mon, 19 Aug 2013 09:40:35 +0000 (11:40 +0200)]
Don't use DB_DataObject::factory (statically at least)

Not all instances of this has been fixed, but at least the ones
in the base class of Memcached_DataObject.

Avatar fix (in classes/Profile.php) requires a pkeyGet function
in the Avatar class (or as in this tree, the parent class of
Managed_DataObject)

10 years agoManaged_DataObject now has listGet for all classes
Mikael Nordfeldth [Sun, 18 Aug 2013 19:02:33 +0000 (21:02 +0200)]
Managed_DataObject now has listGet for all classes

10 years agoProperly definingStatusNet class static functions with 'static'
Mikael Nordfeldth [Sun, 18 Aug 2013 18:37:33 +0000 (20:37 +0200)]
Properly definingStatusNet class static functions with 'static'

10 years agoAdded shared default plugin list between profiles
Mikael Nordfeldth [Sun, 18 Aug 2013 18:29:16 +0000 (20:29 +0200)]
Added shared default plugin list between profiles

10 years agoIMPORTANT - fixed Magicsig to properly overload getKV (prev. staticGet)
Mikael Nordfeldth [Sun, 18 Aug 2013 17:07:18 +0000 (19:07 +0200)]
IMPORTANT - fixed Magicsig to properly overload getKV (prev. staticGet)

In commit e95f77d34c501d345e731ccf6bc722034d155b77 Magicsig lost the 'staticGet' function (later renamed to getKV in 2a4dc77a633cc78907934fd93200ac16d55be78e ), which was important to properly initialize the Magicsig object (fromString)

10 years agoMemcached_DataObject::multicache is now properly defined static
Mikael Nordfeldth [Sun, 18 Aug 2013 14:21:30 +0000 (16:21 +0200)]
Memcached_DataObject::multicache is now properly defined static

10 years agopkeyGet is now static and more similar to getKV
Mikael Nordfeldth [Sun, 18 Aug 2013 13:42:51 +0000 (15:42 +0200)]
pkeyGet is now static and more similar to getKV

Memcached_DataObject now defines
   * pkeyGetClass to avoid collision with Managed_DataObject pkeyGet
   * getClassKV to avoid collision with Managed_DataObject getKV

10 years agoMagicsig class now Managed_DataObject with nicer schemaDef
Mikael Nordfeldth [Sun, 18 Aug 2013 13:31:18 +0000 (15:31 +0200)]
Magicsig class now Managed_DataObject with nicer schemaDef

10 years agoBookmark class now has schemaDef (for Managed_DataObject)
Mikael Nordfeldth [Sun, 18 Aug 2013 13:03:06 +0000 (15:03 +0200)]
Bookmark class now has schemaDef (for Managed_DataObject)

10 years agoThe overloaded DB_DataObject function staticGet is now called getKV
Mikael Nordfeldth [Sun, 18 Aug 2013 11:04:58 +0000 (13:04 +0200)]
The overloaded DB_DataObject function staticGet is now called getKV

I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV

   sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq)

If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV!

This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class)

Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.

10 years agoUpdating all Memcached_DataObject extended classes to Managed_DataObject
Mikael Nordfeldth [Sun, 18 Aug 2013 10:10:44 +0000 (12:10 +0200)]
Updating all Memcached_DataObject extended classes to Managed_DataObject

In some brief tests, this causes no problems.

In this state however, you would need to modify DB_DataObject to have a static declaration of staticget (and probably pkeyGet). The next commit will change the staticGet overload to a unique function name (like getKV for getKeyValue), which means we can properly call the function by PHP Strict Standards.

10 years agoSome statically called functions in plugins now declared statically
Mikael Nordfeldth [Sun, 18 Aug 2013 09:18:45 +0000 (11:18 +0200)]
Some statically called functions in plugins now declared statically

10 years agoPlugins with classes that extend Managed_DataObject get better code reuse
Mikael Nordfeldth [Mon, 12 Aug 2013 18:00:01 +0000 (20:00 +0200)]
Plugins with classes that extend Managed_DataObject get better code reuse

The switch to having a function in Managed_DataObject is now being applied
to plugins which can use this as well.

There are some plugins that still use Memcached_DataObject, but these will
be taken care of later.

10 years agostaticGet for sub-Managed_DataObject classes now calls parent
Mikael Nordfeldth [Mon, 12 Aug 2013 17:46:44 +0000 (19:46 +0200)]
staticGet for sub-Managed_DataObject classes now calls parent

The parent class for our database objects, Managed_DataObject, has a
dynamically assigned class in staticGet which objects get put into,
leaving us with less code to do the same thing.

We will probably have to move away from the DB_DataObject 'staticGet'
call as it is nowadays deprecated.

10 years agoManaged_DataObject gets dynamic class detection for staticGet
Mikael Nordfeldth [Mon, 12 Aug 2013 17:12:13 +0000 (19:12 +0200)]
Managed_DataObject gets dynamic class detection for staticGet

Compatibility: get_called_class is implemented in PHP >= 5.3.0