Index: admin/categories.php
===================================================================
--- admin/categories.php	(revision 3210)
+++ admin/categories.php	(revision 3340)
@@ -47,5 +47,5 @@
 		$mov_cat = (int) $_POST['mov_cat'][$cat_id];
 
-		$mov_cat = $mov_cat ? $mov_cat : null;
+		$mov_cat = $mov_cat ?: null;
 		if ($mov_cat !== null) {
 			$c = $core->blog->getCategory($mov_cat);
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 3325)
+++ admin/media.php	(revision 3340)
@@ -35,5 +35,5 @@
 
 $page = !empty($_GET['page']) ? max(1,(integer) $_GET['page']) : 1;
-$nb_per_page = ((integer) $core->auth->user_prefs->interface->media_by_page ? (integer) $core->auth->user_prefs->interface->media_by_page : 30);
+$nb_per_page = ((integer) $core->auth->user_prefs->interface->media_by_page ?: 30);
 
 # We are on home not comming from media manager
@@ -161,5 +161,5 @@
 			$zip->addDirectory($core->media->root.'/'.$d,'',true);
 
-			header('Content-Disposition: attachment;filename='.date('Y-m-d').'-'.$core->blog->id.'-'.($d ? $d : 'media').'.zip');
+			header('Content-Disposition: attachment;filename='.date('Y-m-d').'-'.$core->blog->id.'-'.($d ?: 'media').'.zip');
 			header('Content-Type: application/x-zip');
 			$zip->write();
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 3209)
+++ admin/post.php	(revision 3340)
@@ -272,5 +272,5 @@
 
 	$cur->post_title = $post_title;
-	$cur->cat_id = ($cat_id ? $cat_id : null);
+	$cur->cat_id = ($cat_id ?: null);
 	$cur->post_dt = $post_dt ? date('Y-m-d H:i:00',strtotime($post_dt)) : '';
 	$cur->post_format = $post_format;
Index: admin/preferences.php
===================================================================
--- admin/preferences.php	(revision 3333)
+++ admin/preferences.php	(revision 3340)
@@ -47,5 +47,5 @@
 $user_ui_iconset = @$core->auth->user_prefs->interface->iconset;
 $user_ui_nofavmenu = $core->auth->user_prefs->interface->nofavmenu;
-$user_ui_media_by_page = ($core->auth->user_prefs->interface->media_by_page ? $core->auth->user_prefs->interface->media_by_page : 30);
+$user_ui_media_by_page = ($core->auth->user_prefs->interface->media_by_page ?: 30);
 $user_ui_media_nb_last_dirs = $core->auth->user_prefs->interface->media_nb_last_dirs;
 
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 3326)
+++ inc/admin/lib.dc.page.php	(revision 3340)
@@ -106,8 +106,8 @@
 			// Get directives from settings if exist, else set defaults
 			$csp = new ArrayObject(array());
-			$csp['default-src'] = $core->blog->settings->system->csp_admin_default ? $core->blog->settings->system->csp_admin_default : "'self'";
-			$csp['script-src'] = $core->blog->settings->system->csp_admin_script ? $core->blog->settings->system->csp_admin_script : "'self' 'unsafe-inline' 'unsafe-eval'";
-			$csp['style-src'] = $core->blog->settings->system->csp_admin_style ? $core->blog->settings->system->csp_admin_style : "'self' 'unsafe-inline'";
-			$csp['img-src'] = $core->blog->settings->system->csp_admin_img ? $core->blog->settings->system->csp_admin_img : "'self' data: media.dotaddict.org";
+			$csp['default-src'] = $core->blog->settings->system->csp_admin_default ?: "'self'";
+			$csp['script-src'] = $core->blog->settings->system->csp_admin_script ?: "'self' 'unsafe-inline' 'unsafe-eval'";
+			$csp['style-src'] = $core->blog->settings->system->csp_admin_style ?: "'self' 'unsafe-inline'";
+			$csp['img-src'] = $core->blog->settings->system->csp_admin_img ?: "'self' data: media.dotaddict.org";
 
 			# Cope with blog post preview (via public URL in iframe)
