@@ -43,24 +43,25 @@ protected function define_structure() {
43
43
44
44
$ paths = array ();
45
45
46
- $ userinfo = $ this ->get_setting_value ('userinfo ' ); // Is 0 //TODO is not used.
46
+ $ userinfo = $ this ->get_setting_value ('userinfo ' );
47
47
48
48
$ paths [] = new restore_path_element ('pdfannotator ' ,
49
49
'/activity/pdfannotator ' );
50
50
51
- $ paths [] = new restore_path_element ('pdfannotator_annotation ' ,
52
- '/activity/pdfannotator/annotations/annotation ' );
51
+ if ($ userinfo ) {
52
+ $ paths [] = new restore_path_element ('pdfannotator_annotation ' ,
53
+ '/activity/pdfannotator/annotations/annotation ' );
53
54
54
- $ paths [] = new restore_path_element ('pdfannotator_subscription ' ,
55
- '/activity/pdfannotator/annotations/annotation/subscriptions/subscription ' );
56
- $ paths [] = new restore_path_element ('pdfannotator_comment ' ,
57
- '/activity/pdfannotator/annotations/annotation/comments/comment ' );
58
-
59
- $ paths [] = new restore_path_element ('pdfannotator_vote ' ,
60
- '/activity/pdfannotator/annotations/annotation/comments/comment/votes/vote ' );
61
- $ paths [] = new restore_path_element ('pdfannotator_report ' ,
62
- '/activity/pdfannotator/annotations/annotation/comments/comment/reports/report ' );
55
+ $ paths [] = new restore_path_element ('pdfannotator_subscription ' ,
56
+ '/activity/pdfannotator/annotations/annotation/subscriptions/subscription ' );
57
+ $ paths [] = new restore_path_element ('pdfannotator_comment ' ,
58
+ '/activity/pdfannotator/annotations/annotation/comments/comment ' );
63
59
60
+ $ paths [] = new restore_path_element ('pdfannotator_vote ' ,
61
+ '/activity/pdfannotator/annotations/annotation/comments/comment/votes/vote ' );
62
+ $ paths [] = new restore_path_element ('pdfannotator_report ' ,
63
+ '/activity/pdfannotator/annotations/annotation/comments/comment/reports/report ' );
64
+ }
64
65
// Return the paths wrapped into standard activity structure.
65
66
return $ this ->prepare_activity_structure ($ paths );
66
67
}
0 commit comments