ImpressCMS Core is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

impresscms

Commit 11651

User picture
  • Author: skenow
  • 2012-03-20 11:36 (about 2 years ago)

Merging r11626 through r11650 into task; synchronizing with changes in 1.3 branch and trunk

Files Affected

 
1165011651
5
DB Version:
5
DB Version:
6
Build Version: 
6
Build Version: 
7
 
7
 
 
 
8
=== ImpressCMS 1.3.2 RC ===
 
 
9
Release date: March 2012
 
 
10
Revision: 
 
 
11
DB Version: 42
 
 
12
Build Version: 57
 
 
13
 
8
=== ImpressCMS 1.3.2 Beta ===
14
=== ImpressCMS 1.3.2 Beta ===
9
Release date: March 2012
15
Release date: March 2012
10
Revision: 
16
Revision: 
1165011651
10
 * @version        $Id$
10
 * @version        $Id$
11
 */
11
 */
12
 
12
 
13
define('ICMS_VERSION_NAME', 'ImpressCMS 2.0 Alpha');
13
define('ICMS_VERSION_NAME', 'ImpressCMS 2.0 Alpha 2');
14
 
14
 
15
// For backward compatibility with XOOPS
15
// For backward compatibility with XOOPS
16
define('XOOPS_VERSION', ICMS_VERSION_NAME);
16
define('XOOPS_VERSION', ICMS_VERSION_NAME);
...
 
...
 
30
 *
30
 *
31
 * Every release has its own build number, incrementable by 1 everytime we make a release
31
 * Every release has its own build number, incrementable by 1 everytime we make a release
32
 */
32
 */
33
// impresscms_1.2.7 Final = 54
33
// impresscms_1.3.2 RC = 57
34
define('ICMS_VERSION_BUILD', 55);
34
define('ICMS_VERSION_BUILD', 58);
35
 
35
 
36
/**
36
/**
37
 * Latest dbversion of the System Module
37
 * Latest dbversion of the System Module
...
 
...
 
42
 * So, developers, everytime you add an upgrade block in system/include/update.php to upgrade something in the DB,
42
 * So, developers, everytime you add an upgrade block in system/include/update.php to upgrade something in the DB,
43
 * please also change this constant
43
 * please also change this constant
44
 */
44
 */
45
define('ICMS_SYSTEM_DBVERSION', 42);
45
define('ICMS_SYSTEM_DBVERSION', 43);
1165011651
113
     **/
113
     **/
