Code Duplication    Length = 3-3 lines in 2 locations

src/Intraface/modules/cms/Page.php 1 location

@@ 215-217 (lines=3) @@
212
        $validator->isNumeric($var['allow_comments'], 'error in comments - allowed values are 0 and 1');
213
        $validator->isNumeric($var['hidden'], 'error in hidden - allowed values are 0 and 1');
214
215
        if (!Validate::string($var['identifier'], array('format' => VALIDATE_ALPHA . VALIDATE_NUM . '-_'))) {
216
            $this->error->set('error in unique page address. allowed values are a-z 1-9 _ -');
217
        }
218
        if (!$this->isIdentifierAvailable($var['identifier'])) {
219
            $this->error->set('the choosen unique page address is already used for another page, article or news. please select another one');
220
        }

src/Intraface/modules/cms/TemplateSection.php 1 location

@@ 148-150 (lines=3) @@
145
            $this->error->set('error in identifier - cannot be empty');
146
        }
147
148
        if (!Validate::string($var['identifier'], array('format' => VALIDATE_ALPHA . VALIDATE_NUM . '-_'))) {
149
            $this->error->set('error in identfier - allowed characters are a-z and 1-9');
150
        }
151
        if ($this->isIdentifierUnique($var['identifier'])) {
152
            $this->error->set('error in identifier - has to be unique');
153
        }