Site icon Osclass Documentation & Knowledge Base

Remove links to Osclass.org

As osclass website and osclass market has been shut down, there is need to remove linkage of osclass script to these sites, othervise your oc-admin (backoffice) will be very slow. Please follow this step by step guide to remove any links to osclass sites.

Disable auto-upgrade

Will disable any way to osclass to be automatically checking for new updates via cron.

In file:
oc-includes/osclass/cron.php
 
Remove line:
osc_do_auto_upgrade();

Disable updates checking

Your osclass will stop to check for updates

In file:
oc-includes/osclass/utils.php
 
Find:
function _get_market_url($type, $update_uri) {

Bellow this code add:
return false;
In file:
oc-includes/osclass/utils.php
 
Find:
function osc_market($section, $code) {

Bellow this code add:
return array('error' => 1, 'message' => 'Osclass market down', 'data' => array());
In file:
oc-includes/osclass/utils.php
 
Find:
function osc_is_update_compatible($section, $element, $osclass_version = OSCLASS_VERSION) {

Bellow this code add:
return false;
In file:
oc-includes/osclass/utils.php
 
Find:
function osc_check_language_update($update_uri, $version = null) {

Bellow this code add:
return false; 

Backoffice dashboard

Remove featured products feeded from osclass market into your dashboard (landing page) in oc-admin.

File:

In file:
oc-admin/main.php

Remove:
$aFeatured = array();
$out_featured = osc_file_get_contents(osc_market_featured_url('plugins', 3));
$array_featured_plugins = (array) json_decode($out_featured, true);
 
$out_featured = osc_file_get_contents(osc_market_featured_url('themes', 3));
$array_featured_themes = (array) json_decode($out_featured, true);
 
 
$this->_exportVariableToView("aFeatured", array_merge($array_featured_plugins, $array_featured_themes)); 

What’s next?

You could remove also links to osclass and osclass market, but these has no impact on load speed of your ocadmin, anyway if you are lazy to do these changes, you may follow following Github to get updated osclass:

https://github.com/navjottomer/Osclass