Changes in [2575:4bbedce723d0:2573:2d7e8b0b9402]
- Files:
-
- 19 added
- 20 deleted
- 17 edited
-
.hgsubstate (modified) (1 diff)
-
admin/_charte.php (modified) (1 diff)
-
admin/categories.php (modified) (1 diff)
-
admin/js/jquery/jquery.ui.touch-punch.js (deleted)
-
admin/preferences.php (modified) (1 diff)
-
inc/core/class.dc.blog.php (modified) (2 diffs)
-
inc/core/class.dc.namespace.php (modified) (1 diff)
-
inc/core/class.dc.themes.php (modified) (1 diff)
-
inc/prepend.php (modified) (1 diff)
-
inc/public/class.dc.template.php (modified) (4 diffs)
-
inc/public/default-templates/404.html (added)
-
inc/public/default-templates/_flv_player.html (added)
-
inc/public/default-templates/_footer.html (added)
-
inc/public/default-templates/_head.html (added)
-
inc/public/default-templates/_mp3_player.html (added)
-
inc/public/default-templates/_top.html (added)
-
inc/public/default-templates/archive.html (added)
-
inc/public/default-templates/archive_month.html (added)
-
inc/public/default-templates/atom-comments.xml (added)
-
inc/public/default-templates/atom.xml (added)
-
inc/public/default-templates/category.html (added)
-
inc/public/default-templates/home.html (added)
-
inc/public/default-templates/legacy/404.html (deleted)
-
inc/public/default-templates/legacy/_flv_player.html (deleted)
-
inc/public/default-templates/legacy/_footer.html (deleted)
-
inc/public/default-templates/legacy/_head.html (deleted)
-
inc/public/default-templates/legacy/_mp3_player.html (deleted)
-
inc/public/default-templates/legacy/_top.html (deleted)
-
inc/public/default-templates/legacy/archive.html (deleted)
-
inc/public/default-templates/legacy/archive_month.html (deleted)
-
inc/public/default-templates/legacy/atom-comments.xml (deleted)
-
inc/public/default-templates/legacy/atom.xml (deleted)
-
inc/public/default-templates/legacy/category.html (deleted)
-
inc/public/default-templates/legacy/home.html (deleted)
-
inc/public/default-templates/legacy/password-form.html (deleted)
-
inc/public/default-templates/legacy/post.html (deleted)
-
inc/public/default-templates/legacy/rss2-comments.xml (deleted)
-
inc/public/default-templates/legacy/rss2.xml (deleted)
-
inc/public/default-templates/legacy/rss2.xsl (deleted)
-
inc/public/default-templates/legacy/search.html (deleted)
-
inc/public/default-templates/legacy/user_head.html (deleted)
-
inc/public/default-templates/password-form.html (added)
-
inc/public/default-templates/post.html (added)
-
inc/public/default-templates/rss2-comments.xml (added)
-
inc/public/default-templates/rss2.xml (added)
-
inc/public/default-templates/rss2.xsl (added)
-
inc/public/default-templates/search.html (added)
-
inc/public/default-templates/user_head.html (added)
-
inc/public/prepend.php (modified) (1 diff)
-
plugins/antispam/filters/class.dc.filter.linkslookup.php (modified) (1 diff)
-
plugins/antispam/index.php (modified) (1 diff)
-
plugins/blogroll/index.php (modified) (1 diff)
-
plugins/pages/list.php (modified) (1 diff)
-
plugins/simpleMenu/index.php (modified) (1 diff)
-
plugins/widgets/index.php (modified) (2 diffs)
-
themes/ductile/_prepend.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r2574 r2548 1 5779e9453cf50ec3c90c6a260061c29d2ebac064inc/libs/clearbricks1 a51d747b2601fd10b50926a017e25764abe0c872 inc/libs/clearbricks -
admin/_charte.php
r2504 r2501 31 31 <script type="text/javascript" src="js/jquery/jquery.js"></script> 32 32 <script type="text/javascript" src="js/jquery/jquery-ui.custom.js"></script> 33 <script type="text/javascript" src="js/jquery/jquery.ui.touch-punch.js"></script>34 33 <script type="text/javascript" src="js/jquery/jquery.pageTabs.js"></script> 35 34 <script type="text/javascript" src="js/jquery/jquery.biscuit.js"></script> -
admin/categories.php
r2567 r2566 109 109 && $rs->count()>1) { 110 110 $starting_script .= dcPage::jsLoad('js/jquery/jquery-ui.custom.js'); 111 $starting_script .= dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');112 111 $starting_script .= dcPage::jsLoad('js/jquery/jquery.mjs.nestedSortable.js'); 113 112 } -
admin/preferences.php
r2567 r2566 305 305 ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). 306 306 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 307 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js').308 307 dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). 309 308 '<script type="text/javascript">'."\n". -
inc/core/class.dc.blog.php
r2567 r2566 1894 1894 - post_id: (integer) Get comments belonging to given post_id 1895 1895 - cat_id: (integer or array) Get comments belonging to entries of given category ID 1896 - comment_id: (integer or array) Get comment with given ID (or IDs)1896 - comment_id: (integer) Get comment with given ID 1897 1897 - comment_site: (string) Get comments with given comment_site 1898 1898 - comment_status: (integer) Get comments with given comment_status … … 1984 1984 1985 1985 if (isset($params['comment_id']) && $params['comment_id'] !== '') { 1986 if (is_array($params['comment_id'])) { 1987 array_walk($params['comment_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}')); 1988 } else { 1989 $params['comment_id'] = array((integer) $params['comment_id']); 1990 } 1991 $strReq .= 'AND comment_id '.$this->con->in($params['comment_id']); 1986 $strReq .= 'AND comment_id = '.(integer) $params['comment_id'].' '; 1992 1987 } 1993 1988 -
inc/core/class.dc.namespace.php
r2567 r2566 125 125 126 126 /** 127 Returns global setting value if exists.128 129 @param n <b>string</b> setting name130 @return <b>mixed</b>131 */132 public function getGlobal($n)133 {134 if (isset($this->global_settings[$n]['value'])) {135 return $this->global_settings[$n]['value'];136 }137 138 return null;139 }140 141 /**142 Returns local setting value if exists.143 144 @param n <b>string</b> setting name145 @return <b>mixed</b>146 */147 public function getLocal($n)148 {149 if (isset($this->local_settings[$n]['value'])) {150 return $this->local_settings[$n]['value'];151 }152 153 return null;154 }155 156 /**157 127 Magic __get method. 158 128 @copydoc ::get -
inc/core/class.dc.themes.php
r2567 r2566 59 59 # Themes specifics properties 60 60 $properties = array_merge( 61 array('parent' => null , 'tplset' => 'legacy'),61 array('parent' => null), 62 62 $properties, 63 63 array('permissions' => 'admin') // force themes perms -
inc/prepend.php
r2567 r2566 135 135 # Constants 136 136 define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 137 define('DC_VERSION','2. 7-dev');137 define('DC_VERSION','2.6.1'); 138 138 define('DC_DIGESTS',dirname(__FILE__).'/digests'); 139 139 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); -
inc/public/class.dc.template.php
r2574 r2566 234 234 } 235 235 236 protected function compileFile($file) 237 { 238 $fc = file_get_contents($file); 239 240 $this->compile_stack[] = $file; 241 242 # Remove every PHP tags 243 if ($this->remove_php) 244 { 245 $fc = preg_replace('/<\?(?=php|=|\s).*?\?>/ms','',$fc); 246 } 247 248 # Transform what could be considered as PHP short tags 249 $fc = preg_replace('/(<\?(?!php|=|\s))(.*?)(\?>)/ms', 250 '<?php echo "$1"; ?>$2<?php echo "$3"; ?>',$fc); 251 252 # Remove template comments <!-- #... --> 253 $fc = preg_replace('/(^\s*)?<!-- #(.*?)-->/ms','',$fc); 254 255 # Lexer part : split file into small pieces 256 # each array entry will be either a tag or plain text 257 $blocks = preg_split( 258 '#(<tpl:\w+[^>]*>)|(</tpl:\w+>)|({{tpl:\w+[^}]*}})#msu',$fc,-1, 259 PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); 260 261 # Next : build semantic tree from tokens. 262 $rootNode = new tplNode(); 263 $node = $rootNode; 264 $errors = array(); 265 foreach ($blocks as $id => $block) { 266 $isblock = preg_match('#<tpl:(\w+)(?:(\s+.*?)>|>)|</tpl:(\w+)>|{{tpl:(\w+)(\s(.*?))?}}#ms',$block,$match); 267 if ($isblock == 1) { 268 if (substr($match[0],1,1) == '/') { 269 // Closing tag, check if it matches current opened node 270 $tag = $match[3]; 271 if (($node instanceof tplNodeBlock) && $node->getTag() == $tag) { 272 $node->setClosing(); 273 $node = $node->getParent(); 274 } else { 275 // Closing tag does not match opening tag 276 // Search if it closes a parent tag 277 $search = $node; 278 while($search->getTag() != 'ROOT' && $search->getTag() != $tag) { 279 $search = $search->getParent(); 280 } 281 if ($search->getTag() == $tag) { 282 $errors[] = sprintf( 283 __('Did not find closing tag for block <tpl:%s>. Content has been ignored.'), 284 html::escapeHTML($node->getTag())); 285 $search->setClosing(); 286 $node = $search->getParent(); 287 } else { 288 $errors[]=sprintf( 289 __('Unexpected closing tag </tpl:%s> found.'), 290 $tag);; 291 } 292 } 293 } elseif (substr($match[0],0,1) == '{') { 294 // Value tag 295 $tag = $match[4]; 296 $str_attr = ''; 297 $attr = array(); 298 if (isset($match[6])) { 299 $str_attr = $match[6]; 300 $attr = $this->getAttrs($match[6]); 301 } 302 $node->addChild(new tplNodeValue($tag,$attr,$str_attr)); 303 } else { 304 // Opening tag, create new node and dive into it 305 $tag = $match[1]; 306 $newnode = new tplNodeBlock($tag,isset($match[2])?$this->getAttrs($match[2]):array()); 307 $node->addChild($newnode); 308 $node = $newnode; 309 } 310 } else { 311 // Simple text 312 $node->addChild(new tplNodeText($block)); 313 } 314 } 315 316 if (($node instanceof tplNodeBlock) && !$node->isClosed()) { 317 $errors[] = sprintf( 318 __('Did not find closing tag for block <tpl:%s>. Content has been ignored.'), 319 html::escapeHTML($node->getTag())); 320 } 321 322 $err = ""; 323 if (count($errors) > 0) { 324 $err = "\n\n<!-- \n". 325 __('WARNING: the following errors have been found while parsing template file :'). 326 "\n * ". 327 join("\n * ",$errors). 328 "\n -->\n"; 329 } 330 331 return $rootNode->compile($this).$err; 332 } 333 236 334 public function compileBlockNode($tag,$attr,$content) 237 335 { … … 244 342 $this->core->callBehavior('templateInsideBlock',$this->core,$this->current_tag,$attr,array(&$content)); 245 343 246 $res .= parent::compileBlockNode($this->current_tag,$attr,$content); 344 if (isset($this->blocks[$this->current_tag])) { 345 $res .= call_user_func($this->blocks[$this->current_tag],$attr,$content); 346 } elseif ($this->unknown_block_handler != null) { 347 $res .= call_user_func($this->unknown_block_handler,$this->current_tag,$attr,$content); 348 } 247 349 248 350 # --BEHAVIOR-- templateAfterBlock … … 260 362 $res = $this->core->callBehavior('templateBeforeValue',$this->core,$this->current_tag,$attr); 261 363 262 $res .= parent::compileValueNode($this->current_tag,$attr,$str_attr); 364 if (isset($this->values[$this->current_tag])) { 365 $res .= call_user_func($this->values[$this->current_tag],$attr,ltrim($str_attr)); 366 } elseif ($this->unknown_value_handler != null) { 367 $res .= call_user_func($this->unknown_value_handler,$this->current_tag,$attr,$str_attr); 368 } 263 369 264 370 # --BEHAVIOR-- templateAfterValue … … 266 372 267 373 return $res; 374 } 375 376 public function setUnknownValueHandler($callback) 377 { 378 if (is_callable($callback)) { 379 $this->unknown_value_handler = $callback; 380 } 381 } 382 383 public function setUnknownBlockHandler($callback) 384 { 385 if (is_callable($callback)) { 386 $this->unknown_block_handler = $callback; 387 } 268 388 } 269 389 -
inc/public/prepend.php
r2567 r2566 134 134 $__theme_tpl_path[] = $core->blog->themes_path.'/'.$__parent_theme.'/tpl'; 135 135 } 136 $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 137 if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) { 138 $core->tpl->setPath( 139 $__theme_tpl_path, 140 dirname(__FILE__).'/default-templates/'.$tplset, 141 $core->tpl->getPath()); 142 } else { 143 $core->tpl->setPath( 144 $__theme_tpl_path, 145 $core->tpl->getPath()); 146 } 136 137 $core->tpl->setPath( 138 $__theme_tpl_path, 139 dirname(__FILE__).'/default-templates', 140 $core->tpl->getPath()); 141 147 142 $core->url->mode = $core->blog->settings->system->url_scan; 148 143 -
plugins/antispam/filters/class.dc.filter.linkslookup.php
r2567 r2566 48 48 49 49 $i = count($domain_elem) - 1; 50 if ($i == 0) {51 // "domain" is 1 word long, don't check it52 return null;53 }54 50 $host = $domain_elem[$i]; 55 51 do -
plugins/antispam/index.php
r2567 r2566 117 117 echo 118 118 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 119 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js').120 119 dcPage::jsLoad('index.php?pf=antispam/antispam.js'); 121 120 } -
plugins/blogroll/index.php
r2567 r2566 177 177 echo 178 178 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 179 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js').180 179 dcPage::jsLoad('index.php?pf=blogroll/blogroll.js'); 181 180 } -
plugins/pages/list.php
r2567 r2566 55 55 <title><?php echo __('Pages'); ?></title> 56 56 <?php 57 echo 58 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 59 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 57 echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 60 58 dcPage::jsLoad('index.php?pf=pages/list.js'). 61 59 '<script type="text/javascript">'. -
plugins/simpleMenu/index.php
r2496 r2455 347 347 echo 348 348 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 349 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js').350 349 dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 351 350 } -
plugins/widgets/index.php
r2520 r2509 218 218 echo 219 219 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 220 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js').221 220 dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 222 221 ?> … … 367 366 $altUp = $i == 0 ? ' alt=""' : ' alt="'.__('Up the widget').'"'; 368 367 $altDown = $i == count($widgets->elements())-1 ? ' alt=""' : ' alt="'.__('Down the widget').'"'; 369 368 370 369 $iname = 'w['.$pr.']['.$i.']'; 371 370 -
themes/ductile/_prepend.php
r2567 r2566 26 26 if (!$core->auth->user_prefs->accessibility->nodragdrop) { 27 27 echo 28 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 29 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'); 28 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'); 30 29 echo <<<EOT 31 30 <script type="text/javascript">
Note: See TracChangeset
for help on using the changeset viewer.
