diff --git a/core/modules/project_browser/lib/Drupal/project_browser/Tests/ProjectBrowserTest.php b/core/modules/project_browser/lib/Drupal/project_browser/Tests/ProjectBrowserTest.php index 5c12fb7..9a4c855 100644 --- a/core/modules/project_browser/lib/Drupal/project_browser/Tests/ProjectBrowserTest.php +++ b/core/modules/project_browser/lib/Drupal/project_browser/Tests/ProjectBrowserTest.php @@ -22,7 +22,9 @@ class ProjectBrowserTest extends WebTestBase { public static $modules = array('project_browser', 'project_browser_test'); /** - * This is the user who will have access to use project browser. + * User who will have access to use project browser. + * + * @var \Drupal\user\Plugin\Core\Entity\User */ protected $privilegedUser; @@ -106,4 +108,5 @@ public function testProjectBrowserAddRemoveQueue() { $this->assertText('Install queue is empty.'); $this->assertNoText('Error: The project was not found.'); } + } diff --git a/core/modules/project_browser/project_browser.inc b/core/modules/project_browser/project_browser.inc index 790c9fa..195c2ac 100644 --- a/core/modules/project_browser/project_browser.inc +++ b/core/modules/project_browser/project_browser.inc @@ -154,9 +154,10 @@ function project_browser_get_sort_widget(array $sort_options, $current_sort_opti $classes[] = 'sort-inactive'; } $sort_list[] = array( - '#type' => 'links', + '#type' => 'link', '#title' => $sort_option['name'], '#href' => current_path(), + '#options' => array('query' => $query, 'class' => array()), '#wrapper_attributes' => array( 'class' => $classes, ), @@ -164,11 +165,11 @@ function project_browser_get_sort_widget(array $sort_options, $current_sort_opti } // @todo Should return a render array. - return theme('item_list', array( - 'items' => $sort_list, - 'type' => 'ul', - 'attributes' => array('class' => array('project-browser-sort-list')), - ) + return array( + '#theme' => 'item_list', + '#items' => $sort_list, + '#type' => 'ul', + '#attributes' => array('class' => array('project-browser-sort-list')), ); } @@ -216,6 +217,7 @@ function project_browser_get_server_widget(array $servers, $current_server) { '#type' => 'link', '#title' => $server['name'], '#href' => $current_path, + '#options' => array('query' => $query, 'class' => array()), '#wrapper_attributes' => array( 'class' => $classes, ), @@ -225,11 +227,11 @@ function project_browser_get_server_widget(array $servers, $current_server) { } // @todo Should return a render array. - return theme('item_list', array( - 'items' => $list, - 'type' => 'ul', - 'attributes' => array('class' => array('project-browser-servers-list')), - ) + return array( + '#theme' => 'item_list', + '#items' => $list, + '#type' => 'ul', + '#attributes' => array('class' => array('project-browser-servers-list')), ); } @@ -288,7 +290,6 @@ function project_browser_get_categories($type) { // Get which server to use from $_SESSION. $use_server = isset($_SESSION['project_browser_server_filter']) ? $_SESSION['project_browser_server_filter'] : 0; - } $categories_raw = project_browser_fetch_categories($type, $use_server);