Browse Source

Upload 1.1.24

master v1.1.24
parent
commit
dcf2a1eca7
  1. 12
      CHANGELOG
  2. 24
      UPGRADE
  3. 2
      framework/YiiBase.php
  4. 10
      framework/base/CApplication.php
  5. 6
      framework/console/CConsoleApplication.php
  6. 30
      framework/db/CDbConnection.php
  7. 6
      framework/db/CDbTransaction.php
  8. 9
      framework/logging/CFileLogRoute.php
  9. 6
      framework/vendors/README.html
  10. 21
      framework/vendors/jquery/LICENSE.txt
  11. 3
      framework/vendors/jqueryui/LICENSE.txt
  12. 4
      framework/vendors/markdown/markdown.php
  13. 32
      framework/web/helpers/CHtml.php
  14. 4714
      framework/web/js/source/jquery.js
  15. 9
      framework/web/js/source/jquery.min.js
  16. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png
  17. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_flat_75_ffffff_40x100.png
  18. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png
  19. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_glass_65_ffffff_1x400.png
  20. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_glass_75_dadada_1x400.png
  21. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png
  22. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png
  23. BIN
      framework/web/js/source/jui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  24. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_222222_256x240.png
  25. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_2e83ff_256x240.png
  26. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_444444_256x240.png
  27. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_454545_256x240.png
  28. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_555555_256x240.png
  29. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_777620_256x240.png
  30. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_777777_256x240.png
  31. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_888888_256x240.png
  32. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_cc0000_256x240.png
  33. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_cd0a0a_256x240.png
  34. BIN
      framework/web/js/source/jui/css/base/images/ui-icons_ffffff_256x240.png
  35. 10
      framework/web/js/source/jui/css/base/jquery-ui.css
  36. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
  37. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
  38. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
  39. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
  40. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
  41. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  42. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-icons_222222_256x240.png
  43. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-icons_2e83ff_256x240.png
  44. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-icons_454545_256x240.png
  45. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-icons_888888_256x240.png
  46. BIN
      framework/web/js/source/jui/css/smoothness/images/ui-icons_cd0a0a_256x240.png
  47. 7
      framework/web/js/source/jui/css/smoothness/jquery-ui.css
  48. 9
      framework/web/js/source/jui/js/jquery-ui-i18n.min.js
  49. 22
      framework/web/js/source/jui/js/jquery-ui.min.js
  50. 56
      framework/yiilite.php
  51. 4
      framework/zii/widgets/jui/CJuiWidget.php

12
CHANGELOG

@ -1,6 +1,18 @@
 Yii Framework Change Log
========================
Version 1.1.24 June 7, 2021
--------------------------------
- Bug #4339: "There is no active transaction" when transaction is autocommitted (twisted1919)
- Bug #4343: Fix "driver does not support quoting" when using the driver pdo_odbc (xpohoc69)
- Bug #4355: Fix errorhandler missing backtrace entries (georaldc, marcovtwout)
- Enh #4349: Added CHtml option to omit type attribute from <script> tag (mohamedmalki, marcovtwout)
- Enh #4351: Added CHtml option to omit CDATA wrapper from <script> and <style> contents (marcovtwout)
- Enh #4354: Allow to set log file permissions for CFileLogRoute (jdayamx)
- Chg #4344: Upgraded jQuery to 1.12.4 (marcovtwout)
- Chg #4344: Upgraded jQuery UI to 1.12.1 (marcovtwout)
Version 1.1.23 December 2, 2020
-------------------------------

24
UPGRADE

