<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Add_access_extensions() Function Call]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=6133</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6133&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Add_access_extensions() Function Call.]]></description>
		<lastBuildDate>Mon, 17 Aug 2020 06:53:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Add_access_extensions() Function Call]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38054#p38054</link>
			<description><![CDATA[<p>Another way to overcome this,</p><p>use the activate_extension function in module</p><div class="codebox"><pre><code>function activate_extension($company, $check_only = true)
    {
        global $path_to_root, $db_connections;

        $file = $path_to_root . &#039;/includes/session.inc&#039;;
        if (file_exists($file)) {
            $mstring = &#039;add_access_extensions();&#039;;
            // Open the file to get existing content
            $current = file_get_contents($file);
            if (strpos($current, $mstring) === false) {
                $current .= $mstring . &quot;\n&quot;;
                // Write the contents back to the file
                file_put_contents($file, $current);
            }
        }
        
        $updates = array(&#039;update.sql&#039; =&gt; array(&#039;pos&#039;));
        return $this-&gt;update_databases($company, $updates, $check_only);
    }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (anoopmb)]]></author>
			<pubDate>Mon, 17 Aug 2020 06:53:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38054#p38054</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add_access_extensions() Function Call]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25204#p25204</link>
			<description><![CDATA[<p>I think set_ext_domain() is for separating .po files for each extension isn&#039;t it?<br />I think we need to call the add_access_extension() function in session.inc, or we should call it in each module, or we should manually add $security_areas item for the new extension in includes/access_level.inc. CMIIW.</p>]]></description>
			<author><![CDATA[null@example.com (bogeyman2007)]]></author>
			<pubDate>Tue, 16 Feb 2016 05:05:18 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25204#p25204</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add_access_extensions() Function Call]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25191#p25191</link>
			<description><![CDATA[<p>There are many places where the session.inc file is included but the add_access_extension() is not called.</p><p>Please use the &quot;set_ext_domain()&quot; function - see some extensions for examples like <a href="https://github.com/apmuthu/frontaccounting/blob/master/extensions/Extensions/asset_register/reporting/rep_assets_list.php#L26">this</a>. Even the logout.php file does not call the add_access_extension() function.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 14 Feb 2016 18:26:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25191#p25191</guid>
		</item>
		<item>
			<title><![CDATA[Add_access_extensions() Function Call]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25189#p25189</link>
			<description><![CDATA[<p>Hi,</p><p>Is there any possibility to move the function call add_access_extensions() from index.php into the last line of includes/session.inc? Because I found a problem when I develop an extension that create an additional tab.</p><p>That new tab is appear when I click the other tab. So I&#039;m on the URL like following:<br />index.php?application=stock<br />Because the add_access_extension is called in index.php</p><p>But when I click one menu, which point to the URL like following.<br />inventory/transfers.php?NewTransfer=1<br />My new tab is disappear and there is an error message saying undefined index SA_blablabla.<br />I found that was because the add_access_extension is not called in that page.</p><p>So I think we should move the add_access_extensions() function call to the includes/session.inc file which is called in every page. It could be a bug or me that was wrong, so I need the opinion from you guys about this.</p>]]></description>
			<author><![CDATA[null@example.com (bogeyman2007)]]></author>
			<pubDate>Sun, 14 Feb 2016 07:44:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25189#p25189</guid>
		</item>
	</channel>
</rss>