@@ -298,5 +298,5 @@
 	{
 		global $core;
-		$tag = (isset($n['divtag'])&& $n['divtag'])?'div':'p';
+		$tag = (isset($n['divtag']) && $n['divtag']) ? 'div' : 'p';
 		$ts = '';
 		if (!isset($n['with_ts']) || ($n['with_ts'] == true)) {
@@ -442,7 +442,7 @@
 	{
 		global $core;
-		$with_home_link = isset($options['home_link'])?$options['home_link']:true;
-		$hl = isset($options['hl'])?$options['hl']:true;
-		$hl_pos = isset($options['hl_pos'])?$options['hl_pos']:-1;
+		$with_home_link = isset($options['home_link']) ? $options['home_link'] : true;
+		$hl = isset($options['hl']) ? $options['hl'] : true;
+		$hl_pos = isset($options['hl_pos']) ? $options['hl_pos'] : -1;
 		// First item of array elements should be blog's name, System or Plugins
 		$res = '<h2>'.($with_home_link ?
Index: inc/admin/lib.themeconfig.php
===================================================================
--- inc/admin/lib.themeconfig.php	(revision 2660)
+++ inc/admin/lib.themeconfig.php	(revision 3340)
@@ -71,5 +71,5 @@
 
 		// Eval font size in em (assume base font size in pixels equal to 16)
-		if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$size,$m)) {
+		if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex|rem)?$/',$size,$m)) {
 			if (empty($m[2])) {
 				$m[2] = 'em';
@@ -144,5 +144,5 @@
 	public static function adjustFontSize($s)
 	{
-		if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$s,$m)) {
+		if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex|rem)?$/',$s,$m)) {
 			if (empty($m[2])) {
 				$m[2] = 'em';
Index: inc/core/class.dc.auth.php
===================================================================
--- inc/core/class.dc.auth.php	(revision 3298)
+++ inc/core/class.dc.auth.php	(revision 3340)
@@ -217,5 +217,5 @@
 		# Check here for user and IP address
 		$this->checkUser($_SESSION['sess_user_id']);
-		$uid = $uid ? $uid : http::browserUID(DC_MASTER_KEY);
+		$uid = $uid ?: http::browserUID(DC_MASTER_KEY);
 
 		$user_can_log = $this->userID() !== null && $uid == $_SESSION['sess_browser_uid'];
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 3263)
+++ inc/core/class.dc.blog.php	(revision 3340)
@@ -1506,5 +1506,5 @@
 		$cur = $this->con->openCursor($this->prefix.'post');
 
-		$cur->cat_id = ($cat_id ? $cat_id : null);
+		$cur->cat_id = ($cat_id ?: null);
 		$cur->post_upddt = date('Y-m-d H:i:s');
 
@@ -1530,5 +1530,5 @@
 		$cur = $this->con->openCursor($this->prefix.'post');
 
-		$cur->cat_id = ($new_cat_id ? $new_cat_id : null);
+		$cur->cat_id = ($new_cat_id ?: null);
 		$cur->post_upddt = date('Y-m-d H:i:s');
 
Index: inc/core/class.dc.media.php
===================================================================
--- inc/core/class.dc.media.php	(revision 3299)
+++ inc/core/class.dc.media.php	(revision 3340)
@@ -393,5 +393,5 @@
 		}
 
-		$media_dir = $this->relpwd ? $this->relpwd : '.';
+		$media_dir = $this->relpwd ?: '.';
 
 		$strReq =
@@ -660,5 +660,5 @@
 	protected function rebuildDB($pwd)
 	{
-		$media_dir = $pwd ? $pwd : '.';
+		$media_dir = $pwd ?: '.';
 
 		$strReq =
@@ -919,5 +919,5 @@
 	public function getDBDirs()
 	{
-		$media_dir = $this->relpwd ? $this->relpwd : '.';
+		$media_dir = $this->relpwd ?: '.';
 
 		$strReq =
Index: inc/core/class.dc.trackback.php
===================================================================
--- inc/core/class.dc.trackback.php	(revision 2674)
+++ inc/core/class.dc.trackback.php	(revision 3340)
@@ -171,5 +171,5 @@
 		$comment =
 		"<!-- TB -->\n".
-		'<p><strong>'.($title ? $title : $blog_name)."</strong></p>\n".
+		'<p><strong>'.($title ?: $blog_name)."</strong></p>\n".
 		'<p>'.$excerpt.'</p>';
 
Index: plugins/blowupConfig/index.php
===================================================================
--- plugins/blowupConfig/index.php	(revision 2849)
+++ plugins/blowupConfig/index.php	(revision 3340)
@@ -318,5 +318,5 @@
 	'<h5 class="pretty-title">'.__('Top image').'</h5>'.
 	'<p class="field"><label for="top_image">'.__('Top image').'</label> '.
-	form::combo('top_image',$top_images,($blowup_user['top_image'] ? $blowup_user['top_image'] : 'default')).'</p>'.
+	form::combo('top_image',$top_images,($blowup_user['top_image'] ?: 'default')).'</p>'.
 	'<p>'.__('Choose "Custom..." to upload your own image.').'</p>'.
 
Index: plugins/importExport/inc/class.dc.import.feed.php
===================================================================
--- plugins/importExport/inc/class.dc.import.feed.php	(revision 3269)
+++ plugins/importExport/inc/class.dc.import.feed.php	(revision 3340)
@@ -144,6 +144,6 @@
 			$cur->clean();
 			$cur->user_id = $this->core->auth->userID();
-			$cur->post_content = $item->content ? $item->content : $item->description;
-			$cur->post_title = $item->title ? $item->title : text::cutString(html::clean($cur->post_content),60);
+			$cur->post_content = $item->content ?: $item->description;
+			$cur->post_title = $item->title ?: text::cutString(html::clean($cur->post_content),60);
 			$cur->post_format = 'xhtml';
 			$cur->post_status = -2;
Index: plugins/importExport/inc/class.dc.import.wp.php
===================================================================
--- plugins/importExport/inc/class.dc.import.wp.php	(revision 2566)
+++ plugins/importExport/inc/class.dc.import.wp.php	(revision 3340)
@@ -658,5 +658,5 @@
 		}
 		$cur->post_type         = $rs->post_type;
-		$cur->post_password     = $rs->post_password ? $rs->post_password : NULL;
+		$cur->post_password     = $rs->post_password ?: NULL;
 		$cur->post_open_comment = $rs->comment_status == 'open' ? 1 : 0;
 		$cur->post_open_tb      = $rs->ping_status == 'open' ? 1 : 0;
Index: plugins/maintenance/_admin.php
===================================================================
--- plugins/maintenance/_admin.php	(revision 3324)
+++ plugins/maintenance/_admin.php	(revision 3340)
@@ -277,5 +277,5 @@
 				}
 				if (!empty($res_task)) {
-					$desc = $group_obj->description ? $group_obj->description : $group_obj->summary;
+					$desc = $group_obj->description ?: $group_obj->summary;
 
 					$res_group .=
@@ -286,5 +286,5 @@
 			}
 			if (!empty($res_group)) {
-				$desc = $tab_obj->description ? $tab_obj->description : $tab_obj->summary;
+				$desc = $tab_obj->description ?: $tab_obj->summary;
 
 				$res_tab .=
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php	(revision 2566)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.indexcomments.php	(revision 3340)
@@ -35,5 +35,5 @@
 		$this->code = $this->core->indexAllComments($this->code, $this->limit);
 
-		return $this->code ? $this->code : true;
+		return $this->code ?: true;
 	}
 
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php	(revision 2044)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.indexposts.php	(revision 3340)
@@ -35,5 +35,5 @@
 		$this->code = $this->core->indexAllPosts($this->code, $this->limit);
 
-		return $this->code ? $this->code : true;
+		return $this->code ?: true;
 	}
 
Index: plugins/maintenance/inc/tasks/class.dc.maintenance.synchpostsmeta.php
===================================================================
--- plugins/maintenance/inc/tasks/class.dc.maintenance.synchpostsmeta.php	(revision 2044)
+++ plugins/maintenance/inc/tasks/class.dc.maintenance.synchpostsmeta.php	(revision 3340)
@@ -35,5 +35,5 @@
 		$this->code = $this->synchronizeAllPostsmeta($this->code, $this->limit);
 
-		return $this->code ? $this->code : true;
+		return $this->code ?: true;
 	}
 
