pmpapi_update.module in Public Media Platform API Integration 7
File
pmpapi_update/pmpapi_update.module
View source
<?php
function pmpapi_update_boot() {
if (arg(0) == 'pmpapi_notifications') {
$GLOBALS['conf']['cache'] = FALSE;
}
}
function pmpapi_update_permission() {
return array(
'administer PMP update' => array(
'title' => t('Administer updates from the PMP API'),
'description' => t('Perform administration tasks for updates from the PMP API.'),
),
);
}
function pmpapi_update_menu() {
$items['admin/config/services/pmp/updates'] = array(
'title' => 'Updates',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'pmpapi_update_config_form',
),
'access callback' => TRUE,
'file' => 'pmpapi_update.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['pmpapi_notifications'] = array(
'page callback' => 'pmpapi_update_process_notification',
'access arguments' => array(
'access content',
),
'file' => 'pmpapi_update.pages.inc',
'type' => MENU_CALLBACK,
);
return $items;
}
function pmpapi_update_get_topic_uri($topic) {
return variable_get('pmpapi_base_url') . '/notifications/topics/' . $topic;
}