From b3054f023a98d52f809c85cd36f6d54032f576f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Thu, 29 Mar 2018 16:30:43 +0200
Subject: [PATCH] refactor: rename JSINFO.DOKU_UHN and JSINFO.DOKU_UHC

This should make their purpose more obvious.
---
 inc/template.php | 4 ++--
 lib/exe/js.php   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/inc/template.php b/inc/template.php
index 720513b0f..75f2c1245 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -363,8 +363,8 @@ function _tpl_ensureJSINFO() {
     $JSINFO['id']                    = $ID;
     $JSINFO['namespace']             = (string) $INFO['namespace'];
     $JSINFO['ACT']                   = act_clean($ACT);
-    $JSINFO['DOKU_UHN']              = (int) useHeading('navigation');
-    $JSINFO['DOKU_UHC']              = (int) useHeading('content');
+    $JSINFO['useHeadingNavigation']  = (int) useHeading('navigation');
+    $JSINFO['useHeadingContent']     = (int) useHeading('content');
 }
 
 /**
diff --git a/lib/exe/js.php b/lib/exe/js.php
index c6beef745..3ccc1d66b 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -99,8 +99,8 @@ function js_out(){
                  'secure' => $conf['securecookie'] && is_ssl()
             )).";";
     // FIXME: Move those to JSINFO
-    print "Object.defineProperty(window, 'DOKU_UHN', { get: function() { console.warn('Using DOKU_UHN is deprecated. Please use JSINFO.DOKU_UHN instead'); return JSINFO.DOKU_UHN; } });";
-    print "Object.defineProperty(window, 'DOKU_UHC', { get: function() { console.warn('Using DOKU_UHC is deprecated. Please use JSINFO.DOKU_UHC instead'); return JSINFO.DOKU_UHC; } });";
+    print "Object.defineProperty(window, 'DOKU_UHN', { get: function() { console.warn('Using DOKU_UHN is deprecated. Please use JSINFO.useHeadingNavigation instead'); return JSINFO.useHeadingNavigation; } });";
+    print "Object.defineProperty(window, 'DOKU_UHC', { get: function() { console.warn('Using DOKU_UHC is deprecated. Please use JSINFO.useHeadingContent instead'); return JSINFO.useHeadingContent; } });";
 
     // load JS specific translations
     $lang['js']['plugins'] = js_pluginstrings();
-- 
GitLab