Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fb07ca077b
Fetching contributors…

Cannot retrieve contributors at this time

747 lines (662 sloc) 25.901 kb
<?php
/**
* @file
*/
/**
* Constants
*/
define('ISLANDORA_SCHOLAR_JOURNAL_FORM_NAME', 'Islandora Scholar Journal Form');
define('ISLANDORA_SCHOLAR_THESIS_FORM_NAME', 'Islandora Scholar Thesis Form');
define('MENU_SCHOLAR_HOME', 'scholar');
define('MENU_SCHOLAR_ADVANCED_SEARCH_ADD_FIELD', 'scholar/search/advanced/field/add');
define('MENU_SCHOLAR_ADVANCED_SEARCH_REMOVE_FIELD', 'scholar/search/advanced/field/remove');
define('THEME_SCHOLAR_HOME', 'scholar_home');
define('THEME_SCHOLAR_SEARCH_ITEM', 'scholar_search_item');
define('THEME_SCHOLAR_SEARCH_TABLE', 'scholar_search_results_table');
define('THEME_SCHOLAR_OVERVIEW_PANEL_CITATION', 'scholar_overview_panel_citation');
module_load_include('php', 'scholar', 'IrClass');
function scholar_custom_search($type, $query, $showForm=1, $orderBy=0, &$userArray=NULL) {
module_load_include('php', 'scholar', 'IRSearchClass');
$searchClass = new IRSearchClass();
return $searchClass->quickSearch($type, $query, $showForm, $orderBy, $userArray);
}
function scholar_edit_refworks($pid) {
return drupal_get_form('scholar_edit_refworks_form', $pid);
}
function scholar_edit_refworks_form($form_state, $pid) {
$edit_refworks_form = new IrClass();
return $edit_refworks_form->buildRefworksEditForm($pid);
}
function scholar_edit_refworks_form_submit($form, &$form_state) {
$irClass = new IrClass();
$form_state['redirect'] = $irClass->updateRefworksMetaData($form_state['values']);
}
function scholar_advanced_search() {
return drupal_get_form('scholar_advanced_search_form');
}
function theme_scholar_advanced_search_form($form) {
$advanced_search_form = new IrClass();
return $advanced_search_form->theme_advanced_search_form($form);
}
function scholar_advanced_search_form_submit($form, &$form_state) {
$advanced_search_form = new IrClass();
return $advanced_search_form->process_advanced_search_form($form_state['values']);
}
function scholar_advanced_search_form() {
$advanced_search_form = new IrClass();
return $advanced_search_form->advanced_search_form();
}
function scholar_full_record($pid) {
$irClass = new IrClass();
$output = $irClass->show_full_record($pid);
return $output;
}
function scholar_by_name($type, $query) {
$irClass = new IrClass();
$user = $irClass->get_user_by_username($query);
$output = "<h4 align='center'>$user</h4>";
$output .= '<center><table class="table-form"><tr>' . drupal_get_form('scholar_browse_by_user_form') . '</tr></table></center>';
$output .= scholar_custom_search($type, $query, 0);
return $output;
}
function scholar_role($type, $query) {
$role = $query; //
$irClass = new IrClass();
//real bad hack to change home economics and ohters to something different (ldap groups are incorrect in ldap server so they say)
$department = $query;
if ('Home Economics' == $department) {
$department = 'Family and Nutritional Sciences';
}
elseif ('Anatomy Physiology' == $department) {
$department = 'Biomedical Sciences';
}
elseif ('Womens Studies' == $department) {
$department = "Women's Studies";
}
elseif ('Path Micro' == $department) {
$department = "Pathology and Microbiology";
}
elseif ('Soc Anth' == $department) {
$department = "Sociology and Anthropology";
}
$output = "<h4 align='center'>$department</h4>";
$usersArray = array();
$results = scholar_custom_search($type, $query, 0, 0, $usersArray);
$output .= '<center><table class="table-form"><tr>' . drupal_get_form('scholar_browse_by_user_form', $role, $usersArray) . '</tr></table></center>';
return $output . $results;
}
function scholar_quick_search_form() {
$quick_search_form = new IrClass();
return $quick_search_form->quick_search_form();
}
function scholar_add_ir_datastream_form($form_state, $pid) {
$datastream_form = new IrClass();
return $datastream_form->build_add_datastream_form($pid);
}
function scholar_add_ir_datastream_form_submit($form, &$form_state) {
$ir = new IrClass();
$ir->addStreamFormSubmit($form_state['values']['form_id'], $form_state['values']);
}
function scholar_quick_search_form_submit($form, &$form_state) {
$quick_search_form = new IrClass();
return $quick_search_form->quick_search_form_submit($form_state['values']);
}
function scholar_create_roles_for_users() {
$irClass = new IrClass();
$irClass->get_and_create_roles();
return 'created roles and associated users.';
}
/*
* defines the list of paths and hooks/callbacks for the scholar module
*/
function scholar_menu() {
$items = array();
$items[MENU_SCHOLAR_HOME] = array(
'title' => t('Advanced Search'),
'file' => 'pages/Home.inc',
'page callback' => 'scholar_home',
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
$items[MENU_SCHOLAR_ADVANCED_SEARCH_ADD_FIELD] = array(
'file' => 'SearchForm.inc',
'page callback' => 'scholar_search_advanced_add_field',
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items[MENU_SCHOLAR_ADVANCED_SEARCH_REMOVE_FIELD] = array(
'file' => 'SearchForm.inc',
'page callback' => 'scholar_search_advanced_remove_field',
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items['admin/settings/scholar'] = array(
'title' => t('Islandora Scholar Settings'),
'file' => 'scholar_admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_admin_settings'),
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
$items['add_users/%'] = array(
'title' => t('Add Users'),
'file' => 'Users.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_get_ldap_users_form', 1),
'access callback' => 'user_access',
'access arguments' => array('add users'),
'type' => MENU_NORMAL_ITEM,
);
$items['search_users'] = array(
'title' => t('Import Users'),
'file' => 'Users.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_ldap_users_search_form'),
'access callback' => 'user_access',
'access arguments' => array('add users'),
'type' => MENU_NORMAL_ITEM,
);
$items['browse_authors/%'] = array(
'title' => t('Browse Authors'),
'file' => 'BrowseByUserForm.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_browse_by_user_form', 1),
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
$items['browse_users_dept/%'] = array(
'title' => t('Browse Users by Dept'),
'file' => 'BrowseByUserForm.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_browse_by_user_dept_form', 1),
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items['browse_dept'] = array(
'title' => t('Browse Departments'),
'file' => 'BrowseByDeptForm.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_browse_by_dept_form'),
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
$items['islandora_autocomplete/%/%/%'] = array(
'title' => 'Auto Complete',
'description' => 'Islandora autocomplete',
'file' => 'autocomplete.inc',
'page callback' => 'islandora_autocomplete',
'page arguments' => array(1, 2, 3),
'access arguments' => array('view fedora collection'), // Use something fedora specific.
'type' => MENU_CALLBACK,
);
$items['islandora_autocomplete/%/%'] = array(
'title' => 'Auto Complete',
'description' => 'Islandora autocomplete',
'file' => 'autocomplete.inc',
'page callback' => 'islandora_autocomplete',
'page arguments' => array(1, 2),
'access arguments' => array('view fedora collection'), // Use something fedora specific.
'type' => MENU_CALLBACK,
);
$items['rss/%'] = array(
'title' => 'RSS feed',
'description' => 'RSS feed',
'file' => 'SearchForm.inc',
'page callback' => 'scholar_rss_feed',
'page arguments' => array(1),
'access arguments' => array('view fedora collection'), // Use something fedora specific.
'type' => MENU_CALLBACK,
);
$items['refworks_migrate'] = array(
'title' => 'Refworks migrate',
'description' => 'Migrate content from refworks',
'file' => 'scholar_migrate.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('scholar_migrate_refworks_form'),
'access callback' => 'user_access',
'access arguments' => array('migrate content'), // Use something fedora specific.
'type' => MENU_NORMAL_ITEM,
);
$items['refworks_entry/%'] = array(
'title' => 'Refworks entry',
'description' => 'Page to display refworks entry for a given pid',
'file' => 'refworks.inc',
'page callback' => 'scholar_refworks_add_form',
'page arguments' => array(1),
'access callback' => 'user_access',
'access arguments' => array('refworks entry'), // Use something fedora specific.
'type' => MENU_CALLBACK,
);
return $items;
}
// end function ir_menu
/**
* Implements hook_theme().
*/
function scholar_theme() {
return array(
THEME_SCHOLAR_HOME => array(
'template' => 'templates/Home',
'file' => 'pages/Home.inc',
),
THEME_SCHOLAR_SEARCH_ITEM => array(
'template' => 'templates/SearchItem',
'file' => 'IslandoraSolrResultsCitation.inc',
'arguments' => array('pid' => NULL, 'style' => NULL)
),
THEME_SCHOLAR_SEARCH_TABLE => array(
'file' => 'IslandoraSolrResultsCitation.inc',
'arguments' => array('element' => NULL)
),
);
}
/**
* Valid permissions for this module
* @return array An array of valid permissions for the IR module
*/
function scholar_perm() {
return array(
'view scholarly research',
'administer scholarly research',
'add users',
'migrate content',
'refworks entry',
'manage tracking',
);
}
function scholar_uninstall() {
return TRUE; // there isn't really anything to uninstall
}
// end function scholar_uninstall
function fedora_repository_scholar_settings_page() {
}
/**
* Function specifying all of the required objects and database
* entries for Fedora/Islandora
* @return type
*/
function scholar_required_fedora_objects() {
$module_path = drupal_get_path('module', 'scholar');
// Put the form in the database
module_load_include('inc', 'xml_form_builder', 'XMLFormDatabase');
if (!XMLFormDatabase::Exists(ISLANDORA_SCHOLAR_JOURNAL_FORM_NAME)) {
$definition = new DOMDocument();
$definition->load($module_path . '/forms/journal_article_form.xml');
XMLFormDatabase::Create(ISLANDORA_SCHOLAR_JOURNAL_FORM_NAME, $definition);
}
if (!XMLFormDatabase::Exists(ISLANDORA_SCHOLAR_THESIS_FORM_NAME)) {
$definition = new DOMDocument();
$definition->load($module_path . '/forms/thesis_form.xml');
XMLFormDatabase::Create(ISLANDORA_SCHOLAR_THESIS_FORM_NAME, $definition);
}
// Associates the form with the content model
$result = db_result(db_query('Select content_model from {islandora_content_model_forms} where content_model = "%s" and form_name = "%s"', 'ir:citationCModel', 'Islandora Scholar Journal Form'));
if (!$result) {
$object = new stdClass();
$object->content_model = 'ir:citationCModel';
$object->form_name = 'Islandora Scholar Journal Form';
$object->dsid = 'MODS';
$object->title_field = "['titleInfo']['title']";
$object->transform = 'mods_to_dc.xsl';
$result = drupal_write_record('islandora_content_model_forms', $object);
}
$result2 = db_result(db_query('Select content_model from {islandora_content_model_forms} where content_model = "%s" and form_name = "%s"', 'ir:researcherCModel', 'Islandora Scholar MADS Form'));
if (!$result2) {
$object2 = new stdClass();
$object2->content_model = 'ir:researcherCModel';
$object2->form_name = 'Islandora Scholar MADS Form';
$object2->dsid = 'MADS';
$object2->title_field = "['titleInfo']['title']";
$object2->transform = 'mads_to_dc.xsl';
$result2 = drupal_write_record('islandora_content_model_forms', $object2);
}
return array(
'scholar' => array(
'module' => 'scholar',
'title' => 'Islandora Scholar Module',
'objects' => array(
array(
'pid' => 'ir:top',
'label' => 'Institutional Repository',
'cmodel' => 'islandora:collectionCModel',
'parent' => variable_get('fedora_repository_pid', 'islandora:root'),
'datastreams' => array(
array(
'dsid' => 'TN',
'datastream_file' => "$module_path/images/Crystal_Clear_filesystem_folder_grey.png",
'mimetype' => 'image/png',
),
array(
'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/xml/COLLECTION-COLLECTION POLICY.xml",
),
),
),
array(
'pid' => 'ir:citationCModel',
'label' => 'Islandora Scholar Citation Content Model',
'dsid' => 'ISLANDORACM',
'datastream_file' => "$module_path/models/citationCModel.xml",
'cmodel' => 'fedora-system:ContentModel-3.0',
),
array(
'pid' => 'ir:thesisCModel',
'label' => 'Islandora Scholar Citation Content Model',
'dsid' => 'ISLANDORACM',
'datastream_file' => "$module_path/models/thesisCModel.xml",
'cmodel' => 'fedora-system:ContentModel-3.0',
),
array(
'pid' => 'ir:researcherCModel',
'label' => 'Islandora Scholar Authority Content Model',
'dsid' => 'ISLANDORACM',
'datastream_file' => "$module_path/models/researcherCModel.xml",
'cmodel' => 'fedora-system:ContentModel-3.0',
),
array(
'pid' => 'ir:departmentCModel',
'label' => 'Islandora Scholar Department Content Model',
'dsid' => 'ISLANDORACM',
'datastream_file' => "$module_path/models/departmentCModel.xml",
'cmodel' => 'fedora-system:ContentModel-3.0',
),
array(
'pid' => 'ir:citationCollection',
'label' => 'Citation Collection',
'cmodel' => 'islandora:collectionCModel',
'parent' => 'ir:top',
'datastreams' => array(
array(
'dsid' => 'TN',
'datastream_file' => "$module_path/images/Crystal_Clear_filesystem_folder_grey.png",
'mimetype' => 'image/png',
),
array(
'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/xml/CITATION-COLLECTION POLICY.xml",
),
),
),
array(
'pid' => 'ir:thesisCollection',
'label' => 'Thesis Collection',
'cmodel' => 'islandora:collectionCModel',
'parent' => 'ir:top',
'datastreams' => array(
array(
'dsid' => 'TN',
'datastream_file' => "$module_path/images/Crystal_Clear_filesystem_folder_grey.png",
'mimetype' => 'image/png',
),
array(
'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/xml/THESIS-COLLECTION POLICY.xml",
),
),
),
array(
'pid' => 'ir:authorityCollection',
'label' => 'IR Authority Collection',
'cmodel' => 'islandora:collectionCModel',
'parent' => 'ir:top',
'datastreams' => array(
array(
'dsid' => 'TN',
'datastream_file' => "$module_path/images/Crystal_Clear_filesystem_folder_grey.png",
'mimetype' => 'image/png',
),
array(
'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/xml/AUTHORITY-COLLECTION POLICY.xml",
),
),
),
),
),
);
}
function scholar_form_fedora_repository_ingest_form_alter(array &$form, array &$form_state) {
if ($form_state['storage']['step'] == 1 && isset($form['indicator'])) {
$models = array('ir:citationCModel/ISLANDORACM');
$show_bulk_ingest = FALSE;
foreach ($form['indicator']['models']['#options'] as $model => $label) {
if (array_search($model, $models) !== FALSE) {
$show_bulk_ingest = TRUE;
}
}
if ($show_bulk_ingest) {
$bulk_ingest = scholar_bulk_ingest_form($form_state, $form['collection_pid']['#value']);
// Move the next button within the field set to make it clearer.
$form['indicator']['submit'] = $form['submit'];
unset($form['submit']);
array_unshift($form, $bulk_ingest);
$form['#attributes'] = array('enctype' => 'multipart/form-data'); // Allow the uploading of files.
$form['#validate'] = array('scholar_bulk_ingest_form_validate');
}
}
}
/**
* Performs a bulk ingestion.
*
* This is not meant to be called from drupal_get_form,
* this is a sub-form that part of the content_model_viewer_ingest_metadata
*
* @param array $form_state
* The Drupal form state.
* @param string $collection_pid
* The pid of the collection we will ingest into.
*
* @return array
* The Drupal form.
*/
function scholar_bulk_ingest_form(array &$form_state, $collection_pid) {
$potential_models = scholar_bulk_ingest_get_potential_models($collection_pid);
reset($potential_models);
$identifier = key($potential_models);
$name = current($potential_models);
$selected_model = isset($form_state['values']['models']) ? $form_state['values']['models'] : $identifier;
$form = array(
'bulk_ingest' => array(
'#type' => 'fieldset',
'#title' => t('Ingest digital objects generated by RIS/EndNote into collection_pid Step #1', array('collection_pid' => $collection_pid)),
'file' => array(
'#type' => 'file',
'#title' => t('Upload "RIS" or "EndNote XML" Document'),
'#description' => t('A RIS or EndNote XML document that will generate multiple digital objects on ingest. One for each record within the RIS or EndNote XML document.'),
'#element_validate' => array('scholar_bulk_ingest_file_upload_validate'),
),
'content_model_pid' => array(
'#type' => 'select',
'#title' => t('Content models available'),
'#options' => $potential_models,
'#default_value' => $selected_model,
'#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br /> Additional information may be found <a href="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a> '),
),
'submit' => array(
'#type' => 'submit',
'#executes_submit_callback' => TRUE,
'#submit' => array('scholar_bulk_ingest_form_submit'),
'#value' => t('Ingest')
),
)
);
return $form;
}
/**
* Get Potential Models that can be part of the given collection.
*
* @param string $collection_pid
* The pid of the collection.
* @return array
* Where the key is the Content Model PID and the value is the human readable name for the Content Model.
*/
function scholar_bulk_ingest_get_potential_models($collection_pid) {
if (($collection_policy = CollectionPolicy::loadFromCollection($collection_pid)) === FALSE) {
drupal_set_message(t("Unable to load collection policy '@collection_pid'", array('@collection_pid' => $collection_pid)));
return FALSE;
}
if (!($content_models = $collection_policy->getContentModels())) {
drupal_set_message(t('No content models associated with this collection: @collection_pid. Please contact your administrator.', array('@collection_pid' => $collection_pid)), 'error');
return FALSE;
}
$potential_models = array();
foreach ($content_models as $content_model) {
$identifier = $content_model->getIdentifier();
$name = $content_model->name;
$potential_models["$identifier"] = "$name";
}
unset($potential_models['islandora:contentCModel']);
return $potential_models;
}
/**
* Over writes the default 'content_model_viewer_ingest_metadata_form_validate' function.
*
* @param array $form
* The Drupal form.
* @param array $form_state
* The Drupal form state.
*/
function scholar_bulk_ingest_form_validate(array &$form, array &$form_state) {
$bulk_ingest_clicked = $form_state['clicked_button']['#value'] == t('Ingest');
if (!$bulk_ingest_clicked) {
if ($form_state['storage']['step'] == 1) {
$form_state['storage']['step']++;
$form_state['rebuild'] = TRUE;
}
else {
module_load_include('inc', 'xml_form_api', 'XMLForm');
$xml_form = new XMLForm($form_state);
$xml_form->validate($form, $form_state);
}
}
}
/**
* Makes sure the file was uploaded and is of the right type.
*
* @param array $element
* The file upload field
* @param array $form_state
* The Drupal form state.
*/
function scholar_bulk_ingest_file_upload_validate(array $element, array &$form_state) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
$bulk_ingest_clicked = $form_state['clicked_button']['#value'] == t('Ingest');
$file_uploaded = isset($_FILES['files']['error']['file']) && $_FILES['files']['error']['file'] == 0;
if ($bulk_ingest_clicked) {
if (!$file_uploaded) {
form_error($element, t('You must upload a "RIS" or "EndNote XML" document.'));
}
else { // Only support for one file.
// $mime_type = $_FILES['files']['type']['file'];
$file = file_save_upload('file');
$filename = $file->filepath;
$mime = new MimeClass();
$mime_type = $mime->get_mimetype($filename);
$valid_types = array('text/xml', 'text/plain', 'application/x-research-info-systems');
if (array_search($mime_type, $valid_types) === FALSE) {
form_error($element, t('The upload file is not the correct type. You must upload a "RIS" or "EndNote XML" document.'));
}
}
}
}
/**
* Bulk Ingest object.
*
* @param array $form
* The Drupal form.
* @param array $form_state
* The Drupal form state.
*/
function scholar_bulk_ingest_form_submit(array &$form, array &$form_state) {
$collection_pid = $form_state['values']['collection_pid'];
$content_model_pid = ContentModel::getPidFromIdentifier($form_state['values']['content_model_pid']);
// $mime_type = $_FILES['files']['type']['file'];
$file = file_save_upload('file');
$filename = $file->filepath;
$mime = new MimeClass();
$mime_type = $mime->get_mimetype($filename);
$function = ($mime_type == 'text/xml') ? 'scholar_batch_ingest_endnote_document' : 'scholar_batch_ingest_ris_document';
$operations = array(
array($function, array($filename, $collection_pid, $content_model_pid))
);
$batch = array(
'title' => t('Ingesting Files'),
'operations' => $operations,
'file' => drupal_get_path('module', 'scholar') . '/Batch.inc',
);
batch_set($batch);
unset($form_state['storage']); // Return to the viewer.
}
/**
* Implementation of solr_primary_display hook to customise the results
* display.
* @return type
*/
function scholar_islandora_solr_primary_display() {
return array(
'scholar' => array(
'name' => t('Scholar'),
'module' => 'scholar',
'file' => 'SolrResultsScholar.inc',
'class' => "ScholarSolrResults",
'function' => "displayResultsScholar",
'description' => t("Results displayed for Islandscholar."),
)
);
}
function scholar_block($op = 'list', $delta = 0, $edit = array()) {
module_load_include('inc', 'scholar', 'scholar_blocks');
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Recently added items');
$blocks[0]['cache'] = BLOCK_NO_CACHE;
$blocks[1]['info'] = t('Total records added');
$blocks[1]['cache'] = BLOCK_NO_CACHE;
$blocks[2]['info'] = t('Total citation views');
$blocks[2]['cache'] = BLOCK_NO_CACHE;
$blocks[3]['info'] = t('Total full-text downloads');
$blocks[3]['cache'] = BLOCK_NO_CACHE;
$blocks[4]['info'] = t('Top viewed citations');
$blocks[4]['cache'] = BLOCK_NO_CACHE;
$blocks[5]['info'] = t('Random citation');
$blocks[5]['cache'] = BLOCK_NO_CACHE;
return $blocks;
case 'view':
if ($delta == 0) {
$block['subject'] = t('Recently added items');
$block['content'] = drupal_get_form('scholar_recent_items');
}
elseif ($delta == 1) {
$block['subject'] = t('Total records added');
$block['content'] = drupal_get_form('scholar_total_records');
}
elseif ($delta == 2) {
$block['subject'] = t('Total citation views');
$block['content'] = drupal_get_form('scholar_total_citation_views');
}
elseif ($delta == 3) {
$block['subject'] = t('Total full-text downloads');
$block['content'] = drupal_get_form('scholar_total_text_downloads');
}
elseif ($delta == 4) {
$block['subject'] = t('Top viewed citations');
$block['content'] = drupal_get_form('scholar_top_viewed');
}
elseif ($delta == 5) {
$block['subject'] = t('Random citation');
$block['content'] = drupal_get_form('scholar_random_citation');
}
return $block;
}
}
function scholar_cron() {
module_load_include('inc', 'scholar', 'scholar_cron');
scholar_cron_embargo_check();
}
Jump to Line
Something went wrong with that request. Please try again.