-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
24 lines (23 loc) · 741 Bytes
/
install.php
File metadata and controls
24 lines (23 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
* @copyright Copyright (C) 2012 vampirus.ru. All rights reserved.
*/
defined('_JEXEC') or die;
class pkg_vm2smsInstallerScript{
public function postflight( $type, $parent,$result ) {
if ($type=='install'){
$db = JFactory::getDBO();
$db->setQuery('UPDATE #__extensions set enabled=1 where `type`="plugin" and (
(element="vm2sms" and folder="vmpayment"))');
$db->query();
$db->setQuery("SHOW COLUMNS FROM #__vm2sms LIKE 'manager_send_sms'");
if (!$db->loadObject()){
$db->setQuery("ALTER TABLE `#__vm2sms` ADD `manager_send_sms` INT( 1 ) NOT NULL DEFAULT '0',
ADD `manager_text_sms` TEXT NOT NULL ,
ADD `manager_worktime` INT( 1 ) NOT NULL DEFAULT '0'");
$db->query();
}
}
return true;
}
}