Commit Graph

15119 Commits

Author SHA1 Message Date
Mikael Nordfeldth
438685b267 jquery javascript was moved to js/extlib 2013-09-10 19:02:55 +02:00
Mikael Nordfeldth
dfa1b15dd6 Changing js .live calls to .on for jquery 2.x 2013-09-10 18:52:09 +02:00
Mikael Nordfeldth
3858897c10 farbtastic removed along with userdesign stuff
...I couldn't find anywhere this was being used in current code...
2013-09-10 18:26:48 +02:00
Mikael Nordfeldth
a4d04d24de Fixed regression from util.js updates + syntax cleanup
We introduced a regression in 6fa9062d28
based on syntax error, as a curly brace ({) was lost. This is now fixed.
2013-09-10 15:14:42 +02:00
Mikael Nordfeldth
a56ad2c43d Updated jquery extlib to v2.0.3
Includes pre-minimized version from code.jquery.com
2013-09-10 13:56:51 +02:00
Mikael Nordfeldth
3efa10769c json2 extlib updated to 2013-05-26 version
Includes minification and Makefile update
2013-09-10 13:43:50 +02:00
Brian Tegtmeier
1757a653f8 Shortcut for (document).ready(). Changed .attr() to .prop() for checked and disabled. 2013-09-10 13:29:01 +02:00
Brian Tegtmeier
af4f2a18c8 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(). 2013-09-10 13:29:00 +02:00
Brian Tegtmeier
6fa9062d28 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/. 2013-09-10 13:28:49 +02:00
Brian Tegtmeier
1eead02577 Changed bind() and unbind() to on() and off(). Shortcut for (document).ready(). 2013-09-10 13:28:49 +02:00
Jean Baptiste Favre
f0d86cdb64 Add 'twitter:title' meta tag support. 2013-09-10 11:16:34 +02:00
Jean Baptiste Favre
ade8c6992e Twitter cards implementation. Currently only supports 'photo' cards. 2013-09-10 11:16:27 +02:00
Emily O'Leary
81a357ed5e 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.)
2013-09-10 11:06:53 +02:00
Mikael Nordfeldth
99312c8cc2 Declaring some more static functions properly
As a bonus I added type declaration on Profile_block::exists and
Subscription::exists respectively.
2013-09-09 23:28:20 +02:00
Mikael Nordfeldth
a9c4bcd71f Removing unnecessary require_once lines (autoload!) 2013-09-09 23:06:56 +02:00
Mikael Nordfeldth
747fe9d59b 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.
2013-09-09 23:03:34 +02:00
Mikael Nordfeldth
c5bf6cb05e 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...
2013-09-09 20:45:20 +02:00
Mikael Nordfeldth
b2a0aa20bf 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.
2013-09-02 12:13:46 +02:00
Mikael Nordfeldth
f0e967fefd 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. :)
2013-09-02 11:58:47 +02:00
Mikael Nordfeldth
e5e3aeb4e6 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.
2013-09-02 11:05:30 +02:00
Mikael Nordfeldth
89b10666bb IMPORTANT: parent::handlePost() in NewnoticeAction
otherwise we don't do csrf checking etc...
2013-09-02 11:05:21 +02:00
Mikael Nordfeldth
0612e5ec87 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.
2013-09-01 20:56:35 +02:00
Mikael Nordfeldth
c735a8363e Conforming to code layout 2013-09-01 20:52:11 +02:00
Mikael Nordfeldth
83000f6f5e 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.
2013-09-01 19:44:09 +02:00
Mikael Nordfeldth
cfa699e445 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.
2013-08-31 18:01:13 +02:00
Mikael Nordfeldth
8d57fb7dc0 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.
2013-08-30 10:28:57 +02:00
Mikael Nordfeldth
13226c5d92 handle no longer uses $argarray or $args 2013-08-30 00:22:22 +02:00
Mikael Nordfeldth
b18e24723f 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.
2013-08-29 23:33:05 +02:00
Thomas Johnson
47eb3cf7e6 db/core.php lacked User_username (Issue 3299)
Commit message edited by MMN-o (User_username schemaDef already patched).
2013-08-29 18:18:59 +02:00
Mikael Nordfeldth
bd24ab6855 Fixed comment description in STS plugin 2013-08-29 16:20:43 +02:00
Mikael Nordfeldth
07ca304c65 Changes to GNUsocial plugins
These aren't ready for production use. Might be insecure, probably broken.
2013-08-29 16:18:56 +02:00
Mikael Nordfeldth
f042eea956 removing empty "planned" GNU Social plugins 2013-08-29 16:11:32 +02:00
Mikael Nordfeldth
79e3acf0f0 Moved multiGet into Managed_DataObject 2013-08-29 10:38:11 +02:00
Mikael Nordfeldth
b3e61ce7d0 Stronger typing, require array where param array 2013-08-29 10:27:39 +02:00
Mikael Nordfeldth
fac7371179 pivotGet moved into Managed_DataObject 2013-08-29 10:13:07 +02:00
Mikael Nordfeldth
cb94a29e84 Syntax error in XMPP config example 2013-08-28 18:00:23 +02:00
Mikael Nordfeldth
de55d8f83b 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).
2013-08-28 16:10:30 +02:00
Mikael Nordfeldth
b6cfcfbcaa More info for a proper, fancy-url lighttpd setup 2013-08-28 10:51:43 +02:00
Mikael Nordfeldth
40fe10e002 Woops, forgot auto_increment (comes with 'serial')
There are still some classes not ported (like Yammer import)
2013-08-21 15:02:44 +02:00
Mikael Nordfeldth
4fab7a9d8b 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.
2013-08-21 14:33:07 +02:00
Mikael Nordfeldth
0bbcfa7bdf IMPORTANT - fixed HubSub to properly fetch primary keys
In commit e95f77d34c 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 2a4dc77a63).

NOTE: This complements commit 7e4718a4eb which
fixed a similar issue for the Magicsig class.
2013-08-21 11:25:08 +02:00
Mikael Nordfeldth
66997f2bec OStatus classes now has modern schemaDef 2013-08-21 11:01:31 +02:00
Mikael Nordfeldth
3a7261f70a 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...)
2013-08-21 09:48:42 +02:00
Mikael Nordfeldth
b1465a7559 We can now do late static binding (PHP >= 5.3) 2013-08-20 09:43:51 +02:00
Mikael Nordfeldth
6f4c572389 Unnecessary UTF-8 declaration for database 2013-08-20 09:43:23 +02:00
Mikael Nordfeldth
e40044e2fa Further static declarations of functions
Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)
2013-08-19 14:26:44 +02:00
Mikael Nordfeldth
d5f82bb051 Class wasn't used anywhere, and file contained wrong class 2013-08-19 14:09:57 +02:00
Mikael Nordfeldth
0785cc2469 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)
2013-08-19 11:40:35 +02:00
Mikael Nordfeldth
97ce71e55d Managed_DataObject now has listGet for all classes 2013-08-18 21:02:33 +02:00
Mikael Nordfeldth
923f16abe5 Properly definingStatusNet class static functions with 'static' 2013-08-18 20:37:33 +02:00