Removes the action Quality Control from Reports
507856
def remove_qc_reports(portal):
    
    logger.info("Removing Reports > Quality Control ...")
    ti = portal.reports.getTypeInfo()
    actions = map(lambda action: action.id, ti._actions)
    for index, action in enumerate(actions, start=0):
        if action == 'qualitycontrol':
            ti.deleteActions([index])
            break
    logger.info("Removing Reports > Quality Control [DONE]")
767407
def _cleanup(self):
        """"""
        if self.todolist.exists():
            try:
                saved_todo = iter(open(self.todolist, encoding="utf-8"))
                int(next(saved_todo).strip())
                for line in saved_todo:
                    _, serial = line.strip().split()
                    int(serial)
            except (StopIteration, ValueError):
                # The todo list was inconsistent. This may happen if we get
                # killed e.g. by the timeout wrapper. Just remove it - we'll
                # just have to do whatever happened since the last successful
                # sync.
                logger.info("Removing inconsistent todo list.")
                self.todolist.unlink()
148498
void cleanUpStaleEntries() {
        for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
            map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
        }
    }
150898
async def bus_remove_match_action_async(self, rule, func, user_data, error = None, timeout = DBUS.TIMEOUT_USE_DEFAULT) :
        ""
        rulekey = format_rule(rule)
        rule = unformat_rule(rule)
        self._match_actions[rulekey].actions.remove(_MatchActionEntry._Action(func, user_data))
        if len(self._match_actions[rulekey].actions) == 0 :
            await self.bus_remove_match_async(rulekey, error, timeout) # shouldn’t fail!
            del self._match_actions[rulekey]
            if len(self._match_actions) == 0 :
                self.remove_filter(self._rule_action_match, None)
226890
def clearFilter(self):
        
        if self._dataFrameOriginal is not None:
            self.layoutAboutToBeChanged.emit()
            self._dataFrame = self._dataFrameOriginal
            self._dataFrameOriginal = None
            self.layoutChanged.emit()
1250477
def __view_remove_actions(self):
        

        add_project_action = "Actions|Umbra|Components|addons.projects_explorer|Add Project ..."
        remove_project_action = "Actions|Umbra|Components|addons.projects_explorer|Remove Project"
        add_new_file_action = "Actions|Umbra|Components|addons.projects_explorer|Add New File ..."
        add_new_directory_action = "Actions|Umbra|Components|addons.projects_explorer|Add New Directory ..."
        rename_action = "Actions|Umbra|Components|addons.projects_explorer|Rename ..."
        # copy_action = "Actions|Umbra|Components|addons.projects_explorer|Copy ..."
        # move_action = "Actions|Umbra|Components|addons.projects_explorer|Move ..."
        delete_action = "Actions|Umbra|Components|addons.projects_explorer|Delete ..."
        find_in_files_action = "Actions|Umbra|Components|addons.projects_explorer|Find In Files ..."
        output_selected_path_action = "Actions|Umbra|Components|addons.projects_explorer|Output Selected Path"

        for action in (add_project_action,
                       remove_project_action,
                       add_new_file_action,
                       add_new_directory_action,
                       rename_action,
                       # copy_action,
                       # move_action,
                       delete_action,
                       output_selected_path_action):
            self.__view.removeAction(self.__engine.actions_manager.get_action(action))
            self.__engine.actions_manager.unregister_action(action)
198710
public function removeActionArticle()
    {
        $sActionId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');
        //$sActionId = $this->getConfig()->getConfigParam( 'oxid' );

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $oDb->Execute(
            'delete from oxobject2action '
            . 'where oxactionid=' . $oDb->quote($sActionId)
            . ' and oxclass = "oxarticle"'
        );
    }
