Changeset 3340:30cec05f4e63
- Timestamp:
- 09/09/16 13:30:35 (9 years ago)
- Branch:
- default
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/categories.php
r3210 r3340 47 47 $mov_cat = (int) $_POST['mov_cat'][$cat_id]; 48 48 49 $mov_cat = $mov_cat ? $mov_cat: null;49 $mov_cat = $mov_cat ?: null; 50 50 if ($mov_cat !== null) { 51 51 $c = $core->blog->getCategory($mov_cat); -
admin/media.php
r3325 r3340 35 35 36 36 $page = !empty($_GET['page']) ? max(1,(integer) $_GET['page']) : 1; 37 $nb_per_page = ((integer) $core->auth->user_prefs->interface->media_by_page ? (integer) $core->auth->user_prefs->interface->media_by_page: 30);37 $nb_per_page = ((integer) $core->auth->user_prefs->interface->media_by_page ?: 30); 38 38 39 39 # We are on home not comming from media manager … … 161 161 $zip->addDirectory($core->media->root.'/'.$d,'',true); 162 162 163 header('Content-Disposition: attachment;filename='.date('Y-m-d').'-'.$core->blog->id.'-'.($d ? $d: 'media').'.zip');163 header('Content-Disposition: attachment;filename='.date('Y-m-d').'-'.$core->blog->id.'-'.($d ?: 'media').'.zip'); 164 164 header('Content-Type: application/x-zip'); 165 165 $zip->write(); -
admin/post.php
r3209 r3340 272 272 273 273 $cur->post_title = $post_title; 274 $cur->cat_id = ($cat_id ? $cat_id: null);274 $cur->cat_id = ($cat_id ?: null); 275 275 $cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : ''; 276 276 $cur->post_format = $post_format; -
admin/preferences.php
r3333 r3340 47 47 $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; 48 48 $user_ui_nofavmenu = $core->auth->user_prefs->interface->nofavmenu; 49 $user_ui_media_by_page = ($core->auth->user_prefs->interface->media_by_page ? $core->auth->user_prefs->interface->media_by_page: 30);49 $user_ui_media_by_page = ($core->auth->user_prefs->interface->media_by_page ?: 30); 50 50 $user_ui_media_nb_last_dirs = $core->auth->user_prefs->interface->media_nb_last_dirs; 51 51 -
inc/admin/lib.dc.page.php
r3326 r3340 106 106 // Get directives from settings if exist, else set defaults 107 107 $csp = new ArrayObject(array()); 108 $csp['default-src'] = $core->blog->settings->system->csp_admin_default ? $core->blog->settings->system->csp_admin_default: "'self'";109 $csp['script-src'] = $core->blog->settings->system->csp_admin_script ? $core->blog->settings->system->csp_admin_script: "'self' 'unsafe-inline' 'unsafe-eval'";110 $csp['style-src'] = $core->blog->settings->system->csp_admin_style ? $core->blog->settings->system->csp_admin_style: "'self' 'unsafe-inline'";111 $csp['img-src'] = $core->blog->settings->system->csp_admin_img ? $core->blog->settings->system->csp_admin_img: "'self' data: media.dotaddict.org";108 $csp['default-src'] = $core->blog->settings->system->csp_admin_default ?: "'self'"; 109 $csp['script-src'] = $core->blog->settings->system->csp_admin_script ?: "'self' 'unsafe-inline' 'unsafe-eval'"; 110 $csp['style-src'] = $core->blog->settings->system->csp_admin_style ?: "'self' 'unsafe-inline'"; 111 $csp['img-src'] = $core->blog->settings->system->csp_admin_img ?: "'self' data: media.dotaddict.org"; 112 112 113 113 # Cope with blog post preview (via public URL in iframe) … … 298 298 { 299 299 global $core; 300 $tag = (isset($n['divtag']) && $n['divtag'])?'div':'p';300 $tag = (isset($n['divtag']) && $n['divtag']) ? 'div' : 'p'; 301 301 $ts = ''; 302 302 if (!isset($n['with_ts']) || ($n['with_ts'] == true)) { … … 442 442 { 443 443 global $core; 444 $with_home_link = isset($options['home_link']) ?$options['home_link']:true;445 $hl = isset($options['hl']) ?$options['hl']:true;446 $hl_pos = isset($options['hl_pos']) ?$options['hl_pos']:-1;444 $with_home_link = isset($options['home_link']) ? $options['home_link'] : true; 445 $hl = isset($options['hl']) ? $options['hl'] : true; 446 $hl_pos = isset($options['hl_pos']) ? $options['hl_pos'] : -1; 447 447 // First item of array elements should be blog's name, System or Plugins 448 448 $res = '<h2>'.($with_home_link ? -
inc/admin/lib.themeconfig.php
r2660 r3340 71 71 72 72 // Eval font size in em (assume base font size in pixels equal to 16) 73 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex )?$/',$size,$m)) {73 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex|rem)?$/',$size,$m)) { 74 74 if (empty($m[2])) { 75 75 $m[2] = 'em'; … … 144 144 public static function adjustFontSize($s) 145 145 { 146 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex )?$/',$s,$m)) {146 if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex|rem)?$/',$s,$m)) { 147 147 if (empty($m[2])) { 148 148 $m[2] = 'em'; -
inc/core/class.dc.auth.php
r3298 r3340 217 217 # Check here for user and IP address 218 218 $this->checkUser($_SESSION['sess_user_id']); 219 $uid = $uid ? $uid: http::browserUID(DC_MASTER_KEY);219 $uid = $uid ?: http::browserUID(DC_MASTER_KEY); 220 220 221 221 $user_can_log = $this->userID() !== null && $uid == $_SESSION['sess_browser_uid']; -
inc/core/class.dc.blog.php
r3263 r3340 1506 1506 $cur = $this->con->openCursor($this->prefix.'post'); 1507 1507 1508 $cur->cat_id = ($cat_id ? $cat_id: null);1508 $cur->cat_id = ($cat_id ?: null); 1509 1509 $cur->post_upddt = date('Y-m-d H:i:s'); 1510 1510 … … 1530 1530 $cur = $this->con->openCursor($this->prefix.'post'); 1531 1531 1532 $cur->cat_id = ($new_cat_id ? $new_cat_id: null);1532 $cur->cat_id = ($new_cat_id ?: null); 1533 1533 $cur->post_upddt = date('Y-m-d H:i:s'); 1534 1534 -
inc/core/class.dc.media.php
r3299 r3340 393 393 } 394 394 395 $media_dir = $this->relpwd ? $this->relpwd: '.';395 $media_dir = $this->relpwd ?: '.'; 396 396 397 397 $strReq = … … 660 660 protected function rebuildDB($pwd) 661 661 { 662 $media_dir = $pwd ? $pwd: '.';662 $media_dir = $pwd ?: '.'; 663 663 664 664 $strReq = … … 919 919 public function getDBDirs() 920 920 { 921 $media_dir = $this->relpwd ? $this->relpwd: '.';921 $media_dir = $this->relpwd ?: '.'; 922 922 923 923 $strReq = -
inc/core/class.dc.trackback.php
r2674 r3340 171 171 $comment = 172 172 "<!-- TB -->\n". 173 '<p><strong>'.($title ? $title: $blog_name)."</strong></p>\n".173 '<p><strong>'.($title ?: $blog_name)."</strong></p>\n". 174 174 '<p>'.$excerpt.'</p>'; 175 175 -
plugins/blowupConfig/index.php
r2849 r3340 318 318 '<h5 class="pretty-title">'.__('Top image').'</h5>'. 319 319 '<p class="field"><label for="top_image">'.__('Top image').'</label> '. 320 form::combo('top_image',$top_images,($blowup_user['top_image'] ? $blowup_user['top_image']: 'default')).'</p>'.320 form::combo('top_image',$top_images,($blowup_user['top_image'] ?: 'default')).'</p>'. 321 321 '<p>'.__('Choose "Custom..." to upload your own image.').'</p>'. 322 322 -
plugins/importExport/inc/class.dc.import.feed.php
r3269 r3340 144 144 $cur->clean(); 145 145 $cur->user_id = $this->core->auth->userID(); 146 $cur->post_content = $item->content ? $item->content: $item->description;147 $cur->post_title = $item->title ? $item->title: text::cutString(html::clean($cur->post_content),60);146 $cur->post_content = $item->content ?: $item->description; 147 $cur->post_title = $item->title ?: text::cutString(html::clean($cur->post_content),60); 148 148 $cur->post_format = 'xhtml'; 149 149 $cur->post_status = -2; -
plugins/importExport/inc/class.dc.import.wp.php
r2566 r3340 658 658 } 659 659 $cur->post_type = $rs->post_type; 660 $cur->post_password = $rs->post_password ? $rs->post_password: NULL;660 $cur->post_password = $rs->post_password ?: NULL; 661 661 $cur->post_open_comment = $rs->comment_status == 'open' ? 1 : 0; 662 662 $cur->post_open_tb = $rs->ping_status == 'open' ? 1 : 0; -
plugins/maintenance/_admin.php
r3324 r3340 277 277 } 278 278 if (!empty($res_task)) { 279 $desc = $group_obj->description ? $group_obj->description: $group_obj->summary;279 $desc = $group_obj->description ?: $group_obj->summary; 280 280 281 281 $res_group .= … … 286 286 } 287 287 if (!empty($res_group)) { 288 $desc = $tab_obj->description ? $tab_obj->description: $tab_obj->summary;288 $desc = $tab_obj->description ?: $tab_obj->summary; 289 289 290 290 $res_tab .= -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
r2566 r3340 35 35 $this->code = $this->core->indexAllComments($this->code, $this->limit); 36 36 37 return $this->code ? $this->code: true;37 return $this->code ?: true; 38 38 } 39 39 -
plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php
r2044 r3340 35 35 $this->code = $this->core->indexAllPosts($this->code, $this->limit); 36 36 37 return $this->code ? $this->code: true;37 return $this->code ?: true; 38 38 } 39 39 -
plugins/maintenance/inc/tasks/class.dc.maintenance.synchpostsmeta.php
r2044 r3340 35 35 $this->code = $this->synchronizeAllPostsmeta($this->code, $this->limit); 36 36 37 return $this->code ? $this->code: true;37 return $this->code ?: true; 38 38 } 39 39
Note: See TracChangeset
for help on using the changeset viewer.