/** * Refresh this MetaControl with Data from the local Message object. * @param boolean $blnReload reload Message from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objMessage->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objMessage->Id; } } if ($this->lstTopic) { $this->lstTopic->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstTopic->AddItem(QApplication::Translate('- Select One -'), null); } $objTopicArray = Topic::LoadAll(); if ($objTopicArray) { foreach ($objTopicArray as $objTopic) { $objListItem = new QListItem($objTopic->__toString(), $objTopic->Id); if ($this->objMessage->Topic && $this->objMessage->Topic->Id == $objTopic->Id) { $objListItem->Selected = true; } $this->lstTopic->AddItem($objListItem); } } } if ($this->lblTopicId) { $this->lblTopicId->Text = $this->objMessage->Topic ? $this->objMessage->Topic->__toString() : null; } if ($this->lstTopicLink) { $this->lstTopicLink->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null); } $objTopicLinkArray = TopicLink::LoadAll(); if ($objTopicLinkArray) { foreach ($objTopicLinkArray as $objTopicLink) { $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id); if ($this->objMessage->TopicLink && $this->objMessage->TopicLink->Id == $objTopicLink->Id) { $objListItem->Selected = true; } $this->lstTopicLink->AddItem($objListItem); } } } if ($this->lblTopicLinkId) { $this->lblTopicLinkId->Text = $this->objMessage->TopicLink ? $this->objMessage->TopicLink->__toString() : null; } if ($this->lstPerson) { $this->lstPerson->RemoveAllItems(); $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null); $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); if ($this->objMessage->Person && $this->objMessage->Person->Id == $objPerson->Id) { $objListItem->Selected = true; } $this->lstPerson->AddItem($objListItem); } } } if ($this->lblPersonId) { $this->lblPersonId->Text = $this->objMessage->Person ? $this->objMessage->Person->__toString() : null; } if ($this->txtMessage) { $this->txtMessage->Text = $this->objMessage->Message; } if ($this->lblMessage) { $this->lblMessage->Text = $this->objMessage->Message; } if ($this->txtCompiledHtml) { $this->txtCompiledHtml->Text = $this->objMessage->CompiledHtml; } if ($this->lblCompiledHtml) { $this->lblCompiledHtml->Text = $this->objMessage->CompiledHtml; } if ($this->txtReplyNumber) { $this->txtReplyNumber->Text = $this->objMessage->ReplyNumber; } if ($this->lblReplyNumber) { $this->lblReplyNumber->Text = $this->objMessage->ReplyNumber; } if ($this->calPostDate) { $this->calPostDate->DateTime = $this->objMessage->PostDate; } if ($this->lblPostDate) { $this->lblPostDate->Text = sprintf($this->objMessage->PostDate) ? $this->objMessage->__toString($this->strPostDateDateTimeFormat) : null; } }
/** * Default / simple DataBinder for this Meta DataGrid. This can easily be overridden * by calling SetDataBinder() on this DataGrid with another DataBinder of your choice. * * If a paginator is set on this DataBinder, it will use it. If not, then no pagination will be used. * It will also perform any sorting (if applicable). */ public function MetaDataBinder() { // Remember! We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below if ($this->Paginator) { $this->TotalItemCount = TopicLink::CountAll(); } // Setup the $objClauses Array $objClauses = array(); // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add // the OrderByClause to the $objClauses array if ($objClause = $this->OrderByClause) { array_push($objClauses, $objClause); } // Add the LimitClause information, as well if ($objClause = $this->LimitClause) { array_push($objClauses, $objClause); } // Set the DataSource to be a Query result from TopicLink, given the clauses above $this->DataSource = TopicLink::LoadAll($objClauses); }
/** * Refresh this MetaControl with Data from the local Package object. * @param boolean $blnReload reload Package from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objPackage->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objPackage->Id; } } if ($this->lstPackageCategory) { $this->lstPackageCategory->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstPackageCategory->AddItem(QApplication::Translate('- Select One -'), null); } $objPackageCategoryArray = PackageCategory::LoadAll(); if ($objPackageCategoryArray) { foreach ($objPackageCategoryArray as $objPackageCategory) { $objListItem = new QListItem($objPackageCategory->__toString(), $objPackageCategory->Id); if ($this->objPackage->PackageCategory && $this->objPackage->PackageCategory->Id == $objPackageCategory->Id) { $objListItem->Selected = true; } $this->lstPackageCategory->AddItem($objListItem); } } } if ($this->lblPackageCategoryId) { $this->lblPackageCategoryId->Text = $this->objPackage->PackageCategory ? $this->objPackage->PackageCategory->__toString() : null; } if ($this->txtToken) { $this->txtToken->Text = $this->objPackage->Token; } if ($this->lblToken) { $this->lblToken->Text = $this->objPackage->Token; } if ($this->txtName) { $this->txtName->Text = $this->objPackage->Name; } if ($this->lblName) { $this->lblName->Text = $this->objPackage->Name; } if ($this->txtDescription) { $this->txtDescription->Text = $this->objPackage->Description; } if ($this->lblDescription) { $this->lblDescription->Text = $this->objPackage->Description; } if ($this->calLastPostDate) { $this->calLastPostDate->DateTime = $this->objPackage->LastPostDate; } if ($this->lblLastPostDate) { $this->lblLastPostDate->Text = sprintf($this->objPackage->LastPostDate) ? $this->objPackage->__toString($this->strLastPostDateDateTimeFormat) : null; } if ($this->lstLastPostedByPerson) { $this->lstLastPostedByPerson->RemoveAllItems(); $this->lstLastPostedByPerson->AddItem(QApplication::Translate('- Select One -'), null); $objLastPostedByPersonArray = Person::LoadAll(); if ($objLastPostedByPersonArray) { foreach ($objLastPostedByPersonArray as $objLastPostedByPerson) { $objListItem = new QListItem($objLastPostedByPerson->__toString(), $objLastPostedByPerson->Id); if ($this->objPackage->LastPostedByPerson && $this->objPackage->LastPostedByPerson->Id == $objLastPostedByPerson->Id) { $objListItem->Selected = true; } $this->lstLastPostedByPerson->AddItem($objListItem); } } } if ($this->lblLastPostedByPersonId) { $this->lblLastPostedByPersonId->Text = $this->objPackage->LastPostedByPerson ? $this->objPackage->LastPostedByPerson->__toString() : null; } if ($this->lstTopicLink) { $this->lstTopicLink->RemoveAllItems(); $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null); $objTopicLinkArray = TopicLink::LoadAll(); if ($objTopicLinkArray) { foreach ($objTopicLinkArray as $objTopicLink) { $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id); if ($objTopicLink->PackageId == $this->objPackage->Id) { $objListItem->Selected = true; } $this->lstTopicLink->AddItem($objListItem); } } } if ($this->lblTopicLink) { $this->lblTopicLink->Text = $this->objPackage->TopicLink ? $this->objPackage->TopicLink->__toString() : null; } }
/** * Refresh this MetaControl with Data from the local Forum object. * @param boolean $blnReload reload Forum from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objForum->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objForum->Id; } } if ($this->txtOrderNumber) { $this->txtOrderNumber->Text = $this->objForum->OrderNumber; } if ($this->lblOrderNumber) { $this->lblOrderNumber->Text = $this->objForum->OrderNumber; } if ($this->txtName) { $this->txtName->Text = $this->objForum->Name; } if ($this->lblName) { $this->lblName->Text = $this->objForum->Name; } if ($this->chkAnnounceOnlyFlag) { $this->chkAnnounceOnlyFlag->Checked = $this->objForum->AnnounceOnlyFlag; } if ($this->lblAnnounceOnlyFlag) { $this->lblAnnounceOnlyFlag->Text = $this->objForum->AnnounceOnlyFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->txtDescription) { $this->txtDescription->Text = $this->objForum->Description; } if ($this->lblDescription) { $this->lblDescription->Text = $this->objForum->Description; } if ($this->lstTopicLink) { $this->lstTopicLink->RemoveAllItems(); $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null); $objTopicLinkArray = TopicLink::LoadAll(); if ($objTopicLinkArray) { foreach ($objTopicLinkArray as $objTopicLink) { $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id); if ($objTopicLink->ForumId == $this->objForum->Id) { $objListItem->Selected = true; } $this->lstTopicLink->AddItem($objListItem); } } } if ($this->lblTopicLink) { $this->lblTopicLink->Text = $this->objForum->TopicLink ? $this->objForum->TopicLink->__toString() : null; } }
/** * Refresh this MetaControl with Data from the local Issue object. * @param boolean $blnReload reload Issue from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objIssue->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objIssue->Id; } } if ($this->lstIssuePriorityType) { $this->lstIssuePriorityType->SelectedValue = $this->objIssue->IssuePriorityTypeId; } if ($this->lblIssuePriorityTypeId) { $this->lblIssuePriorityTypeId->Text = $this->objIssue->IssuePriorityTypeId ? IssuePriorityType::$NameArray[$this->objIssue->IssuePriorityTypeId] : null; } if ($this->lstIssueStatusType) { $this->lstIssueStatusType->SelectedValue = $this->objIssue->IssueStatusTypeId; } if ($this->lblIssueStatusTypeId) { $this->lblIssueStatusTypeId->Text = $this->objIssue->IssueStatusTypeId ? IssueStatusType::$NameArray[$this->objIssue->IssueStatusTypeId] : null; } if ($this->lstIssueResolutionType) { $this->lstIssueResolutionType->SelectedValue = $this->objIssue->IssueResolutionTypeId; } if ($this->lblIssueResolutionTypeId) { $this->lblIssueResolutionTypeId->Text = $this->objIssue->IssueResolutionTypeId ? IssueResolutionType::$NameArray[$this->objIssue->IssueResolutionTypeId] : null; } if ($this->txtTitle) { $this->txtTitle->Text = $this->objIssue->Title; } if ($this->lblTitle) { $this->lblTitle->Text = $this->objIssue->Title; } if ($this->txtExampleCode) { $this->txtExampleCode->Text = $this->objIssue->ExampleCode; } if ($this->lblExampleCode) { $this->lblExampleCode->Text = $this->objIssue->ExampleCode; } if ($this->txtExampleTemplate) { $this->txtExampleTemplate->Text = $this->objIssue->ExampleTemplate; } if ($this->lblExampleTemplate) { $this->lblExampleTemplate->Text = $this->objIssue->ExampleTemplate; } if ($this->txtExampleData) { $this->txtExampleData->Text = $this->objIssue->ExampleData; } if ($this->lblExampleData) { $this->lblExampleData->Text = $this->objIssue->ExampleData; } if ($this->txtExpectedOutput) { $this->txtExpectedOutput->Text = $this->objIssue->ExpectedOutput; } if ($this->lblExpectedOutput) { $this->lblExpectedOutput->Text = $this->objIssue->ExpectedOutput; } if ($this->txtActualOutput) { $this->txtActualOutput->Text = $this->objIssue->ActualOutput; } if ($this->lblActualOutput) { $this->lblActualOutput->Text = $this->objIssue->ActualOutput; } if ($this->lstPostedByPerson) { $this->lstPostedByPerson->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstPostedByPerson->AddItem(QApplication::Translate('- Select One -'), null); } $objPostedByPersonArray = Person::LoadAll(); if ($objPostedByPersonArray) { foreach ($objPostedByPersonArray as $objPostedByPerson) { $objListItem = new QListItem($objPostedByPerson->__toString(), $objPostedByPerson->Id); if ($this->objIssue->PostedByPerson && $this->objIssue->PostedByPerson->Id == $objPostedByPerson->Id) { $objListItem->Selected = true; } $this->lstPostedByPerson->AddItem($objListItem); } } } if ($this->lblPostedByPersonId) { $this->lblPostedByPersonId->Text = $this->objIssue->PostedByPerson ? $this->objIssue->PostedByPerson->__toString() : null; } if ($this->lstAssignedToPerson) { $this->lstAssignedToPerson->RemoveAllItems(); $this->lstAssignedToPerson->AddItem(QApplication::Translate('- Select One -'), null); $objAssignedToPersonArray = Person::LoadAll(); if ($objAssignedToPersonArray) { foreach ($objAssignedToPersonArray as $objAssignedToPerson) { $objListItem = new QListItem($objAssignedToPerson->__toString(), $objAssignedToPerson->Id); if ($this->objIssue->AssignedToPerson && $this->objIssue->AssignedToPerson->Id == $objAssignedToPerson->Id) { $objListItem->Selected = true; } $this->lstAssignedToPerson->AddItem($objListItem); } } } if ($this->lblAssignedToPersonId) { $this->lblAssignedToPersonId->Text = $this->objIssue->AssignedToPerson ? $this->objIssue->AssignedToPerson->__toString() : null; } if ($this->calPostDate) { $this->calPostDate->DateTime = $this->objIssue->PostDate; } if ($this->lblPostDate) { $this->lblPostDate->Text = sprintf($this->objIssue->PostDate) ? $this->objIssue->__toString($this->strPostDateDateTimeFormat) : null; } if ($this->calAssignedDate) { $this->calAssignedDate->DateTime = $this->objIssue->AssignedDate; } if ($this->lblAssignedDate) { $this->lblAssignedDate->Text = sprintf($this->objIssue->AssignedDate) ? $this->objIssue->__toString($this->strAssignedDateDateTimeFormat) : null; } if ($this->calDueDate) { $this->calDueDate->DateTime = $this->objIssue->DueDate; } if ($this->lblDueDate) { $this->lblDueDate->Text = sprintf($this->objIssue->DueDate) ? $this->objIssue->__toString($this->strDueDateDateTimeFormat) : null; } if ($this->txtVoteCount) { $this->txtVoteCount->Text = $this->objIssue->VoteCount; } if ($this->lblVoteCount) { $this->lblVoteCount->Text = $this->objIssue->VoteCount; } if ($this->lstTopicLink) { $this->lstTopicLink->RemoveAllItems(); $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null); $objTopicLinkArray = TopicLink::LoadAll(); if ($objTopicLinkArray) { foreach ($objTopicLinkArray as $objTopicLink) { $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id); if ($objTopicLink->IssueId == $this->objIssue->Id) { $objListItem->Selected = true; } $this->lstTopicLink->AddItem($objListItem); } } } if ($this->lblTopicLink) { $this->lblTopicLink->Text = $this->objIssue->TopicLink ? $this->objIssue->TopicLink->__toString() : null; } }
/** * Refresh this MetaControl with Data from the local Topic object. * @param boolean $blnReload reload Topic from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objTopic->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objTopic->Id; } } if ($this->lstTopicLink) { $this->lstTopicLink->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null); } $objTopicLinkArray = TopicLink::LoadAll(); if ($objTopicLinkArray) { foreach ($objTopicLinkArray as $objTopicLink) { $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id); if ($this->objTopic->TopicLink && $this->objTopic->TopicLink->Id == $objTopicLink->Id) { $objListItem->Selected = true; } $this->lstTopicLink->AddItem($objListItem); } } } if ($this->lblTopicLinkId) { $this->lblTopicLinkId->Text = $this->objTopic->TopicLink ? $this->objTopic->TopicLink->__toString() : null; } if ($this->txtName) { $this->txtName->Text = $this->objTopic->Name; } if ($this->lblName) { $this->lblName->Text = $this->objTopic->Name; } if ($this->lstPerson) { $this->lstPerson->RemoveAllItems(); $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null); $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); if ($this->objTopic->Person && $this->objTopic->Person->Id == $objPerson->Id) { $objListItem->Selected = true; } $this->lstPerson->AddItem($objListItem); } } } if ($this->lblPersonId) { $this->lblPersonId->Text = $this->objTopic->Person ? $this->objTopic->Person->__toString() : null; } if ($this->calLastPostDate) { $this->calLastPostDate->DateTime = $this->objTopic->LastPostDate; } if ($this->lblLastPostDate) { $this->lblLastPostDate->Text = sprintf($this->objTopic->LastPostDate) ? $this->objTopic->__toString($this->strLastPostDateDateTimeFormat) : null; } if ($this->txtMessageCount) { $this->txtMessageCount->Text = $this->objTopic->MessageCount; } if ($this->lblMessageCount) { $this->lblMessageCount->Text = $this->objTopic->MessageCount; } if ($this->txtViewCount) { $this->txtViewCount->Text = $this->objTopic->ViewCount; } if ($this->lblViewCount) { $this->lblViewCount->Text = $this->objTopic->ViewCount; } if ($this->lstPeopleAsEmail) { $this->lstPeopleAsEmail->RemoveAllItems(); $objAssociatedArray = $this->objTopic->GetPersonAsEmailArray(); $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objPerson->Id) { $objListItem->Selected = true; } } $this->lstPeopleAsEmail->AddItem($objListItem); } } } if ($this->lblPeopleAsEmail) { $objAssociatedArray = $this->objTopic->GetPersonAsEmailArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) { $strItems[] = $objAssociated->__toString(); } $this->lblPeopleAsEmail->Text = implode($strGlue, $strItems); } if ($this->lstPeopleAsReadOnce) { $this->lstPeopleAsReadOnce->RemoveAllItems(); $objAssociatedArray = $this->objTopic->GetPersonAsReadOnceArray(); $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objPerson->Id) { $objListItem->Selected = true; } } $this->lstPeopleAsReadOnce->AddItem($objListItem); } } } if ($this->lblPeopleAsReadOnce) { $objAssociatedArray = $this->objTopic->GetPersonAsReadOnceArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) { $strItems[] = $objAssociated->__toString(); } $this->lblPeopleAsReadOnce->Text = implode($strGlue, $strItems); } if ($this->lstPeopleAsRead) { $this->lstPeopleAsRead->RemoveAllItems(); $objAssociatedArray = $this->objTopic->GetPersonAsReadArray(); $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objPerson->Id) { $objListItem->Selected = true; } } $this->lstPeopleAsRead->AddItem($objListItem); } } } if ($this->lblPeopleAsRead) { $objAssociatedArray = $this->objTopic->GetPersonAsReadArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) { $strItems[] = $objAssociated->__toString(); } $this->lblPeopleAsRead->Text = implode($strGlue, $strItems); } }
$strContent .= 'h2. "Other":wiki:/old_downloads/other'; $strContent .= "\r\n\r\n"; $strContent .= 'For other Community-Contributed classes, utilities, and code-snippets'; $objWikiPage = new WikiPage(); $objWikiPage->Content = trim($strContent); $objWikiPage->CompileHtml(); $objWikiItem->CreateNewVersion('Downloads from Old Qcodo.com Website', $objWikiPage, 'Save', array(), Person::Load(1), null); print "Done.\r\n"; QDataGen::DisplayForEachTaskStart($strTitle = 'Refreshing Topic Stats', Topic::CountAll()); foreach (Topic::LoadAll() as $objTopic) { QDataGen::DisplayForEachTaskNext($strTitle); $objTopic->RefreshStats(); } QDataGen::DisplayForEachTaskEnd($strTitle); QDataGen::DisplayForEachTaskStart($strTitle = 'Refreshing TopicLink Stats', TopicLink::CountAll()); foreach (TopicLink::LoadAll() as $objTopicLink) { QDataGen::DisplayForEachTaskNext($strTitle); $objTopicLink->RefreshStats(); } QDataGen::DisplayForEachTaskEnd($strTitle); $objResult = $objDb->query('SELECT * FROM email_topic_person_assn'); while (QDataGen::DisplayWhileTask('Migrating email_topic_person_assn', $objResult->num_rows)) { $objRow = $objResult->fetch_array(); try { Topic::GetDatabase()->NonQuery('INSERT INTO email_topic_person_assn(topic_id, person_id) VALUES (' . $objRow['topic_id'] . ',' . $objRow['person_id'] . ');'); } catch (QMySqliDatabaseException $objExc) { } } $objResult = $objDb->query('SELECT * FROM read_topic_person_assn'); while (QDataGen::DisplayWhileTask('Migrating read_topic_person_assn', $objResult->num_rows)) { $objRow = $objResult->fetch_array();
/** * Refresh this MetaControl with Data from the local WikiItem object. * @param boolean $blnReload reload WikiItem from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objWikiItem->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objWikiItem->Id; } } if ($this->txtPath) { $this->txtPath->Text = $this->objWikiItem->Path; } if ($this->lblPath) { $this->lblPath->Text = $this->objWikiItem->Path; } if ($this->lstWikiItemType) { $this->lstWikiItemType->SelectedValue = $this->objWikiItem->WikiItemTypeId; } if ($this->lblWikiItemTypeId) { $this->lblWikiItemTypeId->Text = $this->objWikiItem->WikiItemTypeId ? WikiItemType::$NameArray[$this->objWikiItem->WikiItemTypeId] : null; } if ($this->lstEditorMinimumPersonType) { $this->lstEditorMinimumPersonType->SelectedValue = $this->objWikiItem->EditorMinimumPersonTypeId; } if ($this->lblEditorMinimumPersonTypeId) { $this->lblEditorMinimumPersonTypeId->Text = $this->objWikiItem->EditorMinimumPersonTypeId ? PersonType::$NameArray[$this->objWikiItem->EditorMinimumPersonTypeId] : null; } if ($this->txtOverrideNavbarIndex) { $this->txtOverrideNavbarIndex->Text = $this->objWikiItem->OverrideNavbarIndex; } if ($this->lblOverrideNavbarIndex) { $this->lblOverrideNavbarIndex->Text = $this->objWikiItem->OverrideNavbarIndex; } if ($this->txtOverrideSubnavIndex) { $this->txtOverrideSubnavIndex->Text = $this->objWikiItem->OverrideSubnavIndex; } if ($this->lblOverrideSubnavIndex) { $this->lblOverrideSubnavIndex->Text = $this->objWikiItem->OverrideSubnavIndex; } if ($this->lstCurrentWikiVersion) { $this->lstCurrentWikiVersion->RemoveAllItems(); $this->lstCurrentWikiVersion->AddItem(QApplication::Translate('- Select One -'), null); $objCurrentWikiVersionArray = WikiVersion::LoadAll(); if ($objCurrentWikiVersionArray) { foreach ($objCurrentWikiVersionArray as $objCurrentWikiVersion) { $objListItem = new QListItem($objCurrentWikiVersion->__toString(), $objCurrentWikiVersion->Id); if ($this->objWikiItem->CurrentWikiVersion && $this->objWikiItem->CurrentWikiVersion->Id == $objCurrentWikiVersion->Id) { $objListItem->Selected = true; } $this->lstCurrentWikiVersion->AddItem($objListItem); } } } if ($this->lblCurrentWikiVersionId) { $this->lblCurrentWikiVersionId->Text = $this->objWikiItem->CurrentWikiVersion ? $this->objWikiItem->CurrentWikiVersion->__toString() : null; } if ($this->txtCurrentName) { $this->txtCurrentName->Text = $this->objWikiItem->CurrentName; } if ($this->lblCurrentName) { $this->lblCurrentName->Text = $this->objWikiItem->CurrentName; } if ($this->lstCurrentPostedByPerson) { $this->lstCurrentPostedByPerson->RemoveAllItems(); $this->lstCurrentPostedByPerson->AddItem(QApplication::Translate('- Select One -'), null); $objCurrentPostedByPersonArray = Person::LoadAll(); if ($objCurrentPostedByPersonArray) { foreach ($objCurrentPostedByPersonArray as $objCurrentPostedByPerson) { $objListItem = new QListItem($objCurrentPostedByPerson->__toString(), $objCurrentPostedByPerson->Id); if ($this->objWikiItem->CurrentPostedByPerson && $this->objWikiItem->CurrentPostedByPerson->Id == $objCurrentPostedByPerson->Id) { $objListItem->Selected = true; } $this->lstCurrentPostedByPerson->AddItem($objListItem); } } } if ($this->lblCurrentPostedByPersonId) { $this->lblCurrentPostedByPersonId->Text = $this->objWikiItem->CurrentPostedByPerson ? $this->objWikiItem->CurrentPostedByPerson->__toString() : null; } if ($this->calCurrentPostDate) { $this->calCurrentPostDate->DateTime = $this->objWikiItem->CurrentPostDate; } if ($this->lblCurrentPostDate) { $this->lblCurrentPostDate->Text = sprintf($this->objWikiItem->CurrentPostDate) ? $this->objWikiItem->__toString($this->strCurrentPostDateDateTimeFormat) : null; } if ($this->lstTopicLink) { $this->lstTopicLink->RemoveAllItems(); $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null); $objTopicLinkArray = TopicLink::LoadAll(); if ($objTopicLinkArray) { foreach ($objTopicLinkArray as $objTopicLink) { $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id); if ($objTopicLink->WikiItemId == $this->objWikiItem->Id) { $objListItem->Selected = true; } $this->lstTopicLink->AddItem($objListItem); } } } if ($this->lblTopicLink) { $this->lblTopicLink->Text = $this->objWikiItem->TopicLink ? $this->objWikiItem->TopicLink->__toString() : null; } }