On experimenting a little with smarty escaping it turns out that isset is gonna be
a lot more painful than empty - we should avoid where we can. In this case it
is passed in as TRUE or not at all (from schema.tpl) so an empty check is just fine
$dropOrder = array_reverse(array_keys($this->tables));
$template = new CRM_Core_CodeGen_Util_Template('sql');
$template->assign('dropOrder', $dropOrder);
+ $template->assign('isOutputLicense', TRUE);
return ['civicrm_drop.mysql' => $template->fetch('drop.tpl')];
}
-{*suppress license if within a file that already has the license*}{if !isset($no_license) or !$no_license}-- +--------------------------------------------------------------------+
+{*suppress license if within a file that already has the license*}{if $isOutputLicense}-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC. All rights reserved. |
-- | |
-- | This work is published under the GNU AGPLv3 license with some |
--{/if}
-- /*******************************************************
-- *
--- * Clean up the existing tables{if isset($no_license) and $no_license} - this section generated from {$smarty.template}
+-- * Clean up the existing tables{if !$isOutputLicense} - this section generated from {$smarty.template}
{/if}
-- *
-- *******************************************************/
-- {$generated}
--{if $database.comment} {$database.comment}{/if}
-{include file="drop.tpl" no_license=TRUE}
+{include file="drop.tpl" isOutputLicense=false}
-- /*******************************************************
-- *