change wording and variable names for "Hide public links" feature
This commit is contained in:
parent
0c45b01cc2
commit
caee7ff9cc
2 changed files with 6 additions and 6 deletions
|
@ -34,7 +34,7 @@
|
|||
// Note: You must have publisher.php in the same directory as Shaarli index.php
|
||||
$GLOBALS['config']['ARCHIVE_ORG'] = false; // For each link, add a link to an archived version on archive.org
|
||||
$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.
|
||||
$GLOBALS['config']['DISABLE_PUBLIC_LINKS'] = false;
|
||||
$GLOBALS['config']['HIDE_PUBLIC_LINKS'] = false;
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
// You should not touch below (or at your own risks!)
|
||||
// Optional config file.
|
||||
|
@ -1460,7 +1460,7 @@ function renderPage()
|
|||
$GLOBALS['privateLinkByDefault']=!empty($_POST['privateLinkByDefault']);
|
||||
$GLOBALS['config']['ENABLE_RSS_PERMALINKS']= !empty($_POST['enableRssPermalinks']);
|
||||
$GLOBALS['config']['ENABLE_UPDATECHECK'] = !empty($_POST['updateCheck']);
|
||||
$GLOBALS['config']['DISABLE_PUBLIC_LINKS'] = !empty($_POST['disablePublicLinks']);
|
||||
$GLOBALS['config']['HIDE_PUBLIC_LINKS'] = !empty($_POST['hidePublicLinks']);
|
||||
writeConfig();
|
||||
echo '<script>alert("Configuration was saved.");document.location=\'?do=tools\';</script>';
|
||||
exit;
|
||||
|
@ -1902,7 +1902,7 @@ function buildLinkList($PAGE,$LINKSDB)
|
|||
$search_type='permalink';
|
||||
}
|
||||
// We chose to disable all private links and the user isn't logged in, do not return any link.
|
||||
else if ($GLOBALS['config']['DISABLE_PUBLIC_LINKS'] && !isLoggedIn())
|
||||
else if ($GLOBALS['config']['HIDE_PUBLIC_LINKS'] && !isLoggedIn())
|
||||
$linksToDisplay = array();
|
||||
else
|
||||
$linksToDisplay = $LINKSDB; // Otherwise, display without filtering.
|
||||
|
@ -2334,7 +2334,7 @@ function writeConfig()
|
|||
$config .= '$GLOBALS[\'privateLinkByDefault\']='.var_export($GLOBALS['privateLinkByDefault'],true).'; ';
|
||||
$config .= '$GLOBALS[\'config\'][\'ENABLE_RSS_PERMALINKS\']='.var_export($GLOBALS['config']['ENABLE_RSS_PERMALINKS'], true).'; ';
|
||||
$config .= '$GLOBALS[\'config\'][\'ENABLE_UPDATECHECK\']='.var_export($GLOBALS['config']['ENABLE_UPDATECHECK'], true).'; ';
|
||||
$config .= '$GLOBALS[\'config\'][\'DISABLE_PUBLIC_LINKS\']='.var_export($GLOBALS['config']['DISABLE_PUBLIC_LINKS'], true).'; ';
|
||||
$config .= '$GLOBALS[\'config\'][\'HIDE_PUBLIC_LINKS\']='.var_export($GLOBALS['config']['HIDE_PUBLIC_LINKS'], true).'; ';
|
||||
$config .= ' ?>';
|
||||
if (!file_put_contents($GLOBALS['config']['CONFIG_FILE'],$config) || strcmp(file_get_contents($GLOBALS['config']['CONFIG_FILE']),$config)!=0)
|
||||
{
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><b>Disable public links</b></td>
|
||||
<td valign="top"><b>Hide public links</b></td>
|
||||
<td>
|
||||
<input type="checkbox" name="disablePublicLinks" id="disablePublicLinks" {if="!empty($GLOBALS['config']['DISABLE_PUBLIC_LINKS'])"}checked{/if}/><label for="disablePublicLinks">
|
||||
<input type="checkbox" name="hidePublicLinks" id="hidePublicLinks" {if="!empty($GLOBALS['config']['HIDE_PUBLIC_LINKS'])"}checked{/if}/><label for="hidePublicLinks">
|
||||
Do not show any links if the user is not logged in.</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue