add a URL in a sitemap file
@param string $loc URL of sitemap file
@param string $lastmod The date of last modification of the sitemap file
@return boolean true if addition is ok, else false
511299
public function addSitemap($loc, $lastmod = null) {

        if (isset($loc[2048]) || count($this->urlSitemap) >= $this->maxSitemap) {
            return false;
        }

        $sitemap = new jSitemapIndex();
        $sitemap->loc = jApp::coord()->request->getServerURI() . $loc;

        if (($timestamp = strtotime($lastmod))) {
            $sitemap->lastmod = date('c', $timestamp);
        }

        $this->urlSitemap[] = $sitemap;
        return true;
    }
163406
@Override
	public long lastModified() {
		long lastmod = 0L;
		try {
			lastmod = getURI().toURL().openConnection().getLastModified();
		} catch (IOException ignore) {}
		return lastmod;
	}
928110
public function updateLastmod()
    {
        if ($this->config->directory) {
            $lastmod = $this->config->directory . '/_lastmod.rah';

            if (!is_file($lastmod) || file_get_contents($lastmod) !== get_pref('lastmod', false, true)) {
                file_put_contents($lastmod, get_pref('lastmod', '', true));
            }
        }
    }
1259911
public function addImage($loc, $geoLocation = null, $caption = null, $title = null, $license = null)
    {
        if (empty($loc)) {
            return $this;
        }

        $image = [
            'loc' => $loc,
            'geoLocation' => $geoLocation,
            'caption' => $caption,
            'title' => $title,
            'license' => $license,
        ];
        $this->images[] = $image;

        return $this;
    }
1145128
protected function setLoc($loc)
    {
        self::writeFullTag(
            $loc,
            'loc',
            false,
            'loc',
            $this->validator,
            'validateLoc',
            $this->exception,
            'Provided URL is not a valid value.'
        );

        return $this;
    }
64541
public function isModuleSearch()
    {
        global $pagenow;

        if ($pagenow == 'edit.php' && isset($_GET['s']) && $_GET['s'] !== '') {
            $enabled = \Modularity\ModuleManager::$enabled;
            if (in_array($_GET['post_type'], $enabled)) {
                return true;
            }
        }

        return false;
    }
153594
public function addItem($url, $lastMod = null):void
    {
        if ($this->has($this->file)) {
            $this->appendItem($url, $lastMod);
        } else {
            $this->create('create', $url, $lastMod);
        }
    }
1131426
function addLink($url, $x0, $y0, $x1, $y1)
    {
        $this->numObj++;
        $info = array('type' => 'link', 'url' => $url, 'rect' => array($x0, $y0, $x1, $y1));
        $this->o_annotation($this->numObj, 'new', $info);
    }
689438
public function addToUrl($url, $member)
    {
        $salt = $this->generate(15); // New random salt; Will be passed into url
        // Generate salt specific to this member
        $memberSalt = $this->memberSalt($salt, $member);
        $token = $this->getToken($memberSalt);
        return Controller::join_links(
            $url,
            sprintf(
                '?t=%s&s=%s',
                urlencode($token),
                urlencode($salt)
            )
        );
    }
66513
public function lastModified($contenttypeslug, $contentid = null)
    {
        // Let's find out how we should determine what the latest changes were:
        $contentLogEnabled = (bool) $this->getOption('general/changelog/enabled');

        if ($contentLogEnabled) {
            return $this->getLastmodifiedByContentLog($contenttypeslug, $contentid);
        }

        return $this->getLastmodifiedSimple($contenttypeslug);
    }
1084266
public function setLoc($loc)
    {
        if (is_string($loc)) {
            $loc = new Loc($loc);
        }
        $this->elements[self::ELEMENT_LOC] = $loc;

        return $this;
    }
1346786
function AddUrl($url, ChangeFrequency $changeFreq = null, $priority= null, Date $lastMod = null)
    {
        $elm = $this->domDoc->createElement("url");
        $this->AppendTextChild($elm, "loc", $url);
        
        if ($changeFreq)
            $this->AppendTextChild($elm, "changefreq", (string)$changeFreq);
        
        if ($priority)
            $this->AppendTextChild($elm, "priority", $priority);
        
        if ($lastMod)
            $this->AppendTextChild($elm, "lastmod", $lastMod->ToString('c'));
        
        $this->urlset->appendChild($elm);
    }
83958
function cmd_SITE($fd, $cmd)
    {
        if (substr($cmd[1], 0, 6) == "CHMOD ")
        {
            $user = $this->getUser($fd);
            $chmod = explode(" ", $cmd[1], 3);
            $file = $this->fillDirName($user, $chmod[2]);
            $this->debug("CHMOD: $file to {$chmod[1]}");
            if (chmod($file, octdec($chmod[1])))
            {
                $this->send($fd, "200 Permissions changed on {$chmod[2]}");
            }
            else
            {
                $this->send($fd, "550 Could not change perms on " . $chmod[2] . ": Permission denied");
            }
        }
        else
        {
            $this->send($fd, "500 Unknown Command");
        }
    }
1043062
private function appendLastModified($timestamp, $maxAge)
    {
        $headers = array(
            'Cache-Control' => sprintf('public, max-age=%s', $maxAge),
            'Last-Modified' => gmdate('D, j M Y H:i:s', $timestamp).' GMT'
        );

        $this->headerBag->setStatusCode(200)
                        ->appendPairs($headers);
    }
1009540
protected function addLastLink(&$lastLink)
    {
        $lastLink = $this->getLink($this->calculatePageRowNumberForLastLink(), $this->getStyleClassAttributes('last'), $this->lastName);
    }
972433
public function AddLast( $pathStep )
	{
		/**
		 * @var PathStep $last
		 */
		$last = $this;
		while ( ! is_null( $last->next ) )
			$last = $last->next;
		$last->next = $pathStep;
	}
1302666
private function parseHereNowDocConcat($loc): ?string
    {
        $tokens = $this->getTokenStream();
        $type   = substr($tokens->value($loc), 3, 1);
        $loc    = $tokens->next($loc);

        if ($loc) {
            $string = substr($tokens->value($loc), 0, -1);
            if ($type === '\'') {
                return '\'' . implode('\' . "\n" . \'', explode("\n", $string)) . '\'';
            }

            return '"' . str_replace("\n", '\n', $string) . '"';
        }

        return null;
    }