Plugin Directory

Changeset 3033546


Ignore:
Timestamp:
02/09/2024 09:21:34 AM (22 months ago)
Author:
supportcandy
Message:

version 3.2.5

Location:
supportcandy
Files:
695 added
34 edited

Legend:

Unmodified
Added
Removed
  • supportcandy/trunk/asset/js/admin.js

    r3031986 r3033546  
    223223    jQuery( '.wpsc-tickets-nav, .wpsc-humbargar-menu-item' ).removeClass( 'active' );
    224224    jQuery( '.wpsc-tickets-nav.dashboard, .wpsc-humbargar-menu-item.dashboard' ).addClass( 'active' );
    225     jQuery( '.wpsc-humbargar-title' ).html( supportcandy.humbargar_titles.agent_profile );
     225    jQuery( '.wpsc-humbargar-title' ).html( supportcandy.humbargar_titles.dashboard );
    226226
    227227    window.history.replaceState( {}, null, 'admin.php?page=wpsc-tickets&section=dashboard' );
  • supportcandy/trunk/class-wpsc-installation.php

    r3031986 r3033546  
    13801380            );
    13811381
     1382            // File attachment settings.
     1383            require_once WPSC_ABSPATH . 'includes/class-wpsc-mime-types.php';
     1384
     1385            $extensions = 'jpg, jpeg, png, gif, pdf, doc, docx, ppt, pptx, pps, ppsx, odt, xls, xlsx, mp3, m4a, ogg, wav, mp4, m4v, mov, wmv, avi, mpg, ogv, 3gp, 3g2, zip, eml';
     1386            $exts = $extensions ? explode( ',', $extensions ) : array();
     1387            $exts = array_map( 'trim', $exts );
     1388            $mimes = array();
     1389            foreach ( $exts as $key => $value ) {
     1390                $mime = WPSC_MIME_TYPES::get_mime_type( $value );
     1391                if ( $mime ) {
     1392                    $mimes[ $value ] = $mime;
     1393                }
     1394            }
     1395
    13821396            update_option(
    13831397                'wpsc-gs-file-attachments',
    13841398                array(
    13851399                    'attachments-max-filesize' => 20,
    1386                     'allowed-file-extensions'  => 'jpg, jpeg, png, gif, pdf, doc, docx, ppt, pptx, pps, ppsx, odt, xls, xlsx, mp3, m4a, ogg, wav, mp4, m4v, mov, wmv, avi, mpg, ogv, 3gp, 3g2, zip, eml',
     1400                    'allowed-file-extensions'  => $extensions,
     1401                    'allowed-file-ext-mimes'   => $mimes,
     1402                    'mime-exceptions'          => array(),
    13871403                    'image-download-behaviour' => 'open-browser',
    13881404                )
     
    23502366            }
    23512367
     2368            if ( version_compare( self::$current_version, '3.2.5', '<' ) ) {
     2369
     2370                $file_attachments = get_option( 'wpsc-gs-file-attachments' );
     2371
     2372                require_once WPSC_ABSPATH . 'includes/class-wpsc-mime-types.php';
     2373
     2374                $exts = $file_attachments['allowed-file-extensions'] ? explode( ',', $file_attachments['allowed-file-extensions'] ) : array();
     2375                $exts = array_map( 'trim', $exts );
     2376                $mimes = array();
     2377                foreach ( $exts as $key => $value ) {
     2378                    $mime = WPSC_MIME_TYPES::get_mime_type( $value );
     2379                    if ( $mime ) {
     2380                        $mimes[ $value ] = $mime;
     2381                    }
     2382                }
     2383                $file_attachments['allowed-file-ext-mimes'] = $mimes;
     2384                $file_attachments['mime-exceptions'] = array();
     2385
     2386                update_option( 'wpsc-gs-file-attachments', $file_attachments );
     2387            }
     2388
    23522389            update_option( 'wpsc-string-translation', $string_translations );
    23532390            self::set_upgrade_complete();
  • supportcandy/trunk/includes/admin/customers/class-wpsc-customers.php

    r3031986 r3033546  
    10401040                                }
    10411041                                ?>
    1042                                 <div class="wpsc-widget-list"><?php echo wp_kses_post( $cf->type::print_activity( $cf, $log, $body ) ); ?><?php echo esc_attr( ' (' . $time_ago . ')' ); ?></div>
     1042                                <div class="wpsc-widget-list"><?php echo wp_kses_post( $cf->type::print_activity( $cf, $log, $body, '0' ) ); ?><?php echo esc_attr( ' (' . $time_ago . ')' ); ?></div>
    10431043                                <?php
    10441044                            }
  • supportcandy/trunk/includes/admin/recent-activities/class-wpsc-ra-logs.php

    r3031986 r3033546  
    122122                            continue;
    123123                        }
    124                         $log_str = '<span class="wpsc-ra-log-desc">' . $cf->type::print_activity( $cf, $log, $body ) . '</span>
     124                        $log_str = '<span class="wpsc-ra-log-desc">' . $cf->type::print_activity( $cf, $log, $body, '0' ) . '</span>
    125125                                <span class="wpsc-ra-log-time">' . $time_ago . '</span>';
    126126                    }
     
    214214                            'slug'    => 'custom_query',
    215215                            'compare' => '=',
     216                            'val'     => 'JSON_VALID(body)',
     217                        ),
     218                        array(
     219                            'slug'    => 'custom_query',
     220                            'compare' => '=',
    216221                            'val'     => "JSON_EXTRACT(body, '$.slug') IN (" . $cust_fields . ')',
    217222                        ),
  • supportcandy/trunk/includes/admin/settings/dashboard-settings/class-wpsc-dashboard-action.php

    r3031986 r3033546  
    120120            if ( $view === '0' ) {
    121121                $url = admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list' );
    122             } elseif ( $page_settings['ticket-url-page'] == 'support-page' && $page_settings['support-page'] ) {
     122            } elseif ( ( $page_settings['ticket-url-page'] == 'support-page' && $page_settings['support-page'] ) ||
     123                    $page_settings['ticket-url-page'] == 'open-ticket-page' && $page_settings['open-ticket-page'] ) {
     124
    123125                $url = get_permalink( $page_settings['support-page'] );
    124126                $url = add_query_arg(
  • supportcandy/trunk/includes/admin/settings/dashboard-settings/class-wpsc-dashboard-general-setting.php

    r3031986 r3033546  
    147147                        <option <?php echo esc_attr( in_array( 'reply', $db_gs['allowed-recent-activity-logs'] ) ? 'selected' : '' ); ?> value="reply"><?php esc_attr_e( 'Reply', 'supportcandy' ); ?></option>
    148148                        <option <?php echo esc_attr( in_array( 'note', $db_gs['allowed-recent-activity-logs'] ) ? 'selected' : '' ); ?> value="note"><?php esc_attr_e( 'Note', 'supportcandy' ); ?></option>
    149                         <option <?php echo esc_attr( in_array( 'assignee', $db_gs['allowed-recent-activity-logs'] ) ? 'selected' : '' ); ?> value="assignee"><?php esc_attr_e( 'Assignee', 'supportcandy' ); ?></option>
    150149                        <?php
    151150                        foreach ( WPSC_Custom_Field::$custom_fields as $cf ) {
  • supportcandy/trunk/includes/admin/settings/dashboard-settings/widgets/class-wpsc-dbw-agent-list.php

    r3031986 r3033546  
    325325            if ( $view === '0' ) {
    326326                $url = admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list' );
    327             } elseif ( $page_settings['ticket-url-page'] == 'support-page' && $page_settings['support-page'] ) {
     327            } elseif ( ( $page_settings['ticket-url-page'] == 'support-page' && $page_settings['support-page'] ) ||
     328                        ( $page_settings['ticket-url-page'] == 'open-ticket-page' && $page_settings['open-ticket-page'] ) ) {
    328329                $url = get_permalink( $page_settings['support-page'] );
    329330                $url = add_query_arg(
  • supportcandy/trunk/includes/admin/settings/dashboard-settings/widgets/class-wpsc-dbw-recent-activities.php

    r3031986 r3033546  
    117117                        if ( $log->type == 'report' ) {
    118118                            ?>
    119                             <div class="wpsc-widget-list"><?php echo esc_attr( $log->customer->name ) . ' ' . esc_attr__( 'created a ticket', 'supportcandy' ); ?> <a href="<?php echo esc_attr( $url ); ?>" target="_blank">#<?php echo esc_attr( $log->ticket->id ) . ' ' . esc_attr( $log->ticket->subject ); ?></a><?php echo esc_attr( ' (' . $time_ago . ')' ); ?></div>
     119                            <div class="wpsc-widget-list"><?php echo esc_attr( $log->customer->name ) . ' ' . esc_attr__( 'created a ticket', 'supportcandy' ); ?>
     120                                <a href="<?php echo esc_attr( $url ); ?>" target="_blank">#<?php echo esc_attr( $log->ticket->id ) . ' ' . esc_attr( $log->ticket->subject ); ?></a><?php echo esc_attr( ' (' . $time_ago . ')' ); ?>
     121                            </div>
    120122                            <?php
    121123                        } elseif ( $log->type == 'reply' ) {
    122124                            ?>
    123                             <div class="wpsc-widget-list"><?php echo esc_attr( $log->customer->name ) . ' ' . esc_attr__( 'replied to ticket', 'supportcandy' ); ?> <a href="<?php echo esc_attr( $url ); ?>" target="_blank">#<?php echo esc_attr( $log->ticket->id ); ?></a><?php echo esc_attr( ' (' . $time_ago . ')' ); ?></div>
     125                            <div class="wpsc-widget-list"><?php echo esc_attr( $log->customer->name ) . ' ' . esc_attr__( 'replied to ticket', 'supportcandy' ); ?>
     126                                <a href="<?php echo esc_attr( $url ); ?>" target="_blank">#<?php echo esc_attr( $log->ticket->id ); ?></a><?php echo esc_attr( ' (' . $time_ago . ')' ); ?>
     127                            </div>
    124128                            <?php
    125129                        } elseif ( $log->type == 'note' ) {
    126130                            ?>
    127                             <div class="wpsc-widget-list"><?php echo esc_attr( $log->customer->name ) . ' ' . esc_attr__( 'added a note to ticket', 'supportcandy' ); ?> <a href="<?php echo esc_attr( $url ); ?>" target="_blank">#<?php echo esc_attr( $log->ticket->id ); ?></a><?php echo esc_attr( ' (' . $time_ago . ')' ); ?></div>
     131                            <div class="wpsc-widget-list"><?php echo esc_attr( $log->customer->name ) . ' ' . esc_attr__( 'added a note to ticket', 'supportcandy' ); ?>
     132                                <a href="<?php echo esc_attr( $url ); ?>" target="_blank">#<?php echo esc_attr( $log->ticket->id ); ?></a><?php echo esc_attr( ' (' . $time_ago . ')' ); ?>
     133                            </div>
    128134                            <?php
    129135                        } elseif ( $log->type == 'log' ) {
     
    139145                                }
    140146                                ?>
    141                                 <div class="wpsc-widget-list"><?php echo wp_kses_post( $cf->type::print_activity( $cf, $log, $body ) ); ?><?php echo esc_attr( ' (' . $time_ago . ')' ); ?></div>
     147                                <div class="wpsc-widget-list">
     148                                    <?php echo wp_kses_post( $cf->type::print_activity( $cf, $log, $body, $view ) ); ?><?php echo esc_attr( ' (' . $time_ago . ')' ); ?>
     149                                </div>
    142150                                <?php
    143151                            }
  • supportcandy/trunk/includes/admin/settings/dashboard-settings/widgets/class-wpsc-dbw-recent-tickets.php

    r3031986 r3033546  
    117117                        $time_ago = WPSC_Functions::date_interval_highest_unit_ago( $ticket->date_created->diff( $now ) );
    118118                        ?>
    119                         <div class="wpsc-widget-list"><a href="<?php echo esc_attr( $url ); ?>" target="_blank"><?php echo esc_attr( '#' . $ticket->id ); ?></a>
     119                        <div class="wpsc-widget-list">
     120                            <a href="<?php echo esc_attr( $url ); ?>" target="_blank">
     121                                <?php echo esc_attr( '#' . $ticket->id ); ?>
     122                            </a>
    120123                            <?php
    121124                            echo esc_attr( $ticket->subject );
  • supportcandy/trunk/includes/admin/settings/general-settings/class-wpsc-gs-file-attachments.php

    r2822852 r3033546  
    3434        public static function reset() {
    3535
     36            $allowed_extensions = 'jpg, jpeg, png, gif, pdf, doc, docx, ppt, pptx, pps, ppsx, odt, xls, xlsx, mp3, m4a, ogg, wav, mp4, m4v, mov, wmv, avi, mpg, ogv, 3gp, 3g2, zip, eml';
    3637            $file_attachments = apply_filters(
    3738                'wpsc_gs_file_attachments',
    3839                array(
    3940                    'attachments-max-filesize' => 20,
    40                     'allowed-file-extensions'  => 'jpg, jpeg, png, gif, pdf, doc, docx, ppt, pptx, pps, ppsx, odt, xls, xlsx, mp3, m4a, ogg, wav, mp4, m4v, mov, wmv, avi, mpg, ogv, 3gp, 3g2, zip, eml',
     41                    'allowed-file-extensions'  => $allowed_extensions,
     42                    'allowed-file-ext-mimes'   => self::get_mime_types_by_extensions( $allowed_extensions ),
     43                    'mime-exceptions'          => array(),
    4144                    'image-download-behaviour' => 'open-browser',
    4245                )
     
    7881                    </div>
    7982                    <input id="wpsc-allowed-file" type="text" name="allowed-file-extensions" value="<?php echo esc_attr( $settings['allowed-file-extensions'] ); ?>">
     83                </div>
     84                <div class="wpsc-input-group">
     85                    <div class="label-container">
     86                        <label for=""><?php esc_attr_e( 'MIME exceptions (One per line)', 'supportcandy' ); ?></label>
     87                    </div>
     88                    <small style="padding-bottom: 5px;"><?php esc_attr_e( 'Add files in format, extension: MIME type. For example, png: image/png.', 'supportcandy' ); ?></small>
     89                    <?php $mime_exceptions = $settings['mime-exceptions'] ? implode( PHP_EOL, $settings['mime-exceptions'] ) : ''; ?>
     90                    <textarea name="wpsc-mime-exceptions" rows="5"><?php echo esc_attr( $mime_exceptions ); ?></textarea>
    8091                </div>
    8192                <div class="wpsc-input-group">
     
    121132            }
    122133
     134            $allowed_extensions = isset( $_POST['allowed-file-extensions'] ) ? sanitize_text_field( wp_unslash( $_POST['allowed-file-extensions'] ) ) : '';
     135
     136            $mime_exceptions = isset( $_POST['wpsc-mime-exceptions'] ) ? sanitize_textarea_field( wp_unslash( $_POST['wpsc-mime-exceptions'] ) ) : '';
     137            $mime_exceptions = array_filter( array_map( 'sanitize_text_field', explode( PHP_EOL, $mime_exceptions ) ) );
     138
    123139            $file_attachments = apply_filters(
    124140                'wpsc_set_gs_file_attachments',
    125141                array(
    126142                    'attachments-max-filesize' => isset( $_POST['attachments-max-filesize'] ) ? intval( $_POST['attachments-max-filesize'] ) : 20,
    127                     'allowed-file-extensions'  => isset( $_POST['allowed-file-extensions'] ) ? sanitize_text_field( wp_unslash( $_POST['allowed-file-extensions'] ) ) : '',
     143                    'allowed-file-extensions'  => $allowed_extensions,
     144                    'allowed-file-ext-mimes'   => self::get_mime_types_by_extensions( $allowed_extensions ),
     145                    'mime-exceptions'          => $mime_exceptions,
    128146                    'image-download-behaviour' => isset( $_POST['image-download-behaviour'] ) ? sanitize_text_field( wp_unslash( $_POST['image-download-behaviour'] ) ) : 'open-browser',
    129147                )
     
    307325            <?php
    308326        }
     327
     328        /**
     329         * Get MIME type extensions
     330         *
     331         * @param string $extensions - extension strings.
     332         * @return array
     333         */
     334        public static function get_mime_types_by_extensions( $extensions ) {
     335
     336            require_once WPSC_ABSPATH . 'includes/class-wpsc-mime-types.php';
     337
     338            $exts = $extensions ? explode( ',', $extensions ) : array();
     339            $exts = array_map( 'trim', $exts );
     340            $mimes = array();
     341            foreach ( $exts as $key => $value ) {
     342                $mime = WPSC_MIME_TYPES::get_mime_type( $value );
     343                if ( $mime ) {
     344                    $mimes[ $value ] = $mime;
     345                }
     346            }
     347            return $mimes;
     348        }
    309349    }
    310350endif;
  • supportcandy/trunk/includes/class-wpsc-functions.php

    r3031986 r3033546  
    10681068                    $url
    10691069                );
     1070            } elseif ( $page_settings['ticket-url-page'] == 'open-ticket-page' && $page_settings['open-ticket-page'] ) {
     1071                $url        = get_permalink( $page_settings['open-ticket-page'] );
     1072                $ticket = new WPSC_Ticket( $ticket_id );
     1073                $url = add_query_arg(
     1074                    array(
     1075                        'ticket-id' => $ticket_id,
     1076                        'auth-code' => $ticket->auth_code,
     1077                    ),
     1078                    $url
     1079                );
    10701080            }
    10711081
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-checkbox.php

    r3031986 r3033546  
    16591659         * Print dashboard activity function
    16601660         *
    1661          * @param  WPSC_Custom_Field $cf - custom field object.
    1662          * @param array             $recent_logs recent_logs object.
    1663          * @param array             $body body object.
     1661         * @param WPSC_Custom_Field $cf - custom field object.
     1662         * @param array             $recent_logs - recent_logs object.
     1663         * @param array             $body - body object.
     1664         * @param int               $view - check if frontend.
    16641665         * @return string
    16651666         */
    1666         public static function print_activity( $cf, $recent_logs, $body ) {
    1667 
     1667        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1668
     1669            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    16681670            $checkbox_values = explode( '|', $body->new );
    1669 
    16701671            $checkbox_val_names = array();
    1671 
    16721672            foreach ( $checkbox_values as $new_val_id ) {
    16731673                $new_val = new WPSC_Option( $new_val_id );
     
    16811681                $value_names = 'None';
    16821682            }
    1683             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $value_names );
     1683            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $value_names );
    16841684        }
    16851685    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-date.php

    r3031986 r3033546  
    16251625         * Print dashboard activity function
    16261626         *
    1627          * @param  WPSC_Custom_Field $cf - custom field object.
    1628          * @param array             $recent_logs recent_logs object.
    1629          * @param array             $body body object.
     1627         * @param WPSC_Custom_Field $cf - custom field object.
     1628         * @param array             $recent_logs - recent_logs object.
     1629         * @param array             $body - body object.
     1630         * @param int               $view - check if frontend.
    16301631         * @return string
    16311632         */
    1632         public static function print_activity( $cf, $recent_logs, $body ) {
     1633        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1634
     1635            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    16331636            $gs     = get_option( 'wpsc-gs-general' );
    16341637            $format = $cf->date_format ? $cf->date_format : $gs['default-date-format'];
     
    16401643                $log = 'None';
    16411644            }
    1642             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $log );
     1645            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $log );
    16431646        }
    16441647    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-datetime.php

    r3031986 r3033546  
    16051605         * Print dashboard activity function
    16061606         *
    1607          * @param  WPSC_Custom_Field $cf - custom field object.
    1608          * @param array             $recent_logs recent_logs object.
    1609          * @param array             $body body object.
     1607         * @param WPSC_Custom_Field $cf - custom field object.
     1608         * @param array             $recent_logs - recent_logs object.
     1609         * @param array             $body - body object.
     1610         * @param int               $view - check if frontend.
    16101611         * @return string
    16111612         */
    1612         public static function print_activity( $cf, $recent_logs, $body ) {
     1613        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1614
     1615            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    16131616            $gs     = get_option( 'wpsc-gs-general' );
    16141617            $format = $cf->date_format ? $cf->date_format : $gs['default-date-format'];
     
    16201623                $log = 'None';
    16211624            }
    1622             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $log );
     1625            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $log );
    16231626        }
    16241627    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-email.php

    r3031986 r3033546  
    13861386         * Print dashboard activity function
    13871387         *
    1388          * @param  WPSC_Custom_Field $cf - custom field object.
    1389          * @param array             $recent_logs recent_logs object.
    1390          * @param array             $body body object.
     1388         * @param WPSC_Custom_Field $cf - custom field object.
     1389         * @param array             $recent_logs - recent_logs object.
     1390         * @param array             $body - body object.
     1391         * @param int               $view - check if frontend.
    13911392         * @return string
    13921393         */
    1393         public static function print_activity( $cf, $recent_logs, $body ) {
    1394 
     1394        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1395
     1396            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    13951397            if ( $body->new ) {
    13961398                $email = $body->new;
     
    13981400                $email = 'None';
    13991401            }
    1400             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $email );
     1402            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $email );
    14011403        }
    14021404    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-file-attachment-multiple.php

    r3031986 r3033546  
    11801180         * Print dashboard activity function
    11811181         *
    1182          * @param  WPSC_Custom_Field $cf - custom field object.
    1183          * @param array             $recent_logs recent_logs object.
    1184          * @param array             $body body object.
     1182         * @param WPSC_Custom_Field $cf - custom field object.
     1183         * @param array             $recent_logs - recent_logs object.
     1184         * @param array             $body - body object.
     1185         * @param int               $view - check if frontend.
    11851186         * @return string
    11861187         */
    1187         public static function print_activity( $cf, $recent_logs, $body ) {
    1188 
     1188        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1189
     1190            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    11891191            $ids = explode( '|', $body->new );
    11901192            $names = array();
     
    12011203                $link = 'None';
    12021204            }
    1203             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . wp_kses_post( $link );
     1205            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . wp_kses_post( $link );
    12041206        }
    12051207    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-file-attachment-single.php

    r3031986 r3033546  
    10621062         * Print dashboard activity function
    10631063         *
    1064          * @param  WPSC_Custom_Field $cf - custom field object.
    1065          * @param array             $recent_logs recent_logs object.
    1066          * @param array             $body body object.
     1064         * @param WPSC_Custom_Field $cf - custom field object.
     1065         * @param array             $recent_logs - recent_logs object.
     1066         * @param array             $body - body object.
     1067         * @param int               $view - check if frontend.
    10671068         * @return string
    10681069         */
    1069         public static function print_activity( $cf, $recent_logs, $body ) {
    1070 
     1070        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1071
     1072            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    10711073            if ( $body->new ) {
    10721074                $attachment = new WPSC_Attachment( $body->new );
     
    10761078                $link = 'None';
    10771079            }
    1078             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . wp_kses_post( $link );
     1080            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . wp_kses_post( $link );
    10791081        }
    10801082    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-multi-select.php

    r3031986 r3033546  
    15611561         * Print dashboard activity function
    15621562         *
    1563          * @param  WPSC_Custom_Field $cf - custom field object.
    1564          * @param array             $recent_logs recent_logs object.
    1565          * @param array             $body body object.
     1563         * @param WPSC_Custom_Field $cf - custom field object.
     1564         * @param array             $recent_logs - recent_logs object.
     1565         * @param array             $body - body object.
     1566         * @param int               $view - check if frontend.
    15661567         * @return string
    15671568         */
    1568         public static function print_activity( $cf, $recent_logs, $body ) {
    1569 
     1569        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1570
     1571            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    15701572            $ms_values = explode( '|', $body->new );
    15711573
     
    15811583                $ms_names = 'None';
    15821584            }
    1583             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $ms_names );
     1585            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $ms_names );
    15841586        }
    15851587    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-number.php

    r3031986 r3033546  
    15241524         * Print dashboard activity function
    15251525         *
    1526          * @param  WPSC_Custom_Field $cf - custom field object.
    1527          * @param array             $recent_logs recent_logs object.
    1528          * @param array             $body body object.
     1526         * @param WPSC_Custom_Field $cf - custom field object.
     1527         * @param array             $recent_logs - recent_logs object.
     1528         * @param array             $body - body object.
     1529         * @param int               $view - check if frontend.
    15291530         * @return string
    15301531         */
    1531         public static function print_activity( $cf, $recent_logs, $body ) {
    1532 
     1532        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1533
     1534            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    15331535            if ( $body->new ) {
    15341536                $number = $body->new;
     
    15361538                $number = 'None';
    15371539            }
    1538             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $number );
     1540            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $number );
    15391541        }
    15401542    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-radio-button.php

    r3031986 r3033546  
    15141514         * Print dashboard activity function
    15151515         *
    1516          * @param  WPSC_Custom_Field $cf - custom field object.
    1517          * @param array             $recent_logs recent_logs object.
    1518          * @param array             $body body object.
     1516         * @param WPSC_Custom_Field $cf - custom field object.
     1517         * @param array             $recent_logs - recent_logs object.
     1518         * @param array             $body - body object.
     1519         * @param int               $view - check if frontend.
    15191520         * @return string
    15201521         */
    1521         public static function print_activity( $cf, $recent_logs, $body ) {
    1522 
     1522        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1523
     1524            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    15231525            if ( $body->new ) {
    15241526                $value = new WPSC_Option( $body->new );
     
    15271529                $rb_value = 'None';
    15281530            }
    1529             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $rb_value );
     1531            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $rb_value );
    15301532        }
    15311533    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-single-select.php

    r3031986 r3033546  
    14471447         * Print dashboard activity function
    14481448         *
    1449          * @param  WPSC_Custom_Field $cf - custom field object.
    1450          * @param array             $recent_logs recent_logs object.
    1451          * @param array             $body body object.
     1449         * @param WPSC_Custom_Field $cf - custom field object.
     1450         * @param array             $recent_logs - recent_logs object.
     1451         * @param array             $body - body object.
     1452         * @param int               $view - check if frontend.
    14521453         * @return string
    14531454         */
    1454         public static function print_activity( $cf, $recent_logs, $body ) {
    1455 
     1455        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1456
     1457            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    14561458            if ( $body->new ) {
    14571459                $ss_value = new WPSC_Option( $body->new );
     
    14601462                $value = 'None';
    14611463            }
    1462             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $value );
     1464            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $value );
    14631465        }
    14641466    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-text-field.php

    r3031986 r3033546  
    14231423         * Print dashboard activity function
    14241424         *
    1425          * @param  WPSC_Custom_Field $cf - custom field object.
    1426          * @param array             $recent_logs recent_logs object.
    1427          * @param array             $body body object.
     1425         * @param WPSC_Custom_Field $cf - custom field object.
     1426         * @param array             $recent_logs - recent_logs object.
     1427         * @param array             $body - body object.
     1428         * @param int               $view - check if frontend.
    14281429         * @return string
    14291430         */
    1430         public static function print_activity( $cf, $recent_logs, $body ) {
    1431 
     1431        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1432
     1433            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    14321434            if ( $body->new ) {
    14331435                $tf_value = $body->new;
     
    14351437                $tf_value = 'None';
    14361438            }
    1437             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $tf_value );
     1439            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $tf_value );
    14381440        }
    14391441    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-textarea.php

    r3031986 r3033546  
    13411341         * Print dashboard activity function
    13421342         *
    1343          * @param  WPSC_Custom_Field $cf - custom field object.
    1344          * @param array             $recent_logs recent_logs object.
    1345          * @param array             $body body object.
     1343         * @param WPSC_Custom_Field $cf - custom field object.
     1344         * @param array             $recent_logs - recent_logs object.
     1345         * @param array             $body - body object.
     1346         * @param int               $view - check if frontend.
    13461347         * @return string
    13471348         */
    1348         public static function print_activity( $cf, $recent_logs, $body ) {
    1349 
     1349        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1350
     1351            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    13501352            if ( $body->new ) {
    13511353                $ta_value = $body->new;
     
    13531355                $ta_value = 'None';
    13541356            }
    1355             return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $ta_value );
     1357            return esc_attr( $recent_logs->customer->name ) . ' updated the' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $ta_value );
    13561358        }
    13571359    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-time.php

    r3031986 r3033546  
    15681568         * Print dashboard activity function
    15691569         *
    1570          * @param  WPSC_Custom_Field $cf - custom field object.
    1571          * @param array             $recent_logs recent_logs object.
    1572          * @param array             $body body object.
     1570         * @param WPSC_Custom_Field $cf - custom field object.
     1571         * @param array             $recent_logs - recent_logs object.
     1572         * @param array             $body - body object.
     1573         * @param int               $view - check if frontend.
    15731574         * @return string
    15741575         */
    1575         public static function print_activity( $cf, $recent_logs, $body ) {
    1576 
     1576        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1577
     1578            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    15771579            $new_val = DateTime::createFromFormat( 'H:i', $body->new );
    15781580            if ( $new_val ) {
     
    15811583                $log = 'None';
    15821584            }
    1583             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $log );
     1585            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $log );
    15841586        }
    15851587    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-cf-url.php

    r3031986 r3033546  
    13881388         * Print dashboard activity function
    13891389         *
    1390          * @param  WPSC_Custom_Field $cf - custom field object.
    1391          * @param array             $recent_logs recent_logs object.
    1392          * @param array             $body body object.
     1390         * @param WPSC_Custom_Field $cf - custom field object.
     1391         * @param array             $recent_logs - recent_logs object.
     1392         * @param array             $body - body object.
     1393         * @param int               $view - check if frontend.
    13931394         * @return string
    13941395         */
    1395         public static function print_activity( $cf, $recent_logs, $body ) {
    1396 
     1396        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1397
     1398            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    13971399            if ( $body->new ) {
    13981400                $url_value = $body->new;
     
    14001402                $url_value = 'None';
    14011403            }
    1402             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to <a href="' . esc_attr( $url_value ) . '">' . esc_attr( $url_value ) . '</a>';
     1404            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' value of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to <a href="' . esc_attr( $url_value ) . '">' . esc_attr( $url_value ) . '</a>';
    14031405        }
    14041406    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-df-assigned-agent.php

    r3031986 r3033546  
    13911391         * Print dashboard activity function
    13921392         *
    1393          * @param  WPSC_Custom_Field $cf - custom field object.
    1394          * @param array             $recent_logs recent_logs object.
    1395          * @param array             $body body object.
     1393         * @param WPSC_Custom_Field $cf - custom field object.
     1394         * @param array             $recent_logs - recent_logs object.
     1395         * @param array             $body - body object.
     1396         * @param int               $view - check if frontend.
    13961397         * @return string
    13971398         */
    1398         public static function print_activity( $cf, $recent_logs, $body ) {
    1399 
     1399        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     1400
     1401            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    14001402            $new_aa_names = array();
    14011403            foreach ( $body->new as $agent ) {
     
    14111413                $aa_names = 'None';
    14121414            }
    1413             return esc_attr( $recent_logs->customer->name ) . ' assigned ticket <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $aa_names );
     1415            return esc_attr( $recent_logs->customer->name ) . ' assigned ticket <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $aa_names );
    14141416        }
    14151417    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-df-category.php

    r3031986 r3033546  
    809809         * Print dashboard activity function
    810810         *
    811          * @param  WPSC_Custom_Field $cf - custom field object.
    812          * @param array             $recent_logs recent_logs object.
    813          * @param array             $body body object.
     811         * @param WPSC_Custom_Field $cf - custom field object.
     812         * @param array             $recent_logs - recent_logs object.
     813         * @param array             $body - body object.
     814         * @param int               $view - check if frontend.
    814815         * @return string
    815816         */
    816         public static function print_activity( $cf, $recent_logs, $body ) {
    817 
     817        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     818
     819            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    818820            $new_category = new WPSC_Category( $body->new );
    819821            if ( $new_category->id ) {
     
    822824                $category_value = 'None';
    823825            }
    824             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $category_value );
     826            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $category_value );
    825827        }
    826828    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-df-priority.php

    r3006599 r3033546  
    839839            return $data;
    840840        }
     841
     842        /**
     843         * Print dashboard activity function
     844         *
     845         * @param WPSC_Custom_Field $cf - custom field object.
     846         * @param array             $recent_logs - recent_logs object.
     847         * @param array             $body - body object.
     848         * @param int               $view - check if frontend.
     849         * @return string
     850         */
     851        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     852
     853            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
     854            $new_priority = new WPSC_Priority( $body->new );
     855            if ( $new_priority->id ) {
     856                $priority_value = $new_priority->name;
     857            } else {
     858                $priority_value = 'None';
     859            }
     860            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $priority_value );
     861        }
    841862    }
    842863endif;
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-df-status.php

    r3031986 r3033546  
    737737         * Print dashboard activity function
    738738         *
    739          * @param  WPSC_Custom_Field $cf - custom field object.
    740          * @param array             $recent_logs recent_logs object.
    741          * @param array             $body body object.
     739         * @param WPSC_Custom_Field $cf - custom field object.
     740         * @param array             $recent_logs - recent_logs object.
     741         * @param array             $body - body object.
     742         * @param int               $view - check if frontend.
    742743         * @return string
    743744         */
    744         public static function print_activity( $cf, $recent_logs, $body ) {
    745 
     745        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     746
     747            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    746748            $new_status = new WPSC_Status( $body->new );
    747749            if ( $new_status->id ) {
     
    750752                $status_value = 'None';
    751753            }
    752             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $status_value );
     754            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $status_value );
    753755        }
    754756    }
  • supportcandy/trunk/includes/custom-field-types/class-wpsc-df-subject.php

    r3031986 r3033546  
    816816         * Print dashboard activity function
    817817         *
    818          * @param  WPSC_Custom_Field $cf - custom field object.
    819          * @param array             $recent_logs recent_logs object.
    820          * @param array             $body body object.
     818         * @param WPSC_Custom_Field $cf - custom field object.
     819         * @param array             $recent_logs - recent_logs object.
     820         * @param array             $body - body object.
     821         * @param int               $view - check if frontend.
    821822         * @return string
    822823         */
    823         public static function print_activity( $cf, $recent_logs, $body ) {
    824 
     824        public static function print_activity( $cf, $recent_logs, $body, $view ) {
     825
     826            $url = WPSC_Functions::get_ticket_url( $recent_logs->ticket->id, $view );
    825827            if ( $body->new ) {
    826828                $value = $body->new;
     
    828830                $value = 'None';
    829831            }
    830             return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . admin_url( 'admin.php?page=wpsc-tickets&section=ticket-list&id=' . esc_attr( $recent_logs->ticket->id ) ) . '">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $value );
     832            return esc_attr( $recent_logs->customer->name ) . ' updated the ' . esc_attr( $cf->name ) . ' of <a href="' . esc_attr( $url ) . '" target="_blank">#' . esc_attr( $recent_logs->ticket->id ) . '</a> to ' . esc_attr( $value );
    831833        }
    832834    }
  • supportcandy/trunk/includes/frontend/class-wpsc-shortcode-one.php

    r3031986 r3033546  
    571571                    jQuery( '.wpsc-tickets-nav, .wpsc-humbargar-menu-item' ).removeClass( 'active' );
    572572                    jQuery( '.wpsc-tickets-nav.dashboard, .wpsc-humbargar-menu-item.dashboard' ).addClass( 'active' );
    573                     jQuery( '.wpsc-humbargar-title' ).html( supportcandy.humbargar_titles.agent_profile );
     573                    jQuery( '.wpsc-humbargar-title' ).html( supportcandy.humbargar_titles.dashboard );
    574574
    575575                    // set url
  • supportcandy/trunk/includes/models/class-wpsc-attachment.php

    r3031986 r3033546  
    9494
    9595            return $param;
     96        }
     97
     98        /**
     99         * Custom upload mime types
     100         *
     101         * @param array $existing_mimes - file upload array.
     102         * @return array
     103         */
     104        public static function wpsc_custom_upload_mimes( $existing_mimes ) {
     105
     106            $settings = get_option( 'wpsc-gs-file-attachments', array() );
     107            foreach ( $settings['mime-exceptions'] as $type ) {
     108
     109                $type_array = explode( ':', $type );
     110                $existing_mimes[ $type_array[0] ] = $type_array[1];
     111            }
     112            if ( isset( $settings['allowed-file-ext-mimes'] ) ) {
     113                $existing_mimes = array_merge( $existing_mimes, $settings['allowed-file-ext-mimes'] );
     114            }
     115            return $existing_mimes;
    96116        }
    97117
     
    561581            }
    562582
     583            $ext = pathinfo( $filename, PATHINFO_EXTENSION );
     584            $file_name = substr( $filename, 0, -( strlen( $ext ) + 1 ) );
     585            $filename = $file_name . '.' . strtolower( $ext );
    563586            $filepath_short = '/wpsc/' . $today->format( 'Y' ) . '/' . $today->format( 'm' ) . '/' . $filename;
    564587            $data['file_path'] = $filepath_short;
     
    568591                'test_form' => false,
    569592            );
    570             $file['name']  = $filename;
     593            $file['name'] = $filename;
    571594            add_filter( 'upload_dir', array( __CLASS__, 'wpsc_upload_dir' ) );
     595            add_filter( 'upload_mimes', array( __CLASS__, 'wpsc_custom_upload_mimes' ) );
    572596            $uploaded_file = wp_handle_upload( $file, $upload_overrides );
    573597            // Insert record in database.
  • supportcandy/trunk/readme.txt

    r3031986 r3033546  
    66Tested up to: 6.4
    77Requires PHP: 7.4
    8 Stable tag: 3.2.4
     8Stable tag: 3.2.5
    99
    1010== Description ==
     
    220220== Changelog ==
    221221
     222= 3.2.5 (February 9, 2024) =
     223* Fix: Unable to upload some attachments after v3.2.4
     224* Fix: Wrong ticket url on dashboard
     225
    222226= 3.2.4 (February 6, 2024) =
    223227* New: Dashboard feature added
    224 * New: Recent Activate feature for administrators
     228* New: Recent Activities feature for administrators
    225229* New: UI improvements for Customer Profile, My Account and Agent Profile
    226230* Fix: Vulnerability fix
  • supportcandy/trunk/supportcandy.php

    r3031986 r3033546  
    44 * Plugin URI: https://wordpress.org/plugins/supportcandy/
    55 * Description: Easy & Powerful support ticket system for WordPress
    6  * Version: 3.2.4
     6 * Version: 3.2.5
    77 * Author: SupportCandy
    88 * Author URI: https://supportcandy.net/
     
    3131         * @var string
    3232         */
    33         public static $version = '3.2.4';
     33        public static $version = '3.2.5';
    3434
    3535        /**
Note: See TracChangeset for help on using the changeset viewer.