phpScheduleIt
May 23, 2013, 07:31:14 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Users cannot modify past reservations, but they can delete them?  (Read 1030 times)
aliweb
Jr. Member
**

Karma: 0
Posts: 84


« on: August 11, 2008, 03:22:21 PM »

Hi Nick,
I made the following changes to allow users to modify past reservations (for up to one week in the past). It works great, but they can still delete them?

Allow users to add/edit/delete past reservations:
Line 575 of lib/Reservation.class.php to:  $day_has_passed = false;
Line 169 of lib/schedule.class.php to: return true;
Line 459 of lib/reservation.class.php to: $dates_valid = true;

But only up to one week in the past:
Line 443 of lib/Reservation.class.php to $min_notice = $this->resource->get_property('min_notice_time') -168;

Can I also prevent users from deleting reservations more than one week in the past?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: August 12, 2008, 09:54:29 AM »

There's really no easy way to do this right now since modifications and deletions are handled by the same logic.  You'd need to add another check into del_res() in lib/Reservation.class.php to fail if the date being deleted has passed.
Logged
aliweb
Jr. Member
**

Karma: 0
Posts: 84


« Reply #2 on: August 18, 2008, 01:29:03 PM »

OK, thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!