This repository was archived by the owner on Jun 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
extensions/linkeddataserver Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ routes.properties.defaults.action = "properties"
131
131
routes.instances.route = " list/*"
132
132
routes.instances.defaults.controller = " resource"
133
133
routes.instances.defaults.action = " instances"
134
+ routes.data.route = " data/*"
135
+ routes.data.defaults.controller = " resource"
136
+ routes.data.defaults.action = " export"
134
137
routes.sparql.route = " sparql/*"
135
138
routes.sparql.defaults.controller = " service"
136
139
routes.sparql.defaults.action = " sparql"
Original file line number Diff line number Diff line change @@ -121,20 +121,16 @@ public function onIsDispatchable($event)
121
121
122
122
// Special case: If the graph URI is identical to the requested URI, we export
123
123
// the whole graph instead of only data regarding the resource.
124
+ $ urlSpec = array ();
124
125
if ($ graph === $ uri ) {
125
- $ controllerName = 'model ' ;
126
- $ actionName = 'export ' ;
126
+ $ urlSpec = array ('controller ' => 'model ' , 'action ' => 'export ' );
127
127
} else {
128
- $ controllerName = 'resource ' ;
129
- $ actionName = 'export ' ;
128
+ $ urlSpec = array ('route ' => 'data ' );
130
129
}
131
130
132
131
// Create a URL with the export action on the resource or model controller.
133
132
// Set the required parameters for this action.
134
- $ url = new OntoWiki_Url (
135
- array ('controller ' => $ controllerName , 'action ' => $ actionName ),
136
- array ()
137
- );
133
+ $ url = new OntoWiki_Url ($ urlSpec , array ());
138
134
$ url ->setParam ('r ' , $ uri , true )
139
135
->setParam ('f ' , $ type )
140
136
->setParam ('m ' , $ graph )
You can’t perform that action at this time.
0 commit comments