gruffen commited on 2011-05-26 15:20:37
Showing 17 changed files, with 22 additions and 34 deletions.
... | ... |
@@ -44,7 +44,7 @@ |
44 | 44 |
<add><![CDATA[ // SimpleDesk sections. Added here after the initial cleaning is done, so that we can do our own permission checks without arguing with SMF's system (so much) |
45 | 45 |
if (!empty($modSettings['helpdesk_active'])) |
46 | 46 |
{ |
47 |
- shd_load_language('SimpleDeskProfile'); |
|
47 |
+ shd_load_language('sd_language/SimpleDeskProfile'); |
|
48 | 48 |
|
49 | 49 |
// Put it here so we can reuse it for the left menu a bit |
50 | 50 |
$context['helpdesk_menu'] = array( |
... | ... |
@@ -206,7 +206,7 @@ |
206 | 206 |
<file name="$sourcedir/Who.php"><!-- load the who's online strings... we don't use it much now, but maybe later... --> |
207 | 207 |
<operation> |
208 | 208 |
<search position="after"><![CDATA[// Actions that require a specific permission level.]]></search> |
209 |
- <add><![CDATA[ shd_load_language('SimpleDeskWho'); |
|
209 |
+ <add><![CDATA[ shd_load_language('sd_language/SimpleDeskWho'); |
|
210 | 210 |
shd_load_plugin_langfiles('who'); |
211 | 211 |
|
212 | 212 |
]]></add> |
... | ... |
@@ -21,13 +21,7 @@ |
21 | 21 |
<modification format="xml" type="file">install-xml/install-packages.xml</modification> |
22 | 22 |
|
23 | 23 |
<!-- language files --> |
24 |
- <require-file name="language-php/SimpleDesk.english.php" destination="$languagedir" /> |
|
25 |
- <require-file name="language-php/SimpleDeskPermissions.english.php" destination="$languagedir" /> |
|
26 |
- <require-file name="language-php/SimpleDeskLogAction.english.php" destination="$languagedir" /> |
|
27 |
- <require-file name="language-php/SimpleDeskAdmin.english.php" destination="$languagedir" /> |
|
28 |
- <require-file name="language-php/SimpleDeskWho.english.php" destination="$languagedir" /> |
|
29 |
- <require-file name="language-php/SimpleDeskNotifications.english.php" destination="$languagedir" /> |
|
30 |
- <require-file name="language-php/SimpleDeskProfile.english.php" destination="$languagedir" /> |
|
24 |
+ <require-dir name="sd_language" destination="$themes_dir/default/languages" /> |
|
31 | 25 |
|
32 | 26 |
<!-- sources --> |
33 | 27 |
<require-dir name="sd_source" destination="$sourcedir" /> |
... | ... |
@@ -73,13 +67,7 @@ |
73 | 67 |
<modification format="xml" type="file" reverse="true">install-xml/install-packages.xml</modification> |
74 | 68 |
|
75 | 69 |
<!-- language files, removed --> |
76 |
- <remove-file name="$languagedir/SimpleDesk.english.php" /> |
|
77 |
- <remove-file name="$languagedir/SimpleDeskPermissions.english.php" /> |
|
78 |
- <remove-file name="$languagedir/SimpleDeskLogAction.english.php" /> |
|
79 |
- <remove-file name="$languagedir/SimpleDeskAdmin.english.php" /> |
|
80 |
- <remove-file name="$languagedir/SimpleDeskWho.english.php" /> |
|
81 |
- <remove-file name="$languagedir/SimpleDeskNotifications.english.php" /> |
|
82 |
- <remove-file name="$languagedir/SimpleDeskProfile.english.php" /> |
|
70 |
+ <remove-dir name="$themes_dir/default/languages/sd_language" /> |
|
83 | 71 |
|
84 | 72 |
<!-- source files, removed --> |
85 | 73 |
<remove-dir name="$sourcedir/sd_source" /> |
... | ... |
@@ -39,7 +39,7 @@ function shd_admin_main() |
39 | 39 |
global $context, $scripturl, $sourcedir, $settings, $txt, $modSettings, $scripturl; |
40 | 40 |
|
41 | 41 |
shd_init(); |
42 |
- shd_load_language('SimpleDeskAdmin'); |
|
42 |
+ shd_load_language('sd_language/SimpleDeskAdmin'); |
|
43 | 43 |
|
44 | 44 |
// Kick them in the kneecaps! |
45 | 45 |
if (!shd_allowed_to('admin_helpdesk', 0)) |
... | ... |
@@ -704,7 +704,7 @@ function shd_admin_action_log() |
704 | 704 |
{ |
705 | 705 |
global $context, $settings, $scripturl, $txt, $sourcedir, $smcFunc, $sort_types; |
706 | 706 |
|
707 |
- shd_load_language('SimpleDeskLogAction'); |
|
707 |
+ shd_load_language('sd_language/SimpleDeskLogAction'); |
|
708 | 708 |
|
709 | 709 |
$context['can_delete'] = allowedTo('admin_forum'); |
710 | 710 |
|
... | ... |
@@ -233,7 +233,7 @@ function shd_admin_edit_dept() |
233 | 233 |
{ |
234 | 234 |
global $context, $txt, $smcFunc, $scripturl; |
235 | 235 |
|
236 |
- shd_load_language('SimpleDeskPermissions'); |
|
236 |
+ shd_load_language('sd_language/SimpleDeskPermissions'); |
|
237 | 237 |
|
238 | 238 |
$_REQUEST['dept'] = isset($_REQUEST['dept']) ? (int) $_REQUEST['dept'] : 0; |
239 | 239 |
|
... | ... |
@@ -37,7 +37,7 @@ function shd_admin_permissions() |
37 | 37 |
|
38 | 38 |
shd_load_all_permission_sets(); |
39 | 39 |
loadTemplate('sd_template/SimpleDesk-AdminPermissions'); |
40 |
- shd_load_language('SimpleDeskPermissions'); |
|
40 |
+ shd_load_language('sd_language/SimpleDeskPermissions'); |
|
41 | 41 |
|
42 | 42 |
$subactions = array( |
43 | 43 |
'main' => 'shd_admin_role_list', |
... | ... |
@@ -344,7 +344,7 @@ function shd_notify_users($notify_data) |
344 | 344 |
); |
345 | 345 |
foreach ($notify_lang as $this_lang => $lang_members) |
346 | 346 |
{ |
347 |
- shd_load_language('SimpleDeskNotifications', $this_lang); |
|
347 |
+ shd_load_language('sd_language/SimpleDeskNotifications', $this_lang); |
|
348 | 348 |
|
349 | 349 |
foreach ($lang_members as $member) |
350 | 350 |
{ |
... | ... |
@@ -448,9 +448,9 @@ function shd_notify_popup() |
448 | 448 |
|
449 | 449 |
// We're reusing the Help template, need its language file. |
450 | 450 |
loadLanguage('Help'); |
451 |
- shd_load_language('SimpleDeskAdmin'); |
|
452 |
- shd_load_language('SimpleDeskLogAction'); |
|
453 |
- shd_load_language('SimpleDeskNotifications'); |
|
451 |
+ shd_load_language('sd_language/SimpleDeskAdmin'); |
|
452 |
+ shd_load_language('sd_language/SimpleDeskLogAction'); |
|
453 |
+ shd_load_language('sd_language/SimpleDeskNotifications'); |
|
454 | 454 |
|
455 | 455 |
// Set the page up |
456 | 456 |
loadTemplate('Help'); |
... | ... |
@@ -34,7 +34,7 @@ function shd_profile_main($memID) |
34 | 34 |
|
35 | 35 |
// Load the profile details |
36 | 36 |
loadTemplate('sd_template/SimpleDesk-Profile', array('helpdesk', 'helpdesk_admin')); |
37 |
- shd_load_language('SimpleDeskProfile'); |
|
37 |
+ shd_load_language('sd_language/SimpleDeskProfile'); |
|
38 | 38 |
$context['shd_preferences'] = shd_load_user_prefs(); |
39 | 39 |
shd_load_plugin_files('hdprofile'); |
40 | 40 |
shd_load_plugin_langfiles('hdprofile'); |
... | ... |
@@ -540,7 +540,7 @@ function shd_profile_permissions($memID) |
540 | 540 |
{ |
541 | 541 |
global $context, $txt, $scripturl, $sourcedir, $user_info, $smcFunc, $user_profile, $settings; |
542 | 542 |
|
543 |
- shd_load_language('SimpleDeskPermissions'); |
|
543 |
+ shd_load_language('sd_language/SimpleDeskPermissions'); |
|
544 | 544 |
|
545 | 545 |
$context['page_title'] = $txt['shd_profile_area'] . ' - ' . $txt['shd_profile_permissions']; |
546 | 546 |
$context['sub_template'] = 'shd_profile_permissions'; |
... | ... |
@@ -686,7 +686,7 @@ function shd_profile_actionlog($memID) |
686 | 686 |
global $context, $txt, $scripturl, $sourcedir, $user_info, $settings; |
687 | 687 |
|
688 | 688 |
loadTemplate('sd_template/SimpleDesk-Profile'); |
689 |
- shd_load_language('SimpleDeskProfile'); |
|
689 |
+ shd_load_language('sd_language/SimpleDeskProfile'); |
|
690 | 690 |
|
691 | 691 |
require_once($sourcedir . '/sd_source/Subs-SimpleDeskAdmin.php'); |
692 | 692 |
$context['action_log'] = shd_load_action_log_entries(0, 10, '', '', 'la.id_member = ' . $memID); |
... | ... |
@@ -142,7 +142,7 @@ function shd_tickettotopic() |
142 | 142 |
fatal_lang_error('shd_moveticket_noboards', false); |
143 | 143 |
|
144 | 144 |
// OK, now we got to check for custom fields. In any case, we need to fetch the list of fields that might be applicable to this ticket. |
145 |
- shd_load_language('SimpleDeskAdmin'); |
|
145 |
+ shd_load_language('sd_language/SimpleDeskAdmin'); |
|
146 | 146 |
$context['field_types'] = array( |
147 | 147 |
CFIELD_TYPE_TEXT => array($txt['shd_admin_custom_fields_ui_text'], 'text'), |
148 | 148 |
CFIELD_TYPE_LARGETEXT => array($txt['shd_admin_custom_fields_ui_largetext'], 'largetext'), |
... | ... |
@@ -104,7 +104,7 @@ function shd_init() |
104 | 104 |
define('ROLEPERM_DENY', 2); |
105 | 105 |
|
106 | 106 |
// Load some stuff |
107 |
- shd_load_language('SimpleDesk'); |
|
107 |
+ shd_load_language('sd_language/SimpleDesk'); |
|
108 | 108 |
require($sourcedir . '/sd_source/Subs-SimpleDeskPermissions.php'); |
109 | 109 |
|
110 | 110 |
// Set up defaults |
... | ... |
@@ -1562,7 +1562,7 @@ function shd_init_actions(&$actionArray) |
1562 | 1562 |
|
1563 | 1563 |
// If we're going to a help page (for admin), make sure to load the relevant text. |
1564 | 1564 |
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'helpadmin') |
1565 |
- shd_load_language('SimpleDeskAdmin'); |
|
1565 |
+ shd_load_language('sd_language/SimpleDeskAdmin'); |
|
1566 | 1566 |
|
1567 | 1567 |
// Now engage any SD specific hooks. |
1568 | 1568 |
call_integration_hook('shd_hook_actions', array(&$actionArray)); |
... | ... |
@@ -69,9 +69,9 @@ function shd_load_action_log_entries($start = 0, $items_per_page = 10, $sort = ' |
69 | 69 |
global $smcFunc, $txt, $scripturl, $context, $user_info, $user_profile; |
70 | 70 |
|
71 | 71 |
// Load languages incase they aren't there (Read: ticket-specific logs) |
72 |
- shd_load_language('SimpleDeskAdmin'); |
|
73 |
- shd_load_language('SimpleDeskLogAction'); |
|
74 |
- shd_load_language('SimpleDeskNotifications'); |
|
72 |
+ shd_load_language('sd_language/SimpleDeskAdmin'); |
|
73 |
+ shd_load_language('sd_language/SimpleDeskLogAction'); |
|
74 |
+ shd_load_language('sd_language/SimpleDeskNotifications'); |
|
75 | 75 |
|
76 | 76 |
$loaded_users = array(); |
77 | 77 |
|
... | ... |
@@ -362,7 +362,7 @@ function shd_admin_bootstrap(&$admin_areas) |
362 | 362 |
|
363 | 363 |
// Load the main admin language files and any needed for SD plugins in the admin panel. |
364 | 364 |
require_once($sourcedir . '/sd_source/SimpleDesk-Admin.php'); |
365 |
- shd_load_language('SimpleDeskAdmin'); |
|
365 |
+ shd_load_language('sd_language/SimpleDeskAdmin'); |
|
366 | 366 |
shd_load_plugin_files('hdadmin'); |
367 | 367 |
shd_load_plugin_langfiles('hdadmin'); |
368 | 368 |
|
369 | 369 |