diff options
Diffstat (limited to 'library/WT/Controller')
| -rw-r--r-- | library/WT/Controller/AdvancedSearch.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/Ajax.php | 4 | ||||
| -rw-r--r-- | library/WT/Controller/Ancestry.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/Base.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/Branches.php | 4 | ||||
| -rw-r--r-- | library/WT/Controller/Chart.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/Compact.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/Descendancy.php | 24 | ||||
| -rw-r--r-- | library/WT/Controller/Familybook.php | 30 | ||||
| -rw-r--r-- | library/WT/Controller/Fanchart.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/GedcomRecord.php | 4 | ||||
| -rw-r--r-- | library/WT/Controller/Hourglass.php | 14 | ||||
| -rw-r--r-- | library/WT/Controller/Individual.php | 8 | ||||
| -rw-r--r-- | library/WT/Controller/Media.php | 2 | ||||
| -rw-r--r-- | library/WT/Controller/Page.php | 6 | ||||
| -rw-r--r-- | library/WT/Controller/Pedigree.php | 6 | ||||
| -rw-r--r-- | library/WT/Controller/Simple.php | 6 | ||||
| -rw-r--r-- | library/WT/Controller/Timeline.php | 2 |
18 files changed, 61 insertions, 61 deletions
diff --git a/library/WT/Controller/AdvancedSearch.php b/library/WT/Controller/AdvancedSearch.php index 075979bae6..1f32cd1f25 100644 --- a/library/WT/Controller/AdvancedSearch.php +++ b/library/WT/Controller/AdvancedSearch.php @@ -36,7 +36,7 @@ class WT_Controller_AdvancedSearch extends WT_Controller_Search { parent::__construct(); $this->setPageTitle(WT_I18N::translate('Advanced search')); - + if (empty($_REQUEST['action'])) { $this->action="advanced"; } diff --git a/library/WT/Controller/Ajax.php b/library/WT/Controller/Ajax.php index 5cc42f15de..1864c0de5d 100644 --- a/library/WT/Controller/Ajax.php +++ b/library/WT/Controller/Ajax.php @@ -33,13 +33,13 @@ class WT_Controller_Ajax extends WT_Controller_Base { $this->page_header=true; return $this; } - + public function pageFooter() { // Ajax responses may have Javascript echo $this->getJavascript(); return $this; } - + // Restrict access public function requireManagerLogin($ged_id=WT_GED_ID) { if ( diff --git a/library/WT/Controller/Ancestry.php b/library/WT/Controller/Ancestry.php index d8da058056..25ee93af34 100644 --- a/library/WT/Controller/Ancestry.php +++ b/library/WT/Controller/Ancestry.php @@ -62,7 +62,7 @@ class WT_Controller_Ancestry extends WT_Controller_Chart { $Dbheight=($box_width*$bheight)/100; $bwidth=$Dbwidth; $bheight=$Dbheight; - + // -- adjust size of the compact box if (!$this->show_full) { $bwidth = $cbwidth; diff --git a/library/WT/Controller/Base.php b/library/WT/Controller/Base.php index 689ada7efc..d9c7ac2d42 100644 --- a/library/WT/Controller/Base.php +++ b/library/WT/Controller/Base.php @@ -103,7 +103,7 @@ class WT_Controller_Base { $TMP_HTML.='<script src="' . $script_name . '"></script>'; } $load_js='[' . implode(',', $load_js) . ']'; - + // Process the scripts, in priority order, after the libraries have loaded $complete_js=''; if ($this->inline_javascript) { diff --git a/library/WT/Controller/Branches.php b/library/WT/Controller/Branches.php index d2a536711f..32a5f47ae0 100644 --- a/library/WT/Controller/Branches.php +++ b/library/WT/Controller/Branches.php @@ -155,7 +155,7 @@ class WT_Controller_Branches extends WT_Controller_Page { $sosa_class = ''; $sosa_html = ''; } - + // Generate HTML for this individual, and all their descendants $indi_html = $individual->getSexImage() . '<a class="' . $sosa_class . '" href="' . $individual->getHtmlUrl() . '">' . $person_name . '</a> ' . $individual->getLifeSpan() . $sosa_html; @@ -172,7 +172,7 @@ class WT_Controller_Branches extends WT_Controller_Page { $indi_html = '<span class="red">'.WT_Gedcom_Code_Pedi::getValue($pedi, $individual).'</span> ' . $indi_html; } } - + // spouses and children $spouse_families = $individual->getSpouseFamilies(); if ($spouse_families) { diff --git a/library/WT/Controller/Chart.php b/library/WT/Controller/Chart.php index 9b7176b4e3..8d22af0385 100644 --- a/library/WT/Controller/Chart.php +++ b/library/WT/Controller/Chart.php @@ -39,7 +39,7 @@ class WT_Controller_Chart extends WT_Controller_Page { $this->root = $this->getSignificantIndividual(); $this->rootid = $this->root->getXref(); } - + if (!$this->root || !$this->root->canShowName()) { header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden'); $this->error_message=WT_I18N::translate('This individual does not exist or you do not have permission to view it.'); diff --git a/library/WT/Controller/Compact.php b/library/WT/Controller/Compact.php index 5d21848056..2f61fbc488 100644 --- a/library/WT/Controller/Compact.php +++ b/library/WT/Controller/Compact.php @@ -49,7 +49,7 @@ class WT_Controller_Compact extends WT_Controller_Chart { } $this->treeid=ancestry_array($this->rootid, 5); } - + function sosa_person($n) { global $SHOW_HIGHLIGHT_IMAGES; diff --git a/library/WT/Controller/Descendancy.php b/library/WT/Controller/Descendancy.php index fd554a9a7b..0b4de75735 100644 --- a/library/WT/Controller/Descendancy.php +++ b/library/WT/Controller/Descendancy.php @@ -72,13 +72,13 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { $Dbheight = ($this->box_width*$bheight)/100; $bwidth = $Dbwidth; $bheight = $Dbheight; - + // -- adjust size of the compact box if (!$this->show_full) { $bwidth = $cbwidth; $bheight = $cbheight; } - + $pbwidth = $bwidth+12; $pbheight = $bheight+14; @@ -128,7 +128,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { */ function print_child_descendancy($person, $depth) { global $WT_IMAGES, $Dindent, $personcount; - + if (is_null($person)) return; //print_r($person); echo "<li>"; @@ -140,7 +140,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { } print_pedigree_person($person, 1, 0, $personcount); echo '</td>'; - + // check if child has parents and add an arrow echo '<td> </td>'; echo '<td>'; @@ -152,7 +152,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { break; } } - + // d'Aboville child number $level =$this->generations-$depth; if ($this->show_full) echo '<br><br> '; @@ -172,14 +172,14 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { echo "</td></tr>"; echo "</table>"; echo "</li>"; - + // loop for each spouse foreach ($person->getSpouseFamilies() as $family) { $personcount++; $this->print_family_descendancy($person, $family, $depth); } } - + /** * print a family descendancy * @@ -189,10 +189,10 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { */ function print_family_descendancy($person, $family, $depth) { global $GEDCOM, $WT_IMAGES, $Dindent, $personcount; - + if (is_null($family)) return; if (is_null($person)) return; - + // print marriage info echo '<li>'; echo '<img src="', $WT_IMAGES['spacer'], '" height="2" width="', ($Dindent+4), '" alt="">'; @@ -204,7 +204,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { } } echo '</span>'; - + // print spouse $spouse=$family->getSpouse($person); echo '<ul style="list-style:none; display:block;" id="'.$family->getXref().$personcount.'">'; @@ -212,7 +212,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { echo '<table border="0" cellpadding="0" cellspacing="0"><tr><td>'; print_pedigree_person($spouse, 1, 0, $personcount); echo '</td>'; - + // check if spouse has parents and add an arrow echo '<td> </td>'; echo '<td>'; @@ -228,7 +228,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { } if ($this->show_full) echo '<br><br> '; echo '</td></tr>'; - + // children $children = $family->getChildren(); echo '<tr><td colspan="3" class="details1" > '; diff --git a/library/WT/Controller/Familybook.php b/library/WT/Controller/Familybook.php index 47438a4a98..5a8dcd2d16 100644 --- a/library/WT/Controller/Familybook.php +++ b/library/WT/Controller/Familybook.php @@ -52,12 +52,12 @@ class WT_Controller_Familybook extends WT_Controller_Chart { $this->box_width = WT_Filter::getInteger('box_width', 50, 300, 100); // Box sizes are set globally in the theme. Modify them here. - global $bwidth, $bheight, $cbwidth, $cbheight, $Dbwidth, $bhalfheight, $Dbheight; + global $bwidth, $bheight, $cbwidth, $cbheight, $Dbwidth, $bhalfheight, $Dbheight; $Dbwidth =$this->box_width * $bwidth / 100; $Dbheight=$this->box_width * $bheight / 100; $bwidth =$Dbwidth; $bheight =$Dbheight; - + // -- adjust size of the compact box if (!$this->show_full) { $bwidth = $this->box_width * $cbwidth / 100; @@ -76,7 +76,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { $this->dgenerations = $this->max_descendency_generations($this->pid, 0); if ($this->dgenerations<1) $this->dgenerations=1; } - + /** * Prints descendency of passed in person */ @@ -96,7 +96,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { $famNum = 0; $lh = 0; // if real person load child array - if ($person) { + if ($person) { $sfamilies=$person->getSpouseFamilies(); $children = array(); //count is position from center to left, dgenerations is number of generations @@ -135,7 +135,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { $h= round(((($bheight)*$kids)/2)+10); //-- adjust for other vertical columns if ($kids>1) $h = ((($kids-1)*4)+$h); - + //echo '<td class="tdtop">', // '<img class="bvertline" src="',$WT_IMAGES["vline"],'" width="3" height="',$h,'" alt=""></td>'; } else { @@ -173,7 +173,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { $h= round(((($bheight)*$kids)/2)+10); //-- adjust for other vertical columns if ($kids>1) $h = ((($kids-1)*4)+$h); - + echo '<td class="tdtop">', '<img class="bvertline" id="vline_',$chil,'" src="',$WT_IMAGES["vline"],'" height="',$h,'" alt=""></td>'; } else { @@ -188,12 +188,12 @@ class WT_Controller_Familybook extends WT_Controller_Chart { echo '</td>'; echo '<td width="',$bwidth,'">'; } - + if ($numkids==0) { $numkids = 1; } echo '<table><tr><td>'; - if ($person) { + if ($person) { print_pedigree_person($person); echo '</td><td>', '<img class="line2" src="',$WT_IMAGES["hline"],'" width="7" height="3" alt="">'; @@ -202,7 +202,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { '</td><td width="7">'; } //----- Print the spouse - if ($count==1 ) { + if ($count==1 ) { if ($this->show_spouse) { foreach ($sfamilies as $family) { $spouse = $family->getSpouse($person); @@ -225,7 +225,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { echo '</table>'; return $numkids; } - + /** * Prints pedigree of the person passed in */ @@ -240,7 +240,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { //Prints empty table columns for children w/o parents up to the max generation //This allows vertical line spacing to be consistent // - if (count($person->getChildFamilies())==0) { + if (count($person->getChildFamilies())==0) { echo '<table>'; $this->printEmptyBox($bwidth, $bheight); @@ -257,7 +257,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { '<td>', '</tr></table>'; } - + //Empty box section done, now for regular pedigree foreach ($person->getChildFamilies() as $family) { echo '<table>', @@ -277,7 +277,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { echo '</td>'; } else { echo '<td>'; - for ($i=$count; $i<$genoffset-1; $i++) { + for ($i=$count; $i<$genoffset-1; $i++) { echo '<table>'; $this->printEmptyBox($bwidth, $bheight); echo '</tr>'; @@ -299,7 +299,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { echo '</td>'; } else { echo '<td>'; - for ($i=$count; $i<$genoffset-1; $i++) { + for ($i=$count; $i<$genoffset-1; $i++) { echo '<table>'; '<tr>'; $this->printEmptyBox($bwidth, $bheight); @@ -313,7 +313,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { break; } } - + /** * Calculates number of generations a person has */ diff --git a/library/WT/Controller/Fanchart.php b/library/WT/Controller/Fanchart.php index 2606857ad4..a87592f565 100644 --- a/library/WT/Controller/Fanchart.php +++ b/library/WT/Controller/Fanchart.php @@ -36,7 +36,7 @@ class WT_Controller_Fanchart extends WT_Controller_Chart { public function __construct() { parent::__construct(); - + $default_generations=get_gedcom_setting(WT_GED_ID, 'DEFAULT_PEDIGREE_GENERATIONS'); // Extract the request parameters diff --git a/library/WT/Controller/GedcomRecord.php b/library/WT/Controller/GedcomRecord.php index 372a624c67..8a8b3c9e22 100644 --- a/library/WT/Controller/GedcomRecord.php +++ b/library/WT/Controller/GedcomRecord.php @@ -44,10 +44,10 @@ class WT_Controller_GedcomRecord extends WT_Controller_Page { } parent::__construct(); - + // We want robots to index this page $this->setMetaRobots('index,follow'); - + // Set a page title if ($this->record) { $this->setCanonicalUrl($this->record->getHtmlUrl()); diff --git a/library/WT/Controller/Hourglass.php b/library/WT/Controller/Hourglass.php index f662aa9604..6a60a2859d 100644 --- a/library/WT/Controller/Hourglass.php +++ b/library/WT/Controller/Hourglass.php @@ -71,13 +71,13 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $this->left_arrow='icon-larrow'; $this->right_arrow='icon-larrow'; } - + // -- size of the detailed boxes based upon optional width parameter $Dbwidth=($this->box_width*$bwidth)/100; $Dbheight=($this->box_width*$bheight)/100; $bwidth=$Dbwidth; $bheight=$Dbheight; - + // -- adjust size of the compact box if (!$this->show_full) { $bwidth = $this->box_width * $cbwidth / 100; @@ -85,14 +85,14 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { } $bhalfheight = (int)($bheight / 2); - + // Validate parameters $this->hourPerson = WT_Individual::getInstance($this->pid); if (!$this->hourPerson) { $this->hourPerson=$this->getSignificantIndividual(); $this->pid=$this->hourPerson->getXref(); } - + $this->name=$this->hourPerson->getFullName(); //Checks how many generations of descendency is for the person for formatting purposes @@ -122,14 +122,14 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { //Prints empty table columns for children w/o parents up to the max generation //This allows vertical line spacing to be consistent // - if (count($person->getChildFamilies())==0) { + if (count($person->getChildFamilies())==0) { echo '<table>', '<tr>', '<td>', '<div style="width:',$bwidth,'px; height:',$bheight,'px;"></div>'; echo '</td>'; echo '<td>'; - + //-- recursively get the father's family $this->print_person_pedigree($person, $count+1); echo '</td>'; @@ -182,7 +182,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { if ($count==$this->generations-1 && $family->getWife()->getChildFamilies()) { echo "<a href=\"#\" onclick=\"ChangeDiv('td_".$ARID."','".$ARID."','".$this->show_full."','".$this->show_spouse."','".$this->box_width."'); return false;\" class=\"".$this->right_arrow."\"></a> "; } - + //-- recursively print the mother's family $this->print_person_pedigree($family->getWife(), $count+1); echo "</td>"; diff --git a/library/WT/Controller/Individual.php b/library/WT/Controller/Individual.php index a7e3fc4cfc..e545ede121 100644 --- a/library/WT/Controller/Individual.php +++ b/library/WT/Controller/Individual.php @@ -50,7 +50,7 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord { $this->tabs = WT_Module::getActiveTabs(); - // If we can display the details, add them to the page header + // If we can display the details, add them to the page header if ($this->record && $this->record->canShow()) { $this->setPageTitle($this->record->getFullName() . ' ' . $this->record->getLifespan()); } @@ -103,7 +103,7 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord { Zend_Session::writeClose(); echo $mod->getTabContent(); - + if (WT_DEBUG_SQL) { echo WT_DB::getQueryLog(); } @@ -129,7 +129,7 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord { ); $all_names=$dummy->getAllNames(); $primary_name=$all_names[0]; - + $this->name_count++; if ($this->name_count >1) { echo '<h3 class="name_two">',$dummy->getFullName(), '</h3>'; } //Other names accordion element echo '<div class="indi_name_details'; @@ -275,7 +275,7 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord { $menu->addOnclick("return edit_name('".$this->record->getXref() . "', '" . $fact->getFactId() . "');"); break; } - + $submenu = new WT_Menu(WT_I18N::translate('Add a new name'), '#', 'menu-indi-addname'); $submenu->addOnclick("return add_name('".$this->record->getXref()."');"); $menu->addSubmenu($submenu); diff --git a/library/WT/Controller/Media.php b/library/WT/Controller/Media.php index 17c9aa98cb..6f71d48693 100644 --- a/library/WT/Controller/Media.php +++ b/library/WT/Controller/Media.php @@ -132,7 +132,7 @@ class WT_Controller_Media extends WT_Controller_GedcomRecord { sort_facts($facts); return $facts; } - + /** * edit menu items used in album tab and media list */ diff --git a/library/WT/Controller/Page.php b/library/WT/Controller/Page.php index 67c9ffd57c..a9252847dc 100644 --- a/library/WT/Controller/Page.php +++ b/library/WT/Controller/Page.php @@ -162,7 +162,7 @@ class WT_Controller_Page extends WT_Controller_Base { var WT_SCRIPT_NAME = "'.WT_SCRIPT_NAME.'"; var WT_LOCALE = "'.WT_LOCALE.'"; ', self::JS_PRIORITY_HIGH); - + // Temporary fix for access to main menu hover elements on android/blackberry touch devices $this->addInlineJavascript(' if(navigator.userAgent.match(/Android|PlayBook/i)) { @@ -170,12 +170,12 @@ class WT_Controller_Page extends WT_Controller_Base { jQuery("a.icon_arrow").attr("href", "#"); } '); - + // Tell IE to use standards mode instead of compatability mode. if ($BROWSERTYPE=='msie') { header("X-UA-Compatible: IE=Edge"); } - + header('Content-Type: text/html; charset=UTF-8'); require WT_ROOT.$headerfile; diff --git a/library/WT/Controller/Pedigree.php b/library/WT/Controller/Pedigree.php index 59c67d70bf..a7929ddc40 100644 --- a/library/WT/Controller/Pedigree.php +++ b/library/WT/Controller/Pedigree.php @@ -53,13 +53,13 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { global $BROWSER_TYPE, $show_full, $talloffset; parent::__construct(); - + $this->linewidth = $linewidth; $this->shadowcolor = $shadowcolor; $this->shadowblur = $shadowblur; $this->shadowoffsetX = $shadowoffsetX; $this->shadowoffsetY = $shadowoffsetY; - + $this->show_full = WT_Filter::getInteger('show_full', 0, 1, $PEDIGREE_FULL_DETAILS); $this->talloffset = WT_Filter::getInteger('talloffset', 0, 3, $PEDIGREE_LAYOUT); $this->box_width = WT_Filter::getInteger('box_width', 50, 300, 100); @@ -72,7 +72,7 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { // Passing a function parameter would be much better. global $PEDIGREE_GENERATIONS; $PEDIGREE_GENERATIONS=$this->PEDIGREE_GENERATIONS; - + // This is passed as a global. A parameter would be better... $this->show_full = ($this->show_full) ? 1 : 0; // Make SURE this is an integer if ($this->talloffset>3) { diff --git a/library/WT/Controller/Simple.php b/library/WT/Controller/Simple.php index 150ab409a5..1afc367d52 100644 --- a/library/WT/Controller/Simple.php +++ b/library/WT/Controller/Simple.php @@ -38,7 +38,7 @@ class WT_Controller_Simple extends WT_Controller_Page { parent::pageHeader(); return $this; } - + // Restrict access public function requireAdminLogin() { if (!WT_USER_IS_ADMIN) { @@ -47,7 +47,7 @@ class WT_Controller_Simple extends WT_Controller_Page { } return $this; } - + // Restrict access public function requireManagerLogin($ged_id=WT_GED_ID) { if ( @@ -59,7 +59,7 @@ class WT_Controller_Simple extends WT_Controller_Page { } return $this; } - + // Restrict access public function requireMemberLogin() { if (!WT_USER_ID) { diff --git a/library/WT/Controller/Timeline.php b/library/WT/Controller/Timeline.php index eb6a64ba09..70c29da68e 100644 --- a/library/WT/Controller/Timeline.php +++ b/library/WT/Controller/Timeline.php @@ -47,7 +47,7 @@ class WT_Controller_Timeline extends WT_Controller_Page { parent::__construct(); $this->setPageTitle(WT_I18N::translate('Timeline')); - + $this->baseyear = date("Y"); //-- new pid $newpid = WT_Filter::get('newpid', WT_REGEX_XREF); |
