Changes in [1472:994f097572a6:1473:be1c768e98cc]
- Files:
-
- 3 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r1216 r1350 1 Dotclear 2.5.2 - 2013-08-14 2 =========================================================== 3 * Security fix: Fixed potential XSS 4 * Bugfix: l10n Clearbricks library 5 * <tpl:LoopPosition> now works <tpl:Attachments> 6 * Dotclear update check may now be forced (ignoring cache) 7 * Enforce integration of daInstaller plugin 8 * Tags link button is now available on page editor 9 * Default cache age is now 1 week instead of 2 hours 10 * Quick entry dashboard module is not activated by default on new installation 11 * New template {{tpl:BlogParentThemeURL}} (return URL of parent theme of blog's theme if any, URL of blog's theme otherwise) 12 * Fix post comments number on comments deletion 13 * Fix order of backup files 14 * Minor enhancements 15 * Various bug fixes 16 * Various cosmetic adjustments 17 1 18 Dotclear 2.5.1 - 2013-07-20 2 19 =========================================================== -
Makefile
r1046 r1451 69 69 find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \; 70 70 find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \; 71 find $(DC)/admin/js/jsUpload/*.js -exec ./build-tools/min-js.php \{\} \; 71 72 find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \; 72 73 find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \; -
admin/categories.php
r1399 r1468 31 31 $mov_cat = $mov_cat ? $mov_cat : null; 32 32 if ($mov_cat !== null) { 33 $c = $core->blog->getCategory((integer) $_POST[' del_cat']);33 $c = $core->blog->getCategory((integer) $_POST['mov_cat']); 34 34 if ($c->isEmpty()) { 35 35 throw new Exception(__('This category does not exist.')); … … 144 144 echo '</div>'; 145 145 146 $categories_combo = array(); 147 if (!$rs->isEmpty()) 148 { 149 while ($rs->fetch()) { 150 $catparents_combo[] = $categories_combo[] = new formSelectOption( 151 str_repeat(' ',$rs->level-1).($rs->level-1 == 0 ? '' : '• ').html::escapeHTML($rs->cat_title), 152 $rs->cat_id 153 ); 154 } 155 } 156 146 157 echo '<div class="col">'. 147 158 … … 149 160 '<h3>'.__('Add a new category').'</h3>'. 150 161 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 151 form::field('cat_title',30,255 ).'</p>'.162 form::field('cat_title',30,255,'','maximal').'</p>'. 152 163 '<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 153 '<select id="new_cat_parent" name="new_cat_parent">'. 154 '<option value="0">'.__('Top level').'</option>'; 155 while ($rs->fetch()) { 156 echo '<option value="'.$rs->cat_id.'">'. 157 str_repeat(' ',$rs->level-1).($rs->level-1 == 0 ? '' : '• '). 158 html::escapeHTML($rs->cat_title).'</option>'; 159 } 160 echo 161 '</select></p>'. 164 form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 165 '</p>'. 162 166 '<p><input type="submit" value="'.__('Create').'" />'. 163 167 $core->formNonce().'</p>'. 168 164 169 '</form>'; 165 170 166 171 if (!$rs->isEmpty()) 167 172 { 168 $cats = array();169 $dest = array(' ' => '');170 $l = $rs->level;171 $full_name = array($rs->cat_title);172 while ($rs->fetch())173 {174 if ($rs->level < $l) {175 $full_name = array();176 } elseif ($rs->level == $l) {177 array_pop($full_name);178 }179 $full_name[] = html::escapeHTML($rs->cat_title);180 181 $cats[implode(' / ',$full_name)] = $rs->cat_id;182 $dest[implode(' / ',$full_name)] = $rs->cat_id;183 184 $l = $rs->level;185 }186 187 173 echo 188 '<form action="categories.php" method="post" id="delete-category" class="border-top">'.174 '<form action="categories.php" method="post" id="delete-category">'. 189 175 '<h3>'.__('Remove a category').'</h3>'. 190 176 '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 191 form::combo('del_cat',$cat s).'</p> '.177 form::combo('del_cat',$categories_combo,'','maximal').'</p> '. 192 178 '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '. 193 form::combo('mov_cat', $dest).'</p> '.179 form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '. 194 180 '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 195 181 $core->formNonce().'</p>'. 182 196 183 '</form>'; 197 184 -
admin/index.php
r1422 r1468 59 59 if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) { 60 60 if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) { 61 $core->auth->user_prefs->dashboard->put('quickentry', true,'boolean','',null,true);62 } 63 $core->auth->user_prefs->dashboard->put('quickentry', true,'boolean');61 $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true); 62 } 63 $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); 64 64 } 65 65 … … 309 309 if ($core->auth->check('usage,contentadmin',$core->blog->id)) 310 310 { 311 $categories_combo = array(' ' => ''); 311 # Getting categories 312 $categories_combo = array(__('(No cat)') => ''); 312 313 try { 313 314 $categories = $core->blog->getCategories(array('post_type'=>'post')); 314 while ($categories->fetch()) { 315 $categories_combo[] = new formSelectOption( 316 str_repeat(' ',$categories->level-1). 317 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 318 $categories->cat_id 319 ); 315 if (!$categories->isEmpty()) { 316 while ($categories->fetch()) { 317 $catparents_combo[] = $categories_combo[] = new formSelectOption( 318 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 319 $categories->cat_id 320 ); 321 } 320 322 } 321 323 } catch (Exception $e) { } … … 333 335 form::textarea('post_content',50,7). 334 336 '</p>'. 335 '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 336 form::combo('cat_id',$categories_combo).'</p>'. 337 '<p><label for="cat_id" class="classic">'.__('Category:').' '. 338 form::combo('cat_id',$categories_combo).'</label></p>'. 339 ($core->auth->check('categories', $core->blog->id) 340 ? '<div>'. 341 '<p id="new_cat">'.__('Add a new category').'</p>'. 342 '<p><label for="new_cat_title">'.__('Title:').' '. 343 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 344 '<p><label for="new_cat_parent">'.__('Parent:').' '. 345 form::combo('new_cat_parent',$categories_combo,'','maximal'). 346 '</label></p>'. 347 '</div>' 348 : ''). 337 349 '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 338 350 ($core->auth->check('publish',$core->blog->id) -
admin/js/_index.js
r1140 r1418 61 61 }); 62 62 } 63 $('#new_cat').toggleWithLegend( 64 $('#new_cat').parent().children().not('#new_cat'), 65 {} // no cookie on new category as we don't use this every day 66 ); 63 67 } 64 68 -
admin/js/_post.js
r1392 r1468 115 115 hide: $('#post_notes').val() == '' 116 116 }); 117 $('#new_cat').toggleWithLegend( 118 $('#new_cat').parent().children().not('#new_cat'), 119 {} // no cookie on new category as we don't use this every day 120 ); 117 121 $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 118 122 cookie: 'dcx_post_lang' -
admin/js/_posts_actions.js
r1035 r1419 6 6 matchContains: true 7 7 }); 8 $('#new_cat').toggleWithLegend( 9 $('#new_cat').parent().children().not('#new_cat'), 10 {} // no cookie on new category as we don't use this every day 11 ); 8 12 }); -
admin/js/_users_actions.js
r935 r1449 1 1 jQuery.fn.updatePermissionsForm = function() { 2 2 return this.each(function() { 3 3 4 var perms = {}; 4 5 var re = /^perm\[(.+?)\]\[(.+?)\]$/; … … 12 13 continue; 13 14 } 15 var prop; 14 16 prop = e.name.match(re); 15 17 if (!prop) { … … 20 22 } 21 23 perms[prop[1]][prop[2]] = e; 24 25 // select related permissions for admin 26 if (prop[2] == 'admin') { 27 if (e.checked) { 28 admin(e,perms,re); 29 } 30 $(e).click(function(){ 31 admin(this,perms,re); 32 }); 33 // select related permissions for content admin 34 } else if (prop[2] == 'contentadmin') { 35 if (e.checked) { 36 contentadmin(e,perms,re); 37 } 38 $(e).click(function(){ 39 contentadmin(this,perms,re); 40 }); 41 // select related permissions for media admin 42 } else if (prop[2] == 'media_admin') { 43 if (e.checked) { 44 mediaadmin(e,perms,re); 45 } 46 $(e).click(function(){ 47 mediaadmin(this,perms,re); 48 }); 49 } 22 50 } 23 51 24 // Update elements status 25 var E; 26 for (blog in perms) { 27 for (perm in perms[blog]) { 28 E = perms[blog][perm]; 29 E.onclick = function() {}; 30 31 if (perm == 'admin' && !E.disabled) { 32 perms[blog]['usage'].disabled = E.checked; 33 perms[blog]['publish'].disabled = E.checked; 34 perms[blog]['delete'].disabled = E.checked; 35 perms[blog]['contentadmin'].disabled = E.checked; 36 perms[blog]['categories'].disabled = E.checked; 37 perms[blog]['media'].disabled = E.checked; 38 perms[blog]['media_admin'].disabled = E.checked; 39 E.onclick = function() { $(this.form).updatePermissionsForm(); }; 40 } else if (perm == 'contentadmin' && !E.disabled) { 41 perms[blog]['usage'].checked = E.checked; 42 perms[blog]['publish'].checked = E.checked; 43 perms[blog]['delete'].checked = E.checked; 44 perms[blog]['usage'].disabled = E.checked; 45 perms[blog]['publish'].disabled = E.checked; 46 perms[blog]['delete'].disabled = E.checked; 47 E.onclick = function() { $(this.form).updatePermissionsForm(); }; 48 } else if (perm == 'media_admin' && !E.disabled) { 49 perms[blog]['media'].checked = E.checked; 50 perms[blog]['media'].disabled = E.checked; 51 E.onclick = function() { $(this.form).updatePermissionsForm(); }; 52 } 53 } 52 function admin(E,perms,re) { 53 P = E.name.match(re); 54 55 perms[P[1]]['usage'].checked = E.checked; 56 perms[P[1]]['publish'].checked = E.checked; 57 perms[P[1]]['delete'].checked = E.checked; 58 perms[P[1]]['contentadmin'].checked = E.checked; 59 perms[P[1]]['categories'].checked = E.checked; 60 perms[P[1]]['media'].checked = E.checked; 61 perms[P[1]]['media_admin'].checked = E.checked; 62 perms[P[1]]['usage'].disabled = E.checked; 63 perms[P[1]]['publish'].disabled = E.checked; 64 perms[P[1]]['delete'].disabled = E.checked; 65 perms[P[1]]['contentadmin'].disabled = E.checked; 66 perms[P[1]]['categories'].disabled = E.checked; 67 perms[P[1]]['media'].disabled = E.checked; 68 perms[P[1]]['media_admin'].disabled = E.checked; 54 69 } 70 71 function contentadmin(E,perms,re) { 72 P = E.name.match(re); 73 74 perms[P[1]]['usage'].checked = E.checked; 75 perms[P[1]]['publish'].checked = E.checked; 76 perms[P[1]]['delete'].checked = E.checked; 77 perms[P[1]]['usage'].disabled = E.checked; 78 perms[P[1]]['publish'].disabled = E.checked; 79 perms[P[1]]['delete'].disabled = E.checked; 80 } 81 82 function mediaadmin(E,perms,re) { 83 P = E.name.match(re); 84 85 perms[P[1]]['media'].checked = E.checked; 86 perms[P[1]]['media'].disabled = E.checked; 87 } 88 89 55 90 }); 56 91 }; -
admin/post.php
r1460 r1468 218 218 if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) 219 219 { 220 # Create category 221 if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 222 223 $cur_cat = $core->con->openCursor($core->prefix.'category'); 224 $cur_cat->cat_title = $_POST['new_cat_title']; 225 $cur_cat->cat_url = ''; 226 227 $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 228 229 # --BEHAVIOR-- adminBeforeCategoryCreate 230 $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 231 232 $cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 233 234 # --BEHAVIOR-- adminAfterCategoryCreate 235 $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id); 236 } 237 220 238 $cur = $core->con->openCursor($core->prefix.'post'); 221 239 … … 283 301 } 284 302 } 303 304 # Getting categories 305 $categories_combo = array(__('(No cat)') => ''); 306 try { 307 $categories = $core->blog->getCategories(array('post_type'=>'post')); 308 if (!$categories->isEmpty()) { 309 while ($categories->fetch()) { 310 $catparents_combo[] = $categories_combo[] = new formSelectOption( 311 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 312 $categories->cat_id 313 ); 314 } 315 } 316 } catch (Exception $e) { } 285 317 286 318 /* DISPLAY … … 423 455 '<p><label for="cat_id" class="ib">'.__('Category').'</label>'. 424 456 form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 425 '</p>')), 457 '</p>'. 458 ($core->auth->check('categories', $core->blog->id) ? 459 '<div>'. 460 '<p id="new_cat">'.__('Add a new category').'</p>'. 461 '<p><label for="new_cat_title">'.__('Title:').' '. 462 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 463 '<p><label for="new_cat_parent">'.__('Parent:').' '. 464 form::combo('new_cat_parent',$categories_combo,'','maximal'). 465 '</label></p>'. 466 '</div>' 467 : ''))), 426 468 'options-box' => array( 427 469 'title' => __('Options'), -
admin/posts_actions.php
r1472 r1473 243 243 elseif ($action == 'category' && isset($_POST['new_cat_id'])) 244 244 { 245 $new_cat_id = $_POST['new_cat_id']; 246 245 247 try 246 248 { 247 $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 249 if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 250 { 251 $cur_cat = $core->con->openCursor($core->prefix.'category'); 252 $cur_cat->cat_title = $_POST['new_cat_title']; 253 $cur_cat->cat_url = ''; 254 255 $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 256 257 # --BEHAVIOR-- adminBeforeCategoryCreate 258 $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 259 260 $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 261 262 # --BEHAVIOR-- adminAfterCategoryCreate 263 $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 264 } 265 266 $core->blog->updPostsCategory($posts_ids, $new_cat_id); 248 267 249 268 http::redirect($redir); … … 387 406 # categories list 388 407 # Getting categories 389 $categories_combo = array( ' '=> '');408 $categories_combo = array(__('(No cat)') => ''); 390 409 try { 391 410 $categories = $core->blog->getCategories(array('post_type'=>'post')); 411 if (!$categories->isEmpty()) { 392 412 while ($categories->fetch()) { 393 $categories_combo[] = new formSelectOption( 394 str_repeat(' ',$categories->level-1). 395 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 413 $catparents_combo[] = $categories_combo[] = new formSelectOption( 414 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 396 415 $categories->cat_id 397 416 ); 417 } 398 418 } 399 419 } catch (Exception $e) { } … … 402 422 '<form action="posts_actions.php" method="post">'. 403 423 $fields->getEntries(). 404 '<p><label for="new_cat_id" class="classic">'.__('Category:').' '. 405 form::combo('new_cat_id',$categories_combo,''). 406 '</label> '; 424 '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 425 form::combo('new_cat_id',$categories_combo,''); 426 427 if ($core->auth->check('categories', $core->blog->id)) { 428 echo 429 '<div>'. 430 '<p id="new_cat">'.__('Add a new category').'</p>'. 431 '<p><label for="new_cat_title">'.__('Title:').' '. 432 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 433 '<p><label for="new_cat_parent">'.__('Parent:').' '. 434 form::combo('new_cat_parent',$categories_combo,'','maximal'). 435 '</label></p>'. 436 '</div>'; 437 } 407 438 408 439 echo … … 440 471 echo 441 472 '<form action="posts_actions.php" method="post">'. 442 $fields->getEntries(). 443 '<p><label for="new_lang" class="classic">'.__('Entry lang:').' '.444 form::combo('new_lang',$lang_combo,'').445 '</label> ';473 $fields->getEntries(). 474 475 '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 476 form::combo('new_lang',$lang_combo,''); 446 477 447 478 echo … … 465 496 '<form action="posts_actions.php" method="post">'. 466 497 $fields->getEntries(). 467 '<p><label for="new_auth_id" class="classic">'.__('Author ID:').' '. 468 form::field('new_auth_id',20,255). 469 '</label> '; 498 '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 499 form::field('new_auth_id',20,255); 470 500 471 501 echo -
admin/preferences.php
r1399 r1468 344 344 ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). 345 345 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 346 dcPage::jsLoad('js/jquery/jquery.pwstrength.js'). 347 '<script type="text/javascript">'."\n". 348 "//<![CDATA[\n". 349 "\$(function() {\n". 350 " \$('#new_pwd').pwstrength({texts: ['". 351 sprintf(__('Password strength: %s'),__('very weak'))."', '". 352 sprintf(__('Password strength: %s'),__('weak'))."', '". 353 sprintf(__('Password strength: %s'),__('mediocre'))."', '". 354 sprintf(__('Password strength: %s'),__('strong'))."', '". 355 sprintf(__('Password strength: %s'),__('very strong'))."']});\n". 356 "});\n". 357 "\n//]]>\n". 358 "</script>\n". 346 359 dcPage::jsPageTabs($default_tab). 347 360 dcPage::jsConfirmClose('user-form'). … … 420 433 '<legend>'.__('Change your password').'</legend>'. 421 434 422 '<p><label for="new_pwd">'.__('New password:').'</label>'. 423 form::password('new_pwd',20,255).'</p>'. 435 '<div class="pw-table">'. 436 '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 437 form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 438 '<div id="pwindicator">'. 439 ' <div class="bar"></div>'. 440 ' <p class="label no-margin"></p>'. 441 '</div>'. 442 '</div>'. 424 443 425 444 '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. -
admin/style/default.css
r1465 r1470 481 481 #icons a img { 482 482 padding: 2em; 483 background: #eee; 484 border-radius: 1.6rem; 485 box-shadow: 0 3px 3px 0 #ccc; 486 margin-bottom: .6rem; 483 margin-bottom: .3em; 484 -moz-box-shadow: 0px 1px 0px 0px #ffffff; 485 -webkit-box-shadow: 0px 1px 0px 0px #ffffff; 486 box-shadow: 0px 1px 0px 0px #ffffff; 487 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) ); 488 background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% ); 489 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9'); 490 background-color:#f9f9f9; 491 -moz-border-radius:1em; 492 -webkit-border-radius:1em; 493 border-radius:1em; 494 border:1px solid #dcdcdc; 495 display:inline-block; 487 496 } 488 497 #icons a img:hover, #icons a:focus img { 489 background -color: #BBDB58;498 background: #BBDB58; 490 499 } 491 500 #icons a:focus span, #icons a:hover span { … … 501 510 #quick p.qinfo { 502 511 margin: -.7em -1em 1em; 503 background: # eef url(info.png) no-repeat .2em .2em;512 background: #f3f3ff url(info.png) no-repeat .2em .2em; 504 513 border: 1px solid #99f; 505 514 padding: .2em 1em .1em 24px; … … 541 550 } 542 551 552 #upg-notify { 553 } 554 #upg-notify ul { 555 padding-left: 15px; 556 } 557 #upg-notify li { 558 color: #fff; 559 } 543 560 /* ------------------------------------------------------------------ post */ 544 561 #entry-wrapper { … … 1201 1218 } 1202 1219 table.settings th, table.prefs th { 1203 background: # eef;1220 background: #f3f3ff; 1204 1221 } 1205 1222 table.settings th:first-child, table.prefs th:first-child { … … 1420 1437 text-decoration: none; 1421 1438 padding: .1em .5em; 1422 text-shadow: 0 1px 1px rgba(0,0,0,.3);1423 1439 border-radius: .2em; 1424 1440 margin-bottom: .1em; 1425 } 1441 font-size: 1.2rem; 1442 } 1426 1443 h4 a.button {font-weight: normal;} 1427 1444 … … 1431 1448 a.submit { 1432 1449 color: #fff; 1433 border: 1px solid #2373A8; 1434 background: #2373A8; 1435 background: -webkit-gradient(linear, left top, left bottom, from(#2C8FD1), to(#2373A8)); 1436 background: -moz-linear-gradient(top, #2C8FD1, #2373A8); 1450 border: 1px solid #A2CBE9; 1451 text-shadow: 0 -1px 1px #3275bc; 1452 background:#25A6E1; 1453 background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%); 1454 background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0)); 1455 background:linear-gradient(top,#25A6E1 0%,#188BC0 100%); 1456 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0); 1457 border:1px solid #1A87B9 1458 1437 1459 } 1438 1460 input[type=submit]:hover, … … 1442 1464 input[type=button]:focus, 1443 1465 a.submit:focus { 1444 background: #2373A8; 1445 background: -webkit-gradient(linear, left top, left bottom, from(#2373A8), to(#2C8FD1)); 1446 background: -moz-linear-gradient(top, #2373A8, #2C8FD1); 1447 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2373A8', endColorstr='#2C8FD1'); 1466 background:#188BC0; 1467 background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%); 1468 background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#188BC0),color-stop(100%,#25A6E1)); 1469 background:linear-gradient(top,#188BC0 0%,#25A6E1 100%); 1470 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#25A6E1',GradientType=0); 1448 1471 border: 1px solid #2C8FD1; 1449 1472 } … … 1457 1480 background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 1458 1481 background: -moz-linear-gradient(top, #f5f5f5, #dfdfdf); 1459 text-shadow: none;1482 text-shadow:1px 1px 0px #fff; 1460 1483 } 1461 1484 a.button:hover, … … 1615 1638 border-color : #ccc; 1616 1639 background-color: #fff; 1640 } 1641 1642 /* --------------------------------------------------------------- password indcator */ 1643 .pw-table { 1644 display: table; 1645 margin-bottom: 1em; 1646 } 1647 .pw-cell { 1648 display: table-cell; 1649 margin-bottom: 1em; 1650 } 1651 #pwindicator { 1652 display: table-cell; 1653 vertical-align: bottom; 1654 padding-left: 1.5em; 1655 height: 3.8em; 1656 } 1657 #pwindicator .bar { 1658 height: 6px; 1659 margin-bottom: 4px; 1660 } 1661 .pw-very-weak .bar { 1662 background: #900; 1663 width: 30px; 1664 } 1665 .pw-weak .bar { 1666 background: #c00; 1667 width: 60px; 1668 } 1669 .pw-mediocre .bar { 1670 background: #f60; 1671 width: 90px; 1672 } 1673 .pw-strong .bar { 1674 background: #060; 1675 width: 120px; 1676 } 1677 .pw-very-strong .bar { 1678 background: #0c0; 1679 width: 150px; 1617 1680 } 1618 1681 -
admin/update.php
r1358 r1469 27 27 28 28 $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 29 $new_v = $updater->check(DC_VERSION );29 $new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); 30 30 $zip_file = $new_v ? DC_BACKUP_PATH.'/'.basename($updater->getFileURL()) : ''; 31 31 $version_info = $new_v ? $updater->getInfoURL() : ''; … … 168 168 -------------------------------------------------------- */ 169 169 dcPage::open(__('Dotclear update'), 170 (!$step ? dcPage::jsPageTabs($default_tab) : ''), 170 (!$step ? 171 dcPage::jsPageTabs($default_tab). 172 dcPage::jsLoad('js/_update.js') 173 : ''), 171 174 dcPage::breadcrumb( 172 175 array( … … 176 179 ); 177 180 181 if (!$core->error->flag()) { 182 if (!empty($_GET['nocache'])) { 183 dcPage::message(__('Manual checking of update done successfully.')); 184 } 185 } 186 178 187 if (!$step) 179 188 { … … 181 190 if (empty($new_v)) 182 191 { 183 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 192 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'. 193 '<form action="'.$p_url.'" method="get">'. 194 '<p><input type="hidden" name="nocache" value="1" />'. 195 '<input type="submit" value="'.__('Force checking update Dotclear').'" /></p>'. 196 '</form>'; 184 197 } 185 198 else -
inc/admin/lib.dc.page.php
r1461 r1468 164 164 if ($core->error->flag()) { 165 165 echo 166 '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</ p></strong>'.166 '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 167 167 $core->error->toHTML(). 168 168 '</div>'; … … 508 508 self::jsVar('dotclear.msg.confirm_delete_theme', 509 509 __('Are you sure you want to delete "%s" theme?')). 510 self::jsVar('dotclear.msg.confirm_delete_backup', 511 __('Are you sure you want to delete this backup?')). 510 512 self::jsVar('dotclear.msg.zip_file_content', 511 513 __('Zip file content')). -
inc/admin/lib.pager.php
r1415 r1468 87 87 html::escapeHTML($this->rs->cat_title)); 88 88 } else { 89 $cat_title = __(' None');89 $cat_title = __('(No cat)'); 90 90 } 91 91 -
inc/core/class.dc.blog.php
r1353 r1468 634 634 private function checkCategory($title,$url,$id=null) 635 635 { 636 $strReq = 'SELECT cat_id '. 637 'FROM '.$this->prefix.'category '. 638 "WHERE cat_url = '".$this->con->escape($url)."' ". 639 "AND blog_id = '".$this->con->escape($this->id)."' "; 640 641 if ($id !== null) { 642 $strReq .= 'AND cat_id <> '.(integer) $id.' '; 643 } 636 # Let's check if URL is taken... 637 $strReq = 638 'SELECT cat_url FROM '.$this->prefix.'category '. 639 "WHERE cat_url = '".$this->con->escape($url)."' ". 640 ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 641 "AND blog_id = '".$this->con->escape($this->id)."' ". 642 'ORDER BY cat_url DESC'; 644 643 645 644 $rs = $this->con->select($strReq); 646 645 647 if (!$rs->isEmpty()) { 648 throw new Exception(__('Category URL must be unique.')); 649 } 646 if (!$rs->isEmpty()) 647 { 648 if ($this->con->driver() == 'mysql') { 649 $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 650 } elseif ($this->con->driver() == 'pgsql') { 651 $clause = "~ '^".$this->con->escape($url)."[0-9]+$'"; 652 } else { 653 $clause = "LIKE '".$this->con->escape($url)."%'"; 654 } 655 $strReq = 656 'SELECT cat_url FROM '.$this->prefix.'category '. 657 "WHERE cat_url ".$clause.' '. 658 ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 659 "AND blog_id = '".$this->con->escape($this->id)."' ". 660 'ORDER BY cat_url DESC '; 661 662 $rs = $this->con->select($strReq); 663 $a = array(); 664 while ($rs->fetch()) { 665 $a[] = $rs->cat_url; 666 } 667 668 natsort($a); 669 $t_url = end($a); 670 671 if (preg_match('/(.*?)([0-9]+)$/',$t_url,$m)) { 672 $i = (integer) $m[2]; 673 $url = $m[1]; 674 } else { 675 $i = 1; 676 } 677 678 return $url.($i+1); 679 } 680 681 # URL is empty? 682 if ($url == '') { 683 throw new Exception(__('Empty category URL')); 684 } 685 686 return $url; 650 687 } 651 688 … … 669 706 670 707 # Check if title or url are unique 671 $ this->checkCategory($cur->cat_title,$cur->cat_url,$id);708 $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 672 709 673 710 if ($cur->cat_desc !== null) { -
inc/core/class.dc.media.php
r1280 r1468 30 30 31 31 public $thumb_tp = '%s/.%s_%s.jpg'; ///< <b>string</b> Thumbnail file pattern 32 public $thumb_tp_alpha = '%s/.%s_%s.png'; ///< <b>string</b> Thumbnail file pattern (with alpha layer) 32 33 33 34 /** … … 298 299 $f->media_thumb = array(); 299 300 $p = path::info($f->relname); 300 $thumb = sprintf($this->thumb_tp,$this->root.'/'.$p['dirname'],$p['base'],'%s'); 301 $thumb_url = sprintf($this->thumb_tp,$this->root_url.$p['dirname'],$p['base'],'%s'); 301 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 302 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root.'/'.$p['dirname'],$p['base'],'%s'); 303 $thumb_url = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root_url.$p['dirname'],$p['base'],'%s'); 302 304 303 305 # Cleaner URLs … … 920 922 921 923 $p = path::info($file); 922 $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 924 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 925 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 923 926 924 927 try … … 939 942 $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 940 943 $img->resize($s[0],$s[0],$s[1]); 941 $img->output( 'jpeg',$thumb_file,$rate);944 $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 942 945 $img->loadImage($file); 943 946 } … … 958 961 { 959 962 $p = path::info($file->relname); 960 $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 963 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 964 $thumb_old = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 961 965 962 966 $p = path::info($newFile->relname); 963 $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 967 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 968 $thumb_new = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 964 969 965 970 foreach ($this->thumb_sizes as $suffix => $s) { … … 974 979 { 975 980 $p = path::info($f); 976 $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 981 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 982 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 977 983 978 984 foreach ($this->thumb_sizes as $suffix => $s) { -
locales/en/main.po
r1425 r1468 2139 2139 msgstr "" 2140 2140 2141 msgid "Are you sure you want to delete this backup?" 2142 msgstr "" 2143 2141 2144 msgid "Zip file content" 2142 2145 msgstr "" … … 2787 2790 msgid "The following error was encountered while trying to read the database:" 2788 2791 msgstr "" 2792 2793 msgid "(No cat)" 2794 msgstr "(none)" -
locales/fr/main.po
r1454 r1470 1038 1038 #, fuzzy, php-format 1039 1039 msgid "Path <strong>%s</strong> is not writable." 1040 msgstr "Le répertoire de cache %sn'est pas accessible en écriture."1040 msgstr "Le répertoire de cache <strong>%s</strong> n'est pas accessible en écriture." 1041 1041 1042 1042 #, fuzzy … … 1193 1193 msgstr "Gestionnaire de médias" 1194 1194 1195 msgid "Go to %s folder" 1196 msgstr "Aller au dossier %s" 1197 1198 msgid "Media details of %s" 1199 msgstr "Détails du média %s" 1200 1195 1201 msgid "confirm removal" 1196 1202 msgstr "Confirmer la suppression" … … 1994 2000 msgstr "Les fichiers suivants de votre installation de Dotclear ne peuvent pas être écrits. Veuillez corriger la situation ou <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 1995 2001 2002 msgid "Manual checking of update done successfully." 2003 msgstr "Vérification manuelle de mise à jour effectuée avec succès." 2004 1996 2005 msgid "No newer Dotclear version available." 1997 2006 msgstr "Aucune nouvelle version de Dotclear n'est disponible." 1998 2007 2008 msgid "Force checking update Dotclear" 2009 msgstr "Forcer la vérification de mise à jour de Dotclear" 2010 1999 2011 #, php-format 2000 2012 msgid "Dotclear %s is available." … … 2133 2145 #, fuzzy 2134 2146 msgid "Go to the content" 2135 msgstr " Voir ce billet sur le site"2147 msgstr "Aller au contenu" 2136 2148 2137 2149 #, fuzzy 2138 2150 msgid "Go to the menu" 2139 msgstr "Aller sur le site"2151 msgstr "Aller au menu" 2140 2152 2141 2153 msgid "Go to site" … … 2201 2213 2202 2214 msgid "Users with posts cannot be deleted." 2203 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées."2215 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 2204 2216 2205 2217 #, php-format … … 2243 2255 msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 2244 2256 2257 msgid "Are you sure you want to delete this backup?" 2258 msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 2259 2245 2260 msgid "Zip file content" 2246 2261 msgstr "Contenu du fichier zip" … … 2258 2273 msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" 2259 2274 2275 msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?" 2276 msgstr "Attention : le changement de syntaxe ne transformera pas les balises des contenus déjà saisis. Pensez à les réadapter après cette opération. Confirmez-vous ce changement de syntaxe ?" 2277 2260 2278 msgid "Loading enhanced uploader, please wait." 2261 2279 msgstr "Chargement de l'interface avancée." … … 2506 2524 #, fuzzy 2507 2525 msgid "You are not allowed to reset categories order" 2508 msgstr "Vous n'êtes pas autorisé à supprimerdes catégories"2526 msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordre des catégories" 2509 2527 2510 2528 msgid "Category URL must be unique." … … 3034 3052 msgstr "Filtrer la liste des commentaires et rétroliens" 3035 3053 3054 msgid "comments per page" 3055 msgstr "commentaires par page" 3056 3036 3057 msgid "Filter users list" 3037 3058 msgstr "Filtrer la liste des utilisateurs" … … 3060 3081 msgid "Add an introduction to the page." 3061 3082 msgstr "Ajoute une introduction à la page." 3083 3084 msgid "(No cat)" 3085 msgstr "(aucune)" 3086 3087 msgid "Password strength: %s" 3088 msgstr "Force du mot de passe : %s" 3089 3090 msgid "very weak" 3091 msgstr "très faible" 3092 3093 msgid "weak" 3094 msgstr "faible" 3095 3096 msgid "mediocre" 3097 msgstr "moyen" 3098 3099 msgid "strong" 3100 msgstr "fort" 3101 3102 msgid "very strong" 3103 msgstr "très fort" -
locales/fr/plugins.po
r1396 r1468 1166 1166 msgstr "Pages" 1167 1167 1168 msgid "My first page" 1169 msgstr "Ma première page" 1170 1171 msgid "This is your first page. When you\'re ready to blog, log in to edit or delete it." 1172 msgstr "Ceci est votre première page. Quand vous serez prêt à bloguer, connectez-vous pour l'éditer ou la supprimer." 1173 1168 1174 #, php-format 1169 1175 msgid "%d page" -
plugins/antispam/filters/class.dc.filter.iplookup.php
r1454 r1468 44 44 } 45 45 46 $match = array();47 48 46 $bls = $this->getServers(); 49 47 $bls = preg_split('/\s*,\s*/',$bls); 50 48 51 foreach ($bls as $bl) 52 { 49 foreach ($bls as $bl) { 53 50 if ($this->dnsblLookup($ip,$bl)) { 54 $match[] = $bl; 51 // Pass by reference $status to contain matching DNSBL 52 $status = $bl; 53 return true; 55 54 } 56 }57 58 if (!empty($match)) {59 $status = substr(implode(', ',$match),0,128);60 return true;61 55 } 62 56 } -
plugins/antispam/filters/class.dc.filter.linkslookup.php
r1179 r1366 64 64 private function getLinks($text) 65 65 { 66 $res = array(); 67 68 # href attribute on "a" tags 69 if (preg_match_all('/<a ([^>]+)>/ms', $text, $match, PREG_SET_ORDER)) 70 { 71 for ($i = 0; $i<count($match); $i++) 72 { 73 if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 74 $res[] = $matches[1]; 75 } 76 } 77 } 78 79 return $res; 66 // href attribute on "a" tags is second match 67 preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 68 69 return $parts[1]; 80 70 } 81 71 } -
plugins/attachments/_admin.php
r1398 r1468 41 41 '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 42 42 '<ul>'. 43 '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" '.43 '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" '. 44 44 'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 45 45 '<li>'.$f->media_dtstr.'</li>'. -
plugins/pages/_define.php
r1179 r1442 16 16 /* Description*/ "Serve entries as simple web pages", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 2',18 /* Version */ '1.3', 19 19 array( 20 20 'permissions' => 'contentadmin,pages', … … 22 22 ) 23 23 ); 24 ?>
Note: See TracChangeset
for help on using the changeset viewer.