Révision 1aa883a3
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/libraries/CHANGELOG.txt | ||
---|---|---|
1 |
Libraries 7.x-2.x, xxxx-xx-xx |
|
1 |
|
|
2 |
Libraries 7.x-2.5, 2018-10-5 |
|
3 |
----------------------------- |
|
4 |
#2815965 by plach, Manav, tstoeckler, Proteo: Base theme is not loaded when checking for theme library info |
|
5 |
#2999116 by Anghelu, joshbrown81: Finds no library after update |
|
6 |
|
|
7 |
Libraries 7.x-2.4, 2018-09-10 |
|
2 | 8 |
----------------------------- |
9 |
#2779591 by mark_fullmer, cglauren, improved PHP 7.x.x support. |
|
3 | 10 |
#2699799 by flaviovs, hanoii: Support reading version from package.json. |
4 | 11 |
#2816781 by joelstein: Add a 'access library reports' permission. |
5 | 12 |
#2823735 by amanaplan, tstoeckler: Add admin_menu cache clear integration. |
drupal7/sites/all/modules/libraries/libraries.info | ||
---|---|---|
8 | 8 |
files[] = tests/LibrariesUnitTest.test |
9 | 9 |
files[] = tests/LibrariesWebTestBase.test |
10 | 10 |
|
11 |
; Information added by Drupal.org packaging script on 2018-09-10
|
|
12 |
version = "7.x-2.4"
|
|
11 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
12 |
version = "7.x-2.5"
|
|
13 | 13 |
core = "7.x" |
14 | 14 |
project = "libraries" |
15 |
datestamp = "1536581584" |
|
15 |
datestamp = "1538770685" |
drupal7/sites/all/modules/libraries/libraries.module | ||
---|---|---|
79 | 79 |
return $path; |
80 | 80 |
} |
81 | 81 |
|
82 |
/** |
|
83 |
* Returns all enabled themes. |
|
84 |
* |
|
85 |
* Themes are sorted so that base themes always precede their child themes. |
|
86 |
* |
|
87 |
* @return array |
|
88 |
* An associative array of theme objects keyed by theme name. |
|
89 |
*/ |
|
90 |
function libraries_get_enabled_themes() { |
|
91 |
$themes = array(); |
|
92 |
foreach (list_themes() as $name => $theme) { |
|
93 |
if ($theme->status) { |
|
94 |
$themes[$name] = $theme; |
|
95 |
} |
|
96 |
} |
|
97 |
|
|
98 |
return libraries_sort_themes($themes); |
|
99 |
} |
|
100 |
|
|
101 |
/** |
|
102 |
* Sort a themes array. |
|
103 |
* |
|
104 |
* @param array $themes |
|
105 |
* Array of themes as objects, keyed by theme name. |
|
106 |
* @param string $base |
|
107 |
* A base theme (internal use only). |
|
108 |
* |
|
109 |
* @return array |
|
110 |
* A similar array to $themes, but sorted in such a way that subthemes are |
|
111 |
* always located after its base theme. |
|
112 |
*/ |
|
113 |
function libraries_sort_themes($themes, $base = '') { |
|
114 |
$output = array(); |
|
115 |
foreach ($themes as $name => $theme) { |
|
116 |
if (!isset($theme->base_theme) || $theme->base_theme == $base) { |
|
117 |
$output[$name] = $theme; |
|
118 |
unset($themes[$name]); |
|
119 |
$subthemes = libraries_sort_themes($themes, $name); |
|
120 |
foreach ($subthemes as $sub_name => $subtheme) { |
|
121 |
$output[$sub_name] = $subtheme; |
|
122 |
} |
|
123 |
} |
|
124 |
} |
|
125 |
return $output; |
|
126 |
} |
|
127 |
|
|
82 | 128 |
/** |
83 | 129 |
* Returns an array of library directories. |
84 | 130 |
* |
... | ... | |
103 | 149 |
// $config and $profile should never be empty in a proper Drupal setup. |
104 | 150 |
// However, we should never search into the root filesystem under any |
105 | 151 |
// circumstances, so just bail out in that case. |
106 |
if (!$profile || !$config) {
|
|
152 |
if (!$profile && !$config) {
|
|
107 | 153 |
return array(); |
108 | 154 |
} |
109 | 155 |
|
... | ... | |
388 | 434 |
} |
389 | 435 |
} |
390 | 436 |
|
391 |
// Gather information from hook_libraries_info() in enabled themes. |
|
437 |
// Gather information from hook_libraries_info() in enabled themes. Themes |
|
438 |
// are sorted to ensure that a base theme's template.php is included before |
|
439 |
// its children's ones. |
|
392 | 440 |
$themes = array(); |
393 |
foreach (list_themes() as $theme_name => $theme_info) {
|
|
394 |
if ($theme_info->status && file_exists(drupal_get_path('theme', $theme_name) . '/template.php')) {
|
|
441 |
foreach (libraries_get_enabled_themes() as $theme_name => $theme_info) {
|
|
442 |
if (file_exists(drupal_get_path('theme', $theme_name) . '/template.php')) { |
|
395 | 443 |
// Collect a list of viable themes for re-use when calling the alter |
396 | 444 |
// hook. |
397 | 445 |
$themes[] = $theme_name; |
drupal7/sites/all/modules/libraries/tests/libraries/example_info_file.libraries.info | ||
---|---|---|
2 | 2 |
name = Example info file |
3 | 3 |
|
4 | 4 |
|
5 |
; Information added by Drupal.org packaging script on 2018-09-10
|
|
6 |
version = "7.x-2.4"
|
|
5 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
6 |
version = "7.x-2.5"
|
|
7 | 7 |
core = "7.x" |
8 | 8 |
project = "libraries" |
9 |
datestamp = "1536581584" |
|
9 |
datestamp = "1538770685" |
drupal7/sites/all/modules/libraries/tests/modules/libraries_test_module/libraries_test_module.info | ||
---|---|---|
5 | 5 |
dependencies[] = libraries |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-09-10
|
|
9 |
version = "7.x-2.4"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.5"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "libraries" |
12 |
datestamp = "1536581584" |
|
12 |
datestamp = "1538770685" |
drupal7/sites/all/modules/libraries/tests/themes/libraries_test_theme/libraries_test_theme.info | ||
---|---|---|
3 | 3 |
core = 7.x |
4 | 4 |
hidden = TRUE |
5 | 5 |
|
6 |
; Information added by Drupal.org packaging script on 2018-09-10
|
|
7 |
version = "7.x-2.4"
|
|
6 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
7 |
version = "7.x-2.5"
|
|
8 | 8 |
core = "7.x" |
9 | 9 |
project = "libraries" |
10 |
datestamp = "1536581584" |
|
10 |
datestamp = "1538770685" |
drupal7/sites/all/modules/print/css/print-rtl.css | ||
---|---|---|
1 |
body {direction: rtl;} |
|
2 |
th {text-align: right;} |
|
1 |
body { |
|
2 |
direction: rtl; |
|
3 |
} |
|
4 |
th { |
|
5 |
text-align: right; |
|
6 |
} |
|
3 | 7 |
.print-links, |
4 | 8 |
.print-source_url, |
5 | 9 |
.print-taxonomy { |
drupal7/sites/all/modules/print/css/print.css | ||
---|---|---|
8 | 8 |
color: #006; |
9 | 9 |
border-bottom: 1px solid #ccc; |
10 | 10 |
} |
11 |
tr.odd {background-color: #ddd;} |
|
12 |
tr.even {background-color: #fff;} |
|
13 |
td {padding: 5px;} |
|
14 |
#menu {visibility: hidden;} |
|
15 |
#main {margin: 1em;} |
|
16 |
a:link {color: #000;} |
|
17 |
a:visited {color: #000;} |
|
18 |
a:hover {color: #00f;} |
|
19 |
a:link img, a:visited img {border: 0;} |
|
20 |
.print-footnote {font-size: xx-small;} |
|
21 |
img.print-logo {border: 0;} |
|
22 |
.print-site_name {} |
|
23 |
.print-breadcrumb {font-size: x-small;} |
|
24 |
.print-title {} |
|
25 |
.print-submitted {font-size: small;} |
|
26 |
.print-created {font-size: small;} |
|
27 |
.print-taxonomy {text-align: right;} |
|
28 |
.print-taxonomy li {display: inline;} |
|
29 |
.print-content {} |
|
11 |
tr.odd { |
|
12 |
background-color: #ddd; |
|
13 |
} |
|
14 |
tr.even { |
|
15 |
background-color: #fff; |
|
16 |
} |
|
17 |
td { |
|
18 |
padding: 5px; |
|
19 |
} |
|
20 |
#menu { |
|
21 |
visibility: hidden; |
|
22 |
} |
|
23 |
#main { |
|
24 |
margin: 1em; |
|
25 |
} |
|
26 |
a:link { |
|
27 |
color: #000; |
|
28 |
} |
|
29 |
a:visited { |
|
30 |
color: #000; |
|
31 |
} |
|
32 |
a:hover { |
|
33 |
color: #00f; |
|
34 |
} |
|
35 |
a:link img, |
|
36 |
a:visited img { |
|
37 |
border: 0; |
|
38 |
} |
|
39 |
.print-footnote { |
|
40 |
font-size: xx-small; |
|
41 |
} |
|
42 |
img.print-logo { |
|
43 |
border: 0; |
|
44 |
} |
|
45 |
.print-site_name { |
|
46 |
} |
|
47 |
.print-breadcrumb { |
|
48 |
font-size: x-small; |
|
49 |
} |
|
50 |
.print-title { |
|
51 |
} |
|
52 |
.print-submitted { |
|
53 |
font-size: small; |
|
54 |
} |
|
55 |
.print-created { |
|
56 |
font-size: small; |
|
57 |
} |
|
58 |
.print-taxonomy { |
|
59 |
text-align: right; |
|
60 |
} |
|
61 |
.print-taxonomy li { |
|
62 |
display: inline; |
|
63 |
} |
|
64 |
.print-content { |
|
65 |
} |
|
30 | 66 |
.print-hr { |
31 | 67 |
border: 0; |
32 | 68 |
height: 1px; |
33 | 69 |
width: 100%; |
34 |
color: #9E9E9E;
|
|
35 |
background-color: #9E9E9E;
|
|
70 |
color: #9e9e9e;
|
|
71 |
background-color: #9e9e9e;
|
|
36 | 72 |
} |
37 | 73 |
.print-message { |
38 | 74 |
border: medium dotted blue; |
39 | 75 |
padding: 1em; |
40 | 76 |
} |
41 |
.print-source_url {font-size: small;} |
|
42 |
.print-links {font-size: small;} |
|
43 |
.print-footer {text-align: center;} |
|
77 |
.print-source_url { |
|
78 |
font-size: small; |
|
79 |
} |
|
80 |
.print-links { |
|
81 |
font-size: small; |
|
82 |
} |
|
83 |
.print-footer { |
|
84 |
text-align: center; |
|
85 |
} |
drupal7/sites/all/modules/print/print.info | ||
---|---|---|
6 | 6 |
dependencies[] = node |
7 | 7 |
configure = admin/config/user-interface/print |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
10 |
version = "7.x-2.1"
|
|
9 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
10 |
version = "7.x-2.2"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "print" |
13 |
datestamp = "1538588885" |
|
13 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print.pages.inc | ||
---|---|---|
41 | 41 |
|
42 | 42 |
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path); |
43 | 43 |
db_merge('print_page_counter') |
44 |
->key(array('path' => $nodepath))
|
|
44 |
->key(array('path' => substr($nodepath, 0, 255)))
|
|
45 | 45 |
->fields(array( |
46 | 46 |
'totalcount' => 1, |
47 | 47 |
'timestamp' => REQUEST_TIME, |
... | ... | |
193 | 193 |
$variables['css'] = _print_css_generator($variables['expand_css']); |
194 | 194 |
|
195 | 195 |
if (variable_get('print_html_sendtoprinter', PRINT_HTML_SENDTOPRINTER_DEFAULT) && ($format == 'html')) { |
196 |
drupal_add_js('misc/drupal.js', array('weight' => JS_LIBRARY));
|
|
196 |
drupal_add_js('misc/drupal.js', array('group' => JS_LIBRARY));
|
|
197 | 197 |
|
198 | 198 |
$window_close = (variable_get('print_html_new_window', PRINT_HTML_NEW_WINDOW_DEFAULT) && variable_get('print_html_windowclose', PRINT_HTML_WINDOWCLOSE_DEFAULT)) ? 'setTimeout(function(){window.close();}, 1);' : ''; |
199 | 199 |
$variables['sendtoprinter'] = '<script type="text/javascript">(function ($) { Drupal.behaviors.print = {attach: function() {$(window).load(function() {window.print();' . $window_close . '})}}})(jQuery);</script>'; |
... | ... | |
376 | 376 |
} |
377 | 377 |
|
378 | 378 |
if (count($robots_meta) > 0) { |
379 |
return '<meta name="robots" content=' . implode(', ', $robots_meta) . ' />';
|
|
379 |
return '<meta name="robots" content="' . implode(', ', $robots_meta) . '" />';
|
|
380 | 380 |
} |
381 | 381 |
else { |
382 | 382 |
return ''; |
drupal7/sites/all/modules/print/print_epub/lib_handlers/print_epub_phpepub/print_epub_phpepub.info | ||
---|---|---|
4 | 4 |
package = "Printer, email and PDF versions" |
5 | 5 |
dependencies[] = print_epub |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
8 |
version = "7.x-2.1"
|
|
7 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
8 |
version = "7.x-2.2"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "print" |
11 |
datestamp = "1538588885" |
|
11 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_epub/lib_handlers/print_epub_phpepub/print_epub_phpepub.module | ||
---|---|---|
20 | 20 |
if (file_exists(DRUPAL_ROOT . '/' . $epub_tool)) { |
21 | 21 |
include_once DRUPAL_ROOT . '/' . $epub_tool; |
22 | 22 |
|
23 |
if (class_exists('EPub')) { |
|
24 |
return EPub::VERSION; |
|
23 |
$phpepub_version_4_plus = strpos($epub_tool, 'autoload.php') !== FALSE; |
|
24 |
if ($phpepub_version_4_plus) { |
|
25 |
return \PHPePub\Core\EPub::VERSION; |
|
26 |
} |
|
27 |
else { |
|
28 |
if (class_exists('EPub')) { |
|
29 |
return EPub::VERSION; |
|
30 |
} |
|
25 | 31 |
} |
26 | 32 |
} |
33 |
|
|
34 |
return 'unknown'; |
|
27 | 35 |
} |
28 | 36 |
|
29 | 37 |
/** |
... | ... | |
36 | 44 |
foreach ($tools as $tool) { |
37 | 45 |
$epub_tools['print_epub_phpepub|' . $tool] = 'PHPePub (' . dirname($tool) . ')'; |
38 | 46 |
} |
47 |
|
|
48 |
// PHPePub >= 4.0 uses a composer autoloader. |
|
49 |
$tools = _print_scan_libs('phpepub', '!^autoload.php$!'); |
|
50 |
foreach ($tools as $tool) { |
|
51 |
if (preg_match('!PHPePub.*?/vendor/autoload.php$!i', $tool)) { |
|
52 |
$epub_tools['print_epub_phpepub|' . $tool] = 'PHPePub (' . dirname(dirname($tool)) . ')'; |
|
53 |
} |
|
54 |
} |
|
39 | 55 |
} |
drupal7/sites/all/modules/print/print_epub/lib_handlers/print_epub_phpepub/print_epub_phpepub.pages.inc | ||
---|---|---|
32 | 32 |
|
33 | 33 |
// Try to use local file access for image files. |
34 | 34 |
$html = _print_access_images_via_file($html, $images_via_file); |
35 |
$version = _print_epub_phpepub_version($epub_tool[1]); |
|
35 | 36 |
|
36 | 37 |
// Set document information. |
37 |
$epub = new EPub(); |
|
38 |
if (version_compare($version, '4.0.0', '>=')) { |
|
39 |
$epub = new \PHPePub\Core\EPub(); |
|
40 |
} |
|
41 |
else { |
|
42 |
$epub = new EPub(); |
|
43 |
} |
|
38 | 44 |
|
39 | 45 |
$epub->setTitle(html_entity_decode($meta['title'], ENT_QUOTES, 'UTF-8')); |
40 |
$epub->setIdentifier($meta['url'], EPub::IDENTIFIER_URI);
|
|
46 |
$epub->setIdentifier($meta['url'], $epub::IDENTIFIER_URI);
|
|
41 | 47 |
$epub->setLanguage($language->language); |
42 | 48 |
if (isset($meta['name'])) { |
43 | 49 |
$epub->setAuthor(strip_tags($meta['name']), strip_tags($meta['name'])); |
drupal7/sites/all/modules/print/print_epub/print_epub.info | ||
---|---|---|
5 | 5 |
dependencies[] = print |
6 | 6 |
configure = admin/config/user-interface/print/epub |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
9 |
version = "7.x-2.1"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "print" |
12 |
datestamp = "1538588885" |
|
12 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_epub/print_epub.install | ||
---|---|---|
47 | 47 |
} |
48 | 48 |
} |
49 | 49 |
|
50 |
|
|
51 |
/** |
|
52 |
* Implements hook_requirements(). |
|
53 |
*/ |
|
54 |
function print_epub_requirements($phase) { |
|
55 |
$requirements = array(); |
|
56 |
$t = get_t(); |
|
57 |
switch ($phase) { |
|
58 |
// At runtime, make sure that a EPUB generation tool is selected. |
|
59 |
case 'runtime': |
|
60 |
$print_epub_epub_tool = variable_get('print_epub_epub_tool', PRINT_EPUB_EPUB_TOOL_DEFAULT); |
|
61 |
if (empty($print_epub_epub_tool)) { |
|
62 |
$requirements['print_epub_tool'] = array( |
|
63 |
'title' => $t('Printer, email and EPUB versions - EPUB generation library'), |
|
64 |
'value' => $t('No EPUB tool selected'), |
|
65 |
'description' => $t('Please configure it in the !url.', array('!url' => l($t('EPUB settings page'), 'admin/config/user-interface/print/epub'))), |
|
66 |
'severity' => REQUIREMENT_ERROR, |
|
67 |
); |
|
68 |
} |
|
69 |
else { |
|
70 |
$tool = explode('|', $print_epub_epub_tool); |
|
71 |
|
|
72 |
if (!is_file($tool[1]) || !is_readable($tool[1])) { |
|
73 |
$requirements['print_epub_tool'] = array( |
|
74 |
'title' => $t('Printer, email and EPUB versions - EPUB generation library'), |
|
75 |
'value' => $t('File not found'), |
|
76 |
'description' => $t('The currently selected EPUB generation library (%file) is no longer accessible.', array('%file' => $tool[1])), |
|
77 |
'severity' => REQUIREMENT_ERROR, |
|
78 |
); |
|
79 |
} |
|
80 |
} |
|
81 |
break; |
|
82 |
} |
|
83 |
return $requirements; |
|
84 |
} |
|
85 |
|
|
50 | 86 |
/** |
51 | 87 |
* Implements hook_schema(). |
52 | 88 |
*/ |
drupal7/sites/all/modules/print/print_epub/print_epub.module | ||
---|---|---|
121 | 121 |
return $block; |
122 | 122 |
} |
123 | 123 |
|
124 |
/** |
|
125 |
* Implements hook_requirements(). |
|
126 |
*/ |
|
127 |
function print_epub_requirements($phase) { |
|
128 |
$requirements = array(); |
|
129 |
$t = get_t(); |
|
130 |
switch ($phase) { |
|
131 |
// At runtime, make sure that a EPUB generation tool is selected. |
|
132 |
case 'runtime': |
|
133 |
$print_epub_epub_tool = variable_get('print_epub_epub_tool', PRINT_EPUB_EPUB_TOOL_DEFAULT); |
|
134 |
if (empty($print_epub_epub_tool)) { |
|
135 |
$requirements['print_epub_tool'] = array( |
|
136 |
'title' => $t('Printer, email and EPUB versions - EPUB generation library'), |
|
137 |
'value' => $t('No EPUB tool selected'), |
|
138 |
'description' => $t('Please configure it in the !url.', array('!url' => l($t('EPUB settings page'), 'admin/config/user-interface/print/epub'))), |
|
139 |
'severity' => REQUIREMENT_ERROR, |
|
140 |
); |
|
141 |
} |
|
142 |
else { |
|
143 |
$tool = explode('|', $print_epub_epub_tool); |
|
144 |
|
|
145 |
if (!is_file($tool[1]) || !is_readable($tool[1])) { |
|
146 |
$requirements['print_epub_tool'] = array( |
|
147 |
'title' => $t('Printer, email and EPUB versions - EPUB generation library'), |
|
148 |
'value' => $t('File not found'), |
|
149 |
'description' => $t('The currently selected EPUB generation library (%file) is no longer accessible.', array('%file' => $tool[1])), |
|
150 |
'severity' => REQUIREMENT_ERROR, |
|
151 |
); |
|
152 |
} |
|
153 |
} |
|
154 |
break; |
|
155 |
} |
|
156 |
return $requirements; |
|
157 |
} |
|
158 |
|
|
159 | 124 |
/** |
160 | 125 |
* Implements hook_node_delete(). |
161 | 126 |
*/ |
drupal7/sites/all/modules/print/print_epub/print_epub.pages.inc | ||
---|---|---|
74 | 74 |
|
75 | 75 |
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path); |
76 | 76 |
db_merge('print_epub_page_counter') |
77 |
->key(array('path' => $nodepath))
|
|
77 |
->key(array('path' => substr($nodepath, 0, 255)))
|
|
78 | 78 |
->fields(array( |
79 | 79 |
'totalcount' => 1, |
80 | 80 |
'timestamp' => REQUEST_TIME, |
drupal7/sites/all/modules/print/print_mail/print_mail.inc | ||
---|---|---|
115 | 115 |
if (count($form_state['input']) == 0) { |
116 | 116 |
$nodepath = drupal_get_normal_path($path); |
117 | 117 |
db_merge('print_mail_page_counter') |
118 |
->key(array('path' => $nodepath))
|
|
118 |
->key(array('path' => substr($nodepath, 0, 255)))
|
|
119 | 119 |
->fields(array( |
120 | 120 |
'totalcount' => 1, |
121 | 121 |
'timestamp' => REQUEST_TIME, |
... | ... | |
388 | 388 |
* @ingroup forms |
389 | 389 |
*/ |
390 | 390 |
function print_mail_form_submit($form, &$form_state) { |
391 |
if (!array_key_exists('cancel', $form_state['values'])) {
|
|
391 |
if (!array_key_exists('cancel', $form_state['input'])) {
|
|
392 | 392 |
module_load_include('inc', 'print', 'print.pages'); |
393 | 393 |
module_load_include('inc', 'print', 'includes/print'); |
394 | 394 |
|
drupal7/sites/all/modules/print/print_mail/print_mail.info | ||
---|---|---|
5 | 5 |
dependencies[] = print |
6 | 6 |
configure = admin/config/user-interface/print/email |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
9 |
version = "7.x-2.1"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "print" |
12 |
datestamp = "1538588885" |
|
12 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_dompdf/print_pdf_dompdf.info | ||
---|---|---|
5 | 5 |
dependencies[] = print_pdf |
6 | 6 |
configure = admin/config/user-interface/print/pdf/dompdf |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
9 |
version = "7.x-2.1"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "print" |
12 |
datestamp = "1538588885" |
|
12 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_dompdf/print_pdf_dompdf.install | ||
---|---|---|
25 | 25 |
// On status report page, make sure that a PDF generation tool is selected. |
26 | 26 |
case 'runtime': |
27 | 27 |
$print_pdf_pdf_tool = variable_get('print_pdf_pdf_tool', PRINT_PDF_PDF_TOOL_DEFAULT); |
28 |
if (!empty($print_pdf_pdf_tool)) {
|
|
29 |
$tool = explode('|', $print_pdf_pdf_tool);
|
|
28 |
$tool = explode('|', $print_pdf_pdf_tool);
|
|
29 |
if (is_array($tool) && ($tool[0] === 'print_pdf_dompdf')) {
|
|
30 | 30 |
$version = print_pdf_dompdf_pdf_tool_version($tool[1]); |
31 | 31 |
|
32 | 32 |
// If version is older than 0.6.2, raise warning, except if if is |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_dompdf/print_pdf_dompdf.pages.inc | ||
---|---|---|
87 | 87 |
|
88 | 88 |
// Try to use local file access for image files. |
89 | 89 |
$html = _print_access_images_via_file($html, $images_via_file); |
90 |
// Remove all scripts due to security concerns. |
|
91 |
$html = preg_replace('!<script(.*?)>(.*?)</script>!is', '', $html); |
|
90 | 92 |
|
91 | 93 |
// Spaces in img URLs must be replaced with %20, when using external access. |
92 | 94 |
if (!$images_via_file) { |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_mpdf/print_pdf_mpdf.info | ||
---|---|---|
4 | 4 |
package = "Printer, email and PDF versions" |
5 | 5 |
dependencies[] = print_pdf |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
8 |
version = "7.x-2.1"
|
|
7 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
8 |
version = "7.x-2.2"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "print" |
11 |
datestamp = "1538588885" |
|
11 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_mpdf/print_pdf_mpdf.module | ||
---|---|---|
70 | 70 |
$tools = _print_scan_libs('mpdf', '!^autoload.php$!'); |
71 | 71 |
foreach ($tools as $tool) { |
72 | 72 |
if (preg_match('!mpdf.*?/vendor/autoload.php$!', $tool)) { |
73 |
$pdf_tools['print_pdf_mpdf|' . $tool] = 'mPDF (' . dirname($tool) . ')';
|
|
73 |
$pdf_tools['print_pdf_mpdf|' . $tool] = 'mPDF (' . dirname(dirname($tool)) . ')';
|
|
74 | 74 |
} |
75 | 75 |
} |
76 | 76 |
} |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_tcpdf/print_pdf_tcpdf.info | ||
---|---|---|
6 | 6 |
files[] = print_pdf_tcpdf.class.inc |
7 | 7 |
configure = admin/config/user-interface/print/pdf/tcpdf |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
10 |
version = "7.x-2.1"
|
|
9 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
10 |
version = "7.x-2.2"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "print" |
13 |
datestamp = "1538588885" |
|
13 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/INSTALL.txt | ||
---|---|---|
5 | 5 |
libraries in your site, which may present problems in shared hosting |
6 | 6 |
environments. The best, if you can run it. |
7 | 7 |
|
8 |
1. Download wkhtmltopdf from |
|
9 |
http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to |
|
10 |
download the source and compile it or simply download the static binary, |
|
11 |
which doesn't require you to compile anything. Note that the compiled |
|
12 |
version may require a running X server (static uses patched libs that can |
|
13 |
work without one). |
|
14 |
2. Place the wkhtmltopdf executable into one of the supported paths. |
|
15 |
(usually sites/all/modules/print/lib). You can also place a symbolic link |
|
16 |
to the executable. |
|
8 |
1. Download wkhtmltopdf from http://wkhtmltopdf.org/downloads.html. You can |
|
9 |
choose to download the source and compile it or simply download the installer |
|
10 |
for your OS. Note that the compiled version may require a running X server |
|
11 |
(the installers use patched libs that can work without one). |
|
12 |
2. Place a symbolic link to the executable in one of the supported paths |
|
13 |
(usually sites/all/libraries/wkhtmltopdf). Or if you can also place the |
|
14 |
wkhtmltopdf executable directly into that folder. |
|
17 | 15 |
3. Check http://code.google.com/p/wkhtmltopdf/ for further information. |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.admin.inc | ||
---|---|---|
27 | 27 |
'#size' => 60, |
28 | 28 |
'#maxlength' => 500, |
29 | 29 |
'#default_value' => variable_get('print_pdf_wkhtmltopdf_options', PRINT_PDF_WKHTMLTOPDF_OPTIONS), |
30 |
'#description' => t('(wkhtmltopdf only) Set any additional options to be passed to the wkhtmltopdf executable. Tokens may be used in these options (see list below).'), |
|
30 |
'#description' => t('Set any additional options to be passed to the wkhtmltopdf executable. Tokens may be used in these options (see list below).'), |
|
31 |
); |
|
32 |
|
|
33 |
$form['settings']['print_pdf_wkhtmltopdf_use_input_file'] = array( |
|
34 |
'#type' => 'checkbox', |
|
35 |
'#title' => t('Use temporary input file'), |
|
36 |
'#default_value' => variable_get('print_pdf_wkhtmltopdf_use_input_file', PRINT_PDF_WKHTMLTOPDF_USE_INPUT_FILE_DEFAULT), |
|
37 |
'#description' => t('If you experience trouble when generating a PDF try to enable this feature to adjust the input handling.'), |
|
31 | 38 |
); |
32 | 39 |
|
33 | 40 |
if (module_exists('token')) { |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.drush.inc | ||
---|---|---|
9 | 9 |
* The PDF project download URL. |
10 | 10 |
*/ |
11 | 11 |
// Since wkhtmltopdf is a binary, a different URL is required for each platform. |
12 |
define('WKHTMLTOPDF_LNX64_DOWNLOAD_URI', 'http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz');
|
|
13 |
define('WKHTMLTOPDF_LNX32_DOWNLOAD_URI', 'http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-i386.tar.xz');
|
|
14 |
define('WKHTMLTOPDF_WIN64_DOWNLOAD_URI', 'http://download.gna.org/wkhtmltopdf/0.12/0.12.3.2/wkhtmltox-0.12.3.2_msvc2013-win64.exe');
|
|
15 |
define('WKHTMLTOPDF_WIN32_DOWNLOAD_URI', 'http://download.gna.org/wkhtmltopdf/0.12/0.12.3.2/wkhtmltox-0.12.3.2_msvc2013-win32.exe');
|
|
16 |
define('WKHTMLTOPDF_OSX64_DOWNLOAD_URI', 'http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_osx-cocoa-x86-64.pkg');
|
|
17 |
define('WKHTMLTOPDF_OSX32_DOWNLOAD_URI', 'http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_osx-carbon-i386.pkg');
|
|
12 |
define('WKHTMLTOPDF_LNX64_DOWNLOAD_URI', 'https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz');
|
|
13 |
define('WKHTMLTOPDF_LNX32_DOWNLOAD_URI', 'https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-i386.tar.xz');
|
|
14 |
define('WKHTMLTOPDF_WIN64_DOWNLOAD_URI', 'https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.msvc2015-win64.exe');
|
|
15 |
define('WKHTMLTOPDF_WIN32_DOWNLOAD_URI', 'https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.msvc2015-win32.exe');
|
|
16 |
define('WKHTMLTOPDF_OSX64_DOWNLOAD_URI', 'https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.macos-cocoa.pkg');
|
|
17 |
define('WKHTMLTOPDF_OSX32_DOWNLOAD_URI', 'https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.macos-carbon.pkg');
|
|
18 | 18 |
|
19 | 19 |
/** |
20 | 20 |
* Implements hook_drush_command(). |
... | ... | |
36 | 36 |
|
37 | 37 |
switch (drupal_substr(php_uname('s'), 0, 3)) { |
38 | 38 |
case 'Lin': |
39 |
drush_log(dt('Please note that generic Linux builds are no longer being generated. See https://wkhtmltopdf.org/downloads.html.'), 'warning'); |
|
39 | 40 |
$ret = (php_uname('m') == 'x86_64') ? WKHTMLTOPDF_LNX64_DOWNLOAD_URI : WKHTMLTOPDF_LNX32_DOWNLOAD_URI; |
40 | 41 |
break; |
41 | 42 |
|
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.info | ||
---|---|---|
5 | 5 |
dependencies[] = print_pdf |
6 | 6 |
configure = admin/config/user-interface/print/pdf/wkhtmltopdf |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
9 |
version = "7.x-2.1"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "print" |
12 |
datestamp = "1538588885" |
|
12 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.install | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
function print_pdf_wkhtmltopdf_uninstall() { |
14 | 14 |
variable_del('print_pdf_wkhtmltopdf_options'); |
15 |
variable_del('print_pdf_wkhtmltopdf_use_input_file'); |
|
15 | 16 |
variable_del('print_pdf_wkhtmltopdf_version'); |
16 | 17 |
} |
17 | 18 |
|
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.module | ||
---|---|---|
9 | 9 |
|
10 | 10 |
define('PRINT_PDF_WKHTMLTOPDF_OPTIONS', "--footer-font-size 7 --footer-right '[page]'"); |
11 | 11 |
define('PRINT_PDF_WKHTMLTOPDF_VERSION_DEFAULT', ''); |
12 |
define('PRINT_PDF_WKHTMLTOPDF_USE_INPUT_FILE_DEFAULT', FALSE); |
|
12 | 13 |
|
13 | 14 |
/** |
14 | 15 |
* Implements hook_pdf_tool_info(). |
... | ... | |
94 | 95 |
module_load_include('inc', 'print', 'includes/print'); |
95 | 96 |
$tools = _print_scan_libs('wkhtmltopdf', '!^wkhtmltopdf!'); |
96 | 97 |
|
98 |
// See if there is a binary version of wkhtmltopdf available. |
|
99 |
if (drupal_substr(php_uname('s'), 0, 3) !== 'Win') { |
|
100 |
exec('export PATH="$PATH:/usr/local/bin" ; which wkhtmltopdf', $binary_output, $binary_status); |
|
101 |
if (count($binary_output) > 0 && $binary_status == 0) { |
|
102 |
$tools[] = $binary_output[0]; |
|
103 |
} |
|
104 |
} |
|
105 |
|
|
97 | 106 |
foreach ($tools as $tool) { |
98 | 107 |
$version = print_pdf_wkhtmltopdf_pdf_tool_version($tool, TRUE); |
99 | 108 |
|
drupal7/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc | ||
---|---|---|
29 | 29 |
$wkhtmltopdf_options = token_replace($wkhtmltopdf_options, array('node' => $meta['node']), array('clear' => TRUE)); |
30 | 30 |
} |
31 | 31 |
|
32 |
// Build array of single quoted parts, and the same escaped. |
|
33 |
preg_match_all("!'.+?'!", $wkhtmltopdf_options, $matches); |
|
34 |
$quoted = array(); |
|
35 |
foreach ($matches[0] as $match) { |
|
36 |
$quoted[escapeshellcmd($match)] = $match; |
|
37 |
} |
|
38 |
|
|
32 | 39 |
// Prevent options that could result in execution of arbitrary commands. |
33 | 40 |
$wkhtmltopdf_options = escapeshellcmd($wkhtmltopdf_options); |
34 | 41 |
|
42 |
// Replace sections that were single quoted with original content. |
|
43 |
foreach ($quoted as $search => $replace) { |
|
44 |
$wkhtmltopdf_options = str_replace($search, $replace, $wkhtmltopdf_options); |
|
45 |
} |
|
46 |
|
|
35 | 47 |
$version = print_pdf_wkhtmltopdf_pdf_tool_version($pdf_tool[1], FALSE); |
36 | 48 |
|
37 | 49 |
// 0.10.0 beta2 identifies itself as 0.9.9. |
... | ... | |
51 | 63 |
$wkhtmltopdf_options .= ' --username ' . escapeshellarg($_SERVER['PHP_AUTH_USER']) . ' --password ' . escapeshellarg($_SERVER['PHP_AUTH_PW']); |
52 | 64 |
} |
53 | 65 |
|
66 |
$use_input_file = variable_get('print_pdf_wkhtmltopdf_use_input_file', PRINT_PDF_WKHTMLTOPDF_USE_INPUT_FILE_DEFAULT); |
|
67 |
if ($use_input_file) { |
|
68 |
$temp_html = file_unmanaged_save_data($html, drupal_tempnam('temporary://', 'c_html_') . '.html', FILE_EXISTS_RENAME); |
|
69 |
if ($temp_html === FALSE) { |
|
70 |
watchdog('print_pdf', 'wkhtmltopdf: could not create temporary html file: %file', array('%file' => $temp_html)); |
|
71 |
drupal_goto($meta['url']); |
|
72 |
return NULL; |
|
73 |
} |
|
74 |
$html_input_parameter = drupal_realpath($temp_html); |
|
75 |
} |
|
76 |
else { |
|
77 |
$temp_html = ''; |
|
78 |
$html_input_parameter = '-'; |
|
79 |
} |
|
80 |
|
|
54 | 81 |
$descriptor = array( |
55 | 82 |
0 => array('pipe', 'r'), |
56 | 83 |
1 => array('pipe', 'w'), |
57 | 84 |
2 => array('pipe', 'a'), |
58 | 85 |
); |
59 |
$cmd = '"' . realpath($pdf_tool[1]) . "\" -q --page-size $paper_size --orientation $page_orientation --dpi $dpi $wkhtmltopdf_options - -";
|
|
86 |
$cmd = '"' . realpath($pdf_tool[1]) . "\" -q --page-size $paper_size --orientation $page_orientation --dpi $dpi $wkhtmltopdf_options $html_input_parameter -";
|
|
60 | 87 |
|
61 | 88 |
$process = proc_open($cmd, $descriptor, $pipes, NULL, NULL); |
62 | 89 |
|
63 | 90 |
if (is_resource($process)) { |
64 |
fwrite($pipes[0], $html); |
|
65 |
fclose($pipes[0]); |
|
91 |
if (!$use_input_file) { |
|
92 |
fwrite($pipes[0], $html); |
|
93 |
fclose($pipes[0]); |
|
94 |
} |
|
66 | 95 |
|
67 | 96 |
$pdf = stream_get_contents($pipes[1]); |
68 | 97 |
fclose($pipes[1]); |
... | ... | |
80 | 109 |
array('%cmd' => $cmd, '%ret' => $retval, '%error' => $error)); |
81 | 110 |
} |
82 | 111 |
} |
112 |
if ($use_input_file) { |
|
113 |
file_unmanaged_delete($temp_html); |
|
114 |
} |
|
83 | 115 |
|
84 | 116 |
if (!empty($pdf)) { |
85 | 117 |
// Remove anything before actual PDF content. |
drupal7/sites/all/modules/print/print_pdf/print_pdf.info | ||
---|---|---|
5 | 5 |
dependencies[] = print |
6 | 6 |
configure = admin/config/user-interface/print/pdf |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
9 |
version = "7.x-2.1"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "print" |
12 |
datestamp = "1538588885" |
|
12 |
datestamp = "1538760185" |
drupal7/sites/all/modules/print/print_pdf/print_pdf.module | ||
---|---|---|
373 | 373 |
* The scheme://path of the cache directory |
374 | 374 |
*/ |
375 | 375 |
function print_pdf_cache_dir() { |
376 |
global $language_url; |
|
376 | 377 |
$scheme = 'private'; |
377 | 378 |
if (!file_stream_wrapper_valid_scheme($scheme)) { |
378 | 379 |
$scheme = 'temporary'; |
379 | 380 |
} |
380 |
return $scheme . '://print_pdf/cache';
|
|
381 |
return $scheme . '://print_pdf/cache/' . $language_url->language;
|
|
381 | 382 |
} |
382 | 383 |
|
383 | 384 |
/** |
drupal7/sites/all/modules/print/print_pdf/print_pdf.pages.inc | ||
---|---|---|
74 | 74 |
|
75 | 75 |
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path); |
76 | 76 |
db_merge('print_pdf_page_counter') |
77 |
->key(array('path' => $nodepath))
|
|
77 |
->key(array('path' => substr($nodepath, 0, 255)))
|
|
78 | 78 |
->fields(array( |
79 | 79 |
'totalcount' => 1, |
80 | 80 |
'timestamp' => REQUEST_TIME, |
... | ... | |
116 | 116 |
$cache_enabled = variable_get('print_pdf_cache_enabled', PRINT_PDF_CACHE_ENABLED_DEFAULT); |
117 | 117 |
|
118 | 118 |
$function = $pdf_tool[0] . '_pdf_tool_info'; |
119 |
if (function_exists($function)) { |
|
120 |
$info = $function(); |
|
121 |
} |
|
119 |
$info = function_exists($function) ? $function() : array(); |
|
122 | 120 |
$expand = isset($info['expand_css']) ? $info['expand_css'] : FALSE; |
123 | 121 |
|
124 | 122 |
$html = theme('print', array( |
... | ... | |
137 | 135 |
$html = preg_replace_callback($pattern, '_print_rewrite_urls', $html); |
138 | 136 |
// And make anchor links relative again, to permit in-PDF navigation. |
139 | 137 |
$html = preg_replace("!${base_url}/" . $link['path'] . '/.*?#!', '#', $html); |
140 |
// Remove all scripts due to security concerns. |
|
141 |
$html = preg_replace('!<script(.*?)>(.*?)</script>!is', '', $html); |
|
142 | 138 |
|
143 | 139 |
$meta = array( |
144 | 140 |
'node' => $node, |
drupal7/sites/all/modules/print/print_ui/css/print_ui.theme-rtl.css | ||
---|---|---|
7 | 7 |
*/ |
8 | 8 |
} |
9 | 9 |
|
10 |
.print_html, .print_mail, .print_pdf, .print_epub { |
|
10 |
.print_html, |
|
11 |
.print_mail, |
|
12 |
.print_pdf, |
|
13 |
.print_epub { |
|
11 | 14 |
margin-left: 0; |
12 | 15 |
margin-right: 1em; |
13 | 16 |
} |
drupal7/sites/all/modules/print/print_ui/css/print_ui.theme.css | ||
---|---|---|
15 | 15 |
display: block; |
16 | 16 |
} |
17 | 17 |
|
18 |
.print_html, .print_mail, .print_pdf, .print_epub { |
|
18 |
.print_html, |
|
19 |
.print_mail, |
|
20 |
.print_pdf, |
|
21 |
.print_epub { |
|
19 | 22 |
margin-left: 1em; |
20 | 23 |
} |
21 | 24 |
|
drupal7/sites/all/modules/print/print_ui/print_ui.info | ||
---|---|---|
5 | 5 |
dependencies[] = print |
6 | 6 |
configure = admin/config/user-interface/print/ui |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2018-10-03
|
|
9 |
version = "7.x-2.1"
|
|
8 |
; Information added by Drupal.org packaging script on 2018-10-05
|
|
9 |
version = "7.x-2.2"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "print" |
12 |
datestamp = "1538588885" |
|
12 |
datestamp = "1538760185" |
Formats disponibles : Unified diff
Weekly update of contrib modules