@ -18,6 +18,30 @@ General upgrade instructions
issues to Yii issue tracker.
Upgrading from v1.1.23
----------------------
- jQueryUI was updated to 1.12 and contains possible breaking changes.
Upstream the base theme changed to a more modern theme with some colors, less gradients and some other improvements.
The old default theme "Smoothness" is still included and configured as the Yii default for backwards compatibility.
If you wish, you can apply the new base theme using the CWidgetFactory application component for example:
return [
'components' => [
'widgetFactory' => [
'widgets' => [
'CJuiDatePicker' => [ // list your widgets derived from CJuiWidget here
'theme' => 'base',
],
],
],
]
];
For further details check the [jQuery UI upgrade guide](https://jqueryui.com/upgrade-guide/1.12/)
Upgrading from v1.1.22
----------------------

2
framework/YiiBase.php

@ -87,7 +87,7 @@ class YiiBase
*/
public static function getVersion()
{
return '1.1.23';
return '1.1.24';
}
/**

10
framework/base/CApplication.php

@ -802,9 +802,7 @@ abstract class CApplication extends CModule
$log="$message ($file:$line)\nStack trace:\n";
$trace=debug_backtrace();
// skip the first 3 stacks as they do not tell the error position
if(count($trace)>3)
$trace=array_slice($trace,3);
array_shift($trace);
foreach($trace as $i=>$t)
{
if(!isset($t['file']))
@ -907,9 +905,9 @@ abstract class CApplication extends CModule
echo '<pre>';
$trace=debug_backtrace();
// skip the first 3 stacks as they do not tell the error position
if(count($trace)>3)
$trace=array_slice($trace,3);
// skip the first 2 stacks as they are always irrelevant
if(count($trace)>2)
$trace=array_slice($trace,2);
foreach($trace as $i=>$t)
{
if(!isset($t['file']))

6
framework/console/CConsoleApplication.php

@ -117,9 +117,9 @@ class CConsoleApplication extends CApplication
echo "PHP Error[$code]: $message\n";
echo " in file $file at line $line\n";
$trace=debug_backtrace();
// skip the first 4 stacks as they do not tell the error position
if(count($trace)>4)
$trace=array_slice($trace,4);
// skip the first 2 stacks as they are always irrelevant
if(count($trace)>2)
$trace=array_slice($trace,2);
foreach($trace as $i=>$t)
{
if(!isset($t['file']))

30
framework/db/CDbConnection.php

@ -576,10 +576,7 @@ class CDbConnection extends CApplicationComponent
return $str;
$this->setActive(true);
if(($value=$this->_pdo->quote($str))!==false)
return $value;
else // the driver doesn't support quote (e.g. oci)
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
return $this->quoteValueInternal($str, PDO::PARAM_STR);
}
/**
@ -591,15 +588,30 @@ class CDbConnection extends CApplicationComponent
* This parameter will be passed to the `PDO::quote()` function.
* @return string the properly quoted string.
* @see http://www.php.net/manual/en/function.PDO-quote.php
* @since 1.1.18
* @since 1.1.18
*/
public function quoteValueWithType($value, $type)
{
$this->setActive(true);
if(($quoted=$this->_pdo->quote($value, $type))!==false)
return $quoted;
else // the driver doesn't support quote (e.g. oci)
return "'" . addcslashes(str_replace("'", "''", $value), "\000\n\r\\\032") . "'";
return $this->quoteValueInternal($value, $type);
}
/**
* Quotes a value for use in a query using a given type. This method is internally used.
* @param mixed $value
* @param int $type
* @return string
*/
private function quoteValueInternal($value, $type)
{
if(mb_stripos($this->connectionString, 'odbc:')===false)
{
if(($quoted=$this->_pdo->quote($value, $type))!==false)
return $quoted;
}
// fallback for drivers that don't support quote (e.g. oci and odbc)
return "'" . addcslashes(str_replace("'", "''", $value), "\000\n\r\\\032") . "'";
}
/**

6
framework/db/CDbTransaction.php

@ -61,7 +61,8 @@ class CDbTransaction extends CComponent
if($this->_active && $this->_connection->getActive())
{
Yii::trace('Committing transaction','system.db.CDbTransaction');
$this->_connection->getPdoInstance()->commit();
if($this->_connection->getPdoInstance()->inTransaction())
$this->_connection->getPdoInstance()->commit();
$this->_active=false;
}
else
@ -77,7 +78,8 @@ class CDbTransaction extends CComponent
if($this->_active && $this->_connection->getActive())
{
Yii::trace('Rolling back transaction','system.db.CDbTransaction');
$this->_connection->getPdoInstance()->rollBack();
if($this->_connection->getPdoInstance()->inTransaction())
$this->_connection->getPdoInstance()->rollBack();
$this->_active=false;
}
else

9
framework/logging/CFileLogRoute.php

@ -55,7 +55,12 @@ class CFileLogRoute extends CLogRoute
* @since 1.1.14
*/
public $rotateByCopy=false;
/**
* @var integer the permission to be set for newly created log files.
* This value will be used by PHP chmod() function. No umask will be applied.
* If not set, the permission will be determined by the current environment.
*/
public $chmod;
/**
* Initializes the route.
* This method is invoked after the route is created by the route manager.
@ -163,6 +168,8 @@ class CFileLogRoute extends CLogRoute
@flock($fp,LOCK_UN);
@fclose($fp);
}
if($this->chmod !== null)
@chmod($logFile, $this->chmod);
}
/**

6
framework/vendors/README.html

@ -19,13 +19,13 @@ Please refer to the detailed license information as shown below:
</tr>
<tr>
<td><a href="http://jquery.com">jQuery 1.11.1</a></td>
<td><a href="https://jquery.com/">jQuery 1.12.4</a></td>
<td><a href="jquery/LICENSE.txt">MIT</a></td>
<td>most JavaScript-related functionalities</td>
</tr>
<tr>
<td><a href="http://www.jqueryui.com">jQuery UI 1.11.2</a></td>
<td><a href="jqueryui/MIT-LICENSE.txt">MIT</a></td>
<td><a href="http://www.jqueryui.com">jQuery UI 1.12.1</a></td>
<td><a href="jqueryui/LICENSE.txt">MIT</a></td>
<td>the widgets under zii/widgets/jui</td>
</tr>
<tr>

21
framework/vendors/jquery/LICENSE.txt

@ -1,5 +1,13 @@
Copyright 2014 jQuery Foundation and other contributors
http://jquery.com/
Copyright jQuery Foundation and other contributors, https://jquery.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@ -18,4 +26,11 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.

3
framework/vendors/jqueryui/MIT-LICENSE.txt → framework/vendors/jqueryui/LICENSE.txt

@ -1,5 +1,4 @@
Copyright 2007, 2014 jQuery Foundation and other contributors,
https://jquery.org/
Copyright jQuery Foundation and other contributors, https://jquery.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history

4
framework/vendors/markdown/markdown.php

@ -1447,8 +1447,8 @@ class Markdown_Parser {
}
return preg_match_all(
"/[\x00-\xBF]|[\xC0-\xFF][\x80-\xBF]*/",
$text,
'/[\x00-\xBF]|[\xC0-\xFF][\x80-\xBF]*/',
$string,
$m
);
}

