Code Duplication    Length = 11-11 lines in 2 locations

src/dbo/subscriptions.php 2 locations

@@ 258-268 (lines=11) @@
255
 * @param array $subscriptions List of subscriptions IDs.
256
 * @return int Always {@link NO_ERROR}.
257
 */
258
function subscriptions_enable ($subscriptions)
259
{
260
    debug_write_log(DEBUG_TRACE, '[subscriptions_enable]');
261
262
    foreach ($subscriptions as $subscription)
263
    {
264
        dal_query('subscriptions/set.sql', $subscription, $_SESSION[VAR_USERID]);
265
    }
266
267
    return NO_ERROR;
268
}
269
270
/**
271
 * Disables selected subscriptions.
@@ 276-286 (lines=11) @@
273
 * @param array $subscriptions List of subscriptions IDs.
274
 * @return int Always {@link NO_ERROR}.
275
 */
276
function subscriptions_disable ($subscriptions)
277
{
278
    debug_write_log(DEBUG_TRACE, '[subscriptions_disable]');
279
280
    foreach ($subscriptions as $subscription)
281
    {
282
        dal_query('subscriptions/clear.sql', $subscription, $_SESSION[VAR_USERID]);
283
    }
284
285
    return NO_ERROR;
286
}
287
288
/**
289
 * Deletes selected subscriptions.