From cf27dccfed3358727266927ac1767314f44aec4d Mon Sep 17 00:00:00 2001 From: alangrafu <alvaro@graves.cl> Date: Fri, 7 Oct 2011 05:34:34 -0700 Subject: [PATCH] Resolving conflict --- classes/Utils.php | 16 +++++++++------- common.inc.php | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/classes/Utils.php b/classes/Utils.php index fb250417..7d8c4e4d 100644 --- a/classes/Utils.php +++ b/classes/Utils.php @@ -125,15 +125,17 @@ class Utils{ $a = explode(",", $accept_string); $b = array(); foreach($a as $v){ - if(strstr($v, ";")){ - $aux = explode(";q=", $v); - foreach($conf['http_accept'] as $formatTypeArray){ + foreach($conf['http_accept'] as $formatTypeArray){ + if(strstr($v, ";")){ + $aux = explode(";q=", $v); if(in_array($aux[0], $formatTypeArray)){ $b[$aux[0]] = $aux[1]; } + }else{ + if(in_array($v, $formatTypeArray)){ + $b[$v] = 1; + } } - }else{ - $b[$v] = 1; } } $a = $b; @@ -301,7 +303,7 @@ class Utils{ if(Utils::getResultsType($query) == $conf['endpoint']['select']['output']){ $rPointer[$modelFile] = Utils::sparqlResult2Obj($aux); /*if(sizeof($rPointer)>0){ - $rPointer[$modelFile]['first'] = $rPointer[$modelFile][0]; + $rPointer[$modelFile]['first'] = $rPointer[$modelFile][0]; }*/ }else{ $rPointer[$modelFile] = $aux; @@ -310,7 +312,7 @@ class Utils{ if(Utils::getResultsType($query) == $conf['endpoint']['select']['output']){ $rPointer = Utils::sparqlResult2Obj($aux); /*if(sizeof($rPointer)>0){ - $rPointer['first'] = $rPointer[0]; + $rPointer['first'] = $rPointer[0]; }*/ }else{ $rPointer = $aux; diff --git a/common.inc.php b/common.inc.php index 7abd980a..0def982e 100644 --- a/common.inc.php +++ b/common.inc.php @@ -23,7 +23,7 @@ $conf['view']['default'] = 'default'; $conf['resource']['url_delimiter'] = "%u"; -$conf['http_accept']['html'] = array('text/html', 'application/xhtml+xml'); +$conf['http_accept']['html'] = array('text/html'); $conf['http_accept']['rdf'] = array('application/rdf+xml'); $conf['http_accept']['ttl'] = array('text/n3', 'application/x-turtle', 'application/turtle', 'text/turtle'); $conf['http_accept']['json'] = array('application/json', 'application/x-javascript', 'text/javascript', 'text/x-javascript', 'text/x-json'); -- GitLab