@@ -1338,7 +1338,7 @@ discard block |
||
| 1338 | 1338 | |
| 1339 | 1339 | // convert INI setting when shorthand notation is used |
| 1340 | 1340 | $last = strtolower($val[strlen($val) - 1]); |
| 1341 | - switch($last) { |
|
| 1341 | + switch ($last) { |
|
| 1342 | 1342 | case 'g': |
| 1343 | 1343 | $val *= 1024; |
| 1344 | 1344 | // fallthrough intentional |
@@ -1431,7 +1431,7 @@ discard block |
||
| 1431 | 1431 | _elgg_services()->logger->setDisplay(false); |
| 1432 | 1432 | elgg_trigger_event('shutdown', 'system'); |
| 1433 | 1433 | |
| 1434 | - $time = (float)(microtime(true) - $START_MICROTIME); |
|
| 1434 | + $time = (float) (microtime(true) - $START_MICROTIME); |
|
| 1435 | 1435 | $uri = _elgg_services()->request->server->get('REQUEST_URI', 'CLI'); |
| 1436 | 1436 | // demoted to NOTICE from DEBUG so javascript is not corrupted |
| 1437 | 1437 | elgg_log("Page {$uri} generated in $time seconds", 'INFO'); |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | return $result; |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | - $diff = abs((int)$current_time - (int)$time); |
|
| 410 | + $diff = abs((int) $current_time - (int) $time); |
|
| 411 | 411 | |
| 412 | 412 | $minute = 60; |
| 413 | 413 | $hour = $minute * 60; |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | $diff = 1; |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | - $future = ((int)$current_time - (int)$time < 0) ? ':future' : ''; |
|
| 435 | + $future = ((int) $current_time - (int) $time < 0) ? ':future' : ''; |
|
| 436 | 436 | $singular = ($diff == 1) ? ':singular' : ''; |
| 437 | 437 | |
| 438 | 438 | return elgg_echo("friendlytime{$future}{$granularity}{$singular}", array($diff)); |
@@ -373,8 +373,8 @@ discard block |
||
| 373 | 373 | // only supported on values. |
| 374 | 374 | $binary = ($case_sensitive) ? ' BINARY ' : ''; |
| 375 | 375 | |
| 376 | - $return = array ( |
|
| 377 | - 'joins' => array (), |
|
| 376 | + $return = array( |
|
| 377 | + 'joins' => array(), |
|
| 378 | 378 | 'wheres' => array() |
| 379 | 379 | ); |
| 380 | 380 | |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | * @access private |
| 518 | 518 | */ |
| 519 | 519 | function _elgg_set_metastring_based_object_enabled_by_id($id, $enabled, $type) { |
| 520 | - $id = (int)$id; |
|
| 520 | + $id = (int) $id; |
|
| 521 | 521 | $db_prefix = elgg_get_config('dbprefix'); |
| 522 | 522 | |
| 523 | 523 | $object = _elgg_get_metastring_based_object_from_id($id, $type); |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | * @access private |
| 592 | 592 | */ |
| 593 | 593 | function _elgg_get_metastring_based_object_from_id($id, $type) { |
| 594 | - $id = (int)$id; |
|
| 594 | + $id = (int) $id; |
|
| 595 | 595 | if (!$id) { |
| 596 | 596 | return false; |
| 597 | 597 | } |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | * @access private |
| 620 | 620 | */ |
| 621 | 621 | function _elgg_delete_metastring_based_object_by_id($id, $type) { |
| 622 | - $id = (int)$id; |
|
| 622 | + $id = (int) $id; |
|
| 623 | 623 | $db_prefix = elgg_get_config('dbprefix'); |
| 624 | 624 | |
| 625 | 625 | switch ($type) { |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | if (elgg_trigger_event('delete', $type, $obj) && $result) { |
| 669 | - return (bool)delete_data("DELETE FROM $table WHERE id = $id"); |
|
| 669 | + return (bool) delete_data("DELETE FROM $table WHERE id = $id"); |
|
| 670 | 670 | } |
| 671 | 671 | } |
| 672 | 672 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | if ($guid) { |
| 27 | - $page_owner_guid = (int)$guid; |
|
| 27 | + $page_owner_guid = (int) $guid; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | if (isset($page_owner_guid)) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | // return guid of page owner entity |
| 35 | - $guid = (int)elgg_trigger_plugin_hook('page_owner', 'system', null, 0); |
|
| 35 | + $guid = (int) elgg_trigger_plugin_hook('page_owner', 'system', null, 0); |
|
| 36 | 36 | |
| 37 | 37 | if ($guid) { |
| 38 | 38 | $page_owner_guid = $guid; |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | ); |
| 484 | 484 | $return[] = \ElggMenuItem::factory($options); |
| 485 | 485 | |
| 486 | - if(elgg_is_logged_in()){ |
|
| 486 | + if (elgg_is_logged_in()) { |
|
| 487 | 487 | // delete link |
| 488 | 488 | $options = array( |
| 489 | 489 | 'name' => 'delete', |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | |
| 515 | 515 | $query = "SELECT * FROM {$dbprefix}entity_relationships WHERE guid_one = $user_guid AND relationship IN ('widget_state_collapsed', 'widget_state_open')"; |
| 516 | 516 | $result = get_data($query); |
| 517 | - $i=0; |
|
| 517 | + $i = 0; |
|
| 518 | 518 | if ($result) { |
| 519 | 519 | foreach ($result as $row) { |
| 520 | 520 | if (!isset($collapsed_widgets_state[$row->guid_two])) { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @access private |
| 101 | 101 | */ |
| 102 | 102 | function _elgg_comment_redirect($comment_guid, $fallback_guid) { |
| 103 | - $fail = function () { |
|
| 103 | + $fail = function() { |
|
| 104 | 104 | register_error(elgg_echo('generic_comment:notfound')); |
| 105 | 105 | forward(REFERER); |
| 106 | 106 | }; |
@@ -132,9 +132,9 @@ discard block |
||
| 132 | 132 | 'subtype' => 'comment', |
| 133 | 133 | 'container_guid' => $container->guid, |
| 134 | 134 | 'count' => true, |
| 135 | - 'wheres' => ["e.guid < " . (int)$comment->guid], |
|
| 135 | + 'wheres' => ["e.guid < " . (int) $comment->guid], |
|
| 136 | 136 | ]); |
| 137 | - $limit = (int)get_input('limit'); |
|
| 137 | + $limit = (int) get_input('limit'); |
|
| 138 | 138 | if (!$limit) { |
| 139 | 139 | $limit = elgg_trigger_plugin_hook('config', 'comments_per_page', [], 25); |
| 140 | 140 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | // escape values array and build INSERT assignments |
| 114 | 114 | $assignments = array(); |
| 115 | 115 | foreach ($col_types as $name => $type) { |
| 116 | - $values[$name] = ($type === 'int') ? (int)$values[$name] : sanitize_string($values[$name]); |
|
| 116 | + $values[$name] = ($type === 'int') ? (int) $values[$name] : sanitize_string($values[$name]); |
|
| 117 | 117 | $assignments[] = "$name = '{$values[$name]}'"; |
| 118 | 118 | } |
| 119 | 119 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | return $river_items; |
| 439 | 439 | } else { |
| 440 | 440 | $total = get_data_row($query); |
| 441 | - return (int)$total->total; |
|
| 441 | + return (int) $total->total; |
|
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | |
@@ -335,8 +335,8 @@ |
||
| 335 | 335 | */ |
| 336 | 336 | 'feed:rss' => "S'abonner au fil RSS de cette page", |
| 337 | 337 | /** |
| 338 | - * Links |
|
| 339 | - */ |
|
| 338 | + * Links |
|
| 339 | + */ |
|
| 340 | 340 | 'link:view' => "voir le lien", |
| 341 | 341 | 'link:view:all' => "Voir tout", |
| 342 | 342 | |
@@ -312,8 +312,8 @@ |
||
| 312 | 312 | */ |
| 313 | 313 | 'feed:rss' => 'RSS feed for this page', |
| 314 | 314 | /** |
| 315 | - * Links |
|
| 316 | - */ |
|
| 315 | + * Links |
|
| 316 | + */ |
|
| 317 | 317 | 'link:view' => 'view link', |
| 318 | 318 | 'link:view:all' => 'View all', |
| 319 | 319 | |