hosting_platform.install in Hosting 5
File
platform/hosting_platform.install
View source
<?php
function hosting_platform_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {hosting_platform} (\n vid int(10) unsigned NOT NULL default '0',\n nid int(10) unsigned NOT NULL default '0',\n publish_path longtext,\n web_server int(11) NOT NULL default '0',\n release_id int(11) NOT NULL default '0',\n verified int(11) NOT NULL default '0',\n PRIMARY KEY (vid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
}
}
function hosting_platform_update_1() {
include_once drupal_get_path('module', 'hosting_task') . '/hosting_task.module';
$ret = array();
$result = db_query("SELECT nid FROM {node} WHERE type='platform' AND status=1");
while ($platform = db_fetch_object($result)) {
hosting_add_task($platform->nid, 'synch');
}
return $ret;
}