summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-12 18:47:12 +0000
committerSarven Capadisli <csarven@status.net>2010-01-12 18:47:12 +0000
commit21512910c1d882b62f921154209e6f3c4792f03b (patch)
tree660869105257d23a7f2c7d6bfe5609a4477d652f /lib
parentb9a487a3dab7e650fe21d0ab8a1db3e1b9c0ac3d (diff)
parentcbc3c7b141b8cfd8baa35a580e9fc9ae4f50343c (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php2
-rw-r--r--lib/common.php17
2 files changed, 14 insertions, 5 deletions
diff --git a/lib/action.php b/lib/action.php
index 6efa9163d..a521bcb50 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -141,7 +141,7 @@ class Action extends HTMLOutputter // lawsuit
function showTitle()
{
$this->element('title', null,
- sprintf(_("%1$s - %2$s"),
+ sprintf(_("%1\$s - %2\$s"),
$this->title(),
common_config('site', 'name')));
}
diff --git a/lib/common.php b/lib/common.php
index 7342c177a..b280afec0 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -45,11 +45,20 @@ define('FOREIGN_FRIEND_RECV', 2);
set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib/');
-# To protect against upstream libraries which haven't updated
-# for PHP 5.3 where dl() function may not be present...
+// To protect against upstream libraries which haven't updated
+// for PHP 5.3 where dl() function may not be present...
if (!function_exists('dl')) {
- function dl($library) {
- return false;
+ // function_exists() returns false for things in disable_functions,
+ // but they still exist and we'll die if we try to redefine them.
+ //
+ // Fortunately trying to call the disabled one will only trigger
+ // a warning, not a fatal, so it's safe to leave it for our case.
+ // Callers will be suppressing warnings anyway.
+ $disabled = array_filter(array_map('trim', explode(',', ini_get('disable_functions'))));
+ if (!in_array('dl', $disabled)) {
+ function dl($library) {
+ return false;
+ }
}
}