From: <sk...@us...> - 2008-02-06 17:54:28
|
Revision: 507 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=507&view=rev Author: sknappe Date: 2008-02-06 09:54:26 -0800 (Wed, 06 Feb 2008) Log Message: ----------- bugfix Modified Paths: -------------- trunk/src/dbpedia-navigator/DLLearnerConnection.php trunk/src/dbpedia-navigator/ajaxfunctions.php Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-02-06 17:37:47 UTC (rev 506) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-02-06 17:54:26 UTC (rev 507) @@ -106,7 +106,7 @@ $query="SELECT ?pred ?obj ". "WHERE {<http://dbpedia.org/resource/".str_replace(' ','_',$label)."> ?pred ?obj}"; $result=$this->getSparqlResult($query); - if (!isset($result->item)) throw new Exception("Your query brought no result."); + if (!isset($result->item)) throw new Exception("Your query brought no result. The Label-Search is started."); $ret=array(); foreach ($result->item as $results){ $value=$results->item[1]; Modified: trunk/src/dbpedia-navigator/ajaxfunctions.php =================================================================== --- trunk/src/dbpedia-navigator/ajaxfunctions.php 2008-02-06 17:37:47 UTC (rev 506) +++ trunk/src/dbpedia-navigator/ajaxfunctions.php 2008-02-06 17:54:26 UTC (rev 507) @@ -64,6 +64,8 @@ $lastArticles=""; $artTitle=""; + $objResponse = new xajaxResponse(); + //get the article //if $fromCache is -2, no new SearchResults should be processed //if $fromCache is -1, everything is normal @@ -114,8 +116,10 @@ $content .= '<br/><br/><br/><br/><br/><br/>'.get_triple_table($triples); + //BUILD SEARCHRESULT + if ($fromCache==-1) + $searchResult.="<a href=\"\" onclick=\"xajax_getsubjects('".$subject."');return false;\">Show more Results</a>"; - //BUILD ARTICLE TITLE $artTitle=$triples['http://www.w3.org/2000/01/rdf-schema#label'][0]; session_start(); @@ -144,7 +148,8 @@ } catch (Exception $e) { $content=$e->getMessage(); - $artTitle="Fehler"; + $artTitle="No Result"; + $objResponse->call('xajax_getsubjects',$subject); } } else { @@ -154,10 +159,6 @@ $artTitle=$_SESSION['articles'][$fromCache]['subject']; } - //BUILD SEARCHRESULT - if ($fromCache==-1) - $searchResult.="<a href=\"\" onclick=\"xajax_getsubjects('".$subject."');return false;\">Show more Results</a>"; - //Build lastArticles if (isset($_SESSION['articles'])){ foreach ($_SESSION['articles'] as $key => $value) @@ -166,7 +167,7 @@ } } - $objResponse = new xajaxResponse(); + $objResponse->assign("articlecontent", "innerHTML", $content); $objResponse->assign("ArticleTitle","innerHTML",$artTitle); $objResponse->assign("lastarticles","innerHTML",$lastArticles); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |