Skip to content

Commit

Permalink
Rename theme 'hidden' files to hidden.info
Browse files Browse the repository at this point in the history
 - If a file named hidden.info is found in the theme folder it is not
   shown in the editor.
 - In future we can use the contents to difefrentiate between people or
   groups who can see the theme
  • Loading branch information
torinfo committed Jun 30, 2021
1 parent 2962d48 commit eb2e378
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/decision/edithtml.php
Expand Up @@ -114,7 +114,7 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
$d = opendir($theme_folder);
while($f = readdir($d)){
if(is_dir($theme_folder . $f)){
if (file_exists($theme_folder . $f . "/" . $f . ".info") && !file_exists($theme_folder . $f . "/hidden"))
if (file_exists($theme_folder . $f . "/" . $f . ".info") && !file_exists($theme_folder . $f . "/hidden.info"))
{
$info = file($theme_folder . $f . "/" . $f . ".info", FILE_SKIP_EMPTY_LINES);
$themeProperties = new StdClass();
Expand Down
2 changes: 1 addition & 1 deletion modules/site/edithtml.php
Expand Up @@ -114,7 +114,7 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
$d = opendir($theme_folder);
while($f = readdir($d)){
if(is_dir($theme_folder . $f)){
if (file_exists($theme_folder . $f . "/" . $f . ".info") && !file_exists($theme_folder . $f . "/hidden"))
if (file_exists($theme_folder . $f . "/" . $f . ".info") && !file_exists($theme_folder . $f . "/hidden.info"))
{
$info = file($theme_folder . $f . "/" . $f . ".info", FILE_SKIP_EMPTY_LINES);
$themeProperties = new StdClass();
Expand Down
2 changes: 1 addition & 1 deletion modules/xerte/edithtml.php
Expand Up @@ -133,7 +133,7 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
$d = opendir($theme_folder);
while($f = readdir($d)){
if(is_dir($theme_folder . $f)){
if (file_exists($theme_folder . $f . "/" . $f . ".info") && !file_exists($theme_folder . $f . "/hidden"))
if (file_exists($theme_folder . $f . "/" . $f . ".info") && !file_exists($theme_folder . $f . "/hidden.info"))
{
$info = file($theme_folder . $f . "/" . $f . ".info", FILE_SKIP_EMPTY_LINES);
$themeProperties = new StdClass();
Expand Down

0 comments on commit eb2e378

Please sign in to comment.