Skip to content

Commit a230491

Browse files
committed
Password recovry updated
1 parent a43f4ae commit a230491

54 files changed

Lines changed: 173 additions & 152 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
},
1414
"autoload": {
1515
"psr-4": {
16-
"Icinga\\Editor\\Engine\\": "src/classes/",
16+
"Icinga\\Editor\\": "src/classes/",
17+
"Icinga\\Editor\\Engine\\": "src/classes/engine/",
1718
"Icinga\\Editor\\UI\\": "src/classes/UI"
1819
}
1920
},

nbproject/private/private.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
<group name="Monitoring">
1111
<file>file:/home/vitex/Projects/VitexSoftware/iciedit/src/includes/Configure.php</file>
1212
</group>
13-
<group>
14-
<file>file:/home/vitex/Projects/VitexSoftware/icinga_configurator/src/includes/IEInit.php</file>
15-
<file>file:/home/vitex/Projects/VitexSoftware/icinga_configurator/src/classes/IEBootstrapMenu.php</file>
16-
<file>file:/home/vitex/Projects/VitexSoftware/icinga_configurator/composer.json</file>
17-
<file>file:/home/vitex/Projects/VitexSoftware/icinga_configurator/src/classes/IEMainMenu.php</file>
18-
<file>file:/home/vitex/Projects/VitexSoftware/icinga_configurator/vendor/composer/autoload_psr4.php</file>
19-
</group>
13+
<group/>
2014
</open-files>
2115
</project-private>

