Changeset 2720404
- Timestamp:
- 05/09/2022 07:15:50 AM (4 years ago)
- Location:
- prosolution-wp-client/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
includes/class-prosolwpclient-activator.php (modified) (3 diffs)
-
includes/class-prosolwpclient-table-helper.php (modified) (1 diff)
-
includes/class-setting.php (modified) (10 diffs)
-
prosolwpclient.php (modified) (6 diffs)
-
public/class-prosolwpclient-public.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
prosolution-wp-client/trunk/README.txt
r2715204 r2720404 6 6 Tested up to: 4.9.5 7 7 Requires PHP: 5.6 8 Stable tag: 1.8. 18 Stable tag: 1.8.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 66 66 67 67 == Changelog == 68 69 = 1.8.2 = 70 * Fix order items of jobs at page of job search based on latest publish date 68 71 69 72 = 1.8.1 = -
prosolution-wp-client/trunk/includes/class-prosolwpclient-activator.php
r2715204 r2720404 30 30 class CBXProSolWpClient_Activator 31 31 { 32 33 32 /** 34 33 * Short Description. (use period) … … 37 36 * 38 37 * @since 1.0.0 39 */ 38 */ 40 39 public static function proSol_activate() 41 { 40 { 41 42 42 43 //check if can activate plugin 43 44 if (!current_user_can('activate_plugins')) { … … 46 47 47 48 global $wpdb; 48 49 49 50 $charset_collate = ''; 50 51 if ($wpdb->has_cap('collation')) { -
prosolution-wp-client/trunk/includes/class-prosolwpclient-table-helper.php
r2715204 r2720404 207 207 $tablename_arr = CBXProSolWpClient_Helper::proSol_allTablesArr(); 208 208 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; 211 211 $wpdb->query( "DELETE FROM $ps_table_name WHERE site_id in ($remsite) " ); 212 212 } -
prosolution-wp-client/trunk/includes/class-setting.php
r2715204 r2720404 316 316 */ 317 317 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 ); 319 320 if ( ! empty( $args['desc'] ) ) { 320 321 $desc = sprintf( '<p class="description" value="%2$s">%1$s</p>', $args['desc'], $value ); … … 456 457 if ( $max > 0 ) { 457 458 $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 = ''; 458 470 } 459 471 if(array_key_exists('field_list',$array_value)){ //exclude sidedishes … … 504 516 } 505 517 //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'){ 507 521 $checkedcol3 = $array_value['diverse_act'] == '1' ? 'checked' : ''; 508 522 } else{ … … 516 530 $col_label = $fieldcol; 517 531 } 518 532 519 533 //style for personaldata 520 534 $padtop = $fieldcol == 'gender' ? "54.5px" : "0px"; … … 522 536 523 537 //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'; 525 539 526 540 … … 567 581 function proSol_callback_text_des_template( $args ) { 568 582 $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); 570 587 $size = isset( $args['size'] ) && ! is_null( $args['size'] ) ? $args['size'] : 'regular'; 571 588 $required = $args['required'] ? 'required' : ''; 572 $checked = $ array_value['activated']== '1' ? 'checked ' : '';589 $checked = $chkactivated == '1' ? 'checked ' : ''; 573 590 $min = ( isset( $args['min'] ) && ( $args['min'] != '' ) ) ? intval( $args['min'] ) : 0; 574 591 $max = ( isset( $args['max'] ) && ( $args['max'] != '' ) ) ? intval( $args['max'] ) : 0; … … 682 699 function proSol_callback_add_site( $args ) { 683 700 $array_value= $this->proSol_get_option( $args['id'], $args['section'], $args['default'] ); 701 684 702 $value = esc_attr($array_value['name']); 685 703 $size = isset( $args['size'] ) && ! is_null( $args['size'] ) ? $args['size'] : 'regular'; … … 696 714 } 697 715 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=""/> 699 717 <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> 700 718 <span class="hidden removesite" >'.esc_html__('- remove site','prosolwpclient').'</span> 701 719 702 720 <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); 704 722 705 723 $html .= $this->proSol_get_field_description( $args ); … … 1065 1083 function proSol_callback_btn_url_check( $args ) { 1066 1084 1067 $html .= sprintf( '<div class="apivalid">1085 $html = sprintf( '<div class="apivalid"> 1068 1086 <a class="button button-primary">'. esc_html__('URL check',"prosolwpclient").'</a> 1069 1087 </div>'); … … 1318 1336 $output=array(); 1319 1337 $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; 1321 1341 $totlen=strlen($option); 1322 1342 $output['siteid' ]=substr($option,7,$totlen); -
prosolution-wp-client/trunk/prosolwpclient.php
r2715204 r2720404 17 17 * Plugin URI: https://prosolution.com/produkte-und-services/workexpert.html 18 18 * Description: WordPress client for ProSolution 19 * Version: 1.8. 119 * Version: 1.8.2 20 20 * Author: ProSolution 21 21 * Author URI: https://www.prosolution.com … … 39 39 40 40 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'); 42 42 defined('PROSOLWPCLIENT_BASE_NAME') or define('PROSOLWPCLIENT_BASE_NAME', plugin_basename(__FILE__)); 43 43 defined('PROSOLWPCLIENT_ROOT_PATH') or define('PROSOLWPCLIENT_ROOT_PATH', plugin_dir_path(__FILE__)); … … 213 213 global $wpdb; 214 214 $all_table_arr=array_keys(CBXProSolWpClient_Helper::proSol_allTablesArr()); 215 foreach($all_table_arr as $tablename ){215 foreach($all_table_arr as $tablename ){ 216 216 $prosol_table = $wpdb->prefix.$tablename; 217 217 $oldprkey=$tablename.'id'; … … 219 219 else if($tablename=='customfields')$oldprkey='customId'; 220 220 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 } 224 226 } 225 227 $unlist_table_arr=array('comments','commentmeta','links','logs_activity','postmeta','posts','termmeta','terms', … … 248 250 249 251 require_once plugin_dir_path(__FILE__) . 'includes/class-prosolwpclient-activator.php'; 250 CBXProSolWpClient_Activator::proSol_activate();252 CBXProSolWpClient_Activator::proSol_activate(); 251 253 252 254 CBXProSolWpClient_Activator::proSol_createPages(); //create the shortcode page … … 271 273 CBXProSolWpClient_Uninstall::proSol_uninstall(); 272 274 } 273 274 275 register_activation_hook(__FILE__, 'activateProsolwpclient'); 275 276 register_deactivation_hook(__FILE__, 'deactivateProsolwpclient'); -
prosolution-wp-client/trunk/public/class-prosolwpclient-public.php
r2714610 r2720404 213 213 global $wpdb; 214 214 $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 "; 216 216 $sql_select = "SELECT * FROM $table_ps_jobs "; 217 217 … … 281 281 global $wpdb; 282 282 $table_ps_jobs = $wpdb->prefix . 'jobs'; 283 $where = " WHERE jobid='$jobid' AND site_id='$siteid' ";283 $where = " WHERE jobid='$jobid' AND site_id='$siteid' "; 284 284 $sql_select = "SELECT * FROM $table_ps_jobs "; 285 285 … … 460 460 global $wpdb; 461 461 $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 "; 463 463 $sql_select = "SELECT * FROM $table_ps_jobs "; 464 464
Note: See TracChangeset
for help on using the changeset viewer.