Code Duplication    Length = 5-7 lines in 3 locations

manager/includes/extenders/manager.api.class.inc.php 1 location

@@ 190-194 (lines=5) @@
187
        $rs = $modx->db->select('password', $tbl_manager_users, "id='{$uid}'");
188
        $password = $modx->db->getValue($rs);
189
190
        if (strpos($password, '>') === false) {
191
            $algo = 'NOSALT';
192
        } else {
193
            $algo = substr($password, 0, strpos($password, '>'));
194
        }
195
196
        return strtoupper($algo);
197
    }

manager/includes/extenders/modifiers.class.inc.php 1 location

@@ 264-270 (lines=7) @@
261
262
        if($key==='documentObject') $value = $modx->documentIdentifier;
263
        $cmd = $this->parseDocumentSource($cmd);
264
        if(preg_match('@^[1-9][/0-9]*$@',$cmd))
265
        {
266
            if(strpos($cmd,'/')!==false)
267
                $cmd = $this->substr($cmd,strrpos($cmd,'/')+1);
268
            $opt = $cmd;
269
            $cmd = 'id';
270
        }
271
272
        if(isset($modx->snippetCache["phx:{$cmd}"]))   $this->elmName = "phx:{$cmd}";
273
        elseif(isset($modx->chunkCache["phx:{$cmd}"])) $this->elmName = "phx:{$cmd}";

manager/includes/document.parser.class.inc.php 1 location

@@ 1421-1426 (lines=6) @@
1418
            case 'uparent':
1419
            case 'up':
1420
            case 'u':
1421
                if (strpos($str, '(') !== false) {
1422
                    $top = substr($str, strpos($str, '('));
1423
                    $top = trim($top, '()"\'');
1424
                } else {
1425
                    $top = 0;
1426
                }
1427
                $docid = $this->getUltimateParentId($this->documentIdentifier, $top);
1428
                break;
1429
            case 'alias':