11<?php
22/**
3- * Cloud Button
3+ * Roundcube Plugin Cloud Button
4+ * Plugin to add button in taskbar to open cloud storage.
45 *
5- * Plugin to add button to open cloud storage.
6- *
7- * @date 2017-03-14
8- * @version 0.1
9- * @author Alexander Pushkin
10- * @url https://github.com/san4op/roundcube_cloud_button
11- * @licence GNU GPLv3
6+ * @version 1.0
7+ * @author Alexander Pushkin <san4op@icloud.com>
8+ * @copyright Copyright (c) 2017, Alexander Pushkin
9+ * @link https://github.com/san4op/roundcube_cloud_button
10+ * @license GNU General Public License, version 3
1211 */
1312
1413class cloud_button extends rcube_plugin
@@ -20,25 +19,26 @@ function init()
2019 {
2120 $ rcmail = rcube::get_instance ();
2221
23- $ this ->title = $ rcmail ->config ->get ('cloud_button_title ' , 'cloud_button.cloud ' );
22+ $ this ->title = $ rcmail ->config ->get ('cloud_button_title ' , '' );
2423 $ this ->url = $ rcmail ->config ->get ('cloud_button_url ' , '' );
2524
2625 if (!$ this ->url ) {
2726 return ;
2827 }
2928
30- $ this ->add_texts ('localization/ ' , true );
3129 $ this ->include_stylesheet ($ this ->local_skin_path () . '/cloud_button.css ' );
30+ $ this ->add_texts ('localization/ ' , true );
31+ $ this ->load_config ();
3232
3333 $ this ->add_button (array (
34- 'href ' => $ this ->url ,
35- 'class ' => 'button-cloud ' ,
36- 'classsel ' => 'button-cloud button-selected ' ,
37- 'innerclass ' => 'button-inner ' ,
38- 'label ' => $ this ->title ,
34+ 'label ' => ($ this ->title != '' ? $ this ->title : 'cloud_button.cloud ' ),
35+ 'href ' => $ this ->url ,
36+ 'target ' => '_blank ' ,
37+ 'class ' => 'button-cloud ' ,
38+ 'classsel ' => 'button-cloud button-selected ' ,
39+ 'innerclass ' => 'button-inner '
3940 ), 'taskbar ' );
4041 }
41-
4242}
4343
4444?>
0 commit comments