@@ -28,47 +28,47 @@ discard block |
||
28 | 28 | * with defined URL paths |
29 | 29 | */ |
30 | 30 | function boinctranslate_menu() { |
31 | - $items['admin/boinc/translation'] = array( |
|
32 | - 'title' => 'Environment: Translation', |
|
33 | - 'description' => 'Configure URLs for translation files (i.e. integration |
|
31 | +$items['admin/boinc/translation'] = array( |
|
32 | +'title' => 'Environment: Translation', |
|
33 | +'description' => 'Configure URLs for translation files (i.e. integration |
|
34 | 34 | with BOINC Translation Services).', |
35 | - 'page callback' => 'drupal_get_form', |
|
36 | - 'page arguments' => array('boinctranslate_admin_settings'), |
|
37 | - 'access arguments' => array('administer site configuration'), |
|
38 | - 'type' => MENU_NORMAL_ITEM, |
|
39 | - 'file' => 'boinctranslate.admin.inc' |
|
40 | - ); |
|
41 | - $items['admin/boinc/translation/export'] = array( |
|
42 | - 'title' => 'Export translations', |
|
43 | - 'page callback' => 'boinctranslate_export_translations', |
|
44 | - 'access arguments' => array('administer site configuration'), |
|
45 | - 'type' => MENU_CALLBACK, |
|
46 | - ); |
|
47 | - $items['admin/boinc/translation/import'] = array( |
|
48 | - 'title' => 'Import translations', |
|
49 | - 'page callback' => 'boinctranslate_refresh_translations', |
|
50 | - 'access arguments' => array('administer site configuration'), |
|
51 | - 'type' => MENU_CALLBACK, |
|
52 | - ); |
|
53 | - $items['admin/boinc/translation/initialize-languages'] = array( |
|
54 | - 'title' => 'Install official BOINC languages', |
|
55 | - 'page callback' => 'boinctranslate_initialize_languages', |
|
56 | - 'access arguments' => array('administer site configuration'), |
|
57 | - 'type' => MENU_CALLBACK, |
|
58 | - ); |
|
59 | - $items['admin/boinc/translation/update-official-boinc'] = array( |
|
60 | - 'title' => 'Update official BOINC translations', |
|
61 | - 'page callback' => 'boinctranslate_update_official_boinc_translations', |
|
62 | - 'access arguments' => array('update official BOINC translations'), |
|
63 | - 'type' => MENU_CALLBACK, |
|
64 | - ); |
|
65 | - $items['admin/boinc/translation/download-pot'] = array( |
|
66 | - 'title' => 'Download translation template', |
|
67 | - 'page callback' => 'boinctranslate_download_pot', |
|
68 | - 'access arguments' => array('administer site configuration'), |
|
69 | - 'type' => MENU_CALLBACK, |
|
70 | - ); |
|
71 | - return $items; |
|
35 | +'page callback' => 'drupal_get_form', |
|
36 | +'page arguments' => array('boinctranslate_admin_settings'), |
|
37 | +'access arguments' => array('administer site configuration'), |
|
38 | +'type' => MENU_NORMAL_ITEM, |
|
39 | +'file' => 'boinctranslate.admin.inc' |
|
40 | +); |
|
41 | +$items['admin/boinc/translation/export'] = array( |
|
42 | +'title' => 'Export translations', |
|
43 | +'page callback' => 'boinctranslate_export_translations', |
|
44 | +'access arguments' => array('administer site configuration'), |
|
45 | +'type' => MENU_CALLBACK, |
|
46 | +); |
|
47 | +$items['admin/boinc/translation/import'] = array( |
|
48 | +'title' => 'Import translations', |
|
49 | +'page callback' => 'boinctranslate_refresh_translations', |
|
50 | +'access arguments' => array('administer site configuration'), |
|
51 | +'type' => MENU_CALLBACK, |
|
52 | +); |
|
53 | +$items['admin/boinc/translation/initialize-languages'] = array( |
|
54 | +'title' => 'Install official BOINC languages', |
|
55 | +'page callback' => 'boinctranslate_initialize_languages', |
|
56 | +'access arguments' => array('administer site configuration'), |
|
57 | +'type' => MENU_CALLBACK, |
|
58 | +); |
|
59 | +$items['admin/boinc/translation/update-official-boinc'] = array( |
|
60 | +'title' => 'Update official BOINC translations', |
|
61 | +'page callback' => 'boinctranslate_update_official_boinc_translations', |
|
62 | +'access arguments' => array('update official BOINC translations'), |
|
63 | +'type' => MENU_CALLBACK, |
|
64 | +); |
|
65 | +$items['admin/boinc/translation/download-pot'] = array( |
|
66 | +'title' => 'Download translation template', |
|
67 | +'page callback' => 'boinctranslate_download_pot', |
|
68 | +'access arguments' => array('administer site configuration'), |
|
69 | +'type' => MENU_CALLBACK, |
|
70 | +); |
|
71 | +return $items; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -76,19 +76,19 @@ discard block |
||
76 | 76 | * Obsolete in Drupal 7... |
77 | 77 | */ |
78 | 78 | function boinctranslate_nodeapi(&$node, $op, $a3 = null, $a4 = null) { |
79 | - // In Drupal 7, these operation cases will all exist as their own hooks, |
|
80 | - // so let's approximate that here so that this function can simply be removed |
|
81 | - // upon migration to 7 |
|
82 | - switch($op) { |
|
83 | - case 'update': |
|
84 | - boinctranslate_node_update($node); |
|
85 | - break; |
|
86 | - case 'view': |
|
87 | - global $language; |
|
88 | - boinctranslate_node_view($node, 'full', $language->language); |
|
89 | - break; |
|
90 | - default: |
|
91 | - } |
|
79 | +// In Drupal 7, these operation cases will all exist as their own hooks, |
|
80 | +// so let's approximate that here so that this function can simply be removed |
|
81 | +// upon migration to 7 |
|
82 | +switch($op) { |
|
83 | +case 'update': |
|
84 | +boinctranslate_node_update($node); |
|
85 | +break; |
|
86 | +case 'view': |
|
87 | +global $language; |
|
88 | +boinctranslate_node_view($node, 'full', $language->language); |
|
89 | +break; |
|
90 | +default: |
|
91 | +} |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |