Changeset 3068888
- Timestamp:
- 04/11/2024 09:43:46 AM (2 years ago)
- Location:
- occupancy-plan/trunk
- Files:
-
- 5 edited
-
admin/class-occupancy-plan-admin.php (modified) (7 diffs)
-
admin/controller/class-occupancy-plan-blocks.php (modified) (2 diffs)
-
includes/class-occupancy-plan-main.php (modified) (1 diff)
-
occupancy-plan.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
occupancy-plan/trunk/admin/class-occupancy-plan-admin.php
r3068435 r3068888 532 532 * 1.3.8 - Don't send mail for block update 533 533 * 1.3.16 - Replace of [email] tag 534 * 1.4.1 - Bugfix: User correct blocks controller 534 535 */ 535 536 public function add_block() … … 549 550 } 550 551 551 $blockid = $this-> internal_save_block();552 $blockid = $this->blocks->internal_save_block(); 552 553 553 554 if ((isset($_POST['id'])) && ((int) $_POST['id'] > 0)) … … 617 618 * 1.2.4 - Add 'mailaddress' element 618 619 * 1.2.4 - Add 'provisional' flag 620 * 1.4.1 - Fix logic for full court move 619 621 */ 620 622 public function move_block() … … 635 637 (isset($target['interval']))) 636 638 { 637 // error_log(print_r($source, true));638 // error_log(print_r($target, true));639 640 639 $id = intval($source['blockid']); 641 640 $interval = intval($source['interval']); 642 641 643 642 // Calculate the new start and end time ... 644 $oldstarttime = date_create_from_format('H:i ', sanitize_text_field($source['starttime']));645 $oldendtime = date_create_from_format('H:i ', sanitize_text_field($source['endtime']));643 $oldstarttime = date_create_from_format('H:i:s', sanitize_text_field($source['starttime'])); 644 $oldendtime = date_create_from_format('H:i:s', sanitize_text_field($source['endtime'])); 646 645 $timediff = $oldstarttime->diff($oldendtime); 647 646 $newstarttime = date_create_from_format('!H:i:s', sanitize_text_field($target['starttime'])); … … 668 667 // Unique booking can be updated directly 669 668 $blockdata = array( 670 'court' => ( isset($target['court']))? intval($target['court']) : 0,669 'court' => ((isset($source['court'])) && (intval($source['court'] == 0)))? 0 : ((isset($target['court']))? intval($target['court']) : 0), 671 670 'childcourt' => (isset($target['childcourt']))? intval($target['childcourt']) : 1, 672 671 'weekday' => $newstartdate->format('N'), … … 708 707 'description' => (isset($source['description']))? sanitize_text_field($source['description']) : '', 709 708 'weekday' => $newstartdate->format('N'), 710 'court' => ( isset($target['court']))? intval($target['court']) : 0,709 'court' => ((isset($source['court'])) && (intval($source['court'] == 0)))? 0 : ((isset($target['court']))? intval($target['court']) : 0), 711 710 'childcourt' => (isset($target['childcourt']))? intval($target['childcourt']) : 1, 712 711 'startdate' => $newstartdate->format('Y-m-d'), … … 733 732 } 734 733 } 734 } 735 736 /** 737 * Delete action from frontend 738 * 739 * @since 1.4.1 740 */ 741 public function delete_block() 742 { 743 $this->blocks->delete_block(); 735 744 } 736 745 -
occupancy-plan/trunk/admin/controller/class-occupancy-plan-blocks.php
r3068435 r3068888 99 99 public function action_block() 100 100 { 101 error_log(print_r($_POST, true)); 101 102 if (isset($_POST['occupancy-plan-save'])) 102 103 { … … 290 291 * 1.3.11 - Save of intervalinfo for monthly interval 291 292 * 1.3.17 - Save of court and child court id 292 */ 293 private function internal_save_block() 294 { 295 // error_log(print_r('internal_save_block()', true)); 296 // error_log(print_r($_POST, true)); 297 293 * 1.4.1 - Changed vom private to public 294 */ 295 public function internal_save_block() 296 { 298 297 $interval = isset($_POST['interval'])? intval($_POST['interval']) : 1; 299 298 if ($interval == 1) -
occupancy-plan/trunk/includes/class-occupancy-plan-main.php
r3068435 r3068888 178 178 add_action('admin_post_nopriv_add_block', array($plugin_admin, 'add_block')); 179 179 add_action('admin_post_move_block', array($plugin_admin, 'move_block')); 180 add_action('admin_post_delete_block', array($plugin_admin, 'delete_block')); 180 181 181 182 add_action('admin_menu', array($plugin_admin, 'add_admin_page')); -
occupancy-plan/trunk/occupancy-plan.php
r3068435 r3068888 16 16 * Plugin URI: https://www.software-kunze.de/plugins/occupancy-plan/ 17 17 * Description: Management of Occupancy Plans 18 * Version: 1.4 18 * Version: 1.4.1 19 19 * Author: Alexander Kunze Software Consulting 20 20 * Author URI: https://www.software-kunze.de … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('Occupancy_Plan', '1.4 ');38 define('Occupancy_Plan', '1.4.1'); 39 39 40 40 /** -
occupancy-plan/trunk/readme.txt
r3068435 r3068888 5 5 Requires at least: 4.9 6 6 Tested up to: 6.5.2 7 Stable tag: 1.4 7 Stable tag: 1.4.1 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 50 50 == Changelog == 51 51 52 = 1.4.1 = 53 * Bugfix: Frontend add and delete booking 54 * Bugfix: Drag&Drop move of the booking 55 52 56 = 1.4 = 53 57 * If frontend is not anoymized then show detailed tooltip
Note: See TracChangeset
for help on using the changeset viewer.