Version Description
- Correctly register our PDF link with the WP Rewrite API when "Almost Pretty" permalinks are active (GH#502)
- Correctly process mergetags in password field for Tier 2 PDF templates (GH#503)
- Allow mergetags to be saved in HTML attributes in our Header / Footer settings - DEV NOTE: all Rich Text Editor settings fields should be output with
wp_kses_post( $html )
(GH#492) - Process mergetags before Header / Footer settings get passed to wp_kses_post() on output (GH#512)
- Renamed
check_wordpress()
method tois_compatible_wordpress_version()
to prevent false positive using ConfigServer eXploit Scanner (GH#500) - Explicitly set a forward slash after the home_url() when building PDF links (GH#511)
- Resolve incorrect page numbering in Mpdf's Table of Contents
- Change Helper_Misc->get_contrast() to choose white in more cases (GH#506)
Download this release
Release Info
Developer | Blue Liquid Designs |
Plugin | Gravity PDF |
Version | 4.0.6 |
Comparing to | |
See all releases |
Code changes from version 4.0.5 to 4.0.6
- README.txt +13 -3
- pdf.php +4 -4
- src/assets/js/gfpdf-entries.js +40 -40
- src/assets/languages/gravity-forms-pdf-extended.pot +12 -12
- src/controller/Controller_Shortcodes.php +201 -201
- src/helper/Helper_Misc.php +5 -3
- src/helper/Helper_PDF.php +4 -4
- src/helper/abstract/Helper_Abstract_Options.php +10 -0
- src/model/Model_Install.php +4 -1
- src/model/Model_PDF.php +6 -2
- src/view/html/Settings/system_status.php +137 -137
- vendor/autoload.php +1 -1
- vendor/blueliquiddesigns/mpdf/classes/tocontents.php +1 -1
- vendor/blueliquiddesigns/mpdf/mpdf.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +5 -5
- vendor/composer/installed.json +10 -10
- vendor/psr/log/Psr/Log/AbstractLogger.php +8 -8
- vendor/psr/log/Psr/Log/LoggerAwareInterface.php +1 -1
- vendor/psr/log/Psr/Log/LoggerInterface.php +9 -9
- vendor/psr/log/Psr/Log/LoggerTrait.php +9 -9
- vendor/psr/log/Psr/Log/NullLogger.php +1 -1
- vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +2 -2
README.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Gravity PDF ===
|
2 |
-
Contributors:
|
3 |
Plugin URI: https://gravitypdf.com/
|
4 |
Donate link: https://gravitypdf.com/donate-to-plugin/
|
5 |
Tags: gravity, forms, pdf, automation, attachment, email
|
6 |
Requires at least: 4.2
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 4.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl.txt
|
11 |
|
@@ -85,6 +85,16 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
= 4.0.5 =
|
89 |
* Add support for "Almost Pretty" permalinks for web servers that don't support Mod Rewrite (IIS) (GH#488)
|
90 |
* Add PHP 7.1 support – resolves two string-to-array issues (GH#495)
|
1 |
=== Gravity PDF ===
|
2 |
+
Contributors: blue-liquid-designs
|
3 |
Plugin URI: https://gravitypdf.com/
|
4 |
Donate link: https://gravitypdf.com/donate-to-plugin/
|
5 |
Tags: gravity, forms, pdf, automation, attachment, email
|
6 |
Requires at least: 4.2
|
7 |
+
Tested up to: 4.7
|
8 |
+
Stable tag: 4.0.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl.txt
|
11 |
|
85 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
= 4.0.6 =
|
89 |
+
* Correctly register our PDF link with the WP Rewrite API when "Almost Pretty" permalinks are active (GH#502)
|
90 |
+
* Correctly process mergetags in password field for Tier 2 PDF templates (GH#503)
|
91 |
+
* Allow mergetags to be saved in HTML attributes in our Header / Footer settings - DEV NOTE: all Rich Text Editor settings fields should be output with `wp_kses_post( $html )` (GH#492)
|
92 |
+
* Process mergetags before Header / Footer settings get passed to wp_kses_post() on output (GH#512)
|
93 |
+
* Renamed `check_wordpress()` method to `is_compatible_wordpress_version()` to prevent false positive using ConfigServer eXploit Scanner (GH#500)
|
94 |
+
* Explicitly set a forward slash after the home_url() when building PDF links (GH#511)
|
95 |
+
* Resolve incorrect page numbering in Mpdf's Table of Contents
|
96 |
+
* Change Helper_Misc->get_contrast() to choose white in more cases (GH#506)
|
97 |
+
|
98 |
= 4.0.5 =
|
99 |
* Add support for "Almost Pretty" permalinks for web servers that don't support Mod Rewrite (IIS) (GH#488)
|
100 |
* Add PHP 7.1 support – resolves two string-to-array issues (GH#495)
|
pdf.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Gravity PDF
|
4 |
-
Version: 4.0.
|
5 |
Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
|
6 |
Author: Gravity PDF
|
7 |
Author URI: https://gravitypdf.com
|
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
38 |
* Set base constants we'll use throughout the plugin
|
39 |
*/
|
40 |
|
41 |
-
define( 'PDF_EXTENDED_VERSION', '4.0.
|
42 |
define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
|
43 |
define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
|
44 |
define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
|
@@ -156,7 +156,7 @@ class GFPDF_Major_Compatibility_Checks {
|
|
156 |
public function plugins_loaded() {
|
157 |
|
158 |
/* Check minimum requirements are met */
|
159 |
-
$this->
|
160 |
$this->check_gravity_forms();
|
161 |
$this->check_php();
|
162 |
$this->check_mb_string();
|
@@ -182,7 +182,7 @@ class GFPDF_Major_Compatibility_Checks {
|
|
182 |
*
|
183 |
* @since 4.0
|
184 |
*/
|
185 |
-
public function
|
186 |
global $wp_version;
|
187 |
|
188 |
/* WordPress version not compatible */
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Gravity PDF
|
4 |
+
Version: 4.0.6
|
5 |
Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
|
6 |
Author: Gravity PDF
|
7 |
Author URI: https://gravitypdf.com
|
38 |
* Set base constants we'll use throughout the plugin
|
39 |
*/
|
40 |
|
41 |
+
define( 'PDF_EXTENDED_VERSION', '4.0.6' ); /* the current plugin version */
|
42 |
define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
|
43 |
define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
|
44 |
define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
|
156 |
public function plugins_loaded() {
|
157 |
|
158 |
/* Check minimum requirements are met */
|
159 |
+
$this->is_compatible_wordpress_version();
|
160 |
$this->check_gravity_forms();
|
161 |
$this->check_php();
|
162 |
$this->check_mb_string();
|
182 |
*
|
183 |
* @since 4.0
|
184 |
*/
|
185 |
+
public function is_compatible_wordpress_version() {
|
186 |
global $wp_version;
|
187 |
|
188 |
/* WordPress version not compatible */
|
src/assets/js/gfpdf-entries.js
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
/**
|
2 |
-
* Gravity PDF Entries
|
3 |
-
* Dependancies: jQuery
|
4 |
-
* @since 4.0
|
5 |
-
*/
|
6 |
-
|
7 |
-
(function($) {
|
8 |
-
|
9 |
-
var GFPDF = {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Do a better hover when accessing the PDF submenu
|
13 |
-
* This allows for a longer timeout before the submenu is hidden again
|
14 |
-
* @since 4.0
|
15 |
-
*/
|
16 |
-
PDFSubmenuHover: function() {
|
17 |
-
$('table .gf_form_action_has_submenu').hover(function() {
|
18 |
-
|
19 |
-
clearTimeout($(this).data('timeout'));
|
20 |
-
|
21 |
-
$(this).find('.gf_submenu').show();
|
22 |
-
}, function() {
|
23 |
-
|
24 |
-
var self = this;
|
25 |
-
var t = setTimeout(function() {
|
26 |
-
$(self).find('.gf_submenu').hide();
|
27 |
-
}, 350);
|
28 |
-
|
29 |
-
$(this).data('timeout', t);
|
30 |
-
});
|
31 |
-
}
|
32 |
-
};
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
|
36 |
-
* @since 4.0
|
37 |
-
*/
|
38 |
-
$(function() {
|
39 |
-
GFPDF.PDFSubmenuHover();
|
40 |
-
});
|
41 |
})(jQuery);
|
1 |
+
/**
|
2 |
+
* Gravity PDF Entries
|
3 |
+
* Dependancies: jQuery
|
4 |
+
* @since 4.0
|
5 |
+
*/
|
6 |
+
|
7 |
+
(function($) {
|
8 |
+
|
9 |
+
var GFPDF = {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Do a better hover when accessing the PDF submenu
|
13 |
+
* This allows for a longer timeout before the submenu is hidden again
|
14 |
+
* @since 4.0
|
15 |
+
*/
|
16 |
+
PDFSubmenuHover: function() {
|
17 |
+
$('table .gf_form_action_has_submenu').hover(function() {
|
18 |
+
|
19 |
+
clearTimeout($(this).data('timeout'));
|
20 |
+
|
21 |
+
$(this).find('.gf_submenu').show();
|
22 |
+
}, function() {
|
23 |
+
|
24 |
+
var self = this;
|
25 |
+
var t = setTimeout(function() {
|
26 |
+
$(self).find('.gf_submenu').hide();
|
27 |
+
}, 350);
|
28 |
+
|
29 |
+
$(this).data('timeout', t);
|
30 |
+
});
|
31 |
+
}
|
32 |
+
};
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
|
36 |
+
* @since 4.0
|
37 |
+
*/
|
38 |
+
$(function() {
|
39 |
+
GFPDF.PDFSubmenuHover();
|
40 |
+
});
|
41 |
})(jQuery);
|
src/assets/languages/gravity-forms-pdf-extended.pot
CHANGED
@@ -451,35 +451,35 @@ msgstr ""
|
|
451 |
msgid "Settings updated."
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
455 |
msgid "PDF Settings could not be saved. Please enter all required information below."
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
459 |
msgid "Select Media"
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
463 |
msgid "Upload File"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
467 |
msgid "Width"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
471 |
msgid "Height"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
475 |
msgid "mm"
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
479 |
msgid "inches"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: src/helper/abstract/Helper_Abstract_Options.php:
|
483 |
msgid "The callback used for the %s setting is missing."
|
484 |
msgstr ""
|
485 |
|
@@ -1191,19 +1191,19 @@ msgstr ""
|
|
1191 |
msgid "PDF successfully duplicated."
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: src/model/Model_Install.php:
|
1195 |
msgid "There was a problem creating the %s directory. Ensure you have write permissions to your uploads folder."
|
1196 |
msgstr ""
|
1197 |
|
1198 |
-
#: src/model/Model_Install.php:
|
1199 |
msgid "Gravity PDF does not have write permission to the %s directory. Contact your web hosting provider to fix the issue."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: src/model/Model_Install.php:
|
1203 |
msgid "There was a problem removing the Gravity Form \"%s\" PDF configuration. Try delete manually."
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: src/model/Model_Install.php:
|
1207 |
msgid "There was a problem removing the %s directory. Clean up manually via (S)FTP."
|
1208 |
msgstr ""
|
1209 |
|
451 |
msgid "Settings updated."
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:2969, src/helper/abstract/Helper_Abstract_Options.php:2985, src/helper/abstract/Helper_Abstract_Options.php:3001
|
455 |
msgid "PDF Settings could not be saved. Please enter all required information below."
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4065, src/helper/abstract/Helper_Abstract_Options.php:4067
|
459 |
msgid "Select Media"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4069
|
463 |
msgid "Upload File"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4383
|
467 |
msgid "Width"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4385
|
471 |
msgid "Height"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4391
|
475 |
msgid "mm"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4393
|
479 |
msgid "inches"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: src/helper/abstract/Helper_Abstract_Options.php:4513
|
483 |
msgid "The callback used for the %s setting is missing."
|
484 |
msgstr ""
|
485 |
|
1191 |
msgid "PDF successfully duplicated."
|
1192 |
msgstr ""
|
1193 |
|
1194 |
+
#: src/model/Model_Install.php:639
|
1195 |
msgid "There was a problem creating the %s directory. Ensure you have write permissions to your uploads folder."
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: src/model/Model_Install.php:657
|
1199 |
msgid "Gravity PDF does not have write permission to the %s directory. Contact your web hosting provider to fix the issue."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
+
#: src/model/Model_Install.php:955
|
1203 |
msgid "There was a problem removing the Gravity Form \"%s\" PDF configuration. Try delete manually."
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: src/model/Model_Install.php:1019
|
1207 |
msgid "There was a problem removing the %s directory. Clean up manually via (S)FTP."
|
1208 |
msgstr ""
|
1209 |
|
src/controller/Controller_Shortcodes.php
CHANGED
@@ -1,201 +1,201 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace GFPDF\Controller;
|
4 |
-
|
5 |
-
use GFPDF\Helper\Helper_Abstract_Controller;
|
6 |
-
use GFPDF\Helper\Helper_Abstract_Model;
|
7 |
-
use GFPDF\Helper\Helper_Abstract_View;
|
8 |
-
use GFPDF\Helper\Helper_Interface_Filters;
|
9 |
-
|
10 |
-
use Psr\Log\LoggerInterface;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* PDF Shortcode Controller
|
14 |
-
*
|
15 |
-
* @package Gravity PDF
|
16 |
-
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
17 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
18 |
-
* @since 4.0
|
19 |
-
*/
|
20 |
-
|
21 |
-
/* Exit if accessed directly */
|
22 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
23 |
-
exit;
|
24 |
-
}
|
25 |
-
|
26 |
-
/*
|
27 |
-
This file is part of Gravity PDF.
|
28 |
-
|
29 |
-
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
30 |
-
|
31 |
-
This program is free software; you can redistribute it and/or modify
|
32 |
-
it under the terms of the GNU General Public License as published by
|
33 |
-
the Free Software Foundation; either version 2 of the License, or
|
34 |
-
(at your option) any later version.
|
35 |
-
|
36 |
-
This program is distributed in the hope that it will be useful,
|
37 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
38 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
39 |
-
GNU General Public License for more details.
|
40 |
-
|
41 |
-
You should have received a copy of the GNU General Public License
|
42 |
-
along with this program; if not, write to the Free Software
|
43 |
-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Controller_PDF
|
48 |
-
* Handles the PDF display and authentication
|
49 |
-
*
|
50 |
-
* @since 4.0
|
51 |
-
*/
|
52 |
-
class Controller_Shortcodes extends Helper_Abstract_Controller implements Helper_Interface_Filters {
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Holds our log class
|
56 |
-
*
|
57 |
-
* @var \Monolog\Logger|LoggerInterface
|
58 |
-
* @since 4.0
|
59 |
-
*/
|
60 |
-
protected $log;
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Setup our class by injecting all our dependancies
|
64 |
-
*
|
65 |
-
* @param Helper_Abstract_Model|\GFPDF\Model\Model_Shortcodes $model Our Shortcodes Model the controller will manage
|
66 |
-
* @param Helper_Abstract_View|\GFPDF\View\View_Shortcodes $view Our Shortcodes View the controller will manage
|
67 |
-
* @param \Monolog\Logger|LoggerInterface $log Our logger class
|
68 |
-
*
|
69 |
-
* @since 4.0
|
70 |
-
*/
|
71 |
-
public function __construct( Helper_Abstract_Model $model, Helper_Abstract_View $view, LoggerInterface $log ) {
|
72 |
-
|
73 |
-
/* Assign our internal variables */
|
74 |
-
$this->log = $log;
|
75 |
-
|
76 |
-
/* Load our model and view */
|
77 |
-
$this->model = $model;
|
78 |
-
$this->model->setController( $this );
|
79 |
-
|
80 |
-
$this->view = $view;
|
81 |
-
$this->view->setController( $this );
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Initialise our class defaults
|
86 |
-
*
|
87 |
-
* @since 4.0
|
88 |
-
*
|
89 |
-
* @return void
|
90 |
-
*/
|
91 |
-
public function init() {
|
92 |
-
|
93 |
-
$this->add_filters();
|
94 |
-
$this->add_shortcodes();
|
95 |
-
|
96 |
-
/* Add support for the new shortcake UI currently being considered for core integration */
|
97 |
-
if ( is_admin() ) {
|
98 |
-
$this->add_shortcake_support();
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Apply any filters needed for the settings page
|
104 |
-
*
|
105 |
-
* @since 4.0
|
106 |
-
*
|
107 |
-
* @return void
|
108 |
-
*/
|
109 |
-
public function add_filters() {
|
110 |
-
|
111 |
-
add_filter( 'gform_confirmation', array( $this->model, 'gravitypdf_confirmation' ), 10, 3 );
|
112 |
-
add_filter( 'gform_notification', array( $this->model, 'gravitypdf_notification' ), 10, 3 );
|
113 |
-
add_filter( 'gform_admin_pre_render', array( $this->model, 'gravitypdf_redirect_confirmation' ) );
|
114 |
-
|
115 |
-
/* Basic GravityView Support */
|
116 |
-
add_filter( 'gravityview/fields/custom/content_before', array( $this->model, 'gravitypdf_gravityview_custom' ), 10 );
|
117 |
-
}
|
118 |
-
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Register our shortcodes
|
122 |
-
*
|
123 |
-
* @since 4.0
|
124 |
-
*
|
125 |
-
* @return void
|
126 |
-
*/
|
127 |
-
public function add_shortcodes() {
|
128 |
-
add_shortcode( 'gravitypdf', array( $this->model, 'gravitypdf' ) );
|
129 |
-
}
|
130 |
-
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Register our shortcake attributes
|
134 |
-
* See https://github.com/fusioneng/Shortcake for more details
|
135 |
-
*
|
136 |
-
* @since 4.0
|
137 |
-
*
|
138 |
-
* @return void
|
139 |
-
*/
|
140 |
-
public function add_shortcake_support() {
|
141 |
-
|
142 |
-
/* Exist if the shortcake function doesn't exist */
|
143 |
-
if ( ! function_exists( 'shortcode_ui_register_for_shortcode' ) ) {
|
144 |
-
return null;
|
145 |
-
}
|
146 |
-
|
147 |
-
$this->log->addNotice( 'Enable Shortcake support.' );
|
148 |
-
|
149 |
-
/* Enhance further */
|
150 |
-
shortcode_ui_register_for_shortcode( 'gravitypdf', array(
|
151 |
-
'label' => esc_html__( 'Gravity PDF', 'gravity-forms-pdf-extended' ),
|
152 |
-
|
153 |
-
'listItemImage' => 'dashicons-admin-site',
|
154 |
-
|
155 |
-
'attrs' => array(
|
156 |
-
array(
|
157 |
-
'label' => 'ID',
|
158 |
-
'attr' => 'id',
|
159 |
-
'type' => 'text',
|
160 |
-
),
|
161 |
-
|
162 |
-
array(
|
163 |
-
'label' => 'Anchor Text',
|
164 |
-
'attr' => 'text',
|
165 |
-
'type' => 'text',
|
166 |
-
),
|
167 |
-
|
168 |
-
array(
|
169 |
-
'label' => 'View',
|
170 |
-
'attr' => 'type',
|
171 |
-
'type' => 'select',
|
172 |
-
'default' => 'download',
|
173 |
-
'options' => array(
|
174 |
-
'download' => 'Download',
|
175 |
-
'view' => 'View',
|
176 |
-
),
|
177 |
-
),
|
178 |
-
|
179 |
-
array(
|
180 |
-
'label' => 'Anchor Class',
|
181 |
-
'attr' => 'class',
|
182 |
-
'type' => 'text',
|
183 |
-
'description' => 'Optional. Add any class name – separated by a space – you want to apply to the PDF link.',
|
184 |
-
'meta' => array(
|
185 |
-
'placeholder' => '',
|
186 |
-
),
|
187 |
-
),
|
188 |
-
|
189 |
-
array(
|
190 |
-
'label' => 'Entry ID',
|
191 |
-
'attr' => 'entry',
|
192 |
-
'type' => 'text',
|
193 |
-
'description' => 'Optional. You can pass in a specific ID or let us auto select one.',
|
194 |
-
'meta' => array(
|
195 |
-
'placeholder' => '',
|
196 |
-
),
|
197 |
-
),
|
198 |
-
),
|
199 |
-
) );
|
200 |
-
}
|
201 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace GFPDF\Controller;
|
4 |
+
|
5 |
+
use GFPDF\Helper\Helper_Abstract_Controller;
|
6 |
+
use GFPDF\Helper\Helper_Abstract_Model;
|
7 |
+
use GFPDF\Helper\Helper_Abstract_View;
|
8 |
+
use GFPDF\Helper\Helper_Interface_Filters;
|
9 |
+
|
10 |
+
use Psr\Log\LoggerInterface;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* PDF Shortcode Controller
|
14 |
+
*
|
15 |
+
* @package Gravity PDF
|
16 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
17 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
18 |
+
* @since 4.0
|
19 |
+
*/
|
20 |
+
|
21 |
+
/* Exit if accessed directly */
|
22 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
23 |
+
exit;
|
24 |
+
}
|
25 |
+
|
26 |
+
/*
|
27 |
+
This file is part of Gravity PDF.
|
28 |
+
|
29 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
30 |
+
|
31 |
+
This program is free software; you can redistribute it and/or modify
|
32 |
+
it under the terms of the GNU General Public License as published by
|
33 |
+
the Free Software Foundation; either version 2 of the License, or
|
34 |
+
(at your option) any later version.
|
35 |
+
|
36 |
+
This program is distributed in the hope that it will be useful,
|
37 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
38 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
39 |
+
GNU General Public License for more details.
|
40 |
+
|
41 |
+
You should have received a copy of the GNU General Public License
|
42 |
+
along with this program; if not, write to the Free Software
|
43 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
44 |
+
*/
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Controller_PDF
|
48 |
+
* Handles the PDF display and authentication
|
49 |
+
*
|
50 |
+
* @since 4.0
|
51 |
+
*/
|
52 |
+
class Controller_Shortcodes extends Helper_Abstract_Controller implements Helper_Interface_Filters {
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Holds our log class
|
56 |
+
*
|
57 |
+
* @var \Monolog\Logger|LoggerInterface
|
58 |
+
* @since 4.0
|
59 |
+
*/
|
60 |
+
protected $log;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Setup our class by injecting all our dependancies
|
64 |
+
*
|
65 |
+
* @param Helper_Abstract_Model|\GFPDF\Model\Model_Shortcodes $model Our Shortcodes Model the controller will manage
|
66 |
+
* @param Helper_Abstract_View|\GFPDF\View\View_Shortcodes $view Our Shortcodes View the controller will manage
|
67 |
+
* @param \Monolog\Logger|LoggerInterface $log Our logger class
|
68 |
+
*
|
69 |
+
* @since 4.0
|
70 |
+
*/
|
71 |
+
public function __construct( Helper_Abstract_Model $model, Helper_Abstract_View $view, LoggerInterface $log ) {
|
72 |
+
|
73 |
+
/* Assign our internal variables */
|
74 |
+
$this->log = $log;
|
75 |
+
|
76 |
+
/* Load our model and view */
|
77 |
+
$this->model = $model;
|
78 |
+
$this->model->setController( $this );
|
79 |
+
|
80 |
+
$this->view = $view;
|
81 |
+
$this->view->setController( $this );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Initialise our class defaults
|
86 |
+
*
|
87 |
+
* @since 4.0
|
88 |
+
*
|
89 |
+
* @return void
|
90 |
+
*/
|
91 |
+
public function init() {
|
92 |
+
|
93 |
+
$this->add_filters();
|
94 |
+
$this->add_shortcodes();
|
95 |
+
|
96 |
+
/* Add support for the new shortcake UI currently being considered for core integration */
|
97 |
+
if ( is_admin() ) {
|
98 |
+
$this->add_shortcake_support();
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Apply any filters needed for the settings page
|
104 |
+
*
|
105 |
+
* @since 4.0
|
106 |
+
*
|
107 |
+
* @return void
|
108 |
+
*/
|
109 |
+
public function add_filters() {
|
110 |
+
|
111 |
+
add_filter( 'gform_confirmation', array( $this->model, 'gravitypdf_confirmation' ), 10, 3 );
|
112 |
+
add_filter( 'gform_notification', array( $this->model, 'gravitypdf_notification' ), 10, 3 );
|
113 |
+
add_filter( 'gform_admin_pre_render', array( $this->model, 'gravitypdf_redirect_confirmation' ) );
|
114 |
+
|
115 |
+
/* Basic GravityView Support */
|
116 |
+
add_filter( 'gravityview/fields/custom/content_before', array( $this->model, 'gravitypdf_gravityview_custom' ), 10 );
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Register our shortcodes
|
122 |
+
*
|
123 |
+
* @since 4.0
|
124 |
+
*
|
125 |
+
* @return void
|
126 |
+
*/
|
127 |
+
public function add_shortcodes() {
|
128 |
+
add_shortcode( 'gravitypdf', array( $this->model, 'gravitypdf' ) );
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Register our shortcake attributes
|
134 |
+
* See https://github.com/fusioneng/Shortcake for more details
|
135 |
+
*
|
136 |
+
* @since 4.0
|
137 |
+
*
|
138 |
+
* @return void
|
139 |
+
*/
|
140 |
+
public function add_shortcake_support() {
|
141 |
+
|
142 |
+
/* Exist if the shortcake function doesn't exist */
|
143 |
+
if ( ! function_exists( 'shortcode_ui_register_for_shortcode' ) ) {
|
144 |
+
return null;
|
145 |
+
}
|
146 |
+
|
147 |
+
$this->log->addNotice( 'Enable Shortcake support.' );
|
148 |
+
|
149 |
+
/* Enhance further */
|
150 |
+
shortcode_ui_register_for_shortcode( 'gravitypdf', array(
|
151 |
+
'label' => esc_html__( 'Gravity PDF', 'gravity-forms-pdf-extended' ),
|
152 |
+
|
153 |
+
'listItemImage' => 'dashicons-admin-site',
|
154 |
+
|
155 |
+
'attrs' => array(
|
156 |
+
array(
|
157 |
+
'label' => 'ID',
|
158 |
+
'attr' => 'id',
|
159 |
+
'type' => 'text',
|
160 |
+
),
|
161 |
+
|
162 |
+
array(
|
163 |
+
'label' => 'Anchor Text',
|
164 |
+
'attr' => 'text',
|
165 |
+
'type' => 'text',
|
166 |
+
),
|
167 |
+
|
168 |
+
array(
|
169 |
+
'label' => 'View',
|
170 |
+
'attr' => 'type',
|
171 |
+
'type' => 'select',
|
172 |
+
'default' => 'download',
|
173 |
+
'options' => array(
|
174 |
+
'download' => 'Download',
|
175 |
+
'view' => 'View',
|
176 |
+
),
|
177 |
+
),
|
178 |
+
|
179 |
+
array(
|
180 |
+
'label' => 'Anchor Class',
|
181 |
+
'attr' => 'class',
|
182 |
+
'type' => 'text',
|
183 |
+
'description' => 'Optional. Add any class name – separated by a space – you want to apply to the PDF link.',
|
184 |
+
'meta' => array(
|
185 |
+
'placeholder' => '',
|
186 |
+
),
|
187 |
+
),
|
188 |
+
|
189 |
+
array(
|
190 |
+
'label' => 'Entry ID',
|
191 |
+
'attr' => 'entry',
|
192 |
+
'type' => 'text',
|
193 |
+
'description' => 'Optional. You can pass in a specific ID or let us auto select one.',
|
194 |
+
'meta' => array(
|
195 |
+
'placeholder' => '',
|
196 |
+
),
|
197 |
+
),
|
198 |
+
),
|
199 |
+
) );
|
200 |
+
}
|
201 |
+
}
|
src/helper/Helper_Misc.php
CHANGED
@@ -315,7 +315,7 @@ class Helper_Misc {
|
|
315 |
$b = hexdec( substr( $hexcolor, 4, 2 ) );
|
316 |
$yiq = ( ( $r * 299 ) + ( $g * 587 ) + ( $b * 114 ) ) / 1000;
|
317 |
|
318 |
-
return ( $yiq >=
|
319 |
}
|
320 |
|
321 |
/**
|
@@ -993,19 +993,21 @@ class Helper_Misc {
|
|
993 |
* Converts the 4.x settings array into a compatible 3.x settings array
|
994 |
*
|
995 |
* @param array $settings The 4.x settings to be converted
|
|
|
|
|
996 |
*
|
997 |
* @return array The 3.x compatible settings
|
998 |
*
|
999 |
* @since 4.0
|
1000 |
*/
|
1001 |
-
public function backwards_compat_conversion( $settings ) {
|
1002 |
|
1003 |
$compat = array();
|
1004 |
$compat['premium'] = ( isset( $settings['advanced_template'] ) && $settings['advanced_template'] == 'Yes' ) ? true : false;
|
1005 |
$compat['rtl'] = ( isset( $settings['rtl'] ) && $settings['rtl'] == 'Yes' ) ? true : false;
|
1006 |
$compat['dpi'] = ( isset( $settings['image_dpi'] ) ) ? (int) $settings['image_dpi'] : 96;
|
1007 |
$compat['security'] = ( isset( $settings['security'] ) && $settings['security'] == 'Yes' ) ? true : false;
|
1008 |
-
$compat['pdf_password'] = ( isset( $settings['password'] ) ) ? $settings['password'] : '';
|
1009 |
$compat['pdf_privileges'] = ( isset( $settings['privileges'] ) ) ? $settings['privileges'] : '';
|
1010 |
$compat['pdfa1b'] = ( isset( $settings['format'] ) && $settings['format'] == 'PDFA1B' ) ? true : false;
|
1011 |
$compat['pdfx1a'] = ( isset( $settings['format'] ) && $settings['format'] == 'PDFX1A' ) ? true : false;
|
315 |
$b = hexdec( substr( $hexcolor, 4, 2 ) );
|
316 |
$yiq = ( ( $r * 299 ) + ( $g * 587 ) + ( $b * 114 ) ) / 1000;
|
317 |
|
318 |
+
return ( $yiq >= 150 ) ? '#000' : '#FFF';
|
319 |
}
|
320 |
|
321 |
/**
|
993 |
* Converts the 4.x settings array into a compatible 3.x settings array
|
994 |
*
|
995 |
* @param array $settings The 4.x settings to be converted
|
996 |
+
* @param array $form (since 4.0.6) The Gravity Forms array
|
997 |
+
* @param array $entry (since 4.0.6) The Gravity Forms entry
|
998 |
*
|
999 |
* @return array The 3.x compatible settings
|
1000 |
*
|
1001 |
* @since 4.0
|
1002 |
*/
|
1003 |
+
public function backwards_compat_conversion( $settings, $form, $entry ) {
|
1004 |
|
1005 |
$compat = array();
|
1006 |
$compat['premium'] = ( isset( $settings['advanced_template'] ) && $settings['advanced_template'] == 'Yes' ) ? true : false;
|
1007 |
$compat['rtl'] = ( isset( $settings['rtl'] ) && $settings['rtl'] == 'Yes' ) ? true : false;
|
1008 |
$compat['dpi'] = ( isset( $settings['image_dpi'] ) ) ? (int) $settings['image_dpi'] : 96;
|
1009 |
$compat['security'] = ( isset( $settings['security'] ) && $settings['security'] == 'Yes' ) ? true : false;
|
1010 |
+
$compat['pdf_password'] = ( isset( $settings['password'] ) ) ? $this->gform->process_tags( $settings['password'], $form, $entry ) : '';
|
1011 |
$compat['pdf_privileges'] = ( isset( $settings['privileges'] ) ) ? $settings['privileges'] : '';
|
1012 |
$compat['pdfa1b'] = ( isset( $settings['format'] ) && $settings['format'] == 'PDFA1B' ) ? true : false;
|
1013 |
$compat['pdfx1a'] = ( isset( $settings['format'] ) && $settings['format'] == 'PDFX1A' ) ? true : false;
|
src/helper/Helper_PDF.php
CHANGED
@@ -230,12 +230,12 @@ class Helper_PDF {
|
|
230 |
}
|
231 |
|
232 |
/* Apply our filters */
|
233 |
-
$html = apply_filters( 'gfpdfe_pdf_template', $html, $form['id'], $this->entry['id'], $
|
234 |
-
$html = apply_filters( 'gfpdfe_pdf_template_' . $form['id'], $html, $this->entry['id'], $
|
235 |
|
236 |
/* See https://gravitypdf.com/documentation/v4/gfpdf_pdf_html_output/ for more details about these filters */
|
237 |
-
$html = apply_filters( 'gfpdf_pdf_html_output', $html, $form, $this->entry, $
|
238 |
-
$html = apply_filters( 'gfpdf_pdf_html_output_' . $form['id'], $html, $this->gform, $this->entry, $
|
239 |
|
240 |
/* Check if we should output the HTML to the browser, for debugging */
|
241 |
$this->maybe_display_raw_html( $html );
|
230 |
}
|
231 |
|
232 |
/* Apply our filters */
|
233 |
+
$html = apply_filters( 'gfpdfe_pdf_template', $html, $form['id'], $this->entry['id'], $args['settings'] ); /* Backwards compat */
|
234 |
+
$html = apply_filters( 'gfpdfe_pdf_template_' . $form['id'], $html, $this->entry['id'], $args['settings'] ); /* Backwards compat */
|
235 |
|
236 |
/* See https://gravitypdf.com/documentation/v4/gfpdf_pdf_html_output/ for more details about these filters */
|
237 |
+
$html = apply_filters( 'gfpdf_pdf_html_output', $html, $form, $this->entry, $args['settings'], $this );
|
238 |
+
$html = apply_filters( 'gfpdf_pdf_html_output_' . $form['id'], $html, $this->gform, $this->entry, $args['settings'], $this );
|
239 |
|
240 |
/* Check if we should output the HTML to the browser, for debugging */
|
241 |
$this->maybe_display_raw_html( $html );
|
src/helper/abstract/Helper_Abstract_Options.php
CHANGED
@@ -1430,6 +1430,16 @@ abstract class Helper_Abstract_Options implements Helper_Interface_Filters {
|
|
1430 |
|
1431 |
switch ( $settings['type'] ) {
|
1432 |
case 'rich_editor':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1433 |
case 'textarea':
|
1434 |
return wp_kses_post( $value );
|
1435 |
break;
|
1430 |
|
1431 |
switch ( $settings['type'] ) {
|
1432 |
case 'rich_editor':
|
1433 |
+
/**
|
1434 |
+
* Don't do any sanitization on input, which was causing problems with merge tags in HTML attributes.
|
1435 |
+
* See https://github.com/GravityPDF/gravity-pdf/issues/492 for more details.
|
1436 |
+
*
|
1437 |
+
* @internal Devs should run the field through wp_kses_post() on output to correctly sanitize
|
1438 |
+
* @since 4.0.6
|
1439 |
+
*/
|
1440 |
+
return $value;
|
1441 |
+
break;
|
1442 |
+
|
1443 |
case 'textarea':
|
1444 |
return wp_kses_post( $value );
|
1445 |
break;
|
src/model/Model_Install.php
CHANGED
@@ -149,7 +149,10 @@ class Model_Install extends Helper_Abstract_Model {
|
|
149 |
* @since 4.0
|
150 |
*/
|
151 |
public function get_permalink_regex() {
|
152 |
-
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
/**
|
149 |
* @since 4.0
|
150 |
*/
|
151 |
public function get_permalink_regex() {
|
152 |
+
global $wp_rewrite;
|
153 |
+
|
154 |
+
$root = str_replace( '/', '\/', $wp_rewrite->root );
|
155 |
+
return '^' . $root . 'pdf\/([A-Za-z0-9]+)\/([0-9]+)\/?(download)?\/?';
|
156 |
}
|
157 |
|
158 |
/**
|
src/model/Model_PDF.php
CHANGED
@@ -695,7 +695,7 @@ class Model_PDF extends Helper_Abstract_Model {
|
|
695 |
|
696 |
/* Check if permalinks are enabled, otherwise fall back to our ugly link structure for 4.0 (not the same as our v3 links) */
|
697 |
if ( $wp_rewrite->using_permalinks() ) {
|
698 |
-
$url = home_url( '/'
|
699 |
$url .= 'pdf/' . $pid . '/' . $id . '/';
|
700 |
|
701 |
if ( $download ) {
|
@@ -840,7 +840,7 @@ class Model_PDF extends Helper_Abstract_Model {
|
|
840 |
$form['id'] . $entry['id'],
|
841 |
$this->misc->backwards_compat_output( $pdf->get_output_type() ),
|
842 |
$pdf->get_filename(),
|
843 |
-
$this->misc->backwards_compat_conversion( $settings ),
|
844 |
$args
|
845 |
); /* Backwards Compatibility */
|
846 |
|
@@ -1806,18 +1806,22 @@ class Model_PDF extends Helper_Abstract_Model {
|
|
1806 |
public function preprocess_template_arguments( $args ) {
|
1807 |
|
1808 |
if ( isset( $args['settings']['header'] ) ) {
|
|
|
1809 |
$args['settings']['header'] = $this->misc->fix_header_footer( $args['settings']['header'] );
|
1810 |
}
|
1811 |
|
1812 |
if ( isset( $args['settings']['first_header'] ) ) {
|
|
|
1813 |
$args['settings']['first_header'] = $this->misc->fix_header_footer( $args['settings']['first_header'] );
|
1814 |
}
|
1815 |
|
1816 |
if ( isset( $args['settings']['footer'] ) ) {
|
|
|
1817 |
$args['settings']['footer'] = $this->misc->fix_header_footer( $args['settings']['footer'] );
|
1818 |
}
|
1819 |
|
1820 |
if ( isset( $args['settings']['first_footer'] ) ) {
|
|
|
1821 |
$args['settings']['first_footer'] = $this->misc->fix_header_footer( $args['settings']['first_footer'] );
|
1822 |
}
|
1823 |
|
695 |
|
696 |
/* Check if permalinks are enabled, otherwise fall back to our ugly link structure for 4.0 (not the same as our v3 links) */
|
697 |
if ( $wp_rewrite->using_permalinks() ) {
|
698 |
+
$url = home_url() . '/' . $wp_rewrite->root; /* Handle "almost pretty" permalinks - fix for IIS servers without modrewrite */
|
699 |
$url .= 'pdf/' . $pid . '/' . $id . '/';
|
700 |
|
701 |
if ( $download ) {
|
840 |
$form['id'] . $entry['id'],
|
841 |
$this->misc->backwards_compat_output( $pdf->get_output_type() ),
|
842 |
$pdf->get_filename(),
|
843 |
+
$this->misc->backwards_compat_conversion( $settings, $form, $entry ),
|
844 |
$args
|
845 |
); /* Backwards Compatibility */
|
846 |
|
1806 |
public function preprocess_template_arguments( $args ) {
|
1807 |
|
1808 |
if ( isset( $args['settings']['header'] ) ) {
|
1809 |
+
$args['settings']['header'] = $this->gform->process_tags( $args['settings']['header'], $args['form'], $args['entry'] );
|
1810 |
$args['settings']['header'] = $this->misc->fix_header_footer( $args['settings']['header'] );
|
1811 |
}
|
1812 |
|
1813 |
if ( isset( $args['settings']['first_header'] ) ) {
|
1814 |
+
$args['settings']['first_header'] = $this->gform->process_tags( $args['settings']['first_header'], $args['form'], $args['entry'] );
|
1815 |
$args['settings']['first_header'] = $this->misc->fix_header_footer( $args['settings']['first_header'] );
|
1816 |
}
|
1817 |
|
1818 |
if ( isset( $args['settings']['footer'] ) ) {
|
1819 |
+
$args['settings']['footer'] = $this->gform->process_tags( $args['settings']['footer'], $args['form'], $args['entry'] );
|
1820 |
$args['settings']['footer'] = $this->misc->fix_header_footer( $args['settings']['footer'] );
|
1821 |
}
|
1822 |
|
1823 |
if ( isset( $args['settings']['first_footer'] ) ) {
|
1824 |
+
$args['settings']['first_footer'] = $this->gform->process_tags( $args['settings']['first_footer'], $args['form'], $args['entry'] );
|
1825 |
$args['settings']['first_footer'] = $this->misc->fix_header_footer( $args['settings']['first_footer'] );
|
1826 |
}
|
1827 |
|
src/view/html/Settings/system_status.php
CHANGED
@@ -1,137 +1,137 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* System Status Settings View
|
5 |
-
*
|
6 |
-
* @package Gravity PDF
|
7 |
-
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 4.0
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Exit if accessed directly */
|
14 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
-
exit;
|
16 |
-
}
|
17 |
-
|
18 |
-
/*
|
19 |
-
This file is part of Gravity PDF.
|
20 |
-
|
21 |
-
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
22 |
-
|
23 |
-
This program is free software; you can redistribute it and/or modify
|
24 |
-
it under the terms of the GNU General Public License as published by
|
25 |
-
the Free Software Foundation; either version 2 of the License, or
|
26 |
-
(at your option) any later version.
|
27 |
-
|
28 |
-
This program is distributed in the hope that it will be useful,
|
29 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
30 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
31 |
-
GNU General Public License for more details.
|
32 |
-
|
33 |
-
You should have received a copy of the GNU General Public License
|
34 |
-
along with this program; if not, write to the Free Software
|
35 |
-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
36 |
-
*/
|
37 |
-
|
38 |
-
?>
|
39 |
-
|
40 |
-
<div class="hr-divider"></div>
|
41 |
-
|
42 |
-
<h3>
|
43 |
-
<span>
|
44 |
-
<i class="fa fa-dashboard"></i>
|
45 |
-
<?php esc_html_e( 'Installation Status', 'gravity-forms-pdf-extended' ); ?>
|
46 |
-
</span>
|
47 |
-
</h3>
|
48 |
-
|
49 |
-
<table id="pdf-system-status" class="form-table">
|
50 |
-
<tr>
|
51 |
-
<th scope="row">
|
52 |
-
<?php esc_html_e( 'WP Memory Available', 'gravity-forms-pdf-extended' ); ?> <?php gform_tooltip( 'pdf_status_wp_memory' ); ?>
|
53 |
-
</th>
|
54 |
-
|
55 |
-
<td>
|
56 |
-
|
57 |
-
<?php
|
58 |
-
$ram_icon = 'fa fa-check-circle';
|
59 |
-
if ( $args['memory'] < 128 && $args['memory'] !== -1 ) {
|
60 |
-
$ram_icon = 'fa fa-exclamation-triangle';
|
61 |
-
}
|
62 |
-
?>
|
63 |
-
|
64 |
-
<?php if ( $args['memory'] === -1 ): ?>
|
65 |
-
<?php echo esc_html__( 'Unlimited', 'gravity-forms-pdf-extended' ); ?>
|
66 |
-
<?php else: ?>
|
67 |
-
<?php echo $args['memory']; ?>MB
|
68 |
-
<?php endif; ?>
|
69 |
-
|
70 |
-
<span class="<?php echo $ram_icon; ?>"></span>
|
71 |
-
|
72 |
-
<?php if ( $args['memory'] < 128 && $args['memory'] !== -1 ): ?>
|
73 |
-
<span class="gf_settings_description">
|
74 |
-
<?php echo sprintf( esc_html__( 'We strongly recommend you have at least 128MB of available WP Memory (RAM) assigned to your website. %sFind out how to increase this limit%s.', 'gravity-forms-pdf-extended' ), '<br /><a href="https://gravitypdf.com/documentation/v4/user-increasing-memory-limit/">', '</a>' ); ?>
|
75 |
-
</span>
|
76 |
-
<?php endif; ?>
|
77 |
-
</td>
|
78 |
-
</tr>
|
79 |
-
|
80 |
-
<tr>
|
81 |
-
<th scope="row">
|
82 |
-
<?php esc_html_e( 'WordPress Version', 'gravity-forms-pdf-extended' ); ?>
|
83 |
-
</th>
|
84 |
-
|
85 |
-
<td>
|
86 |
-
<?php echo $args['wp']; ?>
|
87 |
-
</td>
|
88 |
-
</tr>
|
89 |
-
|
90 |
-
<tr>
|
91 |
-
<th scope="row">
|
92 |
-
<?php esc_html_e( 'Gravity Forms Version', 'gravity-forms-pdf-extended' ); ?>
|
93 |
-
</th>
|
94 |
-
|
95 |
-
<td>
|
96 |
-
<?php echo $args['gf']; ?>
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
|
100 |
-
<tr>
|
101 |
-
<th scope="row">
|
102 |
-
<?php esc_html_e( 'PHP Version', 'gravity-forms-pdf-extended' ); ?>
|
103 |
-
</th>
|
104 |
-
|
105 |
-
<td>
|
106 |
-
<?php echo $args['php']; ?>
|
107 |
-
</td>
|
108 |
-
</tr>
|
109 |
-
|
110 |
-
<tr>
|
111 |
-
<th scope="row">
|
112 |
-
<?php esc_html_e( 'Direct PDF Protection', 'gravity-forms-pdf-extended' ); ?> <?php gform_tooltip( 'pdf_protection' ); ?>
|
113 |
-
</th>
|
114 |
-
|
115 |
-
<td>
|
116 |
-
|
117 |
-
<!-- A placeholder for our JS which will do the check for us, thereby preventing any load time by checking in PHP directly -->
|
118 |
-
<div id="gfpdf-direct-pdf-protection-check" data-nonce="<?php echo wp_create_nonce( 'gfpdf-direct-pdf-protection' ); ?>">
|
119 |
-
<noscript><?php esc_html_e( 'You need JavaScript enabled to perform this check.', 'gravity-forms-pdf-extended' ); ?></noscript>
|
120 |
-
|
121 |
-
<div id="gfpdf-direct-pdf-check-protected" style="display: none">
|
122 |
-
<?php esc_html_e( 'Protected', 'gravity-forms-pdf-extended' ); ?> <span class="fa fa-check-circle"></span>
|
123 |
-
</div>
|
124 |
-
|
125 |
-
<div id="gfpdf-direct-pdf-check-unprotected" style="display: none">
|
126 |
-
<strong><?php esc_html_e( 'Unprotected', 'gravity-forms-pdf-extended' ); ?></strong> <span class="fa fa-times-circle"></span>
|
127 |
-
|
128 |
-
<span class="gf_settings_description">
|
129 |
-
<?php printf( esc_html__( "We've detected the PDFs saved in Gravity PDF's %stmp%s directory can be publically accessed.", 'gravity-forms-pdf-extended' ), '<code>', '</code>' ); ?><br>
|
130 |
-
<?php printf( esc_html__( 'We recommend you use our %sgfpdf_tmp_location%s filter to %smove the folder outside your public website directory%s.', 'gravity-forms-pdf-extended' ), '<code>', '</code>', '<a href="https://gravitypdf.com/documentation/v4/gfpdf_tmp_location/">', '</a>' ); ?>
|
131 |
-
</span>
|
132 |
-
</div>
|
133 |
-
</div>
|
134 |
-
</td>
|
135 |
-
</tr>
|
136 |
-
|
137 |
-
</table>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* System Status Settings View
|
5 |
+
*
|
6 |
+
* @package Gravity PDF
|
7 |
+
* @copyright Copyright (c) 2016, Blue Liquid Designs
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 4.0
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
|
13 |
+
/* Exit if accessed directly */
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
/*
|
19 |
+
This file is part of Gravity PDF.
|
20 |
+
|
21 |
+
Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
|
22 |
+
|
23 |
+
This program is free software; you can redistribute it and/or modify
|
24 |
+
it under the terms of the GNU General Public License as published by
|
25 |
+
the Free Software Foundation; either version 2 of the License, or
|
26 |
+
(at your option) any later version.
|
27 |
+
|
28 |
+
This program is distributed in the hope that it will be useful,
|
29 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
30 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
31 |
+
GNU General Public License for more details.
|
32 |
+
|
33 |
+
You should have received a copy of the GNU General Public License
|
34 |
+
along with this program; if not, write to the Free Software
|
35 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
36 |
+
*/
|
37 |
+
|
38 |
+
?>
|
39 |
+
|
40 |
+
<div class="hr-divider"></div>
|
41 |
+
|
42 |
+
<h3>
|
43 |
+
<span>
|
44 |
+
<i class="fa fa-dashboard"></i>
|
45 |
+
<?php esc_html_e( 'Installation Status', 'gravity-forms-pdf-extended' ); ?>
|
46 |
+
</span>
|
47 |
+
</h3>
|
48 |
+
|
49 |
+
<table id="pdf-system-status" class="form-table">
|
50 |
+
<tr>
|
51 |
+
<th scope="row">
|
52 |
+
<?php esc_html_e( 'WP Memory Available', 'gravity-forms-pdf-extended' ); ?> <?php gform_tooltip( 'pdf_status_wp_memory' ); ?>
|
53 |
+
</th>
|
54 |
+
|
55 |
+
<td>
|
56 |
+
|
57 |
+
<?php
|
58 |
+
$ram_icon = 'fa fa-check-circle';
|
59 |
+
if ( $args['memory'] < 128 && $args['memory'] !== -1 ) {
|
60 |
+
$ram_icon = 'fa fa-exclamation-triangle';
|
61 |
+
}
|
62 |
+
?>
|
63 |
+
|
64 |
+
<?php if ( $args['memory'] === -1 ): ?>
|
65 |
+
<?php echo esc_html__( 'Unlimited', 'gravity-forms-pdf-extended' ); ?>
|
66 |
+
<?php else: ?>
|
67 |
+
<?php echo $args['memory']; ?>MB
|
68 |
+
<?php endif; ?>
|
69 |
+
|
70 |
+
<span class="<?php echo $ram_icon; ?>"></span>
|
71 |
+
|
72 |
+
<?php if ( $args['memory'] < 128 && $args['memory'] !== -1 ): ?>
|
73 |
+
<span class="gf_settings_description">
|
74 |
+
<?php echo sprintf( esc_html__( 'We strongly recommend you have at least 128MB of available WP Memory (RAM) assigned to your website. %sFind out how to increase this limit%s.', 'gravity-forms-pdf-extended' ), '<br /><a href="https://gravitypdf.com/documentation/v4/user-increasing-memory-limit/">', '</a>' ); ?>
|
75 |
+
</span>
|
76 |
+
<?php endif; ?>
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
|
80 |
+
<tr>
|
81 |
+
<th scope="row">
|
82 |
+
<?php esc_html_e( 'WordPress Version', 'gravity-forms-pdf-extended' ); ?>
|
83 |
+
</th>
|
84 |
+
|
85 |
+
<td>
|
86 |
+
<?php echo $args['wp']; ?>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
<tr>
|
91 |
+
<th scope="row">
|
92 |
+
<?php esc_html_e( 'Gravity Forms Version', 'gravity-forms-pdf-extended' ); ?>
|
93 |
+
</th>
|
94 |
+
|
95 |
+
<td>
|
96 |
+
<?php echo $args['gf']; ?>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
|
100 |
+
<tr>
|
101 |
+
<th scope="row">
|
102 |
+
<?php esc_html_e( 'PHP Version', 'gravity-forms-pdf-extended' ); ?>
|
103 |
+
</th>
|
104 |
+
|
105 |
+
<td>
|
106 |
+
<?php echo $args['php']; ?>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
|
110 |
+
<tr>
|
111 |
+
<th scope="row">
|
112 |
+
<?php esc_html_e( 'Direct PDF Protection', 'gravity-forms-pdf-extended' ); ?> <?php gform_tooltip( 'pdf_protection' ); ?>
|
113 |
+
</th>
|
114 |
+
|
115 |
+
<td>
|
116 |
+
|
117 |
+
<!-- A placeholder for our JS which will do the check for us, thereby preventing any load time by checking in PHP directly -->
|
118 |
+
<div id="gfpdf-direct-pdf-protection-check" data-nonce="<?php echo wp_create_nonce( 'gfpdf-direct-pdf-protection' ); ?>">
|
119 |
+
<noscript><?php esc_html_e( 'You need JavaScript enabled to perform this check.', 'gravity-forms-pdf-extended' ); ?></noscript>
|
120 |
+
|
121 |
+
<div id="gfpdf-direct-pdf-check-protected" style="display: none">
|
122 |
+
<?php esc_html_e( 'Protected', 'gravity-forms-pdf-extended' ); ?> <span class="fa fa-check-circle"></span>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
<div id="gfpdf-direct-pdf-check-unprotected" style="display: none">
|
126 |
+
<strong><?php esc_html_e( 'Unprotected', 'gravity-forms-pdf-extended' ); ?></strong> <span class="fa fa-times-circle"></span>
|
127 |
+
|
128 |
+
<span class="gf_settings_description">
|
129 |
+
<?php printf( esc_html__( "We've detected the PDFs saved in Gravity PDF's %stmp%s directory can be publically accessed.", 'gravity-forms-pdf-extended' ), '<code>', '</code>' ); ?><br>
|
130 |
+
<?php printf( esc_html__( 'We recommend you use our %sgfpdf_tmp_location%s filter to %smove the folder outside your public website directory%s.', 'gravity-forms-pdf-extended' ), '<code>', '</code>', '<a href="https://gravitypdf.com/documentation/v4/gfpdf_tmp_location/">', '</a>' ); ?>
|
131 |
+
</span>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
|
137 |
+
</table>
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitf19b525757c4d2ef00e410d42c87798b::getLoader();
|
vendor/blueliquiddesigns/mpdf/classes/tocontents.php
CHANGED
@@ -354,7 +354,7 @@ class tocontents
|
|
354 |
if ($TOCuseLinking) {
|
355 |
$html .= '<a class="mpdf_toc_a" href="#__mpdfinternallink_' . $t['link'] . '">';
|
356 |
}
|
357 |
-
$html .= '<span class="mpdf_toc_p_level_' . $t['l'] . '">' . $this->mpdf->docPageNum($t['p']) . '</span>';
|
358 |
if ($TOCuseLinking) {
|
359 |
$html .= '</a>';
|
360 |
}
|
354 |
if ($TOCuseLinking) {
|
355 |
$html .= '<a class="mpdf_toc_a" href="#__mpdfinternallink_' . $t['link'] . '">';
|
356 |
}
|
357 |
+
$html .= '<span class="mpdf_toc_p_level_' . $t['l'] . '">' . $this->mpdf->docPageNum($t['p'] + 1) . '</span>';
|
358 |
if ($TOCuseLinking) {
|
359 |
$html .= '</a>';
|
360 |
}
|
vendor/blueliquiddesigns/mpdf/mpdf.php
CHANGED
@@ -16412,7 +16412,7 @@ class mPDF
|
|
16412 |
$this->bufferoutput = false;
|
16413 |
|
16414 |
/* -- CSS-POSITION -- */
|
16415 |
-
if (count($this->fixedPosBlockSave)
|
16416 |
foreach ($this->fixedPosBlockSave AS $fpbs) {
|
16417 |
$old_page = $this->page;
|
16418 |
$this->page = $fpbs[2];
|
16412 |
$this->bufferoutput = false;
|
16413 |
|
16414 |
/* -- CSS-POSITION -- */
|
16415 |
+
if (count($this->fixedPosBlockSave)) {
|
16416 |
foreach ($this->fixedPosBlockSave AS $fpbs) {
|
16417 |
$old_page = $this->page;
|
16418 |
$this->page = $fpbs[2];
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit1df7b282d8067ac85521899a87b4868c
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit1df7b282d8067ac85521899a87b4868c
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitf19b525757c4d2ef00e410d42c87798b
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitf19b525757c4d2ef00e410d42c87798b', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf19b525757c4d2ef00e410d42c87798b', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitf19b525757c4d2ef00e410d42c87798b::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInitf19b525757c4d2ef00e410d42c87798b::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequiref19b525757c4d2ef00e410d42c87798b($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequiref19b525757c4d2ef00e410d42c87798b($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'e9b046393eb3376a21bcc1a30bd2fe64' => __DIR__ . '/..' . '/querypath/querypath/src/qp_functions.php',
|
@@ -352,10 +352,10 @@ class ComposerStaticInit1df7b282d8067ac85521899a87b4868c
|
|
352 |
public static function getInitializer(ClassLoader $loader)
|
353 |
{
|
354 |
return \Closure::bind(function () use ($loader) {
|
355 |
-
$loader->prefixLengthsPsr4 =
|
356 |
-
$loader->prefixDirsPsr4 =
|
357 |
-
$loader->prefixesPsr0 =
|
358 |
-
$loader->classMap =
|
359 |
|
360 |
}, null, ClassLoader::class);
|
361 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitf19b525757c4d2ef00e410d42c87798b
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'e9b046393eb3376a21bcc1a30bd2fe64' => __DIR__ . '/..' . '/querypath/querypath/src/qp_functions.php',
|
352 |
public static function getInitializer(ClassLoader $loader)
|
353 |
{
|
354 |
return \Closure::bind(function () use ($loader) {
|
355 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitf19b525757c4d2ef00e410d42c87798b::$prefixLengthsPsr4;
|
356 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitf19b525757c4d2ef00e410d42c87798b::$prefixDirsPsr4;
|
357 |
+
$loader->prefixesPsr0 = ComposerStaticInitf19b525757c4d2ef00e410d42c87798b::$prefixesPsr0;
|
358 |
+
$loader->classMap = ComposerStaticInitf19b525757c4d2ef00e410d42c87798b::$classMap;
|
359 |
|
360 |
}, null, ClassLoader::class);
|
361 |
}
|
vendor/composer/installed.json
CHANGED
@@ -57,12 +57,12 @@
|
|
57 |
"source": {
|
58 |
"type": "git",
|
59 |
"url": "https://github.com/GravityPDF/mpdf.git",
|
60 |
-
"reference": "
|
61 |
},
|
62 |
"dist": {
|
63 |
"type": "zip",
|
64 |
-
"url": "https://api.github.com/repos/GravityPDF/mpdf/zipball/
|
65 |
-
"reference": "
|
66 |
"shasum": ""
|
67 |
},
|
68 |
"require": {
|
@@ -76,7 +76,7 @@
|
|
76 |
"suggest": {
|
77 |
"ext-zlib": "Needed for compression of embedded resources, such as fonts"
|
78 |
},
|
79 |
-
"time": "2016-
|
80 |
"type": "library",
|
81 |
"installation-source": "dist",
|
82 |
"autoload": {
|
@@ -105,23 +105,23 @@
|
|
105 |
},
|
106 |
{
|
107 |
"name": "psr/log",
|
108 |
-
"version": "1.0.
|
109 |
-
"version_normalized": "1.0.
|
110 |
"source": {
|
111 |
"type": "git",
|
112 |
"url": "https://github.com/php-fig/log.git",
|
113 |
-
"reference": "
|
114 |
},
|
115 |
"dist": {
|
116 |
"type": "zip",
|
117 |
-
"url": "https://api.github.com/repos/php-fig/log/zipball/
|
118 |
-
"reference": "
|
119 |
"shasum": ""
|
120 |
},
|
121 |
"require": {
|
122 |
"php": ">=5.3.0"
|
123 |
},
|
124 |
-
"time": "2016-
|
125 |
"type": "library",
|
126 |
"extra": {
|
127 |
"branch-alias": {
|
57 |
"source": {
|
58 |
"type": "git",
|
59 |
"url": "https://github.com/GravityPDF/mpdf.git",
|
60 |
+
"reference": "8c1910e5813d66ec2a1c39b1da515fa4da1448e2"
|
61 |
},
|
62 |
"dist": {
|
63 |
"type": "zip",
|
64 |
+
"url": "https://api.github.com/repos/GravityPDF/mpdf/zipball/8c1910e5813d66ec2a1c39b1da515fa4da1448e2",
|
65 |
+
"reference": "8c1910e5813d66ec2a1c39b1da515fa4da1448e2",
|
66 |
"shasum": ""
|
67 |
},
|
68 |
"require": {
|
76 |
"suggest": {
|
77 |
"ext-zlib": "Needed for compression of embedded resources, such as fonts"
|
78 |
},
|
79 |
+
"time": "2016-10-25 03:32:17",
|
80 |
"type": "library",
|
81 |
"installation-source": "dist",
|
82 |
"autoload": {
|
105 |
},
|
106 |
{
|
107 |
"name": "psr/log",
|
108 |
+
"version": "1.0.2",
|
109 |
+
"version_normalized": "1.0.2.0",
|
110 |
"source": {
|
111 |
"type": "git",
|
112 |
"url": "https://github.com/php-fig/log.git",
|
113 |
+
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
114 |
},
|
115 |
"dist": {
|
116 |
"type": "zip",
|
117 |
+
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
118 |
+
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
119 |
"shasum": ""
|
120 |
},
|
121 |
"require": {
|
122 |
"php": ">=5.3.0"
|
123 |
},
|
124 |
+
"time": "2016-10-10 12:19:37",
|
125 |
"type": "library",
|
126 |
"extra": {
|
127 |
"branch-alias": {
|
vendor/psr/log/Psr/Log/AbstractLogger.php
CHANGED
@@ -17,7 +17,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
17 |
* @param string $message
|
18 |
* @param array $context
|
19 |
*
|
20 |
-
* @return
|
21 |
*/
|
22 |
public function emergency($message, array $context = array())
|
23 |
{
|
@@ -33,7 +33,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
33 |
* @param string $message
|
34 |
* @param array $context
|
35 |
*
|
36 |
-
* @return
|
37 |
*/
|
38 |
public function alert($message, array $context = array())
|
39 |
{
|
@@ -48,7 +48,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
48 |
* @param string $message
|
49 |
* @param array $context
|
50 |
*
|
51 |
-
* @return
|
52 |
*/
|
53 |
public function critical($message, array $context = array())
|
54 |
{
|
@@ -62,7 +62,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
62 |
* @param string $message
|
63 |
* @param array $context
|
64 |
*
|
65 |
-
* @return
|
66 |
*/
|
67 |
public function error($message, array $context = array())
|
68 |
{
|
@@ -78,7 +78,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
78 |
* @param string $message
|
79 |
* @param array $context
|
80 |
*
|
81 |
-
* @return
|
82 |
*/
|
83 |
public function warning($message, array $context = array())
|
84 |
{
|
@@ -91,7 +91,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
91 |
* @param string $message
|
92 |
* @param array $context
|
93 |
*
|
94 |
-
* @return
|
95 |
*/
|
96 |
public function notice($message, array $context = array())
|
97 |
{
|
@@ -106,7 +106,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
106 |
* @param string $message
|
107 |
* @param array $context
|
108 |
*
|
109 |
-
* @return
|
110 |
*/
|
111 |
public function info($message, array $context = array())
|
112 |
{
|
@@ -119,7 +119,7 @@ abstract class AbstractLogger implements LoggerInterface
|
|
119 |
* @param string $message
|
120 |
* @param array $context
|
121 |
*
|
122 |
-
* @return
|
123 |
*/
|
124 |
public function debug($message, array $context = array())
|
125 |
{
|
17 |
* @param string $message
|
18 |
* @param array $context
|
19 |
*
|
20 |
+
* @return void
|
21 |
*/
|
22 |
public function emergency($message, array $context = array())
|
23 |
{
|
33 |
* @param string $message
|
34 |
* @param array $context
|
35 |
*
|
36 |
+
* @return void
|
37 |
*/
|
38 |
public function alert($message, array $context = array())
|
39 |
{
|
48 |
* @param string $message
|
49 |
* @param array $context
|
50 |
*
|
51 |
+
* @return void
|
52 |
*/
|
53 |
public function critical($message, array $context = array())
|
54 |
{
|
62 |
* @param string $message
|
63 |
* @param array $context
|
64 |
*
|
65 |
+
* @return void
|
66 |
*/
|
67 |
public function error($message, array $context = array())
|
68 |
{
|
78 |
* @param string $message
|
79 |
* @param array $context
|
80 |
*
|
81 |
+
* @return void
|
82 |
*/
|
83 |
public function warning($message, array $context = array())
|
84 |
{
|
91 |
* @param string $message
|
92 |
* @param array $context
|
93 |
*
|
94 |
+
* @return void
|
95 |
*/
|
96 |
public function notice($message, array $context = array())
|
97 |
{
|
106 |
* @param string $message
|
107 |
* @param array $context
|
108 |
*
|
109 |
+
* @return void
|
110 |
*/
|
111 |
public function info($message, array $context = array())
|
112 |
{
|
119 |
* @param string $message
|
120 |
* @param array $context
|
121 |
*
|
122 |
+
* @return void
|
123 |
*/
|
124 |
public function debug($message, array $context = array())
|
125 |
{
|
vendor/psr/log/Psr/Log/LoggerAwareInterface.php
CHANGED
@@ -12,7 +12,7 @@ interface LoggerAwareInterface
|
|
12 |
*
|
13 |
* @param LoggerInterface $logger
|
14 |
*
|
15 |
-
* @return
|
16 |
*/
|
17 |
public function setLogger(LoggerInterface $logger);
|
18 |
}
|
12 |
*
|
13 |
* @param LoggerInterface $logger
|
14 |
*
|
15 |
+
* @return void
|
16 |
*/
|
17 |
public function setLogger(LoggerInterface $logger);
|
18 |
}
|
vendor/psr/log/Psr/Log/LoggerInterface.php
CHANGED
@@ -25,7 +25,7 @@ interface LoggerInterface
|
|
25 |
* @param string $message
|
26 |
* @param array $context
|
27 |
*
|
28 |
-
* @return
|
29 |
*/
|
30 |
public function emergency($message, array $context = array());
|
31 |
|
@@ -38,7 +38,7 @@ interface LoggerInterface
|
|
38 |
* @param string $message
|
39 |
* @param array $context
|
40 |
*
|
41 |
-
* @return
|
42 |
*/
|
43 |
public function alert($message, array $context = array());
|
44 |
|
@@ -50,7 +50,7 @@ interface LoggerInterface
|
|
50 |
* @param string $message
|
51 |
* @param array $context
|
52 |
*
|
53 |
-
* @return
|
54 |
*/
|
55 |
public function critical($message, array $context = array());
|
56 |
|
@@ -61,7 +61,7 @@ interface LoggerInterface
|
|
61 |
* @param string $message
|
62 |
* @param array $context
|
63 |
*
|
64 |
-
* @return
|
65 |
*/
|
66 |
public function error($message, array $context = array());
|
67 |
|
@@ -74,7 +74,7 @@ interface LoggerInterface
|
|
74 |
* @param string $message
|
75 |
* @param array $context
|
76 |
*
|
77 |
-
* @return
|
78 |
*/
|
79 |
public function warning($message, array $context = array());
|
80 |
|
@@ -84,7 +84,7 @@ interface LoggerInterface
|
|
84 |
* @param string $message
|
85 |
* @param array $context
|
86 |
*
|
87 |
-
* @return
|
88 |
*/
|
89 |
public function notice($message, array $context = array());
|
90 |
|
@@ -96,7 +96,7 @@ interface LoggerInterface
|
|
96 |
* @param string $message
|
97 |
* @param array $context
|
98 |
*
|
99 |
-
* @return
|
100 |
*/
|
101 |
public function info($message, array $context = array());
|
102 |
|
@@ -106,7 +106,7 @@ interface LoggerInterface
|
|
106 |
* @param string $message
|
107 |
* @param array $context
|
108 |
*
|
109 |
-
* @return
|
110 |
*/
|
111 |
public function debug($message, array $context = array());
|
112 |
|
@@ -117,7 +117,7 @@ interface LoggerInterface
|
|
117 |
* @param string $message
|
118 |
* @param array $context
|
119 |
*
|
120 |
-
* @return
|
121 |
*/
|
122 |
public function log($level, $message, array $context = array());
|
123 |
}
|
25 |
* @param string $message
|
26 |
* @param array $context
|
27 |
*
|
28 |
+
* @return void
|
29 |
*/
|
30 |
public function emergency($message, array $context = array());
|
31 |
|
38 |
* @param string $message
|
39 |
* @param array $context
|
40 |
*
|
41 |
+
* @return void
|
42 |
*/
|
43 |
public function alert($message, array $context = array());
|
44 |
|
50 |
* @param string $message
|
51 |
* @param array $context
|
52 |
*
|
53 |
+
* @return void
|
54 |
*/
|
55 |
public function critical($message, array $context = array());
|
56 |
|
61 |
* @param string $message
|
62 |
* @param array $context
|
63 |
*
|
64 |
+
* @return void
|
65 |
*/
|
66 |
public function error($message, array $context = array());
|
67 |
|
74 |
* @param string $message
|
75 |
* @param array $context
|
76 |
*
|
77 |
+
* @return void
|
78 |
*/
|
79 |
public function warning($message, array $context = array());
|
80 |
|
84 |
* @param string $message
|
85 |
* @param array $context
|
86 |
*
|
87 |
+
* @return void
|
88 |
*/
|
89 |
public function notice($message, array $context = array());
|
90 |
|
96 |
* @param string $message
|
97 |
* @param array $context
|
98 |
*
|
99 |
+
* @return void
|
100 |
*/
|
101 |
public function info($message, array $context = array());
|
102 |
|
106 |
* @param string $message
|
107 |
* @param array $context
|
108 |
*
|
109 |
+
* @return void
|
110 |
*/
|
111 |
public function debug($message, array $context = array());
|
112 |
|
117 |
* @param string $message
|
118 |
* @param array $context
|
119 |
*
|
120 |
+
* @return void
|
121 |
*/
|
122 |
public function log($level, $message, array $context = array());
|
123 |
}
|
vendor/psr/log/Psr/Log/LoggerTrait.php
CHANGED
@@ -18,7 +18,7 @@ trait LoggerTrait
|
|
18 |
* @param string $message
|
19 |
* @param array $context
|
20 |
*
|
21 |
-
* @return
|
22 |
*/
|
23 |
public function emergency($message, array $context = array())
|
24 |
{
|
@@ -34,7 +34,7 @@ trait LoggerTrait
|
|
34 |
* @param string $message
|
35 |
* @param array $context
|
36 |
*
|
37 |
-
* @return
|
38 |
*/
|
39 |
public function alert($message, array $context = array())
|
40 |
{
|
@@ -49,7 +49,7 @@ trait LoggerTrait
|
|
49 |
* @param string $message
|
50 |
* @param array $context
|
51 |
*
|
52 |
-
* @return
|
53 |
*/
|
54 |
public function critical($message, array $context = array())
|
55 |
{
|
@@ -63,7 +63,7 @@ trait LoggerTrait
|
|
63 |
* @param string $message
|
64 |
* @param array $context
|
65 |
*
|
66 |
-
* @return
|
67 |
*/
|
68 |
public function error($message, array $context = array())
|
69 |
{
|
@@ -79,7 +79,7 @@ trait LoggerTrait
|
|
79 |
* @param string $message
|
80 |
* @param array $context
|
81 |
*
|
82 |
-
* @return
|
83 |
*/
|
84 |
public function warning($message, array $context = array())
|
85 |
{
|
@@ -92,7 +92,7 @@ trait LoggerTrait
|
|
92 |
* @param string $message
|
93 |
* @param array $context
|
94 |
*
|
95 |
-
* @return
|
96 |
*/
|
97 |
public function notice($message, array $context = array())
|
98 |
{
|
@@ -107,7 +107,7 @@ trait LoggerTrait
|
|
107 |
* @param string $message
|
108 |
* @param array $context
|
109 |
*
|
110 |
-
* @return
|
111 |
*/
|
112 |
public function info($message, array $context = array())
|
113 |
{
|
@@ -120,7 +120,7 @@ trait LoggerTrait
|
|
120 |
* @param string $message
|
121 |
* @param array $context
|
122 |
*
|
123 |
-
* @return
|
124 |
*/
|
125 |
public function debug($message, array $context = array())
|
126 |
{
|
@@ -134,7 +134,7 @@ trait LoggerTrait
|
|
134 |
* @param string $message
|
135 |
* @param array $context
|
136 |
*
|
137 |
-
* @return
|
138 |
*/
|
139 |
abstract public function log($level, $message, array $context = array());
|
140 |
}
|
18 |
* @param string $message
|
19 |
* @param array $context
|
20 |
*
|
21 |
+
* @return void
|
22 |
*/
|
23 |
public function emergency($message, array $context = array())
|
24 |
{
|
34 |
* @param string $message
|
35 |
* @param array $context
|
36 |
*
|
37 |
+
* @return void
|
38 |
*/
|
39 |
public function alert($message, array $context = array())
|
40 |
{
|
49 |
* @param string $message
|
50 |
* @param array $context
|
51 |
*
|
52 |
+
* @return void
|
53 |
*/
|
54 |
public function critical($message, array $context = array())
|
55 |
{
|
63 |
* @param string $message
|
64 |
* @param array $context
|
65 |
*
|
66 |
+
* @return void
|
67 |
*/
|
68 |
public function error($message, array $context = array())
|
69 |
{
|
79 |
* @param string $message
|
80 |
* @param array $context
|
81 |
*
|
82 |
+
* @return void
|
83 |
*/
|
84 |
public function warning($message, array $context = array())
|
85 |
{
|
92 |
* @param string $message
|
93 |
* @param array $context
|
94 |
*
|
95 |
+
* @return void
|
96 |
*/
|
97 |
public function notice($message, array $context = array())
|
98 |
{
|
107 |
* @param string $message
|
108 |
* @param array $context
|
109 |
*
|
110 |
+
* @return void
|
111 |
*/
|
112 |
public function info($message, array $context = array())
|
113 |
{
|
120 |
* @param string $message
|
121 |
* @param array $context
|
122 |
*
|
123 |
+
* @return void
|
124 |
*/
|
125 |
public function debug($message, array $context = array())
|
126 |
{
|
134 |
* @param string $message
|
135 |
* @param array $context
|
136 |
*
|
137 |
+
* @return void
|
138 |
*/
|
139 |
abstract public function log($level, $message, array $context = array());
|
140 |
}
|
vendor/psr/log/Psr/Log/NullLogger.php
CHANGED
@@ -19,7 +19,7 @@ class NullLogger extends AbstractLogger
|
|
19 |
* @param string $message
|
20 |
* @param array $context
|
21 |
*
|
22 |
-
* @return
|
23 |
*/
|
24 |
public function log($level, $message, array $context = array())
|
25 |
{
|
19 |
* @param string $message
|
20 |
* @param array $context
|
21 |
*
|
22 |
+
* @return void
|
23 |
*/
|
24 |
public function log($level, $message, array $context = array())
|
25 |
{
|
vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
CHANGED
@@ -84,8 +84,8 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
|
|
84 |
|
85 |
public function testObjectCastToString()
|
86 |
{
|
87 |
-
if (method_exists($this, '
|
88 |
-
$dummy = $this->
|
89 |
} else {
|
90 |
$dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
|
91 |
}
|
84 |
|
85 |
public function testObjectCastToString()
|
86 |
{
|
87 |
+
if (method_exists($this, 'createPartialMock')) {
|
88 |
+
$dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString'));
|
89 |
} else {
|
90 |
$dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
|
91 |
}
|