Issues (1270)

1
<?php
2
    if (file_exists("install") && !file_exists("config.php")) {
3
        header("Location: install/");
4
    }
5
6
    set_include_path(dirname(__FILE__)."/include".PATH_SEPARATOR.
7
        get_include_path());
8
9
    if (!file_exists("config.php")) {
10
        print "<b>Fatal Error</b>: You forgot to copy
11
		<b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
12
        exit;
13
    }
14
15
    require_once "autoload.php";
16
    require_once "sessions.php";
17
    require_once "functions.php";
18
    require_once "sanity_check.php";
19
    require_once "config.php";
20
    require_once "db-prefs.php";
21
22
    if (!init_plugins()) {
23
        return;
24
    }
25
26
    login_sequence();
27
28
    header('Content-Type: text/html; charset=utf-8');
29
?>
30
<!DOCTYPE html>
31
<html>
32
<head>
33
	<title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title>
34
    <meta name="viewport" content="initial-scale=1,width=device-width" />
35
36
	<?php if ($_SESSION["uid"]) {
37
        $theme = get_pref("USER_CSS_THEME", false, false);
38
        if ($theme && theme_exists("$theme")) {
39
            echo stylesheet_tag(get_theme_path($theme), 'theme_css');
40
        }
41
    }
42
    ?>
43
44
	<?php print_user_stylesheet() ?>
45
46
	<link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
47
	<link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" />
48
49
	<script>
50
		dojoConfig = {
51
			async: true,
52
			cacheBust: "<?php echo get_scripts_timestamp(); ?>",
53
			packages: [
54
				{ name: "lib", location: "../" },
55
				{ name: "fox", location: "../../js" },
56
			]
57
		};
58
	</script>
59
60
	<?php
61
    foreach (array("lib/prototype.js",
62
                "lib/scriptaculous/scriptaculous.js?load=effects,controls",
63
                "lib/dojo/dojo.js",
64
                "lib/dojo/tt-rss-layer.js",
65
                "js/common.js",
66
                "js/prefs.js",
67
                "errors.php?mode=js") as $jsfile) {
68
69
        echo javascript_tag($jsfile);
70
71
    } ?>
72
73
    <script type="text/javascript">
74
		require({cache:{}});
75
    </script>
76
77
	<script type="text/javascript">
78
	<?php
79
        foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
80
            if (method_exists($p, "get_prefs_js")) {
81
                $script = $p->get_prefs_js();
82
83
                if ($script) {
84
                    echo "try {
85
					    $script
86
					} catch (e) {
87
                        console.warn('failed to initialize plugin JS: $n', e);
88
                    }";
89
                }
90
            }
91
        }
92
93
        init_js_translations();
94
    ?>
95
	</script>
96
97
	<style type="text/css">
98
		@media (prefers-color-scheme: dark) {
99
			body {
100
				background : #303030;
101
			}
102
		}
103
104
		body.css_loading * {
105
			display : none;
106
		}
107
	</style>
108
109
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
110
</head>
111
112
<body class="flat ttrss_main ttrss_prefs css_loading">
113
114
<div id="notify" class="notify"></div>
115
<div id="cmdline" style="display : none"></div>
116
117
<div id="overlay">
118
	<div id="overlay_inner">
119
		<?php echo __("Loading, please wait...") ?>
120
		<div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
121
	     progress="0" maximum="100">
122
		</div>
123
		<noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript>
0 ignored issues
show
The call to print_error() has too many arguments starting with 'Javascript is disabled. Please enable it.'. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

123
		<noscript><br/><?php /** @scrutinizer ignore-call */ print_error('Javascript is disabled. Please enable it.') ?></noscript>

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
124
	</div>
125
</div>
126
127
<div id="header">
128
	<!-- <a href='#' onclick="showHelp()"><?php echo __("Keyboard shortcuts") ?></a> | -->
129
	<a href="#" onclick="document.location.href = 'index.php'"><?php echo __('Exit preferences') ?></a>
130
</div>
131
132
<div id="main" dojoType="dijit.layout.BorderContainer">
133
    <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs">
134
        <div id="genConfigTab" dojoType="dijit.layout.ContentPane"
135
            href="backend.php?op=pref-prefs"
136
            title="<i class='material-icons'>settings</i> <?php echo __('Preferences') ?>"></div>
137
        <div id="feedConfigTab" dojoType="dijit.layout.ContentPane"
138
            href="backend.php?op=pref-feeds"
139
            title="<i class='material-icons'>rss_feed</i>  <?php echo __('Feeds') ?>"></div>
140
        <div id="filterConfigTab" dojoType="dijit.layout.ContentPane"
141
            style="padding : 0px"
142
            href="backend.php?op=pref-filters"
143
            title="<i class='material-icons'>filter_list1</i> <?php echo __('Filters') ?>"></div>
144
        <div id="labelConfigTab" dojoType="dijit.layout.ContentPane"
145
            style="padding : 0px"
146
            href="backend.php?op=pref-labels"
147
            title="<i class='material-icons'>label_outline1</i> <?php echo __('Labels') ?>"></div>
148
        <?php if ($_SESSION["access_level"] >= 10) { ?>
149
            <div id="userConfigTab" dojoType="dijit.layout.ContentPane"
150
                style="padding : 0px"
151
                href="backend.php?op=pref-users"
152
                title="<i class='material-icons'>person</i> <?php echo __('Users') ?>"></div>
153
            <div id="systemConfigTab" dojoType="dijit.layout.ContentPane"
154
                href="backend.php?op=pref-system"
155
                title="<i class='material-icons'>info_outline</i> <?php echo __('System') ?>"></div>
156
        <?php } ?>
157
        <?php
158
            PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TABS,
159
                "hook_prefs_tabs", false);
160
        ?>
161
        </div>
162
    <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom">
163
        <a class="text-muted" target="_blank" href="http://tt-rss.org/">
164
        Tiny Tiny RSS</a> v<?php echo get_version() ?>
165
        &copy; 2005-<?php echo date('Y') ?>
166
        <a class="text-muted" target="_blank"
167
        href="http://fakecake.org/">Andrew Dolgov</a>
168
    </div> <!-- footer -->
169
</div>
170
171
</body>
172
</html>
173