From: Roland Häder Date: Thu, 22 Dec 2016 10:37:23 +0000 (+0100) Subject: Merge branch 'rewrites/app_get_baseurl_static' into develop X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=20e71d21a6206c03f2137eb82edf8f8b3bc644f2;p=friendica.git Merge branch 'rewrites/app_get_baseurl_static' into develop Signed-off-by: Roland Häder Conflicts: mod/admin.php mod/bookmarklet.php mod/community.php mod/contacts.php mod/crepair.php mod/editpost.php mod/events.php mod/install.php mod/lostpass.php mod/network.php mod/notify.php mod/suggest.php mod/uexport.php mod/videos.php view/theme/duepuntozero/config.php view/theme/frio/config.php view/theme/quattro/config.php view/theme/vier/config.php --- 20e71d21a6206c03f2137eb82edf8f8b3bc644f2 diff --cc mod/crepair.php index 2661deaeed,59b92df0a7..c141958e8b --- a/mod/crepair.php +++ b/mod/crepair.php @@@ -30,8 -30,7 +30,7 @@@ function crepair_init(App &$a) } } - -function crepair_post(&$a) { +function crepair_post(App &$a) { if (! local_user()) { return; } diff --cc mod/install.php index 80a4cb799e,b13da8c28f..9adeac604e --- a/mod/install.php +++ b/mod/install.php @@@ -565,8 -565,7 +565,7 @@@ function check_imagik(&$checks) } } - -function manual_config(&$a) { +function manual_config(App &$a) { $data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8'); $o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'); $o .= ""; diff --cc mod/network.php index 6c9bf75799,cce511ae19..f433277076 --- a/mod/network.php +++ b/mod/network.php @@@ -6,12 -6,12 +6,13 @@@ function network_init(App &$a) } $is_a_date_query = false; -- if(x($_GET['cid']) && intval($_GET['cid']) != 0) ++ if (x($_GET['cid']) && intval($_GET['cid']) != 0) { $cid = $_GET['cid']; ++ } -- if($a->argc > 1) { -- for($x = 1; $x < $a->argc; $x ++) { -- if(is_a_date_arg($a->argv[$x])) { ++ if ($a->argc > 1) { ++ for ($x = 1; $x < $a->argc; $x ++) { ++ if (is_a_date_arg($a->argv[$x])) { $is_a_date_query = true; break; } @@@ -26,7 -26,7 +27,7 @@@ // fetch last used network view and redirect if needed -- if(! $is_a_date_query) { ++ if (! $is_a_date_query) { $sel_tabs = network_query_get_sel_tab($a); $sel_nets = network_query_get_sel_net(); $sel_groups = network_query_get_sel_group($a); diff --cc mod/suggest.php index 4c08db8b6c,0004128a1a..6ded66286a --- a/mod/suggest.php +++ b/mod/suggest.php @@@ -16,8 -16,8 +16,8 @@@ function suggest_init(App &$a) // so add any arguments as hidden inputs $query = explode_querystring($a->query_string); $inputs = array(); -- foreach($query['args'] as $arg) { -- if(strpos($arg, 'confirm=') === false) { ++ foreach ($query['args'] as $arg) { ++ if (strpos($arg, 'confirm=') === false) { $arg_parts = explode('=', $arg); $inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]); } diff --cc mod/videos.php index 00c7c6dfa1,dbfc044ea0..64838998f1 --- a/mod/videos.php +++ b/mod/videos.php @@@ -167,8 -167,8 +167,9 @@@ function videos_post(App &$a) $url = App::get_baseurl(); $drop_id = intval($i[0]['id']); -- if($i[0]['visible']) ++ if ($i[0]['visible']) { proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id); ++ } } } diff --cc view/theme/duepuntozero/config.php index 485e4c233e,749a377fc6..acea9947bf --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@@ -4,8 -4,8 +4,7 @@@ */ -- -function theme_content(&$a){ +function theme_content(App &$a){ if (!local_user()) { return; } diff --cc view/theme/quattro/config.php index 1a5a9c0213,9a08adbaf9..0c619569a0 --- a/view/theme/quattro/config.php +++ b/view/theme/quattro/config.php @@@ -3,9 -3,9 +3,7 @@@ * Theme settings */ -- -- -function theme_content(&$a){ +function theme_content(App &$a){ if (!local_user()) { return; } @@@ -32,11 -32,11 +30,11 @@@ function theme_post(App &$a) } -function theme_admin(&$a){ +function theme_admin(App &$a){ $align = get_config('quattro', 'align' ); $color = get_config('quattro', 'color' ); -- $tfs = get_config("quattro","tfs"); -- $pfs = get_config("quattro","pfs"); ++ $tfs = get_config("quattro","tfs"); ++ $pfs = get_config("quattro","pfs"); return quattro_form($a,$align, $color, $tfs, $pfs); } @@@ -45,31 -45,31 +43,35 @@@ function theme_admin_post(App &$a) if (isset($_POST['quattro-settings-submit'])){ set_config('quattro', 'align', $_POST['quattro_align']); set_config('quattro', 'color', $_POST['quattro_color']); -- set_config('quattro', 'tfs', $_POST['quattro_tfs']); ++ set_config('quattro', 'tfs', $_POST['quattro_tfs']); set_config('quattro', 'pfs', $_POST['quattro_pfs']); } } /// @TODO $a is no longer used here --function quattro_form(&$a, $align, $color, $tfs, $pfs){ ++function quattro_form(App &$a, $align, $color, $tfs, $pfs){ $colors = array( -- "dark"=>"Quattro", -- "lilac"=>"Lilac", -- "green"=>"Green" ++ "dark" => "Quattro", ++ "lilac" => "Lilac", ++ "green" => "Green", ); -- -- if ($tfs===false) $tfs="20"; -- if ($pfs===false) $pfs="12"; -- ++ ++ if ($tfs === false) { ++ $tfs = "20"; ++ } ++ if ($pfs === false) { ++ $pfs = "12"; ++ } ++ $t = get_markup_template("theme_settings.tpl" ); $o .= replace_macros($t, array( -- '$submit' => t('Submit'), ++ '$submit' => t('Submit'), '$baseurl' => App::get_baseurl(), -- '$title' => t("Theme settings"), -- '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))), -- '$color' => array('quattro_color', t('Color scheme'), $color, '', $colors), -- '$pfs' => array('quattro_pfs', t('Posts font size'), $pfs), -- '$tfs' => array('quattro_tfs',t('Textareas font size'), $tfs), ++ '$title' => t("Theme settings"), ++ '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))), ++ '$color' => array('quattro_color', t('Color scheme'), $color, '', $colors), ++ '$pfs' => array('quattro_pfs', t('Posts font size'), $pfs), ++ '$tfs' => array('quattro_tfs',t('Textareas font size'), $tfs), )); return $o; }