aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/actions.php3
-rw-r--r--engine/lib/configuration.php2
-rw-r--r--engine/lib/filestore.php2
-rw-r--r--engine/lib/metadata.php16
-rw-r--r--engine/lib/navigation.php2
-rw-r--r--engine/lib/output.php4
-rw-r--r--engine/lib/private_settings.php2
-rw-r--r--engine/lib/users.php2
-rw-r--r--engine/lib/views.php13
9 files changed, 22 insertions, 24 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index f415842ab..c6613e6d6 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -459,8 +459,7 @@ function ajax_forward_hook($hook, $type, $reason, $params) {
// however some browsers will not accept the JSON MIME type.
if (stripos($_SERVER['HTTP_ACCEPT'], 'application/json') === FALSE) {
header("Content-type: text/plain");
- }
- else {
+ } else {
header("Content-type: application/json");
}
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index 615063f3d..3fade8155 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -555,7 +555,7 @@ function set_default_config() {
'path' => "$install_root/",
'view_path' => "$install_root/views/",
'plugins_path' => "$install_root/mod/",
- 'wwwroot' => $www_root,
+ 'wwwroot' => $www_root,
'url' => $www_root,
'site_name' => 'New Elgg site',
'language' => 'en',
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index a13d8aa27..86f6d9baa 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -18,7 +18,7 @@
*/
function get_dir_size($dir, $totalsize = 0) {
$handle = @opendir($dir);
- while ($file = @readdir ($handle)) {
+ while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file)) {
continue;
}
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 352e98a61..6e1b8b39c 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -402,15 +402,15 @@ function elgg_enable_metadata(array $options) {
*/
function elgg_get_entities_from_metadata(array $options = array()) {
$defaults = array(
- 'metadata_names' => ELGG_ENTITIES_ANY_VALUE,
- 'metadata_values' => ELGG_ENTITIES_ANY_VALUE,
- 'metadata_name_value_pairs' => ELGG_ENTITIES_ANY_VALUE,
+ 'metadata_names' => ELGG_ENTITIES_ANY_VALUE,
+ 'metadata_values' => ELGG_ENTITIES_ANY_VALUE,
+ 'metadata_name_value_pairs' => ELGG_ENTITIES_ANY_VALUE,
- 'metadata_name_value_pairs_operator'=> 'AND',
- 'metadata_case_sensitive' => TRUE,
- 'order_by_metadata' => array(),
+ 'metadata_name_value_pairs_operator' => 'AND',
+ 'metadata_case_sensitive' => TRUE,
+ 'order_by_metadata' => array(),
- 'metadata_owner_guids' => ELGG_ENTITIES_ANY_VALUE,
+ 'metadata_owner_guids' => ELGG_ENTITIES_ANY_VALUE,
);
$options = array_merge($defaults, $options);
@@ -633,7 +633,7 @@ $owner_guids = NULL) {
$i++;
}
- if ($where = implode (" $pair_operator ", $pair_wheres)) {
+ if ($where = implode(" $pair_operator ", $pair_wheres)) {
$wheres[] = "($where)";
}
}
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index 956ca220a..dcbd7b397 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -301,7 +301,7 @@ function elgg_site_menu_setup($hook, $type, $return, $params) {
// if only one item on more menu, stick it with the rest
$num_menu_items = count($return['default']);
if ($num_menu_items > ($max_display_items + 1)) {
- $return['more'] = array_splice($return['default'], $max_display_items);
+ $return['more'] = array_splice($return['default'], $max_display_items);
}
}
diff --git a/engine/lib/output.php b/engine/lib/output.php
index 65f51f854..b96cf354c 100644
--- a/engine/lib/output.php
+++ b/engine/lib/output.php
@@ -67,7 +67,7 @@ function autop($pee, $br = 1) {
$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
$pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
- $pee = preg_replace( '|<p>|', "$1<p>", $pee );
+ $pee = preg_replace('|<p>|', "$1<p>", $pee);
$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag
$pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists
$pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);
@@ -85,7 +85,7 @@ function autop($pee, $br = 1) {
// mind the space between the ? and >. Only there because of the comment.
// $pee = preg_replace_callback('!(<pre.*? >)(.*?)</pre>!is', 'clean_pre', $pee );
//}
- $pee = preg_replace( "|\n</p>$|", '</p>', $pee );
+ $pee = preg_replace("|\n</p>$|", '</p>', $pee);
return $pee;
}
diff --git a/engine/lib/private_settings.php b/engine/lib/private_settings.php
index 386af5279..1fa9bdb66 100644
--- a/engine/lib/private_settings.php
+++ b/engine/lib/private_settings.php
@@ -240,7 +240,7 @@ $pairs = NULL, $pair_operator = 'AND', $name_prefix = '') {
$i++;
}
- $where = implode (" $pair_operator ", $pair_wheres);
+ $where = implode(" $pair_operator ", $pair_wheres);
if ($where) {
$wheres[] = "($where)";
}
diff --git a/engine/lib/users.php b/engine/lib/users.php
index c03052172..c38bb676e 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1486,7 +1486,7 @@ function users_pagesetup() {
if ($viewer) {
elgg_register_menu_item('topbar', array(
'name' => 'profile',
- 'href' => $viewer->getURL(),
+ 'href' => $viewer->getURL(),
'text' => elgg_view('output/img', array(
'src' => $viewer->getIconURL('topbar'),
'alt' => $viewer->name,
diff --git a/engine/lib/views.php b/engine/lib/views.php
index b938dd60e..85319b2d7 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -415,7 +415,6 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
if (isset($vars['internalname']) && !isset($vars['__ignoreInternalname']) && !isset($vars['name'])) {
elgg_deprecated_notice('You should pass $vars[\'name\'] now instead of $vars[\'internalname\']', 1.8, 2);
$vars['name'] = $vars['internalname'];
- $test=false;
} elseif (isset($vars['name'])) {
if (!isset($vars['internalname'])) {
$vars['__ignoreInternalname'] = '';
@@ -1628,12 +1627,12 @@ function elgg_views_boot() {
// set default icon sizes - can be overridden in settings.php or with plugin
if (!elgg_get_config('icon_sizes')) {
$icon_sizes = array(
- 'topbar' => array('w'=>16, 'h'=>16, 'square'=>TRUE, 'upscale'=>TRUE),
- 'tiny' => array('w'=>25, 'h'=>25, 'square'=>TRUE, 'upscale'=>TRUE),
- 'small' => array('w'=>40, 'h'=>40, 'square'=>TRUE, 'upscale'=>TRUE),
- 'medium' => array('w'=>100, 'h'=>100, 'square'=>TRUE, 'upscale'=>TRUE),
- 'large' => array('w'=>200, 'h'=>200, 'square'=>FALSE, 'upscale'=>FALSE),
- 'master' => array('w'=>550, 'h'=>550, 'square'=>FALSE, 'upscale'=>FALSE),
+ 'topbar' => array('w' => 16, 'h' => 16, 'square' => TRUE, 'upscale' => TRUE),
+ 'tiny' => array('w' => 25, 'h' => 25, 'square' => TRUE, 'upscale' => TRUE),
+ 'small' => array('w' => 40, 'h' => 40, 'square' => TRUE, 'upscale' => TRUE),
+ 'medium' => array('w' => 100, 'h' => 100, 'square' => TRUE, 'upscale' => TRUE),
+ 'large' => array('w' => 200, 'h' => 200, 'square' => FALSE, 'upscale' => FALSE),
+ 'master' => array('w' => 550, 'h' => 550, 'square' => FALSE, 'upscale' => FALSE),
);
elgg_set_config('icon_sizes', $icon_sizes);
}