Code Duplication    Length = 26-26 lines in 2 locations

class.FlipPage.php 1 location

@@ 398-423 (lines=26) @@
395
     *
396
     * @todo Consider pulling the about menu from the settings file or a DB
397
     */
398
    protected function addAllLinks()
399
    {
400
        if($this->user === false || $this->user === null)
401
        {
402
            if(isset($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], 'logout.php') === false)
403
            {
404
                $this->addLink('Login', $this->loginUrl);
405
            }
406
        }
407
        else
408
        {
409
            $this->add_links();
410
            $this->addLink('Logout', $this->logoutUrl);
411
        }
412
        if($this->aboutUrl !== false)
413
        {
414
            if(!empty($this->aboutMenu))
415
            {
416
                $this->addLink('About', $this->aboutUrl, $this->aboutMenu);
417
            }
418
            else
419
            {
420
                $this->addLink('About', $this->aboutUrl);
421
            }
422
        }
423
    }
424
425
    /**
426
     * Setup minified and cdn class varibles from defaults or the settings file

Http/Html/class.FlipPage.php 1 location

@@ 392-417 (lines=26) @@
389
    /**
390
     * Add the links to be used in the header
391
     */
392
    protected function addAllLinks()
393
    {
394
        if($this->user === false || $this->user === null)
395
        {
396
            if(isset($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], 'logout.php') === false)
397
            {
398
                $this->addLink('Login', $this->loginUrl);
399
            }
400
        }
401
        else
402
        {
403
            $this->add_links();
404
            $this->addLink('Logout', $this->logoutUrl);
405
        }
406
        if($this->aboutUrl !== false)
407
        {
408
            if(!empty($this->aboutMenu))
409
            {
410
                $this->addLink('About', $this->aboutUrl, $this->aboutMenu);
411
            }
412
            else
413
            {
414
                $this->addLink('About', $this->aboutUrl);
415
            }
416
        }
417
    }
418
419
    /**
420
     * Setup minified and cdn class varibles from defaults or the settings file