Plugin Directory

Changeset 2720404


Ignore:
Timestamp:
05/09/2022 07:15:50 AM (4 years ago)
Author:
prosolution
Message:

1.8.2

  • Fix order items of jobs at page of job search based on latest publish date
Location:
prosolution-wp-client/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • prosolution-wp-client/trunk/README.txt

    r2715204 r2720404  
    66Tested up to: 4.9.5
    77Requires PHP: 5.6
    8 Stable tag: 1.8.1
     8Stable tag: 1.8.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6666
    6767== Changelog ==
     68
     69= 1.8.2 =
     70* Fix order items of jobs at page of job search based on latest publish date
    6871
    6972= 1.8.1 =
  • prosolution-wp-client/trunk/includes/class-prosolwpclient-activator.php

    r2715204 r2720404  
    3030    class CBXProSolWpClient_Activator
    3131    {
    32 
    3332        /**
    3433         * Short Description. (use period)
     
    3736         *
    3837         * @since    1.0.0
    39          */
     38         */ 
    4039        public static function proSol_activate()
    41         {
     40        {   
     41         
     42       
    4243            //check if can activate plugin
    4344            if (!current_user_can('activate_plugins')) {
     
    4647
    4748            global $wpdb;
    48 
     49           
    4950            $charset_collate = '';
    5051            if ($wpdb->has_cap('collation')) {
  • prosolution-wp-client/trunk/includes/class-prosolwpclient-table-helper.php

    r2715204 r2720404  
    207207                $tablename_arr =  CBXProSolWpClient_Helper::proSol_allTablesArr();
    208208                global $wpdb;
    209                 foreach($tablename_arr as $tablename){
    210                     $ps_table_name = $wpdb->prefix . $tablename;
     209                foreach($tablename_arr as $tablename => $label){
     210                    $ps_table_name = $wpdb->prefix.$tablename;
    211211                    $wpdb->query( "DELETE FROM $ps_table_name WHERE site_id in ($remsite) " );
    212212                }
  • prosolution-wp-client/trunk/includes/class-setting.php

    r2715204 r2720404  
    316316             */
    317317            public function proSol_get_field_description( $args ) {
    318                 $value = esc_attr( $this->proSol_get_option( $args['id'], $args['section'], $args['default'] ) );
     318                $value = is_array( $this->proSol_get_option( $args['id'], $args['section'], $args['default'] ) ) ? 0 : $this->proSol_get_option( $args['id'], $args['section'], $args['default'] );
     319                $value = esc_attr( $value );
    319320                if ( ! empty( $args['desc'] ) ) {
    320321                    $desc = sprintf( '<p class="description" value="%2$s">%1$s</p>', $args['desc'], $value );
     
    456457                if ( $max > 0 ) {
    457458                    $maxlength_html = 'data-rule-maxlength="' . $max . '"';
     459                }
     460
     461                $fields_app_form='';
     462                //get site from option
     463                $chksite=substr($args['id'],0,4);
     464                if($chksite=='site'){
     465                    $pos = strpos($args['id'], '_');
     466                    $getsite= substr($args['id'],0,$pos);
     467                    $issite = $getsite.'_';     
     468                }else{
     469                    $issite = '';       
    458470                }
    459471                if(array_key_exists('field_list',$array_value)){ //exclude sidedishes
     
    504516                            }
    505517                            //custom default value chkbox
    506                             if($array_value['gender_act'] == '1'){
     518                            // to remove notice at debugging, add isset
     519                            $chkgender = isset( $array_value['gender_act'] ) ? $array_value['gender_act'] : '';
     520                            if($chkgender == '1'){
    507521                                $checkedcol3 = $array_value['diverse_act'] == '1' ? 'checked' : '';
    508522                            } else{
     
    516530                                $col_label = $fieldcol;
    517531                            }
    518                            
     532
    519533                            //style for personaldata
    520534                            $padtop = $fieldcol == 'gender' ? "54.5px" : "0px";
     
    522536
    523537                            //style checkbox for diverse
    524                             $wrdclr_diverse = $array_value['gender_act'] == '1' ? 'color:black' : 'color:gray';
     538                            $wrdclr_diverse = $chkgender == '1' ? 'color:black' : 'color:gray';
    525539                           
    526540
     
    567581            function proSol_callback_text_des_template( $args ) {
    568582                $array_value    = $this->proSol_get_option( $args['id'], $args['section'], $args['default']);
    569                 $value    = esc_attr($array_value['label']);
     583                $valabel = isset($array_value['label']) ? $array_value['label'] : '';
     584                $chkactivated = isset($array_value['activated']) ? $array_value['activated'] : '';
     585               
     586                $value    = esc_attr($valabel);
    570587                $size     = isset( $args['size'] ) && ! is_null( $args['size'] ) ? $args['size'] : 'regular';
    571588                $required = $args['required'] ? 'required' : '';
    572                 $checked = $array_value['activated'] == '1' ? 'checked ' : '';
     589                $checked = $chkactivated == '1' ? 'checked ' : '';
    573590                $min      = ( isset( $args['min'] ) && ( $args['min'] != '' ) ) ? intval( $args['min'] ) : 0;
    574591                $max      = ( isset( $args['max'] ) && ( $args['max'] != '' ) ) ? intval( $args['max'] ) : 0;
     
    682699            function proSol_callback_add_site( $args ) {
    683700                $array_value= $this->proSol_get_option( $args['id'], $args['section'], $args['default'] );
     701               
    684702                $value    = esc_attr($array_value['name']);
    685703                $size     = isset( $args['size'] ) && ! is_null( $args['size'] ) ? $args['size'] : 'regular';
     
    696714                }
    697715               
    698                 $html = sprintf( '<input type="hidden" class="%4$s %2$s-text " id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s" %6$s %7$s %8$s data-urlid="%9$s"/>
     716                $html = sprintf( '<input type="hidden" class="%4$s %2$s-text " id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s" %6$s %7$s %8$s data-urlid=""/>
    699717                    <input type="hidden" class="%4$s %2$s-text " id="%3$s[chkremove]" name="%3$s[chkremove]" value=0 /><span class="hidden alertsite" >'.esc_html__('Please change to other site before delete','prosolwpclient').'</span>
    700718                    <span class="hidden removesite" >'.esc_html__('- remove site','prosolwpclient').'</span>
    701719                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    702720                    <a id="addsites" class="button button-primary" target="_blank">'.esc_html__('+ add site','prosolwpclient').'</a>                   
    703                 ', $type, $size, $args['section'], $args['id'], $value, $required, $minlength_html, $maxlength_html,$siteid,$urlid);
     721                ', $type, $size, $args['section'], $args['id'], $value, $required, $minlength_html, $maxlength_html);
    704722               
    705723                $html .= $this->proSol_get_field_description( $args );
     
    10651083            function proSol_callback_btn_url_check( $args ) {
    10661084
    1067                 $html .= sprintf( '<div class="apivalid">
     1085                $html = sprintf( '<div class="apivalid">
    10681086                    <a class="button button-primary">'. esc_html__('URL check',"prosolwpclient").'</a>
    10691087                    </div>');
     
    13181336                        $output=array();
    13191337                        $output['name' ]=$options[ $option ];   
    1320                         $output['urlid' ]=$options[ $option.'_urlid' ];
     1338                        // remove notice undefined index in debugging
     1339                        $getisset = isset($options[ $option.'_urlid' ]) ? $options[ $option.'_urlid' ] : '';
     1340                        $output['urlid' ]=$getisset;   
    13211341                        $totlen=strlen($option);
    13221342                        $output['siteid' ]=substr($option,7,$totlen);                       
  • prosolution-wp-client/trunk/prosolwpclient.php

    r2715204 r2720404  
    1717     * Plugin URI:        https://prosolution.com/produkte-und-services/workexpert.html
    1818     * Description:       WordPress client for ProSolution
    19      * Version:           1.8.1
     19     * Version:           1.8.2
    2020     * Author:            ProSolution
    2121     * Author URI:        https://www.prosolution.com
     
    3939
    4040    defined('PROSOLWPCLIENT_PLUGIN_NAME') or define('PROSOLWPCLIENT_PLUGIN_NAME', 'prosolwpclient');
    41     defined('PROSOLWPCLIENT_PLUGIN_VERSION') or define('PROSOLWPCLIENT_PLUGIN_VERSION', '1.8.1');
     41    defined('PROSOLWPCLIENT_PLUGIN_VERSION') or define('PROSOLWPCLIENT_PLUGIN_VERSION', '1.8.2');
    4242    defined('PROSOLWPCLIENT_BASE_NAME') or define('PROSOLWPCLIENT_BASE_NAME', plugin_basename(__FILE__));
    4343    defined('PROSOLWPCLIENT_ROOT_PATH') or define('PROSOLWPCLIENT_ROOT_PATH', plugin_dir_path(__FILE__));
     
    213213        global $wpdb;   
    214214        $all_table_arr=array_keys(CBXProSolWpClient_Helper::proSol_allTablesArr());
    215         foreach($all_table_arr as $tablename){
     215        foreach($all_table_arr as $tablename ){
    216216            $prosol_table = $wpdb->prefix.$tablename;
    217217            $oldprkey=$tablename.'id';
     
    219219            else if($tablename=='customfields')$oldprkey='customId';
    220220            else if($tablename=='educationlookup')$oldprkey='lookupId';
    221             $wpdb->query( "ALTER TABLE $prosol_table DROP primary key " );
    222             $wpdb->query( "ALTER TABLE $prosol_table ADD COLUMN site_id BIGINT(11) NOT NULL DEFAULT '0' " );                   
    223             $wpdb->query( "ALTER TABLE $prosol_table ADD primary key (site_id,$oldprkey)" );
     221            if($tablename != 'jobs'){
     222                $wpdb->query( "ALTER TABLE $prosol_table DROP primary key " );
     223                $wpdb->query( "ALTER TABLE $prosol_table ADD COLUMN site_id BIGINT(11) NOT NULL DEFAULT '0' " );                   
     224                $wpdb->query( "ALTER TABLE $prosol_table ADD primary key (site_id,$oldprkey)" );
     225            }
    224226        }
    225227        $unlist_table_arr=array('comments','commentmeta','links','logs_activity','postmeta','posts','termmeta','terms',
     
    248250
    249251        require_once plugin_dir_path(__FILE__) . 'includes/class-prosolwpclient-activator.php';
    250         CBXProSolWpClient_Activator::proSol_activate();
     252        CBXProSolWpClient_Activator::proSol_activate();
    251253
    252254        CBXProSolWpClient_Activator::proSol_createPages(); //create the shortcode page
     
    271273        CBXProSolWpClient_Uninstall::proSol_uninstall();
    272274    }
    273 
    274275    register_activation_hook(__FILE__, 'activateProsolwpclient');
    275276    register_deactivation_hook(__FILE__, 'deactivateProsolwpclient');
  • prosolution-wp-client/trunk/public/class-prosolwpclient-public.php

    r2714610 r2720404  
    213213                    global $wpdb;
    214214                    $table_ps_jobs = $wpdb->prefix . 'jobs';
    215                     $where = " WHERE site_id='$siteid'";   
     215                    $where = " WHERE site_id='$siteid' ORDER BY STR_TO_DATE(publishdate, '%d.%m.%Y') desc ";   
    216216                    $sql_select = "SELECT * FROM $table_ps_jobs  ";
    217217
     
    281281                global $wpdb;
    282282                $table_ps_jobs = $wpdb->prefix . 'jobs';
    283                 $where = " WHERE jobid='$jobid' AND site_id='$siteid'";   
     283                $where = " WHERE jobid='$jobid' AND site_id='$siteid' ";   
    284284                $sql_select = "SELECT * FROM $table_ps_jobs ";
    285285
     
    460460                    global $wpdb;
    461461                    $table_ps_jobs = $wpdb->prefix . 'jobs';
    462                     $where = " WHERE site_id='$siteid'";   
     462                    $where = " WHERE site_id='$siteid' ORDER BY STR_TO_DATE(publishdate, '%d.%m.%Y') desc ";   
    463463                    $sql_select = "SELECT * FROM $table_ps_jobs ";
    464464
Note: See TracChangeset for help on using the changeset viewer.