Commit 87756200 authored by C么me Chilliet's avatar C么me Chilliet

馃殰 fix: Fix codesniffer errors in all of our code

Fix codesniffer errors and warnings in all our PHP code
Adapted a bit the codesniffer profile to avoid false positives

issue #5691
parent e4529f48
......@@ -91,7 +91,7 @@ class argonautImportFile extends simplePlugin
function execute()
{
$smarty = get_smarty();
$smarty->assign('jobtypes', join(',',array_keys($this->daemon_events)));
$smarty->assign('jobtypes', join(',', array_keys($this->daemon_events)));
return parent::execute().
'<p class="plugbottom">'.
' <input type="submit" name="start_import" value="'._('Import').'" >'.
......
......@@ -72,7 +72,7 @@ class ArgonautServiceNameAttribute extends CompositeAttribute
if (in_array($name, static::$argonautService_blacklist)) {
continue;
}
$value = (isset(static::$argonautService_defaults[$name])?static::$argonautService_defaults[$name]:"");
$value = (isset(static::$argonautService_defaults[$name]) ? static::$argonautService_defaults[$name] : "");
$this->attributes[$name] = new StringAttribute ($name, "Service $name",
"service_$name", FALSE,
$value, $this->getAcl());
......@@ -93,14 +93,24 @@ class ArgonautServiceNameAttribute extends CompositeAttribute
function getValue ()
{
return array_values(array_map (function ($a) { return $a->getLabel().":".$a->getValue(); },
$this->attributes));
return array_values(array_map(
function ($a)
{
return $a->getLabel().":".$a->getValue();
},
$this->attributes
));
}
function getServiceNames ()
{
return array_map (function ($a) { return $a->getLdapName(); },
$this->attributes);
return array_map(
function ($a)
{
return $a->getLdapName();
},
$this->attributes
);
}
}
......
......@@ -28,7 +28,7 @@
session_cache_limiter("private");
session::start();
session::global_set('errorsAlreadyPosted',array());
session::global_set('errorsAlreadyPosted', array());
/* Logged in? Simple security check */
if (!session::global_is_set('ui')) {
......@@ -38,14 +38,14 @@ if (!session::global_is_set('ui')) {
}
/* There must be a mac address given */
if(!isset($_GET['mac'])){
if (!isset($_GET['mac'])) {
return;
}
$config = session::global_get("config");
$o = new supportDaemon();
$res = $o->get_entries_by_mac(explode(",", $_GET['mac']));
foreach($res as $entry){
$o = new supportDaemon();
$res = $o->get_entries_by_mac(explode(",", $_GET['mac']));
foreach ($res as $entry) {
echo $entry['MACADDRESS']."|".$entry['PROGRESS']."\n";
}
?>
......@@ -27,11 +27,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Source code for class jsonRPCClient
*/
class jsonRPCClientException extends Exception {}
class jsonRPCClientRequestErrorException extends jsonRPCClientException {}
class jsonRPCClientNetworkErrorException extends jsonRPCClientException {}
class jsonRPCClientProtocolException extends jsonRPCClientException {}
class jsonRPCClientBadArgsException extends jsonRPCClientException {}
class jsonRPCClientException extends Exception
{
}
class jsonRPCClientRequestErrorException extends jsonRPCClientException
{
}
class jsonRPCClientNetworkErrorException extends jsonRPCClientException
{
}
class jsonRPCClientProtocolException extends jsonRPCClientException
{
}
class jsonRPCClientBadArgsException extends jsonRPCClientException
{
}
/*!
* \brief The object of this class are generic jsonRPC 1.0 clients
......@@ -67,7 +77,7 @@ class jsonRPCClient {
*
* \var boolean $notification
*/
private $notification = false;
private $notification = FALSE;
/*!
* \brief HTTP options from http://www.php.net/manual/en/context.http.php
......@@ -94,7 +104,8 @@ class jsonRPCClient {
*
* \param boolean $debug false
*/
public function __construct($url, $http_options = array(), $ssl_options = array(), $debug = false) {
public function __construct($url, $http_options = array(), $ssl_options = array(), $debug = FALSE)
{
// server URL
$this->url = $url;
......@@ -107,7 +118,7 @@ class jsonRPCClient {
$this->http_options = $http_options;
$this->ssl_options = $ssl_options;
// debug state
$this->debug = ($debug?true:false);
$this->debug = ($debug ? TRUE : FALSE);
// message id
$this->id = 1;
}
......@@ -118,11 +129,12 @@ class jsonRPCClient {
*
* \param boolean $notification
*/
public function setRPCNotification($notification) {
public function setRPCNotification($notification)
{
empty($notification) ?
$this->notification = false
$this->notification = FALSE
:
$this->notification = true;
$this->notification = TRUE;
}
/*!
......@@ -134,9 +146,9 @@ class jsonRPCClient {
*
* \return array
*/
public function __call($method,$params) {
$debug="";
public function __call($method, $params)
{
$debug = "";
// check
if (!is_scalar($method)) {
......@@ -165,7 +177,7 @@ class jsonRPCClient {
'id' => $currentId
);
$request = json_encode($request);
$this->debug && $debug.='***** Request *****'."\n".$request."\n".'***** End Of request *****'."\n\n";
$this->debug && $debug .= '***** Request *****'."\n".$request."\n".'***** End Of request *****'."\n\n";
// performs the HTTP(S) POST
$opts = array (
......@@ -181,14 +193,14 @@ class jsonRPCClient {
);
$context = stream_context_create($opts);
$fp = fopenWithErrorHandling($this->url, 'r', false, $context);
$fp = fopenWithErrorHandling($this->url, 'r', FALSE, $context);
if (!is_array($fp)) {
$response = '';
while($row = fgets($fp)) {
$response.= trim($row)."\n";
while ($row = fgets($fp)) {
$response .= trim($row)."\n";
}
$this->debug && $debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n";
$response = json_decode($response,true);
$this->debug && $debug .= '***** Server response *****'."\n".$response.'***** End of server response *****'."\n";
$response = json_decode($response, TRUE);
} else {
if (!empty($fp)) {
$errormsg = implode("\n", $fp);
......@@ -206,7 +218,7 @@ class jsonRPCClient {
if ($response === NULL) {
switch (json_last_error()) {
case JSON_ERROR_NONE:
break;
break;
case JSON_ERROR_DEPTH:
throw new jsonRPCClientProtocolException('Maximum depth in response');
case JSON_ERROR_STATE_MISMATCH:
......@@ -218,7 +230,7 @@ class jsonRPCClient {
case JSON_ERROR_UTF8:
throw new jsonRPCClientProtocolException('Bad UTF-8 in response');
default:
break;
break;
}
}
......@@ -235,7 +247,7 @@ class jsonRPCClient {
return $response['result'];
} else {
return true;
return TRUE;
}
}
}
......
......@@ -46,8 +46,8 @@ class DebconfEntriesAttribute extends CompositeAttribute
while ($entry = $ldap->fetch()) {
if (isset($entry['cn'][0])) {
$cn = $entry['cn'][0];
$desc = (isset($entry['description'][0])?$entry['description'][0]:'');
$default = (isset($entry['value'][0])?$entry['default'][0]:'');
$desc = (isset($entry['description'][0]) ? $entry['description'][0] : '');
$default = (isset($entry['value'][0]) ? $entry['default'][0] : '');
$this->attributes[$cn] = new StringAttribute ($cn, $desc, "debconfentry_$cn", FALSE, $default);
$this->attributes[$cn]->setInLdap(FALSE);
$this->attributes[$cn]->setAcl($this->getAcl());
......
......@@ -13,6 +13,9 @@
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<severity>6</severity>
<properties>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing">
<severity>6</severity>
......@@ -39,7 +42,7 @@
<rule ref="Generic.WhiteSpace.DisallowTabIndent">
<severity>7</severity>
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent" >
<rule ref="Generic.WhiteSpace.ScopeIndent">
<severity>7</severity>
<properties>
<property name="exact" value="false"/> <!-- exact mode is "buggy" : does not detect array identation and so on -->
......@@ -49,11 +52,11 @@
<rule ref="PEAR.Commenting.InlineComment">
<severity>6</severity>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode.Found">
<rule ref="Squiz.PHP.CommentedOutCode">
<severity>5</severity>
<properties>
<!-- RC: 35% is too easily triggered-->
<property name="maxPercentage" value="50"/>
<!-- RC: 35% is too easily triggered-->
</properties>
</rule>
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace">
......
......@@ -2,17 +2,17 @@
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org)
Copyright (C) 2012-2016 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
......
......@@ -54,7 +54,6 @@ class DhcpSectionsAttribute extends DialogOrderedArrayAttribute
return array('not in cache',$dn,'');
}
//~ $link = "<a href='?plug=".$_GET['plug']."&act=edit&id=".$key."'>".$value[1]."</a>";
$link = $value[1];
$objtype = $this->objectType($dn);
......@@ -394,7 +393,6 @@ class DhcpSectionsAttribute extends DialogOrderedArrayAttribute
'dn' => $this->plugin->dn,
'cn' => array($this->plugin->cn),
'objectClass' => array('top', 'dhcpService'),
//~ 'dhcpPrimaryDN' => array($this->plugin->dn),
'dhcpStatements' => array(
'default-lease-time 600',
'max-lease-time 7200',
......@@ -555,10 +553,6 @@ class dhcpConfiguration extends simplePlugin
'class' => array('fullwidth'),
'attrs' => array(
new BaseSelectorAttribute(get_ou('dhcpRDN')),
//~ new HostNameAttribute (
//~ _('Name'), _('Name of this DHCP configuration'),
//~ 'cn', TRUE
//~ ),
new HiddenAttribute('cn'),
new DhcpSectionsAttribute (
'', _('The DHCP sections handled by this server'),
......@@ -698,7 +692,6 @@ class dhcpConfiguration extends simplePlugin
}
}
//~ parent::ldap_save();
return $errors;
}
}
......@@ -197,7 +197,6 @@ class DhcpHostsAttribute extends OrderedArrayAttribute
}
$valueHashes = array_flip(array_map('join', $values));
//~ $iValueHashes = array_flip(array_map('join', $iValues));
foreach ($iValues as $value) {
$hash = join($value);
if (isset($valueHashes[$hash]) && !$fullrewrite) {
......@@ -262,7 +261,13 @@ class DhcpHostsAttribute extends OrderedArrayAttribute
function fillLdapValue (&$attrs)
{
if ($this->plugin->is_template) {
$attrs[$this->getLdapName()] = array_map(function ($v) {return implode(static::$templateValueSeparator, $v);}, $this->value);
$attrs[$this->getLdapName()] = array_map(
function ($v)
{
return implode(static::$templateValueSeparator, $v);
},
$this->value
);
}
}
}
......
......@@ -73,7 +73,7 @@ class LocRecordLatLongAttribute extends CompositeAttribute
function writeValues($values)
{
/* d1 [m1 [s1]] {"N"|"S"|"E"|"W"} */
/* The format is: d1 [m1 [s1]] {"N"|"S"|"E"|"W"} */
$str = $values['degrees'];
if ($values['minutes'] != '') {
$str .= ' '.$values['minutes'];
......@@ -323,17 +323,17 @@ class DnsRecordAttribute extends CompositeAttribute
$ldapName, TRUE,
reset($this->parentIPs4)
);
break;
break;
case 'aAAARecord':
$this->attributes[1] = new IPv6Attribute(
_('Target'), _('An IPv6 address'),
$ldapName, TRUE,
reset($this->parentIPs6)
);
break;
break;
case 'LocRecord':
$this->loadLocRecordFields($ldapName);
break;
break;
case 'mXRecord':
$this->attributes[1] = new CharSeparatedCompositeAttribute(
_('MX Record'),
......@@ -351,35 +351,35 @@ class DnsRecordAttribute extends CompositeAttribute
),
' '
);
break;
break;
case 'nAPTRRecord':
$this->loadNaptrRecordFields($ldapName);
break;
break;
case 'nSRecord':
$this->attributes[1] = new FQDNAttribute(
_('Target'), _('Domain name which specifies a host which should be authoritative for the specified class and domain'),
$ldapName, TRUE
);
break;
break;
case 'sRVRecord':
$this->loadSrvRecordFields($ldapName);
break;
break;
case 'sSHFPRecord':
$this->attributes[1] = new StringAttribute(
_('Record'), _('SSHFP record content. Can be obtained using "ssh-keygen -r some.host.tld", or sshfp command for instance'),
$ldapName, TRUE
);
break;
break;
case 'cNAMERecord':
$this->attributes[1] = new StringAttribute(
_('Redirect to'), _('Domain that this subdomain is an alias of'),
$ldapName, TRUE,
$this->parentFQDN
);
break;
break;
default:
$this->attributes[1] = new StringAttribute(_('Content'), _('Content of this record'), $ldapName, TRUE);
break;
break;
}
if (in_array($type, static::$reverseTypes)) {
$this->attributes[2]->setVisible(TRUE);
......
......@@ -657,7 +657,7 @@ class dnsZone extends simplePlugin
'zoneName', TRUE
),
new HiddenAttribute (
//~ _('Relative domain name'), _('Relative domain name'),
// Relative domain name
'relativeDomainName', TRUE,
'@'
),
......
......@@ -93,7 +93,13 @@ class DnsRecordsFilteredAttribute extends DnsRecordsAttribute
function fillLdapValue (&$attrs)
{
if ($this->plugin->is_template) {
$attrs[$this->getLdapName()] = array_map(function ($v) {return implode(static::$templateValueSeparator, $v);}, $this->value);
$attrs[$this->getLdapName()] = array_map(
function ($v)
{
return implode(static::$templateValueSeparator, $v);
},
$this->value
);
}
}
......
......@@ -120,7 +120,7 @@ class EjbcaUserCertsAttribute extends GenericDialogAttribute
{
$id = $this->getHtmlId();
$buttons = '<input type="submit" name="add'.$id.'_dialog" id="add'.$id.'_dialog"'.
($this->disabled? ' disabled="disabled"':'').
($this->disabled ? ' disabled="disabled"' : '').
' value="{msgPool type=addButton}"/>';
return $buttons;
}
......
......@@ -49,7 +49,7 @@ class PackageConfigDialog extends GenericDialog
function __construct($simplePlugin, &$attribute, $key, $pkg_config)
{
$this->attribute = $attribute;
$this->dialog = new $this->dialogClass($simplePlugin->dn, $key, $simplePlugin->FAIdebianRelease , $pkg_config);
$this->dialog = new $this->dialogClass($simplePlugin->dn, $key, $simplePlugin->FAIdebianRelease, $pkg_config);
}
function execute ()
......@@ -124,10 +124,10 @@ class PackagesAttribute extends DialogOrderedArrayAttribute
{
$id = $this->getHtmlId();
$buttons = '<input type="submit" name="add'.$id.'" id="add'.$id.'"'.
($this->disabled? ' disabled="disabled"':'').
($this->disabled ? ' disabled="disabled"' : '').
' value="{msgPool type=addButton}"/>';
$buttons .= '<input type="submit" name="add'.$id.'_dialog" id="add'.$id.'_dialog"'.
($this->disabled? ' disabled="disabled"':'').
($this->disabled ? ' disabled="disabled"' : '').
' value="{msgPool type=addButton}{t} from list{/t}"/>';
return $buttons;
}
......@@ -304,7 +304,7 @@ class PackagesAttribute extends DialogOrderedArrayAttribute
if (count($packages) > 0) {
msg_dialog::display(_("Unkown packages"), "The following packages were not found on the repository : ".join(",", $packages), ERROR_DIALOG);
foreach($packages as $p => $pp) {
foreach ($packages as $p => $pp) {
unset($this->value[$p]);
}
}
......@@ -359,8 +359,8 @@ class PackagesAttribute extends DialogOrderedArrayAttribute
}
$this->configuredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]] = $tmp;
} else {
$tmp['Value'] = "";
$this->configuredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]] = $tmp;
$tmp['Value'] = "";
$this->configuredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]] = $tmp;
}
}
}
......@@ -459,12 +459,12 @@ class faiPackage extends faiSimplePluginClass
/* Assemble release name */
$tmp = preg_replace('/'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $this->base);
preg_match_all('/ou=([^=,]+),/', $tmp, $m);
/* m[1][0] is release, m[1][1] is distribution */
/* m[1][0] is release and m[1][1] is distribution */
$this->FAIdebianRelease = $m[1][0];
/* Assemble sections */
$repos = $this->getServerInfos();
if(isset($repos[$this->FAIdebianRelease])) {
if (isset($repos[$this->FAIdebianRelease])) {
$this->FAIdebianSection = $repos[$this->FAIdebianRelease];
$this->FAIdebianSection = array_unique($this->FAIdebianSection);
}
......
......@@ -98,19 +98,19 @@ class FaiPartitionSizeAttribute extends CompositeAttribute
$this->attributes[2]->setVisible(FALSE);
$this->attributes[3]->setVisible(FALSE);
$this->attributes[4]->setVisible(FALSE);
break;
break;
case 'fixed':
$this->attributes[1]->setVisible(TRUE);
$this->attributes[2]->setVisible(TRUE);
$this->attributes[3]->setVisible(FALSE);
$this->attributes[4]->setVisible(FALSE);
break;
break;
case 'dynamic':
$this->attributes[1]->setVisible(TRUE);
$this->attributes[2]->setVisible(TRUE);
$this->attributes[3]->setVisible(TRUE);
$this->attributes[4]->setVisible(TRUE);
break;
break;
}
}
......@@ -132,11 +132,11 @@ class FaiPartitionSizeAttribute extends CompositeAttribute
if ($this->attributes[0]->getValue() == 'dynamic') {
$mp = array(
'%' => 1,
'KB' => pow(1024,0),
'MB' => pow(1024,1),
'GB' => pow(1024,2),
'TB' => pow(1024,3),
'PB' => pow(1024,4)
'KB' => pow(1024, 0),
'MB' => pow(1024, 1),
'GB' => pow(1024, 2),
'TB' => pow(1024, 3),
'PB' => pow(1024, 4)
);
$res1 = $this->attributes[1]->getValue() * $mp[$this->attributes[2]->getValue()];
$res2 = $this->attributes[3]->getValue() * $mp[$this->attributes[4]->getValue()];
......@@ -358,7 +358,7 @@ class faiPartition extends simplePlugin
$disablePrimary = FALSE;
if (!$object || ($object['FAIpartitionType'] == 'logical')) {
$types = array('logical' => array(), 'primary' => array());
foreach ($this->parent->partitions as $part){
foreach ($this->parent->partitions as $part) {
$types[$part['FAIpartitionType']][$part['FAIpartitionNr']] = 1;
}
if (count($types['logical']) && (count($types['primary']) >= 3)) {
......@@ -435,7 +435,6 @@ class faiPartition extends simplePlugin
protected function loadAttributes()
{
foreach ($this->attributesAccess as &$attribute) {
//~ $attribute->setInLdap(FALSE);
$attribute->setAcl('FAIpartitions');
}
unset($attribute);
......@@ -496,7 +495,7 @@ class faiPartition extends simplePlugin
if ($this->encrypted) {
$ret['FAImountPoint'] .= ':encrypt';
}
} elseif($this->FAIdiskType == 'raid') {
} elseif ($this->FAIdiskType == 'raid') {
$ret['FAIpartitionSize'] = $ret['raidDevices'];
unset($ret['raidDevices']);
}
......@@ -518,7 +517,7 @@ class faiPartition extends simplePlugin
// Add partition from lvm combinations
if ($disk['FAIdiskType'] == 'lvm') {
$used = array_merge($used,$disk['FAIlvmDevice']);
$used = array_merge($used, $disk['FAIlvmDevice']);
}
foreach ($disk['partitions'] as $part) {
......
......@@ -168,9 +168,9 @@ class PartitionTableAttribute extends DialogOrderedArrayAttribute
}
}
$diskInfos['dn'] = $subattrs['dn'];
$this->value[$diskInfos['dn']] = $diskInfos;
$this->value[$diskInfos['dn']]['partitions'] = array();
$diskInfos['dn'] = $subattrs['dn'];
$this->value[$diskInfos['dn']] = $diskInfos;
$this->value[$diskInfos['dn']]['partitions'] = array();
}
/* Fetch partitions */
foreach ($this->value as $name => $disk) {
......
......@@ -99,7 +99,7 @@ class AccessRightsAttribute extends CompositeAttribute
$tmode = preg_replace('/^./', '', $tmode);
$nr = 1;
while ($nr < 5) {
$m[$type.$nr] = ($current & $nr?'TRUE':'FALSE');
$m[$type.$nr] = ($current & $nr ? 'TRUE' : 'FALSE');
$nr += $nr;
}
}
......
......@@ -207,7 +207,7 @@ class faiLogView extends simplePlugin
/* Check if there is at least one log file */
if (isset($res[$this->mac]) && is_array($res[$this->mac])) {
$this->attributesAccess['available_logs']->logs = $res;
$this->is_account = TRUE;
$this->is_account = TRUE;
}
}
}
......
......@@ -286,11 +286,11 @@ class serviceRepository extends simpleService
$infos['URL'] = $tmp[0];
$infos['PARENT_SERVER'] = $tmp[1];
$infos['FAI_RELEASE'] = $tmp[2];
$infos['SECTIONS'] = (empty($tmp[3])?array():explode(',', $tmp[3]));
$infos['SECTIONS'] = (empty($tmp[3]) ? array() : explode(',', $tmp[3]));
$infos['INSTALL'] = $tmp[4];
$infos['LOCAL'] = $tmp[5];
$infos['ARCHS'] = (empty($tmp[6])?array():explode(',', $tmp[6]));
$infos['DIST'] = (isset($tmp[7])?$tmp[7]:'debian');
$infos['ARCHS'] = (empty($tmp[6]) ? array() : explode(',', $tmp[6]));
$infos['DIST'] = (isset($tmp[7]) ? $tmp[7] : 'debian');
$repos[] = $infos;
}
}
......
......@@ -173,7 +173,7 @@ class fiInventory extends simplePlugin
$ldap = $config->get_ldap_link();
if ($this->mainTab) {
$dn = $this->dn;
$dn = $this->dn;
$macAddress = $this->attrs['macAddress'];
$ipHostNumber = $this->attrs['ipHostNumber'];
unset($macAddress['count']);
......
This diff is collapsed.
......@@ -63,8 +63,8 @@ class pgpKeySelect extends simpleSelectManagement
}
$this->filter->setObjectStorage($this->storagePoints);
$this->filter->category = 'user';
$this->filter->query['0']['backend'] = 'LDAPBlacklist';
$attributes = array('pgpKeyID', 'pgpUserID', 'pgpKeyCreateTime', 'pgpKeyExpireTime', 'pgpKeyType', 'pgpKeySize');
$this->filter->query[0]['backend'] = 'LDAPBlacklist';
$this->filter->query[0]['filter'] = '$NAME';
$this->filter->query[0]['attribute'] = $attributes;
$this->filter->elements['NAME']['set'] = '(|('.join('=*$*)(', $attributes).'=*$*))';
......@@ -78,7 +78,7 @@ class pgpKeySelect extends simpleSelectManagement
return '&nbsp;';
}
$return = static::$func($value[0]);
return ($return === ''?'&nbsp;':$return);
return ($return === '' ? '&nbsp;' : $return);
}
static function filterPgpDate($value = array())
......@@ -116,7 +116,7 @@ class pgpKeySelect extends simpleSelectManagement
static function pgpRevoked($value)
{
// Remove useless 0 at the beginning
return ($value == 0?'No':'Yes');
return ($value == 0 ? 'No' : 'Yes');
}
}
......@@ -247,7 +247,7 @@ class PgpKeyAttribute extends GenericDialogAttribute
{
$id = $this->getHtmlId();
$buttons = '<input type="submit" name="add'.$id.'_dialog" id="add'.$id.'_dialog"'.
($this->disabled? ' disabled="disabled"':'').
($this->disabled ? ' disabled="disabled"' : '').
' value="{msgPool type=addButton}"/>';
return $buttons;
}
......
......@@ -23,8 +23,6 @@ class ipmiClient extends simplePlugin
var $objectclasses = array('ipmiClient');
var $displayHeader = TRUE;
//~ var $inheritance = array("gosaGroupOfNames" => "member");
static function plInfo ()
{
return array(
......
......@@ -87,12 +87,6 @@ class csvimport extends simplePlugin
'fields' => array(
'name' => _('Template filling'),
'attrs' => array(
/*new SetAttribute(
new SelectAttribute(
_('Additional fields'), _('Non-required template field that you still want to provide'),
'additionals', FALSE
)
),*/
new CompositeAttribute (
_('Select fields associations'),
'fields',
......
......@@ -32,10 +32,6 @@ class mixedGroup extends simplePlugin
'plObjectType' => array('ogroup-user'),
'plPriority' => 1,