This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
n.nid as nid | |
FROM node n | |
INNER JOIN content_field_revenue_unit_ref r ON r.nid = n.nid | |
INNER JOIN content_type_tax_reporting_units u ON u.nid = r.field_revenue_unit_ref_nid | |
LEFT JOIN content_type_tax_sales_report t ON n.nid = t.field_sales_revenue_ref_nid | |
AND t.field_sales_activity_month_value = 12 | |
AND t.field_sales_activity_year_value = 2012 | |
WHERE n.type = 'tax_revenue_source' | |
AND u.field_reporting_unit_status_value = 'A' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implemention of hook_nodeapi(). | |
*/ | |
function mcard_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { | |
if ($op == 'view') { | |
if ($node->type == 'discount_provider') { | |
$bc[] = l('Home', ''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Autocomplete ajax helper to retrieve autocomplete options from textual mcard | |
* discount search. | |
* | |
* @param $search | |
* User entered search string. | |
* | |
* @return | |
* JSON listing of autocomplete search options. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Field handler to provide simple renderer that calls function to record | |
* radioactivity of the node being viewed. | |
*/ | |
class mcard_handler_field_node_radioactivity extends views_handler_field_node { | |
function render($values) { | |
if (module_exists('radioactivity')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
discount search query: | |
SELECT DISTINCT n.nid, n.title, n.created, m.field_discount_long_description_value, x.expire, | |
p.title p_title, p.created, q.body, p.nid pnid, 1 target_count, (SELECT COUNT(t.nid) FROM {term_node} t WHERE t.nid = n.nid AND t.tid = %d) category_count | |
FROM {term_data} d INNER JOIN {term_node} t on t.tid = d.tid LEFT JOIN {node} n | |
on t.nid = n.nid INNER JOIN {content_type_mcard_discount} m on n.vid = m.vid INNER JOIN {node} p on | |
m.field_discount_provider_nid = p.nid INNER JOIN {node_revisions} q | |
on p.vid = q.vid INNER JOIN {node_expire} x on x.nid = n.nid WHERE (n.type = 'mcard_discount' AND n.status = 1 ) HAVING | |
target_count >= 1 AND category_count >= 1 ORDER BY p.title | |
Array | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ajax callback function for username autocomplete field. | |
* | |
* @param $name | |
* String, the portion of the autocomplete field already entered. | |
*/ | |
function _cosign_impersonate_username_autocomplete($name = '') { | |
$matches = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_rules_event_info(). | |
*/ | |
function lsadataclassify_rules_event_info() { | |
return array( | |
'lsadataclassify_submission_completed' => array( | |
'label' => t('A submission has been completed'), | |
'group' => t('Research Data'), | |
'module' => 'lsadataclassify', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_user(). | |
*/ | |
function gpxhacks_user($op, &$edit, &$account, $category = NULL) { | |
switch ($op) { | |
case 'load': | |
if ($account->login == 0) { | |
$account->redirect_after_login = 'user/' . $account->uid . '/edit'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param $form | |
* @param $form_state | |
*/ | |
function lsadataclassify_keyad_route_submit($form, &$form_state) { | |
global $base_url; | |
// For each pm checked | |
for ($i = 0; $i < $form_state['values']['num_compliance']; $i++){ | |
if ($form_state['values']['row-' . $i]['route'] == 1){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lsadataclassify_views_pre_view(&$view, &$display_id, &$args){ | |
if ($view->name === 'protection_measures' && $view->current_display === 'page'){ | |
} | |
} |
NewerOlder