Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
f21fd9d5
Commit
f21fd9d5
authored
Sep 15, 2009
by
tbrehm
Browse files
Bugfix in remoting library and added several _get functions.
parent
d31e9087
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/remoting.inc.php
View file @
f21fd9d5
This diff is collapsed.
Click to expand it.
interface/lib/classes/remoting_lib.inc.php
View file @
f21fd9d5
...
...
@@ -603,8 +603,25 @@ class remoting_lib {
function
getDataRecord
(
$primary_id
)
{
global
$app
;
$escape
=
'`'
;
$sql
=
"SELECT * FROM "
.
$escape
.
$this
->
formDef
[
'db_table'
]
.
$escape
.
" WHERE "
.
$this
->
formDef
[
'db_table_idx'
]
.
" = "
.
$primary_id
;
return
$app
->
db
->
queryOneRecord
(
$sql
);
if
(
@
is_numeric
(
$primary_id
))
{
$sql
=
"SELECT * FROM "
.
$escape
.
$this
->
formDef
[
'db_table'
]
.
$escape
.
" WHERE "
.
$this
->
formDef
[
'db_table_idx'
]
.
" = "
.
$primary_id
;
return
$app
->
db
->
queryOneRecord
(
$sql
);
}
elseif
(
@
is_array
(
$primary_id
))
{
$sql_where
=
''
;
foreach
(
$primary_id
as
$key
=>
$val
)
{
$key
=
$app
->
db
->
quote
(
$key
);
$val
=
$app
->
db
->
quote
(
$val
);
$sql_where
.
=
"
$key
= '
$val
' AND "
;
}
$sql_where
=
substr
(
$sql_where
,
0
,
-
5
);
$sql
=
"SELECT * FROM "
.
$escape
.
$this
->
formDef
[
'db_table'
]
.
$escape
.
" WHERE "
.
$sql_where
;
return
$app
->
db
->
queryOneRecord
(
$sql
);
}
else
{
$this
->
errorMessage
=
'The ID must be either an integer or an array.'
;
return
array
();
}
}
function
dodaj_usera
(
$params
,
$insert_id
){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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