module_filter.pages.inc

  1. cis7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  2. cle7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  3. ecd7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  4. elmsmedia7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  5. harmony7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  6. icor7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  7. meedjum_blog7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc
  8. mooc7 sites/all/modules/ulmus/module_filter/module_filter.pages.inc

Functions

File

sites/all/modules/ulmus/module_filter/module_filter.pages.inc
View source
  1. <?php
  2. /**
  3. * Wrapper function for update_status().
  4. *
  5. * @see update_status().
  6. */
  7. function module_filter_update_status() {
  8. module_load_include('inc', 'update', 'update.report');
  9. $update_report = update_status();
  10. return array(
  11. 'module_filter' => drupal_get_form('module_filter_update_status_form'),
  12. 'update_report' => array(
  13. '#markup' => $update_report
  14. )
  15. );
  16. }
  17. function module_filter_update_status_form($form, &$form_state) {
  18. $form['module_filter'] = array(
  19. '#type' => 'module_filter',
  20. '#attached' => array(
  21. 'css' => array(
  22. drupal_get_path('module', 'module_filter') . '/css/update_status.css'
  23. ),
  24. 'js' => array(
  25. drupal_get_path('module', 'module_filter') . '/js/update_status.js'
  26. ),
  27. ),
  28. );
  29. $form['module_filter']['show'] = array(
  30. '#type' => 'radios',
  31. '#default_value' => (isset($_GET['show']) && in_array($_GET['show'], array('all', 'updates', 'security', 'unknown'))) ? $_GET['show'] : 'all',
  32. '#options' => array('all' => t('All'), 'updates' => t('Update available'), 'security' => t('Security update'), 'unknown' => t('Unknown')),
  33. '#prefix' => '<div id="module-filter-show-wrapper">',
  34. '#suffix' => '</div>'
  35. );
  36. if (module_exists('update_advanced')) {
  37. $options = $form['module_filter']['show']['#options'];
  38. $form['module_filter']['show']['#options'] = array_slice($options, 0, 2);
  39. $form['module_filter']['show']['#options']['ignore'] = t('Ignored from settings');
  40. $form['module_filter']['show']['#options'] = array_merge($form['module_filter']['show']['#options'], array_slice($options, 2));
  41. }
  42. return $form;
  43. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.