diff --git a/lang/en_us.php b/lang/en_us.php index 5142794..7002bae 100644 --- a/lang/en_us.php +++ b/lang/en_us.php @@ -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", ]); \ No newline at end of file diff --git a/lib/getpubtable.php b/lib/getpubtable.php index 3df6b99..c8237e6 100644 --- a/lib/getpubtable.php +++ b/lib/getpubtable.php @@ -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; diff --git a/pages/editpub.php b/pages/editpub.php index 09ebd0b..caeaae2 100644 --- a/pages/editpub.php +++ b/pages/editpub.php @@ -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 "\n"; } diff --git a/static/js/home.js b/static/js/home.js index 3712688..dc26915 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -47,7 +47,7 @@ var pubtable = $('#pubtable').DataTable({ row.stylename, row.columns, row.pagesize, - row.permname + row.visibility ]); }); return JSON.stringify(json);