Use lang strings instead of database strings for visibility
This commit is contained in:
parent
72c2cb2e1b
commit
e33478527e
@ -61,5 +61,9 @@ define("STRINGS", [
|
||||
"delete" => "Delete",
|
||||
"open" => "Open",
|
||||
"page" => "Page",
|
||||
"no permission" => "You don't have permission to do that."
|
||||
"no permission" => "You don't have permission to do that.",
|
||||
"visibility owner" => "Just me",
|
||||
"visibility loggedin" => "People with accounts",
|
||||
"visibility link" => "Anyone with the link",
|
||||
"visibility password" => "Anyone with the link and password",
|
||||
]);
|
@ -121,6 +121,7 @@ for ($i = 0; $i < count($pubs); $i++) {
|
||||
"size" => $pubs[$i]["sizename"],
|
||||
"orientation" => ( $pubs[$i]["landscape"] == 0 ? lang("portrait", false) : lang("landscape", false) )
|
||||
], false);
|
||||
$pubs[$i]["visibility"] = lang("visibility " . strtolower($pubs[$i]["permname"]), false);
|
||||
}
|
||||
$out['pubs'] = $pubs;
|
||||
|
||||
|
@ -132,7 +132,7 @@ if (!is_empty($VARS['id'])) {
|
||||
$perms = $database->select("pub_permissions", ['permid', 'permname']);
|
||||
foreach ($perms as $p) {
|
||||
$pi = $p['permid'];
|
||||
$pn = $p['permname'];
|
||||
$pn = lang("visibility " . strtolower($p['permname']), false);
|
||||
$ps = $pubdata["permid"] == $pi ? " selected" : "";
|
||||
echo "<option value=\"$pi\"$ps>$pn</option>\n";
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ var pubtable = $('#pubtable').DataTable({
|
||||
row.stylename,
|
||||
row.columns,
|
||||
row.pagesize,
|
||||
row.permname
|
||||
row.visibility
|
||||
]);
|
||||
});
|
||||
return JSON.stringify(json);
|
||||
|
Loading…
x
Reference in New Issue
Block a user