Vergleich inc/datahandlers/event.php - 1.8.4 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 50Zeile 50

/**
* Event ID currently being manipulated by the datahandlers.


/**
* Event ID currently being manipulated by the datahandlers.

 
	 *
* @var int

	 */
public $eid = 0;


	 */
public $eid = 0;


Zeile 105Zeile 107

// All types of events require a start date
if(!$event['start_date']['day'] || !$event['start_date']['month'] || !$event['start_date']['year'])


// All types of events require a start date
if(!$event['start_date']['day'] || !$event['start_date']['month'] || !$event['start_date']['year'])

		{
$this->set_error("invalid_start_date");

		{
$this->set_error("invalid_start_date");

			return false;
}


			return false;
}


Zeile 162Zeile 164

//Check to see if the month is within 1 and 12
if($event['end_date']['month'] > 12 || $event['end_date']['month'] < 1)


//Check to see if the month is within 1 and 12
if($event['end_date']['month'] > 12 || $event['end_date']['month'] < 1)

			{

			{

				$this->set_error("invalid_end_month");
return false;
}

				$this->set_error("invalid_end_month");
return false;
}

Zeile 216Zeile 218
		if(!isset($start_time))
{
$start_time = array("hour" => 0, "min" => 0);

		if(!isset($start_time))
{
$start_time = array("hour" => 0, "min" => 0);

		}

$start_timestamp = gmmktime($start_time['hour'], $start_time['min'], 0, $event['start_date']['month'], $event['start_date']['day'], $event['start_date']['year']);

		}

$start_timestamp = gmmktime($start_time['hour'], $start_time['min'], 0, $event['start_date']['month'], $event['start_date']['day'], $event['start_date']['year']);


if($event['type'] == "ranged")


if($event['type'] == "ranged")

		{

		{

			$end_timestamp = gmmktime($end_time['hour'], $end_time['min'], 0, $event['end_date']['month'], $event['end_date']['day'], $event['end_date']['year']);

if($end_timestamp <= $start_timestamp)

			$end_timestamp = gmmktime($end_time['hour'], $end_time['min'], 0, $event['end_date']['month'], $event['end_date']['day'], $event['end_date']['year']);

if($end_timestamp <= $start_timestamp)

Zeile 229Zeile 231
				$this->set_error("end_in_past");
return false;
}

				$this->set_error("end_in_past");
return false;
}

		}


		}


		if(!isset($end_timestamp))
{
$end_timestamp = 0;

		if(!isset($end_timestamp))
{
$end_timestamp = 0;

Zeile 239Zeile 241
		// Save our time stamps for saving
$event['starttime'] = $start_timestamp;
$event['endtime'] = $end_timestamp;

		// Save our time stamps for saving
$event['starttime'] = $start_timestamp;
$event['endtime'] = $end_timestamp;





		return true;
}


		return true;
}


 
	/**
* @param string $time
*
* @return array|bool
*/

	function verify_time($time)
{
preg_match('#^(0?[1-9]|1[012])\s?([:\.]?)\s?([0-5][0-9])?(\s?[ap]m)|([01][0-9]|2[0-3])\s?([:\.])\s?([0-5][0-9])$#i', $time, $matches);

	function verify_time($time)
{
preg_match('#^(0?[1-9]|1[012])\s?([:\.]?)\s?([0-5][0-9])?(\s?[ap]m)|([01][0-9]|2[0-3])\s?([:\.])\s?([0-5][0-9])$#i', $time, $matches);

Zeile 275Zeile 282
		return array("hour" => $hour, "min" => $min);
}


		return array("hour" => $hour, "min" => $min);
}


 
	/**
* @return bool
*/

	function verify_repeats()
{

	function verify_repeats()
{

		global $mybb;

 
		$event = &$this->data;

if(!is_array($event['repeats']) || !$event['repeats']['repeats'])

		$event = &$this->data;

if(!is_array($event['repeats']) || !$event['repeats']['repeats'])

Zeile 309Zeile 318
					$this->set_error("invalid_repeat_week_interval");
return false;
}

					$this->set_error("invalid_repeat_week_interval");
return false;
}

				if(count($event['repeats']['days']) == 0)

				if(is_array($event['repeats']['days']) && count($event['repeats']['days']) == 0)

				{
$this->set_error("invalid_repeat_weekly_days");
return false;

				{
$this->set_error("invalid_repeat_weekly_days");
return false;

Zeile 390Zeile 399
	/**
* Validate an event.
*

	/**
* Validate an event.
*

	 * @param array The event data array.

	 * @return bool

	 */
function validate_event()
{

	 */
function validate_event()
{

Zeile 435Zeile 444
	/**
* Insert an event into the database.
*

	/**
* Insert an event into the database.
*

	 * @param array The array of event data.

 
	 * @return array Array of new event details, eid and private.
*/
function insert_event()

	 * @return array Array of new event details, eid and private.
*/
function insert_event()

Zeile 530Zeile 538
	/**
* Updates an event that is already in the database.
*

	/**
* Updates an event that is already in the database.
*

	 * @param array The event data array.

	 * @return array

	 */
function update_event()
{

	 */
function update_event()
{