Commit 9358b41a authored by Donal McMullan's avatar Donal McMullan
Browse files

Replace 'if(' with 'if (' in introduced code

parent 91bd3891
......@@ -41,7 +41,7 @@ class Application {
);
public function __construct($result = null) {
if(null == $result) {
if (null == $result) {
return;
}
$this->populate($result);
......
......@@ -523,15 +523,15 @@ function get_config_plugin($plugintype, $pluginname, $key) {
// Suppress NOTICE with @ in case $key is not yet cached
@$value = $CFG->plugin->{$plugintype}->{$pluginname}->{$key};
if(isset($value)) {
if (isset($value)) {
return $value;
}
$records = get_records_array($plugintype . '_config', 'plugin', $pluginname, 'field', 'field, value');
if(!empty($records)) {
if (!empty($records)) {
foreach($records as $record) {
$CFG->plugin->{$plugintype}->{$pluginname}->{$record->field} = $record->value;
if($record->field == $key) {
if ($record->field == $key) {
$value = $record->value;
}
}
......@@ -582,15 +582,15 @@ function get_config_plugin_instance($plugintype, $pluginid, $key) {
// Suppress NOTICE with @ in case $key is not yet cached
@$value = $CFG->plugin->{$plugintype}->{$instance}->{$key};
if(isset($value)) {
if (isset($value)) {
return $value;
}
$records = get_records_array($plugintype . '_instance_config', 'instance', $pluginid, 'field', 'field, value');
if(!empty($records)) {
if (!empty($records)) {
foreach($records as $record) {
$CFG->plugin->{$plugintype}->{$instance}->{$record->field} = $record->value;
if($record->field == $key) {
if ($record->field == $key) {
$value = $record->value;
}
}
......
......@@ -50,7 +50,7 @@ class Peer {
public function __construct($result = null) {
if(null == $result) {
if (null == $result) {
require_once(get_config('libroot') . 'application.php');
$this->application = new Application();
return;
......@@ -209,7 +209,7 @@ class Peer {
$this->institution = $institution;
}
if(empty($pubkey)) {
if (empty($pubkey)) {
try {
$somekey = get_public_key($this->wwwroot, $this->appname);
$this->publickey = new PublicKey($somekey, $this->wwwroot);
......
......@@ -40,7 +40,7 @@ function smarty_function_loadquota($params, &$smarty) {
}
$smarty->assign('QUOTA_MESSAGE', $quota_message);
if($quota == 0) {
if ($quota == 0) {
$smarty->assign('QUOTA_PERCENTAGE', 100);
} else {
$smarty->assign('QUOTA_PERCENTAGE', round($quotaused / $quota * 100));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment