Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
fddedde1
Commit
fddedde1
authored
Apr 12, 2012
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added optional force_update argument in datalogSave function in mysql library.
parent
94bddda2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
interface/lib/classes/db_mysql.inc.php
interface/lib/classes/db_mysql.inc.php
+6
-2
No files found.
interface/lib/classes/db_mysql.inc.php
View file @
fddedde1
...
...
@@ -308,10 +308,14 @@ class db {
}
//** Updates a record and saves the changes into the datalog
public
function
datalogUpdate
(
$tablename
,
$update_data
,
$index_field
,
$index_value
)
{
public
function
datalogUpdate
(
$tablename
,
$update_data
,
$index_field
,
$index_value
,
$force_update
=
false
)
{
global
$app
;
$old_rec
=
$this
->
queryOneRecord
(
"SELECT * FROM
$tablename
WHERE
$index_field
= '
$index_value
'"
);
if
(
$force_update
==
true
)
{
$old_rec
=
array
();
}
else
{
$old_rec
=
$this
->
queryOneRecord
(
"SELECT * FROM
$tablename
WHERE
$index_field
= '
$index_value
'"
);
}
$this
->
query
(
"UPDATE
$tablename
SET
$update_data
WHERE
$index_field
= '
$index_value
'"
);
$new_rec
=
$this
->
queryOneRecord
(
"SELECT * FROM
$tablename
WHERE
$index_field
= '
$index_value
'"
);
$this
->
datalogSave
(
$tablename
,
'UPDATE'
,
$index_field
,
$index_value
,
$old_rec
,
$new_rec
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment