forked from GNUsocial/gnu-social
Merge branch '0.8.x' into deleteuser
This commit is contained in:
commit
b3b3af9a2e
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,7 @@ avatar/*
|
|||||||
background/*
|
background/*
|
||||||
files/*
|
files/*
|
||||||
file/*
|
file/*
|
||||||
|
local/*
|
||||||
_darcs/*
|
_darcs/*
|
||||||
logs/*
|
logs/*
|
||||||
config.php
|
config.php
|
||||||
@ -23,4 +24,4 @@ config-*.php
|
|||||||
good-config.php
|
good-config.php
|
||||||
lac08.log
|
lac08.log
|
||||||
php.log
|
php.log
|
||||||
config.php.*
|
|
||||||
|
20
EVENTS.txt
20
EVENTS.txt
@ -20,10 +20,16 @@ StartShowStyles: Showing Style links; good place to add UA style resets
|
|||||||
EndShowStyles: End showing Style links; good place to add custom styles
|
EndShowStyles: End showing Style links; good place to add custom styles
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
StartShowLaconicaStyles: Showing Laconica Style links
|
StartShowStatusNetStyles: Showing StatusNet Style links
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
EndShowLaconicaStyles: End showing Laconica Style links; good place to add handheld or JavaScript dependant styles
|
EndShowStatusNetStyles: End showing StatusNet Style links; good place to add handheld or JavaScript dependant styles
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
StartShowLaconicaStyles: backwards compatibility; deprecated
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowLaconicaStyles: backwards compatibility; deprecated
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
StartShowUAStyles: Showing custom UA Style links
|
StartShowUAStyles: Showing custom UA Style links
|
||||||
@ -45,10 +51,16 @@ StartShowJQueryScripts: Showing JQuery script links (use this to link to e.g. Go
|
|||||||
EndShowJQueryScripts: End showing JQuery script links
|
EndShowJQueryScripts: End showing JQuery script links
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
StartShowLaconicaScripts: Showing Laconica script links (use this to link to a CDN or something)
|
StartShowStatusNetScripts: Showing StatusNet script links (use this to link to a CDN or something)
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
EndShowLaconicaScripts: End showing Laconica script links
|
EndShowStatusNetScripts: End showing StatusNet script links
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
StartShowLaconicaScripts: backwards compatibility; deprecated
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowLaconicaScripts: backwards compatibility; deprecated
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
StartShowSections: Start the list of sections in the sidebar
|
StartShowSections: Start the list of sections in the sidebar
|
||||||
|
485
README
485
README
@ -2,41 +2,47 @@
|
|||||||
README
|
README
|
||||||
------
|
------
|
||||||
|
|
||||||
Laconica 0.8.0 ("Shiny Happy People")
|
StatusNet 0.8.1 ("Second Guessing")
|
||||||
15 July 2009
|
26 Aug 2009
|
||||||
|
|
||||||
This is the README file for Laconica, the Open Source microblogging
|
This is the README file for StatusNet (formerly Laconica), the Open
|
||||||
platform. It includes installation instructions, descriptions of
|
Source microblogging platform. It includes installation instructions,
|
||||||
options you can set, warnings, tips, and general info for
|
descriptions of options you can set, warnings, tips, and general info
|
||||||
administrators. Information on using Laconica can be found in the
|
for administrators. Information on using StatusNet can be found in the
|
||||||
"doc" subdirectory or in the "help" section on-line.
|
"doc" subdirectory or in the "help" section on-line.
|
||||||
|
|
||||||
About
|
About
|
||||||
=====
|
=====
|
||||||
|
|
||||||
Laconica (pronounced "luh-KAWN-ih-kuh") is a Free and Open Source
|
StatusNet (formerly Laconica) is a Free and Open Source microblogging
|
||||||
microblogging platform. It helps people in a community, company or
|
platform. It helps people in a community, company or group to exchange
|
||||||
group to exchange short (140 character) messages over the Web. Users
|
short (140 character) messages over the Web. Users can choose which
|
||||||
can choose which people to "follow" and receive only their friends' or
|
people to "follow" and receive only their friends' or colleagues'
|
||||||
colleagues' status messages. It provides a similar service to sites
|
status messages. It provides a similar service to sites like Twitter,
|
||||||
like Twitter, Jaiku and Plurk.
|
Jaiku, Yammer, and Plurk.
|
||||||
|
|
||||||
With a little work, status messages can be sent to mobile phones,
|
With a little work, status messages can be sent to mobile phones,
|
||||||
instant messenger programs (GTalk/Jabber), and specially-designed
|
instant messenger programs (GTalk/Jabber), and specially-designed
|
||||||
desktop clients that support the Twitter API.
|
desktop clients that support the Twitter API.
|
||||||
|
|
||||||
Laconica supports an open standard called OpenMicroBlogging
|
StatusNet supports an open standard called OpenMicroBlogging
|
||||||
<http://openmicroblogging.org/> that lets users on different Web sites
|
<http://openmicroblogging.org/> that lets users on different Web sites
|
||||||
or in different companies subscribe to each others' notices. It
|
or in different companies subscribe to each others' notices. It
|
||||||
enables a distributed social network spread all across the Web.
|
enables a distributed social network spread all across the Web.
|
||||||
|
|
||||||
Laconica was originally developed for the Open Software Service,
|
StatusNet was originally developed for the Open Software Service,
|
||||||
Identi.ca <http://identi.ca/>. It is shared with you in hope that you
|
Identi.ca <http://identi.ca/>. It is shared with you in hope that you
|
||||||
too make an Open Software Service available to your users. To learn
|
too make an Open Software Service available to your users. To learn
|
||||||
more, please see the Open Software Service Definition 1.1:
|
more, please see the Open Software Service Definition 1.1:
|
||||||
|
|
||||||
http://www.opendefinition.org/ossd
|
http://www.opendefinition.org/ossd
|
||||||
|
|
||||||
|
StatusNet, Inc. <http://status.net/> also offers this software as a
|
||||||
|
Web service, requiring no installation on your part. The software run
|
||||||
|
on status.net is identical to the software available for download, so
|
||||||
|
you can move back and forth between a hosted version or a version
|
||||||
|
installed on your own servers.
|
||||||
|
|
||||||
License
|
License
|
||||||
=======
|
=======
|
||||||
|
|
||||||
@ -56,11 +62,11 @@ License along with this program, in the file "COPYING". If not, see
|
|||||||
|
|
||||||
IMPORTANT NOTE: The GNU Affero General Public License (AGPL) has
|
IMPORTANT NOTE: The GNU Affero General Public License (AGPL) has
|
||||||
*different requirements* from the "regular" GPL. In particular, if
|
*different requirements* from the "regular" GPL. In particular, if
|
||||||
you make modifications to the Laconica source code on your server,
|
you make modifications to the StatusNet source code on your server,
|
||||||
you *MUST MAKE AVAILABLE* the modified version of the source code
|
you *MUST MAKE AVAILABLE* the modified version of the source code
|
||||||
to your users under the same license. This is a legal requirement
|
to your users under the same license. This is a legal requirement
|
||||||
of using the software, and if you do not wish to share your
|
of using the software, and if you do not wish to share your
|
||||||
modifications, *YOU MAY NOT INSTALL LACONICA*.
|
modifications, *YOU MAY NOT INSTALL STATUSNET*.
|
||||||
|
|
||||||
Additional library software has been made available in the 'extlib'
|
Additional library software has been made available in the 'extlib'
|
||||||
directory. All of it is Free Software and can be distributed under
|
directory. All of it is Free Software and can be distributed under
|
||||||
@ -71,62 +77,49 @@ for additional terms.
|
|||||||
New this version
|
New this version
|
||||||
================
|
================
|
||||||
|
|
||||||
This is a major feature release since version 0.7.4, released May 31
|
This is a minor feature and bugfix release since version 0.8.0,
|
||||||
2009. Notable changes this version:
|
released Jul 15 2009. Notable changes this version:
|
||||||
|
|
||||||
- Support for a hosted service (status network). Multiple sites can
|
- Laconica has been renamed StatusNet. With a few minor compatibility
|
||||||
share the same codebase but use different databases.
|
exceptions, all references to "Laconica" in code, documentation
|
||||||
- OEmbed. Links to pages that support OEmbed (http://www.oembed.com/)
|
and comments were changed to "StatusNet".
|
||||||
become popup links, and the media are shown in a special lightbox.
|
- A new plugin to support "infinite scroll".
|
||||||
- File attachments. Users can attach files of the size and type approved
|
- A new plugin to support reCaptcha <http://recaptcha.net>.
|
||||||
by an administrator, and a shortened link will be included in the
|
- Better logging of server errors.
|
||||||
notice.
|
- Add an Openid-only mode for authentication.
|
||||||
- Related notices are organized into conversations, with each reply a
|
- 'lite' parameter for some Twitter API methods.
|
||||||
branch in a tree. Conversations have pages and are linked to from each
|
- A new plugin to auto-complete nicknames for @-replies.
|
||||||
notice in the conversation.
|
- Configuration options to disable OpenID, SMS, Twitter, post-by-email, and IM.
|
||||||
- User designs. Users can specify colours and backgrounds
|
- Support for lighttpd <http://lighttpd.org/> using 404-based
|
||||||
for their profile pages and other "personal" pages.
|
rewrites.
|
||||||
- Group designs. Group administrators can specify similar designs for
|
- Support for using Twitter's OAuth authentication as a client.
|
||||||
group profiles and related pages.
|
- First version of the groups API.
|
||||||
- Site designs. Site authors can specify a design (background and
|
- Can configure a site-wide design, including background image and
|
||||||
colors) for the site.
|
colors.
|
||||||
- New themes. Five new themes are added to the base release; these show
|
- Improved algorithm for replies and conversations, making
|
||||||
off the flexibility of Laconica's theming system.
|
conversation trees more accurate and useful.
|
||||||
- Statistics. Public sites will periodically send usage statistics,
|
- Add a script to create a simulation database for testing/debugging.
|
||||||
configuration options, and dependency information to Laconica dev site.
|
- Sanitize HTML for OEmbed.
|
||||||
This will help us understand how the software is used and plan future
|
- Improved queue management for DB-based queuing.
|
||||||
versions of the software.
|
- More complete URL detection.
|
||||||
- Additional hooks. The hooks and plugins system introduced in 0.7.x was
|
- Hashtags now support full Unicode character set.
|
||||||
expanded with additional points of access.
|
- Notice inboxes are now garbage-collected on a regular basis
|
||||||
- Facebook Connect. A new plugin allows logging in with Facebook Connect
|
at notice-write time.
|
||||||
(http://developers.facebook.com/connect.php).
|
- PiwikAnalyticsPlugin updated for latest Piwik interface.
|
||||||
- A session handler. A new optional session handler class to manage PHP
|
- Attachment and notice pages can be embedded with OEmbed
|
||||||
sessions reliably and quickly for large sites.
|
<http://www.oembed.com>.
|
||||||
- STOMP queuing. Queue management for offline daemons has been
|
- Failed authentication is logged.
|
||||||
abstracted with three concrete instances. A new interface that should
|
- PostgreSQL schema and support brought up-to-date with 0.8.x features.
|
||||||
work with STOMP servers like ActiveMQ and RabbitMQ is available, which
|
- The installer works with PostgreSQL as well as MySQL.
|
||||||
should make things scale better.
|
- RSS 1.0 feeds use HTTP Basic authentication in private mode.
|
||||||
- Group block. Group admins can block users from joining or posting to
|
- Many, many bug fixes, particularly with performance.
|
||||||
a group.
|
- Better (=working) garbage collection for old sessions.
|
||||||
- Group aliases. Groups can be referred to with aliases, additional
|
- Better (=working) search queries.
|
||||||
names. For example, "!yul" and "!montreal" can be the same group.
|
- Some cleanup of HTML output.
|
||||||
- Bidirectional Twitter bridge. Users can read the tweets their Twitter
|
- Better error handling when updating Facebook.
|
||||||
friends post on Twitter.
|
- Considerably better performance when using replication for API
|
||||||
- Adaptation of WordPress.com Terms of Service (http://en.wordpress.com/tos/)
|
calls.
|
||||||
as default TOS for Laconica sites.
|
- Initial unit tests.
|
||||||
- Better command-line handling for scripts, including standard options
|
|
||||||
and ability to set hostname and path from the command line.
|
|
||||||
- An experimental plugin to use Meteor (http://www.meteorserver.org/)
|
|
||||||
for "real-time" updates.
|
|
||||||
- A new framework for "real-time" updates, making it easier to develop
|
|
||||||
plugins for different browser-based update modes.
|
|
||||||
- RSS 2.0 and Atom feeds for groups.
|
|
||||||
- RSS 2.0 and Atom feeds for tags.
|
|
||||||
- Attachments can be sent by email.
|
|
||||||
- Attachments are encoded as enclosures in RSS 2.0 and Atom.
|
|
||||||
- Notices with attachments display in Facebook as media inline.
|
|
||||||
|
|
||||||
- Many, many bug fixes.
|
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
=============
|
=============
|
||||||
@ -137,7 +130,7 @@ run correctly.
|
|||||||
- PHP 5.2.3+. It may be possible to run this software on earlier
|
- PHP 5.2.3+. It may be possible to run this software on earlier
|
||||||
versions of PHP, but many of the functions used are only available
|
versions of PHP, but many of the functions used are only available
|
||||||
in PHP 5.2 or above.
|
in PHP 5.2 or above.
|
||||||
- MySQL 5.x. The Laconica database is stored, by default, in a MySQL
|
- MySQL 5.x. The StatusNet database is stored, by default, in a MySQL
|
||||||
server. It has been primarily tested on 5.x servers, although it may
|
server. It has been primarily tested on 5.x servers, although it may
|
||||||
be possible to install on earlier (or later!) versions. The server
|
be possible to install on earlier (or later!) versions. The server
|
||||||
*must* support the MyISAM storage engine -- the default for most
|
*must* support the MyISAM storage engine -- the default for most
|
||||||
@ -153,6 +146,7 @@ Your PHP installation must include the following PHP extensions:
|
|||||||
- GD. For scaling down avatar images.
|
- GD. For scaling down avatar images.
|
||||||
- mbstring. For handling Unicode (UTF-8) encoded strings.
|
- mbstring. For handling Unicode (UTF-8) encoded strings.
|
||||||
- gettext. For multiple languages. Default on many PHP installs.
|
- gettext. For multiple languages. Default on many PHP installs.
|
||||||
|
- tidy. Used to clean up HTML/URLs for the URL shortener to consume.
|
||||||
|
|
||||||
For some functionality, you will also need the following extensions:
|
For some functionality, you will also need the following extensions:
|
||||||
|
|
||||||
@ -206,7 +200,7 @@ and the URLs are listed here for your convenience.
|
|||||||
as of this writing the version of this library that is available in
|
as of this writing the version of this library that is available in
|
||||||
the extlib directory is *significantly different* from the upstream
|
the extlib directory is *significantly different* from the upstream
|
||||||
version (patches have been submitted). Upgrading to the upstream
|
version (patches have been submitted). Upgrading to the upstream
|
||||||
version may render your Laconica site unable to send or receive XMPP
|
version may render your StatusNet site unable to send or receive XMPP
|
||||||
messages.
|
messages.
|
||||||
- Facebook library. Used for the Facebook application.
|
- Facebook library. Used for the Facebook application.
|
||||||
- PEAR Services_oEmbed. Used for some multimedia integration.
|
- PEAR Services_oEmbed. Used for some multimedia integration.
|
||||||
@ -215,7 +209,7 @@ and the URLs are listed here for your convenience.
|
|||||||
- PEAR Net_URL2 is an oEmbed dependency.
|
- PEAR Net_URL2 is an oEmbed dependency.
|
||||||
- Console_GetOpt for parsing command-line options.
|
- Console_GetOpt for parsing command-line options.
|
||||||
|
|
||||||
A design goal of Laconica is that the basic Web functionality should
|
A design goal of StatusNet is that the basic Web functionality should
|
||||||
work on even the most restrictive commercial hosting services.
|
work on even the most restrictive commercial hosting services.
|
||||||
However, additional functionality, such as receiving messages by
|
However, additional functionality, such as receiving messages by
|
||||||
Jabber/GTalk, require that you be able to run long-running processes
|
Jabber/GTalk, require that you be able to run long-running processes
|
||||||
@ -225,15 +219,15 @@ that you be able to install a mail filter in your mail server.
|
|||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
|
||||||
Installing the basic Laconica Web component is relatively easy,
|
Installing the basic StatusNet Web component is relatively easy,
|
||||||
especially if you've previously installed PHP/MySQL packages.
|
especially if you've previously installed PHP/MySQL packages.
|
||||||
|
|
||||||
1. Unpack the tarball you downloaded on your Web server. Usually a
|
1. Unpack the tarball you downloaded on your Web server. Usually a
|
||||||
command like this will work:
|
command like this will work:
|
||||||
|
|
||||||
tar zxf laconica-0.8.0.tar.gz
|
tar zxf statusnet-0.8.1.tar.gz
|
||||||
|
|
||||||
...which will make a laconica-0.8.0 subdirectory in your current
|
...which will make a statusnet-0.8.1 subdirectory in your current
|
||||||
directory. (If you don't have shell access on your Web server, you
|
directory. (If you don't have shell access on your Web server, you
|
||||||
may have to unpack the tarball on your local computer and FTP the
|
may have to unpack the tarball on your local computer and FTP the
|
||||||
files to the server.)
|
files to the server.)
|
||||||
@ -241,11 +235,11 @@ especially if you've previously installed PHP/MySQL packages.
|
|||||||
2. Move the tarball to a directory of your choosing in your Web root
|
2. Move the tarball to a directory of your choosing in your Web root
|
||||||
directory. Usually something like this will work:
|
directory. Usually something like this will work:
|
||||||
|
|
||||||
mv laconica-0.8.0 /var/www/mublog
|
mv statusnet-0.8.1 /var/www/mublog
|
||||||
|
|
||||||
This will make your Laconica instance available in the mublog path of
|
This will make your StatusNet instance available in the mublog path of
|
||||||
your server, like "http://example.net/mublog". "microblog" or
|
your server, like "http://example.net/mublog". "microblog" or
|
||||||
"laconica" might also be good path names. If you know how to
|
"statusnet" might also be good path names. If you know how to
|
||||||
configure virtual hosts on your web server, you can try setting up
|
configure virtual hosts on your web server, you can try setting up
|
||||||
"http://micro.example.net/" or the like.
|
"http://micro.example.net/" or the like.
|
||||||
|
|
||||||
@ -276,9 +270,9 @@ especially if you've previously installed PHP/MySQL packages.
|
|||||||
5. Create a database to hold your microblog data. Something like this
|
5. Create a database to hold your microblog data. Something like this
|
||||||
should work:
|
should work:
|
||||||
|
|
||||||
mysqladmin -u "username" --password="password" create laconica
|
mysqladmin -u "username" --password="password" create statusnet
|
||||||
|
|
||||||
Note that Laconica must have its own database; you can't share the
|
Note that StatusNet must have its own database; you can't share the
|
||||||
database with another program. You can name it whatever you want,
|
database with another program. You can name it whatever you want,
|
||||||
though.
|
though.
|
||||||
|
|
||||||
@ -286,11 +280,11 @@ especially if you've previously installed PHP/MySQL packages.
|
|||||||
a tool like PHPAdmin to create a database. Check your hosting
|
a tool like PHPAdmin to create a database. Check your hosting
|
||||||
service's documentation for how to create a new MySQL database.)
|
service's documentation for how to create a new MySQL database.)
|
||||||
|
|
||||||
6. Create a new database account that Laconica will use to access the
|
6. Create a new database account that StatusNet will use to access the
|
||||||
database. If you have shell access, this will probably work from the
|
database. If you have shell access, this will probably work from the
|
||||||
MySQL shell:
|
MySQL shell:
|
||||||
|
|
||||||
GRANT ALL on laconica.*
|
GRANT ALL on statusnet.*
|
||||||
TO 'lacuser'@'localhost'
|
TO 'lacuser'@'localhost'
|
||||||
IDENTIFIED BY 'lacpassword';
|
IDENTIFIED BY 'lacpassword';
|
||||||
|
|
||||||
@ -298,7 +292,7 @@ especially if you've previously installed PHP/MySQL packages.
|
|||||||
username and password. You may want to test logging in to MySQL as
|
username and password. You may want to test logging in to MySQL as
|
||||||
this new user.
|
this new user.
|
||||||
|
|
||||||
7. In a browser, navigate to the Laconica install script; something like:
|
7. In a browser, navigate to the StatusNet install script; something like:
|
||||||
|
|
||||||
http://yourserver.example.com/mublog/install.php
|
http://yourserver.example.com/mublog/install.php
|
||||||
|
|
||||||
@ -316,7 +310,7 @@ especially if you've previously installed PHP/MySQL packages.
|
|||||||
Fancy URLs
|
Fancy URLs
|
||||||
----------
|
----------
|
||||||
|
|
||||||
By default, Laconica will use URLs that include the main PHP program's
|
By default, StatusNet will use URLs that include the main PHP program's
|
||||||
name in them. For example, a user's home profile might be
|
name in them. For example, a user's home profile might be
|
||||||
found at:
|
found at:
|
||||||
|
|
||||||
@ -336,7 +330,7 @@ fancy URLs, you must either have Apache 2.x with .htaccess enabled and
|
|||||||
mod_redirect enabled, -OR- know how to configure "url redirection" in
|
mod_redirect enabled, -OR- know how to configure "url redirection" in
|
||||||
your server.
|
your server.
|
||||||
|
|
||||||
1. Copy the htaccess.sample file to .htaccess in your Laconica
|
1. Copy the htaccess.sample file to .htaccess in your StatusNet
|
||||||
directory. Note: if you have control of your server's httpd.conf or
|
directory. Note: if you have control of your server's httpd.conf or
|
||||||
similar configuration files, it can greatly improve performance to
|
similar configuration files, it can greatly improve performance to
|
||||||
import the .htaccess file into your conf file instead. If you're
|
import the .htaccess file into your conf file instead. If you're
|
||||||
@ -344,8 +338,8 @@ your server.
|
|||||||
just leaving the .htaccess file.
|
just leaving the .htaccess file.
|
||||||
|
|
||||||
2. Change the "RewriteBase" in the new .htaccess file to be the URL path
|
2. Change the "RewriteBase" in the new .htaccess file to be the URL path
|
||||||
to your Laconica installation on your server. Typically this will
|
to your StatusNet installation on your server. Typically this will
|
||||||
be the path to your Laconica directory relative to your Web root.
|
be the path to your StatusNet directory relative to your Web root.
|
||||||
|
|
||||||
3. Add or uncomment or change a line in your config.php file so it says:
|
3. Add or uncomment or change a line in your config.php file so it says:
|
||||||
|
|
||||||
@ -380,7 +374,7 @@ to start and stop the sphinx search daemon.
|
|||||||
SMS
|
SMS
|
||||||
---
|
---
|
||||||
|
|
||||||
Laconica supports a cheap-and-dirty system for sending update messages
|
StatusNet supports a cheap-and-dirty system for sending update messages
|
||||||
to mobile phones and for receiving updates from the mobile. Instead of
|
to mobile phones and for receiving updates from the mobile. Instead of
|
||||||
sending through the SMS network itself, which is costly and requires
|
sending through the SMS network itself, which is costly and requires
|
||||||
buy-in from the wireless carriers, it simply piggybacks on the email
|
buy-in from the wireless carriers, it simply piggybacks on the email
|
||||||
@ -395,10 +389,10 @@ converted to a notice and stored in the DB.
|
|||||||
For this to work, there *must* be a domain or sub-domain for which all
|
For this to work, there *must* be a domain or sub-domain for which all
|
||||||
(or most) incoming email can pass through the incoming mail filter.
|
(or most) incoming email can pass through the incoming mail filter.
|
||||||
|
|
||||||
1. Run the SQL script carrier.sql in your Laconica database. This will
|
1. Run the SQL script carrier.sql in your StatusNet database. This will
|
||||||
usually work:
|
usually work:
|
||||||
|
|
||||||
mysql -u "lacuser" --password="lacpassword" laconica < db/carrier.sql
|
mysql -u "lacuser" --password="lacpassword" statusnet < db/carrier.sql
|
||||||
|
|
||||||
This will populate your database with a list of wireless carriers
|
This will populate your database with a list of wireless carriers
|
||||||
that support email SMS gateways.
|
that support email SMS gateways.
|
||||||
@ -412,7 +406,7 @@ For this to work, there *must* be a domain or sub-domain for which all
|
|||||||
|
|
||||||
2. Edit /etc/aliases on your mail server and add the following line:
|
2. Edit /etc/aliases on your mail server and add the following line:
|
||||||
|
|
||||||
*: /path/to/laconica/scripts/maildaemon.php
|
*: /path/to/statusnet/scripts/maildaemon.php
|
||||||
|
|
||||||
3. Run whatever code you need to to update your aliases database. For
|
3. Run whatever code you need to to update your aliases database. For
|
||||||
many mail servers (Postfix, Exim, Sendmail), this should work:
|
many mail servers (Postfix, Exim, Sendmail), this should work:
|
||||||
@ -428,8 +422,8 @@ For this to work, there *must* be a domain or sub-domain for which all
|
|||||||
|
|
||||||
At this point, post-by-email and post-by-SMS-gateway should work. Note
|
At this point, post-by-email and post-by-SMS-gateway should work. Note
|
||||||
that if your mail server is on a different computer from your email
|
that if your mail server is on a different computer from your email
|
||||||
server, you'll need to have a full installation of Laconica, a working
|
server, you'll need to have a full installation of StatusNet, a working
|
||||||
config.php, and access to the Laconica database from the mail server.
|
config.php, and access to the StatusNet database from the mail server.
|
||||||
|
|
||||||
XMPP
|
XMPP
|
||||||
----
|
----
|
||||||
@ -449,7 +443,7 @@ well.
|
|||||||
similar. Alternately, your "update JID" can be registered on a
|
similar. Alternately, your "update JID" can be registered on a
|
||||||
publicly-available XMPP service, like jabber.org or GTalk.
|
publicly-available XMPP service, like jabber.org or GTalk.
|
||||||
|
|
||||||
Laconica will not register the JID with your chosen XMPP server;
|
StatusNet will not register the JID with your chosen XMPP server;
|
||||||
you need to do this manually, with an XMPP client like Gajim,
|
you need to do this manually, with an XMPP client like Gajim,
|
||||||
Telepathy, or Pidgin.im.
|
Telepathy, or Pidgin.im.
|
||||||
|
|
||||||
@ -465,7 +459,7 @@ can really slow down your site; it may cause posting to timeout.
|
|||||||
|
|
||||||
NOTE: stream_select(), a crucial function for network programming, is
|
NOTE: stream_select(), a crucial function for network programming, is
|
||||||
broken on PHP 5.2.x less than 5.2.6 on amd64-based servers. We don't
|
broken on PHP 5.2.x less than 5.2.6 on amd64-based servers. We don't
|
||||||
work around this bug in Laconica; current recommendation is to move
|
work around this bug in StatusNet; current recommendation is to move
|
||||||
off of amd64 to another server.
|
off of amd64 to another server.
|
||||||
|
|
||||||
Public feed
|
Public feed
|
||||||
@ -488,7 +482,7 @@ consider setting up queues and daemons.
|
|||||||
Queues and daemons
|
Queues and daemons
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
Some activities that Laconica needs to do, like broadcast OMB, SMS,
|
Some activities that StatusNet needs to do, like broadcast OMB, SMS,
|
||||||
and XMPP messages, can be 'queued' and done by off-line bots instead.
|
and XMPP messages, can be 'queued' and done by off-line bots instead.
|
||||||
For this to work, you must be able to run long-running offline
|
For this to work, you must be able to run long-running offline
|
||||||
processes, either on your main Web server or on another server you
|
processes, either on your main Web server or on another server you
|
||||||
@ -499,7 +493,7 @@ server is probably a good idea for high-volume sites.
|
|||||||
1. You'll need the "CLI" (command-line interface) version of PHP
|
1. You'll need the "CLI" (command-line interface) version of PHP
|
||||||
installed on whatever server you use.
|
installed on whatever server you use.
|
||||||
|
|
||||||
2. If you're using a separate server for queues, install Laconica
|
2. If you're using a separate server for queues, install StatusNet
|
||||||
somewhere on the server. You don't need to worry about the
|
somewhere on the server. You don't need to worry about the
|
||||||
.htaccess file, but make sure that your config.php file is close
|
.htaccess file, but make sure that your config.php file is close
|
||||||
to, or identical to, your Web server's version.
|
to, or identical to, your Web server's version.
|
||||||
@ -516,7 +510,7 @@ server is probably a good idea for high-volume sites.
|
|||||||
|
|
||||||
4. On the queues server, run the command scripts/startdaemons.sh. It
|
4. On the queues server, run the command scripts/startdaemons.sh. It
|
||||||
needs as a parameter the install path; if you run it from the
|
needs as a parameter the install path; if you run it from the
|
||||||
Laconica dir, "." should suffice.
|
StatusNet dir, "." should suffice.
|
||||||
|
|
||||||
This will run eight (for now) queue handlers:
|
This will run eight (for now) queue handlers:
|
||||||
|
|
||||||
@ -548,39 +542,67 @@ All the daemons write their process IDs (pids) to /var/run/ by
|
|||||||
default. This can be useful for starting, stopping, and monitoring the
|
default. This can be useful for starting, stopping, and monitoring the
|
||||||
daemons.
|
daemons.
|
||||||
|
|
||||||
With version 0.8.0, it's now possible to use a STOMP server instead of
|
Since version 0.8.0, it's now possible to use a STOMP server instead of
|
||||||
our kind of hacky home-grown DB-based queue solution. See the "queues"
|
our kind of hacky home-grown DB-based queue solution. See the "queues"
|
||||||
config section below for how to configure to use STOMP. As of this
|
config section below for how to configure to use STOMP. As of this
|
||||||
writing, the software has been tested with ActiveMQ (
|
writing, the software has been tested with ActiveMQ (
|
||||||
|
|
||||||
Twitter Friends Syncing
|
Twitter Bridge
|
||||||
-----------------------
|
--------------
|
||||||
|
|
||||||
As of Laconica 0.6.3, users may set a flag in their settings ("Subscribe
|
* OAuth
|
||||||
to my Twitter friends here" under the Twitter tab) to have Laconica
|
|
||||||
attempt to locate and subscribe to "friends" (people they "follow") on
|
|
||||||
Twitter who also have accounts on your Laconica system, and who have
|
|
||||||
previously set up a link for automatically posting notices to Twitter.
|
|
||||||
|
|
||||||
Optionally, there is a script (./scripts/synctwitterfriends.php), meant
|
As of 0.8.1, OAuth is used to to access protected resources on Twitter
|
||||||
to be run periodically from a job scheduler (e.g.: cron under Unix), to
|
instead of HTTP Basic Auth. To use Twitter bridging you will need
|
||||||
look for new additions to users' friends lists. Note that the friends
|
to register your instance of StatusNet as an application on Twitter
|
||||||
syncing only subscribes users to each other, it does not unsubscribe
|
(http://twitter.com/apps), and update the following variables in your
|
||||||
users when they stop following each other on Twitter.
|
config.php with the consumer key and secret Twitter generates for you:
|
||||||
|
|
||||||
Sample cron job:
|
$config['twitter']['consumer_key'] = 'YOURKEY';
|
||||||
|
$config['twitter']['consumer_secret'] = 'YOURSECRET';
|
||||||
|
|
||||||
# Update Twitter friends subscriptions every half hour
|
When registering your application with Twitter set the type to "Browser"
|
||||||
0,30 * * * * /path/to/php /path/to/laconica/scripts/synctwitterfriends.php>&/dev/null
|
and your Callback URL to:
|
||||||
|
|
||||||
|
http://example.org/mublog/twitter/authorization
|
||||||
|
|
||||||
|
The default access type should be, "Read & Write".
|
||||||
|
|
||||||
|
* Importing statuses from Twitter
|
||||||
|
|
||||||
|
To allow your users to import their friends' Twitter statuses, you will
|
||||||
|
need to enable the bidirectional Twitter bridge in config.php:
|
||||||
|
|
||||||
|
$config['twitterbridge']['enabled'] = true;
|
||||||
|
|
||||||
|
and run the TwitterStatusFetcher daemon (scripts/twitterstatusfetcher.php).
|
||||||
|
Additionally, you will want to set the integration source variable,
|
||||||
|
which will keep notices posted to Twitter via StatusNet from looping
|
||||||
|
back. The integration source should be set to the name of your
|
||||||
|
application, exactly as you specified it on the settings page for your
|
||||||
|
StatusNet application on Twitter, e.g.:
|
||||||
|
|
||||||
|
$config['integration']['source'] = 'YourApp';
|
||||||
|
|
||||||
|
* Twitter Friends Syncing
|
||||||
|
|
||||||
|
Users may set a flag in their settings ("Subscribe to my Twitter friends
|
||||||
|
here" under the Twitter tab) to have StatusNet attempt to locate and
|
||||||
|
subscribe to "friends" (people they "follow") on Twitter who also have
|
||||||
|
accounts on your StatusNet system, and who have previously set up a link
|
||||||
|
for automatically posting notices to Twitter.
|
||||||
|
|
||||||
|
As of 0.8.0, this is no longer accomplished via a cron job. Instead you
|
||||||
|
must run the SyncTwitterFriends daemon (scripts/synctwitterfreinds.php).
|
||||||
|
|
||||||
Built-in Facebook Application
|
Built-in Facebook Application
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
Laconica's Facebook application allows your users to automatically
|
StatusNet's Facebook application allows your users to automatically
|
||||||
update their Facebook statuses with their latest notices, invite
|
update their Facebook statuses with their latest notices, invite
|
||||||
their friends to use the app (and thus your site), view their notice
|
their friends to use the app (and thus your site), view their notice
|
||||||
timelines, and post notices -- all from within Facebook. The application
|
timelines, and post notices -- all from within Facebook. The application
|
||||||
is built into Laconica and runs on your host. For automatic Facebook
|
is built into StatusNet and runs on your host. For automatic Facebook
|
||||||
status updating to work you will need to enable queuing and run the
|
status updating to work you will need to enable queuing and run the
|
||||||
facebookqueuehandler.php daemon (see the "Queues and daemons" section
|
facebookqueuehandler.php daemon (see the "Queues and daemons" section
|
||||||
above).
|
above).
|
||||||
@ -601,13 +623,13 @@ key and secret, e.g.:
|
|||||||
|
|
||||||
In Facebook's application editor, specify the following URLs for your app:
|
In Facebook's application editor, specify the following URLs for your app:
|
||||||
|
|
||||||
- Callback URL: http://example.net/mublog/facebook/
|
- Canvas Callback URL: http://example.net/mublog/facebook/
|
||||||
- Post-Remove URL: http://example.net/mublog/facebook/remove
|
- Post-Remove Callback URL: http://example.net/mublog/facebook/remove
|
||||||
- Post-Add Redirect URL: http://apps.facebook.com/yourapp/
|
- Post-Add Redirect URL: http://apps.facebook.com/yourapp/
|
||||||
- Canvas URL: http://apps.facebook.com/yourapp/
|
- Canvas Page URL: http://apps.facebook.com/yourapp/
|
||||||
|
|
||||||
(Replace 'example.net' with your host's URL, 'mublog' with the path
|
(Replace 'example.net' with your host's URL, 'mublog' with the path
|
||||||
to your Laconica installation, and 'yourapp' with the name of the
|
to your StatusNet installation, and 'yourapp' with the name of the
|
||||||
Facebook application you created.)
|
Facebook application you created.)
|
||||||
|
|
||||||
Additionally, Choose "Web" for Application type in the Advanced tab.
|
Additionally, Choose "Web" for Application type in the Advanced tab.
|
||||||
@ -616,9 +638,9 @@ In the "Canvas setting" section, choose the "FBML" for Render Method,
|
|||||||
Everything else can be left with default values.
|
Everything else can be left with default values.
|
||||||
|
|
||||||
*For more detailed instructions please see the installation guide on the
|
*For more detailed instructions please see the installation guide on the
|
||||||
Laconica wiki:
|
StatusNet wiki:
|
||||||
|
|
||||||
http://laconi.ca/trac/wiki/FacebookApplication
|
http://status.net/trac/wiki/FacebookApplication
|
||||||
|
|
||||||
Sitemaps
|
Sitemaps
|
||||||
--------
|
--------
|
||||||
@ -626,11 +648,11 @@ Sitemaps
|
|||||||
Sitemap files <http://sitemaps.org/> are a very nice way of telling
|
Sitemap files <http://sitemaps.org/> are a very nice way of telling
|
||||||
search engines and other interested bots what's available on your site
|
search engines and other interested bots what's available on your site
|
||||||
and what's changed recently. You can generate sitemap files for your
|
and what's changed recently. You can generate sitemap files for your
|
||||||
Laconica instance.
|
StatusNet instance.
|
||||||
|
|
||||||
1. Choose your sitemap URL layout. Laconica creates a number of
|
1. Choose your sitemap URL layout. StatusNet creates a number of
|
||||||
sitemap XML files for different parts of your site. You may want to
|
sitemap XML files for different parts of your site. You may want to
|
||||||
put these in a sub-directory of your Laconica directory to avoid
|
put these in a sub-directory of your StatusNet directory to avoid
|
||||||
clutter. The sitemap index file tells the search engines and other
|
clutter. The sitemap index file tells the search engines and other
|
||||||
bots where to find all the sitemap files; it *must* be in the main
|
bots where to find all the sitemap files; it *must* be in the main
|
||||||
installation directory or higher. Both types of file must be
|
installation directory or higher. Both types of file must be
|
||||||
@ -660,7 +682,7 @@ to these resources.
|
|||||||
Themes
|
Themes
|
||||||
------
|
------
|
||||||
|
|
||||||
There are two themes shipped with this version of Laconica: "identica",
|
There are two themes shipped with this version of StatusNet: "identica",
|
||||||
which is what the Identi.ca site uses, and "default", which is a good
|
which is what the Identi.ca site uses, and "default", which is a good
|
||||||
basis for other sites.
|
basis for other sites.
|
||||||
|
|
||||||
@ -691,28 +713,28 @@ default-avatar-mini.png: Ditto ditto, but 24x24. For subscriptions
|
|||||||
You may want to start by copying the files from the default theme to
|
You may want to start by copying the files from the default theme to
|
||||||
your own directory.
|
your own directory.
|
||||||
|
|
||||||
NOTE: the HTML generated by Laconica changed *radically* between
|
NOTE: the HTML generated by StatusNet changed *radically* between
|
||||||
version 0.6.x and 0.7.x. Older themes will need signification
|
version 0.6.x and 0.7.x. Older themes will need signification
|
||||||
modification to use the new output format.
|
modification to use the new output format.
|
||||||
|
|
||||||
Translation
|
Translation
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Translations in Laconica use the gettext system <http://www.gnu.org/software/gettext/>.
|
Translations in StatusNet use the gettext system <http://www.gnu.org/software/gettext/>.
|
||||||
Theoretically, you can add your own sub-directory to the locale/
|
Theoretically, you can add your own sub-directory to the locale/
|
||||||
subdirectory to add a new language to your system. You'll need to
|
subdirectory to add a new language to your system. You'll need to
|
||||||
compile the ".po" files into ".mo" files, however.
|
compile the ".po" files into ".mo" files, however.
|
||||||
|
|
||||||
Contributions of translation information to Laconica are very easy:
|
Contributions of translation information to StatusNet are very easy:
|
||||||
you can use the Web interface at http://laconi.ca/pootle/ to add one
|
you can use the Web interface at http://status.net/pootle/ to add one
|
||||||
or a few or lots of new translations -- or even new languages. You can
|
or a few or lots of new translations -- or even new languages. You can
|
||||||
also download more up-to-date .po files there, if you so desire.
|
also download more up-to-date .po files there, if you so desire.
|
||||||
|
|
||||||
Backups
|
Backups
|
||||||
-------
|
-------
|
||||||
|
|
||||||
There is no built-in system for doing backups in Laconica. You can make
|
There is no built-in system for doing backups in StatusNet. You can make
|
||||||
backups of a working Laconica system by backing up the database and
|
backups of a working StatusNet system by backing up the database and
|
||||||
the Web directory. To backup the database use mysqldump <http://ur1.ca/7xo>
|
the Web directory. To backup the database use mysqldump <http://ur1.ca/7xo>
|
||||||
and to backup the Web directory, try tar.
|
and to backup the Web directory, try tar.
|
||||||
|
|
||||||
@ -736,20 +758,20 @@ to users on a remote site. (Or not... it's not well tested.) The
|
|||||||
Upgrading
|
Upgrading
|
||||||
=========
|
=========
|
||||||
|
|
||||||
IMPORTANT NOTE: Laconica 0.7.4 introduced a fix for some
|
IMPORTANT NOTE: StatusNet 0.7.4 introduced a fix for some
|
||||||
incorrectly-stored international characters ("UTF-8"). For new
|
incorrectly-stored international characters ("UTF-8"). For new
|
||||||
installations, it will now store non-ASCII characters correctly.
|
installations, it will now store non-ASCII characters correctly.
|
||||||
However, older installations will have the incorrect storage, and will
|
However, older installations will have the incorrect storage, and will
|
||||||
consequently show up "wrong" in browsers. See below for how to deal
|
consequently show up "wrong" in browsers. See below for how to deal
|
||||||
with this situation.
|
with this situation.
|
||||||
|
|
||||||
If you've been using Laconica 0.7, 0.6, 0.5 or lower, or if you've
|
If you've been using StatusNet 0.7, 0.6, 0.5 or lower, or if you've
|
||||||
been tracking the "git" version of the software, you will probably
|
been tracking the "git" version of the software, you will probably
|
||||||
want to upgrade and keep your existing data. There is no automated
|
want to upgrade and keep your existing data. There is no automated
|
||||||
upgrade procedure in Laconica 0.8.0. Try these step-by-step
|
upgrade procedure in StatusNet 0.8.1. Try these step-by-step
|
||||||
instructions; read to the end first before trying them.
|
instructions; read to the end first before trying them.
|
||||||
|
|
||||||
0. Download Laconica and set up all the prerequisites as if you were
|
0. Download StatusNet and set up all the prerequisites as if you were
|
||||||
doing a new install.
|
doing a new install.
|
||||||
1. Make backups of both your database and your Web directory. UNDER NO
|
1. Make backups of both your database and your Web directory. UNDER NO
|
||||||
CIRCUMSTANCES should you try to do an upgrade without a known-good
|
CIRCUMSTANCES should you try to do an upgrade without a known-good
|
||||||
@ -766,14 +788,17 @@ instructions; read to the end first before trying them.
|
|||||||
maildaemon.php file, and running something like "newaliases".
|
maildaemon.php file, and running something like "newaliases".
|
||||||
5. Once all writing processes to your site are turned off, make a
|
5. Once all writing processes to your site are turned off, make a
|
||||||
final backup of the Web directory and database.
|
final backup of the Web directory and database.
|
||||||
6. Move your Laconica directory to a backup spot, like "mublog.bak".
|
6. Move your StatusNet directory to a backup spot, like "mublog.bak".
|
||||||
7. Unpack your Laconica 0.8.0 tarball and move it to "mublog" or
|
7. Unpack your StatusNet 0.8.1 tarball and move it to "mublog" or
|
||||||
wherever your code used to be.
|
wherever your code used to be.
|
||||||
8. Copy the config.php file and avatar directory from your old
|
8. Copy the config.php file and avatar directory from your old
|
||||||
directory to your new directory.
|
directory to your new directory.
|
||||||
9. Copy htaccess.sample to .htaccess in the new directory. Change the
|
9. Copy htaccess.sample to .htaccess in the new directory. Change the
|
||||||
RewriteBase to use the correct path.
|
RewriteBase to use the correct path.
|
||||||
10. Rebuild the database. NOTE: this step is destructive and cannot be
|
10. Rebuild the database. (You can safely skip this step and go to #12
|
||||||
|
if you're upgrading from another 0.8.x version).
|
||||||
|
|
||||||
|
NOTE: this step is destructive and cannot be
|
||||||
reversed. YOU CAN EASILY DESTROY YOUR SITE WITH THIS STEP. Don't
|
reversed. YOU CAN EASILY DESTROY YOUR SITE WITH THIS STEP. Don't
|
||||||
do it without a known-good backup!
|
do it without a known-good backup!
|
||||||
|
|
||||||
@ -782,14 +807,14 @@ instructions; read to the end first before trying them.
|
|||||||
|
|
||||||
mysql -u<rootuser> -p<rootpassword> <database> db/074to080.sql
|
mysql -u<rootuser> -p<rootpassword> <database> db/074to080.sql
|
||||||
|
|
||||||
Otherwise, go to your Laconica directory and AFTER YOU MAKE A
|
Otherwise, go to your StatusNet directory and AFTER YOU MAKE A
|
||||||
BACKUP run the rebuilddb.sh script like this:
|
BACKUP run the rebuilddb.sh script like this:
|
||||||
|
|
||||||
./scripts/rebuilddb.sh rootuser rootpassword database db/laconica.sql
|
./scripts/rebuilddb.sh rootuser rootpassword database db/statusnet.sql
|
||||||
|
|
||||||
Here, rootuser and rootpassword are the username and password for a
|
Here, rootuser and rootpassword are the username and password for a
|
||||||
user who can drop and create databases as well as tables; typically
|
user who can drop and create databases as well as tables; typically
|
||||||
that's _not_ the user Laconica runs as. Note that rebuilddb.sh drops
|
that's _not_ the user StatusNet runs as. Note that rebuilddb.sh drops
|
||||||
your database and rebuilds it; if there is an error you have no
|
your database and rebuilds it; if there is an error you have no
|
||||||
database. Make sure you have a backup.
|
database. Make sure you have a backup.
|
||||||
For PostgreSQL databases there is an equivalent, rebuilddb_psql.sh,
|
For PostgreSQL databases there is an equivalent, rebuilddb_psql.sh,
|
||||||
@ -806,8 +831,8 @@ the fixup_* scripts in the scripts directories. These will store some
|
|||||||
precooked data in the DB. All upgraders should check out the inboxes
|
precooked data in the DB. All upgraders should check out the inboxes
|
||||||
options below.
|
options below.
|
||||||
|
|
||||||
NOTE: the database definition file, stoica.ini, has been renamed to
|
NOTE: the database definition file, laconica.ini, has been renamed to
|
||||||
laconica.ini (since this is the recommended database name). If you
|
statusnet.ini (since this is the recommended database name). If you
|
||||||
have a line in your config.php pointing to the old name, you'll need
|
have a line in your config.php pointing to the old name, you'll need
|
||||||
to update it.
|
to update it.
|
||||||
|
|
||||||
@ -843,13 +868,16 @@ problem.
|
|||||||
3. When fixup_inboxes is finished, you can set the enabled flag to
|
3. When fixup_inboxes is finished, you can set the enabled flag to
|
||||||
'true'.
|
'true'.
|
||||||
|
|
||||||
|
NOTE: As of version 0.8.1 notice inboxes are automatically trimmed back
|
||||||
|
to ~1000 notices every once in a while.
|
||||||
|
|
||||||
NOTE: we will drop support for non-inboxed sites in the 0.9.x version
|
NOTE: we will drop support for non-inboxed sites in the 0.9.x version
|
||||||
of Laconica. It's time to switch now!
|
of StatusNet. It's time to switch now!
|
||||||
|
|
||||||
UTF-8 Database
|
UTF-8 Database
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Laconica 0.7.4 introduced a fix for some incorrectly-stored
|
StatusNet 0.7.4 introduced a fix for some incorrectly-stored
|
||||||
international characters ("UTF-8"). This fix is not
|
international characters ("UTF-8"). This fix is not
|
||||||
backwards-compatible; installations from before 0.7.4 will show
|
backwards-compatible; installations from before 0.7.4 will show
|
||||||
non-ASCII characters of old notices incorrectly. This section explains
|
non-ASCII characters of old notices incorrectly. This section explains
|
||||||
@ -872,19 +900,19 @@ what to do.
|
|||||||
Configuration options
|
Configuration options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
The main configuration file for Laconica (excepting configurations for
|
The main configuration file for StatusNet (excepting configurations for
|
||||||
dependency software) is config.php in your Laconica directory. If you
|
dependency software) is config.php in your StatusNet directory. If you
|
||||||
edit any other file in the directory, like lib/common.php (where most
|
edit any other file in the directory, like lib/common.php (where most
|
||||||
of the defaults are defined), you will lose your configuration options
|
of the defaults are defined), you will lose your configuration options
|
||||||
in any upgrade, and you will wish that you had been more careful.
|
in any upgrade, and you will wish that you had been more careful.
|
||||||
|
|
||||||
Starting with version 0.7.1, you can put config files in the
|
Starting with version 0.7.1, you can put config files in the
|
||||||
/etc/laconica/ directory on your server, if it exists. Config files
|
/etc/statusnet/ directory on your server, if it exists. Config files
|
||||||
will be included in this order:
|
will be included in this order:
|
||||||
|
|
||||||
* /etc/laconica/laconica.php - server-wide config
|
* /etc/statusnet/statusnet.php - server-wide config
|
||||||
* /etc/laconica/<servername>.php - for a virtual host
|
* /etc/statusnet/<servername>.php - for a virtual host
|
||||||
* /etc/laconica/<servername>_<pathname>.php - for a path
|
* /etc/statusnet/<servername>_<pathname>.php - for a path
|
||||||
* INSTALLDIR/config.php - for a particular implementation
|
* INSTALLDIR/config.php - for a particular implementation
|
||||||
|
|
||||||
Almost all configuration options are made through a two-dimensional
|
Almost all configuration options are made through a two-dimensional
|
||||||
@ -907,7 +935,7 @@ path: The path part of your site's URLs, like 'mublog' or ''
|
|||||||
(installed in root).
|
(installed in root).
|
||||||
fancy: whether or not your site uses fancy URLs (see Fancy URLs
|
fancy: whether or not your site uses fancy URLs (see Fancy URLs
|
||||||
section above). Default is false.
|
section above). Default is false.
|
||||||
logfile: full path to a file for Laconica to save logging
|
logfile: full path to a file for StatusNet to save logging
|
||||||
information to. You may want to use this if you don't have
|
information to. You may want to use this if you don't have
|
||||||
access to syslog.
|
access to syslog.
|
||||||
logdebug: whether to log additional debug info like backtraces on
|
logdebug: whether to log additional debug info like backtraces on
|
||||||
@ -940,6 +968,8 @@ closed: If set to 'true', will disallow registration on your site.
|
|||||||
the service, *then* set this variable to 'true'.
|
the service, *then* set this variable to 'true'.
|
||||||
inviteonly: If set to 'true', will only allow registration if the user
|
inviteonly: If set to 'true', will only allow registration if the user
|
||||||
was invited by an existing user.
|
was invited by an existing user.
|
||||||
|
openidonly: If set to 'true', will only allow registrations and logins
|
||||||
|
through OpenID.
|
||||||
private: If set to 'true', anonymous users will be redirected to the
|
private: If set to 'true', anonymous users will be redirected to the
|
||||||
'login' page. Also, API methods that normally require no
|
'login' page. Also, API methods that normally require no
|
||||||
authentication will require it. Note that this does not turn
|
authentication will require it. Note that this does not turn
|
||||||
@ -964,9 +994,6 @@ sslserver: use an alternate server name for SSL URLs, like
|
|||||||
shorturllength: Length of URL at which URLs in a message exceeding 140
|
shorturllength: Length of URL at which URLs in a message exceeding 140
|
||||||
characters will be sent to the user's chosen
|
characters will be sent to the user's chosen
|
||||||
shortening service.
|
shortening service.
|
||||||
design: a default design (colors and background) for the site.
|
|
||||||
Sub-items are: backgroundcolor, contentcolor, sidebarcolor,
|
|
||||||
textcolor, linkcolor, backgroundimage, disposition.
|
|
||||||
dupelimit: minimum time allowed for one person to say the same thing
|
dupelimit: minimum time allowed for one person to say the same thing
|
||||||
twice. Default 60s. Anything lower is considered a user
|
twice. Default 60s. Anything lower is considered a user
|
||||||
or UI error.
|
or UI error.
|
||||||
@ -978,14 +1005,14 @@ This section is a reference to the configuration options for
|
|||||||
DB_DataObject (see <http://ur1.ca/7xp>). The ones that you may want to
|
DB_DataObject (see <http://ur1.ca/7xp>). The ones that you may want to
|
||||||
set are listed below for clarity.
|
set are listed below for clarity.
|
||||||
|
|
||||||
database: a DSN (Data Source Name) for your Laconica database. This is
|
database: a DSN (Data Source Name) for your StatusNet database. This is
|
||||||
in the format 'protocol://username:password@hostname/databasename',
|
in the format 'protocol://username:password@hostname/databasename',
|
||||||
where 'protocol' is 'mysql' or 'mysqli' (or possibly 'postgresql', if you
|
where 'protocol' is 'mysql' or 'mysqli' (or possibly 'postgresql', if you
|
||||||
really know what you're doing), 'username' is the username,
|
really know what you're doing), 'username' is the username,
|
||||||
'password' is the password, and etc.
|
'password' is the password, and etc.
|
||||||
ini_yourdbname: if your database is not named 'laconica', you'll need
|
ini_yourdbname: if your database is not named 'statusnet', you'll need
|
||||||
to set this to point to the location of the
|
to set this to point to the location of the
|
||||||
laconica.ini file. Note that the real name of your database
|
statusnet.ini file. Note that the real name of your database
|
||||||
should go in there, not literally 'yourdbname'.
|
should go in there, not literally 'yourdbname'.
|
||||||
db_driver: You can try changing this to 'MDB2' to use the other driver
|
db_driver: You can try changing this to 'MDB2' to use the other driver
|
||||||
type for DB_DataObject, but note that it breaks the OpenID
|
type for DB_DataObject, but note that it breaks the OpenID
|
||||||
@ -1013,11 +1040,11 @@ utf8: whether to talk to the database in UTF-8 mode. This is the default
|
|||||||
syslog
|
syslog
|
||||||
------
|
------
|
||||||
|
|
||||||
By default, Laconica sites log error messages to the syslog facility.
|
By default, StatusNet sites log error messages to the syslog facility.
|
||||||
(You can override this using the 'logfile' parameter described above).
|
(You can override this using the 'logfile' parameter described above).
|
||||||
|
|
||||||
appname: The name that Laconica uses to log messages. By default it's
|
appname: The name that StatusNet uses to log messages. By default it's
|
||||||
"laconica", but if you have more than one installation on the
|
"statusnet", but if you have more than one installation on the
|
||||||
server, you may want to change the name for each instance so
|
server, you may want to change the name for each instance so
|
||||||
you can track log messages more easily.
|
you can track log messages more easily.
|
||||||
priority: level to log at. Currently ignored.
|
priority: level to log at. Currently ignored.
|
||||||
@ -1076,9 +1103,9 @@ This is for configuring nicknames in the service.
|
|||||||
|
|
||||||
blacklist: an array of strings for usernames that may not be
|
blacklist: an array of strings for usernames that may not be
|
||||||
registered. A default array exists for strings that are
|
registered. A default array exists for strings that are
|
||||||
used by Laconica (e.g. 'doc', 'main', 'avatar', 'theme')
|
used by StatusNet (e.g. 'doc', 'main', 'avatar', 'theme')
|
||||||
but you may want to add others if you have other software
|
but you may want to add others if you have other software
|
||||||
installed in a subdirectory of Laconica or if you just
|
installed in a subdirectory of StatusNet or if you just
|
||||||
don't want certain words used as usernames.
|
don't want certain words used as usernames.
|
||||||
featured: an array of nicknames of 'featured' users of the site.
|
featured: an array of nicknames of 'featured' users of the site.
|
||||||
Can be useful to draw attention to well-known users, or
|
Can be useful to draw attention to well-known users, or
|
||||||
@ -1151,7 +1178,7 @@ host: some XMPP domains are served by machines with a different
|
|||||||
hostname. (For example, @gmail.com GTalk users connect to
|
hostname. (For example, @gmail.com GTalk users connect to
|
||||||
talk.google.com). Set this to the correct hostname if that's the
|
talk.google.com). Set this to the correct hostname if that's the
|
||||||
case with your server.
|
case with your server.
|
||||||
encryption: Whether to encrypt the connection between Laconica and the
|
encryption: Whether to encrypt the connection between StatusNet and the
|
||||||
XMPP server. Defaults to true, but you can get
|
XMPP server. Defaults to true, but you can get
|
||||||
considerably better performance turning it off if you're
|
considerably better performance turning it off if you're
|
||||||
connecting to a server on the same machine or on a
|
connecting to a server on the same machine or on a
|
||||||
@ -1170,6 +1197,14 @@ For configuring invites.
|
|||||||
|
|
||||||
enabled: Whether to allow users to send invites. Default true.
|
enabled: Whether to allow users to send invites. Default true.
|
||||||
|
|
||||||
|
openid
|
||||||
|
------
|
||||||
|
|
||||||
|
For configuring OpenID.
|
||||||
|
|
||||||
|
enabled: Whether to allow users to register and login using OpenID. Default
|
||||||
|
true.
|
||||||
|
|
||||||
tag
|
tag
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -1217,7 +1252,7 @@ base: memcached uses key-value pairs to store data. We build long,
|
|||||||
base of the key is usually a simplified version of the site name
|
base of the key is usually a simplified version of the site name
|
||||||
(like "Identi.ca" => "identica"), but you can overwrite this if
|
(like "Identi.ca" => "identica"), but you can overwrite this if
|
||||||
you need to. You can safely ignore it if you only have one
|
you need to. You can safely ignore it if you only have one
|
||||||
Laconica site using your memcached server.
|
StatusNet site using your memcached server.
|
||||||
port: Port to connect to; defaults to 11211.
|
port: Port to connect to; defaults to 11211.
|
||||||
|
|
||||||
sphinx
|
sphinx
|
||||||
@ -1231,13 +1266,37 @@ enabled: Set to true to enable. Default false.
|
|||||||
server: a string with the hostname of the sphinx server.
|
server: a string with the hostname of the sphinx server.
|
||||||
port: an integer with the port number of the sphinx server.
|
port: an integer with the port number of the sphinx server.
|
||||||
|
|
||||||
|
emailpost
|
||||||
|
---------
|
||||||
|
|
||||||
|
For post-by-email.
|
||||||
|
|
||||||
|
enabled: Whether to enable post-by-email. Defaults to true. You will
|
||||||
|
also need to set up maildaemon.php.
|
||||||
|
|
||||||
|
sms
|
||||||
|
---
|
||||||
|
|
||||||
|
For SMS integration.
|
||||||
|
|
||||||
|
enabled: Whether to enable SMS integration. Defaults to true. Queues
|
||||||
|
should also be enabled.
|
||||||
|
|
||||||
|
twitter
|
||||||
|
-------
|
||||||
|
|
||||||
|
For Twitter integration
|
||||||
|
|
||||||
|
enabled: Whether to enable Twitter integration. Defaults to true.
|
||||||
|
Queues should also be enabled.
|
||||||
|
|
||||||
integration
|
integration
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
A catch-all for integration with other systems.
|
A catch-all for integration with other systems.
|
||||||
|
|
||||||
source: The name to use for the source of posts to Twitter. Defaults
|
source: The name to use for the source of posts to Twitter. Defaults
|
||||||
to 'laconica', but if you request your own source name from
|
to 'statusnet', but if you request your own source name from
|
||||||
Twitter <http://twitter.com/help/request_source>, you can use
|
Twitter <http://twitter.com/help/request_source>, you can use
|
||||||
that here instead. Status updates on Twitter will then have
|
that here instead. Status updates on Twitter will then have
|
||||||
links to your site.
|
links to your site.
|
||||||
@ -1294,11 +1353,11 @@ snapshot
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
The software will, by default, send statistical snapshots about the
|
The software will, by default, send statistical snapshots about the
|
||||||
local installation to a stats server on the laconi.ca Web site. This
|
local installation to a stats server on the status.net Web site. This
|
||||||
data is used by the developers to prioritize development decisions. No
|
data is used by the developers to prioritize development decisions. No
|
||||||
identifying data about users or organizations is collected. The data
|
identifying data about users or organizations is collected. The data
|
||||||
is available to the public for review. Participating in this survey
|
is available to the public for review. Participating in this survey
|
||||||
helps Laconica developers take your needs into account when updating
|
helps StatusNet developers take your needs into account when updating
|
||||||
the software.
|
the software.
|
||||||
|
|
||||||
run: string indicating when to run the statistics. Values can be 'web'
|
run: string indicating when to run the statistics. Values can be 'web'
|
||||||
@ -1309,7 +1368,7 @@ frequency: if run value is 'web', how often to report statistics.
|
|||||||
Measured in Web hits; depends on how active your site is.
|
Measured in Web hits; depends on how active your site is.
|
||||||
Default is 10000 -- that is, one report every 10000 Web hits,
|
Default is 10000 -- that is, one report every 10000 Web hits,
|
||||||
on average.
|
on average.
|
||||||
reporturl: URL to post statistics to. Defaults to Laconica developers'
|
reporturl: URL to post statistics to. Defaults to StatusNet developers'
|
||||||
report system, but if they go evil or disappear you may
|
report system, but if they go evil or disappear you may
|
||||||
need to update this to another value. Note: if you
|
need to update this to another value. Note: if you
|
||||||
don't want to report stats, it's much better to
|
don't want to report stats, it's much better to
|
||||||
@ -1432,10 +1491,24 @@ notify third-party servers of updates.
|
|||||||
notify: an array of URLs for ping endpoints. Default is the empty
|
notify: an array of URLs for ping endpoints. Default is the empty
|
||||||
array (no notification).
|
array (no notification).
|
||||||
|
|
||||||
|
design
|
||||||
|
------
|
||||||
|
|
||||||
|
Default design (colors and background) for the site. Actual appearance
|
||||||
|
depends on the theme. Null values mean to use the theme defaults.
|
||||||
|
|
||||||
|
backgroundcolor: Hex color of the site background.
|
||||||
|
contentcolor: Hex color of the content area background.
|
||||||
|
sidebarcolor: Hex color of the sidebar background.
|
||||||
|
textcolor: Hex color of all non-link text.
|
||||||
|
linkcolor: Hex color of all links.
|
||||||
|
backgroundimage: Image to use for the background.
|
||||||
|
disposition: Flags for whether or not to tile the background image.
|
||||||
|
|
||||||
Plugins
|
Plugins
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Beginning with the 0.7.x branch, Laconica has supported a simple but
|
Beginning with the 0.7.x branch, StatusNet has supported a simple but
|
||||||
powerful plugin architecture. Important events in the code are named,
|
powerful plugin architecture. Important events in the code are named,
|
||||||
like 'StartNoticeSave', and other software can register interest
|
like 'StartNoticeSave', and other software can register interest
|
||||||
in those events. When the events happen, the other software is called
|
in those events. When the events happen, the other software is called
|
||||||
@ -1471,7 +1544,7 @@ can enable a plugin with the following line in config.php:
|
|||||||
|
|
||||||
This will look for and load files named 'ExamplePlugin.php' or
|
This will look for and load files named 'ExamplePlugin.php' or
|
||||||
'Example/ExamplePlugin.php' either in the plugins/ directory (for
|
'Example/ExamplePlugin.php' either in the plugins/ directory (for
|
||||||
plugins that ship with Laconica) or in the local/ directory (for
|
plugins that ship with StatusNet) or in the local/ directory (for
|
||||||
plugins you write yourself or that you get from somewhere else) or
|
plugins you write yourself or that you get from somewhere else) or
|
||||||
local/plugins/.
|
local/plugins/.
|
||||||
|
|
||||||
@ -1480,24 +1553,24 @@ Plugins are documented in their own directories.
|
|||||||
Troubleshooting
|
Troubleshooting
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The primary output for Laconica is syslog, unless you configured a
|
The primary output for StatusNet is syslog, unless you configured a
|
||||||
separate logfile. This is probably the first place to look if you're
|
separate logfile. This is probably the first place to look if you're
|
||||||
getting weird behaviour from Laconica.
|
getting weird behaviour from StatusNet.
|
||||||
|
|
||||||
If you're tracking the unstable version of Laconica in the git
|
If you're tracking the unstable version of StatusNet in the git
|
||||||
repository (see below), and you get a compilation error ("unexpected
|
repository (see below), and you get a compilation error ("unexpected
|
||||||
T_STRING") in the browser, check to see that you don't have any
|
T_STRING") in the browser, check to see that you don't have any
|
||||||
conflicts in your code.
|
conflicts in your code.
|
||||||
|
|
||||||
If you upgraded to Laconica 0.7.4 without reading the "Notice inboxes"
|
If you upgraded to StatusNet 0.8.1 without reading the "Notice
|
||||||
section above, and all your users' 'Personal' tabs are empty, read the
|
inboxes" section above, and all your users' 'Personal' tabs are empty,
|
||||||
"Notice inboxes" section above.
|
read the "Notice inboxes" section above.
|
||||||
|
|
||||||
Myths
|
Myths
|
||||||
=====
|
=====
|
||||||
|
|
||||||
These are some myths you may see on the Web about Laconica.
|
These are some myths you may see on the Web about StatusNet.
|
||||||
Documentation from the core team about Laconica has been pretty
|
Documentation from the core team about StatusNet has been pretty
|
||||||
sparse, so some backtracking and guesswork resulted in some incorrect
|
sparse, so some backtracking and guesswork resulted in some incorrect
|
||||||
assumptions.
|
assumptions.
|
||||||
|
|
||||||
@ -1509,7 +1582,7 @@ assumptions.
|
|||||||
|
|
||||||
- "Edit dataobject.ini with the following settings..." dataobject.ini
|
- "Edit dataobject.ini with the following settings..." dataobject.ini
|
||||||
is a development file for the DB_DataObject framework and is not
|
is a development file for the DB_DataObject framework and is not
|
||||||
used by the running software. It was removed from the Laconica
|
used by the running software. It was removed from the StatusNet
|
||||||
distribution because its presence was confusing. Do not bother
|
distribution because its presence was confusing. Do not bother
|
||||||
configuring dataobject.ini, and do not put your database username
|
configuring dataobject.ini, and do not put your database username
|
||||||
and password into the file on a production Web server; unscrupulous
|
and password into the file on a production Web server; unscrupulous
|
||||||
@ -1519,45 +1592,55 @@ Unstable version
|
|||||||
================
|
================
|
||||||
|
|
||||||
If you're adventurous or impatient, you may want to install the
|
If you're adventurous or impatient, you may want to install the
|
||||||
development version of Laconica. To get it, use the git version
|
development version of StatusNet. To get it, use the git version
|
||||||
control tool <http://git-scm.com/> like so:
|
control tool <http://git-scm.com/> like so:
|
||||||
|
|
||||||
git clone http://laconi.ca/software/laconica.git
|
git clone git@gitorious.org:statusnet/mainline.git
|
||||||
|
|
||||||
|
This is the version of the software that runs on Identi.ca and the
|
||||||
|
status.net hosted service. Using it is a mixed bag. On the positive
|
||||||
|
side, it usually includes the latest security and bug fix patches. On
|
||||||
|
the downside, it may also include changes that require admin
|
||||||
|
intervention (like running a script or even raw SQL!) that may not be
|
||||||
|
documented yet. It may be a good idea to test this version before
|
||||||
|
installing it on your production machines.
|
||||||
|
|
||||||
To keep it up-to-date, use 'git pull'. Watch for conflicts!
|
To keep it up-to-date, use 'git pull'. Watch for conflicts!
|
||||||
|
|
||||||
Further information
|
Further information
|
||||||
===================
|
===================
|
||||||
|
|
||||||
There are several ways to get more information about Laconica.
|
There are several ways to get more information about StatusNet.
|
||||||
|
|
||||||
* There is a mailing list for Laconica developers and admins at
|
* There is a mailing list for StatusNet developers and admins at
|
||||||
http://mail.laconi.ca/mailman/listinfo/laconica-dev
|
http://mail.status.net/mailman/listinfo/statusnet-dev
|
||||||
* The #laconica IRC channel on freenode.net <http://www.freenode.net/>.
|
* The #statusnet IRC channel on freenode.net <http://www.freenode.net/>.
|
||||||
* The Laconica wiki, http://laconi.ca/trac/
|
* The StatusNet wiki, http://status.net/wiki/
|
||||||
|
* The StatusNet blog, http://status.net/blog/
|
||||||
|
* The StatusNet status update, <http://status.status.net/status> (!)
|
||||||
|
|
||||||
Feedback
|
Feedback
|
||||||
========
|
========
|
||||||
|
|
||||||
* Microblogging messages to http://identi.ca/evan are very welcome.
|
* Microblogging messages to http://identi.ca/evan are very welcome.
|
||||||
* Laconica's Trac server has a bug tracker for any defects you may find,
|
* StatusNet's Trac server has a bug tracker for any defects you may find,
|
||||||
or ideas for making things better. http://laconi.ca/trac/
|
or ideas for making things better. http://status.net/trac/
|
||||||
* e-mail to evan@identi.ca will usually be read and responded to very
|
* e-mail to evan@status.net will usually be read and responded to very
|
||||||
quickly, unless the question is really hard.
|
quickly, unless the question is really hard.
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
The following is an incomplete list of developers who've worked on
|
The following is an incomplete list of developers who've worked on
|
||||||
Laconi.ca. Apologies for any oversight; please let evan@identi.ca know
|
StatusNet. Apologies for any oversight; please let evan@status.net know
|
||||||
if anyone's been overlooked in error.
|
if anyone's been overlooked in error.
|
||||||
|
|
||||||
* Evan Prodromou, founder and lead developer, Control Yourself, Inc.
|
* Evan Prodromou, founder and lead developer, StatusNet, Inc.
|
||||||
* Zach Copley, Control Yourself, Inc.
|
* Zach Copley, StatusNet, Inc.
|
||||||
* Earle Martin, Control Yourself, Inc.
|
* Earle Martin, StatusNet, Inc.
|
||||||
* Marie-Claude Doyon, designer, Control Yourself, Inc.
|
* Marie-Claude Doyon, designer, StatusNet, Inc.
|
||||||
* Sarven Capadisli, Control Yourself, Inc.
|
* Sarven Capadisli, StatusNet, Inc.
|
||||||
* Robin Millette, Control Yourself, Inc.
|
* Robin Millette, StatusNet, Inc.
|
||||||
* Ciaran Gultnieks
|
* Ciaran Gultnieks
|
||||||
* Michael Landers
|
* Michael Landers
|
||||||
* Ori Avtalion
|
* Ori Avtalion
|
||||||
@ -1589,6 +1672,6 @@ if anyone's been overlooked in error.
|
|||||||
* Craig Andrews
|
* Craig Andrews
|
||||||
|
|
||||||
Thanks also to the developers of our upstream library code and to the
|
Thanks also to the developers of our upstream library code and to the
|
||||||
thousands of people who have tried out Identi.ca, installed Laconi.ca,
|
thousands of people who have tried out Identi.ca, installed StatusNet,
|
||||||
told their friends, and built the Open Microblogging network to what
|
told their friends, and built the Open Microblogging network to what
|
||||||
it is today.
|
it is today.
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/omb.php';
|
|||||||
* Access token class.
|
* Access token class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class AccesstokenAction extends Action
|
class AccesstokenAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/personalgroupnav.php';
|
require_once INSTALLDIR.'/lib/personalgroupnav.php';
|
||||||
require_once INSTALLDIR.'/lib/noticelist.php';
|
require_once INSTALLDIR.'/lib/noticelist.php';
|
||||||
@ -25,11 +25,31 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||||||
|
|
||||||
class AllAction extends ProfileAction
|
class AllAction extends ProfileAction
|
||||||
{
|
{
|
||||||
|
var $notice;
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepare($args)
|
||||||
|
{
|
||||||
|
parent::prepare($args);
|
||||||
|
$cur = common_current_user();
|
||||||
|
|
||||||
|
if (!empty($cur) && $cur->id == $this->user->id) {
|
||||||
|
$this->notice = $this->user->noticeInbox(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
|
||||||
|
} else {
|
||||||
|
$this->notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
|
$this->serverError(_('No such page'),$code=404);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -88,7 +108,9 @@ class AllAction extends ProfileAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
|
$message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and then nudge %s or post a notice to his or her attention.'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin',
|
||||||
|
$this->user->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
@ -98,15 +120,7 @@ class AllAction extends ProfileAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$cur = common_current_user();
|
$nl = new NoticeList($this->notice, $this);
|
||||||
|
|
||||||
if (!empty($cur) && $cur->id == $this->user->id) {
|
|
||||||
$notice = $this->user->noticeInbox(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
|
|
||||||
} else {
|
|
||||||
$notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$nl = new NoticeList($notice, $this);
|
|
||||||
|
|
||||||
$cnt = $nl->show();
|
$cnt = $nl->show();
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,11 +41,11 @@ require_once INSTALLDIR.'/lib/rssaction.php';
|
|||||||
* Formatting of RSS handled by Rss10Action
|
* Formatting of RSS handled by Rss10Action
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class AllrssAction extends Rss10Action
|
class AllrssAction extends Rss10Action
|
||||||
{
|
{
|
||||||
@ -115,8 +115,8 @@ class AllrssAction extends Rss10Action
|
|||||||
'link' => common_local_url('all',
|
'link' => common_local_url('all',
|
||||||
array('nickname' =>
|
array('nickname' =>
|
||||||
$user->nickname)),
|
$user->nickname)),
|
||||||
'description' => sprintf(_('Feed for friends of %s'),
|
'description' => sprintf(_('Updates from %1$s and friends on %2$s!'),
|
||||||
$user->nickname));
|
$user->nickname, common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class ApiAction extends Action
|
class ApiAction extends Action
|
||||||
{
|
{
|
||||||
@ -27,6 +27,8 @@ class ApiAction extends Action
|
|||||||
var $api_arg;
|
var $api_arg;
|
||||||
var $api_method;
|
var $api_method;
|
||||||
var $api_action;
|
var $api_action;
|
||||||
|
var $auth_user;
|
||||||
|
var $auth_pw;
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
@ -35,6 +37,7 @@ class ApiAction extends Action
|
|||||||
$this->api_action = $this->arg('apiaction');
|
$this->api_action = $this->arg('apiaction');
|
||||||
$method = $this->arg('method');
|
$method = $this->arg('method');
|
||||||
$argument = $this->arg('argument');
|
$argument = $this->arg('argument');
|
||||||
|
$this->basic_auth_process_header();
|
||||||
|
|
||||||
if (isset($argument)) {
|
if (isset($argument)) {
|
||||||
$cmdext = explode('.', $argument);
|
$cmdext = explode('.', $argument);
|
||||||
@ -50,16 +53,16 @@ class ApiAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->requires_auth()) {
|
if ($this->requires_auth()) {
|
||||||
if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
if (!isset($this->auth_user)) {
|
||||||
|
|
||||||
# This header makes basic auth go
|
# This header makes basic auth go
|
||||||
header('WWW-Authenticate: Basic realm="Laconica API"');
|
header('WWW-Authenticate: Basic realm="StatusNet API"');
|
||||||
|
|
||||||
# If the user hits cancel -- bam!
|
# If the user hits cancel -- bam!
|
||||||
$this->show_basic_auth_error();
|
$this->show_basic_auth_error();
|
||||||
} else {
|
} else {
|
||||||
$nickname = $_SERVER['PHP_AUTH_USER'];
|
$nickname = $this->auth_user;
|
||||||
$password = $_SERVER['PHP_AUTH_PW'];
|
$password = $this->auth_pw;
|
||||||
$user = common_check_user($nickname, $password);
|
$user = common_check_user($nickname, $password);
|
||||||
|
|
||||||
if ($user) {
|
if ($user) {
|
||||||
@ -76,8 +79,8 @@ class ApiAction extends Action
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Caller might give us a username even if not required
|
// Caller might give us a username even if not required
|
||||||
if (isset($_SERVER['PHP_AUTH_USER'])) {
|
if (isset($this->auth_user)) {
|
||||||
$user = User::staticGet('nickname', $_SERVER['PHP_AUTH_USER']);
|
$user = User::staticGet('nickname', $this->auth_user);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
@ -125,29 +128,36 @@ class ApiAction extends Action
|
|||||||
'users/show',
|
'users/show',
|
||||||
'help/test',
|
'help/test',
|
||||||
'help/downtime_schedule',
|
'help/downtime_schedule',
|
||||||
'laconica/version',
|
'statusnet/version',
|
||||||
'laconica/config',
|
'statusnet/config',
|
||||||
'laconica/wadl',
|
'statusnet/wadl',
|
||||||
'tags/timeline',
|
'tags/timeline',
|
||||||
'oembed/oembed',
|
'oembed/oembed',
|
||||||
|
'groups/show',
|
||||||
|
'groups/timeline',
|
||||||
|
'groups/list_all',
|
||||||
|
'groups/membership',
|
||||||
|
'groups/is_member',
|
||||||
'groups/timeline');
|
'groups/timeline');
|
||||||
|
|
||||||
static $bareauth = array('statuses/user_timeline',
|
static $bareauth = array('statuses/user_timeline',
|
||||||
'statuses/friends_timeline',
|
'statuses/friends_timeline',
|
||||||
|
'statuses/home_timeline',
|
||||||
'statuses/friends',
|
'statuses/friends',
|
||||||
'statuses/replies',
|
'statuses/replies',
|
||||||
'statuses/mentions',
|
'statuses/mentions',
|
||||||
'statuses/followers',
|
'statuses/followers',
|
||||||
'favorites/favorites',
|
'favorites/favorites',
|
||||||
'friendships/show');
|
'friendships/show',
|
||||||
|
'groups/list_groups');
|
||||||
|
|
||||||
$fullname = "$this->api_action/$this->api_method";
|
$fullname = "$this->api_action/$this->api_method";
|
||||||
|
|
||||||
// If the site is "private", all API methods except laconica/config
|
// If the site is "private", all API methods except statusnet/config
|
||||||
// need authentication
|
// need authentication
|
||||||
|
|
||||||
if (common_config('site', 'private')) {
|
if (common_config('site', 'private')) {
|
||||||
return $fullname != 'laconica/config' || false;
|
return $fullname != 'statusnet/config' || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bareauth: only needs auth if without an argument or query param specifying user
|
// bareauth: only needs auth if without an argument or query param specifying user
|
||||||
@ -197,6 +207,39 @@ class ApiAction extends Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function basic_auth_process_header()
|
||||||
|
{
|
||||||
|
if(isset($_SERVER['AUTHORIZATION']) || isset($_SERVER['HTTP_AUTHORIZATION']))
|
||||||
|
{
|
||||||
|
$authorization_header = isset($_SERVER['HTTP_AUTHORIZATION'])?$_SERVER['HTTP_AUTHORIZATION']:$_SERVER['AUTHORIZATION'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_SERVER['PHP_AUTH_USER']))
|
||||||
|
{
|
||||||
|
$this->auth_user = $_SERVER['PHP_AUTH_USER'];
|
||||||
|
$this->auth_pw = $_SERVER['PHP_AUTH_PW'];
|
||||||
|
}
|
||||||
|
elseif ( isset($authorization_header) && strstr(substr($authorization_header, 0,5),'Basic') )
|
||||||
|
{
|
||||||
|
// decode the HTTP_AUTHORIZATION header on php-cgi server self
|
||||||
|
// on fcgid server the header name is AUTHORIZATION
|
||||||
|
|
||||||
|
$auth_hash = base64_decode( substr($authorization_header, 6) );
|
||||||
|
list($this->auth_user, $this->auth_pw) = explode(':', $auth_hash);
|
||||||
|
|
||||||
|
// set all to NULL on a empty basic auth request
|
||||||
|
if($this->auth_user == "") {
|
||||||
|
$this->auth_user = NULL;
|
||||||
|
$this->auth_pw = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->auth_user = NULL;
|
||||||
|
$this->auth_pw = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function show_basic_auth_error()
|
function show_basic_auth_error()
|
||||||
{
|
{
|
||||||
header('HTTP/1.1 401 Unauthorized');
|
header('HTTP/1.1 401 Unauthorized');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Show notice attachments
|
* Show notice attachments
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ require_once INSTALLDIR.'/lib/attachmentlist.php';
|
|||||||
* Show notice attachments
|
* Show notice attachments
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AttachmentAction extends Action
|
class AttachmentAction extends Action
|
||||||
@ -103,18 +103,18 @@ class AttachmentAction extends Action
|
|||||||
$this->element('link',array('rel'=>'alternate',
|
$this->element('link',array('rel'=>'alternate',
|
||||||
'type'=>'application/json+oembed',
|
'type'=>'application/json+oembed',
|
||||||
'href'=>common_local_url(
|
'href'=>common_local_url(
|
||||||
'api',
|
'oembed',
|
||||||
array('apiaction'=>'oembed','method'=>'oembed.json'),
|
array(),
|
||||||
array('url'=>
|
array('format'=>'json', 'url'=>
|
||||||
common_local_url('attachment',
|
common_local_url('attachment',
|
||||||
array('attachment' => $this->attachment->id)))),
|
array('attachment' => $this->attachment->id)))),
|
||||||
'title'=>'oEmbed'),null);
|
'title'=>'oEmbed'),null);
|
||||||
$this->element('link',array('rel'=>'alternate',
|
$this->element('link',array('rel'=>'alternate',
|
||||||
'type'=>'text/xml+oembed',
|
'type'=>'text/xml+oembed',
|
||||||
'href'=>common_local_url(
|
'href'=>common_local_url(
|
||||||
'api',
|
'oembed',
|
||||||
array('apiaction'=>'oembed','method'=>'oembed.xml'),
|
array(),
|
||||||
array('url'=>
|
array('format'=>'xml','url'=>
|
||||||
common_local_url('attachment',
|
common_local_url('attachment',
|
||||||
array('attachment' => $this->attachment->id)))),
|
array('attachment' => $this->attachment->id)))),
|
||||||
'title'=>'oEmbed'),null);
|
'title'=>'oEmbed'),null);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Show notice attachments
|
* Show notice attachments
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ require_once INSTALLDIR.'/actions/attachment.php';
|
|||||||
* Show notice attachments
|
* Show notice attachments
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Attachment_ajaxAction extends AttachmentAction
|
class Attachment_ajaxAction extends AttachmentAction
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Show notice attachments
|
* Show notice attachments
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ require_once INSTALLDIR.'/actions/attachment.php';
|
|||||||
* Show notice attachments
|
* Show notice attachments
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Attachment_thumbnailAction extends AttachmentAction
|
class Attachment_thumbnailAction extends AttachmentAction
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,11 +36,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Retrieve user avatar by nickname action class.
|
* Retrieve user avatar by nickname action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class AvatarbynicknameAction extends Action
|
class AvatarbynicknameAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Upload an avatar
|
* Upload an avatar
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,12 +42,12 @@ define('MAX_ORIGINAL', 480);
|
|||||||
* We use jCrop plugin for jQuery to crop the image after upload.
|
* We use jCrop plugin for jQuery to crop the image after upload.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AvatarsettingsAction extends AccountSettingsAction
|
class AvatarsettingsAction extends AccountSettingsAction
|
||||||
@ -362,13 +362,13 @@ class AvatarsettingsAction extends AccountSettingsAction
|
|||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
|
|
||||||
$avatar = $profile->getOriginalAvatar();
|
$avatar = $profile->getOriginalAvatar();
|
||||||
$avatar->delete();
|
if($avatar) $avatar->delete();
|
||||||
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||||
$avatar->delete();
|
if($avatar) $avatar->delete();
|
||||||
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
|
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
|
||||||
$avatar->delete();
|
if($avatar) $avatar->delete();
|
||||||
$avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
|
$avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
|
||||||
$avatar->delete();
|
if($avatar) $avatar->delete();
|
||||||
|
|
||||||
$this->showForm(_('Avatar deleted.'), true);
|
$this->showForm(_('Avatar deleted.'), true);
|
||||||
}
|
}
|
||||||
@ -382,13 +382,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
|||||||
function showStylesheets()
|
function showStylesheets()
|
||||||
{
|
{
|
||||||
parent::showStylesheets();
|
parent::showStylesheets();
|
||||||
$jcropStyle =
|
$this->cssLink('css/jquery.Jcrop.css','base','screen, projection, tv');
|
||||||
common_path('theme/base/css/jquery.Jcrop.css?version='.LACONICA_VERSION);
|
|
||||||
|
|
||||||
$this->element('link', array('rel' => 'stylesheet',
|
|
||||||
'type' => 'text/css',
|
|
||||||
'href' => $jcropStyle,
|
|
||||||
'media' => 'screen, projection, tv'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -402,13 +396,10 @@ class AvatarsettingsAction extends AccountSettingsAction
|
|||||||
parent::showScripts();
|
parent::showScripts();
|
||||||
|
|
||||||
if ($this->mode == 'crop') {
|
if ($this->mode == 'crop') {
|
||||||
$jcropPack = common_path('js/jcrop/jquery.Jcrop.pack.js');
|
$this->script('js/jcrop/jquery.Jcrop.min.js');
|
||||||
$jcropGo = common_path('js/jcrop/jquery.Jcrop.go.js');
|
$this->script('js/jcrop/jquery.Jcrop.go.js');
|
||||||
|
}
|
||||||
|
|
||||||
$this->element('script', array('type' => 'text/javascript',
|
$this->autofocus('avatarfile');
|
||||||
'src' => $jcropPack));
|
|
||||||
$this->element('script', array('type' => 'text/javascript',
|
|
||||||
'src' => $jcropGo));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,11 +36,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Block a user action class.
|
* Block a user action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class BlockAction extends Action
|
class BlockAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of group members
|
* List of group members
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ if (!defined('LACONICA')) {
|
|||||||
* List of profiles blocked from this group
|
* List of profiles blocked from this group
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BlockedfromgroupAction extends GroupDesignAction
|
class BlockedfromgroupAction extends GroupDesignAction
|
||||||
@ -190,11 +190,11 @@ class GroupBlockListItem extends ProfileListItem
|
|||||||
* Form for unblocking a user from a group
|
* Form for unblocking a user from a group
|
||||||
*
|
*
|
||||||
* @category Form
|
* @category Form
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see UnblockForm
|
* @see UnblockForm
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Confirm an address
|
* Confirm an address
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Confirm
|
* @category Confirm
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,10 +39,10 @@ if (!defined('LACONICA')) {
|
|||||||
* accepts those codes.
|
* accepts those codes.
|
||||||
*
|
*
|
||||||
* @category Confirm
|
* @category Confirm
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConfirmaddressAction extends Action
|
class ConfirmaddressAction extends Action
|
||||||
@ -67,7 +67,11 @@ class ConfirmaddressAction extends Action
|
|||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
if (!common_config('site', 'openidonly')) {
|
||||||
common_redirect(common_local_url('login'));
|
common_redirect(common_local_url('login'));
|
||||||
|
} else {
|
||||||
|
common_redirect(common_local_url('openidlogin'));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$code = $this->trimmed('code');
|
$code = $this->trimmed('code');
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2009, Control Yourself, Inc.
|
* Copyright (C) 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -27,7 +27,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ require_once INSTALLDIR.'/lib/noticelist.php';
|
|||||||
* Conversation tree in the browser
|
* Conversation tree in the browser
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConversationAction extends Action
|
class ConversationAction extends Action
|
||||||
@ -129,10 +129,10 @@ class ConversationAction extends Action
|
|||||||
* The widget class for displaying a hierarchical list of notices.
|
* The widget class for displaying a hierarchical list of notices.
|
||||||
*
|
*
|
||||||
* @category Widget
|
* @category Widget
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConversationTree extends NoticeList
|
class ConversationTree extends NoticeList
|
||||||
@ -167,6 +167,8 @@ class ConversationTree extends NoticeList
|
|||||||
|
|
||||||
function _buildTree()
|
function _buildTree()
|
||||||
{
|
{
|
||||||
|
$cnt = 0;
|
||||||
|
|
||||||
$this->tree = array();
|
$this->tree = array();
|
||||||
$this->table = array();
|
$this->table = array();
|
||||||
|
|
||||||
@ -248,10 +250,10 @@ class ConversationTree extends NoticeList
|
|||||||
* Special class of NoticeListItem for use inside conversation trees.
|
* Special class of NoticeListItem for use inside conversation trees.
|
||||||
*
|
*
|
||||||
* @category Widget
|
* @category Widget
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConversationTreeItem extends NoticeListItem
|
class ConversationTreeItem extends NoticeListItem
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Class for deleting a notice
|
* Class for deleting a notice
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008 Control Yourself, Inc.
|
* @copyright 2008 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/favorform.php';
|
|||||||
* Disfavor class.
|
* Disfavor class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class DisfavorAction extends Action
|
class DisfavorAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,11 +37,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Documentation class.
|
* Documentation class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class DocAction extends Action
|
class DocAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Edit an existing group
|
* Edit an existing group
|
||||||
*
|
*
|
||||||
@ -20,16 +20,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ if (!defined('LACONICA')) {
|
|||||||
* This is the form for adding a new group
|
* This is the form for adding a new group
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class EditgroupAction extends GroupDesignAction
|
class EditgroupAction extends GroupDesignAction
|
||||||
@ -160,6 +160,12 @@ class EditgroupAction extends GroupDesignAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('nickname');
|
||||||
|
}
|
||||||
|
|
||||||
function trySave()
|
function trySave()
|
||||||
{
|
{
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
@ -244,7 +250,6 @@ class EditgroupAction extends GroupDesignAction
|
|||||||
$this->group->homepage = $homepage;
|
$this->group->homepage = $homepage;
|
||||||
$this->group->description = $description;
|
$this->group->description = $description;
|
||||||
$this->group->location = $location;
|
$this->group->location = $location;
|
||||||
$this->group->created = common_sql_now();
|
|
||||||
|
|
||||||
$result = $this->group->update($orig);
|
$result = $this->group->update($orig);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Settings for email
|
* Settings for email
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
|||||||
* Settings for email
|
* Settings for email
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see Widget
|
* @see Widget
|
||||||
*/
|
*/
|
||||||
@ -71,6 +71,12 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||||||
return _('Manage how you get email from %%site.name%%.');
|
return _('Manage how you get email from %%site.name%%.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('email');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content area of the page
|
* Content area of the page
|
||||||
*
|
*
|
||||||
@ -122,7 +128,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||||||
}
|
}
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
|
|
||||||
if ($user->email) {
|
if (common_config('emailpost', 'enabled') && $user->email) {
|
||||||
$this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
|
$this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
|
||||||
$this->element('legend',_('Incoming email'));
|
$this->element('legend',_('Incoming email'));
|
||||||
if ($user->incomingemail) {
|
if ($user->incomingemail) {
|
||||||
@ -173,11 +179,13 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||||||
_('Allow friends to nudge me and send me an email.'),
|
_('Allow friends to nudge me and send me an email.'),
|
||||||
$user->emailnotifynudge);
|
$user->emailnotifynudge);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
if (common_config('emailpost', 'enabled')) {
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->checkbox('emailpost',
|
$this->checkbox('emailpost',
|
||||||
_('I want to post notices by email.'),
|
_('I want to post notices by email.'),
|
||||||
$user->emailpost);
|
$user->emailpost);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
}
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->checkbox('emailmicroid',
|
$this->checkbox('emailmicroid',
|
||||||
_('Publish a MicroID for my email address.'),
|
_('Publish a MicroID for my email address.'),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/facebookaction.php';
|
require_once INSTALLDIR.'/lib/facebookaction.php';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/facebookaction.php');
|
require_once(INSTALLDIR.'/lib/facebookaction.php');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/facebookaction.php';
|
require_once INSTALLDIR.'/lib/facebookaction.php';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/facebookaction.php';
|
require_once INSTALLDIR.'/lib/facebookaction.php';
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ require_once INSTALLDIR.'/lib/disfavorform.php';
|
|||||||
* Favor class.
|
* Favor class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class FavorAction extends Action
|
class FavorAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of popular notices
|
* List of popular notices
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Public
|
* @category Public
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,11 +42,11 @@ require_once INSTALLDIR.'/lib/noticelist.php';
|
|||||||
* is measured by
|
* is measured by
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FavoritedAction extends Action
|
class FavoritedAction extends Action
|
||||||
@ -153,7 +153,8 @@ class FavoritedAction extends Action
|
|||||||
$message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
|
$message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
|
$message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and be the first to add a notice to your favorites!'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,12 +41,12 @@ require_once INSTALLDIR.'/lib/rssaction.php';
|
|||||||
* Formatting of RSS handled by Rss10Action
|
* Formatting of RSS handled by Rss10Action
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class FavoritesrssAction extends Rss10Action
|
class FavoritesrssAction extends Rss10Action
|
||||||
{
|
{
|
||||||
@ -111,8 +111,8 @@ class FavoritesrssAction extends Rss10Action
|
|||||||
'link' => common_local_url('showfavorites',
|
'link' => common_local_url('showfavorites',
|
||||||
array('nickname' =>
|
array('nickname' =>
|
||||||
$user->nickname)),
|
$user->nickname)),
|
||||||
'description' => sprintf(_('Feed of favorite notices of %s'),
|
'description' => sprintf(_('Updates favored by %1$s on %2$s!'),
|
||||||
$user->nickname));
|
$user->nickname, common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of featured users
|
* List of featured users
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Public
|
* @category Public
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
|||||||
* List of featured users
|
* List of featured users
|
||||||
*
|
*
|
||||||
* @category Public
|
* @category Public
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FeaturedAction extends Action
|
class FeaturedAction extends Action
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/actions/shownotice.php');
|
require_once(INSTALLDIR.'/actions/shownotice.php');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Complete adding an OpenID
|
* Complete adding an OpenID
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,10 +39,10 @@ require_once INSTALLDIR.'/lib/openid.php';
|
|||||||
* Handle the return from an OpenID verification
|
* Handle the return from an OpenID verification
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FinishaddopenidAction extends Action
|
class FinishaddopenidAction extends Action
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/openid.php');
|
require_once(INSTALLDIR.'/lib/openid.php');
|
||||||
|
|
||||||
@ -30,7 +30,9 @@ class FinishopenidloginAction extends Action
|
|||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
if (common_is_real_login()) {
|
if (!common_config('openid', 'enabled')) {
|
||||||
|
common_redirect(common_local_url('login'));
|
||||||
|
} else if (common_is_real_login()) {
|
||||||
$this->clientError(_('Already logged in.'));
|
$this->clientError(_('Already logged in.'));
|
||||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
$token = $this->trimmed('token');
|
$token = $this->trimmed('token');
|
||||||
@ -217,7 +219,7 @@ class FinishopenidloginAction extends Action
|
|||||||
|
|
||||||
if (!Validate::string($nickname, array('min_length' => 1,
|
if (!Validate::string($nickname, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
$this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
|
$this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -389,7 +391,7 @@ class FinishopenidloginAction extends Action
|
|||||||
{
|
{
|
||||||
if (!Validate::string($str, array('min_length' => 1,
|
if (!Validate::string($str, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!User::allowed_nickname($str)) {
|
if (!User::allowed_nickname($str)) {
|
||||||
@ -410,7 +412,7 @@ class FinishopenidloginAction extends Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# We try to use an OpenID URL as a legal Laconica user name in this order
|
# We try to use an OpenID URL as a legal StatusNet user name in this order
|
||||||
# 1. Plain hostname, like http://evanp.myopenid.com/
|
# 1. Plain hostname, like http://evanp.myopenid.com/
|
||||||
# 2. One element in path, like http://profile.typekey.com/EvanProdromou/
|
# 2. One element in path, like http://profile.typekey.com/EvanProdromou/
|
||||||
# or http://getopenid.com/evanprodromou
|
# or http://getopenid.com/evanprodromou
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/omb.php');
|
require_once(INSTALLDIR.'/lib/omb.php');
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ class FinishremotesubscribeAction extends Action
|
|||||||
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
|
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
|
||||||
$result = $fetcher->post($req->get_normalized_http_url(),
|
$result = $fetcher->post($req->get_normalized_http_url(),
|
||||||
$req->to_postdata(),
|
$req->to_postdata(),
|
||||||
array('User-Agent: Laconica/' . LACONICA_VERSION));
|
array('User-Agent: StatusNet/' . STATUSNET_VERSION));
|
||||||
|
|
||||||
common_debug('got result: "'.print_r($result,true).'"', __FILE__);
|
common_debug('got result: "'.print_r($result,true).'"', __FILE__);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
define('LISTENER', 1);
|
define('LISTENER', 1);
|
||||||
define('LISTENEE', -1);
|
define('LISTENEE', -1);
|
||||||
@ -146,8 +146,10 @@ class FoafAction extends Action
|
|||||||
while ($sub->fetch()) {
|
while ($sub->fetch()) {
|
||||||
if ($sub->token) {
|
if ($sub->token) {
|
||||||
$other = Remote_profile::staticGet('id', $sub->subscriber);
|
$other = Remote_profile::staticGet('id', $sub->subscriber);
|
||||||
|
$profile = Profile::staticGet('id', $sub->subscriber);
|
||||||
} else {
|
} else {
|
||||||
$other = User::staticGet('id', $sub->subscriber);
|
$other = User::staticGet('id', $sub->subscriber);
|
||||||
|
$profile = Profile::staticGet('id', $sub->subscriber);
|
||||||
}
|
}
|
||||||
if (!$other) {
|
if (!$other) {
|
||||||
common_debug('Got a bad subscription: '.print_r($sub,true));
|
common_debug('Got a bad subscription: '.print_r($sub,true));
|
||||||
@ -158,12 +160,15 @@ class FoafAction extends Action
|
|||||||
} else {
|
} else {
|
||||||
$person[$other->uri] = array(LISTENER,
|
$person[$other->uri] = array(LISTENER,
|
||||||
$other->id,
|
$other->id,
|
||||||
$other->nickname,
|
$profile->nickname,
|
||||||
(empty($sub->token)) ? 'User' : 'Remote_profile');
|
(empty($sub->token)) ? 'User' : 'Remote_profile');
|
||||||
}
|
}
|
||||||
$other->free();
|
$other->free();
|
||||||
$other = null;
|
$other = null;
|
||||||
unset($other);
|
unset($other);
|
||||||
|
$profile->free();
|
||||||
|
$profile = null;
|
||||||
|
unset($profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,8 +259,10 @@ class FoafAction extends Action
|
|||||||
while ($sub->fetch()) {
|
while ($sub->fetch()) {
|
||||||
if (!empty($sub->token)) {
|
if (!empty($sub->token)) {
|
||||||
$other = Remote_profile::staticGet('id', $sub->subscribed);
|
$other = Remote_profile::staticGet('id', $sub->subscribed);
|
||||||
|
$profile = Profile::staticGet('id', $sub->subscribed);
|
||||||
} else {
|
} else {
|
||||||
$other = User::staticGet('id', $sub->subscribed);
|
$other = User::staticGet('id', $sub->subscribed);
|
||||||
|
$profile = Profile::staticGet('id', $sub->subscribed);
|
||||||
}
|
}
|
||||||
if (empty($other)) {
|
if (empty($other)) {
|
||||||
common_debug('Got a bad subscription: '.print_r($sub,true));
|
common_debug('Got a bad subscription: '.print_r($sub,true));
|
||||||
@ -264,11 +271,14 @@ class FoafAction extends Action
|
|||||||
$this->element('sioc:follows', array('rdf:resource' => $other->uri.'#acct'));
|
$this->element('sioc:follows', array('rdf:resource' => $other->uri.'#acct'));
|
||||||
$person[$other->uri] = array(LISTENEE,
|
$person[$other->uri] = array(LISTENEE,
|
||||||
$other->id,
|
$other->id,
|
||||||
$other->nickname,
|
$profile->nickname,
|
||||||
(empty($sub->token)) ? 'User' : 'Remote_profile');
|
(empty($sub->token)) ? 'User' : 'Remote_profile');
|
||||||
$other->free();
|
$other->free();
|
||||||
$other = null;
|
$other = null;
|
||||||
unset($other);
|
unset($other);
|
||||||
|
$profile->free();
|
||||||
|
$profile = null;
|
||||||
|
unset($profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -27,7 +27,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ if (!defined('LACONICA')) {
|
|||||||
* Block a user from a group
|
* Block a user from a group
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupblockAction extends Action
|
class GroupblockAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Permalink for group
|
* Permalink for group
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,10 +42,10 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||||||
* an URL with the ID in it as the permanent identifier.
|
* an URL with the ID in it as the permanent identifier.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupbyidAction extends Action
|
class GroupbyidAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Change user password
|
* Change user password
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ require_once INSTALLDIR . '/lib/designsettings.php';
|
|||||||
* Saves a design for a given group
|
* Saves a design for a given group
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupDesignSettingsAction extends DesignSettingsAction
|
class GroupDesignSettingsAction extends DesignSettingsAction
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Upload an avatar
|
* Upload an avatar
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,12 +42,12 @@ define('MAX_ORIGINAL', 480);
|
|||||||
* We use jCrop plugin for jQuery to crop the image after upload.
|
* We use jCrop plugin for jQuery to crop the image after upload.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GrouplogoAction extends GroupDesignAction
|
class GrouplogoAction extends GroupDesignAction
|
||||||
@ -428,13 +428,7 @@ class GrouplogoAction extends GroupDesignAction
|
|||||||
function showStylesheets()
|
function showStylesheets()
|
||||||
{
|
{
|
||||||
parent::showStylesheets();
|
parent::showStylesheets();
|
||||||
$jcropStyle =
|
$this->cssLink('css/jquery.Jcrop.css','base','screen, projection, tv');
|
||||||
common_path('theme/base/css/jquery.Jcrop.css?version='.LACONICA_VERSION);
|
|
||||||
|
|
||||||
$this->element('link', array('rel' => 'stylesheet',
|
|
||||||
'type' => 'text/css',
|
|
||||||
'href' => $jcropStyle,
|
|
||||||
'media' => 'screen, projection, tv'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -448,14 +442,11 @@ class GrouplogoAction extends GroupDesignAction
|
|||||||
parent::showScripts();
|
parent::showScripts();
|
||||||
|
|
||||||
if ($this->mode == 'crop') {
|
if ($this->mode == 'crop') {
|
||||||
$jcropPack = common_path('js/jcrop/jquery.Jcrop.pack.js');
|
$this->script('js/jcrop/jquery.Jcrop.min.js');
|
||||||
$jcropGo = common_path('js/jcrop/jquery.Jcrop.go.js');
|
$this->script('js/jcrop/jquery.Jcrop.go.js');
|
||||||
|
|
||||||
$this->element('script', array('type' => 'text/javascript',
|
|
||||||
'src' => $jcropPack));
|
|
||||||
$this->element('script', array('type' => 'text/javascript',
|
|
||||||
'src' => $jcropGo));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->autofocus('avatarfile');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLocalNav()
|
function showLocalNav()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of group members
|
* List of group members
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
|||||||
* List of group members
|
* List of group members
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupmembersAction extends GroupDesignAction
|
class GroupmembersAction extends GroupDesignAction
|
||||||
@ -220,11 +220,11 @@ class GroupMemberListItem extends ProfileListItem
|
|||||||
* Form for blocking a user from a group
|
* Form for blocking a user from a group
|
||||||
*
|
*
|
||||||
* @category Form
|
* @category Form
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see BlockForm
|
* @see BlockForm
|
||||||
*/
|
*/
|
||||||
@ -348,11 +348,11 @@ class GroupBlockForm extends Form
|
|||||||
* Form for making a user an admin for a group
|
* Form for making a user an admin for a group
|
||||||
*
|
*
|
||||||
* @category Form
|
* @category Form
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MakeAdminForm extends Form
|
class MakeAdminForm extends Form
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Group main page
|
* Group main page
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ define('MEMBERS_PER_SECTION', 27);
|
|||||||
* Group RSS feed
|
* Group RSS feed
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class groupRssAction extends Rss10Action
|
class groupRssAction extends Rss10Action
|
||||||
@ -132,9 +132,10 @@ class groupRssAction extends Rss10Action
|
|||||||
$c = array('url' => common_local_url('grouprss',
|
$c = array('url' => common_local_url('grouprss',
|
||||||
array('nickname' =>
|
array('nickname' =>
|
||||||
$group->nickname)),
|
$group->nickname)),
|
||||||
'title' => $group->nickname,
|
'title' => sprintf(_('%s timeline'), $group->nickname),
|
||||||
'link' => common_local_url('showgroup', array('nickname' => $group->nickname)),
|
'link' => common_local_url('showgroup', array('nickname' => $group->nickname)),
|
||||||
'description' => sprintf(_('Microblog by %s group'), $group->nickname));
|
'description' => sprintf(_('Updates from members of %1$s on %2$s!'),
|
||||||
|
$group->nickname, common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Latest groups information
|
* Latest groups information
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ require_once INSTALLDIR.'/lib/grouplist.php';
|
|||||||
* Show the latest groups on the site
|
* Show the latest groups on the site
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupsAction extends Action
|
class GroupsAction extends Action
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Group search action class.
|
* Group search action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class GroupsearchAction extends SearchAction
|
class GroupsearchAction extends SearchAction
|
||||||
{
|
{
|
||||||
@ -82,7 +82,8 @@ class GroupsearchAction extends SearchAction
|
|||||||
$message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
|
$message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
|
$message = sprintf(_('Why not [register an account](%%%%action.%s%%%%) and [create the group](%%%%action.newgroup%%%%) yourself!'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
}
|
}
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
$this->raw(common_markup_to_html($message));
|
$this->raw(common_markup_to_html($message));
|
||||||
@ -90,6 +91,12 @@ class GroupsearchAction extends SearchAction
|
|||||||
$user_group->free();
|
$user_group->free();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('q');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GroupSearchResults extends GroupList
|
class GroupSearchResults extends GroupList
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -27,7 +27,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ if (!defined('LACONICA')) {
|
|||||||
* Unlock a user from a group
|
* Unlock a user from a group
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupunblockAction extends Action
|
class GroupunblockAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Settings for Jabber/XMPP integration
|
* Settings for Jabber/XMPP integration
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ require_once INSTALLDIR.'/lib/jabber.php';
|
|||||||
* Settings for Jabber/XMPP integration
|
* Settings for Jabber/XMPP integration
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see SettingsAction
|
* @see SettingsAction
|
||||||
*/
|
*/
|
||||||
@ -84,6 +84,12 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
|
if (!common_config('xmpp', 'enabled')) {
|
||||||
|
$this->element('div', array('class' => 'error'),
|
||||||
|
_('IM is not available.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$this->elementStart('form', array('method' => 'post',
|
$this->elementStart('form', array('method' => 'post',
|
||||||
'id' => 'form_settings_im',
|
'id' => 'form_settings_im',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* action handler for message inbox
|
* action handler for message inbox
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Message
|
* @category Message
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008 Control Yourself, Inc.
|
* @copyright 2008 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ require_once INSTALLDIR.'/lib/mailbox.php';
|
|||||||
* action handler for message inbox
|
* action handler for message inbox
|
||||||
*
|
*
|
||||||
* @category Message
|
* @category Message
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
* @see MailboxAction
|
* @see MailboxAction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class InviteAction extends CurrentUserDesignAction
|
class InviteAction extends CurrentUserDesignAction
|
||||||
{
|
{
|
||||||
@ -98,6 +98,12 @@ class InviteAction extends CurrentUserDesignAction
|
|||||||
$this->showPage();
|
$this->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('addresses');
|
||||||
|
}
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if ($this->mode == 'sent') {
|
if ($this->mode == 'sent') {
|
||||||
@ -216,7 +222,7 @@ class InviteAction extends CurrentUserDesignAction
|
|||||||
$recipients = array($email);
|
$recipients = array($email);
|
||||||
|
|
||||||
$headers['From'] = mail_notify_from();
|
$headers['From'] = mail_notify_from();
|
||||||
$headers['To'] = $email;
|
$headers['To'] = trim($email);
|
||||||
$headers['Subject'] = sprintf(_('%1$s has invited you to join them on %2$s'), $bestname, $sitename);
|
$headers['Subject'] = sprintf(_('%1$s has invited you to join them on %2$s'), $bestname, $sitename);
|
||||||
|
|
||||||
$body = sprintf(_("%1\$s has invited you to join them on %2\$s (%3\$s).\n\n".
|
$body = sprintf(_("%1\$s has invited you to join them on %2\$s (%3\$s).\n\n".
|
||||||
@ -235,7 +241,7 @@ class InviteAction extends CurrentUserDesignAction
|
|||||||
common_root_url(),
|
common_root_url(),
|
||||||
$personal,
|
$personal,
|
||||||
common_local_url('showstream', array('nickname' => $user->nickname)),
|
common_local_url('showstream', array('nickname' => $user->nickname)),
|
||||||
common_local_url('register', array('code' => $invite->code)));
|
common_local_url((!common_config('site', 'openidonly')) ? 'register' : 'openidlogin', array('code' => $invite->code)));
|
||||||
|
|
||||||
mail_send($recipients, $headers, $body);
|
mail_send($recipients, $headers, $body);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Join a group
|
* Join a group
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ if (!defined('LACONICA')) {
|
|||||||
* for users.
|
* for users.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class JoingroupAction extends Action
|
class JoingroupAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Leave a group
|
* Leave a group
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ if (!defined('LACONICA')) {
|
|||||||
* for users.
|
* for users.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LeavegroupAction extends Action
|
class LeavegroupAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Login form
|
* Login form
|
||||||
*
|
*
|
||||||
@ -20,14 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Login
|
* @category Login
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +36,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Login form
|
* Login form
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LoginAction extends Action
|
class LoginAction extends Action
|
||||||
@ -65,6 +67,8 @@ class LoginAction extends Action
|
|||||||
*
|
*
|
||||||
* Switches on request method; either shows the form or handles its input.
|
* Switches on request method; either shows the form or handles its input.
|
||||||
*
|
*
|
||||||
|
* Checks if only OpenID is allowed and redirects to openidlogin if so.
|
||||||
|
*
|
||||||
* @param array $args $_REQUEST data
|
* @param array $args $_REQUEST data
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
@ -73,7 +77,9 @@ class LoginAction extends Action
|
|||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
if (common_is_real_login()) {
|
if (common_config('site', 'openidonly')) {
|
||||||
|
common_redirect(common_local_url('openidlogin'));
|
||||||
|
} else if (common_is_real_login()) {
|
||||||
$this->clientError(_('Already logged in.'));
|
$this->clientError(_('Already logged in.'));
|
||||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
$this->checkLogin();
|
$this->checkLogin();
|
||||||
@ -158,6 +164,12 @@ class LoginAction extends Action
|
|||||||
$this->showPage();
|
$this->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('nickname');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title of the page
|
* Title of the page
|
||||||
*
|
*
|
||||||
@ -247,11 +259,15 @@ class LoginAction extends Action
|
|||||||
return _('For security reasons, please re-enter your ' .
|
return _('For security reasons, please re-enter your ' .
|
||||||
'user name and password ' .
|
'user name and password ' .
|
||||||
'before changing your settings.');
|
'before changing your settings.');
|
||||||
} else {
|
} else if (common_config('openid', 'enabled')) {
|
||||||
return _('Login with your username and password. ' .
|
return _('Login with your username and password. ' .
|
||||||
'Don\'t have a username yet? ' .
|
'Don\'t have a username yet? ' .
|
||||||
'[Register](%%action.register%%) a new account, or ' .
|
'[Register](%%action.register%%) a new account, or ' .
|
||||||
'try [OpenID](%%action.openidlogin%%). ');
|
'try [OpenID](%%action.openidlogin%%). ');
|
||||||
|
} else {
|
||||||
|
return _('Login with your username and password. ' .
|
||||||
|
'Don\'t have a username yet? ' .
|
||||||
|
'[Register](%%action.register%%) a new account.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/openid.php';
|
|||||||
* Logout action class.
|
* Logout action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class LogoutAction extends Action
|
class LogoutAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -27,7 +27,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ if (!defined('LACONICA')) {
|
|||||||
* Make another user an admin of a group
|
* Make another user an admin of a group
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MakeadminAction extends Action
|
class MakeadminAction extends Action
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,11 +36,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Microsummary action class.
|
* Microsummary action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class MicrosummaryAction extends Action
|
class MicrosummaryAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Add a new group
|
* Add a new group
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ if (!defined('LACONICA')) {
|
|||||||
* This is the form for adding a new group
|
* This is the form for adding a new group
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class NewgroupAction extends Action
|
class NewgroupAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Handler for posting new messages
|
* Handler for posting new messages
|
||||||
*
|
*
|
||||||
@ -20,16 +20,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,12 +37,12 @@ if (!defined('LACONICA')) {
|
|||||||
* Action for posting new direct messages
|
* Action for posting new direct messages
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class NewmessageAction extends Action
|
class NewmessageAction extends Action
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Handler for posting new notices
|
* Handler for posting new notices
|
||||||
*
|
*
|
||||||
@ -20,16 +20,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,12 +39,12 @@ require_once INSTALLDIR.'/lib/noticelist.php';
|
|||||||
* Action for posting new notices
|
* Action for posting new notices
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class NewnoticeAction extends Action
|
class NewnoticeAction extends Action
|
||||||
@ -431,13 +431,14 @@ class NewnoticeAction extends Action
|
|||||||
$content = $this->trimmed('status_textarea');
|
$content = $this->trimmed('status_textarea');
|
||||||
if (!$content) {
|
if (!$content) {
|
||||||
$replyto = $this->trimmed('replyto');
|
$replyto = $this->trimmed('replyto');
|
||||||
|
$inreplyto = $this->trimmed('inreplyto');
|
||||||
$profile = Profile::staticGet('nickname', $replyto);
|
$profile = Profile::staticGet('nickname', $replyto);
|
||||||
if ($profile) {
|
if ($profile) {
|
||||||
$content = '@' . $profile->nickname . ' ';
|
$content = '@' . $profile->nickname . ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$notice_form = new NoticeForm($this, '', $content);
|
$notice_form = new NoticeForm($this, '', $content, null, $inreplyto);
|
||||||
$notice_form->show();
|
$notice_form->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/searchaction.php';
|
|||||||
* Notice search action class.
|
* Notice search action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
* @todo common parent for people and content search?
|
* @todo common parent for people and content search?
|
||||||
*/
|
*/
|
||||||
class NoticesearchAction extends SearchAction
|
class NoticesearchAction extends SearchAction
|
||||||
@ -121,7 +121,9 @@ class NoticesearchAction extends SearchAction
|
|||||||
$message = sprintf(_('Be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
|
$message = sprintf(_('Be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = sprintf(_('Why not [register an account](%%%%action.register%%%%) and be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
|
$message = sprintf(_('Why not [register an account](%%%%action.%s%%%%) and be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin',
|
||||||
|
urlencode($q));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
@ -135,6 +137,12 @@ class NoticesearchAction extends SearchAction
|
|||||||
$this->pagination($page > 1, $cnt > NOTICES_PER_PAGE,
|
$this->pagination($page > 1, $cnt > NOTICES_PER_PAGE,
|
||||||
$page, 'noticesearch', array('q' => $q));
|
$page, 'noticesearch', array('q' => $q));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('q');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchNoticeList extends NoticeList {
|
class SearchNoticeList extends NoticeList {
|
||||||
@ -190,7 +198,7 @@ class SearchNoticeListItem extends NoticeListItem {
|
|||||||
$result = preg_replace($pattern, '<strong>\\1</strong>', $text);
|
$result = preg_replace($pattern, '<strong>\\1</strong>', $text);
|
||||||
|
|
||||||
/* Remove highlighting from inside links, loop incase multiple highlights in links */
|
/* Remove highlighting from inside links, loop incase multiple highlights in links */
|
||||||
$pattern = '/(href="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
|
$pattern = '/(\w+="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
|
||||||
do {
|
do {
|
||||||
$result = preg_replace($pattern, '\\1\\2\\3', $result, -1, $count);
|
$result = preg_replace($pattern, '\\1\\2\\3', $result, -1, $count);
|
||||||
} while ($count);
|
} while ($count);
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ require_once INSTALLDIR.'/lib/rssaction.php';
|
|||||||
* Formatting of RSS handled by Rss10Action
|
* Formatting of RSS handled by Rss10Action
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class NoticesearchrssAction extends Rss10Action
|
class NoticesearchrssAction extends Rss10Action
|
||||||
{
|
{
|
||||||
@ -86,9 +86,10 @@ class NoticesearchrssAction extends Rss10Action
|
|||||||
{
|
{
|
||||||
$q = $this->trimmed('q');
|
$q = $this->trimmed('q');
|
||||||
$c = array('url' => common_local_url('noticesearchrss', array('q' => $q)),
|
$c = array('url' => common_local_url('noticesearchrss', array('q' => $q)),
|
||||||
'title' => common_config('site', 'name') . sprintf(_(' Search Stream for "%s"'), $q),
|
'title' => sprintf(_('Updates with "%s"'), $q),
|
||||||
'link' => common_local_url('noticesearch', array('q' => $q)),
|
'link' => common_local_url('noticesearch', array('q' => $q)),
|
||||||
'description' => sprintf(_('All updates matching search term "%s"'), $q));
|
'description' => sprintf(_('Updates matching search term "%1$s" on %2$s!'),
|
||||||
|
$q, common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,12 +39,12 @@ require_once INSTALLDIR.'/lib/mail.php';
|
|||||||
* Nudge a user action class.
|
* Nudge a user action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class NudgeAction extends Action
|
class NudgeAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Laconica-only extensions to the Twitter-like API
|
* StatusNet-only extensions to the Twitter-like API
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
@ -20,43 +20,37 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Twitter
|
* @category Twitter
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008 Control Yourself, Inc.
|
* @copyright 2008 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/twitterapi.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Oembed provider implementation
|
* Oembed provider implementation
|
||||||
*
|
*
|
||||||
* This class handles all /main/oembed(.xml|.json)/ requests.
|
* This class handles all /main/oembed(.xml|.json)/ requests.
|
||||||
*
|
*
|
||||||
* @category oEmbed
|
* @category oEmbed
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Craig Andrews <candrews@integralblue.com>
|
* @author Craig Andrews <candrews@integralblue.com>
|
||||||
* @copyright 2008 Control Yourself, Inc.
|
* @copyright 2008 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class TwitapioembedAction extends TwitterapiAction
|
class OembedAction extends Action
|
||||||
{
|
{
|
||||||
|
|
||||||
function oembed($args, $apidata)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
|
||||||
|
|
||||||
common_debug("in oembed api action");
|
common_debug("in oembed api action");
|
||||||
|
|
||||||
$this->auth_user = $apidata['user'];
|
|
||||||
|
|
||||||
$url = $args['url'];
|
$url = $args['url'];
|
||||||
if( substr(strtolower($url),0,strlen(common_root_url())) == strtolower(common_root_url()) ){
|
if( substr(strtolower($url),0,strlen(common_root_url())) == strtolower(common_root_url()) ){
|
||||||
$path = substr($url,strlen(common_root_url()));
|
$path = substr($url,strlen(common_root_url()));
|
||||||
@ -131,8 +125,7 @@ class TwitapioembedAction extends TwitterapiAction
|
|||||||
default:
|
default:
|
||||||
$this->serverError(_("$path not supported for oembed requests"), 501);
|
$this->serverError(_("$path not supported for oembed requests"), 501);
|
||||||
}
|
}
|
||||||
|
switch($args['format']){
|
||||||
switch($apidata['content-type']){
|
|
||||||
case 'xml':
|
case 'xml':
|
||||||
$this->init_document('xml');
|
$this->init_document('xml');
|
||||||
$this->elementStart('oembed');
|
$this->elementStart('oembed');
|
||||||
@ -152,11 +145,10 @@ class TwitapioembedAction extends TwitterapiAction
|
|||||||
if($oembed['thumbnail_width']) $this->element('thumbnail_width',null,$oembed['thumbnail_width']);
|
if($oembed['thumbnail_width']) $this->element('thumbnail_width',null,$oembed['thumbnail_width']);
|
||||||
if($oembed['thumbnail_height']) $this->element('thumbnail_height',null,$oembed['thumbnail_height']);
|
if($oembed['thumbnail_height']) $this->element('thumbnail_height',null,$oembed['thumbnail_height']);
|
||||||
|
|
||||||
|
|
||||||
$this->elementEnd('oembed');
|
$this->elementEnd('oembed');
|
||||||
$this->end_document('xml');
|
$this->end_document('xml');
|
||||||
break;
|
break;
|
||||||
case 'json':
|
case 'json': case '':
|
||||||
$this->init_document('json');
|
$this->init_document('json');
|
||||||
print(json_encode($oembed));
|
print(json_encode($oembed));
|
||||||
$this->end_document('json');
|
$this->end_document('json');
|
||||||
@ -164,10 +156,51 @@ class TwitapioembedAction extends TwitterapiAction
|
|||||||
default:
|
default:
|
||||||
$this->serverError(_('content type ' . $apidata['content-type'] . ' not supported'), 501);
|
$this->serverError(_('content type ' . $apidata['content-type'] . ' not supported'), 501);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$this->serverError(_('Only ' . common_root_url() . ' urls over plain http please'), 404);
|
$this->serverError(_('Only ' . common_root_url() . ' urls over plain http please'), 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function init_document($type)
|
||||||
|
{
|
||||||
|
switch ($type) {
|
||||||
|
case 'xml':
|
||||||
|
header('Content-Type: application/xml; charset=utf-8');
|
||||||
|
$this->startXML();
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
|
||||||
|
// Check for JSONP callback
|
||||||
|
$callback = $this->arg('callback');
|
||||||
|
if ($callback) {
|
||||||
|
print $callback . '(';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->serverError(_('Not a supported data format.'), 501);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function end_document($type='xml')
|
||||||
|
{
|
||||||
|
switch ($type) {
|
||||||
|
case 'xml':
|
||||||
|
$this->endXML();
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
// Check for JSONP callback
|
||||||
|
$callback = $this->arg('callback');
|
||||||
|
if ($callback) {
|
||||||
|
print ')';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->serverError(_('Not a supported data format.'), 501);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/openid.php');
|
require_once(INSTALLDIR.'/lib/openid.php');
|
||||||
|
|
||||||
@ -26,7 +26,9 @@ class OpenidloginAction extends Action
|
|||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
if (common_is_real_login()) {
|
if (!common_config('openid', 'enabled')) {
|
||||||
|
common_redirect(common_local_url('login'));
|
||||||
|
} else if (common_is_real_login()) {
|
||||||
$this->clientError(_('Already logged in.'));
|
$this->clientError(_('Already logged in.'));
|
||||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
$openid_url = $this->trimmed('openid_url');
|
$openid_url = $this->trimmed('openid_url');
|
||||||
@ -84,6 +86,12 @@ class OpenidloginAction extends Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('openid_url');
|
||||||
|
}
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('OpenID Login');
|
return _('OpenID Login');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Settings for OpenID
|
* Settings for OpenID
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ require_once INSTALLDIR.'/lib/openid.php';
|
|||||||
* Lets users add, edit and delete OpenIDs from their account
|
* Lets users add, edit and delete OpenIDs from their account
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class OpenidsettingsAction extends AccountSettingsAction
|
class OpenidsettingsAction extends AccountSettingsAction
|
||||||
@ -72,6 +72,12 @@ class OpenidsettingsAction extends AccountSettingsAction
|
|||||||
' Manage your associated OpenIDs from here.');
|
' Manage your associated OpenIDs from here.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('openid_url');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the form for OpenID management
|
* Show the form for OpenID management
|
||||||
*
|
*
|
||||||
@ -82,6 +88,12 @@ class OpenidsettingsAction extends AccountSettingsAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
|
if (!common_config('openid', 'enabled')) {
|
||||||
|
$this->element('div', array('class' => 'error'),
|
||||||
|
_('OpenID is not available.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
$this->elementStart('form', array('method' => 'post',
|
$this->elementStart('form', array('method' => 'post',
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ if (!defined('LACONICA')) {
|
|||||||
* Formatting of RSS handled by Rss10Action
|
* Formatting of RSS handled by Rss10Action
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class OpensearchAction extends Action
|
class OpensearchAction extends Action
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ class OpensearchAction extends Action
|
|||||||
$type = 'noticesearch';
|
$type = 'noticesearch';
|
||||||
$short_name = _('Notice Search');
|
$short_name = _('Notice Search');
|
||||||
}
|
}
|
||||||
header('Content-Type: text/html');
|
header('Content-Type: application/opensearchdescription+xml');
|
||||||
$this->startXML();
|
$this->startXML();
|
||||||
$this->elementStart('OpenSearchDescription', array('xmlns' => 'http://a9.com/-/spec/opensearch/1.1/'));
|
$this->elementStart('OpenSearchDescription', array('xmlns' => 'http://a9.com/-/spec/opensearch/1.1/'));
|
||||||
$short_name = common_config('site', 'name').' '.$short_name;
|
$short_name = common_config('site', 'name').' '.$short_name;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Miscellaneous settings
|
* Miscellaneous settings
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
|||||||
* Currently this just manages URL shortening.
|
* Currently this just manages URL shortening.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class OthersettingsAction extends AccountSettingsAction
|
class OthersettingsAction extends AccountSettingsAction
|
||||||
@ -71,6 +71,12 @@ class OthersettingsAction extends AccountSettingsAction
|
|||||||
return _('Manage various other options.');
|
return _('Manage various other options.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('urlshorteningservice');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content area of the page
|
* Content area of the page
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* action handler for message inbox
|
* action handler for message inbox
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Message
|
* @category Message
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008 Control Yourself, Inc.
|
* @copyright 2008 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ require_once INSTALLDIR.'/lib/mailbox.php';
|
|||||||
* action handler for message outbox
|
* action handler for message outbox
|
||||||
*
|
*
|
||||||
* @category Message
|
* @category Message
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
* @see MailboxAction
|
* @see MailboxAction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Change user password
|
* Change user password
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
|||||||
* Change password
|
* Change password
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PasswordsettingsAction extends AccountSettingsAction
|
class PasswordsettingsAction extends AccountSettingsAction
|
||||||
@ -69,6 +69,12 @@ class PasswordsettingsAction extends AccountSettingsAction
|
|||||||
return _('Change your password.');
|
return _('Change your password.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('oldpassword');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content area of the page
|
* Content area of the page
|
||||||
*
|
*
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/profilelist.php';
|
|||||||
* People search action class.
|
* People search action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class PeoplesearchAction extends SearchAction
|
class PeoplesearchAction extends SearchAction
|
||||||
{
|
{
|
||||||
@ -85,6 +85,12 @@ class PeoplesearchAction extends SearchAction
|
|||||||
$profile->free();
|
$profile->free();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('q');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,11 +99,11 @@ class PeoplesearchAction extends SearchAction
|
|||||||
* Derivative of ProfileList with specialization for highlighting search terms.
|
* Derivative of ProfileList with specialization for highlighting search terms.
|
||||||
*
|
*
|
||||||
* @category Widget
|
* @category Widget
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see PeoplesearchAction
|
* @see PeoplesearchAction
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Action for showing profiles self-tagged with a given tag
|
* Action for showing profiles self-tagged with a given tag
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2009 Control Yourself, Inc.
|
* @copyright 2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/profilelist.php';
|
|||||||
* This class outputs a paginated list of profiles self-tagged with a given tag
|
* This class outputs a paginated list of profiles self-tagged with a given tag
|
||||||
*
|
*
|
||||||
* @category Output
|
* @category Output
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see Action
|
* @see Action
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/omb.php');
|
require_once(INSTALLDIR.'/lib/omb.php');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Change profile settings
|
* Change profile settings
|
||||||
*
|
*
|
||||||
@ -20,15 +20,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,11 +39,12 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
|||||||
* Change profile settings
|
* Change profile settings
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ProfilesettingsAction extends AccountSettingsAction
|
class ProfilesettingsAction extends AccountSettingsAction
|
||||||
@ -70,6 +72,12 @@ class ProfilesettingsAction extends AccountSettingsAction
|
|||||||
'so people know more about you.');
|
'so people know more about you.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('nickname');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content area of the page
|
* Content area of the page
|
||||||
*
|
*
|
||||||
@ -189,7 +197,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
|||||||
// Some validation
|
// Some validation
|
||||||
if (!Validate::string($nickname, array('min_length' => 1,
|
if (!Validate::string($nickname, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
$this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
|
$this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
|
||||||
return;
|
return;
|
||||||
} else if (!User::allowed_nickname($nickname)) {
|
} else if (!User::allowed_nickname($nickname)) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Action for displaying the public stream
|
* Action for displaying the public stream
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Public
|
* @category Public
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ define('MAX_PUBLIC_PAGE', 100);
|
|||||||
* Action for displaying the public stream
|
* Action for displaying the public stream
|
||||||
*
|
*
|
||||||
* @category Public
|
* @category Public
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see PublicrssAction
|
* @see PublicrssAction
|
||||||
* @see PublicxrdsAction
|
* @see PublicxrdsAction
|
||||||
@ -59,6 +59,7 @@ class PublicAction extends Action
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var $page = null;
|
var $page = null;
|
||||||
|
var $notice;
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
@ -84,6 +85,18 @@ class PublicAction extends Action
|
|||||||
|
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
|
||||||
|
$this->notice = Notice::publicStream(($this->page-1)*NOTICES_PER_PAGE,
|
||||||
|
NOTICES_PER_PAGE + 1);
|
||||||
|
|
||||||
|
if (!$this->notice) {
|
||||||
|
$this->serverError(_('Could not retrieve public stream.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
|
$this->serverError(_('No such page'),$code=404);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +196,8 @@ class PublicAction extends Action
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
|
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
|
||||||
$message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
|
$message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and be the first to post!'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,15 +217,7 @@ class PublicAction extends Action
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$notice = Notice::publicStream(($this->page-1)*NOTICES_PER_PAGE,
|
$nl = new NoticeList($this->notice, $this);
|
||||||
NOTICES_PER_PAGE + 1);
|
|
||||||
|
|
||||||
if (!$notice) {
|
|
||||||
$this->serverError(_('Could not retrieve public stream.'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$nl = new NoticeList($notice, $this);
|
|
||||||
|
|
||||||
$cnt = $nl->show();
|
$cnt = $nl->show();
|
||||||
|
|
||||||
@ -229,7 +235,7 @@ class PublicAction extends Action
|
|||||||
// $top->show();
|
// $top->show();
|
||||||
$pop = new PopularNoticeSection($this);
|
$pop = new PopularNoticeSection($this);
|
||||||
$pop->show();
|
$pop->show();
|
||||||
$gbp = new GroupsByPostsSection($this);
|
$gbp = new GroupsByMembersSection($this);
|
||||||
$gbp->show();
|
$gbp->show();
|
||||||
$feat = new FeaturedUsersSection($this);
|
$feat = new FeaturedUsersSection($this);
|
||||||
$feat->show();
|
$feat->show();
|
||||||
@ -238,12 +244,14 @@ class PublicAction extends Action
|
|||||||
function showAnonymousMessage()
|
function showAnonymousMessage()
|
||||||
{
|
{
|
||||||
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
|
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
|
||||||
$m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('This is %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
|
'based on the Free Software [StatusNet](http://status.net/) tool. ' .
|
||||||
'[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))');
|
'[Join now](%%%%action.%s%%%%) to share notices about yourself with friends, family, and colleagues! ' .
|
||||||
|
'([Read more](%%%%doc.help%%%%))'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
} else {
|
} else {
|
||||||
$m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [Laconica](http://laconi.ca/) tool.');
|
'based on the Free Software [StatusNet](http://status.net/) tool.');
|
||||||
}
|
}
|
||||||
$this->elementStart('div', array('id' => 'anon_notice'));
|
$this->elementStart('div', array('id' => 'anon_notice'));
|
||||||
$this->raw(common_markup_to_html($m));
|
$this->raw(common_markup_to_html($m));
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,11 +41,11 @@ require_once INSTALLDIR.'/lib/rssaction.php';
|
|||||||
* Formatting of RSS handled by Rss10Action
|
* Formatting of RSS handled by Rss10Action
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class PublicrssAction extends Rss10Action
|
class PublicrssAction extends Rss10Action
|
||||||
{
|
{
|
||||||
@ -86,9 +86,9 @@ class PublicrssAction extends Rss10Action
|
|||||||
{
|
{
|
||||||
$c = array(
|
$c = array(
|
||||||
'url' => common_local_url('publicrss')
|
'url' => common_local_url('publicrss')
|
||||||
, 'title' => sprintf(_('%s Public Stream'), common_config('site', 'name'))
|
, 'title' => sprintf(_('%s public timeline'), common_config('site', 'name'))
|
||||||
, 'link' => common_local_url('public')
|
, 'link' => common_local_url('public')
|
||||||
, 'description' => sprintf(_('All updates for %s'), common_config('site', 'name')));
|
, 'description' => sprintf(_('%s updates from everyone!'), common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Public tag cloud for notices
|
* Public tag cloud for notices
|
||||||
*
|
*
|
||||||
@ -20,16 +20,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Public
|
* @category Public
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Mike Cochrane <mikec@mikenz.geek.nz>
|
* @author Mike Cochrane <mikec@mikenz.geek.nz>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008 Mike Cochrane
|
* @copyright 2008 Mike Cochrane
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
define('TAGS_PER_PAGE', 100);
|
define('TAGS_PER_PAGE', 100);
|
||||||
|
|
||||||
@ -37,12 +37,12 @@ define('TAGS_PER_PAGE', 100);
|
|||||||
* Public tag cloud for notices
|
* Public tag cloud for notices
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Mike Cochrane <mikec@mikenz.geek.nz>
|
* @author Mike Cochrane <mikec@mikenz.geek.nz>
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008 Mike Cochrane
|
* @copyright 2008 Mike Cochrane
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PublictagcloudAction extends Action
|
class PublictagcloudAction extends Action
|
||||||
@ -72,7 +72,8 @@ class PublictagcloudAction extends Action
|
|||||||
$message .= _('Be the first to post one!');
|
$message .= _('Be the first to post one!');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message .= _('Why not [register an account](%%action.register%%) and be the first to post one!');
|
$message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and be the first to post one!'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/openid.php';
|
|||||||
* Public XRDS for OpenID
|
* Public XRDS for OpenID
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @todo factor out similarities with XrdsAction
|
* @todo factor out similarities with XrdsAction
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
# You have 24 hours to claim your password
|
# You have 24 hours to claim your password
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Register a new user account
|
* Register a new user account
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Login
|
* @category Login
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ if (!defined('LACONICA')) {
|
|||||||
* An action for registering a new user account
|
* An action for registering a new user account
|
||||||
*
|
*
|
||||||
* @category Login
|
* @category Login
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RegisterAction extends Action
|
class RegisterAction extends Action
|
||||||
@ -116,6 +116,8 @@ class RegisterAction extends Action
|
|||||||
*
|
*
|
||||||
* Checks if registration is closed and shows an error if so.
|
* Checks if registration is closed and shows an error if so.
|
||||||
*
|
*
|
||||||
|
* Checks if only OpenID is allowed and redirects to openidlogin if so.
|
||||||
|
*
|
||||||
* @param array $args $_REQUEST data
|
* @param array $args $_REQUEST data
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
@ -127,6 +129,8 @@ class RegisterAction extends Action
|
|||||||
|
|
||||||
if (common_config('site', 'closed')) {
|
if (common_config('site', 'closed')) {
|
||||||
$this->clientError(_('Registration not allowed.'));
|
$this->clientError(_('Registration not allowed.'));
|
||||||
|
} else if (common_config('site', 'openidonly')) {
|
||||||
|
common_redirect(common_local_url('openidlogin'));
|
||||||
} else if (common_logged_in()) {
|
} else if (common_logged_in()) {
|
||||||
$this->clientError(_('Already logged in.'));
|
$this->clientError(_('Already logged in.'));
|
||||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
@ -136,6 +140,12 @@ class RegisterAction extends Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('nickname');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to register a user
|
* Try to register a user
|
||||||
*
|
*
|
||||||
@ -325,6 +335,7 @@ class RegisterAction extends Action
|
|||||||
} else if ($this->error) {
|
} else if ($this->error) {
|
||||||
$this->element('p', 'error', $this->error);
|
$this->element('p', 'error', $this->error);
|
||||||
} else {
|
} else {
|
||||||
|
if (common_config('openid', 'enabled')) {
|
||||||
$instr =
|
$instr =
|
||||||
common_markup_to_html(_('With this form you can create '.
|
common_markup_to_html(_('With this form you can create '.
|
||||||
' a new account. ' .
|
' a new account. ' .
|
||||||
@ -333,6 +344,13 @@ class RegisterAction extends Action
|
|||||||
'(Have an [OpenID](http://openid.net/)? ' .
|
'(Have an [OpenID](http://openid.net/)? ' .
|
||||||
'Try our [OpenID registration]'.
|
'Try our [OpenID registration]'.
|
||||||
'(%%action.openidlogin%%)!)'));
|
'(%%action.openidlogin%%)!)'));
|
||||||
|
} else {
|
||||||
|
$instr =
|
||||||
|
common_markup_to_html(_('With this form you can create '.
|
||||||
|
' a new account. ' .
|
||||||
|
'You can then post notices and '.
|
||||||
|
'link up to friends and colleagues.'));
|
||||||
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'instructions');
|
$this->elementStart('div', 'instructions');
|
||||||
$this->raw($instr);
|
$this->raw($instr);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/omb.php');
|
require_once(INSTALLDIR.'/lib/omb.php');
|
||||||
|
|
||||||
@ -71,11 +71,13 @@ class RemotesubscribeAction extends Action
|
|||||||
if ($this->err) {
|
if ($this->err) {
|
||||||
$this->element('div', 'error', $this->err);
|
$this->element('div', 'error', $this->err);
|
||||||
} else {
|
} else {
|
||||||
$inst = _('To subscribe, you can [login](%%action.login%%),' .
|
$inst = sprintf(_('To subscribe, you can [login](%%%%action.%s%%%%),' .
|
||||||
' or [register](%%action.register%%) a new ' .
|
' or [register](%%%%action.%s%%%%) a new ' .
|
||||||
' account. If you already have an account ' .
|
' account. If you already have an account ' .
|
||||||
' on a [compatible microblogging site](%%doc.openmublog%%), ' .
|
' on a [compatible microblogging site](%%doc.openmublog%%), ' .
|
||||||
' enter your profile URL below.');
|
' enter your profile URL below.'),
|
||||||
|
(!common_config('site','openidonly')) ? 'login' : 'openidlogin',
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
$output = common_markup_to_html($inst);
|
$output = common_markup_to_html($inst);
|
||||||
$this->elementStart('div', 'instructions');
|
$this->elementStart('div', 'instructions');
|
||||||
$this->raw($output);
|
$this->raw($output);
|
||||||
@ -321,7 +323,7 @@ class RemotesubscribeAction extends Action
|
|||||||
|
|
||||||
$result = $fetcher->post($req->get_normalized_http_url(),
|
$result = $fetcher->post($req->get_normalized_http_url(),
|
||||||
$req->to_postdata(),
|
$req->to_postdata(),
|
||||||
array('User-Agent: Laconica/' . LACONICA_VERSION));
|
array('User-Agent: StatusNet/' . STATUSNET_VERSION));
|
||||||
if ($result->status != 200) {
|
if ($result->status != 200) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of replies
|
* List of replies
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,15 +39,16 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||||||
* List of replies
|
* List of replies
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RepliesAction extends OwnerDesignAction
|
class RepliesAction extends OwnerDesignAction
|
||||||
{
|
{
|
||||||
var $page = null;
|
var $page = null;
|
||||||
|
var $notice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare the object
|
* Prepare the object
|
||||||
@ -84,6 +85,13 @@ class RepliesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
|
||||||
|
$this->notice = $this->user->getReplies(($this->page-1) * NOTICES_PER_PAGE,
|
||||||
|
NOTICES_PER_PAGE + 1);
|
||||||
|
|
||||||
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
|
$this->serverError(_('No such page'),$code=404);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,10 +167,7 @@ class RepliesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$notice = $this->user->getReplies(($this->page-1) * NOTICES_PER_PAGE,
|
$nl = new NoticeList($this->notice, $this);
|
||||||
NOTICES_PER_PAGE + 1);
|
|
||||||
|
|
||||||
$nl = new NoticeList($notice, $this);
|
|
||||||
|
|
||||||
$cnt = $nl->show();
|
$cnt = $nl->show();
|
||||||
if (0 === $cnt) {
|
if (0 === $cnt) {
|
||||||
@ -187,7 +192,9 @@ class RepliesAction extends OwnerDesignAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
|
$message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and then nudge %s or post a notice to his or her attention.'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin',
|
||||||
|
$this->user->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/rssaction.php');
|
require_once(INSTALLDIR.'/lib/rssaction.php');
|
||||||
|
|
||||||
@ -68,7 +68,8 @@ class RepliesrssAction extends Rss10Action
|
|||||||
'link' => common_local_url('replies',
|
'link' => common_local_url('replies',
|
||||||
array('nickname' =>
|
array('nickname' =>
|
||||||
$user->nickname)),
|
$user->nickname)),
|
||||||
'description' => sprintf(_('Feed for replies to %s'), $user->nickname));
|
'description' => sprintf(_('Replies to %1$s on %2$s!'),
|
||||||
|
$user->nickname, common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ require_once INSTALLDIR.'/lib/omb.php';
|
|||||||
* Request token action class.
|
* Request token action class.
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Robin Millette <millette@controlyourself.ca>
|
* @author Robin Millette <millette@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
class RequesttokenAction extends Action
|
class RequesttokenAction extends Action
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@ class RequesttokenAction extends Action
|
|||||||
$req = OAuthRequest::from_request('POST', common_local_url('requesttoken'));
|
$req = OAuthRequest::from_request('POST', common_local_url('requesttoken'));
|
||||||
$server = omb_oauth_server();
|
$server = omb_oauth_server();
|
||||||
$token = $server->fetch_request_token($req);
|
$token = $server->fetch_request_token($req);
|
||||||
print $token;
|
print $token.'&omb_version='.OMB_VERSION_01;
|
||||||
} catch (OAuthException $e) {
|
} catch (OAuthException $e) {
|
||||||
$this->serverError($e->getMessage());
|
$this->serverError($e->getMessage());
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of replies
|
* List of replies
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,10 +39,10 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||||||
* List of replies
|
* List of replies
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShowfavoritesAction extends OwnerDesignAction
|
class ShowfavoritesAction extends OwnerDesignAction
|
||||||
@ -114,6 +114,29 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
|
||||||
|
$cur = common_current_user();
|
||||||
|
|
||||||
|
if (!empty($cur) && $cur->id == $this->user->id) {
|
||||||
|
|
||||||
|
// Show imported/gateway notices as well as local if
|
||||||
|
// the user is looking at his own favorites
|
||||||
|
|
||||||
|
$this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE,
|
||||||
|
NOTICES_PER_PAGE + 1, true);
|
||||||
|
} else {
|
||||||
|
$this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE,
|
||||||
|
NOTICES_PER_PAGE + 1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($this->notice)) {
|
||||||
|
$this->serverError(_('Could not retrieve favorite notices.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
|
$this->serverError(_('No such page'),$code=404);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,7 +196,9 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to thier favorites :)'), $this->user->nickname);
|
$message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Why not [register an account](%%%%action.%s%%%%) and then post something interesting they would add to their favorites :)'),
|
||||||
|
$this->user->nickname,
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
@ -191,26 +216,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$cur = common_current_user();
|
$nl = new NoticeList($this->notice, $this);
|
||||||
|
|
||||||
if (!empty($cur) && $cur->id == $this->user->id) {
|
|
||||||
|
|
||||||
// Show imported/gateway notices as well as local if
|
|
||||||
// the user is looking at his own favorites
|
|
||||||
|
|
||||||
$notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE,
|
|
||||||
NOTICES_PER_PAGE + 1, true);
|
|
||||||
} else {
|
|
||||||
$notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE,
|
|
||||||
NOTICES_PER_PAGE + 1, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($notice)) {
|
|
||||||
$this->serverError(_('Could not retrieve favorite notices.'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$nl = new NoticeList($notice, $this);
|
|
||||||
|
|
||||||
$cnt = $nl->show();
|
$cnt = $nl->show();
|
||||||
if (0 == $cnt) {
|
if (0 == $cnt) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Group main page
|
* Group main page
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,10 +41,10 @@ define('MEMBERS_PER_SECTION', 27);
|
|||||||
* Group main page
|
* Group main page
|
||||||
*
|
*
|
||||||
* @category Group
|
* @category Group
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShowgroupAction extends GroupDesignAction
|
class ShowgroupAction extends GroupDesignAction
|
||||||
@ -130,9 +130,19 @@ class ShowgroupAction extends GroupDesignAction
|
|||||||
$this->group = User_group::staticGet('nickname', $nickname);
|
$this->group = User_group::staticGet('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
|
$alias = Group_alias::staticGet('alias', $nickname);
|
||||||
|
if ($alias) {
|
||||||
|
$args = array('id' => $alias->group_id);
|
||||||
|
if ($this->page != 1) {
|
||||||
|
$args['page'] = $this->page;
|
||||||
|
}
|
||||||
|
common_redirect(common_local_url('groupbyid', $args), 301);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
$this->clientError(_('No such group'), 404);
|
$this->clientError(_('No such group'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
|
||||||
@ -438,13 +448,14 @@ class ShowgroupAction extends GroupDesignAction
|
|||||||
{
|
{
|
||||||
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
||||||
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' .
|
'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
|
||||||
'short messages about their life and interests. '.
|
'short messages about their life and interests. '.
|
||||||
'[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'),
|
'[Join now](%%%%action.%s%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'),
|
||||||
$this->group->nickname);
|
$this->group->nickname,
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
} else {
|
} else {
|
||||||
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' .
|
'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
|
||||||
'short messages about their life and interests. '),
|
'short messages about their life and interests. '),
|
||||||
$this->group->nickname);
|
$this->group->nickname);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Show a single message
|
* Show a single message
|
||||||
*
|
*
|
||||||
@ -20,13 +20,13 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ require_once INSTALLDIR.'/lib/mailbox.php';
|
|||||||
* // XXX: It is totally weird how this works!
|
* // XXX: It is totally weird how this works!
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShowmessageAction extends MailboxAction
|
class ShowmessageAction extends MailboxAction
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Show a single notice
|
* Show a single notice
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,10 +39,10 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||||||
* Show a single notice
|
* Show a single notice
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShownoticeAction extends OwnerDesignAction
|
class ShownoticeAction extends OwnerDesignAction
|
||||||
@ -97,8 +97,8 @@ class ShownoticeAction extends OwnerDesignAction
|
|||||||
|
|
||||||
$this->user = User::staticGet('id', $this->profile->id);
|
$this->user = User::staticGet('id', $this->profile->id);
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (! $this->notice->is_local) {
|
||||||
$this->serverError(_('Not a local notice'), 500);
|
common_redirect($this->notice->uri);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ class ShownoticeAction extends OwnerDesignAction
|
|||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
|
||||||
if ($this->notice->is_local == 0) {
|
if ($this->notice->is_local == Notice::REMOTE_OMB) {
|
||||||
if (!empty($this->notice->url)) {
|
if (!empty($this->notice->url)) {
|
||||||
common_redirect($this->notice->url, 301);
|
common_redirect($this->notice->url, 301);
|
||||||
} else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) {
|
} else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) {
|
||||||
@ -278,16 +278,16 @@ class ShownoticeAction extends OwnerDesignAction
|
|||||||
$this->element('link',array('rel'=>'alternate',
|
$this->element('link',array('rel'=>'alternate',
|
||||||
'type'=>'application/json+oembed',
|
'type'=>'application/json+oembed',
|
||||||
'href'=>common_local_url(
|
'href'=>common_local_url(
|
||||||
'api',
|
'oembed',
|
||||||
array('apiaction'=>'oembed','method'=>'oembed.json'),
|
array(),
|
||||||
array('url'=>$this->notice->uri)),
|
array('format'=>'json','url'=>$this->notice->uri)),
|
||||||
'title'=>'oEmbed'),null);
|
'title'=>'oEmbed'),null);
|
||||||
$this->element('link',array('rel'=>'alternate',
|
$this->element('link',array('rel'=>'alternate',
|
||||||
'type'=>'text/xml+oembed',
|
'type'=>'text/xml+oembed',
|
||||||
'href'=>common_local_url(
|
'href'=>common_local_url(
|
||||||
'api',
|
'oembed',
|
||||||
array('apiaction'=>'oembed','method'=>'oembed.xml'),
|
array(),
|
||||||
array('url'=>$this->notice->uri)),
|
array('format'=>'xml','url'=>$this->notice->uri)),
|
||||||
'title'=>'oEmbed'),null);
|
'title'=>'oEmbed'),null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* User profile page
|
* User profile page
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||||||
* to subscriptions and stuff, etc.
|
* to subscriptions and stuff, etc.
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShowstreamAction extends ProfileAction
|
class ShowstreamAction extends ProfileAction
|
||||||
@ -358,7 +358,9 @@ class ShowstreamAction extends ProfileAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
|
$message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and then nudge %s or post a notice to his or her attention.'),
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin',
|
||||||
|
$this->user->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
@ -378,20 +380,27 @@ class ShowstreamAction extends ProfileAction
|
|||||||
$this->showEmptyListMessage();
|
$this->showEmptyListMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$args = array('nickname' => $this->user->nickname);
|
||||||
|
if (!empty($this->tag))
|
||||||
|
{
|
||||||
|
$args['tag'] = $this->tag;
|
||||||
|
}
|
||||||
$this->pagination($this->page>1, $cnt>NOTICES_PER_PAGE, $this->page,
|
$this->pagination($this->page>1, $cnt>NOTICES_PER_PAGE, $this->page,
|
||||||
'showstream', array('nickname' => $this->user->nickname));
|
'showstream', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAnonymousMessage()
|
function showAnonymousMessage()
|
||||||
{
|
{
|
||||||
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
||||||
$m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
|
'based on the Free Software [StatusNet](http://status.net/) tool. ' .
|
||||||
'[Join now](%%%%action.register%%%%) to follow **%s**\'s notices and many more! ([Read more](%%%%doc.help%%%%))'),
|
'[Join now](%%%%action.%s%%%%) to follow **%s**\'s notices and many more! ([Read more](%%%%doc.help%%%%))'),
|
||||||
$this->user->nickname, $this->user->nickname);
|
$this->user->nickname,
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin',
|
||||||
|
$this->user->nickname);
|
||||||
} else {
|
} else {
|
||||||
$m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [Laconica](http://laconi.ca/) tool. '),
|
'based on the Free Software [StatusNet](http://status.net/) tool. '),
|
||||||
$this->user->nickname, $this->user->nickname);
|
$this->user->nickname, $this->user->nickname);
|
||||||
}
|
}
|
||||||
$this->elementStart('div', array('id' => 'anon_notice'));
|
$this->elementStart('div', array('id' => 'anon_notice'));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Settings for SMS
|
* Settings for SMS
|
||||||
*
|
*
|
||||||
@ -20,14 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
|
|||||||
* Settings for SMS
|
* Settings for SMS
|
||||||
*
|
*
|
||||||
* @category Settings
|
* @category Settings
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*
|
*
|
||||||
* @see SettingsAction
|
* @see SettingsAction
|
||||||
*/
|
*/
|
||||||
@ -69,6 +69,12 @@ class SmssettingsAction extends ConnectSettingsAction
|
|||||||
return _('You can receive SMS messages through email from %%site.name%%.');
|
return _('You can receive SMS messages through email from %%site.name%%.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('sms');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content area of the page
|
* Content area of the page
|
||||||
*
|
*
|
||||||
@ -80,6 +86,12 @@ class SmssettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
|
if (!common_config('sms', 'enabled')) {
|
||||||
|
$this->element('div', array('class' => 'error'),
|
||||||
|
_('SMS is not available.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
$this->elementStart('form', array('method' => 'post',
|
$this->elementStart('form', array('method' => 'post',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class SubeditAction extends Action
|
class SubeditAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class SubscribeAction extends Action
|
class SubscribeAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List a user's subscribers
|
* List a user's subscribers
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Social
|
* @category Social
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,10 +36,10 @@ if (!defined('LACONICA')) {
|
|||||||
* List a user's subscribers
|
* List a user's subscribers
|
||||||
*
|
*
|
||||||
* @category Social
|
* @category Social
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SubscribersAction extends GalleryAction
|
class SubscribersAction extends GalleryAction
|
||||||
@ -111,7 +111,9 @@ class SubscribersAction extends GalleryAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = sprintf(_('%s has no subscribers. Why not [register an account](%%%%action.register%%%%) and be the first?'), $this->user->nickname);
|
$message = sprintf(_('%s has no subscribers. Why not [register an account](%%%%action.%s%%%%) and be the first?'),
|
||||||
|
$this->user->nickname,
|
||||||
|
(!common_config('site','openidonly')) ? 'register' : 'openidlogin');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* List of a user's subscriptions
|
* List of a user's subscriptions
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Social
|
* @category Social
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
* @author Sarven Capadisli <csarven@status.net>
|
||||||
* @copyright 2008-2009 Control Yourself, Inc.
|
* @copyright 2008-2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,13 +36,13 @@ if (!defined('LACONICA')) {
|
|||||||
* A list of the user's subscriptions
|
* A list of the user's subscriptions
|
||||||
*
|
*
|
||||||
* @category Social
|
* @category Social
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@controlyourself.ca>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class SubscriptionsAction extends GalleryAction
|
class SubscriptionsAction extends GalleryAction
|
||||||
{
|
{
|
||||||
@ -107,6 +107,12 @@ class SubscriptionsAction extends GalleryAction
|
|||||||
array('nickname' => $this->user->nickname));
|
array('nickname' => $this->user->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showScripts()
|
||||||
|
{
|
||||||
|
parent::showScripts();
|
||||||
|
$this->autofocus('tag');
|
||||||
|
}
|
||||||
|
|
||||||
function showEmptyListMessage()
|
function showEmptyListMessage()
|
||||||
{
|
{
|
||||||
if (common_logged_in()) {
|
if (common_logged_in()) {
|
||||||
@ -174,14 +180,26 @@ class SubscriptionsListItem extends SubscriptionListItem
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!common_config('xmpp', 'enabled') && !common_config('sms', 'enabled')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->out->elementStart('form', array('id' => 'subedit-' . $this->profile->id,
|
$this->out->elementStart('form', array('id' => 'subedit-' . $this->profile->id,
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
'class' => 'form_subscription_edit',
|
'class' => 'form_subscription_edit',
|
||||||
'action' => common_local_url('subedit')));
|
'action' => common_local_url('subedit')));
|
||||||
$this->out->hidden('token', common_session_token());
|
$this->out->hidden('token', common_session_token());
|
||||||
$this->out->hidden('profile', $this->profile->id);
|
$this->out->hidden('profile', $this->profile->id);
|
||||||
|
if (common_config('xmpp', 'enabled')) {
|
||||||
$this->out->checkbox('jabber', _('Jabber'), $sub->jabber);
|
$this->out->checkbox('jabber', _('Jabber'), $sub->jabber);
|
||||||
|
} else {
|
||||||
|
$this->out->hidden('jabber', $sub->jabber);
|
||||||
|
}
|
||||||
|
if (common_config('sms', 'enabled')) {
|
||||||
$this->out->checkbox('sms', _('SMS'), $sub->sms);
|
$this->out->checkbox('sms', _('SMS'), $sub->sms);
|
||||||
|
} else {
|
||||||
|
$this->out->hidden('sms', $sub->sms);
|
||||||
|
}
|
||||||
$this->out->submit('save', _('Save'));
|
$this->out->submit('save', _('Save'));
|
||||||
$this->out->elementEnd('form');
|
$this->out->elementEnd('form');
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class SupAction extends Action
|
class SupAction extends Action
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,10 +17,13 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class TagAction extends Action
|
class TagAction extends Action
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var $notice;
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -42,6 +45,12 @@ class TagAction extends Action
|
|||||||
|
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
|
||||||
|
$this->notice = Notice_tag::getStream($this->tag, (($this->page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE + 1);
|
||||||
|
|
||||||
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
|
$this->serverError(_('No such page'),$code=404);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,9 +103,7 @@ class TagAction extends Action
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$notice = Notice_tag::getStream($this->tag, (($this->page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE + 1);
|
$nl = new NoticeList($this->notice, $this);
|
||||||
|
|
||||||
$nl = new NoticeList($notice, $this);
|
|
||||||
|
|
||||||
$cnt = $nl->show();
|
$cnt = $nl->show();
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/settingsaction.php');
|
require_once(INSTALLDIR.'/lib/settingsaction.php');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once(INSTALLDIR.'/lib/rssaction.php');
|
require_once(INSTALLDIR.'/lib/rssaction.php');
|
||||||
|
|
||||||
@ -61,7 +61,8 @@ class TagrssAction extends Rss10Action
|
|||||||
$c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
|
$c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
|
||||||
'title' => $tagname,
|
'title' => $tagname,
|
||||||
'link' => common_local_url('tagrss', array('tag' => $tagname)),
|
'link' => common_local_url('tagrss', array('tag' => $tagname)),
|
||||||
'description' => sprintf(_('Microblog tagged with %s'), $tagname));
|
'description' => sprintf(_('Updates tagged with %1$s on %2$s!'),
|
||||||
|
$tagname, common_config('site', 'name')));
|
||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,32 +207,10 @@ class TwitapifavoritesAction extends TwitterapiAction
|
|||||||
$other = User::staticGet('id', $notice->profile_id);
|
$other = User::staticGet('id', $notice->profile_id);
|
||||||
if ($other && $other->id != $user->id) {
|
if ($other && $other->id != $user->id) {
|
||||||
if ($other->email && $other->emailnotifyfav) {
|
if ($other->email && $other->emailnotifyfav) {
|
||||||
$this->notify_mail($other, $user, $notice);
|
mail_notify_fave($other, $user, $notice);
|
||||||
}
|
}
|
||||||
# XXX: notify by IM
|
# XXX: notify by IM
|
||||||
# XXX: notify by SMS
|
# XXX: notify by SMS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function notify_mail($other, $user, $notice)
|
|
||||||
{
|
|
||||||
$profile = $user->getProfile();
|
|
||||||
$bestname = $profile->getBestName();
|
|
||||||
$subject = sprintf(_('%s added your notice as a favorite'), $bestname);
|
|
||||||
$body = sprintf(_("%1\$s just added your notice from %2\$s as one of their favorites.\n\n" .
|
|
||||||
"In case you forgot, you can see the text of your notice here:\n\n" .
|
|
||||||
"%3\$s\n\n" .
|
|
||||||
"You can see the list of %1\$s's favorites here:\n\n" .
|
|
||||||
"%4\$s\n\n" .
|
|
||||||
"Faithfully yours,\n" .
|
|
||||||
"%5\$s\n"),
|
|
||||||
$bestname,
|
|
||||||
common_exact_date($notice->created),
|
|
||||||
common_local_url('shownotice', array('notice' => $notice->id)),
|
|
||||||
common_local_url('showfavorites', array('nickname' => $user->nickname)),
|
|
||||||
common_config('site', 'name'));
|
|
||||||
|
|
||||||
mail_to_user($other, $subject, $body);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Laconica - a distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, Control Yourself, Inc.
|
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +99,12 @@ class TwitapifriendshipsAction extends TwitterapiAction
|
|||||||
$other = $this->get_profile($id);
|
$other = $this->get_profile($id);
|
||||||
$user = $apidata['user']; // Alwyas the auth user
|
$user = $apidata['user']; // Alwyas the auth user
|
||||||
|
|
||||||
|
if ($user->id == $other->id) {
|
||||||
|
$this->clientError(_("You cannot unfollow yourself!"),
|
||||||
|
403, $apidata['content-type']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$sub = new Subscription();
|
$sub = new Subscription();
|
||||||
$sub->subscriber = $user->id;
|
$sub->subscriber = $user->id;
|
||||||
$sub->subscribed = $other->id;
|
$sub->subscribed = $other->id;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Laconica, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
* Laconica extensions to the Twitter-like API for groups
|
* StatusNet extensions to the Twitter-like API for groups
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
@ -20,15 +20,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* @category Twitter
|
* @category Twitter
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Craig Andrews
|
* @author Craig Andrews <candrews@integralblue.com>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2009 Control Yourself, Inc.
|
* @copyright 2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,20 +37,143 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
|
|||||||
/**
|
/**
|
||||||
* Group-specific API methods
|
* Group-specific API methods
|
||||||
*
|
*
|
||||||
* This class handles Laconica group API methods.
|
* This class handles StatusNet group API methods.
|
||||||
*
|
*
|
||||||
* @category Twitter
|
* @category Twitter
|
||||||
* @package Laconica
|
* @package StatusNet
|
||||||
* @author Craig Andrews
|
* @author Craig Andrews <candrews@integralblue.com>
|
||||||
* @author Zach Copley <zach@controlyourself.ca>
|
* @author Zach Copley <zach@status.net>
|
||||||
* @copyright 2009 Control Yourself, Inc.
|
* @copyright 2009 StatusNet, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://laconi.ca/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class TwitapigroupsAction extends TwitterapiAction
|
class TwitapigroupsAction extends TwitterapiAction
|
||||||
{
|
{
|
||||||
|
|
||||||
|
function list_groups($args, $apidata)
|
||||||
|
{
|
||||||
|
parent::handle($args);
|
||||||
|
|
||||||
|
common_debug("in groups api action");
|
||||||
|
|
||||||
|
$this->auth_user = $apidata['user'];
|
||||||
|
$user = $this->get_user($apidata['api_arg'], $apidata);
|
||||||
|
|
||||||
|
if (empty($user)) {
|
||||||
|
$this->clientError('Not Found', 404, $apidata['content-type']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$page = (int)$this->arg('page', 1);
|
||||||
|
$count = (int)$this->arg('count', 20);
|
||||||
|
$max_id = (int)$this->arg('max_id', 0);
|
||||||
|
$since_id = (int)$this->arg('since_id', 0);
|
||||||
|
$since = $this->arg('since');
|
||||||
|
$group = $user->getGroups(($page-1)*$count,
|
||||||
|
$count, $since_id, $max_id, $since);
|
||||||
|
|
||||||
|
$sitename = common_config('site', 'name');
|
||||||
|
$title = sprintf(_("%s's groups"), $user->nickname);
|
||||||
|
$taguribase = common_config('integration', 'taguri');
|
||||||
|
$id = "tag:$taguribase:Groups";
|
||||||
|
$link = common_root_url();
|
||||||
|
$subtitle = sprintf(_("groups %s is a member of on %s"), $user->nickname, $sitename);
|
||||||
|
|
||||||
|
switch($apidata['content-type']) {
|
||||||
|
case 'xml':
|
||||||
|
$this->show_xml_groups($group);
|
||||||
|
break;
|
||||||
|
case 'rss':
|
||||||
|
$this->show_rss_groups($group, $title, $link, $subtitle);
|
||||||
|
break;
|
||||||
|
case 'atom':
|
||||||
|
$selfuri = common_root_url() . 'api/statusnet/groups/list/' . $user->id . '.atom';
|
||||||
|
$this->show_atom_groups($group, $title, $id, $link,
|
||||||
|
$subtitle, $selfuri);
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
$this->show_json_groups($group);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->clientError(_('API method not found!'), $code = 404);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function list_all($args, $apidata)
|
||||||
|
{
|
||||||
|
parent::handle($args);
|
||||||
|
|
||||||
|
common_debug("in groups api action");
|
||||||
|
|
||||||
|
$page = (int)$this->arg('page', 1);
|
||||||
|
$count = (int)$this->arg('count', 20);
|
||||||
|
$max_id = (int)$this->arg('max_id', 0);
|
||||||
|
$since_id = (int)$this->arg('since_id', 0);
|
||||||
|
$since = $this->arg('since');
|
||||||
|
|
||||||
|
/* TODO:
|
||||||
|
Use the $page, $count, $max_id, $since_id, and $since parameters
|
||||||
|
*/
|
||||||
|
$group = new User_group();
|
||||||
|
$group->orderBy('created DESC');
|
||||||
|
$group->find();
|
||||||
|
|
||||||
|
$sitename = common_config('site', 'name');
|
||||||
|
$title = sprintf(_("%s groups"), $sitename);
|
||||||
|
$taguribase = common_config('integration', 'taguri');
|
||||||
|
$id = "tag:$taguribase:Groups";
|
||||||
|
$link = common_root_url();
|
||||||
|
$subtitle = sprintf(_("groups on %s"), $sitename);
|
||||||
|
|
||||||
|
switch($apidata['content-type']) {
|
||||||
|
case 'xml':
|
||||||
|
$this->show_xml_groups($group);
|
||||||
|
break;
|
||||||
|
case 'rss':
|
||||||
|
$this->show_rss_groups($group, $title, $link, $subtitle);
|
||||||
|
break;
|
||||||
|
case 'atom':
|
||||||
|
$selfuri = common_root_url() . 'api/statusnet/groups/list_all.atom';
|
||||||
|
$this->show_atom_groups($group, $title, $id, $link,
|
||||||
|
$subtitle, $selfuri);
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
$this->show_json_groups($group);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->clientError(_('API method not found!'), $code = 404);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function show($args, $apidata)
|
||||||
|
{
|
||||||
|
parent::handle($args);
|
||||||
|
|
||||||
|
common_debug("in groups api action");
|
||||||
|
|
||||||
|
$this->auth_user = $apidata['user'];
|
||||||
|
$group = $this->get_group($apidata['api_arg'], $apidata);
|
||||||
|
|
||||||
|
if (empty($group)) {
|
||||||
|
$this->clientError('Not Found', 404, $apidata['content-type']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($apidata['content-type']) {
|
||||||
|
case 'xml':
|
||||||
|
$this->show_single_xml_group($group);
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
$this->show_single_json_group($group);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->clientError(_('API method not found!'), $code = 404);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function timeline($args, $apidata)
|
function timeline($args, $apidata)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -88,20 +211,19 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
|
|||||||
$this->show_xml_timeline($notice);
|
$this->show_xml_timeline($notice);
|
||||||
break;
|
break;
|
||||||
case 'rss':
|
case 'rss':
|
||||||
$this->show_rss_timeline($notice, $title, $link,
|
$this->show_rss_timeline($notice, $title, $link, $subtitle);
|
||||||
$subtitle, $suplink);
|
|
||||||
break;
|
break;
|
||||||
case 'atom':
|
case 'atom':
|
||||||
if (isset($apidata['api_arg'])) {
|
if (isset($apidata['api_arg'])) {
|
||||||
$selfuri = common_root_url() .
|
$selfuri = common_root_url() .
|
||||||
'api/laconica/groups/timeline/' .
|
'api/statusnet/groups/timeline/' .
|
||||||
$apidata['api_arg'] . '.atom';
|
$apidata['api_arg'] . '.atom';
|
||||||
} else {
|
} else {
|
||||||
$selfuri = common_root_url() .
|
$selfuri = common_root_url() .
|
||||||
'api/laconica/groups/timeline.atom';
|
'api/statusnet/groups/timeline.atom';
|
||||||
}
|
}
|
||||||
$this->show_atom_timeline($notice, $title, $id, $link,
|
$this->show_atom_timeline($notice, $title, $id, $link,
|
||||||
$subtitle, $suplink, $selfuri);
|
$subtitle, null, $selfuri);
|
||||||
break;
|
break;
|
||||||
case 'json':
|
case 'json':
|
||||||
$this->show_json_timeline($notice);
|
$this->show_json_timeline($notice);
|
||||||
@ -111,4 +233,97 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function membership($args, $apidata)
|
||||||
|
{
|
||||||
|
parent::handle($args);
|
||||||
|
|
||||||
|
common_debug("in groups api action");
|
||||||
|
|
||||||
|
$this->auth_user = $apidata['user'];
|
||||||
|
$group = $this->get_group($apidata['api_arg'], $apidata);
|
||||||
|
|
||||||
|
if (empty($group)) {
|
||||||
|
$this->clientError('Not Found', 404, $apidata['content-type']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sitename = common_config('site', 'name');
|
||||||
|
$title = sprintf(_("Members of %s group"), $group->nickname);
|
||||||
|
$taguribase = common_config('integration', 'taguri');
|
||||||
|
$id = "tag:$taguribase:GroupMembership:".$group->id;
|
||||||
|
$link = common_local_url('showgroup',
|
||||||
|
array('nickname' => $group->nickname));
|
||||||
|
$subtitle = sprintf(_('Members of %1$s on %2$s'),
|
||||||
|
$group->nickname, $sitename);
|
||||||
|
|
||||||
|
$page = (int)$this->arg('page', 1);
|
||||||
|
$count = (int)$this->arg('count', 20);
|
||||||
|
$max_id = (int)$this->arg('max_id', 0);
|
||||||
|
$since_id = (int)$this->arg('since_id', 0);
|
||||||
|
$since = $this->arg('since');
|
||||||
|
|
||||||
|
$member = $group->getMembers(($page-1)*$count,
|
||||||
|
$count, $since_id, $max_id, $since);
|
||||||
|
|
||||||
|
switch($apidata['content-type']) {
|
||||||
|
case 'xml':
|
||||||
|
$this->show_twitter_xml_users($member);
|
||||||
|
break;
|
||||||
|
//TODO implement the RSS and ATOM content types
|
||||||
|
/*case 'rss':
|
||||||
|
$this->show_rss_users($member, $title, $link, $subtitle);
|
||||||
|
break;*/
|
||||||
|
/*case 'atom':
|
||||||
|
if (isset($apidata['api_arg'])) {
|
||||||
|
$selfuri = common_root_url() .
|
||||||
|
'api/statusnet/groups/membership/' .
|
||||||
|
$apidata['api_arg'] . '.atom';
|
||||||
|
} else {
|
||||||
|
$selfuri = common_root_url() .
|
||||||
|
'api/statusnet/groups/membership.atom';
|
||||||
|
}
|
||||||
|
$this->show_atom_users($member, $title, $id, $link,
|
||||||
|
$subtitle, null, $selfuri);
|
||||||
|
break;*/
|
||||||
|
case 'json':
|
||||||
|
$this->show_json_users($member);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->clientError(_('API method not found!'), $code = 404);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function is_member($args, $apidata)
|
||||||
|
{
|
||||||
|
parent::handle($args);
|
||||||
|
|
||||||
|
common_debug("in groups api action");
|
||||||
|
|
||||||
|
$this->auth_user = $apidata['user'];
|
||||||
|
$group = User_group::staticGet($args['group_id']);
|
||||||
|
if(! $group){
|
||||||
|
$this->clientError(_('Group not found'), $code = 500);
|
||||||
|
}
|
||||||
|
$user = User::staticGet('id', $args['user_id']);
|
||||||
|
if(! $user){
|
||||||
|
$this->clientError(_('User not found'), $code = 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_member=$user->isMember($group);
|
||||||
|
|
||||||
|
switch($apidata['content-type']) {
|
||||||
|
case 'xml':
|
||||||
|
$this->init_document('xml');
|
||||||
|
$this->element('is_member', null, $is_member);
|
||||||
|
$this->end_document('xml');
|
||||||
|
break;
|
||||||
|
case 'json':
|
||||||
|
$this->init_document('json');
|
||||||
|
$this->show_json_objects(array('is_member'=>$is_member));
|
||||||
|
$this->end_document('json');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->clientError(_('API method not found!'), $code = 404);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user