-
Notifications
You must be signed in to change notification settings - Fork 0
/
SemanticLabEmailing.php
104 lines (82 loc) · 3.97 KB
/
SemanticLabEmailing.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
echo 'Not a valid entry point';
exit( 1 );
}
if ( !defined( 'SMW_VERSION' ) ) {
echo 'This extension requires Semantic MediaWiki to be installed.';
exit( 1 );
}
# Extension credits
$GLOBALS['wgExtensionCredits'][defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array(
'path' => __FILE__,
'name' => 'SemanticLabEmailing',
'author' => array(
'Toniher',
'Steren Giannini',
'Ryan Lane',
'[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]'
),
'version' => '1.6',
'url' => 'http://www.mediawiki.',
'descriptionmsg' => 'semanticlabemailing-desc',
);
#$GLOBALS['wgSemanticLabEmailingDebug'] = true;
$GLOBALS['wgSemanticLabEmailingDefaultEmail'] = "no-reply@crg.es";
$GLOBALS['wgSemanticLabEmailingDefaultName'] = "Proteomics Wiki";
$GLOBALS['wgSemanticLabEmailingUsersNoMail'] = array("WikiSysop");
$GLOBALS['wgSemanticLabEmailingPropsCheck'] = array(
"Request" =>
array ( "PR_Request_Status" ),
"Experiment" =>
array( "PR_Experiment_Status", "PR_Storage_Status", "PR_SH_DigestionType_Status", "PR_Quantitation_Status", "PR_OtherExp_Status", "PR_MW_Status", "PR_MRM_Status", "PR_LC_Status", "PR_Identification_Status", "PR_Exp_PTMenrichment_Status", "PR_Electrophoresis_Status", "PR_Depletion_Status", "PR_DataAnalysis_Status" ) );
$GLOBALS['wgSemanticLabEmailingPropsName'] = array(
"Request" => array( "Status" ),
"Experiment" => array("Experiment", "Sample Storage", "Digestion", "Quantitation", "Other experiment", "Molecular Weight Determination", "MRM", "Liquid Chromatography", "Identification", "PTM", "Electrophoresis", "Depletion", "Data Analysis" ) );
$GLOBALS['wgSemanticLabEmailingAssignedProp'] = array(
"Request" => "PR_Request_AssignedTo"
);
$GLOBALS['wgSemanticLabEmailingOwnerProp'] = array(
"Request" => "PR_Request_UserName"
);
$GLOBALS['wgSemanticLabEmailingReferenceProp'] = array(
"Experiment" => "Request_Reference"
);
$GLOBALS['wgSemanticLabEmailingVerboseProp'] = "Has_Verbose_Mailing";
$GLOBALS['wgSemanticLabEmailingExtensionProp'] = "PR_Request_WeekExtension";
$GLOBALS['wgSemanticLabEmailingDeliveryTimeProp'] = "PR_Request_ExpDelTime";
$GLOBALS['wgSemanticLabEmailingClosureProp'] = "Closure_date";
$GLOBALS['wgSemanticLabEmailingCreatePage'] = array(
"Satisfaction" => array(
"prefix" => "Satisfaction",
"template" => "MediaWiki:SemanticLabEmailing-Satisfaction",
"maxrevs" => 2,
"time" => 1296000, //Seconds to allow editing
"options" => array(
array( "name" => "General", "label" => array("Bad", "Good"), "value" => array(0, 1), "default" => 1 )
)
)
);
$GLOBALS['wgResourceModules']['ext.SemanticLabEmailingForm'] = array(
'localBasePath' => dirname( __FILE__ ),
'scripts' => array( 'js/specialForm.js' ),
'styles' => array('css/specialForm.css'),
'remoteExtPath' => 'SemanticLabEmailing'
);
// i18n
$GLOBALS['wgMessagesDirs']['SemanticLabEmailing'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['SemanticLabEmailing'] = dirname( __FILE__ ) . '/SemanticLabEmailing.i18n.php';
// Autoloading
$GLOBALS['wgAutoloadClasses']['SemanticLabEmailingMailer'] = dirname( __FILE__ ) . '/SemanticLabEmailing.classes.php';
$GLOBALS['wgAutoloadClasses']['SemanticLabEmailingPageCreator'] = dirname( __FILE__ ) . '/SemanticLabEmailing.pagecreator.classes.php';
$GLOBALS['wgAutoloadClasses']['ApiSemanticLabEmailing'] = __DIR__ . '/SemanticLabEmailing.api.php';
// Hooks
$GLOBALS['wgHooks']['ArticleSaveComplete'][] = 'SemanticLabEmailingMailer::mailUpdatedTask';
$GLOBALS['wgHooks']['ArticleSave'][] = 'SemanticLabEmailingMailer::findOldValues';
$GLOBALS['wgAPIModules']['semanticlabemailing'] = 'ApiSemanticLabEmailing';
// Special Page
$GLOBALS['wgAutoloadClasses']['SpecialSemanticLabEmailingFeedback'] = dirname( __FILE__ ) . '/SemanticLabEmailing.special.php';
# SpecialPage referencing
$GLOBALS['wgSpecialPages']['SemanticLabEmailingFeedback'] = 'SpecialSemanticLabEmailingFeedback';
# SpecialPage category
$GLOBALS['wgSpecialPageGroups']['SemanticLabEmailingFeedback'] = 'other';