src/cfgconfirm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
if ($host_id && $hash) {
1818
$host = new IEHost($host_id);
1919
$host->setDataValue('config_hash', $hash);
20-
if ($host->saveToMySQL()) {
20+
if ($host->saveToSQL()) {
2121
echo sprintf(_('Konfigurace %s potvrzena'), $host->getName());
2222
} else {
2323
echo sprintf(_('Chyba potvrzení konfigurace'), $host->getName());

src/classes/IEDataSource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function ajaxify()
127127
break;
128128
case 'add':
129129
if ($this->controlAddColumns()) {
130-
if ($this->insertToMySQL()) {
130+
if ($this->insertToSQL()) {
131131
$this->webPage->addStatusMessage(_('Záznam byl přidán'), 'success');
132132
} else {
133133
$this->webPage->addStatusMessage(_('Záznam nebyl přidám'), 'error');
@@ -136,7 +136,7 @@ function ajaxify()
136136
break;
137137
case 'edit':
138138
if ($this->controlEditColumns()) {
139-
if ($this->saveToMySQL()) {
139+
if ($this->saveToSQL()) {
140140
$this->webPage->addStatusMessage(_('Záznam byl upraven'), 'success');
141141
} else {
142142
$this->webPage->addStatusMessage(_('Záznam nebyl upravn'), 'error');

src/classes/IEDbFixer.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function fixHostNameIDs()
4747
}
4848
}
4949
if (count($hostsOK)) {
50-
if ($service->saveToMySQL()) {
50+
if ($service->saveToSQL()) {
5151
$this->addItemSmart(sprintf(_('<strong>%s</strong> : %s'), $service->getName(), implode(',', $hostsOK)), array('class' => 'list-group-item'));
5252
$this->addStatusMessage(sprintf(_('%s : %s'), $service->getName(), implode(',', $hostsOK)), 'success');
5353
$hostsOK = array();
@@ -70,7 +70,7 @@ public function fixHostNameIDs()
7070
}
7171
}
7272
if (count($hostsOK)) {
73-
if ($hostgroup->saveToMySQL()) {
73+
if ($hostgroup->saveToSQL()) {
7474
$this->addItemSmart(sprintf(_('<strong>%s</strong> : %s'), $hostgroup->getName(), implode(',', $hostsOK)), array('class' => 'list-group-item'));
7575
$this->addStatusMessage(sprintf(_('%s : %s'), $hostgroup->getName(), implode(',', $hostsOK)), 'success');
7676
$hostsOK = array();
@@ -90,14 +90,14 @@ public function fixHostNameIDs()
9090
if ($parent->getId() != $parent_id) { //Ale nesedí ID
9191
$child->delMember('parents', $parent_id, $parent_name);
9292
$child->addMember('parents', $parent->getId(), $parent_name);
93-
$child->saveToMySQL();
93+
$child->saveToSQL();
9494
$this->addItemSmart(sprintf(_('Rodič <strong>%s</strong> hosta %s má špatné ID'), $parent_name, $child_info[$host->nameColumn]), array('class' => 'list-group-item'));
9595
}
9696
} else {
9797
//Host tohoto jména neexistuje, nemůže být tedy PARENT
9898
$this->addItemSmart(sprintf(_('Rodič <strong>%s</strong> hosta %s neexistuje'), $parent_name, $child_info[$host->nameColumn]), array('class' => 'list-group-item'));
9999
$child->delMember('parents', $parent->getId(), $parent_name);
100-
$child->saveToMySQL();
100+
$child->saveToSQL();
101101
}
102102
}
103103
}
@@ -128,7 +128,7 @@ function fixContactIDs()
128128
}
129129
}
130130
if (count($contactsOK)) {
131-
if ($service->saveToMySQL()) {
131+
if ($service->saveToSQL()) {
132132
$this->addItemSmart(sprintf(_('<strong>%s</strong> : %s'), $service->getName(), implode(',', $contactsOK)), array('class' => 'list-group-item'));
133133
$this->addStatusMessage(sprintf(_('%s : %s'), $service->getName(), implode(',', $contactsOK)), 'success');
134134
$contactsOK = array();
@@ -155,7 +155,7 @@ function fixContactIDs()
155155
}
156156
}
157157
if (count($contactsOK)) {
158-
if ($host->saveToMySQL()) {
158+
if ($host->saveToSQL()) {
159159
$this->addItemSmart(sprintf(_('<strong>%s</strong> : %s'), $host->getName(), implode(',', $contactsOK)), array('class' => 'list-group-item'));
160160
$this->addStatusMessage(sprintf(_('%s : %s'), $host->getName(), implode(',', $contactsOK)), 'success');
161161
$contactsOK = array();
@@ -188,7 +188,7 @@ function fixHostHostgroupID()
188188
}
189189
}
190190
if (count($hostgroupsOK)) {
191-
if ($host->saveToMySQL()) {
191+
if ($host->saveToSQL()) {
192192
$this->addItemSmart(sprintf(_('<strong>%s</strong> : %s'), $host->getName(), implode(',', $hostgroupsOK)), array('class' => 'list-group-item'));
193193
$this->addStatusMessage(sprintf(_('%s : %s'), $host->getName(), implode(',', $hostgroupsOK)), 'success');
194194
$hostgroupsOK = array();

src/classes/IEPortScanner.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ public function assignServices()
8282
$this->service->loadFromMySQL($port);
8383
$this->service->setmyKeyColumn('service_id');
8484
$this->service->addMember('host_name', $this->host->getId(), $this->host->getName());
85-
if ($this->service->saveToMySQL()) {
85+
if ($this->service->saveToSQL()) {
8686
$this->addStatusMessage(sprintf(_('Přidána sledovaná služba: %s'), $this->service->getName()), 'success');
8787
$success++;
8888
} else {
8989
$this->addStatusMessage(sprintf(_('Přidání sledované služby: %s se nezdařilo'), $this->service->getName()), 'error');
9090
}
9191
}
9292
if ($hostmod) {
93-
$this->host->saveToMySQL();
93+
$this->host->saveToSQL();
9494
}
9595

9696
return $success;

src/classes/IEcfg.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ public function getAllData()
689689
*
690690
* @return int ID záznamu nebo null v případě neůspěchu
691691
*/
692-
public function saveToMySQL($data = null, $searchForID = false)
692+
public function saveToSQL($data = null, $searchForID = false)
693693
{
694694
if (is_null($data)) {
695695
$data = $this->getData();
@@ -740,7 +740,7 @@ public function saveToMySQL($data = null, $searchForID = false)
740740
$data[$fieldName] = $this->myDbLink->addSlashes($value);
741741
}
742742
}
743-
$result = parent::saveToMySQL($data, $searchForID);
743+
$result = parent::saveToSQL($data, $searchForID);
744744
if (!is_null($result) && (get_class($this->user) == 'IEUser')) {
745745
$this->user->setSettingValue('unsaved', true);
746746
}
@@ -1113,13 +1113,13 @@ public function importArray($cfgArray, $commonValues = null)
11131113
$this->dataReset();
11141114

11151115
$this->takeData($buffer);
1116-
if ($this->saveToMySQL()) {
1116+
if ($this->saveToSQL()) {
11171117

11181118
if ($this->isTemplate()) {
11191119
$this->addStatusMessage(_('předloha') . ' ' . $this->keyword . ' <strong>' . $buffer['name'] . '</strong>' . _(' byl naimportován'), 'success');
11201120
} else {
11211121
if (!is_null($this->webLinkColumn) && !isset($buffer[$this->webLinkColumn])) {
1122-
$this->updateToMySQL(
1122+
$this->updateToSQL(
11231123
array($this->getmyKeyColumn() => $this->getMyKey(),
11241124
$this->webLinkColumn =>
11251125
(str_replace(basename(EaseWebPage::getUri()), '', EaseWebPage::phpSelf(true))) .
@@ -1307,7 +1307,7 @@ public function saveMembers()
13071307
$name = $webPage->getGetValue('name');
13081308
if ($addColumn) {
13091309
$this->addMember($addColumn, $webPage->getRequestValue('member', 'int'), $name);
1310-
$thisID = $this->saveToMySQL();
1310+
$thisID = $this->saveToSQL();
13111311
if (is_null($thisID)) {
13121312
$this->addStatusMessage(sprintf(_('položka %s nebyla přidána do %s/%s/%s'), $name, $this->keyword, $this->getName(), $addColumn), 'warning');
13131313
} else {
@@ -1319,7 +1319,7 @@ public function saveMembers()
13191319
$thisID = null;
13201320
$del = $this->delMember($delColumn, $webPage->getRequestValue('member', 'int'), $webPage->getGetValue('name'));
13211321
if ($del) {
1322-
$thisID = $this->saveToMySQL();
1322+
$thisID = $this->saveToSQL();
13231323
}
13241324
if (is_null($thisID) && !$del) {
13251325
$this->addStatusMessage(sprintf(_('položka %s nebyla odebrána z %s/%s/%s'), $name, $this->keyword, $this->getName(), $delColumn), 'warning');

src/classes/TwitterUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct($twitter = null)
3737
$this->restoreObjectIdentity();
3838
$this->setDataValue($this->LoginColumn, $twitter->screen_name);
3939
$this->setSettingValue('icon', $twitter->profile_image_url);
40-
if ($this->saveToMySQL()) {
40+
if ($this->saveToSQL()) {
4141
$this->addStatusMessage(_(sprintf('Vytvořeno spojení s Twitterem',
4242
$twitter->screen_name), 'success'));
4343
$this->loginSuccess();

src/classes/UI/CfgEditor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function insertWidget($fieldBlock, $fieldName, $value)
241241
array($this->objectEdited->userColumn => \Ease\Shared::user()->getUserID())))." ) OR ( ".$this->objectEdited->myDbLink->prepSelect(array_merge($conditions,
242242
array('public' => 1))).") ";
243243

244-
$membersAviableArray = \Ease\Shared::myDbLink()->queryTo2DArray(
244+
$membersAviableArray = \Ease\Shared::db()->queryTo2DArray(
245245
'SELECT '.$nameColumn.' '.
246246
'FROM `'.$sTable.'` '.
247247
'WHERE '.$sqlConds.' '.
@@ -273,7 +273,7 @@ public function insertWidget($fieldBlock, $fieldName, $value)
273273
array($this->objectEdited->userColumn => \Ease\Shared::user()->getUserID())))." ) OR ( ".$this->objectEdited->myDbLink->prepSelect(array_merge($conditions,
274274
array('public' => 1))).") ";
275275

276-
$membersAviableArray = \Ease\Shared::myDbLink()->queryToArray(
276+
$membersAviableArray = \Ease\Shared::db()->queryToArray(
277277
'SELECT '.$nameColumn.','.$IDColumn.' '.
278278
'FROM `'.$sTable.'` '.
279279
'WHERE '.$sqlConds.' '.
@@ -315,7 +315,7 @@ public function insertWidget($fieldBlock, $fieldName, $value)
315315
$sqlConds .= " AND ((`platform` = '".$platform."') OR (`platform` = 'generic') OR (`platform` IS NULL) OR (`platform`='') ) ";
316316
}
317317

318-
$membersAviableArray = \Ease\Shared::myDbLink()->queryTo2DArray(
318+
$membersAviableArray = \Ease\Shared::db()->queryTo2DArray(
319319
'SELECT '.$nameColumn.' '.
320320
'FROM `'.$sTable.'` '.
321321
'WHERE '.$sqlConds.' '.
@@ -336,7 +336,7 @@ public function insertWidget($fieldBlock, $fieldName, $value)
336336
array('command_remote' => true, $this->objectEdited->userColumn => \Ease\Shared::user()->getUserID())))." ) OR ( ".$this->objectEdited->myDbLink->prepSelect($conditions)." AND public=1 ) ";
337337
// $SqlConds = $this->ObjectEdited->myDbLink->prepSelect(array_merge($Conditions, array($this->ObjectEdited->userColumn => \Ease\Shared::user()->getUserID())));
338338

339-
$membersAviableArray = \Ease\Shared::myDbLink()->queryTo2DArray(
339+
$membersAviableArray = \Ease\Shared::db()->queryTo2DArray(
340340
'SELECT '.$nameColumn.' '.
341341
'FROM `'.$sTable.'` '.
342342
'WHERE '.$sqlConds.' '.

src/classes/UI/ChildrenSelector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ public static function saveMembers($Request)
7878
if (isset($Request['addservice']) || isset($Request['delservice'])) {
7979
if (isset($Request['addservice'])) {
8080
$Service->addHostName($Request['host_id'], $Request['host_name']);
81-
if ($Service->saveToMySQL()) {
81+
if ($Service->saveToSQL()) {
8282
$Service->addStatusMessage(sprintf(_('položka %s byla přidána'), $Request['addservice']), 'success');
8383
} else {
8484
$Service->addStatusMessage(sprintf(_('položka %s nebyla přidána'), $Request['addservice']), 'warning');
8585
}
8686
}
8787
if (isset($Request['delservice'])) {
8888
$Service->delHostName($Request['host_id'], $Request['host_name']);
89-
if ($Service->saveToMySQL()) {
89+
if ($Service->saveToSQL()) {
9090
$Service->addStatusMessage(sprintf(_('položka %s byla odebrána'), $Request['delservice']), 'success');
9191
} else {
9292
$Service->addStatusMessage(sprintf(_('položka %s nebyla odebrána'), $Request['delservice']), 'warning');

0 commit comments

Comments
 (0)