114
    protected function getHTMLFilterConfig() {
114
    protected function getHTMLFilterConfig() {
115
        $icmsConfigPurifier = icms::$config->getConfigsByCat(ICMS_CONF_PURIFIER);
115
        $icmsConfigPurifier = icms::$config->getConfigsByCat(ICMS_CONF_PURIFIER);
116
 
116
        
 
 
117
        $IframeRegExp = '';
 
 
118
        if ( $icmsConfigPurifier['purifier_URI_SafeIframeRegexp'] !== '' ) {
 
 
119
            $IframeRegExp = str_ireplace( 'http://', '', $icmsConfigPurifier['purifier_URI_SafeIframeRegexp'] );
 
 
120
            $pos = strpos( $IframeRegExp, '|' );
 
 
121
            if ( $pos === false ) {
 
 
122
                $IframeRegExp = '%^http://' . $IframeRegExp . '%';
 
 
123
            } else {
 
 
124
                $IframeRegExp = '%^http://(' . $IframeRegExp . ')%';
 
 
125
            }
 
 
126
        }
 
 
127
 
117
        $icmsPurifierConf = array(
128
        $icmsPurifierConf = array(
118
            'HTML.DefinitionID' => $icmsConfigPurifier['purifier_HTML_DefinitionID'],
129
            'HTML.DefinitionID' => $icmsConfigPurifier['purifier_HTML_DefinitionID'],
119
            'HTML.DefinitionRev' => $icmsConfigPurifier['purifier_HTML_DefinitionRev'],
130
            'HTML.DefinitionRev' => $icmsConfigPurifier['purifier_HTML_DefinitionRev'],
...
 
...
 
163
            'URI.DefinitionID' => $icmsConfigPurifier['purifier_URI_DefinitionID'],
174
            'URI.DefinitionID' => $icmsConfigPurifier['purifier_URI_DefinitionID'],
164
            'URI.DefinitionRev' => $icmsConfigPurifier['purifier_URI_DefinitionRev'],
175
            'URI.DefinitionRev' => $icmsConfigPurifier['purifier_URI_DefinitionRev'],
165
            'URI.AllowedSchemes' => $icmsConfigPurifier['purifier_URI_AllowedSchemes'],
176
            'URI.AllowedSchemes' => $icmsConfigPurifier['purifier_URI_AllowedSchemes'],
166
            'URI.SafeIframeRegexp' => $icmsConfigPurifier['purifier_URI_SafeIframeRegexp'],
177
            'URI.SafeIframeRegexp' => $IframeRegExp,
167
            'Attr.AllowedFrameTargets' => $icmsConfigPurifier['purifier_Attr_AllowedFrameTargets'],
178
            'Attr.AllowedFrameTargets' => $icmsConfigPurifier['purifier_Attr_AllowedFrameTargets'],
168
            'Attr.AllowedRel' => $icmsConfigPurifier['purifier_Attr_AllowedRel'],
179
            'Attr.AllowedRel' => $icmsConfigPurifier['purifier_Attr_AllowedRel'],
169
            'Attr.AllowedClasses' => $icmsConfigPurifier['purifier_Attr_AllowedClasses'],
180
            'Attr.AllowedClasses' => $icmsConfigPurifier['purifier_Attr_AllowedClasses'],
1165011651
407
            default:
407
            default:
408
                $classname = "icms_ipf_form_elements_" . ucfirst($controlName);
408
                $classname = "icms_ipf_form_elements_" . ucfirst($controlName);
409
                if (!class_exists($classname)) {
409
                if (!class_exists($classname)) {
410
                    /** @todo remove in 1.4 or even for 1.3 final */
410
                    // perhaps this is a control created by the module
411
                    $classname = "IcmsForm" . ucfirst($controlName) . "Element";
411
                    $moduleName = $this->targetObject->handler->_moduleName;
412
                    if (!class_exists($classname)) {
412
                    $moduleFormElementsPath = $this->targetObject->handler->_modulePath . "/class/form/elements/";
413
                        if (file_exists(ICMS_ROOT_PATH . "/class/icmsform/elements/" . strtolower($classname) . ".php")) {
413
                    $classname = ucfirst($moduleName) . ucfirst($controlName) . "Element";
414
                            include_once ICMS_ROOT_PATH . "/class/icmsform/elements/" . strtolower($classname) . ".php" ;
414
                    $classFileName = strtolower($classname) . ".php";
415
                        } else {
 
 
416
                            // perhaps this is a control created by the module
 
 
417
                            $moduleName = $this->targetObject->handler->_moduleName;
 
 
418
                            if ($moduleName != 'system') {
 
 
419
                                $moduleFormElementsPath = $this->targetObject->handler->_modulePath . "/class/form/elements/";
 
 
420
                            } else {
 
 
421
                                $moduleFormElementsPath = $this->targetObject->handler->_modulePath . "/admin/{$name}/class/form/elements/";
 
 
422
                            }
 
 
423
                            $classname = ucfirst($moduleName) . ucfirst($controlName) . "Element";
 
 
424
                            $classFileName = strtolower($classname) . ".php";
 
 
425
 
415
 
426
                            if (file_exists($moduleFormElementsPath . $classFileName)) {
416
                    if (file_exists($moduleFormElementsPath . $classFileName)) {
427
                                include_once $moduleFormElementsPath . $classFileName ;
417
                        include_once $moduleFormElementsPath . $classFileName ;
428
                            } else {
418
                    } else {
429
                                trigger_error($classname . " not found", E_USER_WARNING);
419
                        trigger_error($classname . " not found", E_USER_WARNING);
430
                                return new icms_form_elements_Label();
420
                        return new icms_form_elements_Label();
431
                            }
 
 
432
                        }
 
 
433
                    }
421
                    }
434
                }
422
                }
435
                return new $classname($this->targetObject, $key);
423
                return new $classname($this->targetObject, $key);
1165011651
693
// added in 1.3.2
693
// added in 1.3.2
694
define("_MD_AM_HELP_TIP","View help text");
694
define("_MD_AM_HELP_TIP","View help text");
695
 
695
 
 
 
696
// added in 1.3.3
696
define("_MD_AM_PURIFIER_HTML_SAFEIFRAME","Enable Safe Iframes");
697
define("_MD_AM_PURIFIER_HTML_SAFEIFRAME","Enable Safe Iframes");
697
define("_MD_AM_PURIFIER_HTML_SAFEIFRAMEDSC","Whether or not to permit Iframes in documents, with a number of extra security features added to
prevent script execution. You must define a Regex pattern with Safe Iframe RegEXP before enabling!.");
698
define("_MD_AM_PURIFIER_HTML_SAFEIFRAMEDSC","Whether or not to permit Iframes in documents, with a number of extra security features added to
prevent script execution. You must define a Regex pattern with Safe Iframe RegEXP before enabling!.");
698
define("_MD_AM_PURIFIER_URI_SAFEIFRAMEREGEXP","Safe Iframes RegEXP");
699
define("_MD_AM_PURIFIER_URI_SAFEIFRAMEREGEXP","Safe Iframe Domain(s)");
699
define("_MD_AM_PURIFIER_URI_SAFEIFRAMEREGEXPDSC","A PCRE regular expression that will be matched against an iframe URI. This is a relatively inflexible scheme, but works well enough for the most common use-case of iframes: embedded video.<br /><br />
700
define("_MD_AM_PURIFIER_URI_SAFEIFRAMEREGEXPDSC","Enter the domains that are allowed in Iframes. Seperate with pipe char. |.<br /><br />
700
    Here are some example values:<br /><br />
701
    Example:<br /><br />
 
 
702
    www.youtube.com/embed/|player.vimeo.com/video/<br /><br />
 
 
703
    HTML Safe Iframe must be enabled for this to work.");
701
 
704
 
702
    %^http://www.youtube.com/embed/% - Allow YouTube videos<br />
 
 
703
    %^http://player.vimeo.com/video/% - Allow Vimeo videos<br />
 
 
704
    %^http://(www.youtube.com/embed/|player.vimeo.com/video/)% - Allow both<br /><br />
 
 
705
.<br /><br />HTML Safe Iframe must be enabled for this to work.");
 
 
706
 
 
 
707
?>
705
?>