963472
private void cleanupProjectIfEmpty() {

        m_requiresCleanup = false;
        try {
            CmsObject cms = OpenCms.initCmsObject(m_adminCms);
            cms.readProject(getProject().getUuid());
        } catch (CmsException e) {
            return;
        }
        try {
            CmsObject cms = OpenCms.initCmsObject(m_adminCms);
            cms.getRequestContext().setCurrentProject(getProject());
            CmsUUID projectId = getProject().getUuid();
            List<CmsResource> projectResources = cms.readProjectView(projectId, CmsResource.STATE_KEEP);
            if (projectResources.isEmpty()) {
                cms.deleteProject(projectId);
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
1171531
protected void cleanUp() {

        m_importResource = null;
        m_importZip = null;
        m_report = null;
        m_linkStorage = null;
        m_linkPropertyStorage = null;
        m_groupsToCreate = null;
        m_cms = null;
    }
1260127
def _cleanup(self):
        '''
        
        '''
        self._declare_cb = None
        self._bind_cb = None
        self._unbind_cb = None
        self._delete_cb = None
        self._purge_cb = None
        super(QueueClass, self)._cleanup()
1290111
def clean(ctx, docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        with ctx.cd(ROOT):
            ctx.run('rm -rf {0}'.format(pattern))
1318046
protected function removeNotImportantRemainingActions()
    {
        // remove remaining 'move' actions
        if (!empty($this->actions[self::GROUP_ADD])) {
            foreach ($this->actions[self::GROUP_ADD] as $index => $action) {
                if ($action[0] === self::MOVE) {
                    unset($this->actions[self::GROUP_ADD][$index]);
                }
            }
        }
        // remove remaining 'remove' actions if there are no any 'add' actions
        if (!empty($this->actions[self::GROUP_REMOVE]) && empty($this->actions[self::GROUP_ADD])) {
            unset($this->actions[self::GROUP_REMOVE]);
        }
    }
849963
public function removeCatOrderArticle()
    {
        $aRemoveArt = $this->_getActionIds('oxarticles.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');
        $aSkipArt = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('neworder_sess');

        if (is_array($aRemoveArt) && is_array($aSkipArt)) {
            foreach ($aRemoveArt as $sRem) {
                if (($iKey = array_search($sRem, $aSkipArt)) !== false) {
                    unset($aSkipArt[$iKey]);
                }
            }
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('neworder_sess', $aSkipArt);

            $sArticleTable = $this->_getViewName('oxarticles');
            $sO2CView = $this->_getViewName('oxobject2category');

            // checking if all articles were moved from one
            $sSelect = "select 1 from $sArticleTable left join $sO2CView on $sArticleTable.oxid=$sO2CView.oxobjectid ";
            $sSelect .= "where $sO2CView.oxcatnid = '$soxId' and $sArticleTable.oxparentid = '' and $sArticleTable.oxid ";
            $sSelect .= "not in ( " . implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aSkipArt)) . " ) ";

            // simply echoing "1" if some items found, and 0 if nothing was found
            // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
            echo (int) \OxidEsales\Eshop\Core\DatabaseProvider::getMaster()->getOne($sSelect);
        }
    }
989947
private void cleanup() {
        StatsDataReference ref = null;
        while ((ref = (StatsDataReference) statisticsReferenceQueue.poll()) != null) {
            StatsData oldStats = null;
            StatsData updatedStats = null;
            do {
                oldStats = terminatedThreadStats.get();
                updatedStats = aggregateStats(oldStats, ref.statsData);
            } while (!terminatedThreadStats.compareAndSet(oldStats, updatedStats));
            allReferences.remove(ref);
        }
    }
1350457
def _RemoveForemanRule(self):
    """"""
    if data_store.RelationalDBEnabled():
      data_store.REL_DB.RemoveForemanRule(hunt_id=self.session_id.Basename())
      return

    with aff4.FACTORY.Open(
        "aff4:/foreman", mode="rw", token=self.token) as foreman:
      aff4_rules = foreman.Get(foreman.Schema.RULES)
      aff4_rules = foreman.Schema.RULES(
          # Remove those rules which fire off this hunt id.
          [r for r in aff4_rules if r.hunt_id != self.session_id])
      foreman.Set(aff4_rules)
1159777
def clean_up
        @doc.css(".ess-separator").remove
        @doc.css("@title").remove
        @doc.css("@onclick").remove
        @doc.css("@tabindex").remove
        @doc.css(".ess-label-hits").remove
        @doc.css(".ess-clear").remove
      end
398043
def removed_or_inserted_action(mapper, connection, target):
    """"""
    current_access.delete_action_cache(get_action_cache_key(target.action,
                                                            target.argument))