aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/index.php b/index.php
index e2c68869..1a924867 100644
--- a/index.php
+++ b/index.php
@@ -89,7 +89,7 @@ header("Cache-Control: post-check=0, pre-check=0", false);
89header("Pragma: no-cache"); 89header("Pragma: no-cache");
90 90
91// Directories creations (Note that your web host may require different rights than 705.) 91// Directories creations (Note that your web host may require different rights than 705.)
92if (!is_writable(realpath(dirname(__FILE__)))) die('<pre>ERROR: Shaarli does not have the right to write in its own directory ('.realpath(dirname(__FILE__)).').</pre>'); 92if (!is_writable(realpath(dirname(__FILE__)))) die('<pre>ERROR: Shaarli does not have the right to write in its own directory.</pre>');
93 93
94// Handling of old config file which do not have the new parameters. 94// Handling of old config file which do not have the new parameters.
95if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); 95if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl());
@@ -118,7 +118,7 @@ function checkphpversion()
118 if (version_compare(PHP_VERSION, '5.1.0') < 0) 118 if (version_compare(PHP_VERSION, '5.1.0') < 0)
119 { 119 {
120 header('Content-Type: text/plain; charset=utf-8'); 120 header('Content-Type: text/plain; charset=utf-8');
121 echo 'Your server supports PHP '.PHP_VERSION.'. Shaarli requires at least php 5.1.0, and thus cannot run. Sorry.'; 121 echo 'Your PHP version is obsolete! Shaarli requires at least php 5.1.0, and thus cannot run. Sorry. Your PHP version has known security vulnerabilities and should be updated as soon as possible.';
122 exit; 122 exit;
123 } 123 }
124} 124}
@@ -1177,10 +1177,7 @@ function showDaily()
1177 $PAGE = new pageBuilder; 1177 $PAGE = new pageBuilder;
1178 $PAGE->assign('linksToDisplay',$linksToDisplay); 1178 $PAGE->assign('linksToDisplay',$linksToDisplay);
1179 $PAGE->assign('linkcount',count($LINKSDB)); 1179 $PAGE->assign('linkcount',count($LINKSDB));
1180 $PAGE->assign('col1',$columns[0]); 1180 $PAGE->assign('cols', $columns);
1181 $PAGE->assign('col1',$columns[0]);
1182 $PAGE->assign('col2',$columns[1]);
1183 $PAGE->assign('col3',$columns[2]);
1184 $PAGE->assign('day',utf8_encode(strftime('%A %d, %B %Y',linkdate2timestamp($day.'_000000')))); 1181 $PAGE->assign('day',utf8_encode(strftime('%A %d, %B %Y',linkdate2timestamp($day.'_000000'))));
1185 $PAGE->assign('previousday',$previousday); 1182 $PAGE->assign('previousday',$previousday);
1186 $PAGE->assign('nextday',$nextday); 1183 $PAGE->assign('nextday',$nextday);
@@ -2171,13 +2168,13 @@ function templateTZform($ptz=false)
2171 $continent=substr($tz,0,$spos); $city=substr($tz,$spos+1); 2168 $continent=substr($tz,0,$spos); $city=substr($tz,$spos+1);
2172 $continents[$continent]=1; 2169 $continents[$continent]=1;
2173 if (!isset($cities[$continent])) $cities[$continent]=''; 2170 if (!isset($cities[$continent])) $cities[$continent]='';
2174 $cities[$continent].='<option value="'.$city.'"'.($pcity==$city?'selected':'').'>'.$city.'</option>'; 2171 $cities[$continent].='<option value="'.$city.'"'.($pcity==$city?' selected':'').'>'.$city.'</option>';
2175 } 2172 }
2176 } 2173 }
2177 $continents_html = ''; 2174 $continents_html = '';
2178 $continents = array_keys($continents); 2175 $continents = array_keys($continents);
2179 foreach($continents as $continent) 2176 foreach($continents as $continent)
2180 $continents_html.='<option value="'.$continent.'"'.($pcontinent==$continent?'selected':'').'>'.$continent.'</option>'; 2177 $continents_html.='<option value="'.$continent.'"'.($pcontinent==$continent?' selected':'').'>'.$continent.'</option>';
2181 $cities_html = $cities[$pcontinent]; 2178 $cities_html = $cities[$pcontinent];
2182 $timezone_form = "Continent: <select name=\"continent\" id=\"continent\" onChange=\"onChangecontinent();\">${continents_html}</select>"; 2179 $timezone_form = "Continent: <select name=\"continent\" id=\"continent\" onChange=\"onChangecontinent();\">${continents_html}</select>";
2183 $timezone_form .= "&nbsp;&nbsp;&nbsp;&nbsp;City: <select name=\"city\" id=\"city\">${cities[$pcontinent]}</select><br />"; 2180 $timezone_form .= "&nbsp;&nbsp;&nbsp;&nbsp;City: <select name=\"city\" id=\"city\">${cities[$pcontinent]}</select><br />";