예제 #1
0
 /** reset limits
  * reset limits of this class: age limit, from limit, interval limit, order limit and all limits from upper class
  */
 function resetLimits()
 {
     parent::resetLimits();
     $this->_from_limit = NULL;
     $this->_interval_limit = NULL;
     $this->_order = NULL;
     $this->_time_limit = NULL;
     $this->_user_id_limit = NULL;
     $this->_room_type = CS_PRIVATEROOM_TYPE;
 }
예제 #2
0
 /** reset limits
  * reset limits of this class: age limit, from limit, interval limit, order limit and all limits from upper class
  */
 function resetLimits()
 {
     parent::resetLimits();
     $this->_from_limit = NULL;
     $this->_interval_limit = NULL;
     $this->_user_id_limit = NULL;
     $this->_all_room_limit = false;
     $this->_order = NULL;
     $this->_deleted_limit = NULL;
     $this->_time_limit = NULL;
     $this->_continuous_limit = NULL;
     $this->_template_limit = NULL;
     $this->_logarchive_limit = NULL;
     $this->_limit_with_grouproom = false;
     $this->_limit_only_grouproom = false;
     $this->_archive_limit = false;
 }
예제 #3
0
 /** update a room - internal, do not use -> use method save
  * this method updates a room
  *
  * @param object cs_context_item a commsy room
  */
 function _update($item)
 {
     if ($this->_update_with_changing_modification_information) {
         parent::_update($item);
     }
     $query = 'UPDATE ' . $this->addDatabasePrefix($this->_db_table) . ' SET ';
     if ($this->_update_with_changing_modification_information) {
         $query .= 'modification_date="' . getCurrentDateTimeInMySQL() . '",';
         $modifier_id = $this->_current_user->getItemID();
         if (!empty($modifier_id)) {
             $query .= 'modifier_id="' . encode(AS_DB, $modifier_id) . '",';
         }
     }
     if ($item->isOpenForGuests()) {
         $open_for_guests = 1;
     } else {
         $open_for_guests = 0;
     }
     if ($item->isContinuous()) {
         $continuous = 1;
     } else {
         $continuous = -1;
     }
     if ($item->isTemplate()) {
         $template = 1;
     } else {
         $template = -1;
     }
     if ($item->getActivityPoints()) {
         $activity = $item->getActivityPoints();
     } else {
         $activity = '0';
     }
     if ($item->getPublic()) {
         $public = '1';
     } else {
         $public = '0';
     }
     $query .= 'title="' . encode(AS_DB, $item->getTitle()) . '",' . "extras='" . encode(AS_DB, serialize($item->getExtraInformation())) . "'," . "status='" . encode(AS_DB, $item->getStatus()) . "'," . "activity='" . encode(AS_DB, $activity) . "'," . "public='" . encode(AS_DB, $public) . "'," . "continuous='" . $continuous . "'," . "template='" . $template . "'," . "is_open_for_guests='" . $open_for_guests . "'," . "contact_persons='" . encode(AS_DB, $item->getContactPersonString()) . "',";
     if ($this->_existsField($this->_db_table, 'room_description')) {
         $query .= "room_description='" . encode(AS_DB, $item->getDescription()) . "'";
     } else {
         $query .= "description='" . encode(AS_DB, $item->getDescription()) . "'";
     }
     $query .= ' WHERE item_id="' . encode(AS_DB, $item->getItemID()) . '"';
     $result = $this->_db_connector->performQuery($query);
     if (!isset($result) or !$result) {
         include_once 'functions/error_functions.php';
         trigger_error('Problems updating ' . $this->_db_table . ' item from query: "' . $query . '"', E_USER_WARNING);
     }
 }
예제 #4
0
 /** reset limits
  * reset limits of this class
  */
 function resetLimits()
 {
     parent::resetLimits();
     $this->_url_limit = NULL;
 }