Changeset 1572556
- Timestamp:
- 01/11/2017 03:06:08 PM (9 years ago)
- Location:
- breezing-forms/trunk
- Files:
-
- 14 edited
-
BreezingFormsWidget.php (modified) (2 diffs)
-
breezingforms.php (modified) (3 diffs)
-
platform/administrator/components/com_breezingforms/admin/import.class.php (modified) (1 diff)
-
platform/administrator/components/com_breezingforms/admin/install.class.php (modified) (4 diffs)
-
platform/administrator/components/com_breezingforms/admin/install.html.php (modified) (2 diffs)
-
platform/administrator/components/com_breezingforms/libraries/crosstec/functions/helpers.php (modified) (1 diff)
-
platform/administrator/components/com_breezingforms/libraries/mailchimp/MCAPI.class.php (modified) (3 diffs)
-
platform/components/com_breezingforms/facileforms.class.php (modified) (10 diffs)
-
platform/components/com_breezingforms/facileforms.process.php (modified) (1 diff)
-
platform/components/com_breezingforms/facileforms.xml.php (modified) (1 diff)
-
platform/libraries/joomla/html/html/select.php (modified) (42 diffs)
-
platform/libraries/joomla/registry/registry.php (modified) (1 diff)
-
platform/libraries/joomla/string/string.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
breezing-forms/trunk/BreezingFormsWidget.php
r1266771 r1572556 1 1 <?php 2 // no translations yet, let's do it quick and dirty for now 3 $breezingforms_widget_description = 'Display a BreezingForms form'; 4 if( WPLANG == 'de-DE' ){ 5 $breezingforms_widget_description = 'Zeige ein BreezingForms Formular'; 6 } 7 $breezingforms_widget_title = 'Widget Title'; 8 if( WPLANG == 'de-DE' ){ 9 $breezingforms_widget_title = 'Widget Titel'; 10 } 11 $breezingforms_widget_formname = 'Formname'; 12 if( WPLANG == 'de-DE' ){ 13 $breezingforms_widget_formname = 'Formularname'; 14 } 15 $breezingforms_widget_iframe = 'Run in iFrame'; 16 if( WPLANG == 'de-DE' ){ 17 $breezingforms_widget_iframe = 'Im iFrame laden'; 18 } 19 $breezingforms_widget_iframe_autoheight = 'iFrame Autoheight'; 20 if( WPLANG == 'de-DE' ){ 21 $breezingforms_widget_iframe_autoheight = 'iFrame Automatische Höhe'; 22 } 23 $breezingforms_widget_iframe_height = 'iFrame height'; 24 if( WPLANG == 'de-DE' ){ 25 $breezingforms_widget_iframe_height = 'iFrame Höhe'; 26 } 27 $breezingforms_widget_iframe_width = 'iFrame width'; 28 if( WPLANG == 'de-DE' ){ 29 $breezingforms_widget_iframe_width = 'iFrame Breite'; 2 if(defined('WPLANG')) { 3 // no translations yet, let's do it quick and dirty for now 4 $breezingforms_widget_description = 'Display a BreezingForms form'; 5 if( WPLANG == 'de_DE' ){ 6 $breezingforms_widget_description = 'Zeige ein BreezingForms Formular'; 7 } 8 $breezingforms_widget_title = 'Widget Title'; 9 if( WPLANG == 'de_DE' ){ 10 $breezingforms_widget_title = 'Widget Titel'; 11 } 12 $breezingforms_widget_formname = 'Formname'; 13 if( WPLANG == 'de_DE' ){ 14 $breezingforms_widget_formname = 'Formularname'; 15 } 16 $breezingforms_widget_iframe = 'Run in iFrame'; 17 if( WPLANG == 'de_DE' ){ 18 $breezingforms_widget_iframe = 'Im iFrame laden'; 19 } 20 $breezingforms_widget_iframe_autoheight = 'iFrame Autoheight'; 21 if( WPLANG == 'de_DE' ){ 22 $breezingforms_widget_iframe_autoheight = 'iFrame Automatische Höhe'; 23 } 24 $breezingforms_widget_iframe_height = 'iFrame height'; 25 if( WPLANG == 'de_DE' ){ 26 $breezingforms_widget_iframe_height = 'iFrame Höhe'; 27 } 28 $breezingforms_widget_iframe_width = 'iFrame width'; 29 if( WPLANG == 'de_DE' ){ 30 $breezingforms_widget_iframe_width = 'iFrame Breite'; 31 } 32 30 33 } 31 34 … … 33 36 class BreezingFormsWidget extends WP_Widget { 34 37 35 static $did_script = false; 36 37 function BreezingFormsWidget() { 38 public function __construct() { 38 39 global $breezingforms_widget_description; 39 40 40 $widget_ops = array( 'description' => $breezingforms_widget_description ); 41 $this->WP_Widget(false, 'BreezingForms', $widget_ops); 42 43 add_action('wp_enqueue_scripts', array($this, 'scripts')); 44 } 41 $widget_ops = array( 42 'description' => $breezingforms_widget_description 43 ); 44 parent::__construct(false, 'BreezingForms', $widget_ops); 45 //$this->WP_Widget(false, 'BreezingForms', $widget_ops); 46 47 } 45 48 46 49 function widget( $args, $instance ) { -
breezing-forms/trunk/breezingforms.php
r1332718 r1572556 4 4 Plugin URI: http://crosstec.de/en/wordpress-forms-download.html 5 5 Description: A professional forms plugin for wordpress. 6 Version: 1.2.7.3 86 Version: 1.2.7.39 7 7 Author: Crosstec GmbH & Co. KG 8 8 Author URI: http://crosstec.de … … 26 26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 27 */ 28 if(!defined('WPLANG')){ 29 define('WPLANG', get_locale()); 30 } 28 31 29 32 define('BF_PLUGINS_URL', plugins_url()); … … 250 253 add_action('admin_menu', 'breezingforms_admin_init'); 251 254 function breezingforms_admin_init(){ 252 add_ object_page('BreezingForms', 'BreezingForms', 'administrator', 'breezingforms', 'breezingforms_admin', BF_PLUGINS_URL . '/'.BF_FOLDER.'/breezingforms-icon.png');255 add_menu_page('BreezingForms', 'BreezingForms', 'administrator', 'breezingforms', 'breezingforms_admin', BF_PLUGINS_URL . '/'.BF_FOLDER.'/breezingforms-icon.png'); 253 256 add_submenu_page('breezingforms', 'BreezingForms', 'Records', 'administrator', 'admin.php?page=breezingforms&act=recordmanagement'); 254 257 add_submenu_page('breezingforms', 'BreezingForms', 'Forms', 'administrator', 'admin.php?page=breezingforms&act=manageforms'); -
breezing-forms/trunk/platform/administrator/components/com_breezingforms/admin/import.class.php
r762616 r1572556 25 25 var $warnings = NULL; // warnings emitted 26 26 27 function ff_importPackage()27 function __construct() 28 28 { 29 29 parent::ff_xmlPackage(); -
breezing-forms/trunk/platform/administrator/components/com_breezingforms/admin/install.class.php
r762616 r1572556 54 54 } // exec_sql 55 55 56 function chmodRecursive($path, $filemode=NULL, $dirmode=NULL)56 static function chmodRecursive($path, $filemode=NULL, $dirmode=NULL) 57 57 { 58 58 $ret = TRUE; … … 84 84 } // chmodRecursive 85 85 86 function testdb($table, $column)86 static function testdb($table, $column) 87 87 { 88 88 global $database; … … 96 96 } // testdb 97 97 98 function step2($option)98 static function step2($option) 99 99 { 100 100 global $ff_mospath, $ff_admpath, $ff_compath, $mosConfig_fileperms; … … 146 146 } // step2 147 147 148 function step3($option)148 static function step3($option) 149 149 { 150 150 global $ff_admpath,$mainframe, $ff_config, $errors, $errmode; -
breezing-forms/trunk/platform/administrator/components/com_breezingforms/admin/install.html.php
r762616 r1572556 11 11 class HTML_facileFormsInstaller 12 12 { 13 function step2($option, $release)13 static function step2($option, $release) 14 14 { 15 15 ?> … … 91 91 92 92 93 function step3($option, &$errors)93 static function step3($option, &$errors) 94 94 { 95 95 ?> -
breezing-forms/trunk/platform/administrator/components/com_breezingforms/libraries/crosstec/functions/helpers.php
r1004513 r1572556 146 146 } 147 147 148 function bf_createMail( $from ='', $fromname='', $subject, $body) {149 150 jimport( 'joomla.version');151 $version = new JVersion();152 $version = $version->getShortVersion();153 154 $_mailfrom = '';155 $_fromname = '';156 157 if(version_compare($version, '3.0', '<')){158 $_mailfrom = JFactory::getConfig()->getValue('config.mailfrom','');159 $_fromname = JFactory::getConfig()->getValue('config.fromname','');160 }else{161 $_mailfrom = JFactory::getConfig()->get('mailfrom','');162 $_fromname = JFactory::getConfig()->get('fromname','');163 }164 148 function bf_createMail( $from = '', $fromname = '', $subject, $body, $alt_sender = '' ) { 149 150 jimport( 'joomla.version' ); 151 $version = new JVersion(); 152 $version = $version->getShortVersion(); 153 154 $_mailfrom = ''; 155 $_fromname = ''; 156 157 if ( version_compare( $version, '3.0', '<' ) ) { 158 $_mailfrom = JFactory::getConfig()->getValue( 'config.mailfrom', '' ); 159 $_fromname = JFactory::getConfig()->getValue( 'config.fromname', '' ); 160 } else { 161 $_mailfrom = JFactory::getConfig()->get( 'mailfrom', '' ); 162 $_fromname = JFactory::getConfig()->get( 'fromname', '' ); 163 } 164 165 165 $mail = JFactory::getMailer(); 166 167 $mail->setSender(array($_mailfrom, trim($_fromname))); 168 $mail->setSubject($subject); 169 $mail->setBody($body); 170 171 $mail->addReplyTo( array( $from ? $from : $_mailfrom, $fromname ? $fromname : $_fromname ) ); 172 166 167 /* 168 try { 169 170 $mail->setSender( array( $alt_sender ? $alt_sender : $_mailfrom, $fromname ? $fromname : $_fromname ) ); 171 172 } catch ( Exception $e ) { 173 174 }*/ 175 176 $mail->setSubject( $subject ); 177 $mail->setBody( $body ); 178 179 $prev_from = $alt_sender ? $alt_sender : $_mailfrom; 180 181 try { 182 183 $mail->SetFrom( $prev_from, $fromname ? $fromname : $_fromname ); 184 //$mail->SetFrom( $from ? $from : '', $fromname ? $fromname : '' ); 185 186 } catch ( Exception $e ) { 187 188 } 189 190 try { 191 192 if( $from && $from != $prev_from ) 193 { 194 195 if ( version_compare( $version, '3.0', '<' ) ) 196 { 197 198 $mail->addReplyTo( array( $from, $fromname ? $fromname : $_fromname ) ); 199 200 } 201 else 202 { 203 204 $newfrom = $from ? $from : $_mailfrom; 205 $newfromname = $fromname ? $fromname : $_fromname; 206 207 if ( ! empty( $newfrom ) ) 208 { 209 210 $mail->addReplyTo( $from, $fromname ? $fromname : $_fromname ); 211 } 212 } 213 214 } 215 216 } catch ( Exception $e ) { 217 218 } 219 173 220 return $mail; 174 221 } -
breezing-forms/trunk/platform/administrator/components/com_breezingforms/libraries/mailchimp/MCAPI.class.php
r762616 r1572556 44 44 * @param string $secure Whether or not this should use a secure connection 45 45 */ 46 function MCAPI($apikey, $secure=false) {46 function __construct($apikey, $secure=false) { 47 47 //do more "caching" of the uuid for those people that keep instantiating this... 48 48 $this->secure = $secure; … … 1721 1721 */ 1722 1722 function callServer($method, $params) { 1723 $dc = "us1";1724 if (strstr($this->api_key,"-")){1725 list($key, $dc) = explode("-",$this->api_key,2);1723 $dc = "us1"; 1724 if (strstr($this->api_key,"-")){ 1725 list($key, $dc) = explode("-",$this->api_key,2); 1726 1726 if (!$dc) $dc = "us1"; 1727 1727 } 1728 1728 $host = $dc.".".$this->apiUrl["host"]; 1729 $params["apikey"] = $this->api_key;1729 $params["apikey"] = $this->api_key; 1730 1730 1731 1731 $this->errorMessage = ""; … … 1776 1776 $serial = unserialize($response); 1777 1777 if($response && $serial === false) { 1778 $response = array("error" => "Bad Response. Got This: " . $response, "code" => "-99");1778 $response = array("error" => "Bad Response. Got This: " . $response, "code" => "-99"); 1779 1779 } else { 1780 $response = $serial;1780 $response = $serial; 1781 1781 } 1782 1782 if(is_array($response) && isset($response["error"])) { -
breezing-forms/trunk/platform/components/com_breezingforms/facileforms.class.php
r1332718 r1572556 11 11 global $ff_version, $ff_resnames, $ff_request, $ff_target; 12 12 13 $ff_version = '1.2.7.3 8 FREE VERSION (build 278)';13 $ff_version = '1.2.7.39 FREE VERSION (build 279)'; 14 14 $ff_target = 0; 15 15 … … 246 246 var $cellnewline = 1; 247 247 248 function facileFormsConf()248 function __construct() 249 249 { 250 250 $this->load(); … … 365 365 var $params = null; // additional parameters 366 366 367 function facileFormsMenus(&$db)367 function __construct(&$db) 368 368 { 369 369 parent::__construct('#__facileforms_compmenus', 'id', $db); … … 471 471 var $mb_email_custom_html = null; 472 472 473 function facileFormsForms(&$db)473 function __construct(&$db) 474 474 { 475 475 parent::__construct('#__facileforms_forms', 'id', $db); … … 572 572 var $mailbackfile = null; 573 573 574 function facileFormsElements(&$db)574 function __construct(&$db) 575 575 { 576 576 parent::__construct('#__facileforms_elements', 'id', $db); … … 606 606 var $code = null; // the code 607 607 608 function facileFormsScripts(&$db)608 function __construct(&$db) 609 609 { 610 610 parent::__construct('#__facileforms_scripts', 'id', $db); … … 640 640 var $code = null; // the code 641 641 642 function facileFormsPieces(&$db)642 function __construct(&$db) 643 643 { 644 644 parent::__construct('#__facileforms_pieces', 'id', $db); … … 682 682 var $paypal_download_tries = null; 683 683 684 function facileFormsRecords(&$db)684 function __construct(&$db) 685 685 { 686 686 parent::__construct('#__facileforms_records', 'id', $db); … … 714 714 var $value = null; // data value 715 715 716 function facileFormsSubrecords(&$db)716 function __construct(&$db) 717 717 { 718 718 parent::__construct('#__facileforms_subrecords', 'id', $db); … … 751 751 var $comp = null; // complied value: array of array(type, value/code) 752 752 753 function facileFormsQuerycols()753 function __construct() 754 754 { 755 755 $this->title = ''; -
breezing-forms/trunk/platform/components/com_breezingforms/facileforms.process.php
r774450 r1572556 481 481 public $isMobile = false; 482 482 483 function HTML_facileFormsProcessor(483 function __construct( 484 484 $runmode, // _FF_RUNMODE_FRONTEND, ..._BACKEND, ..._PREVIEW 485 485 $inframe, // run in iframe -
breezing-forms/trunk/platform/components/com_breezingforms/facileforms.xml.php
r762621 r1572556 21 21 var $params = NULL; // parameters 22 22 23 function ff_xmlPackage()23 function __construct() 24 24 { 25 25 // constructor -
breezing-forms/trunk/platform/libraries/joomla/html/html/select.php
r762627 r1572556 1 1 <?php 2 2 /** 3 * @package Joomla. Platform3 * @package Joomla.Libraries 4 4 * @subpackage HTML 5 5 * 6 * @copyright Copyright (C) 2005 - 201 2Open Source Matters, Inc. All rights reserved.6 * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. 7 7 * @license GNU General Public License version 2 or later; see LICENSE 8 8 */ 9 9 10 10 defined('JPATH_PLATFORM') or die; 11 12 use Joomla\Utilities\ArrayHelper; 11 13 12 14 /** 13 15 * Utility class for creating HTML select lists 14 16 * 15 * @package Joomla.Platform 16 * @subpackage HTML 17 * @since 11.1 17 * @since 1.5 18 18 */ 19 19 abstract class JHtmlSelect … … 23 23 * 24 24 * @var array 25 * @since 11.1 26 */ 27 static protected $_optionDefaults = array( 28 'option' => array('option.attr' => null, 'option.disable' => 'disable', 'option.id' => null, 'option.key' => 'value', 29 'option.key.toHtml' => true, 'option.label' => null, 'option.label.toHtml' => true, 'option.text' => 'text', 30 'option.text.toHtml' => true)); 25 * @since 1.5 26 */ 27 protected static $optionDefaults = array( 28 'option' => array( 29 'option.attr' => null, 30 'option.disable' => 'disable', 31 'option.id' => null, 32 'option.key' => 'value', 33 'option.key.toHtml' => true, 34 'option.label' => null, 35 'option.label.toHtml' => true, 36 'option.text' => 'text', 37 'option.text.toHtml' => true, 38 'option.class' => 'class', 39 'option.onclick' => 'onclick', 40 ), 41 ); 31 42 32 43 /** … … 34 45 * 35 46 * @param string $name The value of the HTML name attribute 36 * @param array $attribs Additional HTML attributes for the <select>tag47 * @param array $attribs Additional HTML attributes for the `<select>` tag 37 48 * @param string $selected The key that is selected 38 49 * @param string $yes Language key for Yes 39 50 * @param string $no Language key for no 40 * @param string $id The id for the field51 * @param mixed $id The id for the field or false for no id 41 52 * 42 53 * @return string HTML for the radio list 43 54 * 44 * @since 1 1.155 * @since 1.5 45 56 * @see JFormFieldRadio 46 57 */ 47 public static function booleanlist($name, $attribs = null, $selected = null, $yes = 'JYES', $no = 'JNO', $id = false)58 public static function booleanlist($name, $attribs = array(), $selected = null, $yes = 'JYES', $no = 'JNO', $id = false) 48 59 { 49 60 $arr = array(JHtml::_('select.option', '0', JText::_($no)), JHtml::_('select.option', '1', JText::_($yes))); 61 50 62 return JHtml::_('select.radiolist', $arr, $name, $attribs, 'value', 'text', (int) $selected, $id); 51 63 } … … 56 68 * @param array $data An array of objects, arrays, or scalars. 57 69 * @param string $name The value of the HTML name attribute. 58 * @param mixed $attribs Additional HTML attributes for the <select>tag. This70 * @param mixed $attribs Additional HTML attributes for the `<select>` tag. This 59 71 * can be an array of attributes, or an array of options. Treated as options 60 72 * if it is the last argument passed. Valid options are: … … 76 88 * @return string HTML for the select list. 77 89 * 78 * @since 1 1.190 * @since 1.5 79 91 */ 80 92 public static function genericlist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false, … … 83 95 // Set default options 84 96 $options = array_merge(JHtml::$formatOptions, array('format.depth' => 0, 'id' => false)); 97 85 98 if (is_array($attribs) && func_num_args() == 3) 86 99 { … … 98 111 $options['list.select'] = $selected; 99 112 } 113 100 114 $attribs = ''; 115 101 116 if (isset($options['list.attr'])) 102 117 { 103 118 if (is_array($options['list.attr'])) 104 119 { 105 $attribs = JArrayHelper::toString($options['list.attr']);120 $attribs = ArrayHelper::toString($options['list.attr']); 106 121 } 107 122 else … … 109 124 $attribs = $options['list.attr']; 110 125 } 126 111 127 if ($attribs != '') 112 128 { … … 116 132 117 133 $id = $options['id'] !== false ? $options['id'] : $name; 118 $id = str_replace(array('[', ']' ), '', $id);134 $id = str_replace(array('[', ']', ' '), '', $id); 119 135 120 136 $baseIndent = str_repeat($options['format.indent'], $options['format.depth']++); 121 137 $html = $baseIndent . '<select' . ($id !== '' ? ' id="' . $id . '"' : '') . ' name="' . $name . '"' . $attribs . '>' . $options['format.eol'] 122 . self::options($data, $options) . $baseIndent . '</select>' . $options['format.eol']; 138 . static::options($data, $options) . $baseIndent . '</select>' . $options['format.eol']; 139 140 return $html; 141 } 142 143 /** 144 * Method to build a list with suggestions 145 * 146 * @param array $data An array of objects, arrays, or values. 147 * @param string $optKey The name of the object variable for the option value. If 148 * set to null, the index of the value array is used. 149 * @param string $optText The name of the object variable for the option text. 150 * @param mixed $idtag Value of the field id or null by default 151 * @param boolean $translate True to translate 152 * 153 * @return string HTML for the select list 154 * 155 * @since 3.2 156 * @deprecated 4.0 Just create the `<datalist>` directly instead 157 */ 158 public static function suggestionlist($data, $optKey = 'value', $optText = 'text', $idtag = null, $translate = false) 159 { 160 // Log deprecated message 161 JLog::add( 162 'JHtmlSelect::suggestionlist() is deprecated. Create the <datalist> tag directly instead.', 163 JLog::WARNING, 164 'deprecated' 165 ); 166 167 // Note: $idtag is requried but has to be an optional argument in the funtion call due to argument order 168 if (!$idtag) 169 { 170 throw new InvalidArgumentException('$idtag is a required argument in deprecated JHtmlSelect::suggestionlist'); 171 } 172 173 // Set default options 174 $options = array_merge(JHtml::$formatOptions, array('format.depth' => 0, 'id' => false)); 175 176 // Get options from the parameters 177 $options['id'] = $idtag; 178 $options['list.attr'] = null; 179 $options['list.translate'] = $translate; 180 $options['option.key'] = $optKey; 181 $options['option.text'] = $optText; 182 $options['list.select'] = null; 183 184 $id = ' id="' . $idtag . '"'; 185 186 $baseIndent = str_repeat($options['format.indent'], $options['format.depth']++); 187 $html = $baseIndent . '<datalist' . $id . '>' . $options['format.eol'] 188 . static::options($data, $options) . $baseIndent . '</datalist>' . $options['format.eol']; 189 123 190 return $html; 124 191 } … … 152 219 * @return string HTML for the select list 153 220 * 154 * @since 11.1 155 * 156 * @throws JException If a group has unprocessable contents. 221 * @since 1.5 222 * @throws RuntimeException If a group has contents that cannot be processed. 157 223 */ 158 224 public static function groupedlist($data, $name, $options = array()) … … 177 243 if (is_array($options['list.attr'])) 178 244 { 179 $attribs = JArrayHelper::toString($options['list.attr']);245 $attribs = ArrayHelper::toString($options['list.attr']); 180 246 } 181 247 else … … 183 249 $attribs = $options['list.attr']; 184 250 } 251 185 252 if ($attribs != '') 186 253 { … … 190 257 191 258 $id = $options['id'] !== false ? $options['id'] : $name; 192 $id = str_replace(array('[', ']' ), '', $id);259 $id = str_replace(array('[', ']', ' '), '', $id); 193 260 194 261 // Disable groups in the options. … … 214 281 // Sub-list is in an element of an array. 215 282 $subList = $group[$options['group.items']]; 283 216 284 if (isset($group[$options['group.label']])) 217 285 { … … 219 287 $noGroup = false; 220 288 } 289 221 290 if (isset($options['group.id']) && isset($group[$options['group.id']])) 222 291 { … … 228 297 { 229 298 // Sub-list is in a property of an object 230 $subList = $group->$options['group.items']; 231 if (isset($group->$options['group.label'])) 232 { 233 $label = $group->$options['group.label']; 299 $subList = $group->{$options['group.items']}; 300 301 if (isset($group->{$options['group.label']})) 302 { 303 $label = $group->{$options['group.label']}; 234 304 $noGroup = false; 235 305 } 236 if (isset($options['group.id']) && isset($group->$options['group.id'])) 237 { 238 $id = $group->$options['group.id']; 306 307 if (isset($options['group.id']) && isset($group->{$options['group.id']})) 308 { 309 $id = $group->{$options['group.id']}; 239 310 $noGroup = false; 240 311 } … … 242 313 else 243 314 { 244 throw new JException('Invalid group contents.', 1, E_WARNING);315 throw new RuntimeException('Invalid group contents.', 1); 245 316 } 246 317 247 318 if ($noGroup) 248 319 { 249 $html .= s elf::options($subList, $options);320 $html .= static::options($subList, $options); 250 321 } 251 322 else … … 253 324 $html .= $groupIndent . '<optgroup' . (empty($id) ? '' : ' id="' . $id . '"') . ' label="' 254 325 . ($options['group.label.toHtml'] ? htmlspecialchars($label, ENT_COMPAT, 'UTF-8') : $label) . '">' . $options['format.eol'] 255 . s elf::options($subList, $options) . $groupIndent . '</optgroup>' . $options['format.eol'];326 . static::options($subList, $options) . $groupIndent . '</optgroup>' . $options['format.eol']; 256 327 } 257 328 } … … 269 340 * @param integer $inc The increment 270 341 * @param string $name The value of the HTML name attribute 271 * @param mixed $attribs Additional HTML attributes for the <select>tag, an array of342 * @param mixed $attribs Additional HTML attributes for the `<select>` tag, an array of 272 343 * attributes, or an array of options. Treated as options if it is the last 273 344 * argument passed. … … 277 348 * @return string HTML for the select list 278 349 * 279 * @since 11.1350 * @since 1.5 280 351 */ 281 352 public static function integerlist($start, $end, $inc, $name, $attribs = null, $selected = null, $format = '') … … 283 354 // Set default options 284 355 $options = array_merge(JHtml::$formatOptions, array('format.depth' => 0, 'option.format' => '', 'id' => null)); 356 285 357 if (is_array($attribs) && func_num_args() == 5) 286 358 { 287 359 // Assume we have an options array 288 360 $options = array_merge($options, $attribs); 361 289 362 // Extract the format and remove it from downstream options 290 363 $format = $options['option.format']; … … 297 370 $options['list.select'] = $selected; 298 371 } 299 $start = intval($start); 300 $end = intval($end); 301 $inc = intval($inc); 372 373 $start = (int) $start; 374 $end = (int) $end; 375 $inc = (int) $inc; 302 376 303 377 $data = array(); 378 304 379 for ($i = $start; $i <= $end; $i += $inc) 305 380 { … … 320 395 * @param string $optText The returned object property name for the text 321 396 * 322 * @return object323 * 324 * @deprecated 12.1Use JHtmlSelect::groupedList()397 * @return stdClass 398 * 399 * @deprecated 4.0 Use JHtmlSelect::groupedList() 325 400 * @see JHtmlSelect::groupedList() 326 * @since 1 1.1401 * @since 1.5 327 402 */ 328 403 public static function optgroup($text, $optKey = 'value', $optText = 'text') 329 404 { 330 // Deprecation warning. 331 JLog::add('JSelect::optgroup is deprecated.', JLog::WARNING, 'deprecated'); 405 JLog::add('JHtmlSelect::optgroup() is deprecated, use JHtmlSelect::groupedList() instead.', JLog::WARNING, 'deprecated'); 332 406 333 407 // Set initial state … … 381 455 * @param boolean $disable Not used. 382 456 * 383 * @return object384 * 385 * @since 1 1.1457 * @return stdClass 458 * 459 * @since 1.5 386 460 */ 387 461 public static function option($value, $text = '', $optKey = 'value', $optText = 'text', $disable = false) 388 462 { 389 $options = array('attr' => null, 'disable' => false, 'option.attr' => null, 'option.disable' => 'disable', 'option.key' => 'value', 390 'option.label' => null, 'option.text' => 'text'); 463 $options = array( 464 'attr' => null, 465 'disable' => false, 466 'option.attr' => null, 467 'option.disable' => 'disable', 468 'option.key' => 'value', 469 'option.label' => null, 470 'option.text' => 'text', 471 ); 472 391 473 if (is_array($optKey)) 392 474 { … … 401 483 $options['disable'] = $disable; 402 484 } 403 $obj = new JObject; 404 $obj->$options['option.key'] = $value; 405 $obj->$options['option.text'] = trim($text) ? $text : $value; 485 486 $obj = new stdClass; 487 $obj->{$options['option.key']} = $value; 488 $obj->{$options['option.text']} = trim($text) ? $text : $value; 406 489 407 490 /* … … 410 493 */ 411 494 $hasProperty = $options['option.label'] !== null; 495 412 496 if (isset($options['label'])) 413 497 { … … 417 501 elseif ($hasProperty) 418 502 { 419 $obj-> $options['option.label']= '';503 $obj->{$options['option.label']} = ''; 420 504 } 421 505 … … 423 507 if ($options['attr'] !== null) 424 508 { 425 $obj-> $options['option.attr']= $options['attr'];509 $obj->{$options['option.attr']} = $options['attr']; 426 510 } 427 511 … … 429 513 if ($options['disable'] !== null) 430 514 { 431 $obj->$options['option.disable'] = $options['disable']; 432 } 515 $obj->{$options['option.disable']} = $options['disable']; 516 } 517 433 518 return $obj; 434 519 } … … 475 560 * @return string HTML for the select list 476 561 * 477 * @since 1 1.1562 * @since 1.5 478 563 */ 479 564 public static function options($arr, $optKey = 'value', $optText = 'text', $selected = null, $translate = false) … … 481 566 $options = array_merge( 482 567 JHtml::$formatOptions, 483 s elf::$_optionDefaults['option'],568 static::$optionDefaults['option'], 484 569 array('format.depth' => 0, 'groups' => true, 'list.select' => null, 'list.translate' => false) 485 570 ); … … 508 593 $label = ''; 509 594 $id = ''; 595 510 596 if (is_array($element)) 511 597 { 512 598 $key = $options['option.key'] === null ? $elementKey : $element[$options['option.key']]; 513 599 $text = $element[$options['option.text']]; 600 514 601 if (isset($element[$options['option.attr']])) 515 602 { 516 603 $attr = $element[$options['option.attr']]; 517 604 } 605 518 606 if (isset($element[$options['option.id']])) 519 607 { 520 608 $id = $element[$options['option.id']]; 521 609 } 610 522 611 if (isset($element[$options['option.label']])) 523 612 { 524 613 $label = $element[$options['option.label']]; 525 614 } 615 526 616 if (isset($element[$options['option.disable']]) && $element[$options['option.disable']]) 527 617 { … … 531 621 elseif (is_object($element)) 532 622 { 533 $key = $options['option.key'] === null ? $elementKey : $element->$options['option.key']; 534 $text = $element->$options['option.text']; 535 if (isset($element->$options['option.attr'])) 536 { 537 $attr = $element->$options['option.attr']; 538 } 539 if (isset($element->$options['option.id'])) 540 { 541 $id = $element->$options['option.id']; 542 } 543 if (isset($element->$options['option.label'])) 544 { 545 $label = $element->$options['option.label']; 546 } 547 if (isset($element->$options['option.disable']) && $element->$options['option.disable']) 623 $key = $options['option.key'] === null ? $elementKey : $element->{$options['option.key']}; 624 $text = $element->{$options['option.text']}; 625 626 if (isset($element->{$options['option.attr']})) 627 { 628 $attr = $element->{$options['option.attr']}; 629 } 630 631 if (isset($element->{$options['option.id']})) 632 { 633 $id = $element->{$options['option.id']}; 634 } 635 636 if (isset($element->{$options['option.label']})) 637 { 638 $label = $element->{$options['option.label']}; 639 } 640 641 if (isset($element->{$options['option.disable']}) && $element->{$options['option.disable']}) 548 642 { 549 643 $extra .= ' disabled="disabled"'; 644 } 645 646 if (isset($element->{$options['option.class']}) && $element->{$options['option.class']}) 647 { 648 $extra .= ' class="' . $element->{$options['option.class']} . '"'; 649 } 650 651 if (isset($element->{$options['option.onclick']}) && $element->{$options['option.onclick']}) 652 { 653 $extra .= ' onclick="' . $element->{$options['option.onclick']} . '"'; 550 654 } 551 655 } … … 557 661 } 558 662 559 // The use of options that contain optgroup HTML elements was 560 // somewhat hacked for J1.5. J1.6 introduces the grouplist() method 561 // to handle this better. The old solution is retained through the 562 // "groups" option, which defaults true in J1.6, but should be 563 // deprecated at some point in the future. 663 /* 664 * The use of options that contain optgroup HTML elements was 665 * somewhat hacked for J1.5. J1.6 introduces the grouplist() method 666 * to handle this better. The old solution is retained through the 667 * "groups" option, which defaults true in J1.6, but should be 668 * deprecated at some point in the future. 669 */ 564 670 565 671 $key = (string) $key; 672 566 673 if ($options['groups'] && $key == '<OPTGROUP>') 567 674 { … … 576 683 else 577 684 { 578 // if no string after hyphen - take hyphen out685 // If no string after hyphen - take hyphen out 579 686 $splitText = explode(' - ', $text, 2); 580 687 $text = $splitText[0]; 581 if (isset($splitText[1])) 688 689 if (isset($splitText[1]) && $splitText[1] != "" && !preg_match('/^[\s]+$/', $splitText[1])) 582 690 { 583 691 $text .= ' - ' . $splitText[1]; … … 588 696 $label = JText::_($label); 589 697 } 698 590 699 if ($options['option.label.toHtml']) 591 700 { 592 701 $label = htmlentities($label); 593 702 } 703 594 704 if (is_array($attr)) 595 705 { 596 $attr = JArrayHelper::toString($attr);706 $attr = ArrayHelper::toString($attr); 597 707 } 598 708 else … … 600 710 $attr = trim($attr); 601 711 } 712 602 713 $extra = ($id ? ' id="' . $id . '"' : '') . ($label ? ' label="' . $label . '"' : '') . ($attr ? ' ' . $attr : '') . $extra; 714 603 715 if (is_array($options['list.select'])) 604 716 { 605 717 foreach ($options['list.select'] as $val) 606 718 { 607 $key2 = is_object($val) ? $val->$options['option.key'] : $val; 719 $key2 = is_object($val) ? $val->{$options['option.key']} : $val; 720 608 721 if ($key == $key2) 609 722 { … … 639 752 * @param array $data An array of objects 640 753 * @param string $name The value of the HTML name attribute 641 * @param string $attribs Additional HTML attributes for the <select>tag754 * @param string $attribs Additional HTML attributes for the `<select>` tag 642 755 * @param mixed $optKey The key that is selected 643 756 * @param string $optText The name of the object variable for the option value … … 646 759 * @param boolean $translate True if options will be translated 647 760 * 648 * @return string HTML for the select list649 * 650 * @since 11.1761 * @return string HTML for the select list 762 * 763 * @since 1.5 651 764 */ 652 765 public static function radiolist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false, 653 766 $translate = false) 654 767 { 655 reset($data);656 $html = '';657 768 658 769 if (is_array($attribs)) 659 770 { 660 $attribs = JArrayHelper::toString($attribs);771 $attribs = ArrayHelper::toString($attribs); 661 772 } 662 773 663 774 $id_text = $idtag ? $idtag : $name; 775 776 $html = '<div class="controls">'; 664 777 665 778 foreach ($data as $obj) … … 670 783 671 784 $extra = ''; 672 $extra .= $id ? ' id="' . $obj->id . '"' : ''; 785 $id = $id ? $obj->id : $id_text . $k; 786 673 787 if (is_array($selected)) 674 788 { … … 676 790 { 677 791 $k2 = is_object($val) ? $val->$optKey : $val; 792 678 793 if ($k == $k2) 679 794 { 680 $extra .= ' selected="selected" ';795 $extra .= ' selected="selected" '; 681 796 break; 682 797 } … … 685 800 else 686 801 { 687 $extra .= ((string) $k == (string) $selected ? ' checked="checked"' : ''); 688 } 689 $html .= "\n\t" . '<input type="radio" name="' . $name . '"' . ' id="' . $id_text . $k . '" value="' . $k . '"' . ' ' . $extra . ' ' 690 . $attribs . '/>' . "\n\t" . '<label for="' . $id_text . $k . '"' . ' id="' . $id_text . $k . '-lbl" class="radiobtn">' . $t 691 . '</label>'; 692 } 802 $extra .= ((string) $k == (string) $selected ? ' checked="checked" ' : ''); 803 } 804 805 $html .= "\n\t" . '<label for="' . $id . '" id="' . $id . '-lbl" class="radio">'; 806 $html .= "\n\t\n\t" . '<input type="radio" name="' . $name . '" id="' . $id . '" value="' . $k . '" ' . $extra 807 . $attribs . ' />' . $t; 808 $html .= "\n\t" . '</label>'; 809 } 810 693 811 $html .= "\n"; 812 $html .= '</div>'; 813 $html .= "\n"; 814 694 815 return $html; 695 816 } 696 697 817 } -
breezing-forms/trunk/platform/libraries/joomla/registry/registry.php
r762627 r1572556 337 337 } 338 338 $node = $node->$nodes[$i]; 339 339 340 } 340 341 341 342 // Get the old value if exists so we can return it 342 $result = $node->$nodes[$i] = $value; 343 switch (true) 344 { 345 case (is_object($node)): 346 $result = $node->{$nodes[$i]} = $value; 347 break; 348 349 case (is_array($node)): 350 $result = $node[$nodes[$i]] = $value; 351 break; 352 353 default: 354 $result = null; 355 break; 356 } 343 357 } 344 358 345 359 return $result; 346 } 360 361 } 362 347 363 348 364 /** -
breezing-forms/trunk/platform/libraries/joomla/string/string.php
r762627 r1572556 23 23 24 24 // Same for iconv 25 if ( function_exists('iconv') || ((!strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && dl('iconv.so'))))25 if (PHP_VERSION_ID < 50600 && function_exists('iconv') || ((!strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && dl('iconv.so')))) 26 26 { 27 27 // These are settings that can be set inside code 28 iconv_set_encoding("internal_encoding", "UTF-8"); 29 iconv_set_encoding("input_encoding", "UTF-8"); 30 iconv_set_encoding("output_encoding", "UTF-8"); 28 // iconv_set_encoding("internal_encoding", "UTF-8"); 29 // iconv_set_encoding("input_encoding", "UTF-8"); 30 // iconv_set_encoding("output_encoding", "UTF-8"); 31 32 iconv_set_encoding('input_encoding', 'UTF-8'); 33 iconv_set_encoding('output_encoding', 'UTF-8'); 34 iconv_set_encoding('internal_encoding', 'UTF-8'); 31 35 } 36 else 37 { 38 39 ini_set('default_charset', 'UTF-8'); 40 41 } 42 32 43 33 44 /** -
breezing-forms/trunk/readme.txt
r1332718 r1572556 4 4 Tags: builder, captcha form, contact form, contact form builder, contact form plugin, contact form with auto reply, contact forms, contact us form, contacts form plugin, custom contact form, custom forms, email form, feedback, feedback form, feedback forms, form, form builder, form creation, form creator, form manager, form plugin, form to email, form widget, form with recaptcha, forms, forms plugin, Formular, formulario, multiple forms, paypal form, recaptcha contact form, secure form, survey form, web form, widget contact form, wordpress contact form 5 5 Requires at least: 3.0 6 Tested up to: 5.07 Stable tag: 1.2.7.3 86 Tested up to: 6.0 7 Stable tag: 1.2.7.39 8 8 License: GPL 2 9 9 … … 158 158 == Changelog == 159 159 160 = 1.2.7.39 = 161 * fixed some php7 related problems, email sending issues and deprecated warnings 162 160 163 = 1.2.7.38 = 161 164 * forced to use mysqli db adapter as it has been removed from newer php versions
Note: See TracChangeset
for help on using the changeset viewer.