我开发了一个自定义组件,并且我已经创建了一个更新服务器以启用一次点击更新。
当我手动更新我的组件(com_mediacenter
)时,script.php
可以正常工作但是当我使用com_joomlaupdate
进行一次点击更新时,我会收到一条消息,说明更新有效,但是script.php
未启动。
<?xml version="1.0" encoding="UTF-8"?>
<extension type="component" version="3.6.2" method="upgrade">
<name>com_mediacenter</name>
<creationDate>August 2016</creationDate>
<author>Me</author>
<authorEmail>mail@mail.com</authorEmail>
<authorUrl>http://www.***.com</authorUrl>
<copyright>(C) 2016 - All rights reserved</copyright>
<license>License Info</license>
<description>Mediacenter 3.5.3</description>
<scriptfile>script.php</scriptfile>
<files folder="site">
<folder>assets</folder>
<filename>controller.php</filename>
<folder>controllers</folder>
<folder>helpers</folder>
<filename>index.html</filename>
<folder>language</folder>
<folder>lib</folder>
<filename>mediacenter.php</filename>
<folder>models</folder>
<folder>views</folder>
</files>
<media destination="com_mediacenter" folder="media">
<folder>videos</folder>
</media>
<administration>
<menu>COM_MEDIACENTER</menu>
<files folder="admin">
<filename>config.xml</filename>
<filename>index.html</filename>
<folder>language</folder>
<filename>mediacenter.php</filename>
<filename>mediacenter.xml</filename>
<folder>sql</folder>
</files>
</administration>
<updateservers>
<server type="extension" priority="1" name="com_mediacenter">https://inwicast.me/updates/mediacenter3/mdcr_update.xml</server>
</updateservers>
</extension>
<?php
defined('_JEXEC') or die('Restricted access');
class com_mediacenterInstallerScript
{
function install( $parent ) {
echo '<p>install</p>';
}
function uninstall( $parent ) {
echo '<p>uninstall</p>';
}
function update( $parent ) {
echo '<p>update</p>';
}
function preflight( $type, $parent ) {
echo '<p>preflight</p>';
}
function postflight( $type, $parent ) {
echo '<p>postflight</p>';
}
}
?>
提前致谢