Dotclear


Ignore:
Files:
52 added
22 deleted
32 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r2548 r2606  
    1 a51d747b2601fd10b50926a017e25764abe0c872 inc/libs/clearbricks 
     140b662e0ce7bb257e56bffeead7d6996feaf9dc9 inc/libs/clearbricks 
  • admin/_charte.php

    r2501 r2504  
    3131     <script type="text/javascript" src="js/jquery/jquery.js"></script> 
    3232     <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> 
    3334     <script type="text/javascript" src="js/jquery/jquery.pageTabs.js"></script> 
    3435     <script type="text/javascript" src="js/jquery/jquery.biscuit.js"></script> 
  • admin/blog.php

    r2566 r2596  
    2121 
    2222# Create a blog 
    23 if (!isset($_POST['id']) && !empty($_POST['blog_id'])) 
     23if (!isset($_POST['id']) && (isset($_POST['create']))) 
    2424{ 
    2525     $cur = $core->con->openCursor($core->prefix.'blog'); 
     
    8484     '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p> '; 
    8585 
    86      if ($blog_id) { 
    87           echo 
    88           '<p class="form-note warn">'.__('Please note that changing your blog ID may require changes in your public index.php file.').'</p>'; 
    89      } 
    90  
    9186     echo 
    9287     '<p><label class="required" for="blog_name"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog name:').'</label> '. 
     
    9994     form::textarea('blog_desc',60,5,html::escapeHTML($blog_desc)).'</p>'. 
    10095 
    101      '<p><input type="submit" accesskey="s" value="'.__('Create').'" /></p>'. 
     96     '<p><input type="submit" accesskey="s" name="create" value="'.__('Create').'" /></p>'. 
    10297     '</form>'; 
    10398 
  • admin/blog_pref.php

    r2566 r2577  
    166166     $media_img_m_size = abs((integer) $_POST['media_img_m_size']); 
    167167     if ($media_img_m_size < 0) { $media_img_m_size = 448; } 
     168 
     169     $nb_post_for_home = abs((integer) $_POST['nb_post_for_home']); 
     170     if ($nb_post_for_home <= 1) { $nb_post_for_home = 1; } 
    168171 
    169172     $nb_post_per_page = abs((integer) $_POST['nb_post_per_page']); 
     
    231234          $blog_settings->system->put('note_title_tag',$_POST['note_title_tag']); 
    232235 
     236          $blog_settings->system->put('nb_post_for_home',$nb_post_for_home); 
    233237          $blog_settings->system->put('nb_post_per_page',$nb_post_per_page); 
    234238          $blog_settings->system->put('use_smilies',!empty($_POST['use_smilies'])); 
     
    512516 
    513517     '<div class="col">'. 
     518     '<p><label for="nb_post_for_home" class="classic">'.sprintf(__('Display %s entries on home page'), 
     519     form::field('nb_post_for_home',2,3,$blog_settings->system->nb_post_for_home)). 
     520     '</label></p>'. 
     521 
    514522     '<p><label for="nb_post_per_page" class="classic">'.sprintf(__('Display %s entries per page'), 
    515523     form::field('nb_post_per_page',2,3,$blog_settings->system->nb_post_per_page)). 
  • admin/categories.php

    r2566 r2567  
    109109     && $rs->count()>1) { 
    110110          $starting_script .= dcPage::jsLoad('js/jquery/jquery-ui.custom.js'); 
     111          $starting_script .= dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'); 
    111112          $starting_script .= dcPage::jsLoad('js/jquery/jquery.mjs.nestedSortable.js'); 
    112113} 
  • admin/media.php

    r2529 r2582  
    362362} 
    363363 
     364// Remove hidden directories (unless DC_SHOW_HIDDEN_DIRS is set to true) 
     365if (!defined('DC_SHOW_HIDDEN_DIRS') || (DC_SHOW_HIDDEN_DIRS == false)) { 
     366     for ($i = count($dir['dirs']) - 1; $i >= 0; $i--) { 
     367          if ($dir['dirs'][$i]->d) { 
     368               if (strpos($dir['dirs'][$i]->relname,'.') !== false) { 
     369                    unset($dir['dirs'][$i]); 
     370               } 
     371          } 
     372     } 
     373} 
    364374$items = array_values(array_merge($dir['dirs'],$dir['files'])); 
    365375 
  • admin/preferences.php

    r2566 r2567  
    305305     ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). 
    306306     dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     307     dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    307308     dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). 
    308309          '<script type="text/javascript">'."\n". 
  • inc/core/class.dc.blog.php

    r2566 r2567  
    18941894     - post_id: (integer) Get comments belonging to given post_id 
    18951895     - cat_id: (integer or array) Get comments belonging to entries of given category ID 
    1896      - comment_id: (integer) Get comment with given ID 
     1896     - comment_id: (integer or array) Get comment with given ID (or IDs) 
    18971897     - comment_site: (string) Get comments with given comment_site 
    18981898     - comment_status: (integer) Get comments with given comment_status 
     
    19841984 
    19851985          if (isset($params['comment_id']) && $params['comment_id'] !== '') { 
    1986                $strReq .= 'AND comment_id = '.(integer) $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']); 
    19871992          } 
    19881993 
  • inc/core/class.dc.core.php

    r2566 r2596  
    3939     public $rest;       ///< <b>dcRestServer</b> dcRestServer object 
    4040     public $log;        ///< <b>dcLog</b>             dcLog object 
     41     public $stime;      ///< <b>float</b>             starting time 
    4142 
    4243     private $versions = null; 
     
    5960     public function __construct($driver, $host, $db, $user, $password, $prefix, $persist) 
    6061     { 
     62          if (defined('DC_START_TIME')) { 
     63               $this->stime=DC_START_TIME; 
     64          } else { 
     65               $this->stime = microtime(true); 
     66          } 
     67 
    6168          $this->con = dbLayer::init($driver,$host,$db,$user,$password,$persist); 
    6269 
     
    982989     private function getBlogCursor($cur) 
    983990     { 
    984           if ($cur->blog_id !== null 
    985           && !preg_match('/^[A-Za-z0-9._-]{2,}$/',$cur->blog_id)) { 
     991          if (($cur->blog_id !== null 
     992               && !preg_match('/^[A-Za-z0-9._-]{2,}$/',$cur->blog_id)) || 
     993               (!$cur->blog_id)) { 
    986994               throw new Exception(__('Blog ID must contain at least 2 characters using letters, numbers or symbols.')); 
    987995          } 
    988996 
    989           if ($cur->blog_name !== null && $cur->blog_name == '') { 
     997          if (($cur->blog_name !== null && $cur->blog_name == '') || 
     998               (!$cur->blog_name)) { 
    990999               throw new Exception(__('No blog name')); 
    9911000          } 
    9921001 
    993           if ($cur->blog_url !== null && $cur->blog_url == '') { 
     1002          if (($cur->blog_url !== null && $cur->blog_url == '') || 
     1003               (!$cur->blog_url)) { 
    9941004               throw new Exception(__('No blog URL')); 
    9951005          } 
     
    13061316                    array('media_img_title_pattern','string','Title ;; Date(%b %Y) ;; separator(, )', 
    13071317                    'Pattern to set image title when you insert it in a post'), 
     1318                    array('nb_post_for_home','integer',20, 
     1319                    'Number of entries on first home page'), 
    13081320                    array('nb_post_per_page','integer',20, 
    1309                     'Number of entries on home page and category pages'), 
     1321                    'Number of entries on home pages and category pages'), 
    13101322                    array('nb_post_per_feed','integer',20, 
    13111323                    'Number of entries on feeds'), 
     
    14691481          } 
    14701482     } 
     1483 
     1484     /** 
     1485      Return elapsed time since script has been started 
     1486      @param   $mtime <b>float</b> timestamp (microtime format) to evaluate delta from 
     1487                                     current time is taken if null 
     1488      @return <b>float</b>        elapsed time 
     1489      */ 
     1490     public function getElapsedTime ($mtime=null) { 
     1491          if ($mtime !== null) { 
     1492               return $mtime-$this->stime; 
     1493          } else { 
     1494               return microtime(true)-$this->stime; 
     1495          } 
     1496     } 
    14711497     //@} 
     1498 
     1499 
     1500 
    14721501} 
  • inc/core/class.dc.namespace.php

    r2566 r2567  
    125125 
    126126     /** 
     127     Returns global setting value if exists. 
     128 
     129     @param    n         <b>string</b>       setting name 
     130     @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 name 
     145     @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     /** 
    127157     Magic __get method. 
    128158     @copydoc ::get 
  • inc/core/class.dc.themes.php

    r2566 r2607  
    5959          # Themes specifics properties 
    6060          $properties = array_merge( 
    61                array('parent' => null), 
     61               array('parent' => null, 'tplset' => DC_DEFAULT_TPLSET), 
    6262               $properties, 
    6363               array('permissions' => 'admin') // force themes perms 
  • inc/prepend.php

    r2591 r2610  
    1010# 
    1111# -- END LICENSE BLOCK ----------------------------------------- 
     12 
     13/* Start tick  */ 
     14define('DC_START_TIME',microtime(true)); 
    1215 
    1316/* ------------------------------------------------------------------------------------------- */ 
     
    135138# Constants 
    136139define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 
    137 define('DC_VERSION','2.6.2'); 
     140define('DC_VERSION','2.7-dev'); 
    138141define('DC_DIGESTS',dirname(__FILE__).'/digests'); 
    139142define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); 
     
    141144define('DC_DISTRIB_PLUGINS','aboutConfig,akismet,antispam,attachments,blogroll,blowupConfig,dclegacy,fairTrackbacks,importExport,maintenance,pages,pings,simpleMenu,tags,themeEditor,userPref,widgets'); 
    142145define('DC_DISTRIB_THEMES','blueSilence,blowupConfig,customCSS,default,ductile'); 
     146define('DC_DEFAULT_TPLSET','mustek'); 
    143147 
    144148if (!defined('DC_VENDOR_NAME')) { 
  • inc/public/class.dc.template.php

    r2590 r2610  
    235235     } 
    236236 
    237      protected function compileFile($file) 
    238      { 
    239           $fc = file_get_contents($file); 
    240  
    241           $this->compile_stack[] = $file; 
    242  
    243           # Remove every PHP tags 
    244           if ($this->remove_php) 
    245           { 
    246                $fc = preg_replace('/<\?(?=php|=|\s).*?\?>/ms','',$fc); 
    247           } 
    248  
    249           # Transform what could be considered as PHP short tags 
    250           $fc = preg_replace('/(<\?(?!php|=|\s))(.*?)(\?>)/ms', 
    251           '<?php echo "$1"; ?>$2<?php echo "$3"; ?>',$fc); 
    252  
    253           # Remove template comments <!-- #... --> 
    254           $fc = preg_replace('/(^\s*)?<!-- #(.*?)-->/ms','',$fc); 
    255  
    256           # Lexer part : split file into small pieces 
    257           # each array entry will be either a tag or plain text 
    258           $blocks = preg_split( 
    259                '#(<tpl:\w+[^>]*>)|(</tpl:\w+>)|({{tpl:\w+[^}]*}})#msu',$fc,-1, 
    260                PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); 
    261  
    262           # Next : build semantic tree from tokens. 
    263           $rootNode = new tplNode(); 
    264           $node = $rootNode; 
    265           $errors = array(); 
    266           foreach ($blocks as $id => $block) { 
    267                $isblock = preg_match('#<tpl:(\w+)(?:(\s+.*?)>|>)|</tpl:(\w+)>|{{tpl:(\w+)(\s(.*?))?}}#ms',$block,$match); 
    268                if ($isblock == 1) { 
    269                     if (substr($match[0],1,1) == '/') { 
    270                          // Closing tag, check if it matches current opened node 
    271                          $tag = $match[3]; 
    272                          if (($node instanceof tplNodeBlock) && $node->getTag() == $tag) { 
    273                               $node->setClosing(); 
    274                               $node = $node->getParent(); 
    275                          } else { 
    276                               // Closing tag does not match opening tag 
    277                               // Search if it closes a parent tag 
    278                               $search = $node; 
    279                               while($search->getTag() != 'ROOT' && $search->getTag() != $tag) { 
    280                                    $search = $search->getParent(); 
    281                               } 
    282                               if ($search->getTag() == $tag) { 
    283                                    $errors[] = sprintf( 
    284                                         __('Did not find closing tag for block <tpl:%s>. Content has been ignored.'), 
    285                                         html::escapeHTML($node->getTag())); 
    286                                    $search->setClosing(); 
    287                                    $node = $search->getParent(); 
    288                               } else { 
    289                                    $errors[]=sprintf( 
    290                                         __('Unexpected closing tag </tpl:%s> found.'), 
    291                                         $tag);; 
    292                               } 
    293                          } 
    294                     } elseif (substr($match[0],0,1) == '{') { 
    295                          // Value tag 
    296                          $tag = $match[4]; 
    297                          $str_attr = ''; 
    298                          $attr = array(); 
    299                          if (isset($match[6])) { 
    300                               $str_attr = $match[6]; 
    301                               $attr = $this->getAttrs($match[6]); 
    302                          } 
    303                          $node->addChild(new tplNodeValue($tag,$attr,$str_attr)); 
    304                     } else { 
    305                          // Opening tag, create new node and dive into it 
    306                          $tag = $match[1]; 
    307                          $newnode = new tplNodeBlock($tag,isset($match[2])?$this->getAttrs($match[2]):array()); 
    308                          $node->addChild($newnode); 
    309                          $node = $newnode; 
    310                     } 
    311                } else { 
    312                     // Simple text 
    313                     $node->addChild(new tplNodeText($block)); 
    314                } 
    315           } 
    316  
    317           if (($node instanceof tplNodeBlock) && !$node->isClosed()) { 
    318                $errors[] = sprintf( 
    319                     __('Did not find closing tag for block <tpl:%s>. Content has been ignored.'), 
    320                     html::escapeHTML($node->getTag())); 
    321           } 
    322  
    323           $err = ""; 
    324           if (count($errors) > 0) { 
    325                $err = "\n\n<!-- \n". 
    326                     __('WARNING: the following errors have been found while parsing template file :'). 
    327                     "\n * ". 
    328                     join("\n * ",$errors). 
    329                     "\n -->\n"; 
    330           } 
    331  
    332           return $rootNode->compile($this).$err; 
    333      } 
    334  
    335237     public function compileBlockNode($tag,$attr,$content) 
    336238     { 
     
    343245          $this->core->callBehavior('templateInsideBlock',$this->core,$this->current_tag,$attr,array(&$content)); 
    344246 
    345           if (isset($this->blocks[$this->current_tag])) { 
    346                $res .= call_user_func($this->blocks[$this->current_tag],$attr,$content); 
    347           } elseif ($this->unknown_block_handler != null) { 
    348                $res .= call_user_func($this->unknown_block_handler,$this->current_tag,$attr,$content); 
    349           } 
     247          $res .= parent::compileBlockNode($this->current_tag,$attr,$content); 
    350248 
    351249          # --BEHAVIOR-- templateAfterBlock 
     
    363261          $res = $this->core->callBehavior('templateBeforeValue',$this->core,$this->current_tag,$attr); 
    364262 
    365           if (isset($this->values[$this->current_tag])) { 
    366                $res .= call_user_func($this->values[$this->current_tag],$attr,ltrim($str_attr)); 
    367           } elseif ($this->unknown_value_handler != null) { 
    368                $res .= call_user_func($this->unknown_value_handler,$this->current_tag,$attr,$str_attr); 
    369           } 
     263          $res .= parent::compileValueNode($this->current_tag,$attr,$str_attr); 
    370264 
    371265          # --BEHAVIOR-- templateAfterValue 
     
    373267 
    374268          return $res; 
    375      } 
    376  
    377      public function setUnknownValueHandler($callback) 
    378      { 
    379           if (is_callable($callback)) { 
    380                $this->unknown_value_handler = $callback; 
    381           } 
    382      } 
    383  
    384      public function setUnknownBlockHandler($callback) 
    385      { 
    386           if (is_callable($callback)) { 
    387                $this->unknown_block_handler = $callback; 
    388           } 
    389269     } 
    390270 
     
    11731053 
    11741054          if ($lastn != 0) { 
     1055               // Set limit (aka nb of entries needed) 
    11751056               if ($lastn > 0) { 
     1057                    // nb of entries per page specified in template -> regular pagination 
    11761058                    $p .= "\$params['limit'] = ".$lastn.";\n"; 
    11771059               } else { 
    1178                     $p .= "\$params['limit'] = \$_ctx->nb_entry_per_page;\n"; 
     1060                    // nb of entries per page not specified -> use ctx settings 
     1061                    $p .= "\$params['limit'] = (\$_page_number == 1 ? \$_ctx->nb_entry_first_page : \$_ctx->nb_entry_per_page);\n"; 
    11791062               } 
    1180  
     1063               // Set offset (aka index of first entry) 
    11811064               if (!isset($attr['ignore_pagination']) || $attr['ignore_pagination'] == "0") { 
    1182                     $p .= "\$params['limit'] = array(((\$_page_number-1)*\$params['limit']),\$params['limit']);\n"; 
     1065                    // standard pagination, set offset 
     1066                    $p .= "\$params['limit'] = array((\$_page_number == 1 ? 0 : (\$_page_number - 2) * \$_ctx->nb_entry_per_page + \$_ctx->nb_entry_first_page),\$params['limit']);\n"; 
    11831067               } else { 
     1068                    // no pagination, get all posts from 0 to limit 
    11841069                    $p .= "\$params['limit'] = array(0, \$params['limit']);\n"; 
    11851070               } 
  • inc/public/lib.tpl.context.php

    r2566 r2577  
    206206 
    207207          $nb_posts = $_ctx->pagination->f(0); 
    208           $nb_per_page = $_ctx->post_params['limit'][1]; 
    209  
    210           $nb_pages = ceil($nb_posts/$nb_per_page); 
     208          $nb_pages = ceil(($nb_posts - $_ctx->nb_entry_first_page) / $_ctx->nb_entry_per_page + 1); 
    211209 
    212210          return $nb_pages; 
  • inc/public/lib.urlhandlers.php

    r2566 r2585  
    8686               $_ctx->nb_entry_per_page = $core->blog->settings->system->nb_post_per_page; 
    8787          } 
     88          if ($_ctx->nb_entry_first_page === null) { 
     89               $_ctx->nb_entry_first_page = $_ctx->nb_entry_per_page; 
     90          } 
    8891 
    8992          $tpl_file = $core->tpl->getFilePath($tpl); 
     
    188191          else 
    189192          { 
     193               $_ctx =& $GLOBALS['_ctx']; 
    190194               $core =& $GLOBALS['core']; 
    191195 
     
    196200 
    197201               if (empty($_GET['q'])) { 
     202                    if ($core->blog->settings->system->nb_post_for_home !== null) { 
     203                         $_ctx->nb_entry_first_page = $core->blog->settings->system->nb_post_for_home; 
     204                    } 
    198205                    self::serveDocument('home.html'); 
    199206                    $core->blog->publishScheduledEntries(); 
     
    411418                         if ($content != '') 
    412419                         { 
    413                               if ($core->blog->settings->system->wiki_comments) { 
    414                                    $core->initWikiComment(); 
     420                              # --BEHAVIOR-- publicBeforeCommentTransform 
     421                              $buffer = $core->callBehavior('publicBeforeCommentTransform',$content); 
     422                              if ($buffer != '') { 
     423                                   $content = $buffer; 
    415424                              } else { 
    416                                    $core->initWikiSimpleComment(); 
     425                                   if ($core->blog->settings->system->wiki_comments) { 
     426                                        $core->initWikiComment(); 
     427                                   } else { 
     428                                        $core->initWikiSimpleComment(); 
     429                                   } 
     430                                   $content = $core->wikiTransform($content); 
    417431                              } 
    418                               $content = $core->wikiTransform($content); 
    419432                              $content = $core->HTMLfilter($content); 
    420433                         } 
  • inc/public/prepend.php

    r2566 r2567  
    134134     $__theme_tpl_path[] = $core->blog->themes_path.'/'.$__parent_theme.'/tpl'; 
    135135} 
    136  
    137 $core->tpl->setPath( 
    138      $__theme_tpl_path, 
    139      dirname(__FILE__).'/default-templates', 
    140      $core->tpl->getPath()); 
    141  
     136$tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 
     137if (!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} 
    142147$core->url->mode = $core->blog->settings->system->url_scan; 
    143148 
  • locales/fr/main.po

    r2512 r2577  
    399399 
    400400#, php-format 
     401msgid "Display %s entries on home page" 
     402msgstr "Afficher %s billets sur la page d'accueil" 
     403 
     404#, php-format 
    401405msgid "Display %s entries per page" 
    402406msgstr "Afficher %s billets par page" 
  • plugins/antispam/filters/class.dc.filter.linkslookup.php

    r2566 r2567  
    4848 
    4949               $i = count($domain_elem) - 1; 
     50               if ($i == 0) { 
     51                    // "domain" is 1 word long, don't check it 
     52                    return null; 
     53               } 
    5054               $host = $domain_elem[$i]; 
    5155               do 
  • plugins/antispam/index.php

    r2566 r2567  
    117117     echo 
    118118          dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     119          dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    119120          dcPage::jsLoad('index.php?pf=antispam/antispam.js'); 
    120121  } 
  • plugins/blogroll/index.php

    r2566 r2567  
    177177     echo 
    178178          dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     179          dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    179180          dcPage::jsLoad('index.php?pf=blogroll/blogroll.js'); 
    180181     } 
  • plugins/pages/_public.php

    r2566 r2607  
    112112                         if ($content != '') 
    113113                         { 
    114                               if ($core->blog->settings->system->wiki_comments) { 
    115                                    $core->initWikiComment(); 
     114                              # --BEHAVIOR-- publicBeforeCommentTransform 
     115                              $buffer = $core->callBehavior('publicBeforeCommentTransform',$content); 
     116                              if ($buffer != '') { 
     117                                   $content = $buffer; 
    116118                              } else { 
    117                                    $core->initWikiSimpleComment(); 
     119                                   if ($core->blog->settings->system->wiki_comments) { 
     120                                        $core->initWikiComment(); 
     121                                   } else { 
     122                                        $core->initWikiSimpleComment(); 
     123                                   } 
     124                                   $content = $core->wikiTransform($content); 
    118125                              } 
    119                               $content = $core->wikiTransform($content); 
    120126                              $content = $core->HTMLfilter($content); 
    121127                         } 
     
    184190                         header('X-Pingback: '.$core->blog->url.$core->url->getURLFor("xmlrpc",$core->blog->id)); 
    185191                    } 
    186                     $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); 
     192 
     193                    $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 
     194                    if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) { 
     195                         $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.$tplset); 
     196                    } else { 
     197                         $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.DC_DEFAULT_TPLSET); 
     198                    } 
    187199                    self::serveDocument('page.html'); 
    188200               } 
  • plugins/pages/list.php

    r2566 r2567  
    5555  <title><?php echo __('Pages'); ?></title> 
    5656  <?php 
    57      echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     57     echo 
     58          dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     59          dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    5860          dcPage::jsLoad('index.php?pf=pages/list.js'). 
    5961          '<script type="text/javascript">'. 
  • plugins/simpleMenu/_public.php

    r2576 r2605  
    127127               // Final rendering 
    128128               if ($ret) { 
    129                     $ret = '<ul '.($id ? 'id="'.$id.'"' : '').' class="simple-menu'.($class ? ' '.$class : '').'">'."\n".$ret."\n".'</ul>'; 
     129                    $ret = '<ul '.($id ? 'id="'.$id.'"' : '').' class="simple-menu'.($class ? ' '.$class : '').'" role="navigation">'."\n".$ret."\n".'</ul>'; 
    130130               } 
    131131          } 
  • plugins/simpleMenu/index.php

    r2576 r2588  
    347347               echo 
    348348                    dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     349                    dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    349350                    dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 
    350351          } 
  • plugins/tags/_public.php

    r2566 r2607  
    8282     public static function addTplPath($core) 
    8383     { 
    84           $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); 
     84          $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 
     85          if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) { 
     86               $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.$tplset); 
     87          } else { 
     88               $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.DC_DEFAULT_TPLSET); 
     89          } 
    8590     } 
    8691 
  • plugins/themeEditor/class.themeEditor.php

    r2566 r2607  
    1616     protected $core; 
    1717 
    18      protected $default_theme; 
    1918     protected $user_theme; 
    2019     protected $parent_theme; 
    21  
    22      protected $default_tpl = array(); 
     20     protected $tplset_theme; 
     21 
    2322     public $tpl = array(); 
    2423     public $css = array(); 
     
    3130          $this->default_theme = path::real($this->core->blog->themes_path.'/default'); 
    3231          $this->user_theme = path::real($this->core->blog->themes_path.'/'.$this->core->blog->settings->system->theme); 
     32          $this->tplset_theme = DC_ROOT.'/inc/public/default-templates/'.DC_DEFAULT_TPLSET; 
    3333          if (null !== $this->core->themes) { 
    3434               $parent_theme = $this->core->themes->moduleInfo($this->core->blog->settings->system->theme,'parent'); 
    3535               if ($parent_theme) { 
    3636                    $this->parent_theme = path::real($this->core->blog->themes_path.'/'.$parent_theme); 
     37               } 
     38               $tplset = $this->core->themes->moduleInfo($this->core->blog->settings->system->theme,'tplset'); 
     39               if ($tplset) { 
     40                    $this->tplset_theme = DC_ROOT.'/inc/public/default-templates/'.$tplset; 
    3741               } 
    3842          } 
     
    207211     protected function findTemplates() 
    208212     { 
    209           # First, we look in template paths 
    210           $this->default_tpl = $this->getFilesInDir($this->default_theme.'/tpl'); 
    211  
    212213          $this->tpl = array_merge( 
    213                $this->default_tpl, 
     214               $this->getFilesInDir($this->tplset_theme), 
    214215               $this->getFilesInDir($this->parent_theme.'/tpl'), 
    215216               $this->getFilesInDir($this->user_theme.'/tpl') 
    216217               ); 
    217           $this->tpl = array_merge($this->getFilesInDir(DC_ROOT.'/inc/public/default-templates'),$this->tpl); 
    218218 
    219219          # Then we look in 'default-templates' plugins directory 
  • plugins/widgets/_widgets_functions.php

    r2565 r2605  
    2929          ($w->content_only ? '' : '<div id="search"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>'). 
    3030          ($w->title ? '<h2><label for="q">'.html::escapeHTML($w->title).'</label></h2>' : ''). 
    31           '<form action="'.$core->blog->url.'" method="get">'. 
     31          '<form action="'.$core->blog->url.'" method="get" role="search">'. 
    3232          '<fieldset>'. 
    3333          '<p><input type="text" size="10" maxlength="255" id="q" name="q" value="'.$value.'" /> '. 
     
    5050          ($w->content_only ? '' : '<div id="topnav"'.($w->class ? ' class="'.html::escapeHTML($w->class).'"' : '').'>'). 
    5151          ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 
    52           '<ul>'; 
     52          '<ul role="navigation">'; 
    5353 
    5454          if ($core->url->type != 'default') { 
  • plugins/widgets/index.php

    r2509 r2520  
    218218          echo 
    219219               dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     220               dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 
    220221               dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 
    221222  ?> 
     
    366367          $altUp = $i == 0 ? ' alt=""' : ' alt="'.__('Up the widget').'"'; 
    367368          $altDown = $i == count($widgets->elements())-1 ? ' alt=""' : ' alt="'.__('Down the widget').'"'; 
    368  
     369           
    369370          $iname = 'w['.$pr.']['.$i.']'; 
    370371 
  • themes/ductile/_config.php

    r2566 r2581  
    273273$ductile_counts_base = array( 
    274274     'default' => null, 
     275     'default-page' => null, 
    275276     'category' => null, 
    276277     'tag' => null, 
     
    290291     $ductile_lists = $ductile_lists_base; 
    291292} 
     293$ductile_lists = array_merge($ductile_lists_base,$ductile_lists); 
    292294 
    293295$ductile_counts = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_entries_counts'); 
     
    296298     $ductile_counts = $ductile_counts_base; 
    297299} 
     300$ductile_counts = array_merge($ductile_counts_base,$ductile_counts); 
    298301 
    299302$ductile_stickers = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_stickers'); 
  • themes/ductile/_define.php

    r2566 r2581  
    1515     /* Description*/         "Mediaqueries compliant elegant theme", 
    1616     /* Author */             "Dotclear Team", 
    17      /* Version */            '1.3.1', 
     17     /* Version */            '1.4', 
    1818     /* Properties */         array( 
    1919                                        'standalone_config' => true, 
  • themes/ductile/_prepend.php

    r2566 r2567  
    2626          if (!$core->auth->user_prefs->accessibility->nodragdrop) { 
    2727               echo 
    28                     dcPage::jsLoad('js/jquery/jquery-ui.custom.js'); 
     28                    dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     29                    dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'); 
    2930                    echo <<<EOT 
    3031<script type="text/javascript"> 
  • themes/ductile/_public.php

    r2566 r2581  
    3636          global $_ctx; 
    3737 
    38           $nb = 0; 
     38          $nb_other = $nb_first = 0; 
     39 
    3940          $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_entries_counts'); 
    4041          if ($s !== null) { 
    4142               $s = @unserialize($s); 
    4243               if (is_array($s)) { 
    43                     if (isset($s[$GLOBALS['core']->url->type])) { 
    44                          // Nb de billets par page défini par la config du thème 
    45                          $nb = (integer) $s[$GLOBALS['core']->url->type]; 
    46                     } else { 
    47                          if (($GLOBALS['core']->url->type == 'default-page') && (isset($s['default']))) { 
    48                               // Les pages 2 et suivantes de la home ont le même nombre de billet que la première page 
    49                               $nb = (integer) $s['default']; 
    50                          } 
    51                     } 
    52                } 
    53           } 
    54  
    55           if ($nb == 0) { 
     44                    switch ($GLOBALS['core']->url->type) { 
     45                         case 'default': 
     46                         case 'default-page': 
     47                              if (isset($s['default'])) { 
     48                                   $nb_first = $nb_other = (integer) $s['default']; 
     49                              } 
     50                              if (isset($s['default-page'])) { 
     51                                   $nb_other = (integer) $s['default-page']; 
     52                              } 
     53                              break; 
     54                         default: 
     55                              if (isset($s[$GLOBALS['core']->url->type])) { 
     56                                   // Nb de billets par page défini par la config du thème 
     57                                   $nb_first = $nb_other = (integer) $s[$GLOBALS['core']->url->type]; 
     58                              } 
     59                              break; 
     60                    } 
     61               } 
     62          } 
     63 
     64          if ($nb_other == 0) { 
    5665               if (!empty($attr['nb'])) { 
    5766                    // Nb de billets par page défini par défaut dans le template 
    58                     $nb = (integer) $attr['nb']; 
    59                } 
    60           } 
    61  
    62           if ($nb > 0) 
    63                $_ctx->nb_entry_per_page = $nb; 
     67                    $nb_other = $nb_first = (integer) $attr['nb']; 
     68               } 
     69          } 
     70 
     71          if ($nb_other > 0) { 
     72               $_ctx->nb_entry_per_page = $nb_other; 
     73          } 
     74          if ($nb_first > 0) { 
     75               $_ctx->nb_entry_first_page = $nb_first; 
     76          } 
    6477     } 
    6578 
Note: See TracChangeset for help on using the changeset viewer.

Sites map