32
framework/web/helpers/CHtml.php

@ -85,6 +85,16 @@ class CHtml
* @since 1.1.13
*/
public static $closeSingleTags=true;
/**
* @var boolean whether to add <code>type="javascript"</code> to <code>&lt;script&gt;</code> tags. Defaults to true. Can be set to false for HTML5.
* @since 1.1.24
*/
public static $setScriptType=true;
/**
* @var boolean whether to add a CDATA wrapper around <code>&lt;script&gt;</code> and <code>&lt;style&gt;</code> contents. Defaults to true. Can be set to false for HTML5.
* @since 1.1.24
*/
public static $cdataScriptAndStyleContents=true;
/**
* @var boolean whether to render special attributes value. Defaults to true. Can be set to false for HTML5.
* @since 1.1.13
@ -252,7 +262,9 @@ class CHtml
{
if($media!=='')
$media=' media="'.$media.'"';
return "<style type=\"text/css\"{$media}>\n/*<![CDATA[*/\n{$text}\n/*]]>*/\n</style>";
if(self::$cdataScriptAndStyleContents)
$text="/*<![CDATA[*/\n{$text}\n/*]]>*/";
return "<style type=\"text/css\"{$media}>\n{$text}\n</style>";
}
/**
@ -291,11 +303,13 @@ class CHtml
*/
public static function script($text,array $htmlOptions=array())
{
$defaultHtmlOptions=array(
'type'=>'text/javascript',
);
$defaultHtmlOptions=array();
if(self::$setScriptType)
$defaultHtmlOptions['type']='text/javascript';
$htmlOptions=array_merge($defaultHtmlOptions,$htmlOptions);
return self::tag('script',$htmlOptions,"\n/*<![CDATA[*/\n{$text}\n/*]]>*/\n");
if(self::$cdataScriptAndStyleContents)
$text="/*<![CDATA[*/\n{$text}\n/*]]>*/";
return self::tag('script',$htmlOptions,"\n{$text}\n");
}
/**
@ -306,10 +320,10 @@ class CHtml
*/
public static function scriptFile($url,array $htmlOptions=array())
{
$defaultHtmlOptions=array(
'type'=>'text/javascript',
'src'=>$url
);
$defaultHtmlOptions=array();
if(self::$setScriptType)
$defaultHtmlOptions['type']='text/javascript';
$defaultHtmlOptions['src']=$url;
$htmlOptions=array_merge($defaultHtmlOptions,$htmlOptions);
return self::tag('script',$htmlOptions,'');
}

