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

@@ 1401-1406 (lines=6) @@
1398
            case 'uparent':
1399
            case 'up':
1400
            case 'u':
1401
                if (strpos($str, '(') !== false) {
1402
                    $top = substr($str, strpos($str, '('));
1403
                    $top = trim($top, '()"\'');
1404
                } else {
1405
                    $top = 0;
1406
                }
1407
                $docid = $this->getUltimateParentId($this->documentIdentifier, $top);
1408
                break;
1409
            case 'alias':