Commit 3ee69a0c authored by gisle's avatar gisle
Browse files

Issue #3110233 by gisle: Fixed error on %menu_tail for anon

parent f9e1238c
name = Advanced help
name = Advanced Help
description = Provide extended help and documentation.
core = 7.x
......@@ -9,6 +9,11 @@
*/
function advanced_help_uninstall() {
variable_del('advanced_help_last_cron');
$sam = variable_get('search_active_modules', NULL);
if (!empty($sam)) {
unset($sam['advanced_help']);
variable_set('search_active_modules', $sam);
}
}
/**
......
......@@ -113,9 +113,13 @@ function advanced_help_menu() {
* Implements hook_menu_alter().
*/
function advanced_help_menu_alter(&$callbacks) {
// Check if it advanced_help is registered.
$sam = variable_get('search_active_modules', NULL);
if (!empty($sam['advanced_help']) && 'advanced_help' == $sam['advanced_help']) {
// We need to fix the menu item provided by search module to restrict access.
$callbacks['search/advanced_help/%menu_tail']['access callback'] = 'user_access';
$callbacks['search/advanced_help/%menu_tail']['access arguments'] = array('view advanced help index');
}
}
/**
......
<p>The <strong>Advanced help</strong> module provides a framework that
<p>The <strong>Advanced Help</strong> module provides a framework that
allows help texts to be viewed as integrated into a Drupal
website.</p>
......@@ -29,12 +29,12 @@ project's hierarchy.</p>
<p>May be integrated into <code>hook_help()</code> using companion
module
<a href="https://www.drupal.org/project/advanced_help_hint"><strong>Advanced help hint</strong></a>.</p>
<a href="https://www.drupal.org/project/advanced_help_hint"><strong>Advanced Help Hint</strong></a>.</p>
<h2 id="demo">Demonstration</h2>
<p>The project comes with a small demo module named
<strong>Advanced help example</strong> to demonstrate how it works.
<strong>Advanced Help Example</strong> to demonstrate how it works.
This example also shows how to make use of some of the css classes
provided.</p>
......@@ -43,14 +43,14 @@ advanced help features, see the <strong>Views</strong> project.</p>
<p>For an example of translation of help text, see the
directory <code>translations/help/nb</code> in the <strong>Advanced
help example</strong> submodule. For translation instructions, see the
Help Example</strong> submodule. For translation instructions, see the
section named “<a href="&topic:advanced_help/translation&">Translating
advanced help</a>”.</p>
<h2 id="theme">Theme</h2>
<p>The <strong>Advanced help</strong> and
<strong>Advanced help example</strong> modules implements
<p>The <strong>Advanced Help</strong> and
<strong>Advanced Help Example</strong> modules implements
<code>hook_admin_paths_alter()</code> to render the help
texts rendered using the site's administrative theme.
The <code>help.css</code> provided is created with the
......@@ -71,6 +71,6 @@ help/help_example/*
</pre>
<p>You may attach your own custom css to any project that
uses <strong>Advanced help</strong> to provide help.</p>
uses <strong>Advanced Help</strong> to provide help.</p>
<p>To translate a help-file indexed by <strong>Advanced help</strong>,
<p>To translate a help-file indexed by <strong>Advanced Help</strong>,
first create a directory
<code>translations/help/<em>language</em></code> in the project's
root directory. The <em>language</em> is the language code that
......@@ -29,10 +29,10 @@ linked items, if any, will be translated.</p>
<p>If a topic is not translated, the default (untranslated) version
will be shown instead.</p>
<h2>Translating Advanced help's help files</h2>
<h2>Translating Advanced Help's help files</h2>
<p>If you want to help with the translation of
<strong>Advanced help</strong> help texts for a particular language, look for an issue named named “Translation to XXX” (where
<strong>Advanced Help</strong> help texts for a particular language, look for an issue named named “Translation to XXX” (where
“XXX” is the language you want to translate the help texts to) in the <a href="https://www.drupal.org/project/issues/advanced_help">issue queue for Advanced help</a>.
If such an issue does not exist, please can create it.
Choose <em>Category</em> “Task”,
......
<p>The <strong>Advanced help</strong> module provides a framework that
<p>The <strong>Advanced Help</strong> module provides a framework that
allows module and theme developers integrate help texts in a Drupal
site.</p>
......@@ -20,7 +20,7 @@ help” will show up under “Help”:
<h2 id="ah_crehlp">Creating help</h2>
<p>Modules and themes utilizing <strong>Advanced help</strong> should
<p>Modules and themes utilizing <strong>Advanced Help</strong> should
create a subdirectory named <code>help</code> inside their own main
directory. Place the file
<em>MODULENAME</em>.help.ini (resp. <em>THEMENAME</em>.help.ini) in this subdirectory.
......@@ -113,8 +113,8 @@ $output .= '&nbsp;' . t('Click the help icon!');
<div class="help-img-caption" style="max-width:180px">Question mark help icon</div>
</div>
<p>See the source code of demo module <strong>Advanced help
example</strong> for link examples.</p>
<p>See the source code of demo module <strong>Advanced Help
Example</strong> for link examples.</p>
<p>You may link to other help topics inside your HTML help file using
this format:</p>
......
name = Advanced help example
name = Advanced Help Example
description = A example help module to demonstrate the advanced help module.
core = 7.x
dependencies[] = advanced_help
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment