Loading copyprevention.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,5 +2,5 @@ name: 'Copy Prevention' description: 'Makes copying from your site harder.' package: 'User interface' configure: copyprevention.settings_form core_version_requirement: '^8 || ^9' core_version_requirement: ^9.3 || ^10 type: module copyprevention.module +2 −2 Original line number Diff line number Diff line Loading @@ -68,12 +68,12 @@ function copyprevention_page_attachments(&$page) { return; } $path = $base_url . '/' . drupal_get_path('module', 'copyprevention'); $path = $base_url . '/' . \Drupal::service('extension.list.module')->getPath('copyprevention'); $settings = [ 'body' => array_filter(\Drupal::configFactory()->getEditable('copyprevention.settings')->get('copyprevention_body')), 'images' => array_filter(\Drupal::configFactory()->getEditable('copyprevention.settings')->get('copyprevention_images')), 'images_min_dimension' => \Drupal::configFactory()->getEditable('copyprevention.settings')->get('copyprevention_images_min_dimension'), 'transparentgif' => file_create_url($path . '/transparent.gif'), 'transparentgif' => \Drupal::service('file_url_generator')->generateAbsoluteString($path . '/transparent.gif'), ]; $page['#attached']['drupalSettings']['copyprevention'] = $settings; Loading Loading
copyprevention.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,5 +2,5 @@ name: 'Copy Prevention' description: 'Makes copying from your site harder.' package: 'User interface' configure: copyprevention.settings_form core_version_requirement: '^8 || ^9' core_version_requirement: ^9.3 || ^10 type: module
copyprevention.module +2 −2 Original line number Diff line number Diff line Loading @@ -68,12 +68,12 @@ function copyprevention_page_attachments(&$page) { return; } $path = $base_url . '/' . drupal_get_path('module', 'copyprevention'); $path = $base_url . '/' . \Drupal::service('extension.list.module')->getPath('copyprevention'); $settings = [ 'body' => array_filter(\Drupal::configFactory()->getEditable('copyprevention.settings')->get('copyprevention_body')), 'images' => array_filter(\Drupal::configFactory()->getEditable('copyprevention.settings')->get('copyprevention_images')), 'images_min_dimension' => \Drupal::configFactory()->getEditable('copyprevention.settings')->get('copyprevention_images_min_dimension'), 'transparentgif' => file_create_url($path . '/transparent.gif'), 'transparentgif' => \Drupal::service('file_url_generator')->generateAbsoluteString($path . '/transparent.gif'), ]; $page['#attached']['drupalSettings']['copyprevention'] = $settings; Loading