diff --git a/core/modules/project_browser/css/project_browser.css b/core/modules/project_browser/css/project_browser.css index 68b9b75..0deb86a 100644 --- a/core/modules/project_browser/css/project_browser.css +++ b/core/modules/project_browser/css/project_browser.css @@ -33,19 +33,19 @@ cursor: pointer; } -div.item-list ul.project-browser-sort-list, +div.item-list ul.project-browser-sort-list, div.item-list ul.project-browser-servers-list { margin: 0; } -div.item-list ul.project-browser-sort-list li, +div.item-list ul.project-browser-sort-list li, div.item-list ul.project-browser-servers-list li { display: inline; list-style-image: none; margin-right: 10px; } -div.item-list ul.project-browser-sort-list li a, +div.item-list ul.project-browser-sort-list li a, div.item-list ul.project-browser-servers-list li a { color: #0074BD; } @@ -125,13 +125,13 @@ div.project-status { } div.project-information { - + } .project-browser-install-main { padding: 10px; float: right; - width: 76%; + width: 76%; } .install-disabled { @@ -163,7 +163,7 @@ div.install-item-prefix { } #project-browser-main div.form-item-install { - float: right; + float: right; } #project-browser div.project-browser-region { diff --git a/core/modules/project_browser/js/jquery.multiselect.min.js b/core/modules/project_browser/js/jquery.multiselect.min.js index 256d8c7..bac8630 100644 --- a/core/modules/project_browser/js/jquery.multiselect.min.js +++ b/core/modules/project_browser/js/jquery.multiselect.min.js @@ -2,9 +2,9 @@ * jQuery MultiSelect UI Widget 1.10a * Modified by Leighton Whiting for Drupal's Project Browser * Copyright (c) 2011 Eric Hynds - * + * * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ - * + * * Depends: * - jQuery 1.4.2+ * - jQuery UI 1.8 widget factory @@ -41,4 +41,4 @@ $container.scrollTop(0).height(o.height);if($.ui.position&&!$.isEmptyObject(o.po this.labels.eq(0).trigger('mouseover').trigger('mouseenter').find('input').trigger('focus');button.addClass('ui-state-active');this._isOpen=true;this._trigger('open');},close:function(){if(this._trigger('beforeclose')===false){return;} var o=this.options,effect=o.hide,speed=this.speed;if($.isArray(o.hide)){effect=o.hide[0];speed=o.hide[1]||this.speed;} this.menu.hide(effect,speed);this.button.removeClass('ui-state-active').trigger('blur').trigger('mouseleave');this._isOpen=false;this._trigger('close');},enable:function(){this._toggleDisabled(false);},disable:function(){this._toggleDisabled(true);},checkAll:function(e){this._toggleChecked(true);this._trigger('checkAll');},uncheckAll:function(){this._toggleChecked(false);this._trigger('uncheckAll');},getChecked:function(){return this.menu.find('input').filter(':checked');},destroy:function(){$.Widget.prototype.destroy.call(this);this.button.remove();this.menu.remove();this.element.show();return this;},isOpen:function(){return this._isOpen;},widget:function(){return this.menu;},_setOption:function(key,value){var menu=this.menu;switch(key){case'header':menu.find('div.ui-multiselect-header')[value?'show':'hide']();break;case'checkAllText':menu.find('a.ui-multiselect-all span').eq(-1).text(value);break;case'uncheckAllText':menu.find('a.ui-multiselect-none span').eq(-1).text(value);break;case'height':menu.find('ul:last').height(parseInt(value,10));break;case'minWidth':this.options[key]=parseInt(value,10);this._setButtonWidth();this._setMenuWidth();break;case'selectedText':case'selectedList':case'noneSelectedText':this.options[key]=value;this.update();break;case'classes':menu.add(this.button).removeClass(this.options.classes).addClass(value);break;} -$.Widget.prototype._setOption.apply(this,arguments);}});})(jQuery); \ No newline at end of file +$.Widget.prototype._setOption.apply(this,arguments);}});})(jQuery); diff --git a/core/modules/project_browser/js/project_browser_categories_widget.js b/core/modules/project_browser/js/project_browser_categories_widget.js index c28f738..cb91efb 100644 --- a/core/modules/project_browser/js/project_browser_categories_widget.js +++ b/core/modules/project_browser/js/project_browser_categories_widget.js @@ -8,4 +8,4 @@ at: 'right bottom' } }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/core/modules/project_browser/js/project_browser_more_link.js b/core/modules/project_browser/js/project_browser_more_link.js index df42ba9..b8cfb14 100644 --- a/core/modules/project_browser/js/project_browser_more_link.js +++ b/core/modules/project_browser/js/project_browser_more_link.js @@ -10,7 +10,7 @@ var moreText = Drupal.t('More'); // The "less" link text var lessText = Drupal.t('Less'); - + $(".project-information .project-description").each(function(index) { if ($(this).height() > adjustheight) { @@ -18,9 +18,9 @@ $(this).parents(".project-information").append(''); } }); - + $("a.show-more").text(moreText); - + $(".show-more").toggle(function() { $(this).parents("div:first").find(".project-description").css('height', 'auto').css('overflow', 'visible'); $(this).text(lessText); diff --git a/core/modules/project_browser/js/select_releases.js b/core/modules/project_browser/js/select_releases.js index a2bdc15..31ca0b7 100644 --- a/core/modules/project_browser/js/select_releases.js +++ b/core/modules/project_browser/js/select_releases.js @@ -6,7 +6,7 @@ */ $('.project-browser-releases-wrapper').hide(); $('.project-browser-selected-release').show(); - + $('.project-browser-show-releases-link').click(function() { var target = $(this).attr('rel'); $('.project-browser-release-' + target).show(); diff --git a/core/modules/project_browser/project_browser.admin.inc b/core/modules/project_browser/project_browser.admin.inc index b3e0d96..58991ad 100644 --- a/core/modules/project_browser/project_browser.admin.inc +++ b/core/modules/project_browser/project_browser.admin.inc @@ -10,7 +10,7 @@ /** * Builds the Admin Settings Form - * + * * @return * The $form array for the admin settings */ @@ -26,8 +26,8 @@ function project_browser_admin() { '#type' => 'textarea', '#title' => t('Repositories'), '#default_value' => variable_get('project_browser_servers', ''), - '#description' => t("Add new repositories to use for the Project Browser, one per line, in - the 'url|method|Site Name' format. Drupal.org is added by default, and doesn't need to be + '#description' => t("Add new repositories to use for the Project Browser, one per line, in + the 'url|method|Site Name' format. Drupal.org is added by default, and doesn't need to be set here."), '#required' => FALSE, ); diff --git a/core/modules/project_browser/project_browser.inc b/core/modules/project_browser/project_browser.inc index 73c6efb..dfabfae 100644 --- a/core/modules/project_browser/project_browser.inc +++ b/core/modules/project_browser/project_browser.inc @@ -1,4 +1,4 @@ - $queued_projects)); } /** * Builds the install button for the Install Queue block - * - * Since the selected projects are stored in the $_SESSION variable, + * + * Since the selected projects are stored in the $_SESSION variable, * no real processing is done, we just redirect to the install/select_versions page - * + * * @return * The $form array */ @@ -36,17 +36,17 @@ function project_browser_install_button_form($form, &$form_state) { '#type' => 'submit', '#value' => 'Install', ); - + $form['#action'] = url('admin/modules/project-browser/install/select_versions'); - + return $form; } /** * Builds the filters form - * + * * This includes categories and the string search box, and the $type is stored - * + * * @param $type * The type of project (module or theme) * @return @@ -59,7 +59,7 @@ function project_browser_filters_form($form, &$form_state, $type) { '#title' => t('Search String'), '#default_value' => isset($_SESSION['project_browser_text_filter_' . $type]) ? $_SESSION['project_browser_text_filter_' . $type] : '', ); - + // Add the categories filter if there are categories if ($categories = project_browser_get_categories($type)) { $form['categories'] = array( @@ -72,32 +72,32 @@ function project_browser_filters_form($form, &$form_state, $type) { '#default_value' => isset($_SESSION['project_browser_category_filter_' . $type]) ? $_SESSION['project_browser_category_filter_' . $type] : array(), ); } - + $form['project_type'] = array( '#type' => 'value', '#value' => $type, ); - + $form['submit'] = array( '#type' => 'submit', '#value' => t('Filter'), ); - + return $form; } /** * Builds a themed sort widget for the results - * + * * These are links which can be clicked/toggled to select and change direction - * + * * @param $sort_options * An array of sort options * @param $current_sort_option * The currently selected sort option * @param $current_sort_direction * The currently selected sort direction - * + * * @return * A themed list of sort options */ @@ -105,19 +105,19 @@ function project_browser_get_sort_widget($sort_options, $current_sort_option, $c $sort_list = array(); $sort_list[] = array('data' => t('Sort by:'), 'class' => array('sort-header')); $current_path = drupal_get_path_alias(current_path()); - + foreach ($sort_options as $sort_option) { $classes = array(); $query = array( 'order_by' => $sort_option['method'], 'sort' => $sort_option['default_sort'], ); - + // If the sort option is currently active, handle it differently if ($current_sort_option == $sort_option['method']) { $classes[] = 'sort-active'; $classes[] = 'sort-' . $current_sort_direction; - + // Set the direction of the sort link to the opposite of what it currently is if ($current_sort_direction == $query['sort']) { if ($query['sort'] == 'desc') { @@ -131,7 +131,7 @@ function project_browser_get_sort_widget($sort_options, $current_sort_option, $c else { $classes[] = 'sort-inactive'; } - + $sort_list[] = array( 'data' => l($sort_option['name'], $current_path, array('query' => $query, 'class' => array())), 'class' => $classes, @@ -139,21 +139,21 @@ function project_browser_get_sort_widget($sort_options, $current_sort_option, $c } return theme('item_list', array( - 'items' => $sort_list, + 'items' => $sort_list, 'type' => 'ul', 'attributes' => array('class' => array('project-browser-sort-list')))); } /** * Builds a themed widget to select the server - * + * * This is only called if there are more than one server enabled in the settings. - * + * * @param $server * An array of servers that should be available as options * @param $current_server * The currently selected server - * + * * @return * A themed server select widget */ @@ -161,15 +161,15 @@ function project_browser_get_server_widget($servers, $current_server) { $list = array(); $list[] = array('data' => t('Repository:'), 'class' => array('server-header')); $current_path = drupal_get_path_alias($_GET['q']); - + $i = 0; - + foreach ($servers as $url => $server) { $classes = array(); $query = array( 'repository' => $i, ); - + // If the sort option is currently active, handle it differently if ($current_server == $i) { $classes[] = 'server-active'; @@ -177,17 +177,17 @@ function project_browser_get_server_widget($servers, $current_server) { else { $classes[] = 'server-inactive'; } - + $list[] = array( 'data' => l($server['name'], $current_path, array('query' => $query, 'class' => array())), 'class' => $classes, ); - + $i += 1; } return theme('item_list', array( - 'items' => $list, + 'items' => $list, 'type' => 'ul', 'attributes' => array('class' => array('project-browser-servers-list')))); } @@ -195,10 +195,10 @@ function project_browser_get_server_widget($servers, $current_server) { /** * Builds and returns an array of sort options, keyed by method - * + * * @param $full * (Optional) Set this to TRUE if you want to get all of the supported sort methods. Defaults to FALSE - * + * * @return * An array of sort options, keyed by method */ @@ -210,19 +210,19 @@ function project_browser_get_sort_options($full = FALSE) { 'name' => array('method' => 'name', 'name' => t('Author'), 'default_sort' => 'asc'), 'latest_release' => array('method' => 'latest_release', 'name' => t('Latest release'), 'default_sort' => 'desc'), ); - + if ($full) { $sort_options['type'] = array('method' => 'type', 'name' => t('Type'), 'default_sort' => 'asc'); $sort_options['created'] = array('method' => 'created', 'name' => t('Date created'), 'default_sort' => 'asc'); $sort_options['latest_activity'] = array('method' => 'latest_activity', 'name' => t('Latest build'), 'default_sort' => 'desc'); } - + return $sort_options; } /** * Handles the filters form submit - * + * * All that we do here is store the selected categories and search string * in the $_SESSION variable. */ @@ -239,16 +239,16 @@ function project_browser_filters_form_submit($form, &$form_state) { /** * Returns all available categories for a project type - * + * * @param $type * The type of project to get the categories for. Example: 'module' or 'theme' - * + * * @return * Array containing all available categories or FALSE if no categories */ function project_browser_get_categories($type) { $categories = array(); - + // Get the server to use from SESSION if (isset($_SESSION['project_browser_server_filter'])) { $use_server = $_SESSION['project_browser_server_filter']; @@ -256,7 +256,7 @@ function project_browser_get_categories($type) { else { $use_server = 0; } - + $categories_raw = project_browser_fetch_categories($type, $use_server); if (is_array($categories_raw) AND !empty($categories_raw)) { @@ -268,10 +268,10 @@ function project_browser_get_categories($type) { } } } - + if (is_array($categories) AND !empty($categories)) { ksort($categories); - + return $categories; } return FALSE; @@ -279,18 +279,18 @@ function project_browser_get_categories($type) { /** * Prepares the categories for sending to the servers as filters - * + * * @param $raw_cats * An array of categories from $form_state['values'] * @param $type * The type of project to prepare the categories for, eg 'module' or 'theme' - * + * * @return * An array of server categories, keyed by server url */ function project_browser_prepare_categories($raw_cats, $type) { $categories = project_browser_fetch_categories($type); - + // Set the value of the categories to true if it is selected foreach ($categories as $url => $cats) { foreach ($cats as $key => $value) { @@ -302,24 +302,24 @@ function project_browser_prepare_categories($raw_cats, $type) { unset($categories[$url][$key]); } } - + // Unset the parent if there are no children if (empty($categories[$url])) { unset($categories[$url]); } } - + return $categories; } /** * Checks if a project is enabled - * + * * @param $type * The type of project. Could be 'theme' or 'module' * @param $name * The short name of the project - * + * * @return * TRUE if the project is enabled, FALSE otherwise */ @@ -338,7 +338,7 @@ function _project_browser_is_project_enabled($type, $name) { /** * Gets the currently listed projects from the session - * + * * @return * An array of listed projects from the $_SESSION variable */ @@ -346,23 +346,23 @@ function project_browser_get_listed_projects() { if (isset($_SESSION['project_browser_listed_projects'])) { return $_SESSION['project_browser_listed_projects']; } - + return array(); } /** * Gets the currently queued projects from the $_SESSION variable - * + * * @param $type * (Optional) The type of project (module or theme). Defaults to NULL, which * will return projects of all types - * + * * @return * An array of projects that are queued for install */ function project_browser_get_queued_projects($type = NULL) { $projects = array(); - + if (isset($_SESSION['project_browser_install_list'])) { foreach ($_SESSION['project_browser_install_list'] as $project) { if (is_array($project) AND !empty($project)) { @@ -375,36 +375,36 @@ function project_browser_get_queued_projects($type = NULL) { } } } - + return $projects; } /** * Gets a release from a project and a release_name - * + * * @param $release_name * The name of the release, such as '7.x-1.2' * @param $project * The $project data array - * + * * @return * The release data array or FALSE if the release doesn't exist */ function project_browser_get_release($release_name, $project) { $release_data = project_browser_get_project_release_data($project); - + return isset($release_data['releases'][$release_name]) ? $release_data['releases'][$release_name] : FALSE; } /** * Gets the newly installed projects from the session - * + * * @return * An array of all of the newly installed projects */ function project_browser_get_installed_projects() { $projects = array(); - + if (isset($_SESSION['project_browser_installed_projects'])) { foreach ($_SESSION['project_browser_installed_projects'] as $project) { if (is_array($project) AND !empty($project)) { @@ -412,13 +412,13 @@ function project_browser_get_installed_projects() { } } } - + return $projects; } /** * Adds a project to the install queue $_SESSION variable - * + * * @param $project * An array of $project data for a single project */ @@ -428,7 +428,7 @@ function project_browser_install_queue_add($project) { /** * Removes a project from the install queue $_SESSION variable - * + * * @param $project_name * The name of the project to remove, such as 'views' */ @@ -440,13 +440,13 @@ function project_browser_install_queue_remove($project_name) { /** * Gets the currently queued releases from the $_SESSION variable - * + * * @return * An array of the currently selected releases */ function project_browser_get_queued_releases() { $releases = array(); - + if (isset($_SESSION['project_browser_install_releases_list'])) { foreach ($_SESSION['project_browser_install_releases_list'] as $release_name => $project) { if (is_array($project) AND !empty($project)) { @@ -454,7 +454,7 @@ function project_browser_get_queued_releases() { } } } - + return $releases; } @@ -464,7 +464,7 @@ function project_browser_get_queued_releases() { /** * Fetches results from the servers based on the parameters passed in - * + * * $filters should be an associative array with the following keys: * array( * 'version' => '7', // The Major Version of Drupal that is running on the Client @@ -474,9 +474,9 @@ function project_browser_get_queued_releases() { * 'page' => 3, // The zero-based page number * 'requested' => 12, // How many results are requested per page * ) - * + * * The project_browser_fetch_results($filters) call returns an array like this: - * + * * array( * 'total' = 5, // The total number of results found for the filters * 'projects' => array( // An array of projects returned for this page request @@ -501,10 +501,10 @@ function project_browser_get_queued_releases() { * 'name_2 => array( ... ), * ), * ); - * + * * @param $filters * An associative array of queries to use to filter results - * + * * @return * Returns an array of results */ @@ -512,24 +512,24 @@ function project_browser_fetch_results($filters) { $servers = project_browser_get_servers($filters['server']); // Attempt to retrieve the cached version of this page $cid = md5(serialize(array_merge($filters, $servers))); - + if ($cache = cache()->get($cid)) { return $cache->data; } - + $results = array( 'projects' => array(), 'total' => 0, ); - + unset($filters['server']); - + foreach ($servers as $url => $server) { $local_filters = $filters; - + // We are not using this right now because we only expect to handle 1 server at a time currently // $local_filters['requested'] = floor($filters['requested'] / count($servers)); - + // Send only the relevant categories to the server if (isset($filters['categories'])) { if (!isset($filters['categories'][$url])) { @@ -538,13 +538,13 @@ function project_browser_fetch_results($filters) { } $local_filters['categories'] = $filters['categories'][$url]; } - + // Use XMLRPC if it is set if ($server['method'] == 'xmlrpc') { $results_raw = xmlrpc($url, array( 'project_browser_server.fetch_results' => array($local_filters), )); - + // Check for errors if ($error = xmlrpc_error() AND $error->is_error) { drupal_set_message(t("Encountered an error when trying to fetch results from @name. Error @code : @message", @@ -552,14 +552,14 @@ function project_browser_fetch_results($filters) { continue; } } - + // Use json if it is set if ($server['method'] == 'json') { $local_filters['method'] = 'query'; if (isset($local_filters['categories'])) { $local_filters['categories'] = serialize($local_filters['categories']); } - + $query_url = $url . '/query/' . $local_filters['type'] . '/8?' . http_build_query($local_filters, FALSE, '&'); $response = drupal_http_request($query_url); if ($response->code == '200') { @@ -571,11 +571,11 @@ function project_browser_fetch_results($filters) { continue; } } - + if (isset($results_raw['total'])) { $results['total'] += $results_raw['total']; } - + if (isset($results_raw['projects']) AND !empty($results_raw['projects'])) { // Merge the results $results['projects'] = array_merge($results['projects'], $results_raw['projects']); @@ -584,40 +584,40 @@ function project_browser_fetch_results($filters) { // Set the cached version of the results cache()->set($cid, $results, strtotime("+24 hours")); - + return $results; } /** * Fetches categories from the servers based on the type of project - * + * * @param $type * The type of project we are getting categories for * @param $use_server * (Optional) The server to use. Defaults to 'all' - * + * * @return * Returns an array of the categories */ function project_browser_fetch_categories($type, $use_server = 'all') { $servers = project_browser_get_servers($use_server); - + // Attempt to retrieve the cached version of this page $cid = md5('categories_' . $type . serialize($servers)); - + if ($cache = cache()->get($cid)) { return $cache->data; } else { $categories = array(); - + foreach ($servers as $url => $server) { // Use xmlrpc if it is set if ($server['method'] == 'xmlrpc') { $categories_raw = xmlrpc($url, array( 'project_browser_server.fetch_categories' => array($type), )); - + // Check for errors if ($error = xmlrpc_error() AND $error->is_error) { drupal_set_message(t("Encountered an error when trying to fetch categories from @name. Error @code : @message", @@ -625,7 +625,7 @@ function project_browser_fetch_categories($type, $use_server = 'all') { continue; } } - + // Use json if it is set if ($server['method'] == 'json') { $params = array( @@ -642,27 +642,27 @@ function project_browser_fetch_categories($type, $use_server = 'all') { continue; } } - + if (is_array($categories_raw) AND !empty($categories_raw)) { $categories[$url] = $categories_raw; } } - + // Cache this for 24 hours cache()->set($cid, $categories, strtotime("+24 hours")); } - + return $categories; } /** * Gets the servers to use for fetching results - * + * * @param $use_server * (Optional) The server to use. Defaults to 'all' - * + * * @return - * Returns an associative array of servers, populated from the project_browser_servers variable, + * Returns an associative array of servers, populated from the project_browser_servers variable, * in 'url => name' format */ function project_browser_get_servers($use_server = 'all') { @@ -673,7 +673,7 @@ function project_browser_get_servers($use_server = 'all') { 'method' => 'json', ), )); - + if ($servers_raw = variable_get('project_browser_servers', '')) { // Process the variable and add the servers to the list $custom_servers = array(); @@ -681,10 +681,10 @@ function project_browser_get_servers($use_server = 'all') { $list = explode("\n", $servers_raw); $list = array_map('trim', $list); $list = array_filter($list, 'strlen'); - + foreach ($list as $position => $text) { $method = $name = $url = FALSE; - + $matches = array(); if (preg_match('/(.*)\|(.*)\|(.*)/', $text, $matches)) { $url = $matches[1]; @@ -693,10 +693,10 @@ function project_browser_get_servers($use_server = 'all') { $custom_servers[$url] = array('name' => $name, 'method' => $method); } } - + $servers = array_merge($servers, $custom_servers); } - + // Filter out servers if necessary if ($use_server !== 'all') { $i = 0; @@ -707,16 +707,16 @@ function project_browser_get_servers($use_server = 'all') { $i += 1; } } - + return $servers; } /** * Uses the project status url to get the available releases for a project - * + * * @param $project * The project to get the releases for - * + * * @return * An array of releases for this project, or FALSE if it can't be found */ @@ -724,7 +724,7 @@ function project_browser_get_project_release_data($project) { $releases = array(); $project['project_type'] = $project['type']; $project['includes'] = array(); - + // Build the releases cache for this project module_load_include('inc', 'update', 'update.fetch'); if (_update_process_fetch_task($project)) { @@ -733,7 +733,7 @@ function project_browser_get_project_release_data($project) { return $data->data; } } - + return FALSE; } @@ -744,17 +744,17 @@ function project_browser_get_project_release_data($project) { /** * Helper function to download a project. This code is mostly copied and pasted from * modules/update/update.manager.inc - * - * There were no suitable functions that could be used besides + * + * There were no suitable functions that could be used besides * drupal_form_submit('update_manager_install_form', $form_state, $project['type']); * and it wouldn't work because this is being run from a Batch function - * - * @todo - Ideally, this should be in the update module as a standalone function, + * + * @todo - Ideally, this should be in the update module as a standalone function, * to reduce coupling and duplication - * + * * @param $url * The url of the release download - * + * * @return * An array indicating whether or not this was successful, and an error message * if applicable @@ -769,7 +769,7 @@ function project_browser_download_project($url) { 'message' => t('Unable to retrieve Drupal project from %url.', array('%url' => $url)), ); } - + // Try to extract it $directory = _update_manager_extract_directory(); try { @@ -788,7 +788,7 @@ function project_browser_download_project($url) { 'message' => t('Provided archive contains no files.'), ); } - + $project = strtok($files[0], '/\\'); $archive_errors = update_manager_archive_verify($project, $local_cache, $directory); @@ -803,7 +803,7 @@ function project_browser_download_project($url) { 'message' => array_shift($archive_errors), ); } - + // Make sure the Updater registry is loaded. drupal_get_updaters(); @@ -837,14 +837,14 @@ function project_browser_download_project($url) { $project_real_location = drupal_realpath($project_location); $updater_name = get_class($updater); - + if (fileowner($project_real_location) == fileowner(conf_path())) { module_load_include('inc', 'update', 'update.authorize'); $filetransfer = new Local(DRUPAL_ROOT); - + // Initialize some variables in the Batch API $context array. $updater = new $updater_name($project_real_location); - + try { if ($updater->isInstalled()) { // This is an update. @@ -867,7 +867,7 @@ function project_browser_download_project($url) { 'message' => t('Permissions are not set up properly.'), ); } - + return array( 'success' => TRUE, ); @@ -875,7 +875,7 @@ function project_browser_download_project($url) { /** * Installs a single release of a project during batch, for example - * + * * @param $release_name * The name of the release, such as '7.x-1.2' * @param $project @@ -886,36 +886,36 @@ function project_browser_download_project($url) { function _project_browser_batch_install_release($release_name, $project, &$context) { module_load_include('inc', 'project_browser', 'project_browser.pages'); $release = project_browser_get_release($release_name, $project); - + $result = project_browser_download_project($release['download_link']); - + if ($result['success']) { $context['results']['successes'][] = t('Successfully installed %project.', array('%project' => $project['title'])); $context['message'] = t('Installed %project...', array('%project' => $project['title'])); - + // Add this to the session variable and remove it from the install_queue variable $_SESSION['project_browser_installed_projects'][$project['name']] = $project; unset($_SESSION['project_browser_install_list'][$project['name']]); } else { - watchdog('project_browser', 'There was an error while installing %project. + watchdog('project_browser', 'There was an error while installing %project. !message', array('%project' => $project['title'], '!message' => $result['message']), WATCHDOG_ERROR); - $context['results']['failures'][] = t('Error installing %project. Errors have been logged.', + $context['results']['failures'][] = t('Error installing %project. Errors have been logged.', array('%project' => $project['title'])); - $context['message'] = t('Error installing %project. !message', + $context['message'] = t('Error installing %project. !message', array('%project' => $project['title'], '!message' => $result['message'])); } } /** * Shows a message and finishes up the batch - * + * * If there were any errors, they are reported here with drupal_set_message(). The * user is then redirected to the select versions page if there were errors, the * install dependencies page if there were any detected missing dependencies, or the * enable modules page if there were no errors. - * + * * @param $success * Whether or not the whole operation was successful * @param $results @@ -925,11 +925,11 @@ function _project_browser_batch_install_release($release_name, $project, &$conte */ function _project_browser_batch_install_releases_finished($success, $results, $operations) { drupal_get_messages(); - + // Restore the maintenance mode to what it was at the start variable_set('maintenance_mode', $_SESSION['maintenance_mode']); unset($_SESSION['maintenance_mode']); - + unset($_SESSION['project_browser_install_releases_list']); if ($success) { if (!empty($results)) { @@ -942,7 +942,7 @@ function _project_browser_batch_install_releases_finished($success, $results, $o drupal_set_message(t('Error installing projects.'), 'error'); drupal_goto('admin/modules/project-browser/install/select_versions'); } - + $projects = project_browser_get_installed_projects(); $missing = project_browser_get_missing_dependencies($projects); // If there are missing dependencies, go to install dependencies @@ -956,18 +956,18 @@ function _project_browser_batch_install_releases_finished($success, $results, $o /** * Gets the dependencies for installed projects - * + * * @param $projects * An array of projects to get the missing dependencies for - * + * * @return * An array of missing dependencies, if any were detected */ function project_browser_get_missing_dependencies($projects) { $modules = system_rebuild_module_data(); - + $missing = array(); - + foreach ($projects as $project) { if ($project['type'] == 'module') { $dependency_check = TRUE; @@ -988,6 +988,6 @@ function project_browser_get_missing_dependencies($projects) { } } } - + return $missing; } diff --git a/core/modules/project_browser/project_browser.info b/core/modules/project_browser/project_browser.info index c6510a8..8e3766c 100644 --- a/core/modules/project_browser/project_browser.info +++ b/core/modules/project_browser/project_browser.info @@ -4,4 +4,4 @@ dependencies[] = update package = Core version = VERSION core = 8.x -files[] = project_browser.test \ No newline at end of file +files[] = project_browser.test diff --git a/core/modules/project_browser/project_browser.module b/core/modules/project_browser/project_browser.module index 5319f6b..fb24a79 100644 --- a/core/modules/project_browser/project_browser.module +++ b/core/modules/project_browser/project_browser.module @@ -2,14 +2,14 @@ /** * @file * Project Browser module. - * + * * This module provides a new UI for admins to easily browse modules and themes from their * admin pages, and install them. */ /** * Implements hook_help(). - * + * * Displays help and module information */ function project_browser_help($path, $arg) { @@ -49,7 +49,7 @@ function project_browser_menu() { 'access arguments' => array('access administration pages'), 'file' => 'project_browser.admin.inc', ); - + $items['admin/modules/project-browser'] = array( 'title' => 'Project Browser', 'description' => 'Browse and search for new modules', @@ -58,7 +58,7 @@ function project_browser_menu() { 'access arguments' => array('use project browser'), 'file' => 'project_browser.pages.inc', ); - + $items['admin/modules/project-browser/modules'] = array( 'title' => 'Modules', 'description' => 'Browse and search for new modules', @@ -68,7 +68,7 @@ function project_browser_menu() { 'file' => 'project_browser.pages.inc', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - + $items['admin/modules/project-browser/themes'] = array( 'title' => 'Themes', 'description' => 'Browse and search for new themes', @@ -78,7 +78,7 @@ function project_browser_menu() { 'file' => 'project_browser.pages.inc', 'type' => MENU_LOCAL_TASK, ); - + $items['admin/modules/project-browser/install/%'] = array( 'title' => 'Install', 'page callback' => 'project_browser_installation_page', @@ -87,7 +87,7 @@ function project_browser_menu() { 'type' => MENU_NORMAL_ITEM, 'file' => 'project_browser.pages.inc', ); - + $items['project-browser/%/install-queue/%/%'] = array( 'page callback' => 'project_browser_install_queue_callback', 'page arguments' => array(1, 3, 4), @@ -99,16 +99,16 @@ function project_browser_menu() { /** * Page callback that allows for adding to and removing from the install queue - * + * * This is invoked via AJAX most of the time */ function project_browser_install_queue_callback($method, $op, $project_name) { module_load_include('inc', 'project_browser', 'project_browser'); - + switch ($op) { case 'add': $projects = project_browser_get_listed_projects(); - + if (isset($projects[$project_name])) { $project = $projects[$project_name]; project_browser_install_queue_add($project); @@ -117,22 +117,22 @@ function project_browser_install_queue_callback($method, $op, $project_name) { drupal_set_message(t('Error: The project was not found.'), 'error'); } break; - - case 'remove': + + case 'remove': project_browser_install_queue_remove($project_name); break; } - + switch ($method) { case 'nojs': // Redirect to the page it came from $redirect = (isset($_GET['destination'])) ? $_GET['destination'] : 'admin/modules/project-browser'; - + drupal_goto($redirect); break; case 'ajax': $commands = array(); - + // Refresh the install queue $commands[] = ajax_command_replace('#project-browser-install-queue', project_browser_get_install_list()); // Refresh the add to queue link @@ -145,7 +145,7 @@ function project_browser_install_queue_callback($method, $op, $project_name) { /** * Implements hook_menu_local_tasks_alter(). - * + * * This is used to put the 'Project Browser' action on the 'Modules' page */ function project_browser_menu_local_tasks_alter(&$data, $router_item, $root_path) { @@ -202,7 +202,7 @@ function project_browser_menu_local_tasks_alter(&$data, $router_item, $root_path // ====================================== /** - * Implements hook_theme() + * Implements hook_theme() */ function project_browser_theme($existing, $type, $theme, $path) { return array( @@ -241,7 +241,7 @@ function project_browser_theme($existing, $type, $theme, $path) { /** * Adds some variables for the projects install theme - * + * * @param $variables * An associative array containing: * - current_task : the current task @@ -254,7 +254,7 @@ function project_browser_preprocess_project_browser_install(&$variables) { /** * Adds some variables for the projects install queue theme - * + * * @param $variables * An associative array containing: * - projects : an array of projects in the install queue @@ -276,14 +276,14 @@ function project_browser_preprocess_project_browser_install_queue(&$variables) { } $build['install-link'] = drupal_get_form('project_browser_install_button_form'); } - + // Add the install button $variables['queue_html'] = drupal_render($build); } /** * Add some variables for the project browser block theme - * + * * @param $variables * An associative array containing: * - element['#title'] : the title of the block @@ -297,7 +297,7 @@ function project_browser_preprocess_project_browser_block(&$variables) { /** * Add some variables for the projects list theme - * + * * @param $variables * An associative array containing: * - projects_list : array of all projects @@ -305,7 +305,7 @@ function project_browser_preprocess_project_browser_block(&$variables) { function project_browser_preprocess_project_browser_list(&$variables) { module_load_include('inc', 'project_browser', 'project_browser'); drupal_add_css(drupal_get_path('module', 'project_browser') . '/css/project_browser.css'); - + if (is_array($variables['projects_list']) AND !empty($variables['projects_list'])) { $content = ''; $first = TRUE; @@ -318,7 +318,7 @@ function project_browser_preprocess_project_browser_list(&$variables) { else { $content = t('No results found.'); } - + switch ($variables['type']) { case 'module': $title = t('Modules'); @@ -330,33 +330,33 @@ function project_browser_preprocess_project_browser_list(&$variables) { $title = t('Projects'); break; } - + $main_content['project_browser_main_block'] = array( '#theme' => 'project_browser_block', - '#title' => $title, + '#title' => $title, '#content' => $content, '#contextual_links' => array( 'project_browser' => array('admin/config/development/project_browser', array()), ), ); $variables['main_content'] = render($main_content); - + // Add the pager $variables['pager'] = theme('pager', array('tags' => NULL)); - + // Add the filters $filters_form = drupal_get_form('project_browser_filters_form', $variables['type']); $filters['project_browser_filters_block'] = array( '#theme' => 'project_browser_block', - '#title' => t('Filters'), + '#title' => t('Filters'), '#content' => drupal_render($filters_form), ); $variables['filters'] = render($filters); - + // Add the install list $install_list['project_browser_filters_block'] = array( '#theme' => 'project_browser_block', - '#title' => t('Install queue'), + '#title' => t('Install queue'), '#content' => project_browser_get_install_list(), ); $variables['install_list'] = render($install_list); @@ -364,7 +364,7 @@ function project_browser_preprocess_project_browser_list(&$variables) { /** * Add some variables for the project theme - * + * * @param $variables * An associative array containing: * - project : associative array of project variables @@ -372,16 +372,16 @@ function project_browser_preprocess_project_browser_list(&$variables) { function project_browser_preprocess_project_browser_project(&$variables) { module_load_include('inc', 'project_browser', 'project_browser'); $project = $variables['project']; - - $variables['title'] = l($project['title'], check_url($project['project url']), + + $variables['title'] = l($project['title'], check_url($project['project url']), array('attributes' => array('target' => '_blank'), 'html' => TRUE)); $variables['author'] = t('Author: @author', array('@author' => $project['author'])); $variables['description'] = _filter_htmlcorrector(filter_xss($project['description'])); $variables['image'] = $project['image']; $variables['last_updated'] = ($project['last updated']) ? t('Last Updated: @date', array('@date' => format_date($project['last updated'], 'long'))) : ''; - + $extras = array(); - + if ($project['maintenance status']) { $extras[] = check_plain($project['maintenance status']); } @@ -395,12 +395,12 @@ function project_browser_preprocess_project_browser_project(&$variables) { if ($project['rating']) { $extras[] = check_plain($project['rating']); } - + $variables['extras'] = implode(' | ', $extras); - + // Check if the project is installed if (_project_browser_is_project_enabled($project['type'], $project['name'])) { - $variables['status'] = '
Already installed
'; + $variables['status'] = '
Already installed
'; $variables['install'] = ''; } elseif (drupal_get_filename($project['type'], $project['name'])) { @@ -415,7 +415,7 @@ function project_browser_preprocess_project_browser_project(&$variables) { /** * Builds the add/remove project to install queue link - * + * * @param $project_name * The short name of the project, such as 'views' * @param $title @@ -423,7 +423,7 @@ function project_browser_preprocess_project_browser_project(&$variables) { * @param $id_prefix * (Optional) The prefix that should be prepended to the id, to ensure unique id names. Defaults * to 'add-to-queue-link' - * + * * @return * A themed link to remove or add an item from the install queue */ @@ -433,7 +433,7 @@ function project_browser_add_remove_queue_link($project_name, $title = NULL, $id $title = isset($queued_projects[$project_name]) ? t('Remove from Install queue') : t('Add to Install queue'); } $op = isset($queued_projects[$project_name]) ? 'remove' : 'add'; - + $build['ajax_link'] = array( '#type' => 'link', '#title' => $title, @@ -451,27 +451,27 @@ function project_browser_add_remove_queue_link($project_name, $title = NULL, $id ), ), ); - + return drupal_render($build); } /** * Implements hook_library(). - * + * * This is used for the categories multiselect widget library */ function project_browser_library() { // Library One. $libraries['multiselect'] = array( - 'title' => 'jQuery MultiSelect', - 'website' => 'http://example.com/library-1', - 'version' => '1.10a', + 'title' => 'jQuery MultiSelect', + 'website' => 'http://example.com/library-1', + 'version' => '1.10a', 'js' => array( drupal_get_path('module', 'project_browser') . '/js/jquery.multiselect.min.js' => array(), - ), + ), 'css' => array( drupal_get_path('module', 'project_browser') . '/css/jquery.multiselect.css' => array( - 'type' => 'file', + 'type' => 'file', 'media' => 'screen', ), ), diff --git a/core/modules/project_browser/project_browser.test b/core/modules/project_browser/project_browser.test index dd7f352..3ade60c 100644 --- a/core/modules/project_browser/project_browser.test +++ b/core/modules/project_browser/project_browser.test @@ -5,7 +5,7 @@ */ class ProjectBrowserAdministrationTestCase extends DrupalWebTestCase { protected $privileged_user; - + /** * Implements getInfo(). */ @@ -16,10 +16,10 @@ public static function getInfo() { 'group' => t('Project Browser'), ); } - + public function setUp() { parent::setUp('project_browser', 'project_browser_test'); // Enable any modules required for the test - + // Set the default server variable $server_url = url('project_browser_test/query', array('absolute' => TRUE)); variable_set('project_browser_default_server', array( @@ -28,24 +28,24 @@ public function setUp() { 'method' => 'json', ), )); - + // Create and log in our privileged user. $this->privileged_user = $this->drupalCreateUser(array( 'use project browser', )); $this->drupalLogin($this->privileged_user); } - + public function testProjectBrowserSearchViews() { - // Create node to edit. + // Create node to edit. $edit = array(); $edit['search_text'] = 'views'; $this->drupalPost('admin/modules/project-browser/modules', $edit, t('Filter')); $this->assertText('Showing 1 to'); } - + public function testProjectBrowserGetProjects() { - // Attempt to fetch the default projects + // Attempt to fetch the default projects $edit = array(); $edit['search_text'] = ''; $this->drupalPost('admin/modules/project-browser/modules', $edit, t('Filter')); @@ -53,7 +53,7 @@ public function testProjectBrowserGetProjects() { } public function testProjectBrowserProjectEnabled() { - // Make sure project enabled detection works + // Make sure project enabled detection works module_load_include('inc', 'project_browser', 'project_browser'); $this->assertTrue(_project_browser_is_project_enabled('module', 'project_browser'), t('Make sure project enabled detection works.')); } @@ -61,16 +61,15 @@ public function testProjectBrowserProjectEnabled() { public function testProjectBrowserAddRemoveQueue() { // Refresh the page $this->drupalGet('admin/modules/project-browser/modules'); - + // Simulate adding a project to the install queue $this->drupalGet('project-browser/nojs/install-queue/add/views', array('query' => array('destination' => 'admin/modules/project-browser'))); $this->assertNoText('Install queue is empty.'); $this->assertNoText('Error: The project was not found.'); - + // Simulate removing a project from the install queue $this->drupalGet('project-browser/nojs/install-queue/remove/views', array('query' => array('destination' => 'admin/modules/project-browser'))); $this->assertText('Install queue is empty.'); $this->assertNoText('Error: The project was not found.'); } } -?> \ No newline at end of file diff --git a/core/modules/project_browser/tests/project_browser_test.info b/core/modules/project_browser/tests/project_browser_test.info index c5237dc..99c23da 100644 --- a/core/modules/project_browser/tests/project_browser_test.info +++ b/core/modules/project_browser/tests/project_browser_test.info @@ -2,4 +2,4 @@ name = "Project Browser module tests" description = "Support module for Project Browser related testing." package = Testing core = 8.x -hidden = TRUE \ No newline at end of file +hidden = TRUE diff --git a/core/modules/project_browser/tests/project_browser_test.module b/core/modules/project_browser/tests/project_browser_test.module index 6f9126a..c309244 100644 --- a/core/modules/project_browser/tests/project_browser_test.module +++ b/core/modules/project_browser/tests/project_browser_test.module @@ -28,12 +28,12 @@ function project_browser_test_query() { print drupal_json_encode(t('You must specify a project type.')); exit(); } - + $categories['project_browser_test'] = project_browser_test_get_categories($_GET['type']); - + print drupal_json_encode($categories); exit(); - + case 'query': // Check that we have valid data if (!isset($_GET['drupal_version'])) { @@ -44,7 +44,7 @@ function project_browser_test_query() { print drupal_json_encode(t('You must specify a project type.')); exit(); } - + // Get the filters $filters = array( 'drupal_version' => $_GET['drupal_version'], @@ -55,19 +55,19 @@ function project_browser_test_query() { 'requested' => isset($_GET['requested']) ? (int) $_GET['requested'] : 12, 'page' => isset($_GET['page']) ? (int) $_GET['page'] : 0, ); - + if (isset($_GET['categories'])) { $categories = unserialize($_GET['categories']); if (is_array($categories) AND !empty($categories)) { $filters['categories'] = $categories; } } - + // Pass them off to the project_browser_server_get_results() function $results = project_browser_test_get_results($filters); - + print drupal_json_encode($results); - + exit(); } } @@ -77,7 +77,7 @@ function project_browser_test_query() { */ function project_browser_test_get_categories($type) { $categories = array(); - + switch ($type) { case 'module': $categories = array( @@ -86,7 +86,7 @@ function project_browser_test_get_categories($type) { 'user_management' => "User Management", ); break; - + case 'theme': $categories = array( 'dark' => "Dark", @@ -102,12 +102,12 @@ function project_browser_test_get_categories($type) { */ function project_browser_test_get_results($filters) { $projects = project_browser_test_projects(); - + $results = array( 'total' => count($projects), 'projects' => array(), ); - + // Filter out projects based on type if (isset($filters['type']) AND $type = $filters['type']) { foreach ($projects as $name => $project) { @@ -116,7 +116,7 @@ function project_browser_test_get_results($filters) { } } } - + // Filter out projects based on drupal version number if (isset($filters['drupal_version']) AND $version = $filters['drupal_version']) { foreach ($projects as $name => $project) { @@ -125,7 +125,7 @@ function project_browser_test_get_results($filters) { } } } - + // Filter out projects based on categories number if (isset($filters['categories']) AND is_array($filters['categories']) AND !empty($filters['categories'])) { $filtered = array(); @@ -147,15 +147,15 @@ function project_browser_test_get_results($filters) { } } } - + $results['total'] = count($projects); - + // Only send back the requested amount $start = $filters['page'] * $filters['requested']; $end = $start + $filters['requested']; - + $results['projects'] = $projects; - + return $results; } @@ -164,16 +164,16 @@ function project_browser_test_get_results($filters) { */ function project_browser_test_projects() { $projects = array(); - + $projects['views'] = array( 'type' => 'module', 'title' => 'Views', 'name' => 'views', 'drupal version' => 7, 'author' => 'merlinofchaos', - 'description' => "The Views module provides a flexible method for Drupal site - designers to control how lists and tables of content (nodes in Views 1, almost - anything in Views 2) are presented. Traditionally, Drupal has hard-coded most of + 'description' => "The Views module provides a flexible method for Drupal site + designers to control how lists and tables of content (nodes in Views 1, almost + anything in Views 2) are presented. Traditionally, Drupal has hard-coded most of this, particularly in how taxonomy and tracker lists are formatted. ", 'drupal_versions' => array(6, 7), 'categories' => array('admin', 'search'), @@ -189,16 +189,16 @@ function project_browser_test_projects() { 'ctools', ), ); - + $projects['ctools_test'] = array( 'type' => 'module', 'title' => 'CTools Test', 'name' => 'ctools_test', 'drupal version' => 7, 'author' => 'merlinofchaos', - 'description' => "This suite is primarily a set of APIs and tools to improve - the developer experience. It also contains a module called the Page Manager - whose job is to manage pages. In particular it manages panel pages, but as + 'description' => "This suite is primarily a set of APIs and tools to improve + the developer experience. It also contains a module called the Page Manager + whose job is to manage pages. In particular it manages panel pages, but as it grows it will be able to manage far more than just Panels.", 'drupal_versions' => array(6, 7), 'categories' => array(), @@ -212,16 +212,16 @@ function project_browser_test_projects() { 'rating' => '7.6', 'dependencies' => array(), ); - + $projects['ctools'] = array( 'type' => 'module', 'title' => 'Chaos Tool Suite', 'name' => 'ctools', 'drupal version' => 7, 'author' => 'merlinofchaos', - 'description' => "This suite is primarily a set of APIs and tools to improve - the developer experience. It also contains a module called the Page Manager - whose job is to manage pages. In particular it manages panel pages, but as + 'description' => "This suite is primarily a set of APIs and tools to improve + the developer experience. It also contains a module called the Page Manager + whose job is to manage pages. In particular it manages panel pages, but as it grows it will be able to manage far more than just Panels.", 'drupal_versions' => array(6, 7), 'categories' => array(), @@ -235,15 +235,15 @@ function project_browser_test_projects() { 'rating' => '7.6', 'dependencies' => array(), ); - + $projects['token'] = array( 'type' => 'module', 'title' => 'Token', 'name' => 'token', 'drupal version' => 7, 'author' => 'eaton', - 'description' => "Tokens are small bits of text that can be placed into larger - documents via simple placeholders, like %site-name or [user]. The Token module + 'description' => "Tokens are small bits of text that can be placed into larger + documents via simple placeholders, like %site-name or [user]. The Token module provides a central API for modules to use these tokens, and expose their own token values.", 'categories' => array('admin'), 'image' => 'http://drupal.org/files/images/token_08.thumbnail.png', @@ -256,17 +256,17 @@ function project_browser_test_projects() { 'rating' => '8.1', 'dependencies' => array(), ); - + $projects['zen'] = array( 'type' => 'theme', 'title' => 'Zen', 'name' => 'zen', 'drupal version' => 7, 'author' => 'johnAlbin', - 'description' => "Zen is the ultimate starting theme for Drupal. If you are - building your own standards-compliant theme, you will find it much easier to - start with Zen than to start with Garland or Bluemarine. This theme has fantastic - online documentation and tons of code comments for both the PHP (template.php) + 'description' => "Zen is the ultimate starting theme for Drupal. If you are + building your own standards-compliant theme, you will find it much easier to + start with Zen than to start with Garland or Bluemarine. This theme has fantastic + online documentation and tons of code comments for both the PHP (template.php) and HTML (page.tpl.php, node.tpl.php).", 'categories' => array('light', 'dark'), 'image' => 'http://drupal.org/files/images/zen-logo.thumbnail.png', @@ -279,15 +279,15 @@ function project_browser_test_projects() { 'rating' => '7.1', 'dependencies' => array(), ); - + $projects['acquia_marina'] = array( 'type' => 'theme', 'title' => 'Acquia Marina', 'name' => 'acquia_marina', 'drupal version' => 7, 'author' => 'stephthegeek', - 'description' => "The Fusion base theme and Skinr are required. Skinr for Drupal 7 - (dev release) is usable now but it is recommended that you proceed with caution + 'description' => "The Fusion base theme and Skinr are required. Skinr for Drupal 7 + (dev release) is usable now but it is recommended that you proceed with caution and do some of your own testing.", 'categories' => array('light'), 'image' => 'http://drupal.org/files/images/acquia_marina.thumbnail.png', @@ -302,16 +302,16 @@ function project_browser_test_projects() { 'fusion' ), ); - + $projects['fusion'] = array( 'type' => 'theme', 'title' => 'Fusion', 'name' => 'fusion', 'drupal version' => 7, 'author' => 'stephthegeek', - 'description' => "Fusion is a powerful base theme, with layout and style configuration - options built in that you can control through Drupal's UI. It's based on a simplified - 960px or fluid 12/16-column grid. It's designed to be used with the Skinr module, + 'description' => "Fusion is a powerful base theme, with layout and style configuration + options built in that you can control through Drupal's UI. It's based on a simplified + 960px or fluid 12/16-column grid. It's designed to be used with the Skinr module, with numerous useful block styles included.", 'categories' => array('light'), 'image' => 'http://drupal.org/files/images/fusion-powering-small-banner.thumbnail.png', @@ -324,6 +324,6 @@ function project_browser_test_projects() { 'rating' => '', 'dependencies' => array(), ); - + return $projects; } diff --git a/core/modules/project_browser/theme/project-browser-block.tpl.php b/core/modules/project_browser/theme/project-browser-block.tpl.php index dc11389..657dd57 100644 --- a/core/modules/project_browser/theme/project-browser-block.tpl.php +++ b/core/modules/project_browser/theme/project-browser-block.tpl.php @@ -7,7 +7,7 @@ * - $title: The title of the block * - $content: The content of the block * These are defined in project_browser_preprocess_project_browser_block() - * + * * @see project_browser_preprocess_project_browser_block() */ ?> diff --git a/core/modules/project_browser/theme/project-browser-install-queue.tpl.php b/core/modules/project_browser/theme/project-browser-install-queue.tpl.php index 81e018c..a58d45e 100644 --- a/core/modules/project_browser/theme/project-browser-install-queue.tpl.php +++ b/core/modules/project_browser/theme/project-browser-install-queue.tpl.php @@ -1,13 +1,13 @@ - diff --git a/core/modules/project_browser/theme/project-browser-install.tpl.php b/core/modules/project_browser/theme/project-browser-install.tpl.php index fb7771b..f296322 100644 --- a/core/modules/project_browser/theme/project-browser-install.tpl.php +++ b/core/modules/project_browser/theme/project-browser-install.tpl.php @@ -1,14 +1,14 @@ - diff --git a/core/modules/project_browser/theme/project-browser-list.tpl.php b/core/modules/project_browser/theme/project-browser-list.tpl.php index 6468dbd..5afe7dc 100644 --- a/core/modules/project_browser/theme/project-browser-list.tpl.php +++ b/core/modules/project_browser/theme/project-browser-list.tpl.php @@ -1,15 +1,15 @@ @@ -22,5 +22,5 @@ - + diff --git a/core/modules/project_browser/theme/project-browser-project.tpl.php b/core/modules/project_browser/theme/project-browser-project.tpl.php index 5fd82fc..ac23175 100644 --- a/core/modules/project_browser/theme/project-browser-project.tpl.php +++ b/core/modules/project_browser/theme/project-browser-project.tpl.php @@ -1,9 +1,9 @@ -
@@ -28,29 +28,29 @@
- +
- +
- +
- +
- +
- +
diff --git a/core/modules/project_browser/theme/project_browser.admin.inc b/core/modules/project_browser/theme/project_browser.admin.inc index 831b050..1be6fad 100644 --- a/core/modules/project_browser/theme/project_browser.admin.inc +++ b/core/modules/project_browser/theme/project_browser.admin.inc @@ -22,8 +22,8 @@ function project_browser_admin() { '#type' => 'textarea', '#title' => t('Repositories'), '#default_value' => variable_get('project_browser_servers', ''), - '#description' => t("Add new repositories to use for the Project Browser, one per line, in - the 'url|method|Site Name' format. Drupal.org is added by default, and doesn't need to be + '#description' => t("Add new repositories to use for the Project Browser, one per line, in + the 'url|method|Site Name' format. Drupal.org is added by default, and doesn't need to be set here."), '#required' => FALSE, );