aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.php8
-rw-r--r--tpl/configure.html4
2 files changed, 6 insertions, 6 deletions
diff --git a/index.php b/index.php
index 2014bcea..07aeaa5b 100644
--- a/index.php
+++ b/index.php
@@ -34,7 +34,7 @@ $GLOBALS['config']['UPDATECHECK_INTERVAL'] = 86400 ; // Updates check frequency
34 // Note: You must have publisher.php in the same directory as Shaarli index.php 34 // Note: You must have publisher.php in the same directory as Shaarli index.php
35$GLOBALS['config']['ARCHIVE_ORG'] = false; // For each link, add a link to an archived version on archive.org 35$GLOBALS['config']['ARCHIVE_ORG'] = false; // For each link, add a link to an archived version on archive.org
36$GLOBALS['config']['ENABLE_RSS_PERMALINKS'] = true; // Enable RSS permalinks by default. This corresponds to the default behavior of shaarli before this was added as an option. 36$GLOBALS['config']['ENABLE_RSS_PERMALINKS'] = true; // Enable RSS permalinks by default. This corresponds to the default behavior of shaarli before this was added as an option.
37$GLOBALS['config']['DISABLE_PUBLIC_LINKS'] = false; 37$GLOBALS['config']['HIDE_PUBLIC_LINKS'] = false;
38// ----------------------------------------------------------------------------------------------- 38// -----------------------------------------------------------------------------------------------
39// You should not touch below (or at your own risks!) 39// You should not touch below (or at your own risks!)
40// Optional config file. 40// Optional config file.
@@ -1460,7 +1460,7 @@ function renderPage()
1460 $GLOBALS['privateLinkByDefault']=!empty($_POST['privateLinkByDefault']); 1460 $GLOBALS['privateLinkByDefault']=!empty($_POST['privateLinkByDefault']);
1461 $GLOBALS['config']['ENABLE_RSS_PERMALINKS']= !empty($_POST['enableRssPermalinks']); 1461 $GLOBALS['config']['ENABLE_RSS_PERMALINKS']= !empty($_POST['enableRssPermalinks']);
1462 $GLOBALS['config']['ENABLE_UPDATECHECK'] = !empty($_POST['updateCheck']); 1462 $GLOBALS['config']['ENABLE_UPDATECHECK'] = !empty($_POST['updateCheck']);
1463 $GLOBALS['config']['DISABLE_PUBLIC_LINKS'] = !empty($_POST['disablePublicLinks']); 1463 $GLOBALS['config']['HIDE_PUBLIC_LINKS'] = !empty($_POST['hidePublicLinks']);
1464 writeConfig(); 1464 writeConfig();
1465 echo '<script>alert("Configuration was saved.");document.location=\'?do=tools\';</script>'; 1465 echo '<script>alert("Configuration was saved.");document.location=\'?do=tools\';</script>';
1466 exit; 1466 exit;
@@ -1902,7 +1902,7 @@ function buildLinkList($PAGE,$LINKSDB)
1902 $search_type='permalink'; 1902 $search_type='permalink';
1903 } 1903 }
1904 // We chose to disable all private links and the user isn't logged in, do not return any link. 1904 // We chose to disable all private links and the user isn't logged in, do not return any link.
1905 else if ($GLOBALS['config']['DISABLE_PUBLIC_LINKS'] && !isLoggedIn()) 1905 else if ($GLOBALS['config']['HIDE_PUBLIC_LINKS'] && !isLoggedIn())
1906 $linksToDisplay = array(); 1906 $linksToDisplay = array();
1907 else 1907 else
1908 $linksToDisplay = $LINKSDB; // Otherwise, display without filtering. 1908 $linksToDisplay = $LINKSDB; // Otherwise, display without filtering.
@@ -2334,7 +2334,7 @@ function writeConfig()
2334 $config .= '$GLOBALS[\'privateLinkByDefault\']='.var_export($GLOBALS['privateLinkByDefault'],true).'; '; 2334 $config .= '$GLOBALS[\'privateLinkByDefault\']='.var_export($GLOBALS['privateLinkByDefault'],true).'; ';
2335 $config .= '$GLOBALS[\'config\'][\'ENABLE_RSS_PERMALINKS\']='.var_export($GLOBALS['config']['ENABLE_RSS_PERMALINKS'], true).'; '; 2335 $config .= '$GLOBALS[\'config\'][\'ENABLE_RSS_PERMALINKS\']='.var_export($GLOBALS['config']['ENABLE_RSS_PERMALINKS'], true).'; ';
2336 $config .= '$GLOBALS[\'config\'][\'ENABLE_UPDATECHECK\']='.var_export($GLOBALS['config']['ENABLE_UPDATECHECK'], true).'; '; 2336 $config .= '$GLOBALS[\'config\'][\'ENABLE_UPDATECHECK\']='.var_export($GLOBALS['config']['ENABLE_UPDATECHECK'], true).'; ';
2337 $config .= '$GLOBALS[\'config\'][\'DISABLE_PUBLIC_LINKS\']='.var_export($GLOBALS['config']['DISABLE_PUBLIC_LINKS'], true).'; '; 2337 $config .= '$GLOBALS[\'config\'][\'HIDE_PUBLIC_LINKS\']='.var_export($GLOBALS['config']['HIDE_PUBLIC_LINKS'], true).'; ';
2338 $config .= ' ?>'; 2338 $config .= ' ?>';
2339 if (!file_put_contents($GLOBALS['config']['CONFIG_FILE'],$config) || strcmp(file_get_contents($GLOBALS['config']['CONFIG_FILE']),$config)!=0) 2339 if (!file_put_contents($GLOBALS['config']['CONFIG_FILE'],$config) || strcmp(file_get_contents($GLOBALS['config']['CONFIG_FILE']),$config)!=0)
2340 { 2340 {
diff --git a/tpl/configure.html b/tpl/configure.html
index 01f846cc..e4bd0760 100644
--- a/tpl/configure.html
+++ b/tpl/configure.html
@@ -28,9 +28,9 @@
28 </td> 28 </td>
29 </tr> 29 </tr>
30 <tr> 30 <tr>
31 <td valign="top"><b>Disable public links</b></td> 31 <td valign="top"><b>Hide public links</b></td>
32 <td> 32 <td>
33 <input type="checkbox" name="disablePublicLinks" id="disablePublicLinks" {if="!empty($GLOBALS['config']['DISABLE_PUBLIC_LINKS'])"}checked{/if}/><label for="disablePublicLinks">&nbsp; 33 <input type="checkbox" name="hidePublicLinks" id="hidePublicLinks" {if="!empty($GLOBALS['config']['HIDE_PUBLIC_LINKS'])"}checked{/if}/><label for="hidePublicLinks">&nbsp;
34 Do not show any links if the user is not logged in.</label> 34 Do not show any links if the user is not logged in.</label>
35 </td> 35 </td>
36 </tr> 36 </tr>