- /* Add our stylesheet to the page so we can make our settings look nice */
-
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
-
- /* Get the current state of our config variable */
-
- $fromapp = PConfig::get(local_user(),'fromapp', 'app', '');
-
- $force = intval(PConfig::get(local_user(),'fromapp','force'));
-
- $force_enabled = (($force) ? ' checked="checked" ' : '');
-
-
- /* Add some HTML to the existing form */
-
- $s .= '<span id="settings_fromapp_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_fromapp_expanded\'); openClose(\'settings_fromapp_inflated\');">';
- $s .= '<h3>' . t('FromApp Settings') . '</h3>';
- $s .= '</span>';
- $s .= '<div id="settings_fromapp_expanded" class="settings-block" style="display: none;">';
- $s .= '<span class="fakelink" onclick="openClose(\'settings_fromapp_expanded\'); openClose(\'settings_fromapp_inflated\');">';
- $s .= '<h3>' . t('FromApp Settings') . '</h3>';
- $s .= '</span>';
- $s .= '<div id="fromapp-wrapper">';
- $s .= '<label id="fromapp-label" for="fromapp-input">' . t('The application name you would like to show your posts originating from.') . '</label>';
- $s .= '<input id="fromapp-input" type="text" name="fromapp-input" value="' . $fromapp . '" ' . '/>';
- $s .= '<div class="clear"></div>';
-
- $s .= '<label id="fromapp-force-label" for="fromapp-force">' . t('Use this application name even if another application was used.') . '</label>';
- $s .= '<input id="fromapp-force" type="checkbox" name="fromapp-force" value="1" ' . $force_enabled . '/>';
-
- $s .= '</div><div class="clear"></div>';
-
- /* provide a submit button */
+ $fromapp = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'app', '');
+ $force = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'force'));