fix the display method of plugin's personal options

This commit is contained in:
joyqi 2016-02-18 14:47:13 +08:00
parent 0082816f53
commit 0d371d4816
2 changed files with 6 additions and 5 deletions

View File

@ -44,10 +44,7 @@ $stat = Typecho_Widget::widget('Widget_Stat');
<?php Typecho_Widget::widget('Widget_Users_Profile')->passwordForm()->render(); ?>
</section>
<br>
<section id="personal-form-list">
<?php Typecho_Widget::widget('Widget_Users_Profile')->personalFormList(); ?>
</section>
<?php Typecho_Widget::widget('Widget_Users_Profile')->personalFormList(); ?>
</div>
</div>
</div>

View File

@ -189,13 +189,17 @@ class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface
$this->widget('Widget_Plugins_List@personalPlugins', 'activated=1')->to($plugins);
while ($plugins->next()) {
if ($plugins->personalConfig) {
echo '<h3>' . $plugins->title . '</h3>';
list($pluginFileName, $className) = Typecho_Plugin::portal($plugins->name,
$this->options->pluginDir($plugins->name));
$form = $this->personalForm($plugins->name, $className, $pluginFileName, $group);
if ($this->user->pass($group, true)) {
echo '<br><section id="personal-' . $plugins->name . '">';
echo '<h3>' . $plugins->title . '</h3>';
$form->render();
echo '</section>';
}
}
}