Merge pull request #3528 from Hypolite/task/replace-explicit-php-logical-operators
Replace explicit php logical operators
This commit is contained in:
commit
1838024f6d
93 changed files with 677 additions and 676 deletions
|
@ -15,9 +15,9 @@ use Friendica\App;
|
|||
* @todo Check if this is really needed.
|
||||
*/
|
||||
function load_page(App $a) {
|
||||
if(isset($_GET["mode"]) AND ($_GET["mode"] == "minimal")) {
|
||||
if(isset($_GET["mode"]) && ($_GET["mode"] == "minimal")) {
|
||||
require "view/theme/frio/minimal.php";
|
||||
} elseif((isset($_GET["mode"]) AND ($_GET["mode"] == "none"))) {
|
||||
} elseif((isset($_GET["mode"]) && ($_GET["mode"] == "none"))) {
|
||||
require "view/theme/frio/none.php";
|
||||
} else {
|
||||
$template = 'view/theme/' . current_theme() . '/'
|
||||
|
|
|
@ -46,7 +46,7 @@ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MA
|
|||
$cached_etag = str_replace(array('"', "-gzip"), array('', ''),
|
||||
stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));
|
||||
|
||||
if (($cached_modified == $modified) AND ($cached_etag == $etag)) {
|
||||
if (($cached_modified == $modified) && ($cached_etag == $etag)) {
|
||||
header('HTTP/1.1 304 Not Modified');
|
||||
exit();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ function vier_init(App $a) {
|
|||
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
|
||||
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) {
|
||||
vier_community_info();
|
||||
|
||||
$a->page['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";
|
||||
|
@ -96,14 +96,14 @@ EOT;
|
|||
|
||||
// Hide the left menu bar
|
||||
/// @TODO maybe move this static array out where it should belong?
|
||||
if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",
|
||||
if (($a->page['aside'] == "") && in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",
|
||||
"probe", "webfinger", "login", "invite", "credits"))) {
|
||||
$a->page['htmlhead'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
|
||||
}
|
||||
}
|
||||
|
||||
function get_vier_config($key, $default = false, $admin = false) {
|
||||
if (local_user() AND !$admin) {
|
||||
if (local_user() && !$admin) {
|
||||
$result = get_pconfig(local_user(), "vier", $key);
|
||||
if ($result !== false) {
|
||||
return $result;
|
||||
|
@ -186,7 +186,7 @@ function vier_community_info() {
|
|||
}
|
||||
|
||||
//right_aside FIND FRIENDS
|
||||
if ($show_friends AND local_user()) {
|
||||
if ($show_friends && local_user()) {
|
||||
$nv = array();
|
||||
$nv['title'] = array("", t('Find Friends'), "", "");
|
||||
$nv['directory'] = array('directory', t('Local Directory'), "", "");
|
||||
|
@ -206,7 +206,7 @@ function vier_community_info() {
|
|||
}
|
||||
|
||||
//Community_Pages at right_aside
|
||||
if ($show_pages AND local_user()) {
|
||||
if ($show_pages && local_user()) {
|
||||
|
||||
require_once 'include/ForumManager.php';
|
||||
|
||||
|
@ -372,7 +372,7 @@ function vier_community_info() {
|
|||
$r[] = array("photo" => "images/wordpress.png", "name" => "Wordpress");
|
||||
}
|
||||
|
||||
if (function_exists("imap_open") AND !get_config("system","imap_disabled") AND !get_config("system","dfrn_only")) {
|
||||
if (function_exists("imap_open") && !get_config("system","imap_disabled") && !get_config("system","dfrn_only")) {
|
||||
$r[] = array("photo" => "images/mail.png", "name" => "E-Mail");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue