Changeset 3334060
- Timestamp:
- 07/25/2025 08:47:14 AM (7 months ago)
- Location:
- onlyoffice/trunk
- Files:
-
- 42 added
- 42 deleted
- 31 edited
-
CHANGELOG.md (modified) (1 diff)
-
admin/js/settings.js (modified) (1 diff)
-
controllers/class-onlyoffice-plugin-frontend-controller.php (modified) (4 diffs)
-
controllers/js/frontend-controller.js (modified) (2 diffs)
-
editor.php (modified) (2 diffs)
-
includes/class-onlyoffice-plugin-i18n.php (modified) (1 diff)
-
includes/files/class-onlyoffice-plugin-files-list-table.php (modified) (4 diffs)
-
includes/files/class-onlyoffice-plugin-files.php (modified) (3 diffs)
-
includes/managers/class-onlyoffice-plugin-callback-manager.php (modified) (1 diff)
-
includes/managers/class-onlyoffice-plugin-url-manager.php (modified) (4 diffs)
-
includes/settings/class-onlyoffice-plugin-settings.php (modified) (20 diffs)
-
languages/onlyoffice-de_DE-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-de_DE-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-de_DE-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-de_DE.mo (added)
-
languages/onlyoffice-de_DE.po (added)
-
languages/onlyoffice-en-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-en-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-en-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-en.mo (added)
-
languages/onlyoffice-en.po (added)
-
languages/onlyoffice-es_ES-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-es_ES-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-es_ES-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-es_ES.mo (added)
-
languages/onlyoffice-es_ES.po (added)
-
languages/onlyoffice-fr_FR-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-fr_FR-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-fr_FR-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-fr_FR.mo (added)
-
languages/onlyoffice-fr_FR.po (added)
-
languages/onlyoffice-it_IT-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-it_IT-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-it_IT-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-it_IT.mo (added)
-
languages/onlyoffice-it_IT.po (added)
-
languages/onlyoffice-ja-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-ja-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-ja-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-ja.mo (added)
-
languages/onlyoffice-ja.po (added)
-
languages/onlyoffice-plugin-de_DE-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-de_DE-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-de_DE-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-de_DE.mo (deleted)
-
languages/onlyoffice-plugin-de_DE.po (deleted)
-
languages/onlyoffice-plugin-en-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-en-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-en-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-en.mo (deleted)
-
languages/onlyoffice-plugin-en.po (deleted)
-
languages/onlyoffice-plugin-es_ES-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-es_ES-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-es_ES-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-es_ES.mo (deleted)
-
languages/onlyoffice-plugin-es_ES.po (deleted)
-
languages/onlyoffice-plugin-fr_FR-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-fr_FR-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-fr_FR-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-fr_FR.mo (deleted)
-
languages/onlyoffice-plugin-fr_FR.po (deleted)
-
languages/onlyoffice-plugin-it_IT-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-it_IT-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-it_IT-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-it_IT.mo (deleted)
-
languages/onlyoffice-plugin-it_IT.po (deleted)
-
languages/onlyoffice-plugin-ja-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-ja-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-ja-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-ja.mo (deleted)
-
languages/onlyoffice-plugin-ja.po (deleted)
-
languages/onlyoffice-plugin-ru_RU-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-ru_RU-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-ru_RU-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-ru_RU.mo (deleted)
-
languages/onlyoffice-plugin-ru_RU.po (deleted)
-
languages/onlyoffice-plugin-zh_CN-18579bef1e63739970bd79e6dcc6ee92.json (deleted)
-
languages/onlyoffice-plugin-zh_CN-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (deleted)
-
languages/onlyoffice-plugin-zh_CN-c6d39b7cfad17364ba238197448a913b.json (deleted)
-
languages/onlyoffice-plugin-zh_CN.mo (deleted)
-
languages/onlyoffice-plugin-zh_CN.po (deleted)
-
languages/onlyoffice-plugin.pot (deleted)
-
languages/onlyoffice-ru_RU-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-ru_RU-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-ru_RU-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-ru_RU.mo (added)
-
languages/onlyoffice-ru_RU.po (added)
-
languages/onlyoffice-zh_CN-18579bef1e63739970bd79e6dcc6ee92.json (added)
-
languages/onlyoffice-zh_CN-4d9e7e5bfeb560d3581c5fa0f4136bc5.json (added)
-
languages/onlyoffice-zh_CN-c6d39b7cfad17364ba238197448a913b.json (added)
-
languages/onlyoffice-zh_CN.mo (added)
-
languages/onlyoffice-zh_CN.po (added)
-
languages/onlyoffice.pot (added)
-
onlyoffice-wordpress-block/block.json (modified) (1 diff)
-
onlyoffice-wordpress-block/build/index.asset.php (modified) (1 diff)
-
onlyoffice-wordpress-block/build/index.js (modified) (1 diff)
-
onlyoffice-wordpress-block/src/edit.js (modified) (6 diffs)
-
onlyoffice-wordpress.php (deleted)
-
onlyoffice.php (added)
-
public/class-onlyoffice-plugin-public.php (modified) (4 diffs)
-
public/views/class-onlyoffice-plugin-callback.php (modified) (2 diffs)
-
public/views/class-onlyoffice-plugin-download.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
vendor/composer/installed.json (modified) (3 diffs)
-
vendor/composer/installed.php (modified) (3 diffs)
-
vendor/composer/platform_check.php (modified) (1 diff)
-
vendor/firebase/php-jwt/CHANGELOG.md (modified) (1 diff)
-
vendor/firebase/php-jwt/README.md (modified) (5 diffs)
-
vendor/firebase/php-jwt/src/JWK.php (modified) (1 diff)
-
vendor/firebase/php-jwt/src/JWT.php (modified) (2 diffs)
-
vendor/firebase/php-jwt/src/Key.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
onlyoffice/trunk/CHANGELOG.md
r3200917 r3334060 1 1 # Change Log 2 3 ## 2.3.0 4 ## Changed 5 - improved security for /download and /callback api endpoitns 2 6 3 7 ## 2.2.0 -
onlyoffice/trunk/admin/js/settings.js
r3070758 r3334060 18 18 if ( $( '#onlyoffice_settings_allowed_owerwrite_network_settings' ).length ) { 19 19 if ( $( '#onlyoffice_settings_allowed_owerwrite_network_settings' ).prop( 'checked' ) ) { 20 confirmMessage = wp.i18n.__( 'Do you want to allow sites administrators to configure the plugin themselves?', 'onlyoffice -plugin' );20 confirmMessage = wp.i18n.__( 'Do you want to allow sites administrators to configure the plugin themselves?', 'onlyoffice' ); 21 21 } else { 22 confirmMessage = wp.i18n.__( 'Do you want to apply these settings to all sites?', 'onlyoffice -plugin' );22 confirmMessage = wp.i18n.__( 'Do you want to apply these settings to all sites?', 'onlyoffice' ); 23 23 } 24 24 } 25 25 26 26 if ( $( '#onlyoffice_settings_inherit_network_settings' ).length && $( '#onlyoffice_settings_inherit_network_settings' ).prop( 'checked' ) ) { 27 confirmMessage = wp.i18n.__( 'Do you want to apply the network settings?', 'onlyoffice -plugin' );27 confirmMessage = wp.i18n.__( 'Do you want to apply the network settings?', 'onlyoffice' ); 28 28 } 29 29 -
onlyoffice/trunk/controllers/class-onlyoffice-plugin-frontend-controller.php
r3200917 r3334060 52 52 __DIR__ . '/../onlyoffice-wordpress-block', 53 53 array( 54 'description' => __( 'Add ONLYOFFICE Docs editor on page', 'onlyoffice -plugin' ),54 'description' => __( 'Add ONLYOFFICE Docs editor on page', 'onlyoffice' ), 55 55 'render_callback' => array( $this, 'onlyoffice_block_render_callback' ), 56 56 ), … … 60 60 wp_set_script_translations( 61 61 'onlyoffice-wordpress-onlyoffice-editor-script', 62 'onlyoffice -plugin',62 'onlyoffice', 63 63 plugin_dir_path( ONLYOFFICE_PLUGIN_FILE ) . 'languages/' 64 64 ); … … 99 99 'height' => '500px', 100 100 'showOpenButton' => 'true', 101 'openButtonText' => __( 'Open in ONLYOFFICE', 'onlyoffice -plugin' ),101 'openButtonText' => __( 'Open in ONLYOFFICE', 'onlyoffice' ), 102 102 ); 103 103 … … 156 156 wp_set_script_translations( 157 157 'wp-block-onlyoffice-wordpress-js', 158 'onlyoffice -plugin',158 'onlyoffice', 159 159 plugin_dir_path( ONLYOFFICE_PLUGIN_FILE ) . 'languages/' 160 160 ); -
onlyoffice/trunk/controllers/js/frontend-controller.js
r3070758 r3334060 20 20 onlyofficeErrorTemplate( 21 21 { 22 email: __( 'ONLYOFFICE cannot be reached. Please contact admin', 'onlyoffice -plugin' )22 email: __( 'ONLYOFFICE cannot be reached. Please contact admin', 'onlyoffice' ) 23 23 } 24 24 ) … … 39 39 onlyofficeErrorTemplate( 40 40 { 41 email: __( 'File not found!', 'onlyoffice -plugin' )41 email: __( 'File not found!', 'onlyoffice' ) 42 42 } 43 43 ) -
onlyoffice/trunk/editor.php
r3070758 r3334060 67 67 } elseif ( ! Onlyoffice_Plugin_Document_Manager::can_user_view_attachment( $attachment_id ) ) { 68 68 wp_die( 69 esc_attr_e( 'Sorry, you are not allowed to view this item.' ),69 esc_attr_e( 'Sorry, you are not allowed to view this item.', 'onlyoffice' ), 70 70 403 71 71 ); … … 145 145 var connectEditor = function() { 146 146 if (typeof DocsAPI === "undefined") { 147 alert("<?php esc_attr_e( 'ONLYOFFICE Docs cannot be reached. Please contact admin.', 'onlyoffice -plugin' ); ?>");147 alert("<?php esc_attr_e( 'ONLYOFFICE Docs cannot be reached. Please contact admin.', 'onlyoffice' ); ?>"); 148 148 return; 149 149 } -
onlyoffice/trunk/includes/class-onlyoffice-plugin-i18n.php
r3070758 r3334060 43 43 public function load_plugin_textdomain() { 44 44 load_plugin_textdomain( 45 'onlyoffice -plugin',45 'onlyoffice', 46 46 false, 47 47 dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' -
onlyoffice/trunk/includes/files/class-onlyoffice-plugin-files-list-table.php
r3070758 r3334060 89 89 */ 90 90 public function no_items() { 91 esc_html_e( 'No files found for editing or viewing in ONLYOFFICE Docs editor.', 'onlyoffice -plugin' );91 esc_html_e( 'No files found for editing or viewing in ONLYOFFICE Docs editor.', 'onlyoffice' ); 92 92 } 93 93 /** … … 138 138 public function get_columns() { 139 139 $columns = array( 140 'title' => __( 'Name' ),141 'format' => __( 'Extension' ),142 'date' => __( 'Date' ),143 'size' => __( 'Size' ),144 'link' => __( 'Link' ),140 'title' => __( 'Name', 'onlyoffice' ), 141 'format' => __( 'Extension', 'onlyoffice' ), 142 'date' => __( 'Date', 'onlyoffice' ), 143 'size' => __( 'Size', 'onlyoffice' ), 144 'link' => __( 'Link', 'onlyoffice' ), 145 145 ); 146 146 return $columns; … … 284 284 if ( $last_user ) { 285 285 /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */ 286 $h_time = sprintf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $file->post_modified ), mysql2date( __( 'g:i a' ), $file->post_modified ) );286 $h_time = sprintf( __( 'Last edited by %1$s on %2$s at %3$s', 'onlyoffice' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y', 'onlyoffice' ), $file->post_modified ), mysql2date( __( 'g:i a', 'onlyoffice' ), $file->post_modified ) ); 287 287 } else { 288 /* translators: 1: Post edited date, 2: Post edited time. */289 $h_time = sprintf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $file->post_modified ), mysql2date( __( 'g:i a' ), $file->post_modified ) );288 /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */ 289 $h_time = sprintf( __( 'Last edited on %1$s at %2$s', 'onlyoffice' ), mysql2date( __( 'F j, Y', 'onlyoffice' ), $file->post_modified ), mysql2date( __( 'g:i a', 'onlyoffice' ), $file->post_modified ) ); 290 290 } 291 291 … … 303 303 ?> 304 304 <span class="copy-to-clipboard-container"> 305 <button type="button" data-clipboard-text="<?php echo esc_url( Onlyoffice_Plugin_Url_Manager::get_editor_url( $item['id'] ) ); ?>" class="onlyoffice-editor-link button-link has-icon" title="<?php esc_attr_e( 'Copy URL' ); ?>" aria-label="<?php esc_attr_e( 'Link' ); ?>">305 <button type="button" data-clipboard-text="<?php echo esc_url( Onlyoffice_Plugin_Url_Manager::get_editor_url( $item['id'] ) ); ?>" class="onlyoffice-editor-link button-link has-icon" title="<?php esc_attr_e( 'Copy URL', 'onlyoffice' ); ?>" aria-label="<?php esc_attr_e( 'Link', 'onlyoffice' ); ?>"> 306 306 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"></path></svg> 307 307 </button> 308 <span class="success hidden" aria-hidden="true"><?php esc_html_e( 'Copied!' ); ?>308 <span class="success hidden" aria-hidden="true"><?php esc_html_e( 'Copied!', 'onlyoffice' ); ?> 309 309 </span> 310 310 <?php -
onlyoffice/trunk/includes/files/class-onlyoffice-plugin-files.php
r3070758 r3334060 51 51 if ( $can_upload_files ) { 52 52 add_menu_page( 53 __( 'ONLYOFFICE Docs', 'onlyoffice -plugin' ),53 __( 'ONLYOFFICE Docs', 'onlyoffice' ), 54 54 'ONLYOFFICE Docs', 55 55 'upload_files', … … 62 62 'onlyoffice-files', 63 63 'ONLYOFFICE Docs', 64 __( 'Files', 'onlyoffice -plugin' ),64 __( 'Files', 'onlyoffice' ), 65 65 'upload_files', 66 66 'onlyoffice-files', … … 103 103 <div class="wrap"> 104 104 <h1><?php echo esc_html( get_admin_page_title() ); ?></h1> 105 <p><?php esc_html_e( 'Files that can be edited and opened in ONLYOFFICE Docs editor are displayed here.', 'onlyoffice -plugin' ); ?></p>105 <p><?php esc_html_e( 'Files that can be edited and opened in ONLYOFFICE Docs editor are displayed here.', 'onlyoffice' ); ?></p> 106 106 <form method="get"> 107 <?php $onlyoffice_plugin_files_list_table->search_box( __( 'Search' ), 'onlyoffice_file' ); ?>107 <?php $onlyoffice_plugin_files_list_table->search_box( __( 'Search', 'onlyoffice' ), 'onlyoffice_file' ); ?> 108 108 <?php $onlyoffice_plugin_files_list_table->display(); ?> 109 109 </form> -
onlyoffice/trunk/includes/managers/class-onlyoffice-plugin-callback-manager.php
r3070758 r3334060 82 82 } 83 83 84 update_post_meta( 85 $attachemnt_id, 86 '_edit_last', 87 get_current_user_id() 88 ); 89 84 90 return 0; 85 91 } -
onlyoffice/trunk/includes/managers/class-onlyoffice-plugin-url-manager.php
r3070758 r3334060 37 37 */ 38 38 class Onlyoffice_Plugin_Url_Manager { 39 private const PATH_CALLBACK = '/onlyoffice/oo.callback /';40 private const PATH_CALLBACK_PUBLIC_FORMS = '/onlyoffice/oo.callback-public-forms /';41 private const PATH_DOWNLOAD = '/onlyoffice/oo.getfile /';39 private const PATH_CALLBACK = '/onlyoffice/oo.callback'; 40 private const PATH_CALLBACK_PUBLIC_FORMS = '/onlyoffice/oo.callback-public-forms'; 41 private const PATH_DOWNLOAD = '/onlyoffice/oo.getfile'; 42 42 private const PATH_API_JS = 'web-apps/apps/api/documents/api.js'; 43 43 … … 70 70 */ 71 71 public static function get_callback_url( $attachment_id, $public_forms ) { 72 $hidden_id = self::encode_openssl_data( $attachment_id );73 74 72 if ( $public_forms ) { 75 73 $route = self::PATH_CALLBACK_PUBLIC_FORMS; 74 75 $data = wp_json_encode( 76 array( 77 'attachment_id' => $attachment_id, 78 'user_id' => wp_get_current_user()->ID, 79 'action' => 'public_callback', 80 ) 81 ); 76 82 } else { 77 83 $route = self::PATH_CALLBACK; 84 85 $data = wp_json_encode( 86 array( 87 'attachment_id' => $attachment_id, 88 'user_id' => wp_get_current_user()->ID, 89 'action' => 'callback', 90 ) 91 ); 78 92 } 79 93 80 return get_rest_url( null, $route . $hidden_id ); 94 $token = self::encode_openssl_data( $data ); 95 96 $url = get_rest_url( null, $route ); 97 98 return add_query_arg( 99 array( 'token' => $token ), 100 $url, 101 ); 81 102 } 82 103 … … 92 113 'attachment_id' => $attachment_id, 93 114 'user_id' => wp_get_current_user()->ID, 115 'action' => 'download', 94 116 ) 95 117 ); 96 118 97 $ hidden_id= self::encode_openssl_data( $data );119 $token = self::encode_openssl_data( $data ); 98 120 99 return get_rest_url( null, self::PATH_DOWNLOAD . $hidden_id ); 121 $url = get_rest_url( null, self::PATH_DOWNLOAD ); 122 123 return add_query_arg( 124 array( 'token' => $token ), 125 $url 126 ); 100 127 } 101 128 … … 108 135 public static function get_editor_url( $attachment_id ) { 109 136 return ONLYOFFICE_PLUGIN_URL . 'editor.php?attachment_id=' . $attachment_id; 137 } 138 139 /** 140 * Return data from token or false if token invalid. 141 * 142 * @param string $token The token. 143 * @return array|false 144 */ 145 public static function decode_url_token( $token ) { 146 $decoded_value = self::decode_openssl_data( $token ); 147 148 if ( false === $decoded_value ) { 149 return false; 150 } 151 152 return json_decode( $decoded_value ); 110 153 } 111 154 -
onlyoffice/trunk/includes/settings/class-onlyoffice-plugin-settings.php
r3070758 r3334060 80 80 $hook = add_submenu_page( 81 81 'onlyoffice-files', 82 __( 'ONLYOFFICE Docs Settings', 'onlyoffice -plugin' ),83 __( 'Settings', 'onlyoffice -plugin' ),82 __( 'ONLYOFFICE Docs Settings', 'onlyoffice' ), 83 __( 'Settings', 'onlyoffice' ), 84 84 'manage_options', 85 85 'onlyoffice-settings', … … 88 88 } else { 89 89 $hook = add_menu_page( 90 __( 'ONLYOFFICE Docs Settings', 'onlyoffice -plugin' ),90 __( 'ONLYOFFICE Docs Settings', 'onlyoffice' ), 91 91 'ONLYOFFICE Docs', 92 92 'manage_options', … … 100 100 if ( $can_manage_network && is_network_admin() ) { 101 101 $hook = add_menu_page( 102 __( 'ONLYOFFICE Docs Settings', 'onlyoffice -plugin' ),102 __( 'ONLYOFFICE Docs Settings', 'onlyoffice' ), 103 103 'ONLYOFFICE Docs', 104 104 'manage_network', … … 120 120 */ 121 121 public function init() { 122 register_setting( 'onlyoffice_settings_group', 'onlyoffice_settings' ); 122 register_setting( 123 'onlyoffice_settings_group', 124 'onlyoffice_settings', 125 array( 126 'sanitize_callback' => array( $this, 'sanitize_onlyoffice_settings' ), 127 ) 128 ); 123 129 124 130 add_settings_section( … … 133 139 add_settings_field( 134 140 self::INHERIT_NETWORK_SETTINGS, 135 __( 'Connection Settings', 'onlyoffice -plugin' ),141 __( 'Connection Settings', 'onlyoffice' ), 136 142 array( $this, 'input_checkbox' ), 137 143 'onlyoffice_settings_group', … … 141 147 'checked' => self::inherit_network_settings(), 142 148 'disabled' => ! $this->allowed_owerwrite_network_settings(), 143 'description' => __( 'Inherit Network Settings', 'onlyoffice -plugin' ),149 'description' => __( 'Inherit Network Settings', 'onlyoffice' ), 144 150 ), 145 151 ); … … 149 155 add_settings_field( 150 156 self::DOCSERVER_URL, 151 __( 'Document Editing Service address', 'onlyoffice -plugin' ),157 __( 'Document Editing Service address', 'onlyoffice' ), 152 158 array( $this, 'input_text' ), 153 159 'onlyoffice_settings_group', … … 163 169 add_settings_field( 164 170 self::DOCSERVER_JWT, 165 __( 'Document server JWT secret key', 'onlyoffice -plugin' ),171 __( 'Document server JWT secret key', 'onlyoffice' ), 166 172 array( $this, 'input_text' ), 167 173 'onlyoffice_settings_group', … … 171 177 'value' => $this->get_onlyoffice_current_value_setting( self::DOCSERVER_JWT ), 172 178 'disabled' => is_multisite() && ! is_network_admin() && ( ! $this->allowed_owerwrite_network_settings() || self::inherit_network_settings() ), 173 'description' => __( 'Secret key (leave blank to disable)', 'onlyoffice -plugin' ),179 'description' => __( 'Secret key (leave blank to disable)', 'onlyoffice' ), 174 180 ) 175 181 ); … … 177 183 add_settings_field( 178 184 self::JWT_HEADER, 179 __( 'Authorization header', 'onlyoffice -plugin' ),185 __( 'Authorization header', 'onlyoffice' ), 180 186 array( $this, 'input_text' ), 181 187 'onlyoffice_settings_group', … … 185 191 'value' => $this->get_onlyoffice_current_value_setting( self::JWT_HEADER ), 186 192 'disabled' => is_multisite() && ! is_network_admin() && ( ! $this->allowed_owerwrite_network_settings() || self::inherit_network_settings() ), 187 'description' => __( 'Leave blank to use default header', 'onlyoffice -plugin' ),193 'description' => __( 'Leave blank to use default header', 'onlyoffice' ), 188 194 ) 189 195 ); … … 201 207 'checked' => self::allowed_owerwrite_network_settings(), 202 208 'disabled' => '', 203 'description' => __( 'Allow site administrators to configure plugin for their sites', 'onlyoffice -plugin' ),209 'description' => __( 'Allow site administrators to configure plugin for their sites', 'onlyoffice' ), 204 210 ) 205 211 ); 206 212 } 207 213 } 214 } 215 216 /** 217 * Sanitize settings 218 * 219 * @param array $input Input settings. 220 * 221 * @return array Sanitized settings. 222 */ 223 public function sanitize_onlyoffice_settings( $input ) { 224 if ( ! is_array( $input ) ) { 225 return array(); 226 } 227 228 $sanitized = array(); 229 foreach ( $input as $key => $value ) { 230 $sanitized[ $key ] = sanitize_text_field( $value ); 231 } 232 233 return $sanitized; 208 234 } 209 235 … … 250 276 if ( is_multisite() ) { 251 277 if ( is_network_admin() ) { 252 esc_html_e( 'Configure ONLYOFFICE Docs plugin settings for the whole network.', 'onlyoffice -plugin' );278 esc_html_e( 'Configure ONLYOFFICE Docs plugin settings for the whole network.', 'onlyoffice' ); 253 279 } else { 254 280 printf( 255 281 wp_kses( 256 282 /* translators: %s: Title WP Site. */ 257 __( 'Configure ONLYOFFICE Docs plugin settings for %s site.', 'onlyoffice -plugin' ),283 __( 'Configure ONLYOFFICE Docs plugin settings for %s site.', 'onlyoffice' ), 258 284 array( 259 285 'strong' => array( … … 269 295 <div class="onlyoffice-settings-notice"> 270 296 <p> 271 <?php esc_html_e( 'Blocked from changing settings by the Network administrator', 'onlyoffice -plugin' ); ?>297 <?php esc_html_e( 'Blocked from changing settings by the Network administrator', 'onlyoffice' ); ?> 272 298 </p> 273 299 </div> … … 277 303 } else { 278 304 ?> 279 <p id="<?php echo esc_attr( $args['id'] ); ?>"><?php esc_html_e( 'Configure ONLYOFFICE Docs plugin settings.', 'onlyoffice -plugin' ); ?></p>305 <p id="<?php echo esc_attr( $args['id'] ); ?>"><?php esc_html_e( 'Configure ONLYOFFICE Docs plugin settings.', 'onlyoffice' ); ?></p> 280 306 <?php 281 307 } … … 318 344 wp_set_script_translations( 319 345 ONLYOFFICE_PLUGIN_NAME . '-settings', 320 'onlyoffice -plugin',346 'onlyoffice', 321 347 plugin_dir_path( ONLYOFFICE_PLUGIN_FILE ) . 'languages/' 322 348 ); … … 341 367 342 368 submit_button( 343 __( 'Save Settings', 'onlyoffice -plugin' ),369 __( 'Save Settings', 'onlyoffice' ), 344 370 'primary', 345 371 '', … … 353 379 <img src="<?php echo esc_url( ONLYOFFICE_PLUGIN_URL . 'admin/images/banner/logo.svg' ); ?>"> 354 380 <div class="info"> 355 <h3><?php esc_html_e( 'ONLYOFFICE Docs Cloud', 'onlyoffice -plugin' ); ?></h3>356 <p><?php esc_html_e( 'Easily launch the editors in the cloud without downloading and installation', 'onlyoffice -plugin' ); ?></p>381 <h3><?php esc_html_e( 'ONLYOFFICE Docs Cloud', 'onlyoffice' ); ?></h3> 382 <p><?php esc_html_e( 'Easily launch the editors in the cloud without downloading and installation', 'onlyoffice' ); ?></p> 357 383 </div> 358 384 </div> 359 385 <div class="onlyoffice-cloud-banner-buttons"> 360 <a class="onlyoffice-cloud-banner-button" href="https://www.onlyoffice.com/docs-registration.aspx?referer=wordpress" target="_blank"><?php esc_html_e( 'Get Now', 'onlyoffice -plugin' ); ?></a>386 <a class="onlyoffice-cloud-banner-button" href="https://www.onlyoffice.com/docs-registration.aspx?referer=wordpress" target="_blank"><?php esc_html_e( 'Get Now', 'onlyoffice' ); ?></a> 361 387 </div> 362 388 </div> … … 429 455 } 430 456 431 add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' );457 add_settings_error( 'general', 'settings_updated', __( 'Settings saved.', 'onlyoffice' ), 'success' ); 432 458 set_transient( 'settings_errors', get_settings_errors(), 30 ); 433 459 … … 541 567 <div class="notification-dialog" role="dialog" tabindex="0"> 542 568 <div class="onlyoffice-setting-confirm-dialog-content"> 543 <h1><?php esc_html_e( 'Settings update', 'onlyoffice -plugin' ); ?></h1>569 <h1><?php esc_html_e( 'Settings update', 'onlyoffice' ); ?></h1> 544 570 <div class="onlyoffice-setting-confirm-message"></div> 545 571 <p> 546 <a class="button onlyoffice-setting-confirm-dialog-cancel"><?php esc_html_e( 'Cancel' ); ?></a>547 <button type="button" class="onlyoffice-setting-confirm-dialog-ok button button-primary"><?php esc_html_e( 'OK' ); ?></button>572 <a class="button onlyoffice-setting-confirm-dialog-cancel"><?php esc_html_e( 'Cancel', 'onlyoffice' ); ?></a> 573 <button type="button" class="onlyoffice-setting-confirm-dialog-ok button button-primary"><?php esc_html_e( 'OK', 'onlyoffice' ); ?></button> 548 574 </p> 549 575 </div> -
onlyoffice/trunk/onlyoffice-wordpress-block/block.json
r3070758 r3334060 8 8 "editorStyle": "file:build/index.css", 9 9 "keywords": ["onlyoffice"], 10 "textdomain": "onlyoffice -plugin",10 "textdomain": "onlyoffice", 11 11 "attributes": { 12 12 "id": { -
onlyoffice/trunk/onlyoffice-wordpress-block/build/index.asset.php
r3200917 r3334060 1 <?php return array('dependencies' => array('react', ' wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '15580a265092811fc5f1');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'aab656401d41a11d0d33'); -
onlyoffice/trunk/onlyoffice-wordpress-block/build/index.js
r3070758 r3334060 1 (()=>{"use strict";var e={d:(t,l)=>{for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};e.d({},{V:()=>p});const t=window.React,l=window.wp.blocks,n=JSON.parse('{"UU":"onlyoffice-wordpress/onlyoffice"}'),i=window.wp.blockEditor,a=window.wp.components,o=window.wp.i18n,C=(0,t.createElement)("svg",{width:"161",height:"205",viewBox:"0 0 161 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M152.45 37.2371V191.59C152.45 192.738 151.994 193.84 151.182 194.652C150.37 195.464 149.268 195.92 148.12 195.92H12.88C11.7316 195.92 10.6302 195.464 9.81821 194.652C9.00618 193.84 8.54999 192.738 8.54999 191.59V12.88C8.54999 11.7316 9.00618 10.6302 9.81822 9.81822C10.6302 9.00618 11.7316 8.54999 12.88 8.54999H123.763L152.45 37.2371Z",fill:"#214479",stroke:"#1A3661"}),(0,t.createElement)("path",{opacity:"0.2",d:"M151.5 37.03H128.8C127.519 37.03 126.29 36.5211 125.385 35.6153C124.479 34.7095 123.97 33.481 123.97 32.2V9.5L151.5 37.03Z",fill:"black"}),(0,t.createElement)("path",{d:"M70.9538 167.902L68.2292 178.61H65.6437L64.1936 172.985C64.1643 172.878 64.1252 172.714 64.0764 172.494C64.0275 172.275 63.9763 172.035 63.9226 171.776C63.8688 171.513 63.82 171.266 63.7761 171.037C63.737 170.802 63.7102 170.617 63.6955 170.48C63.6809 170.617 63.6516 170.8 63.6076 171.029C63.5686 171.259 63.5222 171.503 63.4685 171.762C63.4196 172.021 63.3708 172.262 63.322 172.487C63.2731 172.712 63.2341 172.882 63.2048 173L61.7619 178.61H59.1838L56.4519 167.902H58.6857L60.0554 173.747C60.0944 173.922 60.1384 174.132 60.1872 174.377C60.2409 174.621 60.2922 174.877 60.341 175.146C60.3947 175.409 60.4411 175.666 60.4802 175.915C60.5241 176.159 60.5559 176.371 60.5754 176.552C60.5998 176.366 60.6315 176.151 60.6706 175.907C60.7097 175.658 60.7512 175.407 60.7951 175.153C60.8439 174.894 60.8928 174.655 60.9416 174.435C60.9904 174.215 61.0344 174.037 61.0734 173.901L62.6335 167.902H64.7795L66.3396 173.901C66.3737 174.032 66.4128 174.211 66.4567 174.435C66.5056 174.655 66.5544 174.894 66.6032 175.153C66.6521 175.412 66.696 175.666 66.7351 175.915C66.779 176.159 66.8107 176.371 66.8303 176.552C66.8645 176.308 66.9108 176.012 66.9694 175.666C67.0329 175.314 67.0988 174.965 67.1672 174.618C67.2404 174.272 67.3039 173.981 67.3576 173.747L68.7199 167.902H70.9538ZM82.0207 173.241C82.0207 174.067 81.9182 174.818 81.7131 175.497C81.508 176.171 81.1955 176.752 80.7756 177.24C80.3605 177.729 79.8332 178.105 79.1936 178.368C78.5539 178.627 77.7971 178.756 76.923 178.756C76.049 178.756 75.2922 178.627 74.6525 178.368C74.0129 178.105 73.4831 177.729 73.0632 177.24C72.6481 176.752 72.3381 176.169 72.133 175.49C71.9279 174.811 71.8254 174.057 71.8254 173.227C71.8254 172.118 72.0061 171.154 72.3674 170.334C72.7336 169.508 73.2951 168.869 74.052 168.415C74.8088 167.961 75.7707 167.734 76.9377 167.734C78.0998 167.734 79.0544 167.961 79.8015 168.415C80.5534 168.869 81.1101 169.508 81.4714 170.334C81.8376 171.159 82.0207 172.128 82.0207 173.241ZM74.2058 173.241C74.2058 173.988 74.2985 174.633 74.4841 175.175C74.6745 175.712 74.9699 176.127 75.3703 176.42C75.7707 176.708 76.2883 176.852 76.923 176.852C77.5676 176.852 78.09 176.708 78.4904 176.42C78.8908 176.127 79.1813 175.712 79.362 175.175C79.5476 174.633 79.6403 173.988 79.6403 173.241C79.6403 172.118 79.4304 171.234 79.0104 170.59C78.5905 169.945 77.8996 169.623 76.9377 169.623C76.298 169.623 75.7756 169.77 75.3703 170.063C74.9699 170.351 74.6745 170.766 74.4841 171.308C74.2985 171.845 74.2058 172.489 74.2058 173.241ZM87.3601 167.902C88.3317 167.902 89.1325 168.019 89.7624 168.254C90.3972 168.488 90.8684 168.842 91.176 169.316C91.4836 169.789 91.6374 170.387 91.6374 171.11C91.6374 171.598 91.5446 172.026 91.3591 172.392C91.1735 172.758 90.9294 173.068 90.6267 173.322C90.3239 173.576 89.9968 173.783 89.6452 173.944L92.7946 178.61H90.2751L87.7189 174.501H86.5104V178.61H84.2399V167.902H87.3601ZM87.1989 169.762H86.5104V172.655H87.2429C87.9948 172.655 88.5319 172.531 88.8542 172.282C89.1813 172.028 89.3449 171.657 89.3449 171.169C89.3449 170.661 89.1691 170.299 88.8176 170.085C88.4709 169.87 87.9313 169.762 87.1989 169.762ZM103.027 173.153C103.027 174.359 102.795 175.368 102.331 176.178C101.872 176.984 101.205 177.592 100.331 178.002C99.4572 178.407 98.405 178.61 97.1745 178.61H94.1423V167.902H97.5041C98.6271 167.902 99.6013 168.102 100.426 168.503C101.252 168.898 101.891 169.486 102.345 170.268C102.8 171.044 103.027 172.006 103.027 173.153ZM100.668 173.212C100.668 172.421 100.551 171.772 100.317 171.264C100.087 170.751 99.7453 170.373 99.2912 170.129C98.842 169.884 98.2854 169.762 97.6213 169.762H96.4128V176.735H97.3869C98.4953 176.735 99.3181 176.44 99.8552 175.849C100.397 175.258 100.668 174.379 100.668 173.212Z",fill:"white"}),(0,t.createElement)("path",{d:"M109.158 77.28L99.015 120.75L87.745 77.28H82.915H78.085L66.815 120.75L56.672 77.28H47.334L61.019 132.02H71.323L82.915 87.101L94.507 132.02H104.811L118.496 77.28H109.158Z",fill:"white"})),r=(0,t.createElement)("svg",{width:"161",height:"205",viewBox:"0 0 161 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M123.763 9.01997L152.45 37.7071V192.06C152.45 193.208 151.994 194.31 151.182 195.122C150.37 195.934 149.268 196.39 148.12 196.39H12.88C11.7316 196.39 10.6302 195.934 9.81822 195.122L9.46466 195.475L9.81821 195.122C9.00618 194.31 8.54999 193.208 8.54999 192.06V13.35C8.54999 12.2016 9.00618 11.1002 9.81822 10.2882C10.6302 9.47617 11.7316 9.01997 12.88 9.01997H123.763Z",fill:"#1F7244",stroke:"#195B36"}),(0,t.createElement)("path",{opacity:"0.2",d:"M151.5 37.47H128.833C127.551 37.47 126.322 36.9783 125.416 36.1031C124.509 35.228 124 34.041 124 32.8033V9.96997L151.5 37.47Z",fill:"black"}),(0,t.createElement)("path",{d:"M68.5777 170.108C68.1431 170.108 67.7574 170.193 67.4204 170.364C67.0884 170.53 66.8077 170.772 66.5782 171.089C66.3536 171.407 66.1827 171.79 66.0655 172.239C65.9483 172.688 65.8897 173.194 65.8897 173.755C65.8897 174.512 65.9825 175.159 66.168 175.696C66.3584 176.228 66.6514 176.636 67.0469 176.919C67.4424 177.198 67.9527 177.337 68.5777 177.337C69.0122 177.337 69.4468 177.288 69.8814 177.19C70.3208 177.093 70.7969 176.953 71.3096 176.773V178.677C70.836 178.872 70.3697 179.012 69.9107 179.095C69.4517 179.182 68.9366 179.226 68.3653 179.226C67.2618 179.226 66.3536 178.999 65.6407 178.545C64.9327 178.086 64.4078 177.447 64.066 176.626C63.7242 175.801 63.5533 174.839 63.5533 173.741C63.5533 172.93 63.6631 172.188 63.8828 171.514C64.1026 170.84 64.4248 170.257 64.8496 169.764C65.2745 169.27 65.7994 168.89 66.4244 168.621C67.0494 168.352 67.7671 168.218 68.5777 168.218C69.1099 168.218 69.6421 168.286 70.1744 168.423C70.7115 168.555 71.2242 168.738 71.7124 168.973L70.98 170.818C70.5796 170.628 70.1768 170.462 69.7715 170.32C69.3662 170.179 68.9683 170.108 68.5777 170.108ZM79.7618 179.08H73.5948V168.372H79.7618V170.232H75.8653V172.583H79.4908V174.444H75.8653V177.205H79.7618V179.08ZM82.003 179.08V168.372H84.2735V177.205H88.6167V179.08H82.003ZM90.4844 179.08V168.372H92.7549V177.205H97.0982V179.08H90.4844Z",fill:"white"}),(0,t.createElement)("path",{d:"M84.9275 99.6943L103.04 72.92H94.185L80.5 93.1416L66.815 72.92H57.96L76.0725 99.6943L57.155 127.66H66.01L80.5 106.247L94.99 127.66H103.845L84.9275 99.6943Z",fill:"white"})),c=(0,t.createElement)("svg",{width:"161",height:"206",viewBox:"0 0 161 206",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M152.45 37.8027V192.557C152.45 193.709 151.993 194.813 151.181 195.628C150.369 196.442 149.268 196.899 148.12 196.899H12.88C11.732 196.899 10.6308 196.442 9.81867 195.628C9.0065 194.813 8.54999 193.709 8.54999 192.557V13.3834C8.54999 12.2313 9.0065 11.1266 9.81867 10.3123C10.6308 9.49806 11.732 9.04086 12.88 9.04086H123.762L152.45 37.8027Z",fill:"#DD682B",stroke:"#B15322"}),(0,t.createElement)("path",{opacity:"0.2",d:"M151.5 37.596H128.8C127.519 37.596 126.29 37.0858 125.385 36.1776C124.479 35.2695 123.97 34.0378 123.97 32.7535V9.97L151.5 37.596Z",fill:"black"}),(0,t.createElement)("path",{d:"M68.0131 176.528C68.0131 177.163 67.8593 177.714 67.5517 178.183C67.2441 178.652 66.7949 179.013 66.2041 179.267C65.6181 179.521 64.9052 179.648 64.0654 179.648C63.6943 179.648 63.3305 179.624 62.9741 179.575C62.6225 179.526 62.2832 179.455 61.956 179.362C61.6337 179.265 61.3261 179.145 61.0332 179.003V176.894C61.541 177.119 62.0683 177.321 62.6152 177.502C63.1621 177.683 63.7041 177.773 64.2412 177.773C64.6123 177.773 64.9101 177.724 65.1347 177.627C65.3642 177.529 65.5302 177.395 65.6328 177.224C65.7353 177.053 65.7866 176.857 65.7866 176.638C65.7866 176.369 65.6962 176.14 65.5156 175.949C65.3349 175.759 65.0859 175.581 64.7685 175.415C64.456 175.249 64.102 175.07 63.7065 174.88C63.4575 174.763 63.1865 174.621 62.8935 174.455C62.6005 174.284 62.3222 174.077 62.0585 173.833C61.7949 173.588 61.5776 173.293 61.4067 172.946C61.2407 172.595 61.1577 172.175 61.1577 171.687C61.1577 171.047 61.3042 170.5 61.5971 170.046C61.8901 169.592 62.3076 169.245 62.8496 169.006C63.3964 168.762 64.041 168.64 64.7832 168.64C65.3398 168.64 65.8696 168.706 66.3725 168.837C66.8803 168.964 67.4101 169.15 67.9619 169.394L67.2294 171.159C66.7363 170.959 66.2944 170.805 65.9038 170.698C65.5131 170.585 65.1152 170.529 64.7099 170.529C64.4267 170.529 64.185 170.576 63.9848 170.669C63.7846 170.756 63.6333 170.883 63.5307 171.049C63.4282 171.21 63.3769 171.398 63.3769 171.613C63.3769 171.867 63.4501 172.082 63.5966 172.258C63.748 172.429 63.9726 172.595 64.2705 172.756C64.5732 172.917 64.9492 173.105 65.3984 173.32C65.9453 173.579 66.4116 173.85 66.7973 174.133C67.1879 174.411 67.4882 174.741 67.6982 175.122C67.9082 175.498 68.0131 175.966 68.0131 176.528ZM69.9541 179.502V168.794H72.2246V177.627H76.5678V179.502H69.9541ZM78.4355 179.502V168.794H80.706V179.502H78.4355ZM92.2856 174.045C92.2856 175.251 92.0537 176.259 91.5898 177.07C91.1308 177.876 90.4643 178.483 89.5903 178.894C88.7163 179.299 87.664 179.502 86.4335 179.502H83.4013V168.794H86.7631C87.8862 168.794 88.8603 168.994 89.6855 169.394C90.5107 169.79 91.1503 170.378 91.6044 171.159C92.0585 171.936 92.2856 172.898 92.2856 174.045ZM89.9272 174.104C89.9272 173.313 89.81 172.663 89.5756 172.155C89.3461 171.643 89.0043 171.264 88.5502 171.02C88.101 170.776 87.5444 170.654 86.8803 170.654H85.6718V177.627H86.6459C87.7543 177.627 88.5771 177.331 89.1142 176.74C89.6562 176.149 89.9272 175.271 89.9272 174.104ZM100.672 179.502H94.5048V168.794H100.672V170.654H96.7753V173.005H100.401V174.865H96.7753V177.627H100.672V179.502Z",fill:"white"}),(0,t.createElement)("path",{d:"M80.5 111.848C87.332 111.848 93.8841 109.127 98.7151 104.283C103.546 99.44 106.26 92.8709 106.26 86.0212H80.5V60.1944C73.668 60.1944 67.1159 62.9154 62.2849 67.7589C57.454 72.6024 54.74 79.1715 54.74 86.0212C54.74 92.8709 57.454 99.44 62.2849 104.283C67.1159 109.127 73.668 111.848 80.5 111.848Z",fill:"white"}),(0,t.createElement)("path",{d:"M85.33 55.3519V81.1787H111.09C111.09 74.329 108.376 67.7598 103.545 62.9164C98.7141 58.0729 92.162 55.3519 85.33 55.3519Z",fill:"white"}),(0,t.createElement)("path",{d:"M120.75 144.131H40.25V147.36H120.75V144.131Z",fill:"white"}),(0,t.createElement)("path",{d:"M120.75 134.446H40.25V137.675H120.75V134.446Z",fill:"white"}),(0,t.createElement)("path",{d:"M120.75 124.761H40.25V127.99H120.75V124.761Z",fill:"white"})),d=(0,t.createElement)("svg",{width:"163",height:"205",viewBox:"0 0 163 205",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M154.4 37.126V192.087C154.4 193.371 153.888 194.603 152.977 195.511C152.065 196.419 150.829 196.929 149.54 196.929H13.46C12.171 196.929 10.9349 196.419 10.0234 195.511C9.11201 194.603 8.59998 193.371 8.59998 192.087V12.9134C8.59998 11.6291 9.11201 10.3974 10.0234 9.4892C10.9349 8.58105 12.171 8.07086 13.46 8.07086H125.24L154.4 37.126Z",fill:"#F8F8F8"}),(0,t.createElement)("path",{opacity:"0.2",d:"M125.24 8.07086H13.46C12.171 8.07086 10.9349 8.58105 10.0234 9.4892C9.11201 10.3974 8.59998 11.6291 8.59998 12.9134V192.087C8.59998 193.371 9.11201 194.603 10.0234 195.511C10.9349 196.419 12.171 196.929 13.46 196.929H149.54C150.829 196.929 152.065 196.419 152.977 195.511C153.888 194.603 154.4 193.371 154.4 192.087V37.126L125.24 8.07086ZM152.78 192.087C152.78 192.943 152.439 193.764 151.831 194.369C151.223 194.975 150.399 195.315 149.54 195.315H13.46C12.6007 195.315 11.7766 194.975 11.1689 194.369C10.5613 193.764 10.22 192.943 10.22 192.087V12.9134C10.22 12.0572 10.5613 11.236 11.1689 10.6306C11.7766 10.0252 12.6007 9.68504 13.46 9.68504H124.576L125.24 10.3468V32.2835C125.24 33.5678 125.752 34.7995 126.663 35.7076C127.575 36.6158 128.811 37.126 130.1 37.126H152.116L152.78 37.7878V192.087Z",fill:"black"}),(0,t.createElement)("g",{opacity:"0.2"},(0,t.createElement)("path",{opacity:"0.2",d:"M122 138.819H81.5V142.047H122V138.819Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.2",d:"M122 129.134H41V132.362H122V129.134Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.2",d:"M122 119.449H41V122.677H122V119.449Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.2",d:"M122 109.764H41V112.992H122V109.764Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.2",d:"M122 100.079H41V103.307H122V100.079Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.2",d:"M79.88 69.4094H41V72.6378H79.88V69.4094Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.2",d:"M71.78 59.7244H41V62.9527H71.78V59.7244Z",fill:"black"}))),h=window.wp.element,p={height:"500px"},w=(0,t.createElement)("svg",{width:"66",height:"60",viewBox:"0 0 66 60",fill:"black",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 59.2644L2.20792 46.9066C-0.0693069 45.8277 -0.0693069 44.1604 2.20792 43.1796L11.5148 38.8642L28.8416 46.9066C31.1188 47.9854 34.7822 47.9854 36.9604 46.9066L54.2871 38.8642L63.5941 43.1796C65.8713 44.2585 65.8713 45.9258 63.5941 46.9066L36.8614 59.2644C34.7822 60.2452 31.1188 60.2452 28.9406 59.2644Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.75",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 44.0606L2.20792 31.7028C-0.069307 30.6239 -0.069307 28.9566 2.20792 27.9758L11.3168 23.7584L28.9406 31.8989C31.2178 32.9778 34.8812 32.9778 37.0594 31.8989L54.6832 23.7584L63.7921 27.9758C66.0693 29.0547 66.0693 30.722 63.7921 31.7028L37.0594 44.0606C34.7822 45.1395 31.1188 45.1395 28.9406 44.0606Z",fill:"black"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 29.2518L2.20792 16.8939C-0.069307 15.8151 -0.069307 14.1478 2.20792 13.167L28.9406 0.809144C31.2178 -0.269715 34.8812 -0.269715 37.0594 0.809144L63.7921 13.167C66.0693 14.2458 66.0693 15.9132 63.7921 16.8939L37.0594 29.2518C34.7822 30.2325 31.1188 30.2325 28.9406 29.2518Z",fill:"black"}));(0,l.registerBlockType)(n.UU,{icon:w,edit:({attributes:e,setAttributes:l})=>{const[n,h]=(0,t.useState)(null),w=["core/bold","core/image","core/italic","core/strikethrough","core/text-color","core/code","core/keyboard","core/subscript","core/superscript"];let s=[];const m=[{label:(0,o.__)("Embedded","onlyoffice-plugin"),value:"embedded"},{label:(0,o.__)("Link"),value:"link"}];(0,t.useEffect)((()=>{e.id&&ONLYOFFICE.formatsUtils.getFileName(e.id).then((e=>{const t=ONLYOFFICE.formatsUtils.getDocumentType(e);h(t)}))}),[e.id]),e.hasOwnProperty("width")&&e.width.length>0&&(p.width=e.width),e.hasOwnProperty("height")&&e.height.length>0&&(p.height=e.height);let H=!0;"full"===e.align&&(delete p.width,H=!1);const f=function(e){var t=ONLYOFFICE.mimeTypes;if(void 0!==t[e])return t[e];for(var l in t)if(-1!==l.indexOf(e))return t[l];return!1};for(let e of ONLYOFFICE.formatsUtils.getViewableExtensions()){let t=f(e);t&&s.push(t)}const u="link"!==e.documentView&&e.id?(0,i.useBlockProps)({style:p}):(0,i.useBlockProps)({style:null});return(0,t.createElement)("div",{...u},e.id?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(i.InspectorControls,{key:"setting"},(0,t.createElement)(a.PanelBody,{title:(0,o.__)("Settings")},(0,t.createElement)(a.__experimentalInputControl,{label:(0,o.__)("Name"),value:e.fileName,onChange:e=>l({fileName:e})}),(0,t.createElement)(a.SelectControl,{label:(0,o.__)("Document view","onlyoffice-plugin"),value:e.documentView,options:m,onChange:e=>{l({documentView:e})}}),"link"===e.documentView?(0,t.createElement)("div",null,(0,t.createElement)(a.ToggleControl,{checked:e.inNewTab,label:(0,o.__)("Open in new tab"),onChange:e=>l({inNewTab:e})}),(0,t.createElement)(a.ToggleControl,{checked:e.showOpenButton,label:(0,o.__)("Show Open in ONLYOFFICE button","onlyoffice-plugin"),onChange:e=>l({showOpenButton:e})})):(0,t.createElement)("div",null,H?(0,t.createElement)(i.HeightControl,{label:(0,o.__)("Width","onlyoffice-docspace-plugin"),value:e.width,onChange:e=>l({width:e})}):"",(0,t.createElement)(i.HeightControl,{label:(0,o.__)("Height","onlyoffice-docspace-plugin"),value:e.height,onChange:e=>l({height:e})})))),"link"===e.documentView?(0,t.createElement)("div",null,(0,t.createElement)(i.RichText,{tagName:"a",allowedFormats:w,onChange:e=>l({fileName:e}),value:e.fileName}),e.showOpenButton?(0,t.createElement)("div",{class:"wp-block-onlyoffice-wordpress-onlyoffice__button-richtext-wrapper"},(0,t.createElement)(i.RichText,{tagName:"div",className:"wp-element-button",value:e.openButtonText||(0,o.__)("Open in ONLYOFFICE","onlyoffice-plugin"),allowedFormats:w,onChange:e=>l({openButtonText:e}),placeholder:(0,o.__)("Add text...")})):""):(0,t.createElement)("div",{className:`wp-block-onlyoffice-wordpress-onlyoffice__embedded ${n}`},(0,t.createElement)("div",null,(e=>{switch(e){case"word":return C;case"cell":return r;case"slide":return c;default:return d}})(n),(0,t.createElement)("p",null," ",n?e.fileName||"":(0,o.__)("File not found!","onlyoffice-plugin")))),(0,t.createElement)(i.BlockControls,{group:"other"},(0,t.createElement)(i.MediaReplaceFlow,{mediaId:e.id,allowedTypes:s,accept:s.join(),onSelect:e=>{e&&e.hasOwnProperty("id")&&l({id:e.id,fileName:e.filename||e.guid.raw.substring(e.guid.raw.lastIndexOf("/")+1)})},name:(0,o.__)("Replace")}))):(0,t.createElement)(i.MediaPlaceholder,{labels:{title:"ONLYOFFICE Docs"},allowedTypes:s,accept:s.join(),onSelect:e=>{e&&e.hasOwnProperty("id")&&l({id:e.id,fileName:e.filename||e.guid.raw.substring(e.guid.raw.lastIndexOf("/")+1)})}}))},save:({attributes:e})=>{if(!e.id)return"";let l="";return e.hasOwnProperty("id")&&(l+="id="+e.id+" "),e.hasOwnProperty("documentView")&&e.documentView.length>0&&(l+="documentView="+e.documentView+" "),e.hasOwnProperty("inNewTab")&&(l+="inNewTab="+e.inNewTab+" "),e.hasOwnProperty("align")&&e.align.length>0&&(l+="align="+e.align+" "),e.hasOwnProperty("width")&&e.width.length>0&&(l+="width="+e.width+" "),e.hasOwnProperty("height")&&e.height.length>0&&(l+="height="+e.height+" "),e.hasOwnProperty("showOpenButton")&&(l+="showOpenButton="+e.showOpenButton+" "),e.hasOwnProperty("openButtonText")&&e.openButtonText.length>0&&(l+="openButtonText="+e.openButtonText+" "),(0,t.createElement)(h.RawHTML,null,`[onlyoffice ${l} /]`)}})})();1 (()=>{"use strict";var e={d:(t,l)=>{for(var i in l)e.o(l,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:l[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};e.d({},{V:()=>p});const t=window.wp.blocks,l=JSON.parse('{"UU":"onlyoffice-wordpress/onlyoffice"}'),i=window.wp.blockEditor,o=window.wp.components,C=window.wp.i18n,n=window.React,s=window.ReactJSXRuntime,a=(0,s.jsxs)("svg",{width:"161",height:"205",viewBox:"0 0 161 205",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M152.45 37.2371V191.59C152.45 192.738 151.994 193.84 151.182 194.652C150.37 195.464 149.268 195.92 148.12 195.92H12.88C11.7316 195.92 10.6302 195.464 9.81821 194.652C9.00618 193.84 8.54999 192.738 8.54999 191.59V12.88C8.54999 11.7316 9.00618 10.6302 9.81822 9.81822C10.6302 9.00618 11.7316 8.54999 12.88 8.54999H123.763L152.45 37.2371Z",fill:"#214479",stroke:"#1A3661"}),(0,s.jsx)("path",{opacity:"0.2",d:"M151.5 37.03H128.8C127.519 37.03 126.29 36.5211 125.385 35.6153C124.479 34.7095 123.97 33.481 123.97 32.2V9.5L151.5 37.03Z",fill:"black"}),(0,s.jsx)("path",{d:"M70.9538 167.902L68.2292 178.61H65.6437L64.1936 172.985C64.1643 172.878 64.1252 172.714 64.0764 172.494C64.0275 172.275 63.9763 172.035 63.9226 171.776C63.8688 171.513 63.82 171.266 63.7761 171.037C63.737 170.802 63.7102 170.617 63.6955 170.48C63.6809 170.617 63.6516 170.8 63.6076 171.029C63.5686 171.259 63.5222 171.503 63.4685 171.762C63.4196 172.021 63.3708 172.262 63.322 172.487C63.2731 172.712 63.2341 172.882 63.2048 173L61.7619 178.61H59.1838L56.4519 167.902H58.6857L60.0554 173.747C60.0944 173.922 60.1384 174.132 60.1872 174.377C60.2409 174.621 60.2922 174.877 60.341 175.146C60.3947 175.409 60.4411 175.666 60.4802 175.915C60.5241 176.159 60.5559 176.371 60.5754 176.552C60.5998 176.366 60.6315 176.151 60.6706 175.907C60.7097 175.658 60.7512 175.407 60.7951 175.153C60.8439 174.894 60.8928 174.655 60.9416 174.435C60.9904 174.215 61.0344 174.037 61.0734 173.901L62.6335 167.902H64.7795L66.3396 173.901C66.3737 174.032 66.4128 174.211 66.4567 174.435C66.5056 174.655 66.5544 174.894 66.6032 175.153C66.6521 175.412 66.696 175.666 66.7351 175.915C66.779 176.159 66.8107 176.371 66.8303 176.552C66.8645 176.308 66.9108 176.012 66.9694 175.666C67.0329 175.314 67.0988 174.965 67.1672 174.618C67.2404 174.272 67.3039 173.981 67.3576 173.747L68.7199 167.902H70.9538ZM82.0207 173.241C82.0207 174.067 81.9182 174.818 81.7131 175.497C81.508 176.171 81.1955 176.752 80.7756 177.24C80.3605 177.729 79.8332 178.105 79.1936 178.368C78.5539 178.627 77.7971 178.756 76.923 178.756C76.049 178.756 75.2922 178.627 74.6525 178.368C74.0129 178.105 73.4831 177.729 73.0632 177.24C72.6481 176.752 72.3381 176.169 72.133 175.49C71.9279 174.811 71.8254 174.057 71.8254 173.227C71.8254 172.118 72.0061 171.154 72.3674 170.334C72.7336 169.508 73.2951 168.869 74.052 168.415C74.8088 167.961 75.7707 167.734 76.9377 167.734C78.0998 167.734 79.0544 167.961 79.8015 168.415C80.5534 168.869 81.1101 169.508 81.4714 170.334C81.8376 171.159 82.0207 172.128 82.0207 173.241ZM74.2058 173.241C74.2058 173.988 74.2985 174.633 74.4841 175.175C74.6745 175.712 74.9699 176.127 75.3703 176.42C75.7707 176.708 76.2883 176.852 76.923 176.852C77.5676 176.852 78.09 176.708 78.4904 176.42C78.8908 176.127 79.1813 175.712 79.362 175.175C79.5476 174.633 79.6403 173.988 79.6403 173.241C79.6403 172.118 79.4304 171.234 79.0104 170.59C78.5905 169.945 77.8996 169.623 76.9377 169.623C76.298 169.623 75.7756 169.77 75.3703 170.063C74.9699 170.351 74.6745 170.766 74.4841 171.308C74.2985 171.845 74.2058 172.489 74.2058 173.241ZM87.3601 167.902C88.3317 167.902 89.1325 168.019 89.7624 168.254C90.3972 168.488 90.8684 168.842 91.176 169.316C91.4836 169.789 91.6374 170.387 91.6374 171.11C91.6374 171.598 91.5446 172.026 91.3591 172.392C91.1735 172.758 90.9294 173.068 90.6267 173.322C90.3239 173.576 89.9968 173.783 89.6452 173.944L92.7946 178.61H90.2751L87.7189 174.501H86.5104V178.61H84.2399V167.902H87.3601ZM87.1989 169.762H86.5104V172.655H87.2429C87.9948 172.655 88.5319 172.531 88.8542 172.282C89.1813 172.028 89.3449 171.657 89.3449 171.169C89.3449 170.661 89.1691 170.299 88.8176 170.085C88.4709 169.87 87.9313 169.762 87.1989 169.762ZM103.027 173.153C103.027 174.359 102.795 175.368 102.331 176.178C101.872 176.984 101.205 177.592 100.331 178.002C99.4572 178.407 98.405 178.61 97.1745 178.61H94.1423V167.902H97.5041C98.6271 167.902 99.6013 168.102 100.426 168.503C101.252 168.898 101.891 169.486 102.345 170.268C102.8 171.044 103.027 172.006 103.027 173.153ZM100.668 173.212C100.668 172.421 100.551 171.772 100.317 171.264C100.087 170.751 99.7453 170.373 99.2912 170.129C98.842 169.884 98.2854 169.762 97.6213 169.762H96.4128V176.735H97.3869C98.4953 176.735 99.3181 176.44 99.8552 175.849C100.397 175.258 100.668 174.379 100.668 173.212Z",fill:"white"}),(0,s.jsx)("path",{d:"M109.158 77.28L99.015 120.75L87.745 77.28H82.915H78.085L66.815 120.75L56.672 77.28H47.334L61.019 132.02H71.323L82.915 87.101L94.507 132.02H104.811L118.496 77.28H109.158Z",fill:"white"})]}),d=(0,s.jsxs)("svg",{width:"161",height:"205",viewBox:"0 0 161 205",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M123.763 9.01997L152.45 37.7071V192.06C152.45 193.208 151.994 194.31 151.182 195.122C150.37 195.934 149.268 196.39 148.12 196.39H12.88C11.7316 196.39 10.6302 195.934 9.81822 195.122L9.46466 195.475L9.81821 195.122C9.00618 194.31 8.54999 193.208 8.54999 192.06V13.35C8.54999 12.2016 9.00618 11.1002 9.81822 10.2882C10.6302 9.47617 11.7316 9.01997 12.88 9.01997H123.763Z",fill:"#1F7244",stroke:"#195B36"}),(0,s.jsx)("path",{opacity:"0.2",d:"M151.5 37.47H128.833C127.551 37.47 126.322 36.9783 125.416 36.1031C124.509 35.228 124 34.041 124 32.8033V9.96997L151.5 37.47Z",fill:"black"}),(0,s.jsx)("path",{d:"M68.5777 170.108C68.1431 170.108 67.7574 170.193 67.4204 170.364C67.0884 170.53 66.8077 170.772 66.5782 171.089C66.3536 171.407 66.1827 171.79 66.0655 172.239C65.9483 172.688 65.8897 173.194 65.8897 173.755C65.8897 174.512 65.9825 175.159 66.168 175.696C66.3584 176.228 66.6514 176.636 67.0469 176.919C67.4424 177.198 67.9527 177.337 68.5777 177.337C69.0122 177.337 69.4468 177.288 69.8814 177.19C70.3208 177.093 70.7969 176.953 71.3096 176.773V178.677C70.836 178.872 70.3697 179.012 69.9107 179.095C69.4517 179.182 68.9366 179.226 68.3653 179.226C67.2618 179.226 66.3536 178.999 65.6407 178.545C64.9327 178.086 64.4078 177.447 64.066 176.626C63.7242 175.801 63.5533 174.839 63.5533 173.741C63.5533 172.93 63.6631 172.188 63.8828 171.514C64.1026 170.84 64.4248 170.257 64.8496 169.764C65.2745 169.27 65.7994 168.89 66.4244 168.621C67.0494 168.352 67.7671 168.218 68.5777 168.218C69.1099 168.218 69.6421 168.286 70.1744 168.423C70.7115 168.555 71.2242 168.738 71.7124 168.973L70.98 170.818C70.5796 170.628 70.1768 170.462 69.7715 170.32C69.3662 170.179 68.9683 170.108 68.5777 170.108ZM79.7618 179.08H73.5948V168.372H79.7618V170.232H75.8653V172.583H79.4908V174.444H75.8653V177.205H79.7618V179.08ZM82.003 179.08V168.372H84.2735V177.205H88.6167V179.08H82.003ZM90.4844 179.08V168.372H92.7549V177.205H97.0982V179.08H90.4844Z",fill:"white"}),(0,s.jsx)("path",{d:"M84.9275 99.6943L103.04 72.92H94.185L80.5 93.1416L66.815 72.92H57.96L76.0725 99.6943L57.155 127.66H66.01L80.5 106.247L94.99 127.66H103.845L84.9275 99.6943Z",fill:"white"})]}),h=(0,s.jsxs)("svg",{width:"161",height:"206",viewBox:"0 0 161 206",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M152.45 37.8027V192.557C152.45 193.709 151.993 194.813 151.181 195.628C150.369 196.442 149.268 196.899 148.12 196.899H12.88C11.732 196.899 10.6308 196.442 9.81867 195.628C9.0065 194.813 8.54999 193.709 8.54999 192.557V13.3834C8.54999 12.2313 9.0065 11.1266 9.81867 10.3123C10.6308 9.49806 11.732 9.04086 12.88 9.04086H123.762L152.45 37.8027Z",fill:"#DD682B",stroke:"#B15322"}),(0,s.jsx)("path",{opacity:"0.2",d:"M151.5 37.596H128.8C127.519 37.596 126.29 37.0858 125.385 36.1776C124.479 35.2695 123.97 34.0378 123.97 32.7535V9.97L151.5 37.596Z",fill:"black"}),(0,s.jsx)("path",{d:"M68.0131 176.528C68.0131 177.163 67.8593 177.714 67.5517 178.183C67.2441 178.652 66.7949 179.013 66.2041 179.267C65.6181 179.521 64.9052 179.648 64.0654 179.648C63.6943 179.648 63.3305 179.624 62.9741 179.575C62.6225 179.526 62.2832 179.455 61.956 179.362C61.6337 179.265 61.3261 179.145 61.0332 179.003V176.894C61.541 177.119 62.0683 177.321 62.6152 177.502C63.1621 177.683 63.7041 177.773 64.2412 177.773C64.6123 177.773 64.9101 177.724 65.1347 177.627C65.3642 177.529 65.5302 177.395 65.6328 177.224C65.7353 177.053 65.7866 176.857 65.7866 176.638C65.7866 176.369 65.6962 176.14 65.5156 175.949C65.3349 175.759 65.0859 175.581 64.7685 175.415C64.456 175.249 64.102 175.07 63.7065 174.88C63.4575 174.763 63.1865 174.621 62.8935 174.455C62.6005 174.284 62.3222 174.077 62.0585 173.833C61.7949 173.588 61.5776 173.293 61.4067 172.946C61.2407 172.595 61.1577 172.175 61.1577 171.687C61.1577 171.047 61.3042 170.5 61.5971 170.046C61.8901 169.592 62.3076 169.245 62.8496 169.006C63.3964 168.762 64.041 168.64 64.7832 168.64C65.3398 168.64 65.8696 168.706 66.3725 168.837C66.8803 168.964 67.4101 169.15 67.9619 169.394L67.2294 171.159C66.7363 170.959 66.2944 170.805 65.9038 170.698C65.5131 170.585 65.1152 170.529 64.7099 170.529C64.4267 170.529 64.185 170.576 63.9848 170.669C63.7846 170.756 63.6333 170.883 63.5307 171.049C63.4282 171.21 63.3769 171.398 63.3769 171.613C63.3769 171.867 63.4501 172.082 63.5966 172.258C63.748 172.429 63.9726 172.595 64.2705 172.756C64.5732 172.917 64.9492 173.105 65.3984 173.32C65.9453 173.579 66.4116 173.85 66.7973 174.133C67.1879 174.411 67.4882 174.741 67.6982 175.122C67.9082 175.498 68.0131 175.966 68.0131 176.528ZM69.9541 179.502V168.794H72.2246V177.627H76.5678V179.502H69.9541ZM78.4355 179.502V168.794H80.706V179.502H78.4355ZM92.2856 174.045C92.2856 175.251 92.0537 176.259 91.5898 177.07C91.1308 177.876 90.4643 178.483 89.5903 178.894C88.7163 179.299 87.664 179.502 86.4335 179.502H83.4013V168.794H86.7631C87.8862 168.794 88.8603 168.994 89.6855 169.394C90.5107 169.79 91.1503 170.378 91.6044 171.159C92.0585 171.936 92.2856 172.898 92.2856 174.045ZM89.9272 174.104C89.9272 173.313 89.81 172.663 89.5756 172.155C89.3461 171.643 89.0043 171.264 88.5502 171.02C88.101 170.776 87.5444 170.654 86.8803 170.654H85.6718V177.627H86.6459C87.7543 177.627 88.5771 177.331 89.1142 176.74C89.6562 176.149 89.9272 175.271 89.9272 174.104ZM100.672 179.502H94.5048V168.794H100.672V170.654H96.7753V173.005H100.401V174.865H96.7753V177.627H100.672V179.502Z",fill:"white"}),(0,s.jsx)("path",{d:"M80.5 111.848C87.332 111.848 93.8841 109.127 98.7151 104.283C103.546 99.44 106.26 92.8709 106.26 86.0212H80.5V60.1944C73.668 60.1944 67.1159 62.9154 62.2849 67.7589C57.454 72.6024 54.74 79.1715 54.74 86.0212C54.74 92.8709 57.454 99.44 62.2849 104.283C67.1159 109.127 73.668 111.848 80.5 111.848Z",fill:"white"}),(0,s.jsx)("path",{d:"M85.33 55.3519V81.1787H111.09C111.09 74.329 108.376 67.7598 103.545 62.9164C98.7141 58.0729 92.162 55.3519 85.33 55.3519Z",fill:"white"}),(0,s.jsx)("path",{d:"M120.75 144.131H40.25V147.36H120.75V144.131Z",fill:"white"}),(0,s.jsx)("path",{d:"M120.75 134.446H40.25V137.675H120.75V134.446Z",fill:"white"}),(0,s.jsx)("path",{d:"M120.75 124.761H40.25V127.99H120.75V124.761Z",fill:"white"})]}),r=(0,s.jsxs)("svg",{width:"163",height:"205",viewBox:"0 0 163 205",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M154.4 37.126V192.087C154.4 193.371 153.888 194.603 152.977 195.511C152.065 196.419 150.829 196.929 149.54 196.929H13.46C12.171 196.929 10.9349 196.419 10.0234 195.511C9.11201 194.603 8.59998 193.371 8.59998 192.087V12.9134C8.59998 11.6291 9.11201 10.3974 10.0234 9.4892C10.9349 8.58105 12.171 8.07086 13.46 8.07086H125.24L154.4 37.126Z",fill:"#F8F8F8"}),(0,s.jsx)("path",{opacity:"0.2",d:"M125.24 8.07086H13.46C12.171 8.07086 10.9349 8.58105 10.0234 9.4892C9.11201 10.3974 8.59998 11.6291 8.59998 12.9134V192.087C8.59998 193.371 9.11201 194.603 10.0234 195.511C10.9349 196.419 12.171 196.929 13.46 196.929H149.54C150.829 196.929 152.065 196.419 152.977 195.511C153.888 194.603 154.4 193.371 154.4 192.087V37.126L125.24 8.07086ZM152.78 192.087C152.78 192.943 152.439 193.764 151.831 194.369C151.223 194.975 150.399 195.315 149.54 195.315H13.46C12.6007 195.315 11.7766 194.975 11.1689 194.369C10.5613 193.764 10.22 192.943 10.22 192.087V12.9134C10.22 12.0572 10.5613 11.236 11.1689 10.6306C11.7766 10.0252 12.6007 9.68504 13.46 9.68504H124.576L125.24 10.3468V32.2835C125.24 33.5678 125.752 34.7995 126.663 35.7076C127.575 36.6158 128.811 37.126 130.1 37.126H152.116L152.78 37.7878V192.087Z",fill:"black"}),(0,s.jsxs)("g",{opacity:"0.2",children:[(0,s.jsx)("path",{opacity:"0.2",d:"M122 138.819H81.5V142.047H122V138.819Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.2",d:"M122 129.134H41V132.362H122V129.134Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.2",d:"M122 119.449H41V122.677H122V119.449Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.2",d:"M122 109.764H41V112.992H122V109.764Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.2",d:"M122 100.079H41V103.307H122V100.079Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.2",d:"M79.88 69.4094H41V72.6378H79.88V69.4094Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.2",d:"M71.78 59.7244H41V62.9527H71.78V59.7244Z",fill:"black"})]})]}),c=e=>{switch(e){case"word":return a;case"cell":return d;case"slide":return h;default:return r}},w=window.wp.element,p={height:"500px"},H=(0,s.jsxs)("svg",{width:"66",height:"60",viewBox:"0 0 66 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 59.2644L2.20792 46.9066C-0.0693069 45.8277 -0.0693069 44.1604 2.20792 43.1796L11.5148 38.8642L28.8416 46.9066C31.1188 47.9854 34.7822 47.9854 36.9604 46.9066L54.2871 38.8642L63.5941 43.1796C65.8713 44.2585 65.8713 45.9258 63.5941 46.9066L36.8614 59.2644C34.7822 60.2452 31.1188 60.2452 28.9406 59.2644Z",fill:"black"}),(0,s.jsx)("path",{opacity:"0.75",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 44.0606L2.20792 31.7028C-0.069307 30.6239 -0.069307 28.9566 2.20792 27.9758L11.3168 23.7584L28.9406 31.8989C31.2178 32.9778 34.8812 32.9778 37.0594 31.8989L54.6832 23.7584L63.7921 27.9758C66.0693 29.0547 66.0693 30.722 63.7921 31.7028L37.0594 44.0606C34.7822 45.1395 31.1188 45.1395 28.9406 44.0606Z",fill:"black"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 29.2518L2.20792 16.8939C-0.069307 15.8151 -0.069307 14.1478 2.20792 13.167L28.9406 0.809144C31.2178 -0.269715 34.8812 -0.269715 37.0594 0.809144L63.7921 13.167C66.0693 14.2458 66.0693 15.9132 63.7921 16.8939L37.0594 29.2518C34.7822 30.2325 31.1188 30.2325 28.9406 29.2518Z",fill:"black"})]});(0,t.registerBlockType)(l.UU,{icon:H,edit:({attributes:e,setAttributes:t})=>{const[l,a]=(0,n.useState)(null),d=["core/bold","core/image","core/italic","core/strikethrough","core/text-color","core/code","core/keyboard","core/subscript","core/superscript"];let h=[];const r=[{label:(0,C.__)("Embedded","onlyoffice"),value:"embedded"},{label:(0,C.__)("Link"),value:"link"}];(0,n.useEffect)(()=>{e.id&&ONLYOFFICE.formatsUtils.getFileName(e.id).then(e=>{const t=ONLYOFFICE.formatsUtils.getDocumentType(e);a(t)})},[e.id]),e.hasOwnProperty("width")&&e.width.length>0&&(p.width=e.width),e.hasOwnProperty("height")&&e.height.length>0&&(p.height=e.height);let w=!0;"full"===e.align&&(delete p.width,w=!1);const H=function(e){var t=ONLYOFFICE.mimeTypes;if(void 0!==t[e])return t[e];for(var l in t)if(-1!==l.indexOf(e))return t[l];return!1};for(let e of ONLYOFFICE.formatsUtils.getViewableExtensions()){let t=H(e);t&&h.push(t)}const f="link"!==e.documentView&&e.id?(0,i.useBlockProps)({style:p}):(0,i.useBlockProps)({style:null});return(0,s.jsx)("div",{...f,children:e.id?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.InspectorControls,{children:(0,s.jsxs)(o.PanelBody,{title:(0,C.__)("Settings"),children:[(0,s.jsx)(o.__experimentalInputControl,{label:(0,C.__)("Name"),value:e.fileName,onChange:e=>t({fileName:e})}),(0,s.jsx)(o.SelectControl,{label:(0,C.__)("Document view","onlyoffice"),value:e.documentView,options:r,onChange:e=>{t({documentView:e})}}),"link"===e.documentView?(0,s.jsxs)("div",{children:[(0,s.jsx)(o.ToggleControl,{checked:e.inNewTab,label:(0,C.__)("Open in new tab"),onChange:e=>t({inNewTab:e})}),(0,s.jsx)(o.ToggleControl,{checked:e.showOpenButton,label:(0,C.__)("Show Open in ONLYOFFICE button","onlyoffice"),onChange:e=>t({showOpenButton:e})})]}):(0,s.jsxs)("div",{children:[w?(0,s.jsx)(i.HeightControl,{label:(0,C.__)("Width","onlyoffice"),value:e.width,onChange:e=>t({width:e})}):"",(0,s.jsx)(i.HeightControl,{label:(0,C.__)("Height","onlyoffice"),value:e.height,onChange:e=>t({height:e})})]})]})},"setting"),"link"===e.documentView?(0,s.jsxs)("div",{children:[(0,s.jsx)(i.RichText,{tagName:"a",allowedFormats:d,onChange:e=>t({fileName:e}),value:e.fileName}),e.showOpenButton?(0,s.jsx)("div",{class:"wp-block-onlyoffice-wordpress-onlyoffice__button-richtext-wrapper",children:(0,s.jsx)(i.RichText,{tagName:"div",className:"wp-element-button",value:e.openButtonText||(0,C.__)("Open in ONLYOFFICE","onlyoffice"),allowedFormats:d,onChange:e=>t({openButtonText:e}),placeholder:(0,C.__)("Add text...")})}):""]}):(0,s.jsx)("div",{className:`wp-block-onlyoffice-wordpress-onlyoffice__embedded ${l}`,children:(0,s.jsxs)("div",{children:[c(l),(0,s.jsxs)("p",{children:[" ",l?e.fileName||"":(0,C.__)("File not found!","onlyoffice")]})]})}),(0,s.jsx)(i.BlockControls,{group:"other",children:(0,s.jsx)(i.MediaReplaceFlow,{mediaId:e.id,allowedTypes:h,accept:h.join(),onSelect:e=>{e&&e.hasOwnProperty("id")&&t({id:e.id,fileName:e.filename||e.guid.raw.substring(e.guid.raw.lastIndexOf("/")+1)})},name:(0,C.__)("Replace")})})]}):(0,s.jsx)(i.MediaPlaceholder,{labels:{title:"ONLYOFFICE Docs"},allowedTypes:h,accept:h.join(),onSelect:e=>{e&&e.hasOwnProperty("id")&&t({id:e.id,fileName:e.filename||e.guid.raw.substring(e.guid.raw.lastIndexOf("/")+1)})}})})},save:({attributes:e})=>{if(!e.id)return"";let t="";return e.hasOwnProperty("id")&&(t+="id="+e.id+" "),e.hasOwnProperty("documentView")&&e.documentView.length>0&&(t+="documentView="+e.documentView+" "),e.hasOwnProperty("inNewTab")&&(t+="inNewTab="+e.inNewTab+" "),e.hasOwnProperty("align")&&e.align.length>0&&(t+="align="+e.align+" "),e.hasOwnProperty("width")&&e.width.length>0&&(t+="width="+e.width+" "),e.hasOwnProperty("height")&&e.height.length>0&&(t+="height="+e.height+" "),e.hasOwnProperty("showOpenButton")&&(t+="showOpenButton="+e.showOpenButton+" "),e.hasOwnProperty("openButtonText")&&e.openButtonText.length>0&&(t+="openButtonText="+e.openButtonText+" "),(0,s.jsx)(w.RawHTML,{children:`[onlyoffice ${t} /]`})}})})(); -
onlyoffice/trunk/onlyoffice-wordpress-block/src/edit.js
r3070758 r3334060 45 45 const viewOptions = [ 46 46 { 47 label: __('Embedded', 'onlyoffice -plugin'),47 label: __('Embedded', 'onlyoffice'), 48 48 value: 'embedded' 49 49 }, … … 111 111 <InputControl label={__('Name')} value={attributes.fileName} onChange={ ( value ) => setAttributes({ fileName: value }) } /> 112 112 <SelectControl 113 label={__('Document view', 'onlyoffice -plugin')}113 label={__('Document view', 'onlyoffice')} 114 114 value={attributes.documentView} 115 115 options={viewOptions} … … 126 126 <ToggleControl 127 127 checked={attributes.showOpenButton} 128 label={__('Show Open in ONLYOFFICE button', 'onlyoffice -plugin')}128 label={__('Show Open in ONLYOFFICE button', 'onlyoffice')} 129 129 onChange={(value) => setAttributes({ showOpenButton: value })} 130 130 /> … … 134 134 { 135 135 showWidthControl ? 136 <HeightControl label={ __("Width", "onlyoffice -docspace-plugin") } value={attributes.width} onChange={ ( value ) => setAttributes({ width: value }) }/>136 <HeightControl label={ __("Width", "onlyoffice") } value={attributes.width} onChange={ ( value ) => setAttributes({ width: value }) }/> 137 137 : 138 138 '' 139 139 } 140 <HeightControl label={ __("Height", "onlyoffice -docspace-plugin") } value={attributes.height} onChange={ ( value ) => setAttributes({ height: value }) }/>140 <HeightControl label={ __("Height", "onlyoffice") } value={attributes.height} onChange={ ( value ) => setAttributes({ height: value }) }/> 141 141 </div> 142 142 } … … 159 159 tagName="div" 160 160 className = {'wp-element-button'} 161 value= { attributes.openButtonText || __('Open in ONLYOFFICE', 'onlyoffice -plugin') }161 value= { attributes.openButtonText || __('Open in ONLYOFFICE', 'onlyoffice') } 162 162 allowedFormats={ richTextAllowedFormats } 163 163 onChange={ ( openButtonText ) => setAttributes( { openButtonText } ) } … … 174 174 <div> 175 175 {getLogoByDocumentType(documentType)} 176 <p> {documentType ? attributes.fileName || "" : __('File not found!', 'onlyoffice -plugin')}</p>176 <p> {documentType ? attributes.fileName || "" : __('File not found!', 'onlyoffice')}</p> 177 177 </div> 178 178 </div> -
onlyoffice/trunk/public/class-onlyoffice-plugin-public.php
r3070758 r3334060 74 74 register_rest_route( 75 75 'onlyoffice', 76 '/oo.callback /(?P<id>[^\/\n\r]+)',76 '/oo.callback', 77 77 array( 78 78 'methods' => WP_REST_Server::CREATABLE, 79 'args' => array( 80 'token' => array( 81 'sanitize_callback' => 'sanitize_text_field', 82 ), 83 ), 79 84 'callback' => array( $callback, 'callback' ), 80 'permission_callback' => array( $this, 'check_attachment_id' ),85 'permission_callback' => '__return_true', 81 86 ) 82 87 ); … … 84 89 register_rest_route( 85 90 'onlyoffice', 86 '/oo.callback-public-forms /(?P<id>[^\/\n\r]+)',91 '/oo.callback-public-forms', 87 92 array( 88 93 'methods' => WP_REST_Server::CREATABLE, 94 'args' => array( 95 'token' => array( 96 'sanitize_callback' => 'sanitize_text_field', 97 ), 98 ), 89 99 'callback' => array( $callback, 'callback_public_forms' ), 90 'permission_callback' => array( $this, 'check_attachment_id' ),100 'permission_callback' => '__return_true', 91 101 ) 92 102 ); … … 94 104 register_rest_route( 95 105 'onlyoffice', 96 '/oo.getfile /(?P<id>[^\/\n\r]+)',106 '/oo.getfile', 97 107 array( 98 108 'methods' => WP_REST_Server::READABLE, 109 'args' => array( 110 'token' => array( 111 'sanitize_callback' => 'sanitize_text_field', 112 ), 113 ), 99 114 'callback' => array( $download, 'get_file' ), 100 'permission_callback' => array( $this, 'check_attachment_id' ),115 'permission_callback' => '__return_true', 101 116 ) 102 117 ); … … 115 130 116 131 if ( null === $post || 'attachment' !== $post->post_type ) { 117 wp_die( esc_attr_e( 'Post is not an attachment', 'onlyoffice -plugin' ) );132 wp_die( esc_attr_e( 'Post is not an attachment', 'onlyoffice' ) ); 118 133 } 119 134 -
onlyoffice/trunk/public/views/class-onlyoffice-plugin-callback.php
r3070758 r3334060 111 111 } 112 112 113 $ param = urldecode( str_replace( ',', '%', $req->get_params()['id'] ));113 $token_value = Onlyoffice_Plugin_Url_Manager::decode_url_token( $req->get_query_params()['token'] ); 114 114 115 $attachemnt_id = intval( Onlyoffice_Plugin_Url_Manager::decode_openssl_data( $param, get_site_option( 'onlyoffice-plugin-uuid' ) ) ); 116 $user_id = isset( $body['actions'] ) ? $body['actions'][0]['userid'] : null; 115 if ( false === $token_value ) { 116 wp_die( 'Invalid link token!', '', array( 'response' => 401 ) ); 117 } 118 119 if ( 'callback' !== $token_value->action ) { 120 wp_die( 'Forbidden!', '', array( 'response' => 403 ) ); 121 } 122 123 $attachment_id = $token_value->attachment_id; 124 $user_id = $token_value->user_id; 117 125 118 126 $user = get_user_by( 'id', $user_id ); 119 127 if ( null !== $user_id && $user ) { 120 128 wp_set_current_user( $user_id, $user->user_login ); 121 wp_set_auth_cookie( $user_id );122 do_action( 'wp_login', $user->user_login, $user );123 129 } else { 124 130 wp_die( 'No user information', '', array( 'response' => 403 ) ); … … 136 142 break; 137 143 case 'MustSave': 138 $can_edit = Onlyoffice_Plugin_Document_Manager::can_user_edit_attachment( $attach emnt_id );144 $can_edit = Onlyoffice_Plugin_Document_Manager::can_user_edit_attachment( $attachment_id ); 139 145 if ( ! $can_edit ) { 140 146 wp_die( 'No edit capability', '', array( 'response' => 403 ) ); 141 147 } 142 148 143 $locked = wp_check_post_lock( $attach emnt_id );149 $locked = wp_check_post_lock( $attachment_id ); 144 150 if ( ! $locked ) { 145 wp_set_post_lock( $attach emnt_id );151 wp_set_post_lock( $attachment_id ); 146 152 } 147 153 148 $response_json['error'] = Onlyoffice_Plugin_Callback_Manager::proccess_save( $body, $attach emnt_id );154 $response_json['error'] = Onlyoffice_Plugin_Callback_Manager::proccess_save( $body, $attachment_id ); 149 155 break; 150 156 case 'Corrupted': 151 157 case 'Closed': 152 158 case 'NotFound': 153 delete_post_meta( $attach emnt_id, '_edit_lock' );159 delete_post_meta( $attachment_id, '_edit_lock' ); 154 160 break; 155 161 case 'MustForceSave': -
onlyoffice/trunk/public/views/class-onlyoffice-plugin-download.php
r3070758 r3334060 67 67 } 68 68 69 $ decoded = json_decode( Onlyoffice_Plugin_Url_Manager::decode_openssl_data( $req->get_params()['id'] ));69 $token_value = Onlyoffice_Plugin_Url_Manager::decode_url_token( $req->get_query_params()['token'] ); 70 70 71 $attachment_id = $decoded->attachment_id; 72 $user_id = $decoded->user_id; 71 if ( false === $token_value ) { 72 wp_die( 'Invalid link token!', '', array( 'response' => 401 ) ); 73 } 74 75 if ( 'download' !== $token_value->action ) { 76 wp_die( 'Forbidden!', '', array( 'response' => 403 ) ); 77 } 78 79 $attachment_id = $token_value->attachment_id; 80 $user_id = $token_value->user_id; 73 81 74 82 if ( 0 !== $user_id ) { … … 76 84 if ( ( null !== $user_id ) && $user ) { 77 85 wp_set_current_user( $user_id, $user->user_login ); 78 wp_set_auth_cookie( $user_id );79 do_action( 'wp_login', $user->user_login, $user );80 86 } else { 81 87 wp_die( 'No user information', '', array( 'response' => 403 ) ); -
onlyoffice/trunk/readme.txt
r3200917 r3334060 1 1 === ONLYOFFICE Docs === 2 2 Contributors: onlyoffice 3 Tags: onlyoffice, collaboration, editor, office, document , spreadsheet, presentation, forms, pdf3 Tags: onlyoffice, collaboration, editor, office, document 4 4 Requires at least: 5.7 5 Tested up to: 6. 16 Stable tag: 2. 2.05 Tested up to: 6.8 6 Stable tag: 2.3.0 7 7 Requires PHP: 7.4 8 8 License: GPLv2 … … 13 13 == Description == 14 14 15 ONLYOFFICE Docs integrationplugin allows WordPress administrators to open documents, spreadsheets, and presentations for collaborative editing using ONLYOFFICE Docs (online document editors). In published posts, the editors are visible to all WordPress site visitors (both authorized and unauthorized) in the Embedded mode only.15 ONLYOFFICE Docs plugin allows WordPress administrators to open documents, spreadsheets, and presentations for collaborative editing using ONLYOFFICE Docs (online document editors). In published posts, the editors are visible to all WordPress site visitors (both authorized and unauthorized) in the Embedded mode only. 16 16 17 17 **Editing files uploaded to Wordpress** … … 33 33 Go to WordPress administrative dashboard -> ONLYOFFICE Docs -> Settings. Specify the URL of the installed ONLYOFFICE Document Server and the Secret key. 34 34 35 Please note: Starting from version 7.2 of ONLYOFFICE Docs, JWT is enabled by default and the secret key is generated automatically to restrict the access to ONLYOFFICE Docs and for security reasons and data integrity. Specify your own secret key in the WordPress administrative configuration. In the ONLYOFFICE Docs [config file](https://api.onlyoffice.com/ editors/signature/), specify the same secret key and enable the validation.35 Please note: Starting from version 7.2 of ONLYOFFICE Docs, JWT is enabled by default and the secret key is generated automatically to restrict the access to ONLYOFFICE Docs and for security reasons and data integrity. Specify your own secret key in the WordPress administrative configuration. In the ONLYOFFICE Docs [config file](https://api.onlyoffice.com/docs/docs-api/additional-api/signature/), specify the same secret key and enable the validation. 36 36 37 37 = What collaborative features do the editors provide? = … … 50 50 51 51 == Changelog == 52 = 2.3.0 = 53 * improved security for /download and /callback api endpoitns 54 52 55 = 2.2.0 = 53 56 * fixed xss vulnerabilities in onlyoffice-docs page component -
onlyoffice/trunk/vendor/autoload.php
r3070758 r3334060 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 23 20 require_once __DIR__ . '/composer/autoload_real.php'; 24 21 25 return ComposerAutoloaderInit 233fba0d7a41b0f5c532bee7586a2e7b::getLoader();22 return ComposerAutoloaderInit828f6f1f5fb72b40c12ff610733dc878::getLoader(); -
onlyoffice/trunk/vendor/composer/InstalledVersions.php
r2976472 r3334060 28 28 { 29 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 30 36 * @var mixed[]|null 31 37 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 312 341 } 313 342 … … 323 352 324 353 $installed = array(); 354 $copiedLocalDir = false; 325 355 326 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 327 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 328 360 if (isset(self::$installedByVendor[$vendorDir])) { 329 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 363 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 364 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 self::$installed = $installed[count($installed) - 1]; 365 self::$installedByVendor[$vendorDir] = $required; 366 $installed[] = $required; 367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 368 self::$installed = $required; 369 self::$installedIsLocalDir = true; 336 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 337 374 } 338 375 } … … 351 388 } 352 389 353 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 354 391 $installed[] = self::$installed; 355 392 } -
onlyoffice/trunk/vendor/composer/autoload_real.php
r3070758 r3334060 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 233fba0d7a41b0f5c532bee7586a2e7b5 class ComposerAutoloaderInit828f6f1f5fb72b40c12ff610733dc878 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 233fba0d7a41b0f5c532bee7586a2e7b', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit828f6f1f5fb72b40c12ff610733dc878', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 233fba0d7a41b0f5c532bee7586a2e7b', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit828f6f1f5fb72b40c12ff610733dc878', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 233fba0d7a41b0f5c532bee7586a2e7b::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit828f6f1f5fb72b40c12ff610733dc878::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
onlyoffice/trunk/vendor/composer/autoload_static.php
r3070758 r3334060 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 233fba0d7a41b0f5c532bee7586a2e7b7 class ComposerStaticInit828f6f1f5fb72b40c12ff610733dc878 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 28 28 { 29 29 return \Closure::bind(function () use ($loader) { 30 $loader->prefixLengthsPsr4 = ComposerStaticInit 233fba0d7a41b0f5c532bee7586a2e7b::$prefixLengthsPsr4;31 $loader->prefixDirsPsr4 = ComposerStaticInit 233fba0d7a41b0f5c532bee7586a2e7b::$prefixDirsPsr4;32 $loader->classMap = ComposerStaticInit 233fba0d7a41b0f5c532bee7586a2e7b::$classMap;30 $loader->prefixLengthsPsr4 = ComposerStaticInit828f6f1f5fb72b40c12ff610733dc878::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInit828f6f1f5fb72b40c12ff610733dc878::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInit828f6f1f5fb72b40c12ff610733dc878::$classMap; 33 33 34 34 }, null, ClassLoader::class); -
onlyoffice/trunk/vendor/composer/installed.json
r3200917 r3334060 3 3 { 4 4 "name": "firebase/php-jwt", 5 "version": "v6.1 0.2",6 "version_normalized": "6.1 0.2.0",5 "version": "v6.11.1", 6 "version_normalized": "6.11.1.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/firebase/php-jwt.git", 10 "reference": " 30c19ed0f3264cb660ea496895cfb6ef7ee3653b"10 "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/firebase/php-jwt/zipball/ 30c19ed0f3264cb660ea496895cfb6ef7ee3653b",15 "reference": " 30c19ed0f3264cb660ea496895cfb6ef7ee3653b",14 "url": "https://api.github.com/repos/firebase/php-jwt/zipball/d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", 15 "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", 16 16 "shasum": "" 17 17 }, … … 31 31 "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" 32 32 }, 33 "time": "202 4-11-24T11:22:49+00:00",33 "time": "2025-04-09T20:32:01+00:00", 34 34 "type": "library", 35 35 "installation-source": "dist", … … 63 63 "support": { 64 64 "issues": "https://github.com/firebase/php-jwt/issues", 65 "source": "https://github.com/firebase/php-jwt/tree/v6.1 0.2"65 "source": "https://github.com/firebase/php-jwt/tree/v6.11.1" 66 66 }, 67 67 "install-path": "../firebase/php-jwt" -
onlyoffice/trunk/vendor/composer/installed.php
r3200917 r3334060 2 2 'root' => array( 3 3 'name' => '__root__', 4 'pretty_version' => ' dev-main',5 'version' => ' dev-main',6 'reference' => ' 3276a73d20ca9117a2736d16d86e9b5c40283ee1',4 'pretty_version' => 'v2.3.0', 5 'version' => '2.3.0.0', 6 'reference' => 'f82295b94a1b850b95389114e7438c1a2ecca56f', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '__root__' => array( 14 'pretty_version' => ' dev-main',15 'version' => ' dev-main',16 'reference' => ' 3276a73d20ca9117a2736d16d86e9b5c40283ee1',14 'pretty_version' => 'v2.3.0', 15 'version' => '2.3.0.0', 16 'reference' => 'f82295b94a1b850b95389114e7438c1a2ecca56f', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'firebase/php-jwt' => array( 23 'pretty_version' => 'v6.1 0.2',24 'version' => '6.1 0.2.0',25 'reference' => ' 30c19ed0f3264cb660ea496895cfb6ef7ee3653b',23 'pretty_version' => 'v6.11.1', 24 'version' => '6.11.1.0', 25 'reference' => 'd1e91ecf8c598d073d0995afa8cd5c75c6e19e66', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../firebase/php-jwt', -
onlyoffice/trunk/vendor/composer/platform_check.php
r3200917 r3334060 20 20 } 21 21 } 22 trigger_error( 23 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 E_USER_ERROR 22 throw new \RuntimeException( 23 'Composer detected issues in your platform: ' . implode(' ', $issues) 25 24 ); 26 25 } -
onlyoffice/trunk/vendor/firebase/php-jwt/CHANGELOG.md
r3200917 r3334060 1 1 # Changelog 2 3 ## [6.11.1](https://github.com/firebase/php-jwt/compare/v6.11.0...v6.11.1) (2025-04-09) 4 5 6 ### Bug Fixes 7 8 * update error text for consistency ([#528](https://github.com/firebase/php-jwt/issues/528)) ([c11113a](https://github.com/firebase/php-jwt/commit/c11113afa13265e016a669e75494b9203b8a7775)) 9 10 ## [6.11.0](https://github.com/firebase/php-jwt/compare/v6.10.2...v6.11.0) (2025-01-23) 11 12 13 ### Features 14 15 * support octet typed JWK ([#587](https://github.com/firebase/php-jwt/issues/587)) ([7cb8a26](https://github.com/firebase/php-jwt/commit/7cb8a265fa81edf2fa6ef8098f5bc5ae573c33ad)) 16 17 18 ### Bug Fixes 19 20 * refactor constructor Key to use PHP 8.0 syntax ([#577](https://github.com/firebase/php-jwt/issues/577)) ([29fa2ce](https://github.com/firebase/php-jwt/commit/29fa2ce9e0582cd397711eec1e80c05ce20fabca)) 2 21 3 22 ## [6.10.2](https://github.com/firebase/php-jwt/compare/v6.10.1...v6.10.2) (2024-11-24) -
onlyoffice/trunk/vendor/firebase/php-jwt/README.md
r3200917 r3334060 49 49 50 50 // Pass a stdClass in as the third parameter to get the decoded header values 51 $decoded = JWT::decode($jwt, new Key($key, 'HS256'), $headers = new stdClass()); 51 $headers = new stdClass(); 52 $decoded = JWT::decode($jwt, new Key($key, 'HS256'), $headers); 52 53 print_r($headers); 53 54 … … 291 292 // JWK::parseKeySet($jwks) returns an associative array of **kid** to Firebase\JWT\Key 292 293 // objects. Pass this as the second parameter to JWT::decode. 293 JWT::decode($ payload, JWK::parseKeySet($jwks));294 JWT::decode($jwt, JWK::parseKeySet($jwks)); 294 295 ``` 295 296 … … 350 351 351 352 try { 352 $decoded = JWT::decode($ payload, $keys);353 $decoded = JWT::decode($jwt, $keys); 353 354 } catch (InvalidArgumentException $e) { 354 355 // provided key/key-array is empty or malformed. … … 380 381 use UnexpectedValueException; 381 382 try { 382 $decoded = JWT::decode($ payload, $keys);383 $decoded = JWT::decode($jwt, $keys); 383 384 } catch (LogicException $e) { 384 385 // errors having to do with environmental setup or malformed JWT Keys … … 395 396 ```php 396 397 // return type is stdClass 397 $decoded = JWT::decode($ payload, $keys);398 $decoded = JWT::decode($jwt, $keys); 398 399 399 400 // cast to array -
onlyoffice/trunk/vendor/firebase/php-jwt/src/JWK.php
r3200917 r3334060 173 173 $publicKey = JWT::convertBase64urlToBase64($jwk['x']); 174 174 return new Key($publicKey, $jwk['alg']); 175 case 'oct': 176 if (!isset($jwk['k'])) { 177 throw new UnexpectedValueException('k not set'); 178 } 179 180 return new Key(JWT::urlsafeB64Decode($jwk['k']), $jwk['alg']); 175 181 default: 176 182 break; -
onlyoffice/trunk/vendor/firebase/php-jwt/src/JWT.php
r3200917 r3334060 155 155 if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) { 156 156 $ex = new BeforeValidException( 157 'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) $payload->nbf)157 'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) floor($payload->nbf)) 158 158 ); 159 159 $ex->setPayload($payload); … … 166 166 if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) { 167 167 $ex = new BeforeValidException( 168 'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) $payload->iat)168 'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) floor($payload->iat)) 169 169 ); 170 170 $ex->setPayload($payload); -
onlyoffice/trunk/vendor/firebase/php-jwt/src/Key.php
r2976472 r3334060 10 10 class Key 11 11 { 12 /** @var string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate */13 private $keyMaterial;14 /** @var string */15 private $algorithm;16 17 12 /** 18 13 * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial … … 20 15 */ 21 16 public function __construct( 22 $keyMaterial,23 string $algorithm17 private $keyMaterial, 18 private string $algorithm 24 19 ) { 25 20 if ( … … 39 34 throw new InvalidArgumentException('Algorithm must not be empty'); 40 35 } 41 42 // TODO: Remove in PHP 8.0 in favor of class constructor property promotion43 $this->keyMaterial = $keyMaterial;44 $this->algorithm = $algorithm;45 36 } 46 37
Note: See TracChangeset
for help on using the changeset viewer.