Adds article to delivery configuration
481635
public function addArtToDel()
    {
        $aChosenArt = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sArtTable = $this->_getViewName('oxarticles');
            $aChosenArt = $this->_getAll($this->_addFilter("select $sArtTable.oxid " . $this->_getQuery()));
        }

        if ($soxId && $soxId != "-1" && is_array($aChosenArt)) {
            foreach ($aChosenArt as $sChosenArt) {
                $oObject2Delivery = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                $oObject2Delivery->init('oxobject2delivery');
                $oObject2Delivery->oxobject2delivery__oxdeliveryid = new \OxidEsales\Eshop\Core\Field($soxId);
                $oObject2Delivery->oxobject2delivery__oxobjectid = new \OxidEsales\Eshop\Core\Field($sChosenArt);
                $oObject2Delivery->oxobject2delivery__oxtype = new \OxidEsales\Eshop\Core\Field("oxarticles");
                $oObject2Delivery->save();
            }
        }
    }
837423
def add_articles(self, articles):
        
        articles_data = []
        for article in articles:
            articles_data.append({
                'thumb_media_id': article['thumb_media_id'],
                'title': article['title'],
                'content': article['content'],
                'author': article.get('author', ''),
                'content_source_url': article.get('content_source_url', ''),
                'digest': article.get('digest', ''),
                'show_cover_pic': article.get('show_cover_pic', 0),
                'need_open_comment': int(article.get('need_open_comment', False)),
                'only_fans_can_comment': int(article.get('only_fans_can_comment', False)),
            })
        return self._post(
            'material/add_news',
            data={
                'articles': articles_data
            }
        )
408363
protected function offerPublishing()
    {
        if ($this->app->runningInConsole()) {
            $this->publishes([
                base_path('vendor/cmgmyr/messenger/config/config.php') => config_path('messenger.php'),
            ], 'config');

            $this->publishes([
                base_path('vendor/cmgmyr/messenger/migrations') => base_path('database/migrations'),
            ], 'migrations');
        }
    }
569953
function configureExpress() {

	// create configuration routes
	moduleConfig.express.get( /^\/conf.*/, checkAuth, getPath, getMiddlewareWrapper( onGetConf ) );
	moduleConfig.express.post( /^\/conf.*/, storeRequestBody, checkAuth, getPath, getMiddlewareWrapper( onPostConf ) );
	moduleConfig.express.delete( /^\/conf.*/, checkAuth, getPath, getMiddlewareWrapper( onDeleteConf ) );

	// create auth management routes
	moduleConfig.express.post( "/auth", checkAuth, getMiddlewareWrapper( onPostAuth ) );
	moduleConfig.express.delete( "/auth", checkAuth, getMiddlewareWrapper( onDeleteAuth ) );

}
165718
protected function registerConfigPublisher(): void
    {
        $this->app->singleton('config.publisher', function (Application $app) {
            $path = $app->configPath();

            // Once we have created the configuration publisher, we will set the default
            // package path on the object so that it knows where to find the packages
            // that are installed for the application and can move them to the app.
            $publisher = new Config($app->make('files'), $path);

            $publisher->setPackagePath($app->basePath().'/vendor');

            return $publisher;
        });
    }
600726
def update_configuration(self, **kwargs):
        
        updated = False
        if 'announced_networks' in kwargs:
            kwargs.update(announced_ne_setting=kwargs.pop('announced_networks'))
        if 'bgp_profile' in kwargs:
            kwargs.update(bgp_profile_ref=kwargs.pop('bgp_profile'))
        if 'autonomous_system' in kwargs:
            kwargs.update(bgp_as_ref=kwargs.pop('autonomous_system'))
        
        announced_ne = kwargs.pop('announced_ne_setting', None)
        
        for name, value in kwargs.items():
            _value = element_resolver(value)
            if self.data.get(name) != _value:
                self.data[name] = _value
                updated = True
        
        if announced_ne is not None:
            s = self.data.get('announced_ne_setting')
            ne = self._unwrap(announced_ne)
            
            if len(announced_ne) != len(s) or not self._equal(ne, s):
                self.data.update(announced_ne_setting=ne)
                updated = True
            
        return updated
913325
public function addArticleCross()
    {
        $aChosenArt = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sArtTable = $this->_getViewName('oxarticles');
            $aChosenArt = $this->_getAll(parent::_addFilter("select $sArtTable.oxid " . $this->_getQuery()));
        }

        $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        if ($oArticle->load($soxId) && $soxId && $soxId != "-1" && is_array($aChosenArt)) {
            foreach ($aChosenArt as $sAdd) {
                $oNewGroup = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                $oNewGroup->init('oxobject2article');
                $oNewGroup->oxobject2article__oxobjectid = new \OxidEsales\Eshop\Core\Field($sAdd);
                $oNewGroup->oxobject2article__oxarticlenid = new \OxidEsales\Eshop\Core\Field($oArticle->oxarticles__oxid->value);
                $oNewGroup->oxobject2article__oxsort = new \OxidEsales\Eshop\Core\Field(0);
                $oNewGroup->save();
            }

            $this->onArticleAddingToCrossSelling($oArticle);
        }
    }
293411
def help_center_article_subscriptions(self, article_id, locale=None, **kwargs):
        ""
        api_path = "/api/v2/help_center/articles/{article_id}/subscriptions.json"
        api_path = api_path.format(article_id=article_id)
        if locale:
            api_opt_path = "/api/v2/help_center/{locale}/articles/{article_id}/subscriptions.json"
            api_path = api_opt_path.format(article_id=article_id, locale=locale)
        return self.call(api_path, **kwargs)
