Plugin Directory

Changeset 2698983


Ignore:
Timestamp:
03/24/2022 02:34:17 PM (4 years ago)
Author:
wphrmanager
Message:

Fixed Leave Hours Issue
fixed WP_HR-Manager Menu Issue

Location:
wp-hr-manager/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-hr-manager/trunk/modules/hrm/includes/admin/class-menu.php

    r2631006 r2698983  
    209209    public function employee_page()
    210210    {
    211         $action = ( isset( $_GET['action'] ) ? sanitize_text_field($_GET['action']) : 'list' );
    212         $id = ( isset( $_GET['id'] ) ? intval(sanitize_text_field( $_GET['id'] ) ) : 0 );
     211        $action = ( isset( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : 'list' );
     212        $id = ( isset( $_GET['id'] ) ? intval( sanitize_text_field( $_GET['id'] ) ) : 0 );
    213213        switch ( $action ) {
    214214            case 'view':
     
    243243    public function employee_my_profile_page()
    244244    {
    245         $action = ( isset( $_GET['action'] ) ? sanitize_text_field($_GET['action']) : 'view' );
    246         $id = ( isset( $_GET['id'] ) ? intval(sanitize_text_field( $_GET['id'] ) ) : intval( get_current_user_id() ) );
     245        $action = ( isset( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : 'view' );
     246        $id = ( isset( $_GET['id'] ) ? intval( sanitize_text_field( $_GET['id'] ) ) : intval( get_current_user_id() ) );
    247247        switch ( $action ) {
    248248            case 'view':
     
    280280    public function department_page()
    281281    {
    282         $action = ( isset( $_GET['action'] ) ? sanitize_text_field($_GET['action']) : 'list' );
    283         $id = ( isset( $_GET['id'] ) ? intval(sanitize_text_field( $_GET['id'] ) ) : 0 );
     282        $action = ( isset( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : 'list' );
     283        $id = ( isset( $_GET['id'] ) ? intval( sanitize_text_field( $_GET['id'] ) ) : 0 );
    284284        switch ( $action ) {
    285285            case 'view':
     
    339339    {
    340340       
    341         if ( isset( $_GET['subpage'] ) && sanitize_text_field($_GET['subpage']) == 'location' ) {
     341        if ( isset( $_GET['subpage'] ) && sanitize_text_field( $_GET['subpage'] ) == 'location' ) {
    342342            include WPHR_HRM_VIEWS . '/leave/holidayByLocation.php';
    343343        } else {
     
    374374    public function leave_requests()
    375375    {
    376         $view = ( isset( $_GET['view'] ) ? sanitize_text_field($_GET['view']) : 'list' );
     376        $view = ( isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : 'list' );
    377377        switch ( $view ) {
    378378            case 'new':
  • wp-hr-manager/trunk/modules/hrm/includes/class-form-handler.php

    r2631006 r2698983  
    613613            wp_die(__('You do not have sufficient permissions to do this action', 'wphr'));
    614614        }
     615        $financial_end_date = '';
     616        $financial_start_date = '';
    615617        $length_hours = 8;
    616618        $from_time = !empty($_POST['from_time']) ? sanitize_text_field( strtotime($_POST['from_time']) ) : 0;
     
    708710            $day_wise_from_times = custom_sanitize_array( $_POST['day_wise_from_times'] );
    709711            $day_wise_to_times   = custom_sanitize_array( $_POST['day_wise_to_times'] );
    710 
     712            /*$from_times_total       = explode(" ", $day_wise_from_times); 
     713            $to_times_total         = explode(" ", $day_wise_to_times);
     714            echo '<pre>';
     715            print_r( $from_times_total);
     716            print_r( $from_times_total);
     717            print_r($day_wise_to_times);
     718            print_r(count($day_wise_to_times));
     719
     720            die;*/
    711721            if (is_array($day_wise_from_times) && count($day_wise_from_times)) {
    712722                foreach ($day_wise_from_times as $key => $value) {
    713                     $from_time = strtotime($value);
     723                    if($value != ''){
     724                        $from_time = strtotime($value);
     725                    }
    714726                }
    715727            }
    716             if (is_array($day_wise_from_times) && count($day_wise_from_times)) {
     728            if (is_array($day_wise_from_times) && count($day_wise_to_times)) {
    717729                foreach ($day_wise_to_times as $key => $value) {
    718                     $to_time = strtotime($value);
     730                    if($value != ''){
     731                        $to_time = strtotime($value);
     732                    }
    719733                }
    720734            }
  • wp-hr-manager/trunk/readme.txt

    r2684061 r2698983  
    55Tags: HR, Human Resources, Attendance Management, Recruitment, Leave, Employee Self Service, ESS, People Management
    66Requires at least: 5.0
    7 Tested up to: 5.8.3
    8 Stable tag: 3.0.3
     7Tested up to: 5.9.2
     8Stable tag: 3.0.4
    99License: GPLv2
    1010Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GLKGN964GRZJW
     
    191191
    192192== Changelog ==
     193= v3.0.4-> 24 March 2022
     194* Fixed Leave Hours Issue
     195*Fixed WP-HR-Manager Menu issue
    193196
    194197= v3.0.3-> 23 February 2022
     
    391394
    392395== Upgrade Notice ==
     396= v3.0.4-> 24 March 2022
     397* Fixed Leave Hours Issue
     398*Fixed WP-HR-Manager Menu issue
     399
    393400= v3.0.3-> 23 February 2022
    394401* Security fix
  • wp-hr-manager/trunk/wp-hr-manager.php

    r2684061 r2698983  
    77 * Author: Black and White Digital Ltd
    88 * Author URI: http://www.wphrmanager.com
    9  * Version: 3.0.3
     9 * Version: 3.0.4
    1010 * Requires at least: 5
    1111 * License: GPLv2
Note: See TracChangeset for help on using the changeset viewer.