aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2013-04-04 09:25:40 -0700
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2013-04-04 09:25:40 -0700
commit56dacad5074a21ae65fbf4fd6a625f259cc6d1f9 (patch)
tree6a0e4391026e62254ecda9b9b59ee651e93ec943 /index.php
parent634cf566f5d6aa92ca2c409932181a76bcfb91d0 (diff)
parent1f1a6157aa480553afba0e1ed2537fff94dc7a6b (diff)
downloadwallabag-56dacad5074a21ae65fbf4fd6a625f259cc6d1f9.tar.gz
wallabag-56dacad5074a21ae65fbf4fd6a625f259cc6d1f9.tar.zst
wallabag-56dacad5074a21ae65fbf4fd6a625f259cc6d1f9.zip
Merge pull request #5 from fatihorhan/master
Some fixes and improvements
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.php b/index.php
index 9e6e2256..d89fa41c 100755
--- a/index.php
+++ b/index.php
@@ -53,7 +53,11 @@ switch ($action) {
53} 53}
54 54
55function url(){ 55function url(){
56 $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; 56 $protocol = "http";
57 if(isset($_SERVER['HTTPS']))
58 if($_SERVER['HTTPS'] != "off")
59 $protocol = "https";
60
57 return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 61 return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
58} 62}
59?> 63?>
@@ -80,7 +84,7 @@ function url(){
80 <li><a href="index.php">home</a></li> 84 <li><a href="index.php">home</a></li>
81 <li><a href="#">favorites</a></li> 85 <li><a href="#">favorites</a></li>
82 <li><a href="#">archive</a></li> 86 <li><a href="#">archive</a></li>
83 <li><a href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('<? echo url()?>index.php?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li> 87 <li><a href="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('<?php echo url()?>?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li>
84 </ul> 88 </ul>
85 <?php 89 <?php
86 $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?"); 90 $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?");