27 require_once
"./classes/class.ilObject.php";
67 parent::__construct($a_id, $a_call_by_reference);
79 $cont_dir = $webspace_dir.
"/container_data";
80 if (!is_dir($cont_dir))
84 $obj_dir = $cont_dir.
"/obj_".$this->
getId();
85 if (!is_dir($obj_dir))
149 $this->hiddenfilesfound = $a_hiddenfilesfound;
174 $q =
"SELECT * FROM container_settings WHERE ".
175 " id = ".$ilDB->quote($a_id).
" AND ".
176 " keyword = ".$ilDB->quote($a_keyword);
177 $set = $ilDB->query($q);
180 return $rec[
"value"];
187 $q =
"REPLACE INTO container_settings (id, keyword, value) VALUES".
188 " (".$ilDB->quote($a_id).
", ".
189 $ilDB->quote($a_keyword).
", ".
190 $ilDB->quote($a_value).
")";
213 $file_name = $cont_dir.
"/icon_".$a_size.
".gif";
227 function saveIcons($a_big_icon, $a_small_icon, $a_tiny_icon)
235 $big_geom = $this->ilias->getSetting(
"custom_icon_big_width").
"x".
236 $this->ilias->getSetting(
"custom_icon_big_height");
237 $big_file_name = $cont_dir.
"/icon_big.gif";
239 if (is_file($a_big_icon))
247 if (is_file($cont_dir.
"/icon_big.gif"))
257 $small_geom = $this->ilias->getSetting(
"custom_icon_small_width").
"x".
258 $this->ilias->getSetting(
"custom_icon_small_height");
259 $small_file_name = $cont_dir.
"/icon_small.gif";
261 if (is_file($a_small_icon))
268 if (is_file($cont_dir.
"/icon_small.gif"))
278 $tiny_geom = $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
279 $this->ilias->getSetting(
"custom_icon_tiny_height");
280 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
282 if (is_file($a_tiny_icon))
289 if (is_file($cont_dir.
"/icon_tiny.gif"))
306 $big_file_name = $cont_dir.
"/icon_big.gif";
307 @unlink($big_file_name);
317 $small_file_name = $cont_dir.
"/icon_small.gif";
318 @unlink($small_file_name);
328 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
329 @unlink($tiny_file_name);
343 include_once(
"./Services/Blocks/class.ilBlockColumn.php");
344 $block_column =
new ilBlockColumn($col_id);
345 return $block_column;
362 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
368 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
374 $new_page_object->setParentId($new_obj->getId());
375 $new_page_object->setId($new_obj->getId());
376 $new_page_object->createFromXML();
377 $new_page_object->setXMLContent($orig_page->getXMLContent());
378 $new_page_object->buildDom();
379 $new_page_object->update();
395 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
415 include_once(
'classes/class.ilLink.php');
416 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
418 global $ilAccess,
$ilErr,$rbacsystem,$tree,$ilUser;
423 $wizard_options->saveOwner($ilUser->getId());
424 $wizard_options->saveRoot($clone_source);
427 $wizard_options->initContainer($clone_source,
$ref_id);
429 foreach($options as $source_id => $option)
431 $wizard_options->addEntry($source_id,$option);
433 $wizard_options->read();
434 $wizard_options->storeTree($clone_source);
439 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
442 $soap_client->setTimeout(30);
443 $soap_client->setResponseTimeout(30);
444 $soap_client->enableWSDL(
true);
446 $ilLog->write(__METHOD__.
': Trying to call Soap client...');
447 if($soap_client->init())
449 $ilLog->write(__METHOD__.
': Calling soap clone method...');
450 $res = $soap_client->call(
'ilClone',array($new_session_id.
'::'.
$client_id, $copy_id));
454 $ilLog->write(__METHOD__.
': SOAP call failed. Calling clone method manually. ');
455 $wizard_options->disableSOAP();
456 $wizard_options->read();
457 include_once(
'./webservice/soap/include/inc.soap_functions.php');
489 $this->order_type = $a_value;
497 function getSubItems($a_include_hidden_files =
false, $a_include_side_block =
false)
499 global $objDefinition,
$ilBench, $tree;
502 if (is_array($this->items[(
int) $a_include_hidden_files][(
int) $a_include_side_block]))
504 return $this->items[(int) $a_include_hidden_files][(
int) $a_include_side_block];
508 $objects = $tree->getChilds($this->
getRefId(),
"title");
512 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
517 include_once
'./Modules/Session/classes/class.ilEventItems.php';
520 foreach ($objects as $key => $object)
523 if ($objDefinition->getDevMode($object[
"type"]) || $object[
"type"] ==
"adm"
524 || $object[
"type"] ==
"rolf")
530 if (in_array($object[
'type'], array(
'file',
'fold',
'cat')))
532 include_once
'Modules/File/classes/class.ilObjFileAccess.php';
536 if (!$a_include_hidden_files)
545 if (in_array($object[
'ref_id'],$event_items))
551 if(!$a_include_side_block && $objDefinition->isSideBlock($object[
'type']))
557 $type = $objDefinition->getGroupOfObj($object[
"type"]);
560 $type = $object[
"type"];
565 $this->items[
$type][$key] = $object;
566 $this->items[
"_all"][$key] = $object;
567 if ($object[
"type"] !=
"sess")
569 $this->items[
"_non_sess"][$key] = $object;
573 $this->items[(int) $a_include_hidden_files][(
int) $a_include_side_block]
574 = $sort->sortItems($this->items);
576 return $this->items[(int) $a_include_hidden_files][(
int) $a_include_side_block];
584 if (is_array($this->items[
"_all"]) && count($this->items[
"_all"]) > 0)
606 global $objDefinition;
608 if (empty($this->type_grps))
610 $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->
getType());
612 return $this->type_grps;
623 if ($ilSetting->get(
"enable_cat_page_edit"))
640 include_once(
"./Services/Container/classes/class.ilContainerSortingSettings.php");