API16

JInstallerFile/update

From Joomla! Documentation

< API16:JInstallerFile
Revision as of 22:01, 13 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Custom update method public boolean True on success 1.5


[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

update()


Returns[edit]

boolean True on success

Defined in[edit]

libraries/joomla/installer/adapters/file.php

Importing[edit]

jimport( 'joomla.installer.adapters.file' );

Source Body[edit]

function update()
{
        // since this is just files, an update removes old files
        // Get the extension manifest object
        $manifest =& $this->parent->getManifest();
        $this->manifest = $this->parent->getManifest();
        $this->route = 'update';

        // Set the extensions name
        $name = JFilterInput::getInstance()->clean((string)$this->manifest->name, 'string');
        $installer = new JInstaller(); // we don't want to compromise this instance!
        $installer->uninstall('file', $name, 0);
        // ...and adds new files
        return $this->install();
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />