This is executed when we reach the closing </MOD> tag of our 'wiki' path
192767
public function on_wiki_end() {
        global $USER;

        //check if the initial content needs to be created (and if a page is already there for it)
        if ($this->initialcontentfilename && $this->needinitpage) {
            //contruct (synthetic - not for cooking) a full path for creating entries/entry/pages/page
            $data_entry = array(
                'id'        => $this->converter->get_nextid(), //creating the first entry
                'groupid'   => 0,
                'userid'    => 0,
                'synonyms'  => '',
                'links'     => ''
            );
            $data_page = array(
                'id'            => $this->converter->get_nextid(), //just creating the first page in the wiki
                'title'         => $this->initialcontentfilename,
                'content'       => $this->initialcontent,
                'userid'        => $USER->id,
                'timecreated'   => time(),
                'timemodified'  => 0,
                'pageviews'     => 0,
                'cachedcontent' => '**reparse needed**',
                'timerendered'  => 0,
                'readonly'      => 0,
                'tags'          => ''
            );
            //create xml with constructed page data (from initial_content file).
            $this->on_wiki_entries_start();
            $this->process_wiki_entry($data_entry);
            $this->on_wiki_pages_start();
            $this->process_wiki_entry_page($data_page);
            $this->on_wiki_entry_page_end();
            $this->on_wiki_pages_end();
            $this->on_wiki_entry_end();
            $this->on_wiki_entries_end();
        }

        //close wiki.xml
        $this->xmlwriter->end_tag('wiki');
        $this->xmlwriter->end_tag('activity');
        $this->close_xml_writer();

        // write inforef.xml
        $this->open_xml_writer("activities/wiki_{$this->moduleid}/inforef.xml");
        $this->xmlwriter->begin_tag('inforef');
        $this->xmlwriter->begin_tag('fileref');
        foreach ($this->fileman->get_fileids() as $fileid) {
            $this->write_xml('file', array('id' => $fileid));
        }
        $this->xmlwriter->end_tag('fileref');
        $this->xmlwriter->end_tag('inforef');
        $this->close_xml_writer();
    }
520545
function completed( event ) {
	        // readyState === "complete" is good enough for us to call the dom ready in oldIE
	        if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {
	            detach();
	            ready();
	        }
	    }
77715
function _tag_close( &$parser, $tag ) {
		$this->currentElement = '';

		switch( strtoupper( $tag ) ) {
			case 'TABLE':
				$this->parent->addSQL( $this->create( $this->parent ) );
				xml_set_object( $parser, $this->parent );
				$this->destroy();
				break;
			case 'FIELD':
				unset($this->current_field);
				break;

		}
	}
903541
def handle_endtag(self, tagName):
        '''
            
        '''
        inTag = self._inTag
        if len(inTag) == 0:
            # Attempted to close, but no open tags
            raise InvalidCloseException(tagName, [])

        foundIt = False
        i = len(inTag) - 1
        while i >= 0:
            if inTag[i].tagName == tagName:
                foundIt = True
                break
            i -= 1

        if not foundIt:
            # Attempted to close, but did not match anything
            raise InvalidCloseException(tagName, inTag)

        if inTag[-1].tagName != tagName:
            raise MissedCloseException(tagName, [x for x in inTag[-1 * (i+1): ] ] )

        inTag.pop()
859553
synchronized
  public
  void close() {
    closed = true;
    if (sqw != null) {
        try {
            if (layoutHeaderChecked && layout != null && layout.getFooter() != null) {
                sendLayoutMessage(layout.getFooter());
            }
            sqw.close();
            sqw = null;
        } catch(java.io.IOException ex) {
            sqw = null;
        }
    }
  }
1279048
def _handle_tag_open_close(self):
        """"""
        self._emit(tokens.TagOpenClose())
        self._push(contexts.TAG_CLOSE)
        self._head += 1
1195699
@Override
    public void shutdownModule() throws ModuleShutdownException {
        if (_ri != null) {
            try {
                _ri.close();
            } catch (TrippiException e) {
                throw new ModuleShutdownException("Error closing RI",
                                                  getRole(),
                                                  e);
            }
        }
    }
1296998
public void closePath() {
		if (this.numTypes<=0 ||
				(this.types[this.numTypes-1]!=PathElementType.CLOSE
				&&this.types[this.numTypes-1]!=PathElementType.MOVE_TO)) {
			ensureSlots(true, 0);
			this.types[this.numTypes++] = PathElementType.CLOSE;
		}
	}
720232
public function end()
	{
		if ($this->config['layout'] !== false && is_file($file = $this->getLayoutPath()) ) {
			extract($this->data, EXTR_OVERWRITE|EXTR_REFS);
            require($this->cache($file, true));
		}
	}
477059
function finalizeSection() {
            if (lastSectionDoc) {
                self._$headers[lastSectionDoc.file.fullPath].append(" (" + numItemsInSection + ")");
                if (self._collapsedFiles[lastSectionDoc.file.fullPath]) {
                    self._toggleSection(lastSectionDoc.file.fullPath, true);
                }
            }
        }
1083577
protected void onWindowClose() {

        boolean savePage = Window.confirm(
            Messages.get().key(Messages.GUI_EDITOR_SAVE_BEFORE_LEAVING_1, m_editableData.getSitePath()));
        if (savePage) {
            saveEditorContent();
        }
    }
715160
def end_output (self, **kwargs):
        
        self.xml_endtag(u"linkchecker")
        self.xml_end_output()
        self.close_fileoutput()
363102
private void emitClose(Expression tagName) {
    IncrementalDomCodeBuilder jsCodeBuilder = getJsCodeBuilder();
    jsCodeBuilder.append(INCREMENTAL_DOM_ELEMENT_CLOSE.call(tagName));
  }
605781
void linkLast(E e) {
        final Node<E> l = last;
        final Node<E> newNode = new Node<>(l, e, null);
        last = newNode;
        if (l == null)
            first = newNode;
        else
            l.next = newNode;
        size++;
        modCount++;
    }
930422
public Builder end() {
        if (ends.isEmpty())
            throw new IllegalStateException("No pending tag/section to close.");
        String tag = ends.pop();
        html.a(tag);
        if (newLineAfterTheseTags.contains(tag.toLowerCase())) {
            html.nl();
            text.nl();
        }
        return this;
    }
808059
function _tag_close( &$parser, $tag ) {
		$this->currentElement = '';

		switch( strtoupper( $tag ) ) {
			case 'DATA':
				xml_set_object( $parser, $this->parent );
				break;
		}
	}
1115679
private void onUploadFinished() {
        if (artifactUploadState.areAllUploadsFinished() && artifactUploadState.isStatusPopupMinimized()) {
            if (artifactUploadState.getFilesInFailedState().isEmpty()) {
                cleanupStates();
                closeWindow();
            } else {
                maximizeWindow();
            }
        }
    }