Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
96cb5a3d
Commit
96cb5a3d
authored
13 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
fix oc_appconfig for sqlite
parent
3e99aefb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/appconfig.php
+5
-5
5 additions, 5 deletions
lib/appconfig.php
with
5 additions
and
5 deletions
lib/appconfig.php
+
5
−
5
View file @
96cb5a3d
...
...
@@ -47,7 +47,7 @@ class OC_APPCONFIG{
*/
public
static
function
getApps
(){
// No magic in here!
$query
=
OC_DB
::
prepare
(
'SELECT DISTINCT(
`
appid
`
) FROM `*PREFIX*appconfig`'
);
$query
=
OC_DB
::
prepare
(
'SELECT DISTINCT( appid ) FROM `*PREFIX*appconfig`'
);
$result
=
$query
->
execute
();
$apps
=
array
();
...
...
@@ -68,7 +68,7 @@ class OC_APPCONFIG{
*/
public
static
function
getKeys
(
$app
){
// No magic in here as well
$query
=
OC_DB
::
prepare
(
'SELECT
`
key
`
FROM `*PREFIX*appconfig` WHERE `appid` = ?'
);
$query
=
OC_DB
::
prepare
(
'SELECT key FROM `*PREFIX*appconfig` WHERE `appid` = ?'
);
$result
=
$query
->
execute
(
array
(
$app
));
$keys
=
array
();
...
...
@@ -91,7 +91,7 @@ class OC_APPCONFIG{
*/
public
static
function
getValue
(
$app
,
$key
,
$default
=
null
){
// At least some magic in here :-)
$query
=
OC_DB
::
prepare
(
'SELECT
`
value
`
FROM
`
*PREFIX*appconfig
`
WHERE
`
appid
`
= ? AND
`
key
`
= ?'
);
$query
=
OC_DB
::
prepare
(
'SELECT value FROM *PREFIX*appconfig WHERE appid = ? AND key = ?'
);
$result
=
$query
->
execute
(
array
(
$app
,
$key
));
if
(
!
$result
->
numRows
()){
...
...
@@ -118,11 +118,11 @@ class OC_APPCONFIG{
// null: does not exist
if
(
is_null
(
$exists
)){
$query
=
OC_DB
::
prepare
(
'INSERT INTO
`
*PREFIX*appconfig
`
( `appid`, `key`, `value` ) VALUES( ?, ?, ? )'
);
$query
=
OC_DB
::
prepare
(
'INSERT INTO *PREFIX*appconfig ( `appid`, `key`, `value` ) VALUES( ?, ?, ? )'
);
$query
->
execute
(
array
(
$app
,
$key
,
$value
));
}
else
{
$query
=
OC_DB
::
prepare
(
'UPDATE
`
*PREFIX*appconfig
`
SET
`
value
`
= ? WHERE
`
appid
`
= ? AND
`
key
`
= ?'
);
$query
=
OC_DB
::
prepare
(
'UPDATE *PREFIX*appconfig SET value = ? WHERE appid = ? AND key = ?'
);
$query
->
execute
(
array
(
$value
,
$app
,
$key
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment