Saves the content
557313
function() {

      var data, xhr;

      data = hashedit.retrieveUpdateArray();

      if (hashedit.saveUrl) {

        // construct an HTTP request
        xhr = new XMLHttpRequest();
        xhr.open('post', hashedit.saveUrl, true);

        // set token
        if(hashedit.useToken == true) {
          xhr.setRequestHeader(hashedit.authHeader, hashedit.authHeaderPrefix + ' ' + localStorage.getItem(hashedit.tokenName));
        }

        // send the collected data as JSON
        xhr.send(JSON.stringify(data));

        xhr.onloadend = function() {

          location.reload();

        };

      }

    }
1022849
function save()
    {
        $dt = '';
        if (isset($_POST['dt'])) {
            $dt = base64_decode($_POST['dt']);
            $dt = utf8_encode($dt);
            $dt = json_decode($dt);
        }

        if (isset($dt->content)) {
            $media =    isset($dt->media) ? $dt->media : '{}';
            $category = isset($dt->category) ? $dt->category : 1;
            $link =     isset($dt->link) ? $dt->link : '';
            $tags =     isset($dt->tags) ? $dt->tags : '';
            $status =   isset($dt->status) ? $dt->status : 'R';

            $title =    isset($dt->title) ? $dt->title : 'Sem Título';
            $destaque = isset($dt->destaque) ? $dt->destaque : 'Nenhum destaque ...';

            $uID = isset($dt->info->user) ? $dt->info->user : 0;
            $aID = isset($dt->info->article) ? $dt->info->article : 0;

            $article = new Model\Article($aID);

            $article->set('author', $uID);
            $article->set('category', $category);
            $article->set('pubdate', date('Y-m-d H:i:s'));
            $article->set('editdate', date('Y-m-d H:i:s'));

            $article->set('link', $link);
            $article->set('tags', $tags);
            $article->set('status', $status);
            $article->set('media', json_encode($media));
            
            $article->set('title', $title);
            $article->set('content', str_replace(["--", "..."], ["&mdash;", "&hellip;"], $dt->content));
            $article->set('resume', $destaque);

            //Gravando...
            $article->save();

            //Send to client
            $this->send(['status'=>'ok', 'id'=>$article->get('id'), 'link'=>$article->get('link')]);
        }
        $this->sendError();
    }
1222452
function Save()
    {
        $this->pageRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendSiteRights();
        }
        
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetPageRights($this->pageRights->Rights());
        $this->rights->Save();
    }
402774
public function save()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/edit/', $this->serialize());
        $this->deserialize($data);
    }
631231
public function save()
    {
        $results
            = "<?php \n return " . var_export(self::getResults(), true) . ";";
        file_put_contents($this->file, $results);
    }
379065
function saveText() {
        var uriContent = "data:application/octet-stream," + encodeURIComponent(editor.getSession().getValue());
        document.location.href = uriContent;
    }
466170
private function save()
    {
        $encodedContent = gzencode(json_encode($this->content));

        if (!file_exists($this->file)) {
            touch($this->file);
        }

        $fh = fopen($this->file, 'r+');

        if (flock($fh, LOCK_EX)) {
            ftruncate($fh, 0);
            fwrite($fh, $encodedContent);
            fflush($fh);
            flock($fh, LOCK_UN);
            fclose($fh);
        } else {
            throw new \Exception('Could not acquire exclusive file lock.');
        }
    }
412810
function Save()
    {
        $this->contentRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendContainerRights();
        }
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetContentRights($this->contentRights->Rights());
        $this->rights->Save();
    }
784830
public function save()
    {
        $keys = array_keys($this->langstrings);
        sort($keys);

        $maxlen       = 0;
        $langPrefixes = array();
        foreach ($keys as $key) {
            $tokens = explode('.', $key);
            if (preg_match('/tl_layout\.[a-z]+\.css\./', $key)) {
                $tokens = array($tokens[0], $tokens[1] . '.' . $tokens[2], $tokens[3]);
            }
            $langPrefix = '$GLOBALS[\'TL_LANG\']';
            foreach ($tokens as $token) {
                $langPrefix .= '[\'' . $token . '\']';
            }

            $langPrefixes[$key] = $langPrefix;

            if (strlen($langPrefix) > $maxlen) {
                $maxlen = strlen($langPrefix);
            }
        }

        $buffer = $this->getHead() . PHP_EOL . PHP_EOL;
        foreach ($keys as $key) {
            $prefix  = $langPrefixes[$key];
            $buffer .= sprintf(
                '%s = %s;' . PHP_EOL,
                $prefix . str_repeat(' ', ($maxlen - strlen($prefix))),
                var_export($this->getValue($key), true)
            );
        }
        $buffer  .= PHP_EOL;
        $resource = fopen($this->filename, 'wb');
        fputs($resource, $buffer);

        fclose($resource);
    }
45174
protected function save($contents)
    {
        $fp = fopen($this->fileName, $this->openMode);
        fwrite($fp, $contents);
        fclose($fp);

        chmod($this->fileName, $this->getPermission());
    }
92468
public function saveSeoContent() {
		$model = $this->getSeoContentModel();
		if (!$model->is_global) {
			$model->title = $this->owner->{$this->titleAttribute};
			$model->keywords = $this->owner->{$this->keywordsAttribute};
			$model->description = $this->owner->{$this->descriptionAttribute};
			$model->save();
		}
	}
974762
function save()
    {
        if (!$this->blnChanged) {
            return;
        }
        $flags = JSON_PRETTY_PRINT;
        $strContent = json_encode($this->options, $flags);

        file_put_contents(__CODEGEN_OPTION_FILE__, $strContent);
        $this->blnChanged = false;
    }
726960
def save(self):
        """"""
        files = [f.depotFile for f in self._files]
        cmd = ['reopen', '-c', 'default']
        self._connection.run(cmd + files)
        self._dirty = False
771434
public function save()
	{
		$converter = $this->extracter->converter();
		$data = $converter->toNative($this->params);

		$this->fs->dumpFile($this->file, $data);
	}
1273367
def save(self, filename, content):
        
        with open(filename, "w") as f:
            if hasattr(content, '__iter__'):
                f.write('\n'.join([row for row in content]))
            else:
                print('WRINGI CONTWETESWREWR')
                f.write(str(content))
208215
public function save()
    {
        // saving/updating seo params
        if (($sOxid = $this->_getSaveObjectId())) {
            $aSeoData = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aSeoData');
            $iShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
            $iLang = $this->getEditLang();

            // checkbox handling
            if (!isset($aSeoData['oxfixed'])) {
                $aSeoData['oxfixed'] = 0;
            }

            $sParams = $this->_getAdditionalParams($aSeoData);

            $oEncoder = $this->_getEncoder();
            // marking self and page links as expired
            $oEncoder->markAsExpired($sOxid, $iShopId, 1, $iLang, $sParams);

            // saving
            $oEncoder->addSeoEntry(
                $sOxid,
                $iShopId,
                $iLang,
                $this->_getStdUrl($sOxid),
                $aSeoData['oxseourl'],
                $this->_getSeoEntryType(),
                $aSeoData['oxfixed'],
                trim($aSeoData['oxkeywords']),
                trim($aSeoData['oxdescription']),
                $this->processParam($aSeoData['oxparams']),
                true,
                $this->_getAltSeoEntryId()
            );
        }
    }
798290
public function save($content)
    {
        $this->_isSaved = true;
        $this->_contentSaved = (string) $content;
        $this->_block->updateContent($this->_contentSaved);
        return $this;
    }