From: x2003bruneau Date: Tue, 6 Mar 2007 09:16:42 +0000 (+0000) Subject: New upload manager to handle images and attachments X-Git-Tag: xorg/0.9.14~231 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=abe7e055f16e6f6e9605c2965164169babbf9b7f;p=platal.git New upload manager to handle images and attachments git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1553 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/ChangeLog b/ChangeLog index a28925b..af87d45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ New: * Core: - UTF-8 -FRU - New Backtrace tool -FRU + - New Upload manager -FRU * Events: - #643: Sort menu -FRU diff --git a/classes/platalpage.php b/classes/platalpage.php index 84a0a91..0fe8ec6 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -28,11 +28,6 @@ class PlatalPage extends Smarty private $_errors; private $_failure; - // defaults - var $caching = false; - var $config_overwrite = false; - var $use_sub_dirs = false; - // {{{ function PlatalPage() public function __construct($tpl, $type = SKINNED) @@ -41,6 +36,9 @@ class PlatalPage extends Smarty global $globals; + $this->caching = false; + $this->config_overwrite = false; + $this->use_sub_dirs = false; $this->template_dir = $globals->spoolroot."/templates/"; $this->compile_dir = $globals->spoolroot."/spool/templates_c/"; array_unshift($this->plugins_dir, $globals->spoolroot."/plugins/"); @@ -227,7 +225,7 @@ function escape_html($string) { if (is_string($string)) { $transtbl = Array('<' => '<', '>' => '>', '"' => '"', '\'' => '''); - return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)/", "&" , strtr($string, $transtbl)); + return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)/u", "&", strtr(pl_entities($string), $transtbl)); } else { return $string; } @@ -265,8 +263,8 @@ function at_to_globals($tpl_source, &$smarty) function trimwhitespace($source, &$smarty) { $tags = '(script|pre|textarea)'; - preg_match_all("!<$tags.*?>.*?!ius", $source, $tagsmatches); - $source = preg_replace("!<$tags.*?>.*?!ius", "&&&tags&&&", $source); + preg_match_all("!<$tags.*?>.*?!ius", $source, $tagsmatches); + $source = preg_replace("!<$tags.*?>.*?!ius", "&&&tags&&&", $source); // remove all leading spaces, tabs and carriage returns NOT // preceeded by a php close tag. @@ -301,19 +299,19 @@ function hide_emails($source, &$smarty) { //prevent email replacement in