4714
framework/web/js/source/jquery.js

File diff suppressed because it is too large

9
framework/web/js/source/jquery.min.js

File diff suppressed because one or more lines are too long

BIN
framework/web/js/source/jui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_flat_75_ffffff_40x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_glass_65_ffffff_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_glass_75_dadada_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

BIN
framework/web/js/source/jui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

BIN
framework/web/js/source/jui/css/base/images/ui-icons_222222_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_2e83ff_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_444444_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_454545_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_555555_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_777620_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_777777_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_888888_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_cc0000_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_cd0a0a_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

BIN
framework/web/js/source/jui/css/base/images/ui-icons_ffffff_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

10
framework/web/js/source/jui/css/base/jquery-ui.css

File diff suppressed because one or more lines are too long

BIN
framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

BIN
framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

BIN
framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

BIN
framework/web/js/source/jui/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

BIN
framework/web/js/source/jui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

BIN
framework/web/js/source/jui/css/smoothness/images/ui-icons_222222_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
framework/web/js/source/jui/css/smoothness/images/ui-icons_2e83ff_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
framework/web/js/source/jui/css/smoothness/images/ui-icons_454545_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
framework/web/js/source/jui/css/smoothness/images/ui-icons_888888_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
framework/web/js/source/jui/css/smoothness/images/ui-icons_cd0a0a_256x240.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

7
framework/web/js/source/jui/css/smoothness/jquery-ui.css

File diff suppressed because one or more lines are too long

9
framework/web/js/source/jui/js/jquery-ui-i18n.min.js

File diff suppressed because one or more lines are too long

22
framework/web/js/source/jui/js/jquery-ui.min.js

File diff suppressed because one or more lines are too long

56
framework/yiilite.php

