summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php6
-rw-r--r--lib/arraywrapper.php4
-rw-r--r--lib/router.php11
3 files changed, 9 insertions, 12 deletions
diff --git a/lib/action.php b/lib/action.php
index 6da9adab5..1bdc4daea 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -450,8 +450,10 @@ class Action extends HTMLOutputter // lawsuit
}
$this->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'), _('Help me!'), false, 'nav_help');
- $this->menuItem(common_local_url('peoplesearch'),
- _('Search'), _('Search for people or text'), false, 'nav_search');
+ if ($user || !common_config('site', 'private')) {
+ $this->menuItem(common_local_url('peoplesearch'),
+ _('Search'), _('Search for people or text'), false, 'nav_search');
+ }
Event::handle('EndPrimaryNav', array($this));
}
$this->elementEnd('ul');
diff --git a/lib/arraywrapper.php b/lib/arraywrapper.php
index a8a12b3bb..47ae057dc 100644
--- a/lib/arraywrapper.php
+++ b/lib/arraywrapper.php
@@ -25,12 +25,14 @@ class ArrayWrapper
{
var $_items = null;
var $_count = 0;
+ var $N = 0;
var $_i = -1;
function __construct($items)
{
$this->_items = $items;
$this->_count = count($this->_items);
+ $this->N = $this->_count;
}
function fetch()
@@ -76,4 +78,4 @@ class ArrayWrapper
$item =& $this->_items[$this->_i];
return call_user_func_array(array($item, $name), $args);
}
-} \ No newline at end of file
+}
diff --git a/lib/router.php b/lib/router.php
index f03cfcf6d..04c6dd414 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -117,15 +117,8 @@ class Router
$m->connect('main/tagother/:id', array('action' => 'tagother'));
- $m->connect('main/oembed.xml',
- array('action' => 'api',
- 'method' => 'oembed.xml',
- 'apiaction' => 'oembed'));
-
- $m->connect('main/oembed.json',
- array('action' => 'api',
- 'method' => 'oembed.json',
- 'apiaction' => 'oembed'));
+ $m->connect('main/oembed',
+ array('action' => 'oembed'));
// these take a code