Code Duplication    Length = 5-5 lines in 5 locations

plugins/daily/myalbum-p-photos.php 1 location

@@ 54-58 (lines=5) @@
51
// options
52
$options = explode('|', $plugin['options']);
53
// options[0] : category extract
54
if (!empty($options[0])) {
55
    $whr_cid = '`cid` IN (' . addslashes($options[0]) . ')';
56
} else {
57
    $whr_cid = '1';
58
}
59
60
// query (added 86400 second margin "begin" & "end")
61
$result = $db->query('SELECT title,lid,`date` FROM ' . $db->prefix("myalbum{$mydirnumber}_photos") . " WHERE ($whr_cid) AND `date` >= $range_start_s AND `date` < $range_end_s AND `status` > 0");

plugins/monthly/bulletin.php 1 location

@@ 47-51 (lines=5) @@
44
// options
45
$options = explode('|', $plugin['options']);
46
// options[0] : category extract
47
if (!empty($options[0])) {
48
    $whr_topic = '`topicid` IN (' . addslashes($options[0]) . ')';
49
} else {
50
    $whr_topic = '1';
51
}
52
53
// query (added 86400 second margin "begin" & "end")
54
$result = $db->query('SELECT title,storyid,published FROM '

plugins/monthly/myalbum-p-photos.php 1 location

@@ 53-57 (lines=5) @@
50
// options
51
$options = explode('|', $plugin['options']);
52
// options[0] : category extract
53
if (!empty($options[0])) {
54
    $whr_cid = '`cid` IN (' . addslashes($options[0]) . ')';
55
} else {
56
    $whr_cid = '1';
57
}
58
59
// query (added 86400 second margin "begin" & "end")
60
$result = $db->query('SELECT title,lid,`date` FROM ' . $db->prefix("myalbum{$mydirnumber}_photos") . " WHERE ($whr_cid) AND `date` >= $range_start_s AND `date` < $range_end_s AND `status` > 0");

plugins/monthly/news.php 1 location

@@ 47-51 (lines=5) @@
44
// options
45
$options = explode('|', $plugin['options']);
46
// options[0] : category extract
47
if (!empty($options[0])) {
48
    $whr_topic = '`topicid` IN (' . addslashes($options[0]) . ')';
49
} else {
50
    $whr_topic = '1';
51
}
52
53
// query (added 86400 second margin "begin" & "end")
54
$result = $db->query('SELECT title,storyid,published FROM '

plugins/weekly/myalbum-p-photos.php 1 location

@@ 54-58 (lines=5) @@
51
// options
52
$options = explode('|', $plugin['options']);
53
// options[0] : category extract
54
if (!empty($options[0])) {
55
    $whr_cid = '`cid` IN (' . addslashes($options[0]) . ')';
56
} else {
57
    $whr_cid = '1';
58
}
59
60
// query (added 86400 second margin "begin" & "end")
61
$result = $db->query('SELECT title,lid,`date` FROM ' . $db->prefix("myalbum{$mydirnumber}_photos") . " WHERE ($whr_cid) AND `date` >= $range_start_s AND `date` < $range_end_s AND `status` > 0");