Exemplo n.º 1
0
 /**
  * Restore objects from trash
  *
  * @param	integer		current ref id
  * @param	array		array of ref ids to be restored
  */
 function restoreObjects($a_cur_ref_id, $a_ref_ids)
 {
     global $lng;
     if (!is_array($a_ref_ids) || count($a_ref_ids) == 0) {
         ilUtil::sendFailure($lng->txt("no_checkbox"), true);
         return false;
     } else {
         try {
             include_once "./Services/Repository/classes/class.ilRepUtil.php";
             ilRepUtil::restoreObjects($a_cur_ref_id, $a_ref_ids);
             ilUtil::sendSuccess($lng->txt("msg_undeleted"), true);
         } catch (Exception $e) {
             ilUtil::sendFailure($e->getMessage(), true);
             return false;
         }
     }
     return true;
 }