Actions

API15

JInstaller/copyManifest

From Joomla! Documentation

< API15:JInstaller
Revision as of 17:24, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Copies the installation manifest file to the extension folder in the given client

[Edit Descripton]

Description:JInstaller/copyManifest

Syntax

copyManifest($cid=1)
Parameter Name Default Value Description
$cid 1 $cid Where to copy the installfile [optional: defaults to 1 (admin)]

Returns

boolean True on success, False on error

Defined in

libraries/joomla/installer/installer.php

Importing

jimport( 'joomla.installer.installer' );

Source Body

function copyManifest($cid=1)
{
        // Get the client info
        jimport('joomla.application.helper');
        $client =& JApplicationHelper::getClientInfo($cid);
 
        $path['src'] = $this->getPath('manifest');
 
        if ($client) {
                $pathname = 'extension_'.$client->name;
                $path['dest']  = $this->getPath($pathname).DS.basename($this->getPath('manifest'));
        } else {
                $pathname = 'extension_root';
                $path['dest']  = $this->getPath($pathname).DS.basename($this->getPath('manifest'));
        }
        return $this->copyFiles(array ($path), true);
}

[Edit See Also] SeeAlso:JInstaller/copyManifest

Examples

<CodeExamplesForm />