@@ -43,24 +43,25 @@ protected function define_structure() {
4343
4444 $ paths = array ();
4545
46- $ userinfo = $ this ->get_setting_value ('userinfo ' ); // Is 0 //TODO is not used.
46+ $ userinfo = $ this ->get_setting_value ('userinfo ' );
4747
4848 $ paths [] = new restore_path_element ('pdfannotator ' ,
4949 '/activity/pdfannotator ' );
5050
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 ' );
5354
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 ' );
6359
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+ }
6465 // Return the paths wrapped into standard activity structure.
6566 return $ this ->prepare_activity_structure ($ paths );
6667 }
0 commit comments