503673
def add_to_inventory(self):
        """"""
        if not self.server_attrs:
            return
        for addy in self.server_attrs[A.server.PUBLIC_IPS]:
            self.stack.add_host(addy, self.groups, self.hostvars)
404340
def add_to_inventory(self):
        """"""
        self.stack.add_host(self.hostname, self.groups, self.hostvars)
1178706
def _insert_manifest_item(configurator, key, item):
    
    with _open_manifest(configurator) as f:
        manifest = f.read()
    if item in ast.literal_eval(manifest).get(key, []):
        return
    pattern = """(["']{}["']:\\s*\\[)""".format(key)
    repl = """\\1\n        '{}',""".format(item)
    manifest = re.sub(pattern, repl, manifest, re.MULTILINE)
    with _open_manifest(configurator, "w") as f:
        f.write(manifest)
914737
def help_center_article_translation_update(self, article_id, locale, data, **kwargs):
        ""
        api_path = "/api/v2/help_center/articles/{article_id}/translations/{locale}.json"
        api_path = api_path.format(article_id=article_id, locale=locale)
        return self.call(api_path, method="PUT", data=data, **kwargs)
471509
private void insert(String url, List<Article> newArticles) {
		if(!articleMap.containsKey(url))
			articleMap.put(url, new ArrayList<Article>());

		List<Article> articleList = articleMap.get(url);
		articleList.addAll(newArticles);

		log("New size for " + url + " is " + articleList.size());
	}
992097
def create_article(tree, template, title, language, slug=None, description=None,
                   page_title=None, menu_title=None, meta_description=None,
                   created_by=None, image=None, publication_date=None, publication_end_date=None,
                   published=False, login_required=False, creation_date=None, categories=[]):
    

    # validate tree
    tree = tree.get_public_object()
    assert tree.application_urls == 'CMSArticlesApp'

    # validate template
    assert template in [tpl[0] for tpl in settings.CMS_ARTICLES_TEMPLATES]
    get_template(template)

    # validate language:
    assert language in get_language_list(tree.node.site_id), settings.CMS_LANGUAGES.get(tree.node.site_id)

    # validate publication date
    if publication_date:
        assert isinstance(publication_date, datetime.date)

    # validate publication end date
    if publication_end_date:
        assert isinstance(publication_end_date, datetime.date)

    # validate creation date
    if not creation_date:
        creation_date = publication_date
    if creation_date:
        assert isinstance(creation_date, datetime.date)

    # get username
    if created_by:
        try:
            username = created_by.get_username()
        except Exception:
            username = force_text(created_by)
    else:
        username = 'script'

    with current_user(username):
        # create article
        article = Article.objects.create(
            tree=tree,
            template=template,
            login_required=login_required,
            creation_date=creation_date,
            publication_date=publication_date,
            publication_end_date=publication_end_date,
            languages=language,
        )
        for category in categories:
            article.categories.add(category)

        # create title
        create_title(
            article=article,
            language=language,
            title=title,
            slug=slug,
            description=description,
            page_title=page_title,
            menu_title=menu_title,
            meta_description=meta_description,
            creation_date=creation_date,
            image=image,
        )

        # publish article
        if published:
            article.publish(language)

    return article.reload()
404593
protected function registerConfigPublishCommand()
    {
        $this->app->bindShared('config.publisher', function($app)
        {
            $path = $app['path'] .DS .'Config';

            $publisher = new ConfigPublisher($app['files'], $app['config'], $path);

            return $publisher;
        });

        $this->app->bindShared('command.config.publish', function($app)
        {
            $configPublisher = $app['config.publisher'];

            return new ConfigPublishCommand($configPublisher);
        });
    }
376641
def insert(args):
    """"""
    string_search = args.str_search
    mode_search = MODES[args.mode]
    page = list(TORRENTS[args.torr_page].keys())[0]
    key_search = TORRENTS[args.torr_page][page]['key_search']
    torrent_page = TORRENTS[args.torr_page][page]['page']
    domain = TORRENTS[args.torr_page][page]['domain']
    return([args, string_search, mode_search, page,
            key_search, torrent_page, domain])
880005
public function addArtToSel()
    {
        $aAddArticle = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sArtTable = $this->_getViewName('oxarticles');
            $aAddArticle = $this->_getAll(parent::_addFilter("select $sArtTable.oxid " . $this->_getQuery()));
        }

        if ($soxId && $soxId != "-1" && is_array($aAddArticle)) {
            // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804 and ESDEV-3822).
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
            foreach ($aAddArticle as $sAdd) {
                $oNewGroup = oxNew(\OxidEsales\Eshop\Core\Model\BaseModel::class);
                $oNewGroup->init("oxobject2selectlist");
                $oNewGroup->oxobject2selectlist__oxobjectid = new \OxidEsales\Eshop\Core\Field($sAdd);
                $oNewGroup->oxobject2selectlist__oxselnid = new \OxidEsales\Eshop\Core\Field($soxId);
                $oNewGroup->oxobject2selectlist__oxsort = new \OxidEsales\Eshop\Core\Field(( int ) $database->getOne("select max(oxsort) + 1 from oxobject2selectlist where oxobjectid =  " . $database->quote($sAdd) . " "));
                $oNewGroup->save();

                $this->onArticleAddToSelectionList($sAdd);
            }
        }
    }