Code Duplication    Length = 10-10 lines in 2 locations

src/subscriptions/create.php 1 location

@@ 301-310 (lines=10) @@
298
          . '</group>'
299
          . '<group title="' . get_html_resource(RES_EVENTS_ID) . '">';
300
301
    foreach ($notifications as $notification)
302
    {
303
        $xml .= '<control name="' . $notification[NOTIFY_CONTROL] . '">'
304
              . (($subscription_flags & $notification[NOTIFY_EVENT]) != 0
305
                    ? '<checkbox checked="true">'
306
                    : '<checkbox>')
307
              . get_html_resource($notification[NOTIFY_RESOURCE])
308
              . '</checkbox>'
309
              . '</control>';
310
    }
311
}
312
313
// generate footer

src/subscriptions/modify.php 1 location

@@ 226-235 (lines=10) @@
223
      . '</group>'
224
      . '<group title="' . get_html_resource(RES_EVENTS_ID) . '">';
225
226
foreach ($notifications as $notification)
227
{
228
    $xml .= '<control name="' . $notification[NOTIFY_CONTROL] . '">'
229
          . (($subscription_flags & $notification[NOTIFY_EVENT]) != 0
230
                ? '<checkbox checked="true">'
231
                : '<checkbox>')
232
          . get_html_resource($notification[NOTIFY_RESOURCE])
233
          . '</checkbox>'
234
          . '</control>';
235
}
236
237
$xml .= '</group>'
238
      . '<note>' . get_html_resource(RES_ALERT_REQUIRED_ARE_EMPTY_ID) . '</note>'