Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #484 from GetDKAN/7.x-1.14.2-upgrade
Browse files Browse the repository at this point in the history
Upgrade dkan to 7.x-1.14.2
  • Loading branch information
janette authored Feb 13, 2018
2 parents 20d19d6 + 3f99d5b commit 0fd5f12
Show file tree
Hide file tree
Showing 62 changed files with 360 additions and 404 deletions.
2 changes: 1 addition & 1 deletion build-dkan.make
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ projects:
download:
type: git
url: https://github.com/GetDKAN/dkan.git
tag: 7.x-1.14.1
tag: 7.x-1.14.2
14 changes: 14 additions & 0 deletions dkan/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
7.x-1.14.2
----------
- #2359 Upgrade filefield_sources to 1.11
- #2341 Modifies curl settings so url headers and info can be properly acquired with curl
- #2370 Patch features to add new line after <?php
- #2346 Updated Help page; can add your company to listing
- Remove out-dated owners.md file
- #2345 Site Manager Monthly Maintenance checklist
- #2347 Moving the "Adding New Content" page to main admin doc tree
- #2321 Update @resource_all_09 scenario
- #2327 Add results count to dkan admin views
- #2337 Pin sphinx to 1.5.6
- #2332 Remove redundant debug output

7.x-1.14.1
----------
- #2280 Fix contextual filter on list_of_users_groups view
Expand Down
36 changes: 0 additions & 36 deletions dkan/OWNERS.md

This file was deleted.

4 changes: 0 additions & 4 deletions dkan/dkan.info
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,3 @@ dependencies[] = dkan_datastore
dependencies[] = dkan_datastore_api
dependencies[] = open_data_schema_map_dkan
dependencies[] = visualization_entity_charts_dkan

; Information added by DKAN release script on 1/8/2018
version = 7.x-1.14.1
project = dkan
20 changes: 20 additions & 0 deletions dkan/docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
h1, h2, h3, h4, h5, h6 {
font-family: 'Lato', sans-serif;
font-weight: 900;
}
.wy-nav-side {
background: #212121;
}
.wy-nav-content {
color: #212121;
}
.wy-nav-content a,
.wy-nav-content a:visited {
color: #0071BC;
}
.wy-side-nav-search {
background-color: #0071BC;
}
.wy-side-nav-search>div.version {
color: #eee;
}
4 changes: 3 additions & 1 deletion dkan/docs/admin/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ Appearance
:maxdepth: 1

account_access_and_setup
adding_new_content
admin_menu
appearance
data_and_content/index
people/index
structure
admin_menu

47 changes: 47 additions & 0 deletions dkan/docs/admin/sitemanagermaintenance
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Site Manager Monthly Maintenance Checklist


### Content
*(Accessible via the “Content” tab on the black site administration toolbar)*

- Check the “Content” list for an overview of the content currently hosted on your site.

- Is there any content that needs to be published or unpublished? Are there duplicates? If so, take a moment to clean up your content.

### Groups
*(Accessible via the “Groups” button on the main site navigation bar)*

- Is the Groups list up to date?

- Does each Group have an appropriate image and description?

### Tags and Taxonomies
*(Mouse over Site Configuration on the black site administration toolbar, then click “Taxonomy”)*

- Check your site’s list of Tags, located in the Taxonomy menu. To view a list of all Tags on the site, click “List terms.”

- Are there any misspelled tags? Are there any duplicate tags? If so, take a moment to clean up your tags.

### User management
*(Accessible via the “People” tab on the black site administration toolbar)*

- Is the user list up to date? For site security, always double-check that there aren’t any accounts accessible to users who have left your organization. If this is the case, their accounts should be canceled or blocked.

- Do all of the users in your organization have the proper site roles? (Site Manager, Editor, Content Creator.)

### Workbench (Optional, if the Workbench/Workflow Modules have been enabled)
*(Accessible via the “My Workbench” tab in the site administration bar)*

- Workbench moderation queue tasks - check each of these tabs:

**My drafts**
- Are there any drafts that ought to be pushed to “Published” or “Needs Review”?

**Needs review**
- Are there any items under review that ought to be pushed back to “Draft” or published?

**Stale drafts**
- These are drafts that have been unmoderated for over 72 hours. Make sure content doesn’t build up under this queue!

**Stale reviews**
- These are items under review that have been unmoderated for over 72 hours.
10 changes: 10 additions & 0 deletions dkan/docs/community/help.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ For professional DKAN development services and support:
- `Angry Cactus <http://www.angrycactus.biz/>`_
- `National Democratic Institute <https://www.nditech.org/project/dkan>`_
- `Annai <http://landing.dkan.annai.co.jp/>`_

Add your company
=================

If you provide DKAN development and/or support services, here's how to add your company to business directory:

