Code Duplication    Length = 11-12 lines in 2 locations

lib/PageCustomize.php 2 locations

@@ 65-76 (lines=12) @@
62
                                   "language");
63
64
        $content = "";
65
        if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
66
            $content .= "<select id='template' onchange='updateCookie (this); window.location=$(\".headleft\").attr(\"href\");'>";
67
68
            foreach ($this-> getTemplateList () as $filename) {
69
                $content .= "<option value='{$filename}' " . $this->isSelected ("template", $filename) . ">{$filename}</option>";
70
            }
71
            $content .= '</select>';
72
        } else {
73
            foreach ($this-> getTemplateList () as $filename) {
74
                $content .= "<input type='radio' onchange='updateCookieFromCheckbox (this); window.location=$(\".headleft\").attr(\"href\");' id='template' name='template' value='{$filename}' " . $this->isChecked ("template", $filename) . " /><label for='template-{$filename}'> {$filename} </label>";
75
            }
76
        }
77
        array_push ($this->entryArray, new Entry ("Template", "",
78
                                        $content, "text",
79
                                        array ()));
@@ 82-92 (lines=11) @@
79
                                        array ()));
80
81
        $content = "";
82
        if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
83
            $content .= '<select id="style" onchange="updateCookie (this);">';
84
            foreach ($this-> getStyleList () as $filename) {
85
                $content .= "<option value='{$filename}' " . $this->isSelected ("style", $filename) . ">{$filename}</option>";
86
            }
87
            $content .= '</select>';
88
        } else {
89
            foreach ($this-> getStyleList () as $filename) {
90
                $content .= "<input type='radio' onchange='updateCookieFromCheckbox (this);' id='style-{$filename}' name='style' value='{$filename}' " . $this->isChecked ("style", $filename) . " /><label for='style-{$filename}'> {$filename} </label>";
91
            }
92
        }
93
        array_push ($this->entryArray, new Entry (localize ("customize.style"), "",
94
                                        $content, "text",
95
                                        array ()));