Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
10 | 10 | |
11 | | -define('SF_VERSION','1.6'); |
| 11 | +define('SF_VERSION','1.7'); |
12 | 12 | |
13 | 13 | $wgExtensionCredits['specialpage'][]= array( |
14 | 14 | 'path' => __FILE__, |
— | — | @@ -34,6 +34,7 @@ |
35 | 35 | $wgHooks['UnknownAction'][] = 'SFFormEditTab::displayForm'; |
36 | 36 | $wgHooks['SkinTemplateTabs'][] = 'SFFormEditTab::displayTab'; |
37 | 37 | $wgHooks['smwInitProperties'][] = 'SFUtils::initProperties'; |
| 38 | +$wgHooks['AdminLinks'][] = 'sffAddToAdminLinks'; |
38 | 39 | |
39 | 40 | $wgAPIModules['sfautocomplete'] = 'SFAutocompleteAPI'; |
40 | 41 | |
— | — | @@ -68,6 +69,9 @@ |
69 | 70 | $wgSpecialPages['EditData'] = 'SFEditData'; |
70 | 71 | $wgAutoloadClasses['SFEditData'] = $sfgIP . '/specials/SF_EditData.php'; |
71 | 72 | $wgSpecialPageGroups['EditData'] = 'sf_group'; |
| 73 | +$wgSpecialPages['RunQuery'] = 'SFRunQuery'; |
| 74 | +$wgAutoloadClasses['SFRunQuery'] = $sfgIP . '/specials/SF_RunQuery.php'; |
| 75 | +$wgSpecialPageGroups['RunQuery'] = 'sf_group'; |
72 | 76 | $wgSpecialPages['UploadWindow'] = 'SFUploadWindow'; |
73 | 77 | $wgAutoloadClasses['SFUploadWindow'] = $sfgIP . '/specials/SF_UploadWindow.php'; |
74 | 78 | |
— | — | @@ -203,3 +207,24 @@ |
204 | 208 | $sfgLang = new $sfLangClass(); |
205 | 209 | } |
206 | 210 | } |
| 211 | + |
| 212 | +function sffAddToAdminLinks(&$admin_links_tree) { |
| 213 | + $data_structure_section = $admin_links_tree->getSection('Data structure'); |
| 214 | + if (is_null($data_structure_section)) |
| 215 | + return true; |
| 216 | + $smw_row = $data_structure_section->getRow('smw'); |
| 217 | + $smw_row->addItem(ALItem::newFromSpecialPage('Templates'), 'Properties'); |
| 218 | + $smw_row->addItem(ALItem::newFromSpecialPage('Forms'), 'SemanticStatistics'); |
| 219 | + $smw_admin_row = $data_structure_section->getRow('smw_admin'); |
| 220 | + $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateClass'), 'SMWAdmin'); |
| 221 | + $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateProperty'), 'SMWAdmin'); |
| 222 | + $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateTemplate'), 'SMWAdmin'); |
| 223 | + $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateForm'), 'SMWAdmin'); |
| 224 | + $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateCategory'), 'SMWAdmin'); |
| 225 | + $smw_docu_row = $data_structure_section->getRow('smw_docu'); |
| 226 | + $sf_name = wfMsg('specialpages-group-sf_group'); |
| 227 | + $sf_docu_label = wfMsg('adminlinks_documentation', $sf_name); |
| 228 | + $smw_docu_row->addItem(AlItem::newFromExternalLink("http://www.mediawiki.org/wiki/Extension:Semantic_Forms", $sf_docu_label)); |
| 229 | + |
| 230 | + return true; |
| 231 | +} |