@ -41,7 +41,7 @@ class YiiBase
private static $_logger;
public static function getVersion()
{
return '1.1.23';
return '1.1.24';
}
public static function createWebApplication($config=null)
{
@ -1542,9 +1542,7 @@ abstract class CApplication extends CModule
restore_exception_handler();
$log="$message ($file:$line)\nStack trace:\n";
$trace=debug_backtrace();
// skip the first 3 stacks as they do not tell the error position
if(count($trace)>3)
$trace=array_slice($trace,3);
array_shift($trace);
foreach($trace as $i=>$t)
{
if(!isset($t['file']))
@ -1612,9 +1610,9 @@ abstract class CApplication extends CModule
echo "<p>$message ($file:$line)</p>\n";
echo '<pre>';
$trace=debug_backtrace();
// skip the first 3 stacks as they do not tell the error position
if(count($trace)>3)
$trace=array_slice($trace,3);
// skip the first 2 stacks as they are always irrelevant
if(count($trace)>2)
$trace=array_slice($trace,2);
foreach($trace as $i=>$t)
{
if(!isset($t['file']))
@ -4933,6 +4931,8 @@ class CHtml
public static $count=0;
public static $liveEvents=true;
public static $closeSingleTags=true;
public static $setScriptType=true;
public static $cdataScriptAndStyleContents=true;
public static $renderSpecialAttributesValue=true;
private static $_modelNameConverter;
public static function encode($text)
@ -5003,7 +5003,9 @@ class CHtml
{
if($media!=='')
$media=' media="'.$media.'"';
return "<style type=\"text/css\"{$media}>\n/*<![CDATA[*/\n{$text}\n/*]]>*/\n</style>";
if(self::$cdataScriptAndStyleContents)
$text="/*<![CDATA[*/\n{$text}\n/*]]>*/";
return "<style type=\"text/css\"{$media}>\n{$text}\n</style>";
}
public static function refresh($seconds,$url='')
{
@ -5018,18 +5020,20 @@ class CHtml
}
public static function script($text,array $htmlOptions=array())
{
$defaultHtmlOptions=array(
'type'=>'text/javascript',
);
$defaultHtmlOptions=array();
if(self::$setScriptType)
$defaultHtmlOptions['type']='text/javascript';
$htmlOptions=array_merge($defaultHtmlOptions,$htmlOptions);
return self::tag('script',$htmlOptions,"\n/*<![CDATA[*/\n{$text}\n/*]]>*/\n");
if(self::$cdataScriptAndStyleContents)
$text="/*<![CDATA[*/\n{$text}\n/*]]>*/";
return self::tag('script',$htmlOptions,"\n{$text}\n");
}
public static function scriptFile($url,array $htmlOptions=array())
{
$defaultHtmlOptions=array(
'type'=>'text/javascript',
'src'=>$url
);
$defaultHtmlOptions=array();
if(self::$setScriptType)
$defaultHtmlOptions['type']='text/javascript';
$defaultHtmlOptions['src']=$url;
$htmlOptions=array_merge($defaultHtmlOptions,$htmlOptions);
return self::tag('script',$htmlOptions,'');
}
@ -8885,18 +8889,22 @@ class CDbConnection extends CApplicationComponent
if(is_int($str) || is_float($str))
return $str;
$this->setActive(true);
if(($value=$this->_pdo->quote($str))!==false)
return $value;
else // the driver doesn't support quote (e.g. oci)
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
return $this->quoteValueInternal($str, PDO::PARAM_STR);
}
public function quoteValueWithType($value, $type)
{
$this->setActive(true);
if(($quoted=$this->_pdo->quote($value, $type))!==false)
return $quoted;
else // the driver doesn't support quote (e.g. oci)
return "'" . addcslashes(str_replace("'", "''", $value), "\000\n\r\\\032") . "'";
return $this->quoteValueInternal($value, $type);
}
private function quoteValueInternal($value, $type)
{
if(mb_stripos($this->connectionString, 'odbc:')===false)
{
if(($quoted=$this->_pdo->quote($value, $type))!==false)
return $quoted;
}
// fallback for drivers that don't support quote (e.g. oci and odbc)
return "'" . addcslashes(str_replace("'", "''", $value), "\000\n\r\\\032") . "'";
}
public function quoteTableName($name)
{

4
framework/zii/widgets/jui/CJuiWidget.php

@ -38,10 +38,10 @@ abstract class CJuiWidget extends CWidget
*/
public $themeUrl;
/**
* @var string the JUI theme name. Defaults to 'base'. Make sure that under {@link themeUrl} there
* @var string the JUI theme name. Defaults to 'smoothness'. Make sure that under {@link themeUrl} there
* is a directory whose name is the same as this property value (case-sensitive).
*/
public $theme='base';
public $theme='smoothness';
/**
* @var mixed the main JUI JavaScript file. Defaults to 'jquery-ui.min.js'.
* Note the file must exist under the URL specified by {@link scriptUrl}.

Loading…
Cancel
Save