('.$options.')<\/strong>([^"]*")/iU';
do {
$result = preg_replace($pattern, '\\1\\2\\3', $result, -1, $count);
} while ($count);
diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php
index ba5276d06e..f6da969ee4 100644
--- a/actions/noticesearchrss.php
+++ b/actions/noticesearchrss.php
@@ -92,7 +92,7 @@ class NoticesearchrssAction extends Rss10Action
return null;
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/nudge.php b/actions/nudge.php
index b4e5e01dd8..c23d3e6435 100644
--- a/actions/nudge.php
+++ b/actions/nudge.php
@@ -124,7 +124,7 @@ class NudgeAction extends Action
}
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/opensearch.php b/actions/opensearch.php
index 2eb8183066..d1f4895ce4 100644
--- a/actions/opensearch.php
+++ b/actions/opensearch.php
@@ -84,7 +84,7 @@ class OpensearchAction extends Action
$this->endXML();
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/outbox.php b/actions/outbox.php
index c8d7f28125..deef1cc870 100644
--- a/actions/outbox.php
+++ b/actions/outbox.php
@@ -62,6 +62,17 @@ class OutboxAction extends MailboxAction
}
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'outbox', array('nickname' => $this->user->nickname));
+ }
+
/**
* retrieve the messages for this user and this page
*
diff --git a/actions/postnotice.php b/actions/postnotice.php
index c32d8ca94b..3e98b3cd55 100644
--- a/actions/postnotice.php
+++ b/actions/postnotice.php
@@ -28,7 +28,7 @@ class PostnoticeAction extends Action
parent::handle($args);
try {
common_remove_magic_from_request();
- $req = OAuthRequest::from_request();
+ $req = OAuthRequest::from_request('POST', common_local_url('postnotice'));
# Note: server-to-server function!
$server = omb_oauth_server();
list($consumer, $token) = $server->verify_request($req);
diff --git a/actions/public.php b/actions/public.php
index 5a380de9a8..d2f9da6460 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -56,7 +56,7 @@ class PublicAction extends Action
var $page = null;
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
@@ -135,6 +135,17 @@ class PublicAction extends Action
_('Public Stream Feed (Atom)')));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'public');
+ }
+
/**
* Extra head elements
*
diff --git a/actions/publicrss.php b/actions/publicrss.php
index 77e26e0f4c..bc52f29522 100644
--- a/actions/publicrss.php
+++ b/actions/publicrss.php
@@ -102,7 +102,7 @@ class PublicrssAction extends Rss10Action
// nop
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php
index 855cfed9b5..e9f33d58b6 100644
--- a/actions/publictagcloud.php
+++ b/actions/publictagcloud.php
@@ -47,7 +47,7 @@ define('TAGS_PER_PAGE', 100);
class PublictagcloudAction extends Action
{
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/publicxrds.php b/actions/publicxrds.php
index 2c52f12468..283a932ca5 100644
--- a/actions/publicxrds.php
+++ b/actions/publicxrds.php
@@ -54,7 +54,7 @@ class PublicxrdsAction extends Action
*
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/replies.php b/actions/replies.php
index 2769cb4227..dfb520d649 100644
--- a/actions/replies.php
+++ b/actions/replies.php
@@ -138,6 +138,17 @@ class RepliesAction extends Action
return array(new Feed(Feed::RSS1, $rssurl, $rsstitle));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'replies', array('nickname' => $this->user->nickname));
+ }
+
/**
* show the personal group nav
*
@@ -196,7 +207,7 @@ class RepliesAction extends Action
$this->elementEnd('div');
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/repliesrss.php b/actions/repliesrss.php
index 985318bf16..2017c43094 100644
--- a/actions/repliesrss.php
+++ b/actions/repliesrss.php
@@ -83,7 +83,7 @@ class RepliesrssAction extends Rss10Action
return ($avatar) ? $avatar->url : null;
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/requesttoken.php b/actions/requesttoken.php
index ca253b97aa..9507e3d6c9 100644
--- a/actions/requesttoken.php
+++ b/actions/requesttoken.php
@@ -52,7 +52,7 @@ class RequesttokenAction extends Action
*
* @return boolean false
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return false;
}
@@ -69,7 +69,7 @@ class RequesttokenAction extends Action
parent::handle($args);
try {
common_remove_magic_from_request();
- $req = OAuthRequest::from_request();
+ $req = OAuthRequest::from_request('POST', common_local_url('requesttoken'));
$server = omb_oauth_server();
$token = $server->fetch_request_token($req);
print $token;
diff --git a/actions/showfavorites.php b/actions/showfavorites.php
index 4d43495054..6e011d5ca5 100644
--- a/actions/showfavorites.php
+++ b/actions/showfavorites.php
@@ -58,7 +58,7 @@ class ShowfavoritesAction extends Action
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
@@ -150,6 +150,18 @@ class ShowfavoritesAction extends Action
return array(new Feed(Feed::RSS1, $feedurl, $feedtitle));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showfavorites', array('nickname' => $this->user->nickname));
+ }
+
+
/**
* show the personal group nav
*
diff --git a/actions/showgroup.php b/actions/showgroup.php
index 79445851f9..025f8383a2 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -60,7 +60,7 @@ class ShowgroupAction extends Action
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
@@ -311,6 +311,17 @@ class ShowgroupAction extends Action
$this->group->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showgroup', array('nickname' => $this->group->nickname));
+ }
+
/**
* Fill in the sidebar.
*
diff --git a/actions/showmessage.php b/actions/showmessage.php
index 572a71739a..4fcaadbe83 100644
--- a/actions/showmessage.php
+++ b/actions/showmessage.php
@@ -177,7 +177,7 @@ class ShowmessageAction extends MailboxAction
return '';
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/shownotice.php b/actions/shownotice.php
index ccae49bb3e..2c469c9dee 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -106,7 +106,7 @@ class ShownoticeAction extends Action
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/showstream.php b/actions/showstream.php
index ce237dae22..82665e5b8b 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -56,7 +56,7 @@ require_once INSTALLDIR.'/lib/feedlist.php';
class ShowstreamAction extends ProfileAction
{
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
@@ -135,6 +135,17 @@ class ShowstreamAction extends ProfileAction
sprintf(_('FOAF for %s'), $this->user->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showstream', array('nickname' => $this->user->nickname));
+ }
+
function extraHead()
{
// for remote subscriptions etc.
diff --git a/actions/subscribers.php b/actions/subscribers.php
index 7ebb54d33d..d91a7d4fd3 100644
--- a/actions/subscribers.php
+++ b/actions/subscribers.php
@@ -130,7 +130,7 @@ class SubscribersList extends ProfileList
$bf->show();
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/sup.php b/actions/sup.php
index 246b3299d3..691153d6a3 100644
--- a/actions/sup.php
+++ b/actions/sup.php
@@ -79,7 +79,7 @@ class SupAction extends Action
return $updates;
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/tag.php b/actions/tag.php
index c413bf8c34..02f3e35225 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -45,6 +45,13 @@ class TagAction extends Action
return true;
}
+ function showSections()
+ {
+ $pop = new PopularNoticeSection($this);
+ $pop->show();
+ }
+
+
function title()
{
if ($this->page == 1) {
@@ -70,6 +77,17 @@ class TagAction extends Action
sprintf(_('Feed for tag %s'), $this->tag)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'tag', array('tag' => $this->tag));
+ }
+
function showPageNotice()
{
return sprintf(_('Messages tagged "%s", most recent first'), $this->tag);
@@ -87,7 +105,7 @@ class TagAction extends Action
$this->page, 'tag', array('tag' => $this->tag));
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/tagrss.php b/actions/tagrss.php
index a77fa12c98..83cf3afe2f 100644
--- a/actions/tagrss.php
+++ b/actions/tagrss.php
@@ -65,7 +65,7 @@ class TagrssAction extends Rss10Action
return $c;
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/twitapisearchjson.php b/actions/twitapisearchjson.php
index 0f9f523a14..b0e3be687c 100644
--- a/actions/twitapisearchjson.php
+++ b/actions/twitapisearchjson.php
@@ -142,7 +142,7 @@ class TwitapisearchjsonAction extends TwitterapiAction
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/updateprofile.php b/actions/updateprofile.php
index 7dc52fda9e..08cb31ae03 100644
--- a/actions/updateprofile.php
+++ b/actions/updateprofile.php
@@ -29,7 +29,7 @@ class UpdateprofileAction extends Action
parent::handle($args);
try {
common_remove_magic_from_request();
- $req = OAuthRequest::from_request();
+ $req = OAuthRequest::from_request('POST', common_local_url('updateprofile'));
# Note: server-to-server function!
$server = omb_oauth_server();
list($consumer, $token) = $server->verify_request($req);
diff --git a/actions/userbyid.php b/actions/userbyid.php
index 1e30d1aac3..4a985fcd72 100644
--- a/actions/userbyid.php
+++ b/actions/userbyid.php
@@ -50,7 +50,7 @@ class UserbyidAction extends Action
*
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/usergroups.php b/actions/usergroups.php
index 06b2334bf5..e3088dcbd8 100644
--- a/actions/usergroups.php
+++ b/actions/usergroups.php
@@ -52,7 +52,7 @@ class UsergroupsAction extends Action
var $page = null;
var $profile = null;
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/userrss.php b/actions/userrss.php
index d3bf352d8d..5861d9ee36 100644
--- a/actions/userrss.php
+++ b/actions/userrss.php
@@ -96,7 +96,7 @@ class UserrssAction extends Rss10Action
parent::initRss($limit);
}
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/actions/xrds.php b/actions/xrds.php
index 0758318037..1335b6b806 100644
--- a/actions/xrds.php
+++ b/actions/xrds.php
@@ -52,7 +52,7 @@ class XrdsAction extends Action
*
* @return boolean true
*/
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
diff --git a/config.php.sample b/config.php.sample
index 4c4c9f08bc..b8ed45fa83 100644
--- a/config.php.sample
+++ b/config.php.sample
@@ -18,7 +18,6 @@ $config['site']['server'] = 'localhost';
$config['site']['path'] = 'laconica';
#$config['site']['fancy'] = false;
#$config['site']['theme'] = 'default';
-#$config['site']['skin'] = 'default';
#To enable the built-in mobile style sheet, defaults to false.
#$config['site']['mobile'] = true;
#For contact email, defaults to $_SERVER["SERVER_ADMIN"]
diff --git a/db/notice_source.sql b/db/notice_source.sql
index ac23f14aa1..d5124e223a 100644
--- a/db/notice_source.sql
+++ b/db/notice_source.sql
@@ -1,29 +1,28 @@
INSERT INTO notice_source
(code, name, url, created)
VALUES
- ('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
- ('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
- ('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
- ('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
- ('IdentiFox','IdentiFox','http://www.bitbucket.org/uncryptic/identifox/', now()),
- ('LaTwit','LaTwit','http://latwit.mac65.com/', now()),
- ('Nambu','Nambu','http://www.nambu.com/', now()),
- ('Pikchur','Pikchur','http://www.pikchur.com/', now()),
- ('Ping.fm','Ping.fm','http://ping.fm/', now()),
- ('Twidge','Twidge','http://software.complete.org/twidge', now()),
- ('Updating.Me','Updating.Me','http://updating.me/', now()),
+ ('adium', 'Adium', 'http://www.adiumx.com/', now()),
('betwittered','BeTwittered','http://www.32hours.com/betwitteredinfo/', now()),
('bti','bti','http://gregkh.github.com/bti/', now()),
('cliqset', 'Cliqset', 'http://www.cliqset.com/', now()),
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
+ ('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
+ ('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
+ ('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
+ ('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
('identicatools','Laconica Tools','http://bitbucketlabs.net/laconica-tools/', now()),
('identichat','identichat','http://identichat.prosody.im/', now()),
+ ('IdentiFox','IdentiFox','http://www.bitbucket.org/uncryptic/identifox/', now()),
('identitwitch','IdentiTwitch','http://richfish.org/identitwitch/', now()),
+ ('LaTwit','LaTwit','http://latwit.mac65.com/', now()),
('maisha', 'Maisha', 'http://maisha.grango.org/', now()),
('mbpidgin','mbpidgin','http://code.google.com/p/microblog-purple/', now()),
('Mobidentica', 'Mobidentica', 'http://www.substanceofcode.com/software/mobidentica/', now()),
('moconica','Moconica','http://moconica.com/', now()),
+ ('nambu','Nambu','http://www.nambu.com/', now()),
('peoplebrowsr', 'PeopleBrowsr', 'http://www.peoplebrowsr.com/', now()),
+ ('Pikchur','Pikchur','http://www.pikchur.com/', now()),
+ ('Ping.fm','Ping.fm','http://ping.fm/', now()),
('pocketwit','PockeTwit','http://code.google.com/p/pocketwit/', now()),
('posty','Posty','http://spreadingfunkyness.com/posty/', now()),
('royalewithcheese','Royale With Cheese','http://p.hellyeah.org/', now()),
@@ -35,9 +34,11 @@ VALUES
('tarpipe','tarpipe','http://tarpipe.com/', now()),
('tjunar','Tjunar','http://nederflash.nl/boek/titels/tjunar-air', now()),
('tr.im','tr.im','http://tr.im/', now()),
+ ('triklepost', 'Tricklepost', 'http://github.com/zcopley/tricklepost/tree/master', now()),
('tweenky','Tweenky','http://beta.tweenky.com/', now()),
('twhirl','Twhirl','http://www.twhirl.org/', now()),
('twibble','twibble','http://www.twibble.de/', now()),
+ ('Twidge','Twidge','http://software.complete.org/twidge', now()),
('twidge','Twidge','http://software.complete.org/twidge', now()),
('twidroid','twidroid','http://www.twidroid.com/', now()),
('twittelator','Twittelator','http://www.stone.com/iPhone/Twittelator/', now()),
@@ -47,6 +48,6 @@ VALUES
('twittertools','Twitter Tools','http://wordpress.org/extend/plugins/twitter-tools/', now()),
('twitux','Twitux','http://live.gnome.org/DanielMorales/Twitux', now()),
('twitvim','TwitVim','http://vim.sourceforge.net/scripts/script.php?script_id=2204', now()),
+ ('Updating.Me','Updating.Me','http://updating.me/', now()),
('urfastr','urfastr','http://urfastr.net/', now()),
- ('adium', 'Adium', 'http://www.adiumx.com/', now()),
('yatca','Yatca','http://www.yatca.com/', now());
diff --git a/index.php b/index.php
index e83d08c13e..e24bde9179 100644
--- a/index.php
+++ b/index.php
@@ -128,7 +128,7 @@ function main()
// XXX: find somewhere for this little block to live
- if (common_config('db', 'mirror') && $action_obj->isReadOnly()) {
+ if (common_config('db', 'mirror') && $action_obj->isReadOnly($args)) {
if (is_array(common_config('db', 'mirror'))) {
// "load balancing", ha ha
$arr = common_config('db', 'mirror');
diff --git a/install.php b/install.php
index 0240349bb1..87a99a6508 100644
--- a/install.php
+++ b/install.php
@@ -1,4 +1,22 @@
-
+.
+ */
+
define('INSTALLDIR', dirname(__FILE__));
function main()
@@ -19,12 +37,12 @@ function checkPrereqs()
{
if (file_exists(INSTALLDIR.'/config.php')) {
?>Config file "config.php" already exists.
-
+ Require PHP version 5 or greater.
+ ?>Require PHP version 5 or greater.
Cannot load required extension "= $req ?>".
+ ?>Cannot load required extension "".
Cannot write config file to "= INSTALLDIR ?>".
+ ?>Cannot write config file to "".
On your server, try this command:
- chmod a+w = INSTALLDIR ?>
-
+ chmod a+w
+ Cannot write avatar directory "= INSTALLDIR ?>/avatar/".
+ ?>Cannot write avatar directory "/avatar/".
On your server, try this command:
- chmod a+w = INSTALLDIR ?>/avatar/
+ chmod a+w /avatar/
return false;
}
@@ -211,7 +229,7 @@ function handlePost()
function writeConf($sitename, $sqlUrl)
{
$res = file_put_contents(INSTALLDIR.'/config.php',
- "\n".
+ "
Install Laconica
- main() ?>
+