summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04bd102)
raw | patch | inline | side by side (parent: 04bd102)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Mar 2008 10:04:20 +0000 (10:04 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Mar 2008 10:04:20 +0000 (10:04 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9299 594d385d-05f5-0310-b6e9-bd551577e9d8
12 files changed:
diff --git a/gosa-plugins/systems/admin/systems/class_baseSelectDialog.inc b/gosa-plugins/systems/admin/systems/class_baseSelectDialog.inc
index 04275e0def0d49938c66d7ce6adb17e2409ec7ff..74d3cf24b7158385b2e0f4838554c42549e8456d 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class baseSelectDialog extends MultiSelectWindow
{
diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 583625188ab6e8c2063b5ba4f5025d699feb759d..5815a4a90ed5cfec54b70cf46eed28ea658a658a 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class componentGeneric extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage component base objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* Generic terminal attributes */
var $interfaces= array();
var $ignore_account= TRUE;
$this->dn= "cn=".$this->cn.",".get_ou('componentou').$this->base;
if ($this->cn == "" ){
- $message[]= _("The required field 'Component name' is not set.");
+ $message[]= msgPool::required(_("Component name"));
}
/* Check if given name is a valid host/dns name */
if(!tests::is_dns_name($this->cn)){
- $message[] = _("Please specify a valid name for this object.");
+ $message[]= msgPool::invalid(_("Component name"), $this->cn, "/[a-z0-9\.\-]/i");
}
/* To check for valid ip*/
if($this->netConfigDNS->ipHostNumber == ""){
- $message[]= _("The required field IP address is empty.");
+ $message[]= msgPool::required(_("IP address"));
} else {
if (!tests::is_ip($this->netConfigDNS->ipHostNumber)){
- $message[]= _("The field IP address contains an invalid address.");
+ $message[]= msgPool::invalid(_("IP address"), "", "", "192.168.1.2");
}
}
continue;
}
if ($attrs['dn'] != $this->orig_dn){
- $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
+ $message[]= msgPool::duplicated(_("Component name"));
break;
}
}
diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc
index 5c5a9703f1d3645423ba58cc61dee0e0bdaadf64..d99b291ea3c9e473a5842c834a5bae0e9b677d8c 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class divListSystem extends MultiSelectWindow
{
diff --git a/gosa-plugins/systems/admin/systems/class_divListSystemService.inc b/gosa-plugins/systems/admin/systems/class_divListSystemService.inc
index ca31601baef7452cc17630c936b0380d178daf4e..240ac3d02dafea9322b4c523f86c89f67fc8c802 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class divListSystemService extends MultiSelectWindow
{
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index 4e75bb711a8fb1a885f45359e2c60bd8478f620c..c42b16683468c766cbc695b86fb4a27df93e4a2b 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class servgeneric extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server base objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* Generic terminal attributes */
var $ignore_account= TRUE;
var $interfaces= array();
/* must: cn */
if ($this->cn == ""){
- $message[]= _("The required field 'Server name' is not set.");
+ msgPool::required(_("Server name"));
}
/* Check if given name is a valid host/dns name */
if(!tests::is_dns_name($this->cn)){
- $message[] = _("Please specify a valid name for this object.");
+ $message[]= msgPool::invalid(_("Server name"), $this->cn, "/[a-z0-9\.\-]/i");
}
if ($this->orig_dn != $this->dn){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".get_ou('incomingou')."/",$attrs['dn']) && preg_match("/,".get_ou('serverou')."/",$attrs['dn'])){
- $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
+ $message[]= msgPool::duplicated(_("Server name"));
break;
}
}
diff --git a/gosa-plugins/systems/admin/systems/class_serverService.inc b/gosa-plugins/systems/admin/systems/class_serverService.inc
index e3a3448902c19b5a1d218b6d3ac427d08fbf2838..c984753b7896424c655721d5756d7b59b6afc419 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
define("START_SERVICE",1);
define("STOP_SERVICE",2);
class ServerService extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server services";
- var $cli_description = "Managing services by adding,removing and configuring services. Allows to start/stop used services.";
- var $cli_parameters = array("config"=>"Config object" , "dn"=>"Object dn");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array();
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 066503860a7d851f91a14aa4e7df385db674887c..e5d66afcc17849ebad7e1ac8affb9f53a8291da9 100644 (file)
<?php
/*
- This code is part of GOsa (https://gosa.gonicus.de)
- Copyright (C) 2003 Cajus Pollmeier
-
- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
class systems extends plugin
diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index 45895c26da70275bb238425ae8ed765298e277c5..25bf4e4b5ab73ffc1337418e37fafb83bd674955 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class termDNS extends plugin
{
/* Call common method to give check the hook */
$message= plugin::check();
- if($this->dhcpEnabled && $this->dhcp_is_Account && $this->dhcpParentNode != "" && count($this->dhcpHostEntry) == 0){
+# if($this->dhcpEnabled && $this->dhcp_is_Account && $this->dhcpParentNode != "" && count($this->dhcpHostEntry) == 0){
# $message[] =_("You have not configured your dhcp settings yet.");
- }
+# }
/* Check if mac and ip are already used */
if(!empty($this->ipHostNumber) && $this->DNS_is_account &&
$this->ipHostNumber != $this->orig_ipHostNumber &&
in_array("ip:".$this->ipHostNumber,$this->used_ip_mac)){
- $message[] =_("The specified IP address is already in use.");
+ $message[]= msgPool::duplicated(_("IP address"));
}
if(!empty($this->macAddress) && $this->dhcp_is_Account &&
$this->macAddress != $this->orig_macAddress &&
in_array("mac:".$this->macAddress,$this->used_ip_mac)){
- print_red(sprintf(_("The specified MAC address '%s' for this system '%s' is already in use."),$this->macAddress,$this->cn));
+ $message[]= msgPool::duplicated(_("MAC address"));
}
/* Check if ip must be given
*/
if(($this->IPisMust)||($this->DNS_is_account)){
if (empty($this->ipHostNumber)){
- $message[]= _("The required field 'IP-address' is not set.");
+ $message[]= msgPool::required(_("IP address"));
}
if (!tests::is_ip($this->ipHostNumber)){
- $message[]= _("Wrong IP format in field IP-address.");
+ $message[]= msgPool::invalid(_("IP address"), "", "", "192.168.1.10");
}
}
/* Check if mac is empty
*/
if ($this->macAddress == "" ){
- $message[]= _("The required field 'MAC-address' is not set.");
+ $message[]= msgPool::required(_("IP address"));
}
if(!tests::is_mac($this->macAddress)){
- $message[]=(_("The given macaddress is invalid. There must be 6 2byte segments seperated by ':'."));
+ $message[]= msgPool::invalid(_("MAC address"), "", "", "00:0C:7F:31:33:F1");
}
/* only perfrom this checks if this is a valid DNS account */
$tmp2 = $tmp[$this->dnsEntry['zoneName']];
if(!$this->netmaskIsCoherent($tmp2)){ //this->dnsEntry['zoneName'])){
$tmp2 = preg_replace("/^.*\//","",$tmp2);
- $message[] =sprintf(_("The specified IP address '%s' is not matching the selected reverse zone entry '%s'."),$this->ipHostNumber,$tmp2);
+ $message[] =sprintf(_("The IP address '%s' is not part of the selected reverse zone '%s'!"),$this->ipHostNumber,$tmp2);
}
/* Walk through all entries and detect duplicates or mismatches
if(!isset($checkArray[$values['type']][$values['value']])){
$checkArray[$values['type']][$values['value']] = 0;
}else{
- $message[] = sprintf(_("Found duplicate value for record type '%s'."),$values['type']);
+ $message[] = sprintf(_("Record type '%s' is duplicated!"),$values['type']);
}
/* Check if given entries in $onlyOnce are used more than once
if(isset($onlyOnce[$values['type']])){
$onlyOnce[$values['type']] ++;
if($onlyOnce[$values['type']] > 1){
- $message[] = sprintf(_("Found more than one entry for the uniqe record type '%s'."),$values['type']);
+ $message[] = sprintf(_("Uniq record type '%s' is duplicated!"),$values['type']);
}
}
/* Check if there is an aRecord defined which uses the same IP as used in IPhostAddress
*/
if(($values['type'] == "aRecord")&&($values['value'] == $this->ipHostNumber)){
- $message[]=sprintf(_("The device IP '%s' is added as 'A Record', this will be done automatically, please remove the record."),
+ #TODO: Where's the problem here?
+ $message[]=sprintf(_("The IP address '%s' will is added as 'A Record', this will be done automatically, please remove the record."),
$this->ipHostNumber);
}
/* only lower-case is allowed in record entries ...
*/
if($values['value'] != strtolower($values['value'])){
- $message[] = sprintf(_("Only lowercase is allowed, please check your '%ss'."),$values['type']);
+ #TODO: What's in values['value']? Something for a propper message?
+ $message[] = sprintf(_("Only lowercase records are allowed, please check your '%ss'."),$values['type']);
}
}
}
diff --git a/gosa-plugins/systems/admin/systems/main.inc b/gosa-plugins/systems/admin/systems/main.inc
index a43df0999be575b5cc0d28a3644cfa852203bfe6..2eaf679216558d5d6348d22d3931e7ab56fc02cf 100644 (file)
<?php
/*
- This code is part of GOsa (https://gosa.gonicus.de)
- Copyright (C) 2003 Cajus Pollmeier
-
- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
if ($remove_lock){
if(session::is_set('systems')){
diff --git a/gosa-plugins/systems/admin/systems/tabs_arpnewdevice.inc b/gosa-plugins/systems/admin/systems/tabs_arpnewdevice.inc
index fe12b4090b62747540af2a5d6cbabe093fc3b93c..31864833dfa5e7d4686ffcaf1e8baf5882ef3114 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class ArpNewDeviceTabs extends tabs
{
diff --git a/gosa-plugins/systems/admin/systems/tabs_component.inc b/gosa-plugins/systems/admin/systems/tabs_component.inc
index 924b6308e6102b84f4fd6bd1217f7b28d637b48c..c883831827dcb36e66e1a6e65e629d9dc3ef7ae9 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class componenttabs extends tabs
{
diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc
index 3c09bb5cea623864be743b48a7a7842ac23dbfbe..4255ae711441f48a4d7d2131a9fa32c052847234 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
class servtabs extends tabs
{