Commit 642ce484 authored by Steven Jones's avatar Steven Jones

Clean line endings in hosting_package module.

parent 64d1948a
......@@ -16,4 +16,3 @@ function drush_hosting_package_pre_hosting_task() {
}
}
}
......@@ -148,7 +148,7 @@ function hosting_package_update_2() {
/**
* No limit on short_name length
* No limit on short_name length
*/
function hosting_package_update_3() {
$ret = array();
......@@ -193,7 +193,7 @@ function hosting_package_update_5() {
$platforms = _hosting_get_platforms();
foreach ($platforms as $nid => $name) {
$platform = db_fetch_object(db_query("SELECT release_id FROM {hosting_platform} WHERE nid=%d", $nid));
$release = db_fetch_object(db_query("SELECT * FROM {hosting_package_release} WHERE nid = %d",
$release = db_fetch_object(db_query("SELECT * FROM {hosting_package_release} WHERE nid = %d",
$platform->release_id));
$instance = new stdClass();
......@@ -204,7 +204,7 @@ function hosting_package_update_5() {
// A future step will fill these in from the packages.
$instance->filename = '';
$instance->schema_version = 0;
hosting_package_instance_save($instance);
hosting_add_task($nid, 'verify');
}
......@@ -269,7 +269,7 @@ function hosting_package_update_8() {
'default' => 0,
));
// The contents of update 9 was originally inside this function,
// The contents of update 9 was originally inside this function,
// but due to an error in the regular expression the code needs to be
// executed again, as such it has been moved.
......@@ -346,7 +346,7 @@ function hosting_package_update_6001() {
/**
* Add the new old_short_name field which will be used to manage
* cases where install profiles change names during migrations,
* cases where install profiles change names during migrations,
* such as drupal 6 'default' profile to drupal 7 'standard' profile.
*
* This needs to happen before any interaction with the packaging system
......@@ -368,7 +368,7 @@ function hosting_package_update_6002() {
/**
* The hostmaster and/or hostslave profiles no longer need to be status 0
* as it prevents the main aegir site node from being edited. Instead,
* as it prevents the main aegir site node from being edited. Instead,
* just hide the hostmaster/hostslave profiles in the site node form when
* creating new sites. See #599758
*/
......@@ -383,7 +383,7 @@ function hosting_package_update_6004() {
// we want to enforce that the hostmaster site is always referred to as @hostmaster
$own_site = db_result(db_query("SELECT s.nid FROM {hosting_site} s LEFT JOIN {hosting_package} p ON s.profile=p.nid WHERE p.short_name='hostmaster'"));
$records[$own_site] = 'hostmaster';
foreach ($records as $nid => $name) {
hosting_context_register($nid, $name);
}
......@@ -394,7 +394,7 @@ function hosting_package_update_6004() {
/**
* Remove DEFAULT value on a LONGTEXT fields and use VARCHAR on
* smaller fields to optimise queries.
*
*
* This was breaking in MariaDB and preventing installation. On MySQL
* it was silently ignored, so the installation works, but the
* defaults are not in the table anyway.
......
......@@ -11,8 +11,8 @@ require_once('hosting_package.instance.inc');
function _hosting_package_types() {
return array(
'profile' => t('Installation Profiles'),
'module' => t('Modules'),
'profile' => t('Installation Profiles'),
'module' => t('Modules'),
'theme' => t('Themes')
);
}
......@@ -25,7 +25,7 @@ function hosting_package_node_info() {
$types["package"] = array(
"type" => 'package', "name" => 'Package',
"module" => 'hosting_package',
"has_title" => FALSE, "title_label" => '',
"has_title" => FALSE, "title_label" => '',
"description" => hosting_node_help("package"),
"has_body" => 0, "body_label" => '', "min_word_count" => 0);
......@@ -45,7 +45,7 @@ function hosting_package_menu() {
'page arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'access arguments' => array('view package'),
'weight' => 1,
'weight' => 1,
);
$items['node/%hosting_package_node/packages/all'] = array(
'title' => 'All packages',
......@@ -54,7 +54,7 @@ function hosting_package_menu() {
'page arguments' => array(1),
'access arguments' => array('view package'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
'weight' => -1,
);
$x = 0;
foreach (_hosting_package_types() as $type => $description) {
......@@ -65,8 +65,8 @@ function hosting_package_menu() {
'page arguments' => array(1, $type),
'access arguments' => array('view package'),
'type' => MENU_LOCAL_TASK,
'weight' => $x++,
);
'weight' => $x++,
);
}
return $items;
}
......@@ -125,11 +125,11 @@ function hosting_get_profiles($platform = NULL, $field = 'title') {
}
else {
$instances = hosting_package_instances_load(array(
'p.package_type' => 'profile',
'n.status' => 1,
'p.package_type' => 'profile',
'n.status' => 1,
'r.type' => 'platform'));
foreach ($instances as $iid => $instance) {
foreach ($instances as $iid => $instance) {
$profiles[$instance->package_id] = $instance->$field;
}
}
......@@ -142,17 +142,17 @@ function hosting_get_profile_platforms($profile, $check_old_short_name = FALSE)
$platforms = array();
$instances = hosting_package_instances_load(array(
'i.package_id' => $profile,
'i.package_id' => $profile,
'n.status' => 1,
'r.status' => 1,
'r.status' => 1,
'r.type' => 'platform'));
if ($check_old_short_name) {
$instances = array_merge($instances, hosting_package_instances_load(array(
'p.old_short_name' => $instances[key($instances)]->short_name,
'p.old_short_name' => $instances[key($instances)]->short_name,
'n.status' => 1,
'r.status' => 1,
'r.type' => 'platform')));
'r.status' => 1,
'r.type' => 'platform')));
}
foreach ($instances as $iid => $instance) {
$platform = node_load($instance->rid);
......@@ -449,7 +449,7 @@ function hosting_package_list($ref, $type = null) {
*/
function hosting_package_views_api() {
return array(
'api' => 2,
'api' => 2,
'path' => drupal_get_path('module', 'hosting_package'),
);
}
......@@ -69,5 +69,3 @@ function hosting_package_views_data() {
return $data;
}
......@@ -19,4 +19,3 @@ class hosting_package_handler_filter_hosting_package_type extends views_handler_
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment