> For the complete documentation index, see [llms.txt](https://docs.mindstellar.com/osclass-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindstellar.com/osclass-docs/v3.9.0/legacy-installations-pre-3.8.0/remove-calls-to-osclass/disable-upgrade-page.md).

# Disable Upgrade page

```
oc-admin/themes/modern/tools/upgrade.php
```

```
function customHead(){    ?>    <script type="text/javascript">        $(document).ready(function() {            $("#steps_div").hide();        });    <?php    $perms = osc_save_permissions();    $ok    = osc_change_permissions();    foreach($perms as $k => $v) {        @chmod($k, $v);    }    if( $ok ) {    ?>        $(function() {            var steps_div = document.getElementById('steps_div');            steps_div.style.display = '';            var steps = document.getElementById('steps');            var version = <?php echo osc_version(); ?>;            var fileToUnzip = '';            steps.innerHTML += '<?php echo osc_esc_js( sprintf( __('Checking for updates (Current version %s)'), osc_version() )); ?> ';​            $.getJSON("https://osclass.org/latest_version_v1.php?callback=?", function(data) {                if(data.version <= version) {                    steps.innerHTML += '<?php echo osc_esc_js( __('Congratulations! Your Osclass installation is up to date!')); ?>';                } else {                    steps.innerHTML += '<?php echo osc_esc_js( __('New version to update:')); ?> ' + oscEscapeHTML(data.version); + "<br />";                    <?php if(Params::getParam('confirm')=='true') {?>                        steps.innerHTML += '<img id="loading_image" src="<?php echo osc_current_admin_theme_url('images/loading.gif'); ?>" /><?php echo osc_esc_js(__('Upgrading your Osclass installation (this could take a while):')); ?>';​                        var tempAr = data.url.split('/');                        fileToUnzip = tempAr.pop();                        $.getJSON('<?php echo osc_admin_base_url(true); ?>?page=ajax&action=upgrade&<?php echo osc_csrf_token_url(); ?>' , function(data) {                            if(data.error==0 || data.error==6) {                                window.location = "<?php echo osc_admin_base_url(true); ?>?page=tools&action=version";                            }                            var loading_image = document.getElementById('loading_image');                            loading_image.style.display = "none";                            steps.innerHTML += $("<div>").text(data.message).html();+"<br />";                        });                    <?php } else { ?>                        steps.innerHTML += '<input type="button" value="<?php echo osc_esc_html( __('Upgrade')); ?>" onclick="window.location.href=\'<?php echo osc_admin_base_url(true); ?>?page=tools&action=upgrade&confirm=true\';" />';                    <?php } ?>                }            });        });    <?php } ?>    </script>    <?php}osc_add_hook('admin_header','customHead', 10);
```

```
<?php if( $ok ) { ?>    <p class="text">        <?php printf( __('Your Osclass installation can be auto-upgraded. Please, back up your database and the folder oc-content before attempting to upgrade your Osclass installation. You can also upgrade Osclass manually, more information in the %s'), '<a href="http://doc.osclass.org/">Wiki</a>'); ?>    </p><?php } else { ?>    <p class="text">        <?php _e("Your Osclass installation can't be auto-upgraded. Files and folders need to be writable. You can apply write permissions via SSH with the command \"chmod -R a+w *\" (without quotes) or via an FTP client, it depends on the program so we can not provide more information. You can also upgrade Osclass by downloading the upgrade package, unzipping it and replacing the files on your server with the ones in the package."); ?>    </p><?php } ?>
```

```
<p class="text">    <?php _e('Congratulations! Your Osclass installation is up to date!'); ?></p>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mindstellar.com/osclass-docs/v3.9.0/legacy-installations-pre-3.8.0/remove-calls-to-osclass/disable-upgrade-page.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
