Commit 946ea36fd6febdba1494f70407f6ac9e27b3140f
1 parent
7d33380d
Exists in
master
and in
56 other branches
redmine 6884 shared catalog
Showing
1 changed file
with
7 additions
and
5 deletions
Show diff stats
src/InputOutput/IHMImpl/TimeTables/IHMInputOutputTTClass.php
@@ -39,15 +39,17 @@ class IHMInputOutputTTClass implements InputOutputInterface | @@ -39,15 +39,17 @@ class IHMInputOutputTTClass implements InputOutputInterface | ||
39 | { | 39 | { |
40 | //create a list of data to treat | 40 | //create a list of data to treat |
41 | $processData = new TTRequestDataClass(); | 41 | $processData = new TTRequestDataClass(); |
42 | - if (strpos($tt->id,"sharedtimeTable_") === 0) { | ||
43 | - //Shared TimeTable | ||
44 | - $result = IHMSharedObjectsClass::getPath("timeTable", $tt->id); | 42 | + |
43 | + if (strpos($tt->id,"sharedtimeTable_") === 0 || strpos($tt->id,"sharedcatalog_") === 0) { | ||
44 | + //Shared TimeTable /Catalog | ||
45 | + $objectType = strpos($tt->id,"timeTable") != 0 ? "timeTable" : "catalog"; | ||
46 | + $result = IHMSharedObjectsClass::getPath($objectType, $tt->id); | ||
45 | if (!$result['success']) | 47 | if (!$result['success']) |
46 | - throw new Exception('Shared TimeTable '.$tt->name.' not found'); | 48 | + throw new Exception('Shared '.$objectType.' '.$tt->name.' not found'); |
47 | $ttName = $result['path']; | 49 | $ttName = $result['path']; |
48 | } | 50 | } |
49 | else { | 51 | else { |
50 | - //User TimeTable | 52 | + //User TimeTable / Catalog |
51 | $ttName = IHMConfigClass::getUserTTPath().$tt->id.'.xml'; | 53 | $ttName = IHMConfigClass::getUserTTPath().$tt->id.'.xml'; |
52 | } | 54 | } |
53 | if (!file_exists($ttName)) | 55 | if (!file_exists($ttName)) |