Stop checking for updates from Osclass.

With these changes, Osclass will no longer check for updates from their Market. Updating will still work for plugins you downloaded elsewhere (e.g. Community Market) if they support it.

Updated 16/09/2019 to fix auto update for older plugins (Google Maps and Google Analytics).

Scroll down to see updated part (between warning messages).

Open the following file:

utils.php
oc-includes/osclass/utils.php

Locate this code:

utils.php
// OSCLASS OFFICIAL REPOSITORY
$uri = osc_market_url($type, $update_uri);

Replace it with this code:

utils.php
return false;

Locate this code:

utils.php
// OSCLASS OFFICIAL REPOSITORY
$url = osc_market_url($section, $element);
$data = json_decode(osc_file_get_contents($url, array('api_key' => osc_market_api_connect())), true);

Replace it with this code:

utils.php
return false;

Locate this code:

utils.php
$download_post_data = array('api_key' => osc_market_api_connect());

Replace it with this code:

utils.php
$download_post_data = array();

Locate this code:

utils.php
// OSCLASS OFFICIAL REPOSITORY
$url = osc_market_url($section, $code);
$data = osc_file_get_contents($url, array('api_key' => osc_market_api_connect()));
$data = json_decode(osc_file_get_contents($url, array('api_key' => osc_market_api_connect())), true);

Replace it with this code:

utils.php
return array('error' => 2, 'message' => __('Market updating not available.'), 'data' => $data);

16/09/2019 update START.

Locate this code:

utils.php
if(osc_market_external_sources())

Replace it with this code:

utils.php
if(osc_market_external_sources() && strpos($update_uri, 'osclass.org') === false)

Note! The upper replacement must be done on all occurrences of the code (it appears 2 times).

Locate this code:

utils.php
if(!osc_market_external_sources()

Replace it with this code:

utils.php
if(!osc_market_external_sources() || strpos($update_uri, 'osclass.org') !== false)

16/09/2019 update END.

‚Äč

Open the following file:

ajax.php
oc-admin/ajax/ajax.php

Locate this code:

ajax.php
// OSCLASS OFFICIAL REPOSITORY
$data = json_decode(osc_file_get_contents(osc_market_url($section, $code), array('api_key' => osc_market_api_connect())), true);

Replace it with this code:

ajax.php
echo json_encode(array('error' => 3, 'error_msg' => __('Market updating not available.')));

Locate this code:

ajax.php
$data = osc_file_get_contents('https://osclass.org/latest_version_v1.php?callback=?');

Replace it with this code:

ajax.php
echo json_encode(array('error' => 1, 'msg' => __('Version could not be checked')));