Plugin Directory

Changeset 3450812


Ignore:
Timestamp:
01/31/2026 05:04:13 AM (8 weeks ago)
Author:
surflabtech
Message:

v2.4.6

Location:
surflink
Files:
306 added
4 edited

Legend:

Unmodified
Added
Removed
  • surflink/trunk/includes/class-surfl-410.php

    r3450586 r3450812  
    1616        $this->table_name = $wpdb->prefix . 'surflink_410';
    1717        $installed_ver = get_option( self::GONE_DB_VERSION_NAME, '1.0.0' );
     18        $this->activate();
    1819        if ( version_compare( $installed_ver, self::GONE_DB_VERSION, '<' ) ) {
    19             $this->activate();
    2020            $this->migrate_data_for_optimization();
    2121            // <--- CRITICAL STEP
     
    3939        global $wpdb;
    4040        $table_name = $this->table_name;
     41        if ( $wpdb->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name ) {
     42            return;
     43        }
    4144        $charset_collate = $wpdb->get_charset_collate();
    4245        $sql = "CREATE TABLE {$table_name} (\r\n            id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n            url TEXT NOT NULL,\r\n            match_path VARCHAR(191) NOT NULL,\r\n            time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,\r\n            ignore_trailing_slash TINYINT(1) DEFAULT 1,\r\n            ignore_case TINYINT(1) DEFAULT 1,\r\n            ignore_params TINYINT(1) DEFAULT 1,\r\n            is_regex TINYINT(1) DEFAULT 0,\r\n            PRIMARY KEY  (id),\r\n            KEY match_path (match_path)\r\n        ) {$charset_collate};";
    4346        require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    4447        dbDelta( $sql );
     48        update_option( self::GONE_DB_VERSION_NAME, self::GONE_DB_VERSION );
    4549    }
    4650
  • surflink/trunk/includes/class-surfl-redirect.php

    r3450586 r3450812  
    2828            add_action( 'wp_ajax_surfl_delete_redirect', [$this, 'ajax_delete_redirect'] );
    2929            $installed_ver = get_option( self::REDIRECT_DB_VERSION_NAME, '1.0.0' );
     30            $this->install();
    3031            if ( version_compare( $installed_ver, self::REDIRECT_DB_VERSION, '<' ) ) {
    31                 $this->install();
    3232                $this->migrate_data_for_optimization();
    3333                // <--- CRITICAL STEP
     
    4242        global $wpdb;
    4343        $table_name = $wpdb->prefix . 'surflink_table_redirects';
     44        if ( $wpdb->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name ) {
     45            return;
     46        }
    4447        $charset_collate = $wpdb->get_charset_collate();
    4548        $sql = "CREATE TABLE {$table_name} (\r\n            id INT AUTO_INCREMENT PRIMARY KEY,\r\n            time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,\r\n            source TEXT NOT NULL,\r\n            target TEXT NOT NULL,\r\n            match_path VARCHAR(191) NOT NULL,\r\n            redirect_type ENUM('301','302','307') DEFAULT '301',\r\n            source_type ENUM('specific_url','contain','random_post','start_with','end_with','permalink_structure','regex_matches','404s','all') NOT NULL DEFAULT 'specific_url',\r\n            target_type ENUM('specific_url','new_string','removed_string','permalink_structure','regex_matches','random_post') NOT NULL DEFAULT 'specific_url',\r\n            ignore_trailing_slash TINYINT(1) DEFAULT 1,\r\n            ignore_case TINYINT(1) DEFAULT 1,\r\n            ignore_params TINYINT(1) DEFAULT 1,\r\n            pass_params TINYINT(1) DEFAULT 0,\r\n            KEY match_path (match_path),\r\n            KEY source_type (source_type)\r\n) {$charset_collate};\r\n";
    4649        require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    4750        dbDelta( $sql );
     51        update_option( self::REDIRECT_DB_VERSION_NAME, self::REDIRECT_DB_VERSION );
    4852    }
    4953
  • surflink/trunk/readme.txt

    r3450648 r3450812  
    11== SurfLink - Redirection, Search Replace, URL Updater, Link Shortener, Auto Linker, Login Security, Backup Restore ==
    22
    3 **Contributors: ** surflabtech , freemius
     3**Contributors:** surflabtech
    44**Tags:** url,links, redirects, shortlinks, backup 
    55**Requires at least:** 5.6 
    66**Requires PHP:** 7.4   
    77**Tested up to:** 6.9 
    8 **Stable tag:** 2.4.5
     8**Stable tag:** 2.4.6
    99**License:** GPLv3 or later 
    1010**License URI:** https://opensource.org/licenses/GPL-3.0 
  • surflink/trunk/surf-link.php

    r3450648 r3450812  
    77 * Author: SurfLab
    88 * Author URI: https://surflabtech.com
    9  * Version: 2.4.5
     9 * Version: 2.4.6
    1010 * Text Domain: surflink
    1111 * License: GPL-3.0-or-later
     
    6767    }
    6868    if ( !defined( 'SURFL_VERSION' ) ) {
    69         define( 'SURFL_VERSION', '2.4.5' );
     69        define( 'SURFL_VERSION', '2.4.6' );
    7070    }
    7171    if ( !defined( 'SURFL_PLUGIN' ) ) {
     
    100100        }
    101101        if ( !defined( 'SURFL_VERSION' ) ) {
    102             define( 'SURFL_VERSION', '2.4.5' );
     102            define( 'SURFL_VERSION', '2.4.6' );
    103103        }
    104104        if ( !defined( 'SURFL_SITE_URL' ) ) {
Note: See TracChangeset for help on using the changeset viewer.