ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilSoapUtils.php
Go to the documentation of this file.
1 <?php
2  /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22  */
23 
24 
33 include_once './webservice/soap/classes/class.ilSoapAdministration.php';
34 
36 {
37 
38  function ignoreUserAbort()
39  {
40  return ignore_user_abort(true);
41  }
42 
43  function disableSOAPCheck()
44  {
45  $this->soap_check = false;
46  }
47 
48  function sendMail($sid,$to,$cc,$bcc,$sender,$subject,$message,$attach)
49  {
50  global $DIC;
51 
52  $this->initAuth($sid);
53  $this->initIlias();
54 
55  if(!$this->__checkSession($sid))
56  {
57  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
58  }
59 
60  include_once 'Services/Mail/classes/class.ilMimeMail.php';
61 
62  if(strpos($sender, '#:#') !== false)
63  {
64  $sender = explode('#:#', $sender);
65  }
66 
67  $mmail = new ilMimeMail();
68  $mmail->autoCheck(false);
69  $mmail->From($sender);
70  $mmail->To(explode(',',$to));
71  $mmail->Subject($subject);
72  $mmail->Body($message);
73 
74  if($cc)
75  {
76  $mmail->Cc(explode(',',$cc));
77  }
78 
79  if($bcc)
80  {
81  $mmail->Bcc(explode(',',$bcc));
82  }
83  if($attach)
84  {
85  require_once 'Services/Mail/classes/class.ilFileDataMail.php';
86  $authUserFileData = new \ilFileDataMail($DIC->user()->getId());
87  $senderFileData = new \ilFileDataMail(ANONYMOUS_USER_ID);
88 
89  // mjansen: switched separator from "," to "#:#" because of mantis bug #6039
90  // for backward compatibility we have to check if the substring "#:#" exists as leading separator
91  // otherwise we should use ";"
92  if(strpos($attach, '#:#') === 0)
93  {
94  $attach = substr($attach, strlen('#:#'));
95  $attachments = explode('#:#', $attach);
96  }
97  else
98  {
99  $attachments = explode(',', $attach);
100  }
101 
102  foreach($attachments as $attachment)
103  {
104  $final_filename = null;
105  $filename = basename($attachment);
106  if(strlen($filename) > 0)
107  {
108  // #17740
109  $final_filename = preg_replace('/^(\d+?_)(.*)/', '$2', $filename);
110  }
111  $allowedPathPrefixes = [
112  $authUserFileData->getAbsoluteAttachmentPoolPathPrefix(),
113  $senderFileData->getAbsoluteAttachmentPoolPathPrefix()
114  ];
115 
116  $absoluteAttachmentPath = realpath($attachment);
117 
118  $matchedPathPrefixes = array_filter($allowedPathPrefixes, function($path) use ($absoluteAttachmentPath) {
119  return strpos($absoluteAttachmentPath, $path) === 0;
120  });
121 
122  if (count($matchedPathPrefixes) > 0) {
123  $mmail->Attach($attachment, '', 'inline', $final_filename);
124  $DIC->logger()->mail()->debug(sprintf("Accepted attachment: %s", $attachment));
125  } else {
126  $DIC->logger()->mail()->warning(sprintf(
127  "Ignored attachment when sending message via SOAP: Given path '%s' is not in allowed prefix list: %s",
128  $absoluteAttachmentPath,
129  implode(', ', $allowedPathPrefixes)
130  ));
131  }
132  }
133  }
134 
135  $mmail->Send();
136 
137  return true;
138  }
139 
146  public function distributeMails($sid, $a_mail_xml)
147  {
148  $this->initAuth($sid);
149  $this->initIlias();
150 
151  if(!$this->__checkSession($sid))
152  {
153  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
154  }
155 
156  include_once 'Services/Mail/classes/class.ilMail.php';
157  include_once 'webservice/soap/classes/class.ilSoapMailXmlParser.php';
158 
159  $parser = new ilSoapMailXmlParser($a_mail_xml);
160  try
161  {
162  // Check if wellformed
163  libxml_use_internal_errors(true);
164  $ok = simplexml_load_string($a_mail_xml);
165  if(!$ok)
166  {
167  foreach(libxml_get_errors() as $err)
168  {
169  $error .= ($err->message.' ');
170  }
171  return $this->__raiseError($error, 'CLIENT');
172  }
173  $parser->start();
174  }
175  catch(InvalidArgumentException $e)
176  {
177  $GLOBALS['ilLog']->write(__METHOD__.' '.$e->getMessage());
178  return $this->__raiseError($e->getMessage(),'CLIENT');
179  }
180  catch(ilSaxParserException $e)
181  {
182  $GLOBALS['ilLog']->write(__METHOD__.' '.$e->getMessage());
183  return $this->__raiseError($e->getMessage(), 'CLIENT');
184  }
185 
186  $mails = $parser->getMails();
187 
188  global $ilUser;
189 
190  foreach($mails as $mail)
191  {
192  // Prepare attachments
193  include_once './Services/Mail/classes/class.ilFileDataMail.php';
194  $file = new ilFileDataMail($ilUser->getId());
195  foreach((array) $mail['attachments'] as $attachment)
196  {
197  // TODO: Error handling
198  $file->storeAsAttachment($attachment['name'], $attachment['content']);
199  $attachments[] = ilUtil::_sanitizeFilemame($attachment['name']);
200  }
201 
202  $mail_obj = new ilMail($ilUser->getId());
203  $mail_obj->setSaveInSentbox(true);
204  $mail_obj->saveAttachments((array) $attachments);
205  $mail_obj->sendMail(
206  implode(',',(array) $mail['to']),
207  implode(',',(array) $mail['cc']),
208  implode(',',(array) $mail['bcc']),
209  $mail['subject'],
210  implode("\n", (array)$mail['body']),
211  (array) $attachments,
212  array($mail['type']),
213  (bool) $mail['usePlaceholders']
214  );
215 
216  // Finally unlink attachments
217  foreach((array) $attachments as $att)
218  {
219  $file->unlinkFile($att);
220  }
221  $mail_obj->savePostData(
222  $ilUser->getId(),
223  array(),
224  '',
225  '',
226  '',
227  '',
228  '',
229  '',
230  '',
231  ''
232  );
233  }
234  return true;
235  }
236 
237  function saveTempFileAsMediaObject($sid, $name, $tmp_name)
238  {
239  $this->initAuth($sid);
240  $this->initIlias();
241 
242  if(!$this->__checkSession($sid))
243  {
244  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
245  }
246 
247  include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
248  return ilObjMediaObject::_saveTempFileAsMediaObject($name, $tmp_name);
249  }
250 
251  function getMobsOfObject($sid, $a_type, $a_id)
252  {
253  $this->initAuth($sid);
254  $this->initIlias();
255 
256  if(!$this->__checkSession($sid))
257  {
258  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
259  }
260 
261  include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
263  }
264 
272  public function ilCloneDependencies($sid,$copy_identifier)
273  {
274  $this->initAuth($sid);
275  $this->initIlias();
276 
277  if(!$this->__checkSession($sid))
278  {
279  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
280  }
281 
282  global $ilLog,$ilUser;
283 
284  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
285  $cp_options = ilCopyWizardOptions::_getInstance($copy_identifier);
286 
287  // Check owner of copy procedure
288  if(!$cp_options->checkOwner($ilUser->getId()))
289  {
290  ilLoggerFactory::getLogger('obj')->error('Permission check failed for user id: '.$ilUser->getId().', copy id: '.$copy_identifier);
291  return false;
292  }
293 
294  // Fetch first node
295  if(($node = $cp_options->fetchFirstDependenciesNode()) === false)
296  {
297  $cp_options->deleteAll();
298  ilLoggerFactory::getLogger('obj')->info('Finished copy step 2. Copy completed');
299  return true;
300  }
301 
302  // Check options of this node
303  $options = $cp_options->getOptions($node['child']);
304  $new_ref_id = 0;
305  switch($options['type'])
306  {
308  ilLoggerFactory::getLogger('obj')->debug(': Omitting node: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
309  $this->callNextDependency($sid,$cp_options);
310  break;
311 
313  ilLoggerFactory::getLogger('obj')->debug(': Start cloning dependencies for node: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
314  $this->cloneDependencies($node, $cp_options);
315  $this->callNextDependency($sid,$cp_options);
316  break;
317 
319  ilLoggerFactory::getLogger('obj')->debug(': Start cloning dependencies: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
320  $this->cloneDependencies($node,$cp_options);
321  $this->callNextDependency($sid,$cp_options);
322  break;
323 
324  default:
325  ilLoggerFactory::getLogger('obj')->warning('No valid action type given for node: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
326  $this->callNextDependency($sid,$cp_options);
327  break;
328  }
329  return true;
330  }
331 
340  public function ilClone($sid,$copy_identifier)
341  {
342  $this->initAuth($sid);
343  $this->initIlias();
344 
345  if(!$this->__checkSession($sid))
346  {
347  ilLoggerFactory::getLogger('obj')->error('Object cloning failed. Invalid session given: '. $this->__getMessage());
348  }
349 
350  global $ilLog,$ilUser;
351 
352  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
353  $cp_options = ilCopyWizardOptions::_getInstance($copy_identifier);
354 
355  // Check owner of copy procedure
356  if(!$cp_options->checkOwner($ilUser->getId()))
357  {
358  ilLoggerFactory::getLogger('obj')->error('Permission check failed for user id: '.$ilUser->getId().', copy id: '.$copy_identifier);
359  return false;
360  }
361 
362 
363  // Fetch first node
364  if(($node = $cp_options->fetchFirstNode()) === false)
365  {
366  ilLoggerFactory::getLogger('obj')->info('Finished copy step 1. Starting copying of object dependencies...');
367  return $this->ilCloneDependencies($sid,$copy_identifier);
368  }
369 
370  // Check options of this node
371  $options = $cp_options->getOptions($node['child']);
372 
373  $new_ref_id = 0;
374  switch($options['type'])
375  {
377  ilLoggerFactory::getLogger('obj')->debug(': Omitting node: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
378  // set mapping to zero
379  $cp_options->appendMapping($node['child'],0);
380  $this->callNextNode($sid,$cp_options);
381  break;
382 
384 
385  ilLoggerFactory::getLogger('obj')->debug('Start cloning node: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
386  $new_ref_id = $this->cloneNode($node,$cp_options);
387  $this->callNextNode($sid,$cp_options);
388  break;
389 
391  ilLoggerFactory::getLogger('obj')->debug('Start linking node: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
392  $new_ref_id = $this->linkNode($node,$cp_options);
393  $this->callNextNode($sid,$cp_options);
394  break;
395 
396  default:
397  ilLoggerFactory::getLogger('obj')->warning('No valid action type given for: '.$node['obj_id'].', '.$node['title'].', '.$node['type']);
398  $this->callNextNode($sid,$cp_options);
399  break;
400 
401  }
402  return $new_ref_id;
403  }
404 
411  private function callNextNode($sid,$cp_options)
412  {
413  global $ilLog;
414 
415  $cp_options->dropFirstNode();
416 
417  if($cp_options->isSOAPEnabled())
418  {
419  // Start next soap call
420  include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
421  $soap_client = new ilSoapClient();
422  $soap_client->setResponseTimeout(1);
423  $soap_client->enableWSDL(true);
424  $soap_client->init();
425  $soap_client->call('ilClone',array($sid,$cp_options->getCopyId()));
426  }
427  else
428  {
429  ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
430  $cp_options->read();
431  include_once('./webservice/soap/include/inc.soap_functions.php');
432  $res = ilSoapFunctions::ilClone($sid,$cp_options->getCopyId());
433  }
434  return true;
435  }
436 
437  private function callNextDependency($sid,$cp_options)
438  {
439  global $ilLog;
440 
441  $cp_options->dropFirstDependenciesNode();
442 
443  if($cp_options->isSOAPEnabled())
444  {
445  // Start next soap call
446  include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
447  $soap_client = new ilSoapClient();
448  $soap_client->setResponseTimeout(1);
449  $soap_client->enableWSDL(true);
450  $soap_client->init();
451  $soap_client->call('ilCloneDependencies',array($sid,$cp_options->getCopyId()));
452  }
453  else
454  {
455  ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
456  $cp_options->read();
457  include_once('./webservice/soap/include/inc.soap_functions.php');
458  $res = ilSoapFunctions::ilCloneDependencies($sid,$cp_options->getCopyId());
459  }
460  return true;
461  }
462 
470  private function cloneNode($node,$cp_options)
471  {
472  global $ilLog,$tree,$ilAccess,$rbacreview;
473 
474  #sleep(20);
475 
476  $source_id = $node['child'];
477  $parent_id = $node['parent'];
478  $options = $cp_options->getOptions($node['child']);
479  $mappings = $cp_options->getMappings();
480 
481  if(!$ilAccess->checkAccess('copy','',$node['child']))
482  {
483  ilLoggerFactory::getLogger('obj')->error('No copy permission granted: '.$source_id.', '.$node['title'].', '.$node['type']);
484  return false;
485 
486  }
487  if(!isset($mappings[$parent_id]))
488  {
489  ilLoggerFactory::getLogger('obj')->info('Omitting node '.$source_id.', '.$node['title'].', '.$node['type']. '. No target found.');
490  return true;
491  }
492  $target_id = $mappings[$parent_id];
493 
494  if(!$tree->isInTree($target_id))
495  {
496  ilLoggerFactory::getLogger('obj')->notice('Omitting node '.$source_id.', '.$node['title'].', '.$node['type']. '. Object has been deleted.');
497  return false;
498  }
499 
500  $orig = ilObjectFactory::getInstanceByRefId((int) $source_id);
501  $new_obj = $orig->cloneObject((int) $target_id,$cp_options->getCopyId());
502 
503  if(!is_object($new_obj))
504  {
505  ilLoggerFactory::getLogger('obj')->error('Error copying '.$source_id.', '.$node['title'].', '.$node['type'].'. No target found.');
506  return false;
507  }
508 
509  // rbac log
510  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
511  $rbac_log_roles = $rbacreview->getParentRoleIds($new_obj->getRefId(), false);
512  $rbac_log = ilRbacLog::gatherFaPa($new_obj->getRefId(), array_keys($rbac_log_roles), true);
513  ilRbacLog::add(ilRbacLog::COPY_OBJECT, $new_obj->getRefId(), $rbac_log, (int)$source_id);
514 
515  // Finally add new mapping entry
516  $cp_options->appendMapping($source_id,$new_obj->getRefId());
517  return $new_obj->getRefId();
518  }
519 
527  private function cloneDependencies($node,$cp_options)
528  {
529  global $ilLog;
530 
531  $source_id = $node['child'];
532  $mappings = $cp_options->getMappings();
533 
534  if(!isset($mappings[$source_id]))
535  {
536  ilLoggerFactory::getLogger('obj')->debug('Omitting node '.$source_id.', '.$node['title'].', '.$node['type']. '. No mapping found.');
537  return true;
538  }
539  $target_id = $mappings[$source_id];
540 
541  $orig = ilObjectFactory::getInstanceByRefId((int) $source_id);
542  $orig->cloneDependencies($target_id,$cp_options->getCopyId());
543  return true;
544  }
545 
553  private function linkNode($node,$cp_options)
554  {
555  global $ilLog,$ilAccess,$rbacreview;
556 
557  $source_id = $node['child'];
558  $parent_id = $node['parent'];
559  $options = $cp_options->getOptions($node['child']);
560  $mappings = $cp_options->getMappings();
561 
562  if(!$ilAccess->checkAccess('delete','',$node['child']))
563  {
564  ilLoggerFactory::getLogger('obj')->warning('No delete permission granted: '.$source_id.', '.$node['title'].', '.$node['type']);
565  return false;
566 
567  }
568  if(!isset($mappings[$parent_id]))
569  {
570  ilLoggerFactory::getLogger('obj')->warning('Omitting node '.$source_id.', '.$node['title'].', '.$node['type']. '. No target found.');
571  return true;
572  }
573  $target_id = $mappings[$parent_id];
574 
575  $orig = ilObjectFactory::getInstanceByRefId((int) $source_id);
576  $new_ref_id = $orig->createReference();
577  $orig->putInTree($target_id);
578  $orig->setPermissions($target_id);
579 
580  if(!($new_ref_id))
581  {
582  ilLoggerFactory::getLogger('obj')->error('Error linking '.$source_id.', '.$node['title'].', '.$node['type'].'. No target found.');
583  return false;
584  }
585 
586  // rbac log
587  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
588  $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
589  $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
590  ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, (int)$source_id);
591 
592  // Finally add new mapping entry
593  $cp_options->appendMapping($source_id,$new_ref_id);
594  return $new_ref_id;
595  }
596 
603  static function validateXML ($xml) {
604  // validate to prevent wrong XMLs
605  $dom = @domxml_open_mem($xml, DOMXML_LOAD_VALIDATING, $error);
606  if ($error)
607  {
608  $msg = array();
609  if (is_array($error))
610  {
611  foreach ($error as $err) {
612  $msg []= "(".$err["line"].",".$err["col"]."): ".$err["errormessage"];
613  }
614  }
615  else
616  {
617  $msg[] = $error;
618  }
619  $msg = join("\n",$msg);
620  return $msg;
621  }
622  return true;
623  }
624 
625  public function handleECSTasks($sid,$a_server_id)
626  {
627  $this->initAuth($sid);
628  $this->initIlias();
629 
630  if(!$this->__checkSession($sid))
631  {
632  return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
633  }
634 
635  include_once('./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
636 
637  global $ilLog;
638 
639  $ilLog->write(__METHOD__.': Starting task execution...');
640  $scheduler = ilECSTaskScheduler::_getInstanceByServerId($a_server_id);
641  $scheduler->startTaskExecution();
642 
643  return true;
644  }
645 
658  public function deleteExpiredDualOptInUserObjects($sid, $usr_id)
659  {
660  $this->initAuth($sid);
661  $this->initIlias();
662 
663  // Session check not possible -> anonymous user is the trigger
664 
665  global $ilDB, $ilLog;
666 
667  $ilLog->write(__METHOD__.': Started deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
668 
669  require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
670  $oRegSettigs = new ilRegistrationSettings();
671 
672  $query = '';
673 
674  /*
675  * Fetch the current actuator user object first, because this user will try to perform very probably
676  * a new registration with the same login name in a few seconds ;-)
677  *
678  */
679  if((int)$usr_id > 0)
680  {
681  $query .= 'SELECT usr_id, create_date, reg_hash FROM usr_data '
682  . 'WHERE active = 0 '
683  . 'AND reg_hash IS NOT NULL '
684  . 'AND usr_id = '.$ilDB->quote($usr_id, 'integer').' ';
685  $query .= 'UNION ';
686  }
687 
688  $query .= 'SELECT usr_id, create_date, reg_hash FROM usr_data '
689  . 'WHERE active = 0 '
690  . 'AND reg_hash IS NOT NULL '
691  . 'AND usr_id != '.$ilDB->quote($usr_id, 'integer').' ';
692 
693  $res = $ilDB->query($query);
694 
695  $ilLog->write(__METHOD__.': '.$ilDB->numRows($res).' inactive user objects with confirmation hash values (dual opt in) found ...');
696 
697  /*
698  * mjansen: 15.12.2010:
699  * I perform the expiration check in php because of multi database support (mysql, postgresql).
700  * I did not find an oracle equivalent for mysql: UNIX_TIMESTAMP()
701  */
702 
703  $num_deleted_users = 0;
704  while($row = $ilDB->fetchAssoc($res))
705  {
706  if($row['usr_id'] == ANONYMOUS_USER_ID || $row['usr_id'] == SYSTEM_USER_ID) continue;
707  if(!strlen($row['reg_hash'])) continue;
708 
709  if((int)$oRegSettigs->getRegistrationHashLifetime() > 0 &&
710  $row['create_date'] != '' &&
711  time() - $oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date']))
712  {
713  $user = ilObjectFactory::getInstanceByObjId($row['usr_id'], false);
714  if($user instanceof ilObjUser)
715  {
716  $ilLog->write(__METHOD__.': User '.$user->getLogin().' (obj_id: '.$user->getId().') will be deleted due to an expired registration hash ...');
717  $user->delete();
718  ++$num_deleted_users;
719  }
720  }
721  }
722 
723  $ilLog->write(__METHOD__.': '.$num_deleted_users.' inactive user objects with expired confirmation hash values (dual opt in) deleted ...');
724 
725  $ilLog->write(__METHOD__.': Finished deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
726 
727  return true;
728  }
729 }
730 ?>
$error
Definition: Error.php:17
static _getMobsOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
get mobs of object
$path
Definition: aliased.php:25
callNextNode($sid, $cp_options)
Call next node using soap.
This class handles all operations on files (attachments) in directory ilias_data/mail.
static ilClone($sid, $copy_identifier)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
saveTempFileAsMediaObject($sid, $name, $tmp_name)
$target_id
Definition: goto.php:51
setSaveInSentbox($a_save_in_sentbox)
SaxParserException thrown by ilSaxParser if property throwException is set.
distributeMails($sid, $a_mail_xml)
mail via soap
getMobsOfObject($sid, $a_type, $a_id)
sendMail($sid, $to, $cc, $bcc, $sender, $subject, $message, $attach)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
$a_type
Definition: workflow.php:93
static _sanitizeFilemame($a_filename)
static _getInstance($a_copy_id)
Get instance of copy wizard options.
if(!is_array($argv)) $options
this class encapsulates the PHP mail() function.
XML parser for soap mails.
static _saveTempFileAsMediaObject($name, $tmp_name, $upload=TRUE)
Create new media object and update page in db and return new media object.
static validateXML($xml)
validates an xml file, if dtd is attached
This class handles base functions for mail handling.
__raiseError($a_message, $a_code)
const COPY_OBJECT
$ilUser
Definition: imgupload.php:18
deleteExpiredDualOptInUserObjects($sid, $usr_id)
Method for soap webservice: deleteExpiredDualOptInUserObjects.
const LINK_OBJECT
callNextDependency($sid, $cp_options)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
static _getInstanceByServerId($a_server_id)
get singleton instance Private access use ilECSTaskScheduler::start() or ilECSTaskScheduler::startTas...
ilCloneDependencies($sid, $copy_identifier)
clone object dependencies (e.g.
Class ilObjAuthSettingsGUI.
$parser
Definition: BPMN2Parser.php:24
static ilCloneDependencies($sid, $copy_identifier)
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
initAuth($sid)
Init authentication.
global $ilDB
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
handleECSTasks($sid, $a_server_id)
global $DIC
static getLogger($a_component_id)
Get component logger.
domxml_open_mem($str, $mode=0, &$error=NULL)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
cloneDependencies($node, $cp_options)
cloneDependencies
linkNode($node, $cp_options)
Link node.
ilClone($sid, $copy_identifier)
Clone object.
cloneNode($node, $cp_options)
Clone node.