@@ -1250,7 +1250,7 @@ class=VALUES(class),
12501250function intropage_favourite_graph ($ fav_graph_id , $ fav_graph_timespan ) {
12511251 global $ config , $ graph_timeshifts ;
12521252
1253- $ lines = read_user_setting ( ' intropage_number_of_lines ' , read_config_option ( ' intropage_number_of_lines ' ), false , $ _SESSION ['sess_user_id ' ]);
1253+ $ lines = intropage_get_lines ( $ _SESSION ['sess_user_id ' ]);
12541254
12551255 if ($ lines == 5 ) {
12561256 $ graph_height = 100 ;
@@ -1298,7 +1298,7 @@ function intropage_favourite_graph($fav_graph_id, $fav_graph_timespan) {
12981298function intropage_prepare_graph ($ dispdata , $ user_id ) {
12991299 global $ config ;
13001300
1301- $ lines = read_user_setting ( ' intropage_number_of_lines ' , read_config_option ( ' intropage_number_of_lines ' ), false , $ user_id );
1301+ $ lines = intropage_get_lines ( $ user_id );
13021302
13031303 if ($ lines == 5 ) {
13041304 $ graph_height = 180 ;
@@ -2096,7 +2096,7 @@ function human_readable($bytes, $decimal = true, $precision = 2) {
20962096}
20972097
20982098function get_panel_lines_count ($ height , $ user_id ) {
2099- $ lines = read_user_setting ( ' intropage_number_of_lines ' , read_config_option ( ' intropage_number_of_lines ' ), false , $ user_id );
2099+ $ lines = intropage_get_lines ( $ user_id );
21002100
21012101 if (!is_numeric ($ lines )) {
21022102 $ lines = 5 ;
@@ -2108,3 +2108,13 @@ function get_panel_lines_count($height, $user_id) {
21082108
21092109 return $ lines ;
21102110}
2111+
2112+ function intropage_get_lines ($ user_id ) {
2113+ $ lines = read_user_setting ('intropage_number_of_lines ' , read_config_option ('intropage_number_of_lines ' ), false , $ user_id );
2114+
2115+ if (!is_numeric ($ lines ) || $ lines <= 0 ) {
2116+ $ lines = 5 ;
2117+ }
2118+
2119+ return $ lines ;
2120+ }
0 commit comments