ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  public function ignoreUserAbort()
38  {
39  return ignore_user_abort(true);
40  }
41 
42  public function disableSOAPCheck()
43  {
44  $this->soap_check = false;
45  }
46 
47  public function sendMail($sid, $to, $cc, $bcc, $senderId, $subject, $message, $attach)
48  {
49  global $DIC;
50 
51  $this->initAuth($sid);
52  $this->initIlias();
53 
54  if (!$this->__checkSession($sid)) {
55  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
56  }
57 
59  $senderFactory = $GLOBALS["DIC"]["mail.mime.sender.factory"];
60 
61  if (is_numeric($senderId)) {
62  $sender = $senderFactory->getSenderByUsrId($senderId);
63  } else {
64  $sender = $senderFactory->userByEmailAddress($senderId);
65  }
66 
67  $mmail = new ilMimeMail();
68  $mmail->From($sender);
69  $mmail->To(explode(',', $to));
70  $mmail->Subject($subject);
71  $mmail->Body($message);
72 
73  if ($cc) {
74  $mmail->Cc(explode(',', $cc));
75  }
76 
77  if ($bcc) {
78  $mmail->Bcc(explode(',', $bcc));
79  }
80 
81  if ($attach) {
82  $authUserFileData = new \ilFileDataMail($DIC->user()->getId());
83  $anonymousFileData = new \ilFileDataMail(ANONYMOUS_USER_ID);
84 
85  // mjansen: switched separator from "," to "#:#" because of mantis bug #6039
86  // for backward compatibility we have to check if the substring "#:#" exists as leading separator
87  // otherwise we should use ";"
88  if (strpos($attach, '#:#') === 0) {
89  $attach = substr($attach, strlen('#:#'));
90  $attachments = explode('#:#', $attach);
91  } else {
92  $attachments = explode(',', $attach);
93  }
94 
95  foreach ($attachments as $attachment) {
96  $final_filename = null;
97  $filename = basename($attachment);
98  if (strlen($filename) > 0) {
99  // #17740
100  $final_filename = preg_replace('/^(\d+?_)(.*)/', '$2', $filename);
101  }
102 
103  $allowedPathPrefixes = [
104  $authUserFileData->getAbsoluteAttachmentPoolPathPrefix()
105  ];
106 
107  if (is_numeric($senderId) && $senderId == ANONYMOUS_USER_ID) {
108  $allowedPathPrefixes[] = $anonymousFileData->getAbsoluteAttachmentPoolPathPrefix();
109  }
110 
111  $absoluteAttachmentPath = realpath($attachment);
112 
113  $matchedPathPrefixes = array_filter($allowedPathPrefixes, function ($path) use ($absoluteAttachmentPath) {
114  return strpos($absoluteAttachmentPath, $path) === 0;
115  });
116 
117  if (count($matchedPathPrefixes) > 0) {
118  $mmail->Attach($attachment, '', 'inline', $final_filename);
119  $DIC->logger()->mail()->debug(sprintf("Accepted attachment: %s", $attachment));
120  } else {
121  $DIC->logger()->mail()->warning(sprintf(
122  "Ignored attachment when sending message via SOAP: Given path '%s' is not in allowed prefix list: %s",
123  $absoluteAttachmentPath,
124  implode(', ', $allowedPathPrefixes)
125  ));
126  }
127  }
128  }
129 
130  $mmail->Send();
131 
132  return true;
133  }
134 
141  public function distributeMails($sid, $a_mail_xml)
142  {
143  $this->initAuth($sid);
144  $this->initIlias();
145 
146  if (!$this->__checkSession($sid)) {
147  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
148  }
149 
150  include_once 'Services/Mail/classes/class.ilMail.php';
151  include_once 'webservice/soap/classes/class.ilSoapMailXmlParser.php';
152 
153  $parser = new ilSoapMailXmlParser($a_mail_xml);
154  try {
155  // Check if wellformed
156  libxml_use_internal_errors(true);
157  $ok = simplexml_load_string($a_mail_xml);
158  if (!$ok) {
159  foreach (libxml_get_errors() as $err) {
160  $error .= ($err->message . ' ');
161  }
162  return $this->__raiseError($error, 'CLIENT');
163  }
164  $parser->start();
165  } catch (InvalidArgumentException $e) {
166  $GLOBALS['ilLog']->write(__METHOD__ . ' ' . $e->getMessage());
167  return $this->__raiseError($e->getMessage(), 'CLIENT');
168  } catch (ilSaxParserException $e) {
169  $GLOBALS['ilLog']->write(__METHOD__ . ' ' . $e->getMessage());
170  return $this->__raiseError($e->getMessage(), 'CLIENT');
171  }
172 
173  $mails = $parser->getMails();
174 
175  global $ilUser;
176 
177  foreach ($mails as $mail) {
178  // Prepare attachments
179  include_once './Services/Mail/classes/class.ilFileDataMail.php';
180  $file = new ilFileDataMail($ilUser->getId());
181  foreach ((array) $mail['attachments'] as $attachment) {
182  // TODO: Error handling
183  $file->storeAsAttachment($attachment['name'], $attachment['content']);
184  $attachments[] = ilUtil::_sanitizeFilemame($attachment['name']);
185  }
186 
187  $mail_obj = new ilMail($ilUser->getId());
188  $mail_obj->setSaveInSentbox(true);
189  $mail_obj->saveAttachments((array) $attachments);
190  $mail_obj->sendMail(
191  implode(',', (array) $mail['to']),
192  implode(',', (array) $mail['cc']),
193  implode(',', (array) $mail['bcc']),
194  $mail['subject'],
195  implode("\n", (array) $mail['body']),
196  (array) $attachments,
197  array($mail['type']),
198  (bool) $mail['usePlaceholders']
199  );
200 
201  // Finally unlink attachments
202  foreach ((array) $attachments as $att) {
203  $file->unlinkFile($att);
204  }
205  $mail_obj->savePostData(
206  $ilUser->getId(),
207  array(),
208  '',
209  '',
210  '',
211  '',
212  '',
213  '',
214  '',
215  ''
216  );
217  }
218  return true;
219  }
220 
221  public function saveTempFileAsMediaObject($sid, $name, $tmp_name)
222  {
223  $this->initAuth($sid);
224  $this->initIlias();
225 
226  if (!$this->__checkSession($sid)) {
227  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
228  }
229 
230  include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
232  }
233 
234  public function getMobsOfObject($sid, $a_type, $a_id)
235  {
236  $this->initAuth($sid);
237  $this->initIlias();
238 
239  if (!$this->__checkSession($sid)) {
240  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
241  }
242 
243  include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
245  }
246 
254  public function ilCloneDependencies($sid, $copy_identifier)
255  {
256  $this->initAuth($sid);
257  $this->initIlias();
258 
259  if (!$this->__checkSession($sid)) {
260  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
261  }
262 
263  global $ilLog,$ilUser;
264 
265  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
266  $cp_options = ilCopyWizardOptions::_getInstance($copy_identifier);
267 
268  // Check owner of copy procedure
269  if (!$cp_options->checkOwner($ilUser->getId())) {
270  ilLoggerFactory::getLogger('obj')->error('Permission check failed for user id: ' . $ilUser->getId() . ', copy id: ' . $copy_identifier);
271  return false;
272  }
273 
274  // Fetch first node
275  if (($node = $cp_options->fetchFirstDependenciesNode()) === false) {
276  $cp_options->deleteAll();
277  ilLoggerFactory::getLogger('obj')->info('Finished copy step 2. Copy completed');
278  return true;
279  }
280 
281  // Check options of this node
282  $options = $cp_options->getOptions($node['child']);
283  $new_ref_id = 0;
284  switch ($options['type']) {
286  ilLoggerFactory::getLogger('obj')->debug(': Omitting node: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
287  $this->callNextDependency($sid, $cp_options);
288  break;
289 
291  ilLoggerFactory::getLogger('obj')->debug(': Start cloning dependencies for node: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
292  $this->cloneDependencies($node, $cp_options);
293  $this->callNextDependency($sid, $cp_options);
294  break;
295 
297  ilLoggerFactory::getLogger('obj')->debug(': Start cloning dependencies: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
298  $this->cloneDependencies($node, $cp_options);
299  $this->callNextDependency($sid, $cp_options);
300  break;
301 
302  default:
303  ilLoggerFactory::getLogger('obj')->warning('No valid action type given for node: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
304  $this->callNextDependency($sid, $cp_options);
305  break;
306  }
307  return true;
308  }
309 
318  public function ilClone($sid, $copy_identifier)
319  {
320  $this->initAuth($sid);
321  $this->initIlias();
322 
323  if (!$this->__checkSession($sid)) {
324  ilLoggerFactory::getLogger('obj')->error('Object cloning failed. Invalid session given: ' . $this->__getMessage());
325  }
326 
327  global $ilLog,$ilUser;
328 
329  include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
330  $cp_options = ilCopyWizardOptions::_getInstance($copy_identifier);
331 
332  // Check owner of copy procedure
333  if (!$cp_options->checkOwner($ilUser->getId())) {
334  ilLoggerFactory::getLogger('obj')->error('Permission check failed for user id: ' . $ilUser->getId() . ', copy id: ' . $copy_identifier);
335  return false;
336  }
337 
338 
339  // Fetch first node
340  if (($node = $cp_options->fetchFirstNode()) === false) {
341  ilLoggerFactory::getLogger('obj')->info('Finished copy step 1. Starting copying of object dependencies...');
342  return $this->ilCloneDependencies($sid, $copy_identifier);
343  }
344 
345  // Check options of this node
346  $options = $cp_options->getOptions($node['child']);
347 
348  $new_ref_id = 0;
349  switch ($options['type']) {
351  ilLoggerFactory::getLogger('obj')->debug(': Omitting node: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
352  // set mapping to zero
353  $cp_options->appendMapping($node['child'], 0);
354  $this->callNextNode($sid, $cp_options);
355  break;
356 
358 
359  ilLoggerFactory::getLogger('obj')->debug('Start cloning node: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
360  $new_ref_id = $this->cloneNode($node, $cp_options);
361  $this->callNextNode($sid, $cp_options);
362  break;
363 
365  ilLoggerFactory::getLogger('obj')->debug('Start linking node: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
366  $new_ref_id = $this->linkNode($node, $cp_options);
367  $this->callNextNode($sid, $cp_options);
368  break;
369 
370  default:
371  ilLoggerFactory::getLogger('obj')->warning('No valid action type given for: ' . $node['obj_id'] . ', ' . $node['title'] . ', ' . $node['type']);
372  $this->callNextNode($sid, $cp_options);
373  break;
374 
375  }
376  return $new_ref_id;
377  }
378 
385  private function callNextNode($sid, $cp_options)
386  {
387  global $ilLog;
388 
389  $cp_options->dropFirstNode();
390 
391  if ($cp_options->isSOAPEnabled()) {
392  // Start next soap call
393  include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
394  $soap_client = new ilSoapClient();
395  $soap_client->setResponseTimeout(1);
396  $soap_client->enableWSDL(true);
397  $soap_client->init();
398  $soap_client->call('ilClone', array($sid,$cp_options->getCopyId()));
399  } else {
400  ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
401  $cp_options->read();
402  include_once('./webservice/soap/include/inc.soap_functions.php');
403  $res = ilSoapFunctions::ilClone($sid, $cp_options->getCopyId());
404  }
405  return true;
406  }
407 
408  private function callNextDependency($sid, $cp_options)
409  {
410  global $ilLog;
411 
412  $cp_options->dropFirstDependenciesNode();
413 
414  if ($cp_options->isSOAPEnabled()) {
415  // Start next soap call
416  include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
417  $soap_client = new ilSoapClient();
418  $soap_client->setResponseTimeout(1);
419  $soap_client->enableWSDL(true);
420  $soap_client->init();
421  $soap_client->call('ilCloneDependencies', array($sid,$cp_options->getCopyId()));
422  } else {
423  ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
424  $cp_options->read();
425  include_once('./webservice/soap/include/inc.soap_functions.php');
426  $res = ilSoapFunctions::ilCloneDependencies($sid, $cp_options->getCopyId());
427  }
428  return true;
429  }
430 
438  private function cloneNode($node, $cp_options)
439  {
440  global $ilLog,$tree,$ilAccess,$rbacreview;
441 
442  #sleep(20);
443 
444  $source_id = $node['child'];
445  $parent_id = $node['parent'];
446  $options = $cp_options->getOptions($node['child']);
447  $mappings = $cp_options->getMappings();
448 
449  if (!$ilAccess->checkAccess('copy', '', $node['child'])) {
450  ilLoggerFactory::getLogger('obj')->error('No copy permission granted: ' . $source_id . ', ' . $node['title'] . ', ' . $node['type']);
451  return false;
452  }
453  if (!isset($mappings[$parent_id])) {
454  ilLoggerFactory::getLogger('obj')->info('Omitting node ' . $source_id . ', ' . $node['title'] . ', ' . $node['type'] . '. No target found.');
455  return true;
456  }
457  $target_id = $mappings[$parent_id];
458 
459  if (!$tree->isInTree($target_id)) {
460  ilLoggerFactory::getLogger('obj')->notice('Omitting node ' . $source_id . ', ' . $node['title'] . ', ' . $node['type'] . '. Object has been deleted.');
461  return false;
462  }
463 
464  $orig = ilObjectFactory::getInstanceByRefId((int) $source_id);
465  $new_obj = $orig->cloneObject((int) $target_id, $cp_options->getCopyId());
466 
467  if (!is_object($new_obj)) {
468  ilLoggerFactory::getLogger('obj')->error('Error copying ' . $source_id . ', ' . $node['title'] . ', ' . $node['type'] . '. No target found.');
469  return false;
470  }
471 
472  // rbac log
473  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
474  $rbac_log_roles = $rbacreview->getParentRoleIds($new_obj->getRefId(), false);
475  $rbac_log = ilRbacLog::gatherFaPa($new_obj->getRefId(), array_keys($rbac_log_roles), true);
476  ilRbacLog::add(ilRbacLog::COPY_OBJECT, $new_obj->getRefId(), $rbac_log, (int) $source_id);
477 
478  // Finally add new mapping entry
479  $cp_options->appendMapping($source_id, $new_obj->getRefId());
480  return $new_obj->getRefId();
481  }
482 
490  private function cloneDependencies($node, $cp_options)
491  {
492  global $ilLog;
493 
494  $source_id = $node['child'];
495  $mappings = $cp_options->getMappings();
496 
497  if (!isset($mappings[$source_id])) {
498  ilLoggerFactory::getLogger('obj')->debug('Omitting node ' . $source_id . ', ' . $node['title'] . ', ' . $node['type'] . '. No mapping found.');
499  return true;
500  }
501  $target_id = $mappings[$source_id];
502 
503  $orig = ilObjectFactory::getInstanceByRefId((int) $source_id);
504  $orig->cloneDependencies($target_id, $cp_options->getCopyId());
505  return true;
506  }
507 
515  private function linkNode($node, $cp_options)
516  {
517  global $ilLog,$ilAccess,$rbacreview;
518 
519  $source_id = $node['child'];
520  $parent_id = $node['parent'];
521  $options = $cp_options->getOptions($node['child']);
522  $mappings = $cp_options->getMappings();
523 
524  if (!$ilAccess->checkAccess('delete', '', $node['child'])) {
525  ilLoggerFactory::getLogger('obj')->warning('No delete permission granted: ' . $source_id . ', ' . $node['title'] . ', ' . $node['type']);
526  return false;
527  }
528  if (!isset($mappings[$parent_id])) {
529  ilLoggerFactory::getLogger('obj')->warning('Omitting node ' . $source_id . ', ' . $node['title'] . ', ' . $node['type'] . '. No target found.');
530  return true;
531  }
532  $target_id = $mappings[$parent_id];
533 
534  $orig = ilObjectFactory::getInstanceByRefId((int) $source_id);
535  $new_ref_id = $orig->createReference();
536  $orig->putInTree($target_id);
537  $orig->setPermissions($target_id);
538 
539  if (!($new_ref_id)) {
540  ilLoggerFactory::getLogger('obj')->error('Error linking ' . $source_id . ', ' . $node['title'] . ', ' . $node['type'] . '. No target found.');
541  return false;
542  }
543 
544  // rbac log
545  include_once "Services/AccessControl/classes/class.ilRbacLog.php";
546  $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false);
547  $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true);
548  ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, (int) $source_id);
549 
550  // Finally add new mapping entry
551  $cp_options->appendMapping($source_id, $new_ref_id);
552  return $new_ref_id;
553  }
554 
561  public static function validateXML($xml)
562  {
563  // validate to prevent wrong XMLs
564  $dom = @domxml_open_mem($xml, DOMXML_LOAD_VALIDATING, $error);
565  if ($error) {
566  $msg = array();
567  if (is_array($error)) {
568  foreach ($error as $err) {
569  $msg []= "(" . $err["line"] . "," . $err["col"] . "): " . $err["errormessage"];
570  }
571  } else {
572  $msg[] = $error;
573  }
574  $msg = join("\n", $msg);
575  return $msg;
576  }
577  return true;
578  }
579 
580  public function handleECSTasks($sid, $a_server_id)
581  {
582  $this->initAuth($sid);
583  $this->initIlias();
584 
585  if (!$this->__checkSession($sid)) {
586  return $this->__raiseError($this->__getMessage(), $this->__getMessageCode());
587  }
588 
589  include_once('./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
590 
591  global $ilLog;
592 
593  $ilLog->write(__METHOD__ . ': Starting task execution...');
594  $scheduler = ilECSTaskScheduler::_getInstanceByServerId($a_server_id);
595  $scheduler->startTaskExecution();
596 
597  return true;
598  }
599 
612  public function deleteExpiredDualOptInUserObjects($sid, $usr_id)
613  {
614  $this->initAuth($sid);
615  $this->initIlias();
616 
617  // Session check not possible -> anonymous user is the trigger
618 
619  global $ilDB, $ilLog;
620 
621  $ilLog->write(__METHOD__ . ': Started deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
622 
623  require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
624  $oRegSettigs = new ilRegistrationSettings();
625 
626  $query = '';
627 
628  /*
629  * Fetch the current actuator user object first, because this user will try to perform very probably
630  * a new registration with the same login name in a few seconds ;-)
631  *
632  */
633  if ((int) $usr_id > 0) {
634  $query .= 'SELECT usr_id, create_date, reg_hash FROM usr_data '
635  . 'WHERE active = 0 '
636  . 'AND reg_hash IS NOT NULL '
637  . 'AND usr_id = ' . $ilDB->quote($usr_id, 'integer') . ' ';
638  $query .= 'UNION ';
639  }
640 
641  $query .= 'SELECT usr_id, create_date, reg_hash FROM usr_data '
642  . 'WHERE active = 0 '
643  . 'AND reg_hash IS NOT NULL '
644  . 'AND usr_id != ' . $ilDB->quote($usr_id, 'integer') . ' ';
645 
646  $res = $ilDB->query($query);
647 
648  $ilLog->write(__METHOD__ . ': ' . $ilDB->numRows($res) . ' inactive user objects with confirmation hash values (dual opt in) found ...');
649 
650  /*
651  * mjansen: 15.12.2010:
652  * I perform the expiration check in php because of multi database support (mysql, postgresql).
653  * I did not find an oracle equivalent for mysql: UNIX_TIMESTAMP()
654  */
655 
656  $num_deleted_users = 0;
657  while ($row = $ilDB->fetchAssoc($res)) {
658  if ($row['usr_id'] == ANONYMOUS_USER_ID || $row['usr_id'] == SYSTEM_USER_ID) {
659  continue;
660  }
661  if (!strlen($row['reg_hash'])) {
662  continue;
663  }
664 
665  if ((int) $oRegSettigs->getRegistrationHashLifetime() > 0 &&
666  $row['create_date'] != '' &&
667  time() - $oRegSettigs->getRegistrationHashLifetime() > strtotime($row['create_date'])) {
668  $user = ilObjectFactory::getInstanceByObjId($row['usr_id'], false);
669  if ($user instanceof ilObjUser) {
670  $ilLog->write(__METHOD__ . ': User ' . $user->getLogin() . ' (obj_id: ' . $user->getId() . ') will be deleted due to an expired registration hash ...');
671  $user->delete();
672  ++$num_deleted_users;
673  }
674  }
675  }
676 
677  $ilLog->write(__METHOD__ . ': ' . $num_deleted_users . ' inactive user objects with expired confirmation hash values (dual opt in) deleted ...');
678 
679  $ilLog->write(__METHOD__ . ': Finished deletion of inactive user objects with expired confirmation hash values (dual opt in) ...');
680 
681  return true;
682  }
683 }
static _getMobsOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
get mobs of object
callNextNode($sid, $cp_options)
Call next node using soap.
global $DIC
Definition: saml.php:7
This class handles all operations on files (attachments) in directory ilias_data/mail.
static ilClone($sid, $copy_identifier)
domxml_open_mem($str, $mode=0, &$error=null)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
saveTempFileAsMediaObject($sid, $name, $tmp_name)
$target_id
Definition: goto.php:49
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)
static _saveTempFileAsMediaObject($name, $tmp_name, $upload=true)
Create new media object and update page in db and return new media object.
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
$a_type
Definition: workflow.php:92
$xml
Definition: metadata.php:240
static _sanitizeFilemame($a_filename)
$error
Definition: Error.php:17
if($format !==null) $name
Definition: metadata.php:146
catch(Exception $e) $message
static _getInstance($a_copy_id)
Get instance of copy wizard options.
foreach($_POST as $key=> $value) $res
Class ilMimeMail.
XML parser for soap mails.
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
$query
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.
$parser
Definition: BPMN2Parser.php:23
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)
static getLogger($a_component_id)
Get component logger.
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.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20