Skip to content
Permalink
Browse files

More bug fixes.

1. Host MAC table should not allow duplicate MACs ever.
This is addressing the hostMAC table to only allow a single mac address rather than associating duplicate mac's with multiple different hosts. While this is kind of allowable, really we only want one mac associated.

2. Service page editing should return to item being edited.
This is addressing updates from the service page redirecting to the home page on any update. It also address the form actions to pass the subs to the edit method so the updates can actually take effect. Base updates where enabling default and main item worked but if there was additional entries the form missed the edit item.

3. Initial submission to address legacy client functionality.
The 1.3.1/1.3.2 series to address the new client failed to recognize the legacy client. This corrects the action to ensure legacy functionality remains. Still testing to ensure all legacy components are at least functioning from a logging standpoint.
  • Loading branch information...
mastacontrola committed Jan 18, 2017
1 parent b632dd0 commit 3fe54ced5c8beede71434ffc5227b2c1ee97e190
@@ -2570,20 +2570,14 @@
DATABASE_NAME,
array(
'hostAutoLogOut',
array(
'haloHostID',
'haloTime'
)
array('haloHostID')
)
),
$tmpSchema->dropDuplicateData(
DATABASE_NAME,
array(
'hostMAC',
array(
'hmHostID',
'hmMAC'
)
array('hmMAC')
)
),
$tmpSchema->dropDuplicateData(
@@ -2631,10 +2625,7 @@
DATABASE_NAME,
array(
'nfsGroupMembers',
array(
'ngmMemberName',
'ngmGroupID'
)
array('ngmMemberName')
)
),
$tmpSchema->dropDuplicateData(
@@ -3601,3 +3592,11 @@
. " should or should not display fog version information. (Default is "
. "on)','1','General Settings')"
);
// 246
$this->schema[] = $tmpSchema->dropDuplicateData(
DATABASE_NAME,
array(
'hostMAC',
array('hmMAC')
)
);
@@ -59,40 +59,42 @@ public function __construct(
) {
try {
parent::__construct();
$globalInfo = array_intersect_key(
$this->getGlobalModuleStatus(),
array($this->shortName => '')
);
if (!(isset($globalInfo[$this->shortName])
&& $globalInfo[$this->shortName])
) {
throw new Exception('#!ng');
}
global $sub;
global $json;
$method = 'send';
if (self::$json && method_exists($this, 'json')) {
$method = 'json';
}
$this->Host = self::getHostItem(
$service,
$encoded,
$hostnotrequired,
$returnmacs,
$override
);
$hostModInfo = self::getSubObjectIDs(
'Module',
array(
'id' => $this->Host->get('modules'),
'shortName' => $this->shortName
),
'shortName'
);
if (false === $hostnotrequired
&& !in_array($this->shortName, $hostModInfo)
) {
throw new Exception('#!nh');
if (self::$json) {
$globalInfo = array_intersect_key(
$this->getGlobalModuleStatus(),
array($this->shortName => '')
);
if (!(isset($globalInfo[$this->shortName])
&& $globalInfo[$this->shortName])
) {
throw new Exception('#!ng');
}
$hostModInfo = self::getSubObjectIDs(
'Module',
array(
'id' => $this->Host->get('modules'),
'shortName' => $this->shortName
),
'shortName'
);
if (false === $hostnotrequired
&& !in_array($this->shortName, $hostModInfo)
) {
throw new Exception('#!nh');
}
if (method_exists($this, 'json')) {
$method = 'json';
}
}
$validClientBrowserFiles = array(
'jobs.php',
@@ -133,7 +133,7 @@ public function dropDuplicateData(
$tablename
);
$queries[] = sprintf(
'ALTER TABLE `%s`.`_%s` ADD UNIQUE %s',
'ALTER TABLE `%s`.`_%s` ADD UNIQUE INDEX %s',
$dbname,
$tablename,
$ending
@@ -53,8 +53,8 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '45223');
define('FOG_SCHEMA', 245);
define('FOG_VERSION', '6323');
define('FOG_SCHEMA', 246);
define('FOG_BCACHE_VER', 112);
define('FOG_SVN_REVISION', 6063);
define('FOG_CLIENT_VERSION', '0.11.8');
@@ -341,7 +341,7 @@ public function edit()
);
printf(
'<h2>%s</h2>'
. '<form method="post" action="%s&tab=%s">'
. '<form method="post" action="%s&sub=edit&tab=%s">'
. '<p>%s: <input type="text" name="adddir"/></p>'
. '<p><input type="hidden" name="name" value="%s"/>'
. '<input type="submit" value="%s"/></p><h2>%s</h2>',
@@ -392,7 +392,7 @@ public function edit()
$y
) = self::getSubObjectIDs(
'Service',
array('names' => $disps),
array('name' => $disps),
'value',
false,
'AND',
@@ -423,7 +423,7 @@ public function edit()
),
);
printf(
'<h2>%s</h2><form method="post" action="%s&tab=%s">',
'<h2>%s</h2><form method="post" action="%s&sub=edit&tab=%s">',
_('Default Setting'),
$this->formAction,
$Module->get('shortName')
@@ -479,7 +479,7 @@ public function edit()
);
printf(
'<h2>%s</h2>'
. '<form method="post" action="%s&tab=%s">'
. '<form method="post" action="%s&sub=edit&tab=%s">'
. '<p>%s <input class="short" type="text" name='
. '"h" maxlength="2" value="HH" onFocus='
. '"$(this).val(\'\');"/>:<input class="short" type='
@@ -569,7 +569,7 @@ public function edit()
)
);
printf(
'<h2>%s</h2><form method="post" action="%s&tab=%s">',
'<h2>%s</h2><form method="post" action="%s&sub=edit&tab=%s">',
_('Add Protected User'),
$this->formAction,
$Module->get('shortName')
@@ -745,7 +745,13 @@ public function editPost()
);
$this->setMessage($e->getMessage());
}
$this->redirect($this->formAction);
$this->redirect(
sprintf(
'?node=%s#%s',
$_REQUEST['node'],
$_REQUEST['tab']
)
);
}
/**
* Redirect search call to index.
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fog-project-2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-23 07:36-0400\n"
"Last-Translator: vspushbullet <vspushbullet@gmail.com>\n"
"Language-Team: German\n"
@@ -7480,7 +7480,7 @@ msgstr "Ausstehende Eintragung erstellt von FOG_CLIENT"
msgid "Too many MACs"
msgstr "Primäre MAC Host"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "Hier erlaubt nicht"
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -7454,7 +7454,7 @@ msgstr "Pending Registration created by FOG_CLIENT"
msgid "Too many MACs"
msgstr "Host Primary MAC"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "Not allowed here"
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -7474,7 +7474,7 @@ msgstr "A la espera de registro creado por FOG_CLIENT"
msgid "Too many MACs"
msgstr "Host de nivel MAC"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "No se permite aquí"
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -7480,7 +7480,7 @@ msgstr "Inscription en attente créée par FOG_CLIENT"
msgid "Too many MACs"
msgstr "Hôte MAC primaire"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "Non autorisé ici"
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -7467,7 +7467,7 @@ msgstr "In attesa di registrazione creato da FOG_CLIENT"
msgid "Too many MACs"
msgstr "Host primario MAC"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "Non ammessi qui"
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:13-0500\n"
"POT-Creation-Date: 2017-01-18 17:57-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -7077,7 +7077,7 @@ msgstr ""
msgid "Too many MACs"
msgstr ""

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr ""
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -7461,7 +7461,7 @@ msgstr "Na pendência de Registro criado por FOG_CLIENT"
msgid "Too many MACs"
msgstr "Hospedeiro primário MAC"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "Não permitido aqui"
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-18 09:08-0500\n"
"POT-Creation-Date: 2017-01-18 17:12-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -7434,7 +7434,7 @@ msgstr "通过创建FOG_CLIENT登记待定"
msgid "Too many MACs"
msgstr "主机主MAC"

#: /var/www/fog/lib/client/fogclient.class.php:108
#: /var/www/fog/lib/client/fogclient.class.php:110
#: /var/www/fog/commons/text.php:233
msgid "Not allowed here"
msgstr "这里不允许"

0 comments on commit 3fe54ce

Please sign in to comment.
You can’t perform that action at this time.