Plugin Directory

Changeset 2031126


Ignore:
Timestamp:
02/15/2019 07:19:24 AM (7 years ago)
Author:
ticketrilla
Message:

Fixed bug which removing tags from tickets

Location:
ticketrilla
Files:
1472 added
33 edited

Legend:

Unmodified
Added
Removed
  • ticketrilla/trunk/assets/css/main.css

    r2020956 r2031126  
    1141611416}
    1141711417
     11418.ttlc .tab-content > .tab-pane {
     11419    display: none;
     11420}
     11421
     11422.ttlc .tab-content > .active {
     11423    display: block;
     11424}
     11425
     11426.ttlc__tickets .table td > a {
     11427    pointer-events: auto;
     11428    text-decoration: none;
     11429}
     11430
    1141811431/*# sourceMappingURL=main.css.map */
  • ticketrilla/trunk/includes/class-ajax.php

    r2020956 r2031126  
    1010
    1111            function __construct() {
    12                 add_action( 'wp_ajax_ttlc/server/check', array($this, 'server_check') );
    13                 add_action( 'wp_ajax_ttlc/product/save', array($this, 'product_save') );
    14                 add_action( 'wp_ajax_ttlc/product/trash', array($this, 'product_trash') );
    15                 add_action( 'wp_ajax_ttlc/product/untrash', array($this, 'product_untrash') );
    16                 add_action( 'wp_ajax_ttlc/password/reset', array($this, 'password_reset') );
    17                 add_action( 'wp_ajax_ttlc/add/ticket', array($this, 'add_ticket') );
    18                 add_action( 'wp_ajax_ttlc/edit/ticket', array($this, 'edit_ticket') );
    19                 add_action( 'wp_ajax_ttlc/attachment/download', array($this, 'attachment_download') );
    20                 add_action( 'wp_ajax_ttlc/settings/attachments', array($this, 'settings_attachments') );
     12               
     13                if ( current_user_can( 'manage_ttlc' ) ) {
     14
     15                    add_action( 'wp_ajax_ttlc/server/check', array($this, 'server_check') );
     16                    add_action( 'wp_ajax_ttlc/product/save', array($this, 'product_save') );
     17                    add_action( 'wp_ajax_ttlc/product/trash', array($this, 'product_trash') );
     18                    add_action( 'wp_ajax_ttlc/product/untrash', array($this, 'product_untrash') );
     19                    add_action( 'wp_ajax_ttlc/password/reset', array($this, 'password_reset') );
     20                    add_action( 'wp_ajax_ttlc/add/ticket', array($this, 'add_ticket') );
     21                    add_action( 'wp_ajax_ttlc/edit/ticket', array($this, 'edit_ticket') );
     22                    add_action( 'wp_ajax_ttlc/attachment/download', array($this, 'attachment_download') );
     23                    add_action( 'wp_ajax_ttlc/settings/attachments', array($this, 'settings_attachments') );
     24                   
     25                }               
    2126            }
    2227           
     
    150155                $html = TTLC()->page()->buffer_template( $template, $data );
    151156
    152                 wp_send_json( $html );             
     157                wp_send_json( $html );
    153158            }
    154159           
     
    377382                $errors = false;
    378383                $message = '';
    379                 $nonce = $_POST['_wpnonce'];
    380                 if ( ! wp_verify_nonce( $nonce, $action . '_post_' . sanitize_key( $_POST['id'] ) ) ) {
     384                if ( ! wp_verify_nonce( $_POST['_wpnonce'], $action . '_post_' . sanitize_key( $_POST['id'] ) ) ) {
    381385                    $errors = true;
    382386                } else {
     
    403407                $ticket = new $class( filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING ) );
    404408                $ticket->license_data = TTLC()->sanitize_string_array( (array)json_decode( stripslashes( $_POST['license_data'] ) ) );
    405                 $ticket->content = trim( $ticket->content );
     409                $ticket->content = wp_kses_post( $_POST['content'] );
    406410                $ticket->set_scenario( $class::SCENARIO_ADD );
    407411               
  • ticketrilla/trunk/includes/class-enqueue.php

    r2020956 r2031126  
    5858
    5959                wp_enqueue_style( 'ttlc_main', TTLC_URL . 'assets/css/main.css', array(), filemtime(TTLC_PATH . '/assets/css/main.css') );
    60                 wp_enqueue_style( 'ttlc_added', TTLC_URL . 'assets/css/added.css', array(), filemtime(TTLC_PATH . '/assets/css/added.css') );
     60
    6161            }
    6262        }
  • ticketrilla/trunk/includes/class-init.php

    r2020956 r2031126  
    115115                    // Include TTLC classes
    116116                    $this->ttlc_class_loader();
    117    
    118                     // Set TTLC classes
    119                     $this->set_classes();
    120117                   
    121118                    // Init TTLC
    122                     $this->init();
     119                    add_action('init', array($this, 'init') );
    123120
    124121                }
     
    159156            }
    160157
     158            public function init() {
     159
     160                // Set TTLC classes
     161                $this->set_classes();
     162
     163                $this->protect_uploads();
     164            }
     165
    161166            /**
    162167             * Function for add classes to $this->classes
     
    177182                }
    178183
    179             }
    180            
    181             protected function init() {
    182                 $this->protect_uploads();
    183184            }
    184185           
  • ticketrilla/trunk/includes/class-ticket.php

    r2020956 r2031126  
    110110                        $query_args['paged'] = (int) $_GET['page_num'];
    111111                    }
    112                     if ( isset( $_GET['order'] ) && in_array( $_GET['order'], array('ASC', 'DESC') ) ) {
    113                         $query_args['order'] = $_GET['order'];
    114                     } else {
    115                         $query_args['order'] = 'DESC';
    116                     }
     112                    $query_args['order'] = isset( $_GET['order'] ) && in_array( $_GET['order'], array('ASC', 'DESC') ) ? $_GET['order'] : 'DESC';
    117113                }
    118114                $responses = TTLC_Ticket_Response::find( $query_args );
  • ticketrilla/trunk/readme.txt

    r2020956 r2031126  
    33Tags: support, tickets
    44Requires at least: 4.9.8
    5 Tested up to: 5.0.1
     5Tested up to: 5.0.3
    66Stable tag: trunk
    77Requires PHP: 5.6.0
  • ticketrilla/trunk/templates/add-ticket-form.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $ticket = isset( $data['ticket'] ) ? $data['ticket'] : new TTLC_Ticket;
  • ticketrilla/trunk/templates/add-ticket.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $product_id = sanitize_key( $_GET['product_id'] );
    39    $product_post = get_post( $product_id );
  • ticketrilla/trunk/templates/attachment-loading.php

    r2020956 r2031126  
     1<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
     8?>
     9
    110<li class="ttlc-attachment-loading-template hidden"><span class="ttlc__attachments-icon"><i class="fa fa-sync-alt fa-spin"></i></span>
    211    <div class="ttlc__attachments-info">
  • ticketrilla/trunk/templates/attachment.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $attachment = $this->data; 
    39    $external_id = $attachment->external_id;
  • ticketrilla/trunk/templates/breadcrumbs.php

    r2020956 r2031126  
     1<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
     8?>
    19        <ul class="breadcrumb">
    210            <?php
  • ticketrilla/trunk/templates/error.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $message = $data['message'];
  • ticketrilla/trunk/templates/filter.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $filter_items = $this->data;
    39    if ( is_array( $filter_items ) ) {
  • ticketrilla/trunk/templates/footer.php

    r2020956 r2031126  
     1<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
     8?>
    19    </div>
    210</div>
  • ticketrilla/trunk/templates/header.php

    r2020956 r2031126  
     1<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
     8?>
     9
    110<div id="ttlc-container" class="ttlc">
    211    <div class="ttlc-wrapper">
  • ticketrilla/trunk/templates/main.php

    r2020956 r2031126  
    11<?php
    2 $title = __( 'Supported Themes and Plugins', TTLC_TEXTDOMAIN );
    3 TTLC_Breadcrumbs::add_head( $title );
    4 $this->render_template( 'header' );
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
     8    $title = __( 'Supported Themes and Plugins', TTLC_TEXTDOMAIN );
     9    TTLC_Breadcrumbs::add_head( $title );
     10    $this->render_template( 'header' );
    511
    612?>
     
    4753            );
    4854            if ( isset( $_GET['filter'] ) && array_key_exists( $_GET['filter'], $filter_data ) ) {
    49                 $filter_key = $_GET['filter'];
     55                $filter_key = sanitize_text_field( $_GET['filter'] );
    5056                if ( $filter_key === 'archive' ) {
    5157                    $connected_args = array(
  • ticketrilla/trunk/templates/pagination-ticket.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $pagination = $this->data;
     9
    310?>
    411
  • ticketrilla/trunk/templates/pagination.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $pagination = $this->data;
    39?>
  • ticketrilla/trunk/templates/product-settings-common-footer.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $product = $data['product'];
  • ticketrilla/trunk/templates/product-settings-form.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $form = $data['form'];
     
    814    $server_tab_id = 'ttlc-product-server-' . $product_uniqid;
    915    $password_reset_modal_id = 'ttlc-product-password-reset-' . $product_uniqid;
     16
    1017?>
    1118
  • ticketrilla/trunk/templates/product-settings-header.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $product = $data['product'];
     10
    411?>
    512
  • ticketrilla/trunk/templates/product-settings-password-reset.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $product = $data['product'];
     
    713    $password_reset_modal_id = 'ttlc-product-password-reset-' . $product_uniqid;
    814    $common_modal_id = 'ttlc-product-common-' . $product_uniqid;
     15
    916?>
    1017
  • ticketrilla/trunk/templates/product-settings-server-modal.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $data['save_disabled'] = true;
     
    612    $show_server = isset( $data['show_server'] ) ? true : false;
    713    $server_tab_id = 'ttlc-product-server-' . $product_uniqid;;
     14
    815?>
    916        <div id="<?php echo esc_attr( $server_tab_id ); ?>" class="modal-content modal-server collapse fade <?php echo $show_server ? 'in' : ''; ?>">
  • ticketrilla/trunk/templates/product-settings-server.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $data['show_server'] = true;
  • ticketrilla/trunk/templates/product-settings.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $product = $data['product'];
  • ticketrilla/trunk/templates/product.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $product_post = get_post( sanitize_key( $_GET['product_id'] ) );
    39    if ( $product_post ) {
  • ticketrilla/trunk/templates/settings-attachments-form.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $data = $this->get_data();
    39    $attachments = $data['attachments'];
    410    $labels = $attachments->attributes();
    511    $state = isset( $data['state'] ) && is_array( $data['state'] ) ? $data['state'] : false;
     12
    613?>
    714                            <form id="ttlc-attachment-settings" class="ttlc__settings-inner ttlc-settings">
  • ticketrilla/trunk/templates/settings.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
    27
    38    TTLC_Breadcrumbs::add_link( esc_html__( 'Ticketrilla: Client', TTLC_TEXTDOMAIN ), TTLC_Page::get_url( 'main' ) );
     
    510    TTLC_Breadcrumbs::add_head( $title );
    611    $this->render_template( 'header' );
     12
    713?>
    814                <div class="ttlc__header-title">
  • ticketrilla/trunk/templates/ticket-sort.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    if ( isset( $_GET['order'] ) && in_array( $_GET['order'], array('ASC', 'DESC') ) ) {
    3         $order = $_GET['order'];
     9        $order = sanitize_text_field( $_GET['order'] );
    410        update_option( 'ttlc_responses_order', $order );
    511    } else {
    612        $order = get_option( 'ttlc_responses_order', 'ASC' );
    713    }
     14
    815?>                             
    916                                <div class="ttlc__tickets-sort"><span><?php esc_html_e( 'Sort', TTLC_TEXTDOMAIN ); ?></span>
  • ticketrilla/trunk/templates/ticket.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    $product_id = sanitize_key( $_GET['product_id'] );
    39    $product_post = get_post( $product_id );
  • ticketrilla/trunk/templates/ticketrilla.php

    r2020956 r2031126  
    11<?php
     2
     3    // Exit if accessed directly.
     4    if ( ! defined( 'ABSPATH' ) ) {
     5        exit;
     6    }
     7
    28    TTLC_Breadcrumbs::add_link( esc_html__( 'Ticketrilla: Client', TTLC_TEXTDOMAIN ), TTLC_Page::get_url( 'main' ) );
    39   
  • ticketrilla/trunk/ticketrilla-client.php

    r2020956 r2031126  
    22
    33/*
    4 Plugin Name: Ticketrilla: Client Plugin
     4Plugin Name: Ticketrilla: Client
    55Plugin URI: https://ticketrilla.net/
    66Author: ticketrilla
  • ticketrilla/trunk/uninstall.php

    r2020956 r2031126  
    11<?php
    22
    3 if (!defined('WP_UNINSTALL_PLUGIN')) {
     3// Exit if accessed directly.
     4if ( ! defined( 'ABSPATH' ) ) {
     5    exit;
     6}
     7
     8if ( ! defined('WP_UNINSTALL_PLUGIN' ) ) {
    49    die;
    510}
Note: See TracChangeset for help on using the changeset viewer.