@@ -234,6 +234,7 @@ public static function delete_note($notebook_id)
234
234
*/
235
235
public static function display_notes ()
236
236
{
237
+ $ cidReq = api_get_cidreq ();
237
238
$ sessionId = api_get_session_id ();
238
239
$ _user = api_get_user_info ();
239
240
if (!isset ($ _GET ['direction ' ])) {
@@ -251,16 +252,16 @@ public static function display_notes()
251
252
echo '<div class="actions"> ' ;
252
253
if (!api_is_anonymous ()) {
253
254
if ($ sessionId == 0 || api_is_allowed_to_session_edit (false , true )) {
254
- echo '<a href="index.php? ' .api_get_cidreq () .'&action=addnote"> ' .
255
+ echo '<a href="index.php? ' .$ cidReq .'&action=addnote"> ' .
255
256
Display::return_icon ('new_note.png ' , get_lang ('NoteAddNew ' ), '' , '32 ' ).'</a> ' ;
256
257
}
257
258
}
258
259
259
- echo '<a href="index.php? ' .api_get_cidreq () .'&action=changeview&view=creation_date&direction= ' .$ link_sort_direction .'"> ' .
260
+ echo '<a href="index.php? ' .$ cidReq .'&action=changeview&view=creation_date&direction= ' .$ link_sort_direction .'"> ' .
260
261
Display::return_icon ('notes_order_by_date_new.png ' , get_lang ('OrderByCreationDate ' ), '' , '32 ' ).'</a> ' ;
261
- echo '<a href="index.php? ' .api_get_cidreq () .'&action=changeview&view=update_date&direction= ' .$ link_sort_direction .'"> ' .
262
+ echo '<a href="index.php? ' .$ cidReq .'&action=changeview&view=update_date&direction= ' .$ link_sort_direction .'"> ' .
262
263
Display::return_icon ('notes_order_by_date_mod.png ' , get_lang ('OrderByModificationDate ' ), '' , '32 ' ).'</a> ' ;
263
- echo '<a href="index.php? ' .api_get_cidreq () .'&action=changeview&view=title&direction= ' .$ link_sort_direction .'"> ' .
264
+ echo '<a href="index.php? ' .$ cidReq .'&action=changeview&view=title&direction= ' .$ link_sort_direction .'"> ' .
264
265
Display::return_icon ('notes_order_by_title.png ' , get_lang ('OrderByTitle ' ), '' , '32 ' ).'</a> ' ;
265
266
echo '</div> ' ;
266
267
@@ -291,6 +292,8 @@ public static function display_notes()
291
292
$ cond_extra $ order_by
292
293
" ;
293
294
$ result = Database::query ($ sql );
295
+ $ iconEdit = Display::return_icon ('edit.png ' , get_lang ('Edit ' ));
296
+ $ iconDelete = Display::return_icon ('delete.png ' , get_lang ('Delete ' ));
294
297
while ($ row = Database::fetch_array ($ result )) {
295
298
// Validation when belongs to a session
296
299
$ session_img = api_get_session_image ($ row ['session_id ' ], $ _user ['status ' ]);
@@ -299,10 +302,15 @@ public static function display_notes()
299
302
$ updateValue = ', ' .get_lang ('UpdateDate ' ).': ' .Display::dateToStringAgoAndLongDate ($ row ['update_date ' ]);
300
303
}
301
304
302
- $ actions = '<a href=" ' .api_get_self ().'?action=editnote¬ebook_id= ' .$ row ['notebook_id ' ].'"> ' .
303
- Display::return_icon ('edit.png ' , get_lang ('Edit ' ), '' , ICON_SIZE_SMALL ).'</a> ' ;
304
- $ actions .= '<a href=" ' .api_get_self ().'?action=deletenote¬ebook_id= ' .$ row ['notebook_id ' ].'" onclick="return confirmation( \'' .$ row ['title ' ].'\');"> ' .
305
- Display::return_icon ('delete.png ' , get_lang ('Delete ' ), '' , ICON_SIZE_SMALL ).'</a> ' ;
305
+ $ actions = Display::url (
306
+ $ iconEdit ,
307
+ api_get_self ().'?action=editnote¬ebook_id= ' .$ row ['notebook_id ' ].'& ' .$ cidReq
308
+ );
309
+ $ actions .= Display::url (
310
+ $ iconDelete ,
311
+ api_get_self ().'?action=deletenote¬ebook_id= ' .$ row ['notebook_id ' ].'& ' .$ cidReq ,
312
+ ['onclick ' => 'return confirmation( \'' .$ row ['title ' ].'\'); ' ]
313
+ );
306
314
307
315
echo Display::panel (
308
316
Security::remove_XSS ($ row ['description ' ]),
0 commit comments