File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed
Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 5050$ record = $ app ->db ->queryOneRecord ('SELECT * FROM sys_datalog WHERE datalog_id = ? ' , $ id );
5151
5252$ out ['id ' ] = $ id ;
53+ $ out ['username ' ] = $ record ['user ' ];
5354
5455$ out ['timestamp ' ] = date ($ app ->lng ('conf_format_datetime ' ), $ record ['tstamp ' ]);
5556$ out ['table ' ] = $ record ['dbtable ' ];
57+ list ($ key , $ value ) = explode (': ' , $ record ['dbidx ' ]);
58+ if (!empty ($ value )) {
59+ if ($ record ['action ' ] == 'd ' ) {
60+ // No link for deleted content.
61+ $ out ['table_id ' ] = $ record ['dbidx ' ];
62+ } else {
63+ switch ($ out ['table ' ]) {
64+ case 'mail_forwarding ' :
65+ $ file = 'mail/mail_forward_edit.php ' ;
66+ break ;
67+ case 'mail_user ' :
68+ $ file = 'mail/mail_user_edit.php ' ;
69+ break ;
70+ case 'mail_domain ' :
71+ $ file = 'mail/mail_domain_edit.php ' ;
72+ break ;
73+ case 'web_domain ' :
74+ $ file = 'sites/web_vhost_domain_edit.php ' ;
75+ break ;
76+ case 'web_database ' :
77+ $ file = 'sites/database_edit.php ' ;
78+ break ;
79+ case 'web_database_user ' :
80+ $ file = 'sites/database_user_edit.php ' ;
81+ break ;
82+
83+ // TODO Add a link per content type
84+ default :
85+ $ file = '' ;
86+ }
87+
88+ if (!empty ($ file )) {
89+ $ out ['table_id ' ] = '<a href="#" data-load-content=" ' . $ file . '?id= ' . $ value
90+ . '" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="link"> '
91+ . $ record ['dbidx ' ] . '</a> ' ;
92+ }
93+ }
94+ }
5695
5796$ out ['action_char ' ] = $ record ['action ' ];
5897$ out ['action_name ' ] = $ app ->lng ($ record ['action ' ]);
Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ $wb['new_txt'] = 'New';
2323$wb['btn_cancel_txt'] = 'Back';
2424$wb['undo_txt'] = 'Undo action';
2525$wb['undo_confirmation_txt'] = 'Do you really want to undo this action?';
26+ $wb['username_txt'] = 'Username';
2627?>
Original file line number Diff line number Diff line change @@ -12,13 +12,17 @@ <h1><tmpl_var name="list_head_txt"></h1>
1212 </ tr >
1313 </ thead >
1414 < tbody >
15+ < tr >
16+ < td > < tmpl _var name ="username_txt "> </ td >
17+ < td > < tmpl _var name ="username "> </ td >
18+ </ tr >
1519 < tr >
1620 < td > < tmpl _var name ="timestamp_txt "> </ td >
1721 < td > < tmpl _var name ="timestamp "> </ td >
1822 </ tr >
1923 < tr >
2024 < td > < tmpl _var name ="table_txt "> </ td >
21- < td > < tmpl _var name ="table "> </ td >
25+ < td > < tmpl _var name ="table "> < tmpl _if name =' table_id ' > ( < tmpl _var name =" table_id " > ) </ tmpl _if > < /td >
2226 </ tr >
2327 < tr >
2428 < td > < tmpl _var name ="action_txt "> </ td >
You can’t perform that action at this time.
0 commit comments