Use setting API to determine if the setting exists in the db.
This commit is contained in:
parent
4f23d88b19
commit
223a5125bf
2 changed files with 5 additions and 5 deletions
|
|
@ -47,7 +47,7 @@ finish($session); # this line required
|
||||||
sub addInboxSmsNotificationTemplateIdSetting {
|
sub addInboxSmsNotificationTemplateIdSetting {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
print "\tAdding inboxSmsNotificationTemplateId setting... " unless $quiet;
|
print "\tAdding inboxSmsNotificationTemplateId setting... " unless $quiet;
|
||||||
if (!$session->db->quickScalar('select count(*) from settings where name = "inboxSmsNotificationTemplateId"')) {
|
if (!$session->setting->has("inboxSmsNotificationTemplateId")) {
|
||||||
$session->setting->add('inboxSmsNotificationTemplateId', 'i9-G00ALhJOr0gMh-vHbKA');
|
$session->setting->add('inboxSmsNotificationTemplateId', 'i9-G00ALhJOr0gMh-vHbKA');
|
||||||
}
|
}
|
||||||
print "DONE!\n" unless $quiet;
|
print "DONE!\n" unless $quiet;
|
||||||
|
|
|
||||||
|
|
@ -579,10 +579,6 @@ sub getRichEditor {
|
||||||
$out = q|<a style="display: block;" href="javascript:toggleEditor('|.$nameId.q|')">|.$i18n->get('Toggle editor').q|</a>|;
|
$out = q|<a style="display: block;" href="javascript:toggleEditor('|.$nameId.q|')">|.$i18n->get('Toggle editor').q|</a>|;
|
||||||
}
|
}
|
||||||
$out .= q|<script type="text/javascript">|;
|
$out .= q|<script type="text/javascript">|;
|
||||||
while (my ($plugin, $path) = each %loadPlugins) {
|
|
||||||
$out .= "tinymce.PluginManager.load('$plugin', '$path');\n";
|
|
||||||
}
|
|
||||||
$out .= "\ttinyMCE.init(" . JSON->new->pretty->encode(\%config) . " );\n";
|
|
||||||
if ($ask) {
|
if ($ask) {
|
||||||
$out .= <<"EOHTML1";
|
$out .= <<"EOHTML1";
|
||||||
function toggleEditor(id) {
|
function toggleEditor(id) {
|
||||||
|
|
@ -596,6 +592,10 @@ function turnOffTinyMCE_$nameId () {
|
||||||
}
|
}
|
||||||
EOHTML1
|
EOHTML1
|
||||||
}
|
}
|
||||||
|
while (my ($plugin, $path) = each %loadPlugins) {
|
||||||
|
$out .= "tinymce.PluginManager.load('$plugin', '$path');\n";
|
||||||
|
}
|
||||||
|
$out .= "\ttinyMCE.init(" . JSON->new->pretty->encode(\%config) . " );\n";
|
||||||
$out .= "</script>";
|
$out .= "</script>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue