*
*/
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
use Friendica\DI;
function randplace_install() {
/* Retrieve our personal config setting */
- $active = PConfig::get(local_user(), 'randplace', 'enable');
+ $active = DI::pConfig()->get(local_user(), 'randplace', 'enable');
if(! $active)
return;
if(! local_user())
return;
if($_POST['randplace-submit'])
- PConfig::set(local_user(),'randplace','enable',intval($_POST['randplace']));
+ DI::pConfig()->set(local_user(),'randplace','enable',intval($_POST['randplace']));
}
/* Get the current state of our config variable */
- $enabled = PConfig::get(local_user(),'randplace','enable');
+ $enabled = DI::pConfig()->get(local_user(),'randplace','enable');
$checked = (($enabled) ? ' checked="checked" ' : '');
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
- $s .= '<h3>' . L10n::t('Randplace Settings') . '</h3>';
+ $s .= '<h3>' . DI::l10n()->t('Randplace Settings') . '</h3>';
$s .= '<div id="randplace-enable-wrapper">';
- $s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . L10n::t('Enable Randplace Addon') . '</label>';
+ $s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . DI::l10n()->t('Enable Randplace Addon') . '</label>';
$s .= '<input id="randplace-checkbox" type="checkbox" name="randplace" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
- $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="randplace-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
+ $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="randplace-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}