Plugin Directory

Changeset 2003436


Ignore:
Timestamp:
12/29/2018 01:13:52 PM (7 years ago)
Author:
sapeofficial
Message:

Fix multisite mode

Location:
saperu-integration/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • saperu-integration/trunk/readme.txt

    r2001659 r2003436  
    99Tested up to: 4.7
    1010Stable tag: trunk
    11 Version: 0.04
     11Version: 0.05
    1212Author: Sape.ru
    1313Author URI: https://www.sape.ru/
     
    100100Add sharding for links.db file
    101101
     102### v 0.05
     103Fix multisite mode
     104
    102105## Changelog
    103106### v 0.01
     
    112115### v 0.04
    113116Change store mode for links.db file
     117
     118### v 0.05
     119Fix multisite mode
  • saperu-integration/trunk/sape/sape.php

    r2001659 r2003436  
    2121class SAPE_base
    2222{
    23     protected $_version = '1.4.2';
     23    protected $_version = '1.4.3';
    2424
    2525    protected $_verbose = false;
     
    14131413    {
    14141414        if ($this->_split_data_file) {
    1415             if ($this->_multi_site) {
    1416                 $directory = dirname(__FILE__) . '/' . $this->_host . '/';
    1417             } else {
    1418                 $directory = dirname(__FILE__) . '/';
    1419             }
     1415            $directory = dirname(__FILE__) . '/';
    14201416            $hashArray = array();
    14211417            $data = $this->_uncode_data($data);
     
    14261422                    $currentFile = 'links.' . crc32($url) % 100 . '.db';
    14271423                }
     1424
     1425                if ($this->_multi_site) {
     1426                    $currentFile = $this->_host . '.' . $currentFile;
     1427                }
     1428
    14281429                $hashArray[$currentFile][$url] = $item;
    14291430            }
     
    18201821    {
    18211822        if ($this->_split_data_file) {
    1822             if ($this->_multi_site) {
    1823                 $directory = dirname(__FILE__) . '/' . $this->_host . '/';
    1824             } else {
    1825                 $directory = dirname(__FILE__) . '/';
    1826             }
     1823            $directory = dirname(__FILE__) . '/';
    18271824            $hashArray = array();
    18281825            $data = $this->_uncode_data($data);
     
    18321829                } else {
    18331830                    $currentFile = 'words.' . crc32($url) % 100 . '.db';
     1831                }
     1832                if ($this->_multi_site) {
     1833                    $currentFile = $this->_host . '.' . $currentFile;
    18341834                }
    18351835                $hashArray[$currentFile][$url] = $item;
     
    23402340        }
    23412341    }
     2342
     2343    protected function _get_meta_file()
     2344    {
     2345        return $this->_get_db_file();
     2346    }
    23422347}
  • saperu-integration/trunk/saperu-integration.php

    r2001659 r2003436  
    44Plugin URI: https://github.com/sape-ru/client-code-wordpress/releases
    55Description: Plugin for Sape.ru webmaster services integration
    6 Version: 0.04
     6Version: 0.05
    77Author: Sape.ru
    88Author URI: http://www.sape.ru/
Note: See TracChangeset for help on using the changeset viewer.