Plugin Directory

Changeset 3448806


Ignore:
Timestamp:
01/28/2026 03:15:00 PM (5 weeks ago)
Author:
beardev
Message:

version 1.7

Location:
joomsport-achievements
Files:
365 added
8 edited

Legend:

Unmodified
Added
Removed
  • joomsport-achievements/trunk/includes/joomsport-achievments-admin-install.php

    r3203706 r3448806  
    5858        wp_enqueue_script('jquery-ui-sortable');
    5959        wp_enqueue_script('jquery-ui-datepicker');
    60         wp_enqueue_style('jquery-uidp-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
     60        wp_enqueue_style('jquery-uidp-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
    6161
    6262        add_action('admin_enqueue_scripts', array('JoomSportAchievmentsAdminInstall', 'joomsport_admin_js'));
     
    9090           
    9191             wp_enqueue_script('jquery-ui-datepicker');
    92              wp_enqueue_style('jquery-uidp-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
     92             wp_enqueue_style('jquery-uidp-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
    9393        }
    9494       
     
    475475          $wpdb->query("ALTER TABLE ".$wpdb->jsprtachv_ef." ADD `display_table` VARCHAR(1) NULL DEFAULT '0'");
    476476        }
     477
     478        //indexes
     479
     480        try{
     481            $exist = $wpdb->get_var("SELECT COUNT(1) IndexIsThere FROM INFORMATION_SCHEMA.STATISTICS"
     482                ." WHERE table_schema=DATABASE() AND table_name='".$wpdb->jsprtachv_stage_result."' AND index_name='stage_id';");
     483            if(!$exist){
     484                $wpdb->query("CREATE INDEX `stage_id` ON ".$wpdb->jsprtachv_stage_result." (`stage_id`,`rank`)");
     485            }
     486
     487            $exist = $wpdb->get_var("SELECT COUNT(1) IndexIsThere FROM INFORMATION_SCHEMA.STATISTICS"
     488                ." WHERE table_schema=DATABASE() AND table_name='".$wpdb->jsprtachv_stage_result."' AND index_name='partic_id';");
     489            if(!$exist){
     490                $wpdb->query("CREATE INDEX `partic_id` ON ".$wpdb->jsprtachv_stage_result." (`partic_id`)");
     491            }
     492
     493
     494        }catch(Exception $e){
     495
     496        }
    477497    }
    478498   
  • joomsport-achievements/trunk/joomsport-achievements.php

    r3203706 r3448806  
    44Plugin URI: http://joomsport.com
    55Description: Sport league plugin
    6 Version: 1.6
     6Version: 1.7
    77Author: BearDev
    88Author URI: http://BearDev.com
     
    3636require_once JOOMSPORT_ACHIEVEMENTS_PATH_HELPERS . 'joomsport-achievments-helper-selectbox.php';
    3737require_once JOOMSPORT_ACHIEVEMENTS_PATH_HELPERS . 'joomsport-achievments-helper-object.php';
    38 /*<!--jsonlyinproPHP-->*/
    3938
    40 
    41 /*</!--jsonlyinproPHP-->*/
    4239/*require_once JOOMSPORT_ACHIEVEMENTS_PATH_HELPERS . 'joomsport-helper-selectbox.php';
    4340require_once JOOMSPORT_ACHIEVEMENTS_PATH_HELPERS . 'joomsport-helper-ef.php';
  • joomsport-achievements/trunk/readme.txt

    r3271113 r3448806  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.6
     7Stable tag: 1.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    8989== Changelog ==
    9090
     91= 1.7 =
     92* Reverse order of stages on player page
     93* Link field type is not working fix
     94
     95= 1.6 =
     96* Perfomance improvements
     97
    9198= 1.5.2 =
    9299* PHP 8.x compatibility
  • joomsport-achievements/trunk/sportleague/base/wordpress/classes/extrafields/class-extrafield-link.php

    r1683569 r3448806  
    1010    {
    1111        $html = '';
     12
    1213        if ($ef) {
    13             $html = "<a target='_blank' href='".(substr($ef, 0, 7) == 'http://' ? $ef : 'http://'.$ef)."'>".$ef.'</a>';
     14            $html = "<a target='_blank' href='".esc_attr((substr($ef, 0, 7) == 'http://' || substr($ef, 0, 8) == 'https://') ? $ef : 'http://'.$ef)."'>".$ef.'</a>';
    1415        }
    1516
  • joomsport-achievements/trunk/sportleague/base/wordpress/models/model-jsport-player.php

    r3203706 r3448806  
    1313    public $stageOrdering = null;
    1414
    15     public function __construct($id, $season_id = 0, $stageOrdering = 0)
     15    public function __construct($id, $season_id = 0, $stageOrdering = 1)
    1616    {
    1717        $this->season_id = $season_id;
     
    131131                        'meta_key' => '_jsprt_achv_stage_date',
    132132                        'orderby' => 'meta_value',
    133                         'order' => 'ASC',
     133                        'order' => 'DESC',
    134134                        'post_type' => 'jsprt_achv_stage',
    135135                        'post_status' => 'publish',
  • joomsport-achievements/trunk/sportleague/base/wordpress/models/model-jsport-stage.php

    r3203706 r3448806  
    4343       
    4444        $this->lists['fields_sorting'] = get_post_meta($this->stage_id,'_jsprt_achv_stage_result_sorting',true);
     45
    4546        $this->lists['result_table'] = $wpdb->get_results("SELECT * FROM {$wpdb->jsprtachv_stage_result} WHERE stage_id={$this->stage_id} ORDER BY `rank`,id");
    4647        $efields = JoomSportAchievmentsHelperEF::getEFList('0', 0);
  • joomsport-achievements/trunk/sportleague/classes/objects/class-jsport-player.php

    r3203706 r3448806  
    1919    public $lists = null;
    2020
    21     public function __construct($id = 0, $season_id = null, $loadLists = true, $stageOrdering = 0)
     21    public function __construct($id = 0, $season_id = null, $loadLists = true, $stageOrdering = 1)
    2222    {
    2323        if (!$id) {
  • joomsport-achievements/trunk/sportleague/views/default/stage.php

    r1730662 r3448806  
    2828                <?php
    2929                if($fields_sorting && count($fields_sorting)){
     30                    $k = 0;
    3031                    foreach($fields_sorting as $fld){
    3132                        switch ($fld) {
     
    4748                            default:
    4849                                for($intA=0;$intA<count($resultFields);$intA++){
    49                                     if($fld == $resultFields[$intA]->id){
     50                                    //if($fld == $resultFields[$intA]->id){
     51                                    if($intA == $k){
    5052                                        echo '<th class="jsalcenter jsNoWrap"><a href="javascript:void(0);">'.$resultFields[$intA]->name.'<i class="fa"></i></a></th>';
    5153                                    }
    5254                                }
     55                                $k++;
    5356                                break;
    5457                        }
     
    6770                echo '<tr>';
    6871                echo '<td class="jsalcenter jsNoWrap"><span>'.($result_table[$intA]->rank).'</span></td>';
    69                                    
     72
    7073                if($fields_sorting && count($fields_sorting)){
     74                    $k = 0;
    7175                    foreach($fields_sorting as $fld){
    7276                        switch ($fld) {
     
    8084                            default:
    8185                                for($intB=0;$intB<count($resultFields);$intB++){
    82                                     if($fld == $resultFields[$intB]->id){
     86                                    //if($fld == $resultFields[$intB]->id){
     87                                    if($intB == $k){
    8388                                        echo '<td class="jsalcenter jsNoWrap">'.($result_table[$intA]->{'field_'.$resultFields[$intB]->id}).'</td>';
    8489                                    }
    8590                                }
     91                                $k++;
    8692                                break;
    8793                        }
Note: See TracChangeset for help on using the changeset viewer.