Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
b0e06886
Commit
b0e06886
authored
13 years ago
by
alvaro
Browse files
Options
Downloads
Plain Diff
Merge branch 'development'
parents
ec39c5fc
64555579
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/Endpoint.php
+13
-0
13 additions, 0 deletions
classes/Endpoint.php
with
13 additions
and
0 deletions
classes/Endpoint.php
+
13
−
0
View file @
b0e06886
...
@@ -33,10 +33,23 @@ class Endpoint{
...
@@ -33,10 +33,23 @@ class Endpoint{
curl_setopt
(
$c
,
CURLOPT_HTTPHEADER
,
$context
);
curl_setopt
(
$c
,
CURLOPT_HTTPHEADER
,
$context
);
curl_setopt
(
$c
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$c
,
CURLOPT_RETURNTRANSFER
,
true
);
$aux
=
curl_exec
(
$c
);
// execute the curl command
$aux
=
curl_exec
(
$c
);
// execute the curl command
if
(
$conf
[
'debug'
]){
if
(
$aux
==
false
){
trigger_error
(
"Error executing SPARQL query: "
.
curl_error
(
$c
),
E_USER_ERROR
);
echo
(
"Error executing SPARQL query: "
.
curl_error
(
$c
));
}
}
curl_close
(
$c
);
curl_close
(
$c
);
$this
->
params
[
'output'
]
=
$auxoutput
;
$this
->
params
[
'output'
]
=
$auxoutput
;
if
(
preg_match
(
"/select/i"
,
$q
)){
if
(
preg_match
(
"/select/i"
,
$q
)){
$r
=
json_decode
(
$aux
,
true
);
$r
=
json_decode
(
$aux
,
true
);
if
(
$conf
[
'debug'
]){
if
(
$r
==
false
){
trigger_error
(
"Warning: Results from a SELECT sparql query couldn't get parsed"
,
E_USER_WARNING
);
echo
(
"Warning: Results from a SELECT sparql query couldn't get parsed"
);
}
}
}
return
$r
;
return
$r
;
}
}
if
(
preg_match
(
"/describe/i"
,
$q
)){
if
(
preg_match
(
"/describe/i"
,
$q
)){
...
...
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