Commit Graph

374 Commits

Author SHA1 Message Date
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
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
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
Mikael Nordfeldth
2a4dc77a63 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.
2013-08-18 13:13:56 +02:00
Mikael Nordfeldth
f79aec36fe Merge remote-tracking branch 'statusnet/master'
This merges GNU Social with current development of StatusNet. The only conflicts were some documentation, where GNU Social's versions were retained.

Conflicts:
	doc-src/about
	doc-src/faq
	plugins/OpenID/doc-src/openid
2013-08-12 12:23:17 +02:00
Evan Prodromou
cab76836cb isHTTP() -> isHTTPS() 2011-11-11 12:44:42 -05:00
Evan Prodromou
62fb12b369 use HTTPS for JSON if necessary 2011-11-11 12:35:00 -05:00
Evan Prodromou
0fe3afc495 smoothness is SSLed if using SSL 2011-11-11 12:22:33 -05:00
Evan Prodromou
32845a1051 Make lists work in single-user mode
Added routes to the router for list pages in single-user mode.

For each of the actions in those routes, use the global single-user
nickname rather than a nickname URL argument to determine the tagger ID.

In nav, and for Ajax, provide the right nicknames.
2011-09-29 12:29:12 -04:00
Samantha Doherty
bcb0709401 Only load theme-specific IE stylesheets if they exist. 2011-09-22 09:22:08 -04:00
Evan Prodromou
fc3d52c120 disable routes that aren't available in single-user mode 2011-09-17 14:37:19 -04:00
Samantha Doherty
8c84637612 Move header search before nav in the HTML; give it a unique ID. 2011-08-25 22:29:11 -04:00
Evan Prodromou
c0bae505d9 Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x 2011-08-25 18:03:30 -04:00
Evan Prodromou
44a46de7ff use a form for search 2011-08-25 17:59:27 -04:00
Samantha Doherty
8ea5cd0cac Check for existence of RTL stylesheets; placeholder files for base and neo themes. 2011-08-25 17:48:27 -04:00
Zach Copley
3bdae5aed4 Link in additional stylesheet for RTL languages 2011-08-25 13:12:44 -07:00
Evan Prodromou
eb430f9cb3 don't add empty classes to menu items 2011-07-06 11:18:53 -04:00
Zach Copley
e1ac64f2cb Add current class to selected menu items 2011-06-09 19:29:19 -04:00
Zach Copley
36d619480a Rip out user, group and site design customization code
Squashed commit of the following:

commit 0bcfb6535115ec0a11669420f8689aeedc417bc8
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 15:51:47 2011 -0400

    Remove design-related stuff from the API

commit 88da010256fbcaee1ff01d9507ea47d3225f2825
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 15:40:16 2011 -0400

    Mop up misc design related code

commit 11958b064745b797b4c9f9f4b7e8f65e4c82ce83
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 15:21:00 2011 -0400

    Remove Design DB_DataObject class and references to it in schema

commit f8540594728ce6ba4697eb21657ccb897a9fc127
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 13:15:54 2011 -0400

    Remove design-related actions and widgets

commit ddf7b4d425b88b58956b8be06047d2a3e0560bd2
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 13:10:57 2011 -0400

    Remove navigation / routing to design settings actions

commit e3f280f8780d99168edf37ef766956f281e9c5da
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 13:03:09 2011 -0400

    CurrentUserDesignAction -> Action

commit 6780b1a07e1375a7fa0fd48c8bf3109d9a12e33e
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 12:54:22 2011 -0400

    * GroupDesignAction -> GroupAction (new base class for group actions)

commit 2136377e895db274709a1d486f377f13946ccfd6
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 12:36:40 2011 -0400

    OwnerDesignAction -> Action
2011-06-09 16:20:19 -04:00
Zach Copley
895447f3dc Upgrade anti-framing, anti-clickjacking code 2011-06-06 06:08:17 +00:00
Ian Denhardt
31b29fde50 Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline
Conflicts:
	plugins/OStatus/actions/ostatusinit.php
2011-05-23 21:50:48 -04:00
Evan Prodromou
c97048d01b merge 0.9.x into 1.0.x 2011-05-04 14:59:39 -07:00
Samantha Doherty
368b810a0e Add new Infield Label jQuery plugin files to action.php 2011-04-18 00:27:46 -04:00
Shashi Gowda
45952ff164 "Lists with you" and "List subscriptions" in the right aside, "Lists" in the left aside 2011-04-14 19:49:43 +00:00
Siebrand Mazeland
f0d762f196 Update/add translator documentation.
L10n/i18n updates.
Superfluous whitespace removed.
Add FIXME for a few i18n issues I couldn't solve this quickly.

Takes care of documentation for all core code added in merge of "people tags" feature (Commit:e75c9988ebe33822e493ac225859bc593ff9b855).
2011-04-10 19:59:55 +02:00
Shashi Gowda
c44a94e8f5 Port autocomplete from tagInput to jQuery UI, send Last-Modified header and look for it in JS. 2011-04-08 14:51:05 +05:30
Shashi Gowda
57198a7464 Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	actions/tagother.php
	lib/subscriberspeopleselftagcloudsection.php
	lib/subscriptionspeopleselftagcloudsection.php
2011-04-04 13:26:27 +05:30
Siebrand Mazeland
c17d8e0f5f Update translator documentation.
i18n tweaks.
Add FIXME for missing class documentation.
Remove superfluous whitespace.
2011-04-01 19:47:22 +02:00
Shashi Gowda
5a2bab07b2 Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	actions/tagother.php
	classes/Profile.php
	classes/Profile_tag.php
	js/util.min.js
2011-03-30 15:47:42 +05:30
Evan Prodromou
ec5a43bf4f let actions set a default address for toselector 2011-03-28 16:24:02 -04:00
Ian Denhardt
d36f0707a4 Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline 2011-03-28 03:25:40 -04:00
Shashi Gowda
31c1177970 Merge branch '1.0.x' into people_tags_rebase
Conflicts:
	EVENTS.txt
	actions/peopletag.php
	actions/tagother.php
	classes/Notice.php
	js/util.js
	js/util.min.js
	lib/accountprofileblock.php
	lib/action.php
	lib/activityobject.php
	lib/command.php
	lib/personalgroupnav.php
	plugins/OStatus/OStatusPlugin.php
2011-03-22 07:56:25 +05:30
Evan Prodromou
60a237ac62 some flushing in the UI 2011-03-17 15:26:37 -04:00
Evan Prodromou
a430540155 configuration option to bust frames or not 2011-03-17 11:32:14 -04:00
Evan Prodromou
0791d0034f return Ajax-y XML on exceptions 2011-03-16 18:53:46 -04:00
Evan Prodromou
f242cf0e58 move profile block to the aside 2011-03-16 09:57:09 -04:00
Evan Prodromou
a72dbc1aff add a profile block to left column 2011-03-16 09:57:07 -04:00
Evan Prodromou
41420449f8 Merge branch 'jqueryui' into 1.0.x
Conflicts:
	lib/action.php
2011-03-16 09:56:26 -04:00
Evan Prodromou
afa1aa6c9b Revert "use jquery-ui for input_forms tabset"
This reverts commit c4bada9022.
2011-03-16 09:53:27 -04:00
Ian Denhardt
27ef3b1d90 Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline
Conflicts:
	actions/public.php
2011-03-15 12:42:58 -04:00
Samantha Doherty
4334bb7132 Adding wrapper divs for equal height columns. 2011-03-14 15:30:51 -04:00
Brion Vibber
4e2a0e2fd0 Use non-minified jQuery when $config['site']['minify'] is off; aids in debugging when something fails deep in jQuery-land. 2011-03-11 14:48:47 -08:00
Brion Vibber
0f3af3e3b7 Keep 'Status' tab current while showing the placeholder -- pretend like it's a mini version of the status notice form :D 2011-03-10 18:01:40 -08:00
Brion Vibber
771682b6eb Add placeholder status form for the top (needs to hook up to JS) 2011-03-10 17:40:25 -08:00
Evan Prodromou
c4bada9022 use jquery-ui for input_forms tabset 2011-03-10 10:53:11 -06:00
Evan Prodromou
a5daed0aa8 load jquery-ui css and js by default 2011-03-10 10:28:08 -06:00
Brion Vibber
040baf291d Fix for input tab selection 2011-03-09 13:05:12 -08:00
Brion Vibber
1f9a9c69bc Only show the site_nav_object block if Action::showObjectNav has been overridden to do something.
(Copied similar check from showPageNoticeBlock, handy!)
2011-03-09 12:07:26 -08:00