- Create a /dkan page on your website (ex: https://civicactions.com/dkan/)
- Create a [new issue](https://github.com/GetDKAN/dkan/issues/new) and include logo, company name, link to /dkan page, brief description of services with respect to DKAN

Someone on the DKAN team will review your request and add your company if it's appropriate for the DKAN community.
7 changes: 4 additions & 3 deletions dkan/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
master_doc = 'index'

# General information about the project.
project = u'DKAN'
project = u'DKAN Docs'
copyright = u'2017'
author = u'DKAN Team'


version = '1.13'
release = '1.13'
version = '1.14'
release = '1.14'

language = 'en'

Expand Down Expand Up @@ -214,6 +214,7 @@

github_doc_root = 'https://github.com/GetDKAN/dkan/tree/rtd/docs/'
def setup(app):
app.add_stylesheet( "css/custom.css" )
app.add_config_value('recommonmark_config', {
'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
Expand Down
2 changes: 1 addition & 1 deletion dkan/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx>=1.5.2
sphinx==1.5.6
sphinx-rtd-theme>=0.2.4
recommonmark==0.4.0
# sphinxcontrib-httpdomain==1.5.0
16 changes: 9 additions & 7 deletions dkan/drupal-org.make
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
api: '2'
core: 7.x
includes:
- https://raw.githubusercontent.com/NuCivic/visualization_entity/7.x-1.14.1/visualization_entity.make
- https://raw.githubusercontent.com/NuCivic/open_data_schema_map/7.x-1.14.1/open_data_schema_map.make
- https://raw.githubusercontent.com/NuCivic/visualization_entity/7.x-2.0/visualization_entity.make
- https://raw.githubusercontent.com/NuCivic/open_data_schema_map/7.x-2.0/open_data_schema_map.make
- https://raw.githubusercontent.com/NuCivic/leaflet_draw_widget/5a5f8faf664aeca02371f6692307580d9fab9116/leaflet_widget.make
- https://raw.githubusercontent.com/NuCivic/recline/7.x-1.14.1/recline.make
- https://raw.githubusercontent.com/NuCivic/recline/7.x-2.0/recline.make
projects:
admin_menu:
version: 3.0-rc5
Expand Down Expand Up @@ -94,6 +94,8 @@ projects:
version: '1.4'
features:
version: '2.10'
patch:
2765721: https://www.drupal.org/files/issues/features-blank-line-after-php-tag-2765721-0.patch
features_roles_permissions:
version: '1.2'
feeds:
Expand Down Expand Up @@ -146,7 +148,7 @@ projects:
url: https://git.drupal.org/project/file_resup.git
revision: 6cf030c2c139374c75527221775965ff0242df15
filefield_sources:
version: '1.10'
version: '1.11'
font_icon_select:
download:
type: git
Expand Down Expand Up @@ -246,7 +248,7 @@ projects:
download:
type: git
url: https://github.com/GetDKAN/open_data_schema_map.git
tag: 7.x-1.14.1
tag: 7.x-2.0
panelizer:
version: '3.4'
panels:
Expand Down Expand Up @@ -276,7 +278,7 @@ projects:
download:
type: git
url: https://github.com/GetDKAN/recline.git
tag: 7.x-1.14.1
tag: 7.x-2.0
ref_field:
download:
type: git
Expand Down Expand Up @@ -349,7 +351,7 @@ projects:
download:
type: git
url: https://github.com/GetDKAN/visualization_entity.git
tag: 7.x-1.14.1
tag: 7.x-2.0
type: module
workbench:
version: '1.2'
Expand Down
4 changes: 4 additions & 0 deletions dkan/modules/contrib/features/PATCHES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The following patches have been applied to this project:
- https://www.drupal.org/files/issues/features-blank-line-after-php-tag-2765721-0.patch

This file was automatically generated by Drush Make (http://drupal.org/project/drush).
6 changes: 3 additions & 3 deletions dkan/modules/contrib/features/features.export.inc
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function features_export_render($export, $module_name, $reset = FALSE) {
$code = array_filter($code);
foreach ($code as $filename => $contents) {
if ($filename != '_files') {
$code[$filename] = "<?php\n/**\n * @file\n * {$module_name}.{$filename}.inc\n */\n\n". implode("\n\n", $contents) ."\n";
$code[$filename] = "<?php\n\n/**\n * @file\n * {$module_name}.{$filename}.inc\n */\n\n". implode("\n\n", $contents) ."\n";
}
}

Expand All @@ -332,8 +332,8 @@ function features_export_render($export, $module_name, $reset = FALSE) {
$code['info'] = features_export_info($export);

// Used to create or manipulate the generated .module for features.inc.
$modulefile_features_inc = "<?php\n/**\n * @file\n * Code for the {$export['name']} feature.\n */\n\ninclude_once '{$module_name}.features.inc';\n";
$modulefile_blank = "<?php\n/**\n * @file\n * Drupal needs this blank file.\n */\n";
$modulefile_features_inc = "<?php\n\n/**\n * @file\n * Code for the {$export['name']} feature.\n */\n\ninclude_once '{$module_name}.features.inc';\n";
$modulefile_blank = "<?php\n\n/**\n * @file\n * Drupal needs this blank file.\n */\n";

// Prepare the module
// If module exists, let it be and include it in the files
Expand Down
6 changes: 3 additions & 3 deletions dkan/modules/contrib/filefield_sources/filefield_sources.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies[] = system (>=7.36)
package = Fields
core = 7.x

; Information added by Drupal.org packaging script on 2015-08-18
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2018-02-07
version = "7.x-1.11"
core = "7.x"
project = "filefield_sources"
datestamp = "1439893374"
datestamp = "1517969885"

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Drupal.behaviors.fileFieldSources.attach = function(context, settings) {
$(this).parents('div.filefield-sources-list').find('a.active').removeClass('active');

// Find the unique FileField Source class name.
var fileFieldSourceClass = this.className.match(/filefield-source-[0-9a-z]+/i)[0];
var fileFieldSourceClass = this.className.match(/filefield-source-[0-9a-z_]+/i)[0];

// The default upload element is a special case.
if ($(this).is('.filefield-source-upload')) {
Expand Down
24 changes: 23 additions & 1 deletion dkan/modules/contrib/filefield_sources/filefield_sources.module
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,18 @@ function filefield_sources_includes($include = TRUE, $enabled_only = TRUE) {
* @see hook_file_download().
*/
function filefield_sources_file_access($uri) {
// Always allow access to public files.
$scheme = file_uri_scheme($uri);
if ($scheme === 'public') {
return TRUE;
}

// Or if the current user has the "bypass file access" permission from the
// File Entity module, then reuse of any file is permitted.
if (user_access('bypass file access')) {
return TRUE;
}

$headers = array();
foreach (module_implements('file_download') as $module) {
$function = $module . '_file_download';
Expand Down Expand Up @@ -581,7 +593,17 @@ function filefield_sources_save_file($filepath, $validators = array(), $destinat
}

// If we made it this far it's safe to record this file in the database.
return file_save($file);
if ($file = file_save($file)) {
// Track non-public files in the session if they were uploaded by an
// anonymous user. This allows modules such as the File module to only
// grant view access to the specific anonymous user who uploaded the file.
// See similar code in file_save_upload().
if (!$user->uid && !in_array($destination_scheme, variable_get('file_public_schema', array('public')))) {
$_SESSION['anonymous_allowed_file_ids'][$file->fid] = $file->fid;
}
return $file;
}
return FALSE;
}

/**
Expand Down
5 changes: 3 additions & 2 deletions dkan/modules/contrib/filefield_sources/sources/attach.inc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function filefield_source_attach_process($element, &$form_state, $form) {
$form_state['filefield_sources'][$instance['field_name']]['attach_options'] = $options;
}

$description = t('This method may be used to attach files that exceed the file size limit. Files may be attached from the %directory directory on the server, usually uploaded through FTP.', array('%directory' => realpath($path)));
$description = t('This method may be used to attach files that exceed the file size limit. Files may be attached from the %directory directory on the server, usually uploaded through FTP.', array('%directory' => drupal_realpath($path)));

// Error messages.
if ($options === FALSE || empty($settings['path'])) {
Expand Down Expand Up @@ -188,6 +188,7 @@ function filefield_source_attach_process($element, &$form_state, $form) {
'method' => 'replace',
'effect' => 'fade',
),
'#access' => !isset($attach_message),
);

return $element;
Expand Down Expand Up @@ -251,7 +252,7 @@ function filefield_source_attach_value($element, &$item) {
$item = array_merge($item, (array) $file);

// Delete the original file if "moving" the file instead of copying.
if ($filepath != $original_filepath && $instance['widget']['settings']['filefield_sources']['source_attach']['attach_mode'] !== 'copy') {
if (drupal_realpath($filepath) !== drupal_realpath($file->uri) && $instance['widget']['settings']['filefield_sources']['source_attach']['attach_mode'] !== 'copy') {
@unlink($filepath);
}
}
Expand Down
4 changes: 3 additions & 1 deletion dkan/modules/contrib/filefield_sources/sources/clipboard.inc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ function filefield_source_clipboard_value(&$element, &$item) {
}

// Remove the temporary file generated from paste.
@unlink($filepath);
if ($filepath !== $item['uri']) {
@unlink($filepath);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion dkan/modules/contrib/filefield_sources/sources/reference.inc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ function filefield_source_reference_autocomplete($entity_type, $bundle_name, $fi
if (!empty($field)) {
$files = filefield_source_reference_get_files($filename, $field);
foreach ($files as $fid => $file) {
$items[$file->filename ." [fid:$fid]"] = theme('filefield_source_reference_autocomplete_item', array('file' => $file));
if (filefield_sources_file_access($file->uri)) {
$items[$file->filename ." [fid:$fid]"] = theme('filefield_source_reference_autocomplete_item', array('file' => $file));
}
}
}

Expand Down
Loading

0 comments on commit 0fd5f12

Please sign in to comment.