From c9194b038145a5f4efa272052ad194e679c29611 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
"; var_dump($a->user); killme(); - if (is_null($nickname)) + if (is_null($nickname)) { $nickname = $a->user['nickname']; + } - if(x($_GET,'tab')) + if (x($_GET,'tab')) { $tab = notags(trim($_GET['tab'])); + } $url = App::get_baseurl() . '/profile/' . $nickname; diff --git a/include/network.php b/include/network.php index 7a662e4cb..969f58382 100644 --- a/include/network.php +++ b/include/network.php @@ -541,10 +541,11 @@ function parse_xml_string($s,$strict = true) { libxml_use_internal_errors(true); $x = @simplexml_load_string($s2); - if(! $x) { + if (! $x) { logger('libxml: parse: error: ' . $s2, LOGGER_DATA); - foreach(libxml_get_errors() as $err) + foreach (libxml_get_errors() as $err) { logger('libxml: parse: ' . $err->code." at ".$err->line.":".$err->column." : ".$err->message, LOGGER_DATA); + } libxml_clear_errors(); } return $x; @@ -553,8 +554,9 @@ function parse_xml_string($s,$strict = true) { function scale_external_images($srctext, $include_link = true, $scale_replace = false) { // Suppress "view full size" - if (intval(get_config('system','no_view_full_size'))) + if (intval(get_config('system','no_view_full_size'))) { $include_link = false; + } $a = get_app(); @@ -563,38 +565,41 @@ function scale_external_images($srctext, $include_link = true, $scale_replace = $matches = null; $c = preg_match_all('/\[img.*?\](.*?)\[\/img\]/ism',$s,$matches,PREG_SET_ORDER); - if($c) { + if ($c) { require_once('include/Photo.php'); - foreach($matches as $mtch) { + foreach ($matches as $mtch) { logger('scale_external_image: ' . $mtch[1]); $hostname = str_replace('www.','',substr(App::get_baseurl(),strpos(App::get_baseurl(),'://')+3)); - if(stristr($mtch[1],$hostname)) + if (stristr($mtch[1],$hostname)) { continue; + } // $scale_replace, if passed, is an array of two elements. The // first is the name of the full-size image. The second is the // name of a remote, scaled-down version of the full size image. // This allows Friendica to display the smaller remote image if // one exists, while still linking to the full-size image - if($scale_replace) + if ($scale_replace) { $scaled = str_replace($scale_replace[0], $scale_replace[1], $mtch[1]); - else + } else { $scaled = $mtch[1]; - $i = @fetch_url($scaled); - if(! $i) + } + $i = fetch_url($scaled); + if (! $i) { return $srctext; + } // guess mimetype from headers or filename $type = guess_image_type($mtch[1],true); - if($i) { + if ($i) { $ph = new Photo($i, $type); - if($ph->is_valid()) { + if ($ph->is_valid()) { $orig_width = $ph->getWidth(); $orig_height = $ph->getHeight(); - if($orig_width > 640 || $orig_height > 640) { + if ($orig_width > 640 || $orig_height > 640) { $ph->scaleImage(640); $new_width = $ph->getWidth(); @@ -620,7 +625,7 @@ function scale_external_images($srctext, $include_link = true, $scale_replace = function fix_contact_ssl_policy(&$contact,$new_policy) { $ssl_changed = false; - if((intval($new_policy) == SSL_POLICY_SELFSIGN || $new_policy === 'self') && strstr($contact['url'],'https:')) { + if ((intval($new_policy) == SSL_POLICY_SELFSIGN || $new_policy === 'self') && strstr($contact['url'],'https:')) { $ssl_changed = true; $contact['url'] = str_replace('https:','http:',$contact['url']); $contact['request'] = str_replace('https:','http:',$contact['request']); @@ -630,7 +635,7 @@ function fix_contact_ssl_policy(&$contact,$new_policy) { $contact['poco'] = str_replace('https:','http:',$contact['poco']); } - if((intval($new_policy) == SSL_POLICY_FULL || $new_policy === 'full') && strstr($contact['url'],'http:')) { + if ((intval($new_policy) == SSL_POLICY_FULL || $new_policy === 'full') && strstr($contact['url'],'http:')) { $ssl_changed = true; $contact['url'] = str_replace('http:','https:',$contact['url']); $contact['request'] = str_replace('http:','https:',$contact['request']); @@ -640,15 +645,15 @@ function fix_contact_ssl_policy(&$contact,$new_policy) { $contact['poco'] = str_replace('http:','https:',$contact['poco']); } - if($ssl_changed) { - q("update contact set - url = '%s', - request = '%s', - notify = '%s', - poll = '%s', - confirm = '%s', - poco = '%s' - where id = %d limit 1", + if ($ssl_changed) { + q("UPDATE `contact` SET + `url` = '%s', + `request` = '%s', + `notify` = '%s', + `poll` = '%s', + `confirm` = '%s', + `poco` = '%s' + WHERE `id` = %d LIMIT 1", dbesc($contact['url']), dbesc($contact['request']), dbesc($contact['notify']), diff --git a/include/plugin.php b/include/plugin.php index 0b9c0166a..8cb2783ee 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -413,7 +413,7 @@ function get_theme_info($theme){ function get_theme_screenshot($theme) { $exts = array('.png','.jpg'); foreach($exts as $ext) { - if(file_exists('view/theme/' . $theme . '/screenshot' . $ext)) { + if (file_exists('view/theme/' . $theme . '/screenshot' . $ext)) { return(App::get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext); } } @@ -425,8 +425,8 @@ if (! function_exists('uninstall_theme')){ function uninstall_theme($theme){ logger("Addons: uninstalling theme " . $theme); - @include_once("view/theme/$theme/theme.php"); - if(function_exists("{$theme}_uninstall")) { + include_once("view/theme/$theme/theme.php"); + if (function_exists("{$theme}_uninstall")) { $func = "{$theme}_uninstall"; $func(); } @@ -436,19 +436,19 @@ if (! function_exists('install_theme')){ function install_theme($theme) { // silently fail if theme was removed - if(! file_exists("view/theme/$theme/theme.php")) + if (! file_exists("view/theme/$theme/theme.php")) { return false; + } logger("Addons: installing theme $theme"); - @include_once("view/theme/$theme/theme.php"); + include_once("view/theme/$theme/theme.php"); - if(function_exists("{$theme}_install")) { + if (function_exists("{$theme}_install")) { $func = "{$theme}_install"; $func(); return true; - } - else { + } else { logger("Addons: FAILED installing theme $theme"); return false; } @@ -467,10 +467,9 @@ function install_theme($theme) { function service_class_allows($uid,$property,$usage = false) { - if($uid == local_user()) { + if ($uid == local_user()) { $service_class = $a->user['service_class']; - } - else { + } else { $r = q("SELECT `service_class` FROM `user` WHERE `uid` = %d LIMIT 1", intval($uid) ); @@ -478,18 +477,23 @@ function service_class_allows($uid,$property,$usage = false) { $service_class = $r[0]['service_class']; } } - if(! x($service_class)) - return true; // everything is allowed + + if (! x($service_class)) [ + // everything is allowed + return true; + } $arr = get_config('service_class',$service_class); - if(! is_array($arr) || (! count($arr))) + if (! is_array($arr) || (! count($arr))) { return true; + } - if($usage === false) + if ($usage === false) { return ((x($arr[$property])) ? (bool) $arr['property'] : true); - else { - if(! array_key_exists($property,$arr)) + } else { + if (! array_key_exists($property,$arr)) { return true; + } return (((intval($usage)) < intval($arr[$property])) ? true : false); } } @@ -497,10 +501,9 @@ function service_class_allows($uid,$property,$usage = false) { function service_class_fetch($uid,$property) { - if($uid == local_user()) { + if ($uid == local_user()) { $service_class = $a->user['service_class']; - } - else { + } else { $r = q("SELECT `service_class` FROM `user` WHERE `uid` = %d LIMIT 1", intval($uid) ); diff --git a/include/socgraph.php b/include/socgraph.php index 7c70a22a5..e55643e6d 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -220,8 +220,9 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca $r = q("SELECT `network` FROM `contact` WHERE `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1", dbesc(normalise_link($profile_url)), dbesc(NETWORK_STATUSNET) ); - if (dbm::is_result($r)) + if (dbm::is_result($r)) { $network = $r[0]["network"]; + } if (($network == "") OR ($network == NETWORK_OSTATUS)) { $r = q("SELECT `network`, `url` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `network` != '' AND `network` != '%s' LIMIT 1", diff --git a/mod/admin.php b/mod/admin.php index c502e36fc..48320fb36 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1851,12 +1851,12 @@ function admin_page_themes(App &$a){ * @param App $a */ function admin_page_logs_post(App &$a) { - if(x($_POST,"page_logs")) { + if (x($_POST,"page_logs")) { check_form_security_token_redirectOnErr('/admin/logs', 'admin_logs'); - $logfile = ((x($_POST,'logfile')) ? notags(trim($_POST['logfile'])) : ''); - $debugging = ((x($_POST,'debugging')) ? true : false); - $loglevel = ((x($_POST,'loglevel')) ? intval(trim($_POST['loglevel'])) : 0); + $logfile = (x($_POST,'logfile')) ? notags(trim($_POST['logfile'])) : ''); + $debugging = ((x($_POST,'debugging')) ? true : false); + $loglevel = ((x($_POST,'loglevel')) ? intval(trim($_POST['loglevel'])) : 0); set_config('system','logfile', $logfile); set_config('system','debugging', $debugging); diff --git a/mod/delegate.php b/mod/delegate.php index 40618eb32..6930a5943 100644 --- a/mod/delegate.php +++ b/mod/delegate.php @@ -21,7 +21,6 @@ function delegate_content(App &$a) { goaway(App::get_baseurl() . '/delegate'); } - $id = $a->argv[2]; $r = q("select `nickname` from user where uid = %d limit 1", @@ -45,12 +44,11 @@ function delegate_content(App &$a) { if ($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) { // delegated admins can view but not change delegation permissions - if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) { goaway(App::get_baseurl() . '/delegate'); } - q("delete from manage where uid = %d and mid = %d limit 1", + q("DELETE FROM `manage` WHERE `uid` = %d AND `mid` = %d LIMIT 1", intval($a->argv[2]), intval(local_user()) ); diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index b9c1b6744..353f8fdc9 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -810,19 +810,17 @@ function dfrn_request_content(App &$a) { // At first look if an address was provided // Otherwise take the local address - if (x($_GET,'addr') AND ($_GET['addr'] != "")) + if (x($_GET,'addr') AND ($_GET['addr'] != "")) { $myaddr = hex2bin($_GET['addr']); - elseif (x($_GET,'address') AND ($_GET['address'] != "")) + } elseif (x($_GET,'address') AND ($_GET['address'] != "")) { $myaddr = $_GET['address']; - elseif (local_user()) { + } elseif (local_user()) { if (strlen($a->path)) { $myaddr = App::get_baseurl() . '/profile/' . $a->user['nickname']; - } - else { + } else { $myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 ); } - } - else { + } else { // last, try a zrl $myaddr = get_my_url(); } @@ -840,8 +838,7 @@ function dfrn_request_content(App &$a) { if ($a->profile['page-flags'] == PAGE_NORMAL) { $tpl = get_markup_template('dfrn_request.tpl'); - } - else { + } else { $tpl = get_markup_template('auto_request.tpl'); } @@ -850,10 +847,12 @@ function dfrn_request_content(App &$a) { // see if we are allowed to have NETWORK_MAIL2 contacts $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); - if(get_config('system','dfrn_only')) - $mail_disabled = 1; - if(! $mail_disabled) { + if (get_config('system','dfrn_only')) { + $mail_disabled = 1; + } + + if (! $mail_disabled) { $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1", intval($a->profile['uid']) ); diff --git a/mod/events.php b/mod/events.php index 1ed04deb0..8281a9766 100644 --- a/mod/events.php +++ b/mod/events.php @@ -354,7 +354,7 @@ function events_content(App &$a) { } } - $events=array(); + $events = array(); // transform the event in a usable array if (dbm::is_result($r)) { diff --git a/mod/group.php b/mod/group.php index bf9009ae0..681bc88cc 100644 --- a/mod/group.php +++ b/mod/group.php @@ -31,8 +31,7 @@ function group_post(App &$a) { if ($r) { goaway(App::get_baseurl() . '/group/' . $r); } - } - else { + } else { notice( t('Could not create group.') . EOL ); } goaway(App::get_baseurl() . '/group'); @@ -92,7 +91,7 @@ function group_content(App &$a) { '$submit' => t('Save Group'), ); - if(($a->argc == 2) && ($a->argv[1] === 'new')) { + if (($a->argc == 2) && ($a->argv[1] === 'new')) { return replace_macros($tpl, $context + array( '$title' => t('Create a group of contacts/friends.'), diff --git a/mod/hcard.php b/mod/hcard.php index 50721720d..d53405009 100644 --- a/mod/hcard.php +++ b/mod/hcard.php @@ -52,4 +52,3 @@ function hcard_init(App &$a) { } } - diff --git a/mod/invite.php b/mod/invite.php index f7f48290c..a7739fc77 100644 --- a/mod/invite.php +++ b/mod/invite.php @@ -120,7 +120,7 @@ function invite_content(App &$a) { if (strlen($dirloc)) { if ($a->config['register_policy'] == REGISTER_CLOSED) { $linktxt = sprintf( t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.'), $dirloc . '/siteinfo'); - } elseif($a->config['register_policy'] != REGISTER_CLOSED) { + } elseif ($a->config['register_policy'] != REGISTER_CLOSED) { $linktxt = sprintf( t('To accept this invitation, please visit and register at %s or any other public Friendica website.'), App::get_baseurl()) . "\r\n" . "\r\n" . sprintf( t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join.'),$dirloc . '/siteinfo'); } diff --git a/mod/item.php b/mod/item.php index bf3aa4c98..0746f0ada 100644 --- a/mod/item.php +++ b/mod/item.php @@ -454,7 +454,7 @@ function item_post(App &$a) { $objecttype = ACTIVITY_OBJ_IMAGE; foreach ($images as $image) { - if (! stristr($image,App::get_baseurl() . '/photo/')) { + if (! stristr($image,App::get_baseurl() . '/photo/')) continue; } $image_uri = substr($image,strrpos($image,'/') + 1); @@ -620,16 +620,17 @@ function item_post(App &$a) { continue; $success = handle_tag($a, $body, $inform, $str_tags, (local_user()) ? local_user() : $profile_uid , $tag, $network); - if($success['replaced']) + if ($success['replaced']) { $tagged[] = $tag; - if(is_array($success['contact']) && intval($success['contact']['prv'])) { + } + if (is_array($success['contact']) && intval($success['contact']['prv'])) { $private_forum = true; $private_id = $success['contact']['id']; } } } - if(($private_forum) && (! $parent) && (! $private)) { + if (($private_forum) && (! $parent) && (! $private)) { // we tagged a private forum in a top level post and the message was public. // Restrict it. $private = 1; @@ -639,8 +640,8 @@ function item_post(App &$a) { $attachments = ''; $match = false; - if(preg_match_all('/(\[attachment\]([0-9]+)\[\/attachment\])/',$body,$match)) { - foreach($match[2] as $mtch) { + if (preg_match_all('/(\[attachment\]([0-9]+)\[\/attachment\])/',$body,$match)) { + foreach ($match[2] as $mtch) { $r = q("SELECT `id`,`filename`,`filesize`,`filetype` FROM `attach` WHERE `uid` = %d AND `id` = %d LIMIT 1", intval($profile_uid), intval($mtch) diff --git a/mod/profile.php b/mod/profile.php index 52ffe8c47..8519f7e82 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -74,24 +74,24 @@ function profile_content(&$a, $update = 0) { $category = $datequery = $datequery2 = ''; - if($a->argc > 2) { - for($x = 2; $x < $a->argc; $x ++) { - if(is_a_date_arg($a->argv[$x])) { - if($datequery) + if ($a->argc > 2) { + for ($x = 2; $x < $a->argc; $x ++) { + if (is_a_date_arg($a->argv[$x])) { + if ($datequery) { $datequery2 = escape_tags($a->argv[$x]); - else + } else { $datequery = escape_tags($a->argv[$x]); - } - else + } else { $category = $a->argv[$x]; + } } } - if(! x($category)) { + if (! x($category)) { $category = ((x($_GET,'category')) ? $_GET['category'] : ''); } - if(get_config('system','block_public') && (! local_user()) && (! remote_user())) { + if (get_config('system','block_public') && (! local_user()) && (! remote_user())) { return login(); } @@ -106,32 +106,30 @@ function profile_content(&$a, $update = 0) { $tab = 'posts'; $o = ''; - if($update) { + if ($update) { // Ensure we've got a profile owner if updating. $a->profile['profile_uid'] = $update; - } - else { - if($a->profile['profile_uid'] == local_user()) { + } else { + if ($a->profile['profile_uid'] == local_user()) { nav_set_selected('home'); } } - $contact = null; $remote_contact = false; $contact_id = 0; - if(is_array($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $v) { - if($v['uid'] == $a->profile['profile_uid']) { + if (is_array($_SESSION['remote'])) { + foreach ($_SESSION['remote'] as $v) { + if ($v['uid'] == $a->profile['profile_uid']) { $contact_id = $v['cid']; break; } } } - if($contact_id) { + if ($contact_id) { $groups = init_groups_visitor($contact_id); $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($contact_id), @@ -143,8 +141,8 @@ function profile_content(&$a, $update = 0) { } } - if(! $remote_contact) { - if(local_user()) { + if (! $remote_contact) { + if (local_user()) { $contact_id = $_SESSION['cid']; $contact = $a->contact; } @@ -152,32 +150,29 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); - if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) { + if ($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) { notice( t('Access to this profile has been restricted.') . EOL); return; } - if(! $update) { - - - if(x($_GET,'tab')) + if (! $update) { + if (x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); $o.=profile_tabs($a, $is_owner, $a->profile['nickname']); - if($tab === 'profile') { + if ($tab === 'profile') { $o .= advanced_profile($a); call_hooks('profile_advanced',$o); return $o; } - $o .= common_friends_visitor_widget($a->profile['profile_uid']); - - if(x($_SESSION,'new_member') && $_SESSION['new_member'] && $is_owner) + if (x($_SESSION,'new_member') && $_SESSION['new_member'] && $is_owner) { $o .= '' . t('Tips for New Members') . '' . EOL; + } $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false); $commvisitor = (($commpage && $remote_contact == true) ? true : false); @@ -185,7 +180,7 @@ function profile_content(&$a, $update = 0) { $a->page['aside'] .= posted_date_widget(App::get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget(App::get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); - if(can_write_wall($a,$a->profile['profile_uid'])) { + if (can_write_wall($a,$a->profile['profile_uid'])) { $x = array( 'is_owner' => $is_owner, @@ -215,7 +210,7 @@ function profile_content(&$a, $update = 0) { $sql_extra = item_permissions_sql($a->profile['profile_uid'],$remote_contact,$groups); - if($update) { + if ($update) { $r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network` FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` @@ -234,16 +229,16 @@ function profile_content(&$a, $update = 0) { } else { $sql_post_table = ""; - if(x($category)) { + if (x($category)) { $sql_post_table = sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ", dbesc(protect_sprintf($category)), intval(TERM_OBJ_POST), intval(TERM_CATEGORY), intval($a->profile['profile_uid'])); //$sql_extra .= protect_sprintf(file_tag_file_query('item',$category,'category')); } - if($datequery) { + if ($datequery) { $sql_extra2 .= protect_sprintf(sprintf(" AND `thread`.`created` <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery)))); } - if($datequery2) { + if ($datequery2) { $sql_extra2 .= protect_sprintf(sprintf(" AND `thread`.`created` >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2)))); } diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 9b1ff8adb..c600dd1f8 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -133,9 +133,9 @@ function profile_photo_post(App &$a) { require_once('include/profile_update.php'); profile_change(); - } - else + } else { notice( t('Unable to process image') . EOL); + } } goaway(App::get_baseurl() . '/profiles'); @@ -146,11 +146,13 @@ function profile_photo_post(App &$a) { $filename = basename($_FILES['userfile']['name']); $filesize = intval($_FILES['userfile']['size']); $filetype = $_FILES['userfile']['type']; - if ($filetype=="") $filetype=guess_image_type($filename); - + if ($filetype == "") { + $filetype = guess_image_type($filename); + } + $maximagesize = get_config('system','maximagesize'); - if(($maximagesize) && ($filesize > $maximagesize)) { + if (($maximagesize) && ($filesize > $maximagesize)) { notice( sprintf(t('Image exceeds size limit of %s'), formatBytes($maximagesize)) . EOL); @unlink($src); return; @@ -159,7 +161,7 @@ function profile_photo_post(App &$a) { $imagedata = @file_get_contents($src); $ph = new Photo($imagedata, $filetype); - if(! $ph->is_valid()) { + if (! $ph->is_valid()) { notice( t('Unable to process image.') . EOL ); @unlink($src); return; @@ -168,7 +170,6 @@ function profile_photo_post(App &$a) { $ph->orient($src); @unlink($src); return profile_photo_crop_ui_head($a, $ph); - } diff --git a/mod/videos.php b/mod/videos.php index 64838998f..433ce5fc6 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -113,7 +113,7 @@ function videos_post(App &$a) { if (($a->argc == 2) && x($_POST,'delete') && x($_POST, 'id')) { // Check if we should do HTML-based delete confirmation - if(!x($_REQUEST,'confirm')) { + if (!x($_REQUEST,'confirm')) { if (x($_REQUEST,'canceled')) { goaway(App::get_baseurl() . '/videos/' . $a->data['user']['nickname']); } @@ -138,7 +138,6 @@ function videos_post(App &$a) { $video_id = $_POST['id']; - $r = q("SELECT `id` FROM `attach` WHERE `uid` = %d AND `id` = '%s' LIMIT 1", intval(local_user()), dbesc($video_id) @@ -409,4 +408,3 @@ function videos_content(App &$a) { $o .= paginate($a); return $o; } - diff --git a/view/theme/duepuntozero/config.php b/view/theme/duepuntozero/config.php index acea9947b..eec76d173 100644 --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@ -42,13 +42,13 @@ function theme_admin_post(App &$a){ /// @TODO $a is no longer used function clean_form(&$a, &$colorset, $user){ $colorset = array( - 'default'=>t('default'), - 'greenzero'=>t('greenzero'), - 'purplezero'=>t('purplezero'), - 'easterbunny'=>t('easterbunny'), - 'darkzero'=>t('darkzero'), - 'comix'=>t('comix'), - 'slackr'=>t('slackr'), + 'default' =>t('default'), + 'greenzero' =>t('greenzero'), + 'purplezero' =>t('purplezero'), + 'easterbunny' =>t('easterbunny'), + 'darkzero' =>t('darkzero'), + 'comix' =>t('comix'), + 'slackr' =>t('slackr'), ); if ($user) { @@ -62,7 +62,7 @@ function clean_form(&$a, &$colorset, $user){ $o .= replace_macros($t, array( '$submit' => t('Submit'), '$baseurl' => App::get_baseurl(), - '$title'=> t("Theme settings"), + '$title' => t("Theme settings"), '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset), )); From 9b6ad2fc4754185708d00d3be4c4a2aebcb73e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?=Date: Tue, 20 Dec 2016 10:39:06 +0100 Subject: [PATCH 08/19] Coding convention: - added curly braces - added space between "if" and brace - also added TODO (old-lost code?) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/hcard.php | 4 ++++ mod/noscrape.php | 1 + mod/profile.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/mod/hcard.php b/mod/hcard.php index d53405009..8d79dd054 100644 --- a/mod/hcard.php +++ b/mod/hcard.php @@ -47,7 +47,11 @@ function hcard_init(App &$a) { header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); $dfrn_pages = array('request', 'confirm', 'notify', 'poll'); +<<<<<<< upstream/develop foreach ($dfrn_pages as $dfrn) { +======= + foreach($dfrn_pages as $dfrn) { +>>>>>>> HEAD~65 $a->page['htmlhead'] .= "\r\n"; } diff --git a/mod/noscrape.php b/mod/noscrape.php index 758ce8ba5..33255f0fa 100644 --- a/mod/noscrape.php +++ b/mod/noscrape.php @@ -26,6 +26,7 @@ function noscrape_init(App &$a) { $keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords); $keywords = explode(',', $keywords); + /// @TODO This query's result is not being used (see below), maybe old-lost code? $r = q("SELECT `photo` FROM `contact` WHERE `self` AND `uid` = %d", intval($a->profile['uid'])); diff --git a/mod/profile.php b/mod/profile.php index 8519f7e82..28b508dc0 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -62,7 +62,11 @@ function profile_init(App &$a) { header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); $dfrn_pages = array('request', 'confirm', 'notify', 'poll'); +<<<<<<< upstream/develop foreach ($dfrn_pages as $dfrn) { +======= + foreach($dfrn_pages as $dfrn) { +>>>>>>> HEAD~65 $a->page['htmlhead'] .= "\r\n"; } $a->page['htmlhead'] .= "\r\n"; From 9fad8109ffafa689ff5b230906d21dec18cd8725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 10:58:55 +0100 Subject: [PATCH 09/19] changed to this: --------------------- function bla (App &$a) { $a->bla = 'stuff'; } --------------------- MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/admin.php | 14 +++++++------- mod/contacts.php | 13 ++++++++----- mod/hcard.php | 4 ---- mod/network.php | 6 ++---- mod/notify.php | 2 -- mod/profile.php | 4 ---- mod/suggest.php | 1 - mod/uexport.php | 1 + 8 files changed, 18 insertions(+), 27 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 48320fb36..e1ccf67ca 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1156,21 +1156,21 @@ function admin_page_dbsync(App &$a) { * @param App $a */ function admin_page_users_post(App &$a){ - $pending = (x($_POST, 'pending') ? $_POST['pending'] : array()); - $users = (x($_POST, 'user') ? $_POST['user'] : array()); - $nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : ''); - $nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : ''); - $nu_email = (x($_POST, 'new_user_email') ? $_POST['new_user_email'] : ''); + $pending = (x($_POST, 'pending') ? $_POST['pending'] : array()); + $users = (x($_POST, 'user') ? $_POST['user'] : array()); + $nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : ''); + $nu_nickname = (x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : ''); + $nu_email = (x($_POST, 'new_user_email') ? $_POST['new_user_email'] : ''); $nu_language = get_config('system', 'language'); check_form_security_token_redirectOnErr('/admin/users', 'admin_users'); - if(!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) { + if (!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) { require_once('include/user.php'); $result = create_user(array('username'=>$nu_name, 'email'=>$nu_email, 'nickname'=>$nu_nickname, 'verified'=>1, 'language'=>$nu_language)); - if(! $result['success']) { + if (! $result['success']) { notice($result['message']); return; } diff --git a/mod/contacts.php b/mod/contacts.php index f709f9d2f..26dfe0607 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -28,19 +28,22 @@ function contacts_init(App &$a) { require_once('include/group.php'); require_once('include/contact_widgets.php'); - if ($_GET['nets'] == "all") - $_GET['nets'] = ""; + if ($_GET['nets'] == "all") { + $_GET['nets'] = ""; + } - if(! x($a->page,'aside')) + if (! x($a->page,'aside')) { $a->page['aside'] = ''; + } - if($contact_id) { + if ($contact_id) { $a->data['contact'] = $r[0]; if (($a->data['contact']['network'] != "") AND ($a->data['contact']['network'] != NETWORK_DFRN)) { $networkname = format_network_name($a->data['contact']['network'],$a->data['contact']['url']); - } else + } else { $networkname = ''; + } $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array( '$name' => htmlentities($a->data['contact']['name']), diff --git a/mod/hcard.php b/mod/hcard.php index 8d79dd054..d53405009 100644 --- a/mod/hcard.php +++ b/mod/hcard.php @@ -47,11 +47,7 @@ function hcard_init(App &$a) { header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); $dfrn_pages = array('request', 'confirm', 'notify', 'poll'); -<<<<<<< upstream/develop foreach ($dfrn_pages as $dfrn) { -======= - foreach($dfrn_pages as $dfrn) { ->>>>>>> HEAD~65 $a->page['htmlhead'] .= "\r\n"; } diff --git a/mod/network.php b/mod/network.php index f43327707..61df38fb1 100644 --- a/mod/network.php +++ b/mod/network.php @@ -25,7 +25,6 @@ function network_init(App &$a) { parse_str($query_string, $query_array); array_shift($query_array); - // fetch last used network view and redirect if needed if (! $is_a_date_query) { $sel_tabs = network_query_get_sel_tab($a); @@ -42,10 +41,9 @@ function network_init(App &$a) { $net_baseurl = '/network'; $net_args = array(); - if($remember_group) { + if ($remember_group) { $net_baseurl .= '/' . $last_sel_groups; // Note that the group number must come before the "/new" tab selection - } - else if($sel_groups !== false) { + } elseif($sel_groups !== false) { $net_baseurl .= '/' . $sel_groups; } diff --git a/mod/notify.php b/mod/notify.php index 2d34821de..2696afaad 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -1,12 +1,10 @@ argc > 2 && $a->argv[1] === 'view' && intval($a->argv[2])) { diff --git a/mod/profile.php b/mod/profile.php index 28b508dc0..8519f7e82 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -62,11 +62,7 @@ function profile_init(App &$a) { header('Link: <' . App::get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false); $dfrn_pages = array('request', 'confirm', 'notify', 'poll'); -<<<<<<< upstream/develop foreach ($dfrn_pages as $dfrn) { -======= - foreach($dfrn_pages as $dfrn) { ->>>>>>> HEAD~65 $a->page['htmlhead'] .= "\r\n"; } $a->page['htmlhead'] .= "\r\n"; diff --git a/mod/suggest.php b/mod/suggest.php index 6ded66286..a6c4b6e56 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -3,7 +3,6 @@ require_once('include/socgraph.php'); require_once('include/contact_widgets.php'); - function suggest_init(App &$a) { if (! local_user()) { return; diff --git a/mod/uexport.php b/mod/uexport.php index 7aa9724d5..1ca046d22 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -9,6 +9,7 @@ function uexport_init(App &$a){ settings_init($a); } +/// @TODO Change space -> tab where wanted function uexport_content(App &$a){ if ($a->argc > 1) { From 820ef8e4c76c606e74f5ec1708bbd0e807faa44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 10:59:06 +0100 Subject: [PATCH 10/19] changed to this: --------------------- function bla (App &$a) { $a->bla = 'stuff'; } --------------------- MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- view/theme/duepuntozero/config.php | 2 -- view/theme/quattro/config.php | 1 - 2 files changed, 3 deletions(-) diff --git a/view/theme/duepuntozero/config.php b/view/theme/duepuntozero/config.php index eec76d173..48c9c8709 100644 --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@ -3,7 +3,6 @@ * Theme settings */ - function theme_content(App &$a){ if (!local_user()) { return; @@ -25,7 +24,6 @@ function theme_post(App &$a){ } } - function theme_admin(App &$a){ $colorset = get_config( 'duepuntozero', 'colorset'); $user = false; diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php index 0c619569a..32f71db01 100644 --- a/view/theme/quattro/config.php +++ b/view/theme/quattro/config.php @@ -29,7 +29,6 @@ function theme_post(App &$a){ } } - function theme_admin(App &$a){ $align = get_config('quattro', 'align' ); $color = get_config('quattro', 'color' ); From 8b8a45b7038f573a2e18e761eeff4f506185af0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 11:27:40 +0100 Subject: [PATCH 11/19] added curly braces + space between "if" and brace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/notify.php | 1 + 1 file changed, 1 insertion(+) diff --git a/mod/notify.php b/mod/notify.php index 2696afaad..bd7a7faf4 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -5,6 +5,7 @@ function notify_init(App &$a) { if (! local_user()) { return; } + $nm = new NotificationsManager(); if ($a->argc > 2 && $a->argv[1] === 'view' && intval($a->argv[2])) { From 8ce20f975c7fc1c27d1981234aefc93b0e7b662a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 12:45:16 +0100 Subject: [PATCH 12/19] Changed $a->get_baseurl() to App::get_baseurl() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/filerm.php | 5 +++++ mod/subthread.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/mod/filerm.php b/mod/filerm.php index 7dbfe2947..7662289ad 100644 --- a/mod/filerm.php +++ b/mod/filerm.php @@ -22,9 +22,14 @@ function filerm_content(App &$a) { file_tag_unsave_file(local_user(),$item_id,$term, $category); } +<<<<<<< upstream/develop if (x($_SESSION,'return_url')) { goaway(App::get_baseurl() . '/' . $_SESSION['return_url']); } +======= + if(x($_SESSION,'return_url')) + goaway(App::get_baseurl() . '/' . $_SESSION['return_url']); +>>>>>>> HEAD~33 killme(); } diff --git a/mod/subthread.php b/mod/subthread.php index c689f7f6c..368619dec 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -86,7 +86,11 @@ function subthread_content(App &$a) { $uri = item_new_uri($a->get_hostname(),$owner_uid); $post_type = (($item['resource-id']) ? t('photo') : t('status')); +<<<<<<< upstream/develop $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ); +======= + $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); +>>>>>>> HEAD~33 $link = xmlify('' . "\n") ; $body = $item['body']; From 3472191b055bdb9a912daceaea1ccd8516137091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 12:45:16 +0100 Subject: [PATCH 13/19] Changed $a->get_baseurl() to App::get_baseurl() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/filerm.php | 5 ----- mod/subthread.php | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mod/filerm.php b/mod/filerm.php index 7662289ad..7dbfe2947 100644 --- a/mod/filerm.php +++ b/mod/filerm.php @@ -22,14 +22,9 @@ function filerm_content(App &$a) { file_tag_unsave_file(local_user(),$item_id,$term, $category); } -<<<<<<< upstream/develop if (x($_SESSION,'return_url')) { goaway(App::get_baseurl() . '/' . $_SESSION['return_url']); } -======= - if(x($_SESSION,'return_url')) - goaway(App::get_baseurl() . '/' . $_SESSION['return_url']); ->>>>>>> HEAD~33 killme(); } diff --git a/mod/subthread.php b/mod/subthread.php index 368619dec..69b7f3a60 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -90,7 +90,10 @@ function subthread_content(App &$a) { $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ); ======= $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); +<<<<<<< upstream/develop >>>>>>> HEAD~33 +======= +>>>>>>> HEAD~32 $link = xmlify('' . "\n") ; $body = $item['body']; From 54905a3d81065915418af7f96953f957bf795300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 17:43:46 +0100 Subject: [PATCH 14/19] added more curly braces + space between "if" and brace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mod/subthread.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mod/subthread.php b/mod/subthread.php index 69b7f3a60..c689f7f6c 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -86,14 +86,7 @@ function subthread_content(App &$a) { $uri = item_new_uri($a->get_hostname(),$owner_uid); $post_type = (($item['resource-id']) ? t('photo') : t('status')); -<<<<<<< upstream/develop $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ); -======= - $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); -<<<<<<< upstream/develop ->>>>>>> HEAD~33 -======= ->>>>>>> HEAD~32 $link = xmlify('' . "\n") ; $body = $item['body']; From ca82678a6da703157a95a815d57649af5066397b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 20 Dec 2016 21:13:50 +0100 Subject: [PATCH 15/19] Continued with coding convention: - added curly braces around conditional code blocks - added space between if/foreach/... and brace - rewrote a code block so if dbm::is_result() fails it will abort, else the id is fetched from INSERT statement - made some SQL keywords upper-cased and added back-ticks to columns/table names Signed-off-by: Roland Haeder --- include/acl_selectors.php | 6 +++--- include/message.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 4c0b610d4..f6c4f947e 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -272,7 +272,7 @@ function prune_deadguys($arr) { $r = q("SELECT `id` FROM `contact` WHERE `id` IN ( " . $str . ") AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 "); - if ($r) { + if (dbm::is_result($r)) { $ret = array(); foreach ($r as $rr) { $ret[] = intval($rr['id']); @@ -585,9 +585,9 @@ function acl_lookup(&$a, $out_type = 'json') { ); echo json_encode($o); killme(); - } - else + } else { $r = array(); + } if (dbm::is_result($r)) { diff --git a/include/message.php b/include/message.php index 3d5d4d33a..5bd611f22 100644 --- a/include/message.php +++ b/include/message.php @@ -153,7 +153,8 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ if ($post_id) { proc_run(PRIORITY_HIGH, "include/notifier.php", "mail", $post_id); return intval($post_id); - } else { + } + else { return -3; } From c1b76e889e4b2ca50abe191c22f3a8bb7a9bfdaf Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 20 Dec 2016 21:15:53 +0100 Subject: [PATCH 16/19] Continued with coding convention: - added curly braces around conditional code blocks - added space between if/foreach/... and brace - rewrote a code block so if dbm::is_result() fails it will abort, else the id is fetched from INSERT statement - made some SQL keywords upper-cased and added back-ticks to columns/table names Signed-off-by: Roland Haeder --- mod/install.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/install.php b/mod/install.php index 9adeac604..f7329592e 100755 --- a/mod/install.php +++ b/mod/install.php @@ -538,7 +538,8 @@ function check_htaccess(&$checks) { $help = t('Url rewrite in .htaccess is not working. Check your server configuration.'); } check_add($checks, t('Url rewrite is working'), $status, true, $help); - } else { + } + else { // cannot check modrewrite if libcurl is not installed /// @TODO Maybe issue warning here? } From 45dd1ccc7bcd8cf9d9218b373042df26dc8a2df4 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 20 Dec 2016 21:15:53 +0100 Subject: [PATCH 17/19] Continued with coding convention: - added curly braces around conditional code blocks - added space between if/foreach/... and brace - rewrote a code block so if dbm::is_result() fails it will abort, else the id is fetched from INSERT statement - made some SQL keywords upper-cased and added back-ticks to columns/table names Signed-off-by: Roland Haeder --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index 0746f0ada..ee532bd99 100644 --- a/mod/item.php +++ b/mod/item.php @@ -454,7 +454,7 @@ function item_post(App &$a) { $objecttype = ACTIVITY_OBJ_IMAGE; foreach ($images as $image) { - if (! stristr($image,App::get_baseurl() . '/photo/')) + if (! stristr($image,App::get_baseurl() . '/photo/')) { continue; } $image_uri = substr($image,strrpos($image,'/') + 1); From 89319d9579bb052e0b105ab6a41d432d0df9b49f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 20 Dec 2016 21:31:05 +0100 Subject: [PATCH 18/19] Continued with coding convention: - added curly braces around conditional code blocks - added space between if/foreach/... and brace - made some SQL keywords upper-cased and added back-ticks to columns/table names Signed-off-by: Roland Haeder --- mod/noscrape.php | 1 - 1 file changed, 1 deletion(-) diff --git a/mod/noscrape.php b/mod/noscrape.php index 33255f0fa..758ce8ba5 100644 --- a/mod/noscrape.php +++ b/mod/noscrape.php @@ -26,7 +26,6 @@ function noscrape_init(App &$a) { $keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords); $keywords = explode(',', $keywords); - /// @TODO This query's result is not being used (see below), maybe old-lost code? $r = q("SELECT `photo` FROM `contact` WHERE `self` AND `uid` = %d", intval($a->profile['uid'])); From 3dbb92c0dcbf087bfded1f84a7aab500c1b4b0c1 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 21 Dec 2016 23:04:09 +0100 Subject: [PATCH 19/19] added curly braces/spaces + replace spaces with tabs to fix code indending (or so?) Signed-off-by: Roland Haeder --- include/message.php | 3 +-- mod/install.php | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/message.php b/include/message.php index 5bd611f22..3d5d4d33a 100644 --- a/include/message.php +++ b/include/message.php @@ -153,8 +153,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ if ($post_id) { proc_run(PRIORITY_HIGH, "include/notifier.php", "mail", $post_id); return intval($post_id); - } - else { + } else { return -3; } diff --git a/mod/install.php b/mod/install.php index f7329592e..382fcefd7 100755 --- a/mod/install.php +++ b/mod/install.php @@ -538,8 +538,7 @@ function check_htaccess(&$checks) { $help = t('Url rewrite in .htaccess is not working. Check your server configuration.'); } check_add($checks, t('Url rewrite is working'), $status, true, $help); - } - else { + } else { // cannot check modrewrite if libcurl is not installed /// @TODO Maybe issue warning here? } @@ -582,7 +581,6 @@ function load_database_rem($v, $i){ } } - function load_database($db) { require_once("include/dbstructure.php");