diff options
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/classes/class_date.php | 8 | ||||
| -rw-r--r-- | includes/classes/class_event.php | 16 | ||||
| -rw-r--r-- | includes/classes/class_family.php | 6 | ||||
| -rw-r--r-- | includes/classes/class_localclient.php | 13 | ||||
| -rw-r--r-- | includes/classes/class_menu.php | 2 | ||||
| -rw-r--r-- | includes/classes/class_person.php | 2 | ||||
| -rw-r--r-- | includes/classes/class_reportbase.php | 189 | ||||
| -rw-r--r-- | includes/classes/class_reporthtml.php | 26 | ||||
| -rw-r--r-- | includes/classes/class_reportpdf.php | 46 | ||||
| -rw-r--r-- | includes/classes/class_stats.php | 2 | ||||
| -rw-r--r-- | includes/classes/class_treenav.php | 5 | ||||
| -rw-r--r-- | includes/controllers/advancedsearch_ctrl.php | 12 | ||||
| -rw-r--r-- | includes/controllers/ancestry_ctrl.php | 3 | ||||
| -rw-r--r-- | includes/controllers/descendancy_ctrl.php | 3 | ||||
| -rw-r--r-- | includes/controllers/hourglass_ctrl.php | 56 | ||||
| -rw-r--r-- | includes/controllers/individual_ctrl.php | 23 | ||||
| -rw-r--r-- | includes/controllers/media_ctrl.php | 4 | ||||
| -rw-r--r-- | includes/controllers/pedigree_ctrl.php | 16 | ||||
| -rw-r--r-- | includes/controllers/remotelink_ctrl.php | 2 | ||||
| -rw-r--r-- | includes/controllers/search_ctrl.php | 34 |
20 files changed, 224 insertions, 244 deletions
diff --git a/includes/classes/class_date.php b/includes/classes/class_date.php index e42412d7c2..e0f95ca430 100644 --- a/includes/classes/class_date.php +++ b/includes/classes/class_date.php @@ -355,7 +355,7 @@ class CalendarDate { // Convert a date from one calendar to another. function convert_to_cal($calendar) { - switch ($calendar) { + switch ($calendar) { case 'gregorian': return new GregorianDate($this); case 'julian': @@ -565,7 +565,7 @@ class CalendarDate { // Convert a decimal number to roman numerals static function NumToRoman($num) { static $lookup=array(1000=>'M', '900'=>'CM', '500'=>'D', 400=>'CD', 100=>'C', 90=>'XC', 50=>'L', 40=>'XL', 10=>'X', 9=>'IX', 5=>'V', 4=>'IV', 1=>'I'); - if ($num<1) return $num; + if ($num<1) return $num; $roman=''; foreach ($lookup as $key=>$value) while ($num>=$key) { @@ -1047,8 +1047,8 @@ class HebrewDate extends JewishDate { if ($singleDigitYear == true) { $sb .= self::GERSH; //append single quote } else { // append double quote before last digit - $pos1 = strlen($sb)-2; - $sb = substr($sb, 0, $pos1) . self::GERSHAYIM . substr($sb, $pos1); + $pos1 = strlen($sb)-2; + $sb = substr($sb, 0, $pos1) . self::GERSHAYIM . substr($sb, $pos1); $sb = str_replace(self::GERSHAYIM . self::GERSHAYIM, self::GERSHAYIM, $sb); //replace double gershayim with single instance } return $sb; diff --git a/includes/classes/class_event.php b/includes/classes/class_event.php index 6a1df711e5..459a9ce331 100644 --- a/includes/classes/class_event.php +++ b/includes/classes/class_event.php @@ -42,11 +42,11 @@ require_once WT_ROOT.'includes/classes/class_date.php'; * */ class Event { -// These objects need further refinement in their implementations and parsing -// var $address = null; -// var $notes = array(); //[0..*]: string -// var $sourceCitations = array(); //[0..*]: SourceCitation -// var $multimediaLinks = array(); //[0..*]: MultimediaLink +// These objects need further refinement in their implementations and parsing +// var $address = null; +// var $notes = array(); //[0..*]: string +// var $sourceCitations = array(); //[0..*]: SourceCitation +// var $multimediaLinks = array(); //[0..*]: MultimediaLink var $lineNumber = null; var $canShow = null; @@ -263,8 +263,8 @@ class Event { /** * Print a simple fact version of this event * - * @param boolean $return whether to print or return - * @param boolean $anchor whether to add anchor to date and place + * @param boolean $return whether to print or return + * @param boolean $anchor whether to add anchor to date and place */ function print_simple_fact($return=false, $anchor=false) { global $SHOW_PEDIGREE_PLACES, $ABBREVIATE_CHART_LABELS; @@ -367,7 +367,6 @@ class Event { $ret = Event::CompareType($a, $b); } } -// print "[".$a->getTag().":".$adate->isOK().":".$adate->MinJD()."-".$adate->MaxJD()." ".$b->getTag().":".$bdate->isOK().":".$bdate->MinJD()."-".$bdate->MaxJD()." ".$ret."] "; return $ret; } @@ -480,4 +479,3 @@ class Event { return $ret; } } -?> diff --git a/includes/classes/class_family.php b/includes/classes/class_family.php index 998ae4793b..252de5d8fb 100644 --- a/includes/classes/class_family.php +++ b/includes/classes/class_family.php @@ -154,7 +154,7 @@ class Family extends GedcomRecord { /** * get the children - * @return array array of children Persons + * @return array array of children Persons */ function getChildren() { if (!$this->children_loaded) $this->loadChildren(); @@ -163,7 +163,7 @@ class Family extends GedcomRecord { /** * get the children ids - * @return array array of children ids + * @return array array of children ids */ function getChildrenIds() { if (!$this->children_loaded) $this->loadChildren(); @@ -199,7 +199,7 @@ class Family extends GedcomRecord { /** * get the number of children in this family - * @return int the number of children + * @return int the number of children */ function getNumberOfChildren() { diff --git a/includes/classes/class_localclient.php b/includes/classes/class_localclient.php index 752ab3247e..958d3540b9 100644 --- a/includes/classes/class_localclient.php +++ b/includes/classes/class_localclient.php @@ -38,7 +38,7 @@ require_once WT_ROOT.'includes/classes/class_serviceclient.php'; class LocalClient extends ServiceClient { /** * constructor - * @param string $gedrec the gedcom record + * @param string $gedrec the gedcom record */ function __construct($gedrec) { parent::__construct($gedrec); @@ -54,7 +54,7 @@ class LocalClient extends ServiceClient { /** * Get a record from the remote site - * @param string $remoteid the id of the record to get + * @param string $remoteid the id of the record to get */ function getRemoteRecord($remoteid) { $rec = find_gedcom_record($remoteid, WT_GED_ID); @@ -64,10 +64,10 @@ class LocalClient extends ServiceClient { /** * merge a local gedcom record with the information from the remote site - * @param string $xref the remote ID to merge with - * @param string $localrec the local gedcom record to merge the remote record with - * @param boolean $isStub whether or not this is a stub record - * @param boolean $firstLink is this the first time this record is being linked + * @param string $xref the remote ID to merge with + * @param string $localrec the local gedcom record to merge the remote record with + * @param boolean $isStub whether or not this is a stub record + * @param boolean $firstLink is this the first time this record is being linked */ function mergeGedcomRecord($xref, $localrec, $isStub=false, $firstLink=false) { //-- get the record from the database @@ -136,4 +136,3 @@ class LocalClient extends ServiceClient { return $return; } } -?> diff --git a/includes/classes/class_menu.php b/includes/classes/class_menu.php index 2a3928437d..94dc04d39a 100644 --- a/includes/classes/class_menu.php +++ b/includes/classes/class_menu.php @@ -137,7 +137,7 @@ class Menu { return "\t".'<li class="separator"><span></span></li>'."\n"; } if ($this->link) { - if ($this->target !== null) { + if ($this->target !== null) { $link .= ' target="'.$this->target.'"'; } if ($this->link=='#') { diff --git a/includes/classes/class_person.php b/includes/classes/class_person.php index c79e2ea2e8..0b3c1819ec 100644 --- a/includes/classes/class_person.php +++ b/includes/classes/class_person.php @@ -1003,7 +1003,7 @@ class Person extends GedcomRecord { } if ($parent->getSex()=='M') { $this->add_parents_facts($parent, $sosa*2); // recursive call for father ancestors - } elseif ($parent->getSex()=='F') { + } elseif ($parent->getSex()=='F') { $this->add_parents_facts($parent, $sosa*2+1); // recursive call for mother ancestors } } diff --git a/includes/classes/class_reportbase.php b/includes/classes/class_reportbase.php index 7e12983534..25991a14de 100644 --- a/includes/classes/class_reportbase.php +++ b/includes/classes/class_reportbase.php @@ -208,7 +208,7 @@ class ReportBase { * @var string * @todo add the author support */ -// var $rauthor = ""; + //var $rauthor = ""; /** * Keywords * @see ReportBase::setup() @@ -261,19 +261,19 @@ class ReportBase { * The C series is used for folders, post cards and envelopes. C series envelope is suitable to insert A series sizes. * ISO also define format series RA and SRA for untrimmed raw paper, where SRA stands for 'supplementary raw format A'. * Japan has adopted the ISO series A sizes, but its series B sizes are slightly different. These sizes are sometimes called JIS B or JB sizes. - * sun was a unit of length used in Japan and is equal to about 3.03 cm or 1.193 inches + * sun was a unit of length used in Japan and is equal to about 3.03 cm or 1.193 inches * The United States, Canada, and in part Mexico, are today the only industrialized nations in which the ISO standard paper sizes are not yet widely used. * - * A0 & A1 Technical drawings, posters - * A1 & A2 Flip charts - * A2 & A3 Drawings, diagrams, large tables - * A4 Letters, magazines, forms, catalogs, laser printer and copying machine output - * A5 Note pads - * A6 Postcards - * B5, A5, B6 A6 Books - * C4, C5, C6 Envelopes for A4 letters: unfolded (C4), folded once (C5), folded twice (C6) - * B4 & A3 Newspapers, supported by most copying machines in addition to A4 - * B8 & A8 Playing cards + * A0 & A1 Technical drawings, posters + * A1 & A2 Flip charts + * A2 & A3 Drawings, diagrams, large tables + * A4 Letters, magazines, forms, catalogs, laser printer and copying machine output + * A5 Note pads + * A6 Postcards + * B5, A5, B6 A6 Books + * C4, C5, C6 Envelopes for A4 letters: unfolded (C4), folded once (C5), folded twice (C6) + * B4 & A3 Newspapers, supported by most copying machines in addition to A4 + * B8 & A8 Playing cards * * 1 inch = 72 points * 1 mm = 2.8346457 points @@ -282,94 +282,94 @@ class ReportBase { */ switch ($this->pageFormat) { // ISO A series - case "4A0": {$sizes = array(4767.86,6740.79);break;} // ISO 216, 1682 mm x 2378 mm - case "2A0": {$sizes = array(3370.39,4767.86);break;} // ISO 216, 1189 mm x 1682 mm - case "A0": {$sizes = array(2383.94,3370.39);break;} // ISO 216, 841 mm x 1189mm - case "A1": {$sizes = array(1683.78,2383.94);break;} // ISO 216, 594 mm x 841 mm - case "A2": {$sizes = array(1190.55,1683.78);break;} // ISO 216, 420 mm x 594 mm - case "A3": {$sizes = array(841.89,1190.55);break;} // ISO 216, 297 mm x 420 mm - case "A4": default:{ // For unknown Page Size Name - $sizes = array(595.28,841.89); // ISO 216, 210 mm 297 mm + case "4A0": {$sizes = array(4767.86,6740.79);break;} // ISO 216, 1682 mm x 2378 mm + case "2A0": {$sizes = array(3370.39,4767.86);break;} // ISO 216, 1189 mm x 1682 mm + case "A0": {$sizes = array(2383.94,3370.39);break;} // ISO 216, 841 mm x 1189mm + case "A1": {$sizes = array(1683.78,2383.94);break;} // ISO 216, 594 mm x 841 mm + case "A2": {$sizes = array(1190.55,1683.78);break;} // ISO 216, 420 mm x 594 mm + case "A3": {$sizes = array( 841.89,1190.55);break;} // ISO 216, 297 mm x 420 mm + case "A4": default:{ // For unknown Page Size Name + $sizes = array(595.28,841.89); // ISO 216, 210 mm 297 mm $this->pageFormat = "A4"; break;} - case "A5": {$sizes = array(419.53,595.28);break;} // ISO 216, 148 mm x 210 mm - case "A6": {$sizes = array(297.64,419.53);break;} // ISO 216, 105 mm x 148 mm - case "A7": {$sizes = array(209.76,297.64);break;} // ISO 216, 74 mm x 105 mm - case "A8": {$sizes = array(147.40,209.76);break;} // ISO 216, 52 mm x 74 mm - case "A9": {$sizes = array(104.88,147.40);break;} // ISO 216, 37 mm x 52 mm - case "A10": {$sizes = array(73.70,104.88);break;} // ISO 216, 26 mm x 37 mm + case "A5": {$sizes = array(419.53,595.28);break;} // ISO 216, 148 mm x 210 mm + case "A6": {$sizes = array(297.64,419.53);break;} // ISO 216, 105 mm x 148 mm + case "A7": {$sizes = array(209.76,297.64);break;} // ISO 216, 74 mm x 105 mm + case "A8": {$sizes = array(147.40,209.76);break;} // ISO 216, 52 mm x 74 mm + case "A9": {$sizes = array(104.88,147.40);break;} // ISO 216, 37 mm x 52 mm + case "A10": {$sizes = array( 73.70,104.88);break;} // ISO 216, 26 mm x 37 mm // ISO B series - case "B0": {$sizes = array(2834.65,4008.19);break;} // ISO 216, 1000 mm x 1414 mm - case "B1": {$sizes = array(2004.09,2834.65);break;} // ISO 216, 707 mm x 1000 mm - case "B2": {$sizes = array(1417.32,2004.09);break;} // ISO 216, 500 mm x 707 mm - case "B3": {$sizes = array(1000.63,1417.32);break;} // ISO 216, 353 mm x 500 mm - case "B4": {$sizes = array(708.66,1000.63);break;} // ISO 216, 250 mm x 353 mm - case "B5": {$sizes = array(498.90,708.66);break;} // ISO 216, 176 mm x 250 mm - case "B6": {$sizes = array(354.33,498.90);break;} // ISO 216, 125 mm x 176 mm - case "B7": {$sizes = array(249.45,354.33);break;} // ISO 216, 88 mm x 125 mm - case "B8": {$sizes = array(175.75,249.45);break;} // ISO 216, 62 mm x 88 mm - case "B9": {$sizes = array(124.72,175.75);break;} // ISO 216, 44 mm x 62 mm - case "B10": {$sizes = array(87.87,124.72);break;} // ISO 216, 31 mm x 44 mm + case "B0": {$sizes = array(2834.65,4008.19);break;} // ISO 216, 1000 mm x 1414 mm + case "B1": {$sizes = array(2004.09,2834.65);break;} // ISO 216, 707 mm x 1000 mm + case "B2": {$sizes = array(1417.32,2004.09);break;} // ISO 216, 500 mm x 707 mm + case "B3": {$sizes = array(1000.63,1417.32);break;} // ISO 216, 353 mm x 500 mm + case "B4": {$sizes = array( 708.66,1000.63);break;} // ISO 216, 250 mm x 353 mm + case "B5": {$sizes = array( 498.90, 708.66);break;} // ISO 216, 176 mm x 250 mm + case "B6": {$sizes = array( 354.33, 498.90);break;} // ISO 216, 125 mm x 176 mm + case "B7": {$sizes = array( 249.45, 354.33);break;} // ISO 216, 88 mm x 125 mm + case "B8": {$sizes = array( 175.75, 249.45);break;} // ISO 216, 62 mm x 88 mm + case "B9": {$sizes = array( 124.72, 175.75);break;} // ISO 216, 44 mm x 62 mm + case "B10": {$sizes = array( 87.87, 124.72);break;} // ISO 216, 31 mm x 44 mm // ISO C series, Envelope - case "C0": {$sizes = array(2599.37,3676.54);break;} // ISO 269, 917 mm x 1297 mm, For flat A0 sheet - case "C1": {$sizes = array(1836.85,2599.37);break;} // ISO 269, 648 mm x 917 mm, For flat A1 sheet - case "C2": {$sizes = array(1298.27,1836.85);break;} // ISO 269, 458 mm x 648 mm, For flat A2 sheet, A1 folded in half - case "C3": {$sizes = array(918.43,1298.27);break;} // ISO 269, 324 mm x 458 mm, For flat A3 sheet, A2 folded in half - case "C4": {$sizes = array(649.13,918.43);break;} // ISO 269, 229 mm x 324 mm, For flat A4 sheet, A3 folded in half - case "C5": {$sizes = array(459.21,649.13);break;} // ISO 269, 162 mm x 229 mm, For flat A5 sheet, A4 folded in half - case "C6/5":{$sizes = array(323.15,649.13);break;} // ISO 269, 114 mm x 229 mm. A5 folded twice = 1/3 A4. Alternative for the DL envelope - case "C6": {$sizes = array(323.15,459.21);break;} // ISO 269, 114 mm x 162 mm, For A5 folded in half - case "C7/6":{$sizes = array(229.61,459.21);break;} // ISO 269, 81 mm x 162 mm, For A5 sheet folded in thirds - case "C7": {$sizes = array(229.61,323.15);break;} // ISO 269, 81 mm x 114 mm, For A5 folded in quarters - case "C8": {$sizes = array(161.57,229.61);break;} // ISO 269, 57 mm x 81 mm - case "C9": {$sizes = array(113.39,161.57);break;} // ISO 269, 40 mm x 57 mm - case "C10": {$sizes = array(79.37,113.39);break;} // ISO 269, 28 mm x 40 mm - case "DL": {$sizes = array(311.81,623.62);break;} // Original DIN 678 but ISO 269 now has this C6/5 , 110 mm x 220 mm, For A4 sheet folded in thirds, A5 in half + case "C0": {$sizes = array(2599.37,3676.54);break;} // ISO 269, 917 mm x 1297 mm, For flat A0 sheet + case "C1": {$sizes = array(1836.85,2599.37);break;} // ISO 269, 648 mm x 917 mm, For flat A1 sheet + case "C2": {$sizes = array(1298.27,1836.85);break;} // ISO 269, 458 mm x 648 mm, For flat A2 sheet, A1 folded in half + case "C3": {$sizes = array( 918.43,1298.27);break;} // ISO 269, 324 mm x 458 mm, For flat A3 sheet, A2 folded in half + case "C4": {$sizes = array( 649.13, 918.43);break;} // ISO 269, 229 mm x 324 mm, For flat A4 sheet, A3 folded in half + case "C5": {$sizes = array( 459.21, 649.13);break;} // ISO 269, 162 mm x 229 mm, For flat A5 sheet, A4 folded in half + case "C6/5":{$sizes = array( 323.15, 649.13);break;} // ISO 269, 114 mm x 229 mm. A5 folded twice = 1/3 A4. Alternative for the DL envelope + case "C6": {$sizes = array( 323.15, 459.21);break;} // ISO 269, 114 mm x 162 mm, For A5 folded in half + case "C7/6":{$sizes = array( 229.61, 459.21);break;} // ISO 269, 81 mm x 162 mm, For A5 sheet folded in thirds + case "C7": {$sizes = array( 229.61, 323.15);break;} // ISO 269, 81 mm x 114 mm, For A5 folded in quarters + case "C8": {$sizes = array( 161.57, 229.61);break;} // ISO 269, 57 mm x 81 mm + case "C9": {$sizes = array( 113.39, 161.57);break;} // ISO 269, 40 mm x 57 mm + case "C10": {$sizes = array( 79.37, 113.39);break;} // ISO 269, 28 mm x 40 mm + case "DL": {$sizes = array( 311.81, 623.62);break;} // Original DIN 678 but ISO 269 now has this C6/5 , 110 mm x 220 mm, For A4 sheet folded in thirds, A5 in half // Untrimmed stock sizes for the ISO-A Series - ISO primary range - case "RA0": {$sizes = array(2437.80,3458.27);break;} // ISO 478, 860 mm x 1220 mm - case "RA1": {$sizes = array(1729.13,2437.80);break;} // ISO 478, 610 mm x 860 mm - case "RA2": {$sizes = array(1218.90,1729.13);break;} // ISO 478, 430 mm x 610 mm - case "RA3": {$sizes = array(864.57,1218.90);break;} // ISO 478, 305 mm x 430 mm - case "RA4": {$sizes = array(609.45,864.57);break;} // ISO 478, 215 mm x 305 mm + case "RA0": {$sizes = array(2437.80,3458.27);break;} // ISO 478, 860 mm x 1220 mm + case "RA1": {$sizes = array(1729.13,2437.80);break;} // ISO 478, 610 mm x 860 mm + case "RA2": {$sizes = array(1218.90,1729.13);break;} // ISO 478, 430 mm x 610 mm + case "RA3": {$sizes = array( 864.57,1218.90);break;} // ISO 478, 305 mm x 430 mm + case "RA4": {$sizes = array( 609.45, 864.57);break;} // ISO 478, 215 mm x 305 mm // Untrimmed stock sizes for the ISO-A Series - ISO supplementary range - case "SRA0": {$sizes = array(2551.18,3628.35);break;} // ISO 593, 900 mm x 1280 mm - case "SRA1": {$sizes = array(1814.17,2551.18);break;} // ISO 593, 640 mm x 900 mm - case "SRA2": {$sizes = array(1275.59,1814.17);break;} // ISO 593, 450 mm x 640 mm - case "SRA3": {$sizes = array(907.09,1275.59);break;} // ISO 593, 320 mm x 450 mm - case "SRA4": {$sizes = array(637.80,907.09);break;} // ISO 593, 225 mm x 320 mm + case "SRA0": {$sizes = array(2551.18,3628.35);break;} // ISO 593, 900 mm x 1280 mm + case "SRA1": {$sizes = array(1814.17,2551.18);break;} // ISO 593, 640 mm x 900 mm + case "SRA2": {$sizes = array(1275.59,1814.17);break;} // ISO 593, 450 mm x 640 mm + case "SRA3": {$sizes = array( 907.09,1275.59);break;} // ISO 593, 320 mm x 450 mm + case "SRA4": {$sizes = array( 637.80, 907.09);break;} // ISO 593, 225 mm x 320 mm // ISO size variations - case "A2EXTRA": {$sizes = array(1261.42,1754.65);break;} // ISO 216, 445 mm x 619 mm - case "A2SUPER": {$sizes = array(864.57,1440.00);break;} // ISO 216, 305 mm x 508 mm - case "A3EXTRA": {$sizes = array(912.76,1261.42);break;} // ISO 216, 322 mm x 445 mm - case "SUPERA3": {$sizes = array(864.57,1380.47);break;} // ISO 216, 305 mm x 487 mm - case "A4EXTRA": {$sizes = array(666.14,912.76);break;} // ISO 216, 235 mm x 322 mm - case "A4LONG": {$sizes = array(595.28,986.46);break;} // ISO 216, 210 mm x 348 mm - case "A4SUPER": {$sizes = array(649.13,912.76);break;} // ISO 216, 229 mm x 322 mm - case "SUPERA4": {$sizes = array(643.46,1009.13);break;} // ISO 216, 227 mm x 356 mm - case "A5EXTRA": {$sizes = array(490.39,666.14);break;} // ISO 216, 173 mm x 235 mm - case "SOB5EXTRA": {$sizes = array(572.60,782.36);break;} // ISO 216, 202 mm x 276 mm + case "A2EXTRA": {$sizes = array(1261.42,1754.65);break;} // ISO 216, 445 mm x 619 mm + case "A2SUPER": {$sizes = array( 864.57,1440.00);break;} // ISO 216, 305 mm x 508 mm + case "A3EXTRA": {$sizes = array( 912.76,1261.42);break;} // ISO 216, 322 mm x 445 mm + case "SUPERA3": {$sizes = array( 864.57,1380.47);break;} // ISO 216, 305 mm x 487 mm + case "A4EXTRA": {$sizes = array( 666.14, 912.76);break;} // ISO 216, 235 mm x 322 mm + case "A4LONG": {$sizes = array( 595.28, 986.46);break;} // ISO 216, 210 mm x 348 mm + case "A4SUPER": {$sizes = array( 649.13, 912.76);break;} // ISO 216, 229 mm x 322 mm + case "SUPERA4": {$sizes = array( 643.46,1009.13);break;} // ISO 216, 227 mm x 356 mm + case "A5EXTRA": {$sizes = array( 490.39, 666.14);break;} // ISO 216, 173 mm x 235 mm + case "SOB5EXTRA":{$sizes = array( 572.60, 782.36);break;} // ISO 216, 202 mm x 276 mm // Japanese version of the ISO 216 B series - case "JB0": {$sizes = array(2919.69,4127.24);break;} // JIS P 0138-61, 1030 mm x 1456 mm - case "JB1": {$sizes = array(2063.62,2919.69);break;} // JIS P 0138-61, 728 mm x 1030 mm - case "JB2": {$sizes = array(1459.84,2063.62);break;} // JIS P 0138-61, 515 mm x 728 mm - case "JB3": {$sizes = array(1031.81,1459.84);break;} // JIS P 0138-61, 364 mm x 515 mm - case "JB4": {$sizes = array(728.50,1031.81);break;} // JIS P 0138-61, 257 mm x 364 mm - case "JB5": {$sizes = array(515.91,728.50);break;} // JIS P 0138-61, 182 mm x 257 mm - case "JB6": {$sizes = array(362.83,515.91);break;} // JIS P 0138-61, 128 mm x 182 mm - case "JB7": {$sizes = array(257.95,362.83);break;} // JIS P 0138-61, 91 mm x 128 mm - case "JB8": {$sizes = array(181.42,257.95);break;} // JIS P 0138-61, 64 mm x 91 mm - case "JB9": {$sizes = array(127.56,181.42);break;} // JIS P 0138-61, 45 mm x 64 mm - case "JB10":{$sizes = array(90.71,127.56);break;} // JIS P 0138-61, 32 mm x 45 mm + case "JB0": {$sizes = array(2919.69,4127.24);break;} // JIS P 0138-61, 1030 mm x 1456 mm + case "JB1": {$sizes = array(2063.62,2919.69);break;} // JIS P 0138-61, 728 mm x 1030 mm + case "JB2": {$sizes = array(1459.84,2063.62);break;} // JIS P 0138-61, 515 mm x 728 mm + case "JB3": {$sizes = array(1031.81,1459.84);break;} // JIS P 0138-61, 364 mm x 515 mm + case "JB4": {$sizes = array( 728.50,1031.81);break;} // JIS P 0138-61, 257 mm x 364 mm + case "JB5": {$sizes = array( 515.91, 728.50);break;} // JIS P 0138-61, 182 mm x 257 mm + case "JB6": {$sizes = array( 362.83, 515.91);break;} // JIS P 0138-61, 128 mm x 182 mm + case "JB7": {$sizes = array( 257.95, 362.83);break;} // JIS P 0138-61, 91 mm x 128 mm + case "JB8": {$sizes = array( 181.42, 257.95);break;} // JIS P 0138-61, 64 mm x 91 mm + case "JB9": {$sizes = array( 127.56, 181.42);break;} // JIS P 0138-61, 45 mm x 64 mm + case "JB10":{$sizes = array( 90.71, 127.56);break;} // JIS P 0138-61, 32 mm x 45 mm // US pages - case "EXECUTIVE": {$sizes = array(522.00,756.00); break;} // 7.25 in x 10.5 in - case "FOLIO": {$sizes = array(612.00,936.00); break;} // 8.5 in x 13 in - case "FOOLSCAP":{$sizes = array(972.00,1224.00); break;} // 13.5 in x 17 in - case "LEDGER": {$sizes = array(792.00,1224.00); break;} // 11 in x 17 in - case "LEGAL": {$sizes = array(612.00,1008.00); break;} // 8.5 in x 14 in - case "LETTER": {$sizes = array(612.00,792.00); break;} // 8.5 in x 11 in - case "QUARTO": {$sizes = array(609.12,777.5); break;} // 8.46 in x 10.8 in - case "STATEMENT": {$sizes = array(396.00,612.00); break;} // 5.5 in x 8.5 in - case "USGOVT": {$sizes = array(576.00,792.00); break;} // 8 in x 11 in + case "EXECUTIVE": {$sizes = array(522.00, 756.00); break;} // 7.25 in x 10.5 in + case "FOLIO": {$sizes = array(612.00, 936.00); break;} // 8.5 in x 13 in + case "FOOLSCAP": {$sizes = array(972.00,1224.00); break;} // 13.5 in x 17 in + case "LEDGER": {$sizes = array(792.00,1224.00); break;} // 11 in x 17 in + case "LEGAL": {$sizes = array(612.00,1008.00); break;} // 8.5 in x 14 in + case "LETTER": {$sizes = array(612.00, 792.00); break;} // 8.5 in x 11 in + case "QUARTO": {$sizes = array(609.12, 777.50); break;} // 8.46 in x 10.8 in + case "STATEMENT": {$sizes = array(396.00, 612.00); break;} // 5.5 in x 8.5 in + case "USGOVT": {$sizes = array(576.00, 792.00); break;} // 8 in x 11 in } $this->pagew = $sizes[0]; $this->pageh = $sizes[1]; @@ -476,8 +476,8 @@ class Element { * @param &$renderer */ function render(&$renderer) { -// print "Nothing rendered. Something bad happened"; -// debug_print_backtrace(); + //print "Nothing rendered. Something bad happened"; + //debug_print_backtrace(); //-- to be implemented in inherited classes return 0; } @@ -1037,8 +1037,7 @@ class Footnote extends Element { function setNum($n) { $this->num = $n; -//@@ $this->numText = "$n"; - $this->numText = "$n "; //@@ source numbers + $this->numText = "$n "; return 0; } diff --git a/includes/classes/class_reporthtml.php b/includes/classes/class_reporthtml.php index f173edb0e6..0b84575982 100644 --- a/includes/classes/class_reporthtml.php +++ b/includes/classes/class_reporthtml.php @@ -343,7 +343,7 @@ class ReportBaseHTML extends ReportBase { * @todo add page break - <p style='page-break-before:always' /> */ function AddPage() { -// echo("\n\n<p style=\"page-break-before:always;\" /><p/>\n"); + //echo("\n\n<p style=\"page-break-before:always;\" /><p/>\n"); $this->pageN++; // Add a little margin to max Y "between pages" $this->maxY += 10; @@ -639,8 +639,8 @@ class CellHTML extends Cell { /** * Keep the original values, use these local variables */ - $cW = 0; // Class Width - $cP = 0; // Class Padding + $cW = 0; // Class Width + $cP = 0; // Class Padding // If (Future-feature-enable/disable cell padding) $cP = $html->cPadding; @@ -954,11 +954,11 @@ class TextBoxHTML extends TextBox { * Repeted classes would reupdate all their class variables again, Header/Page Header/Footer * This is the bugfree version */ - $cH = 0; // Class Height - $cX = 0; // Class Left + $cH = 0; // Class Height + $cX = 0; // Class Left // Protect height, width, lastheight from padding - $cP = 0; // Class Padding - $cW = 0; // Class Width + $cP = 0; // Class Padding + $cW = 0; // Class Width // Used with line breaks and cell height calculation within this box only $html->largestFontHeight = 0; @@ -1024,7 +1024,7 @@ class TextBoxHTML extends TextBox { // For anything else but text (images), get the height $eH += $this->elements[$i]->getHeight($html); } else { -// if (is_string($element) and $element == "footnotetexts") $html->Footnotes(); + //if (is_string($element) and $element == "footnotetexts") $html->Footnotes(); $fH += abs($html->getFootnotesHeight($cW)); } } @@ -1196,7 +1196,7 @@ class TextHTML extends Text { } $style = $html->getStyle($this->styleName); return ($style["size"] * $ct) * $html->cellHeightRatio; -// return 0; + //return 0; } /** @@ -1301,13 +1301,11 @@ class FootnoteHTML extends Footnote { */ function render(&$html) { $html->setCurrentStyle("footnotenum"); -// 'vertical-align:super' is not working properly in IE 8 -// @deprecated + // 'vertical-align:super' is not working properly in IE 8 + // @deprecated echo "<a href=\"#footnote", $this->num, "\"><sup>"; // working $html->write($html->entityRTL. $this->num); - // Gerrys test code -// $html->write($this->num); echo "</sup></a>\n"; } @@ -1582,5 +1580,3 @@ class LineHTML extends Line { $html->addMaxY($this->y2); } } //-- END Line - -?> diff --git a/includes/classes/class_reportpdf.php b/includes/classes/class_reportpdf.php index ef1746e923..10d104b810 100644 --- a/includes/classes/class_reportpdf.php +++ b/includes/classes/class_reportpdf.php @@ -99,7 +99,7 @@ class ReportBasePDF extends ReportBase { } $this->pdf->SetCreator($appversion." (".parent::pgv_url.")"); // Not implemented yet - ReportBase::setup() -// $this->pdf->SetAuthor($this->rauthor); + //$this->pdf->SetAuthor($this->rauthor); $this->pdf->SetTitle($this->title); $this->pdf->SetSubject($this->rsubject); $this->pdf->SetKeywords($this->rkeywords); @@ -661,7 +661,7 @@ class CellPDF extends Cell { * Repeted classes would reupdate all their class variables again, Header/Page Header/Footer * This is the bugfree version */ - $cX = 0; // Class Left + $cX = 0; // Class Left // Set up the text style if (($pdf->getCurrentStyle()) != ($this->styleName)) { @@ -924,10 +924,10 @@ class TextBoxPDF extends TextBox { * Repeted classes would reupdate all their class variables again, Header/Page Header/Footer * This is the bugfree version */ - $cH = 0; // Class Height - $cW = 0; // Class Width - $cX = 0; // Class Left - $cY = 0; // Class Top + $cH = 0; // Class Height + $cW = 0; // Class Width + $cX = 0; // Class Left + $cY = 0; // Class Top // Used with line breaks and cell height calculation within this box $pdf->largestFontHeight = 0; @@ -990,14 +990,14 @@ class TextBoxPDF extends TextBox { if ($w > $cWT) { $w = $lw[0]; } -// Footnote is at the bottom of the page. No need to calculate it's height or wrap the text! -// We are changing the margins anyway! + // Footnote is at the bottom of the page. No need to calculate it's height or wrap the text! + // We are changing the margins anyway! // For anything else but text (images), get the height $eH += $this->elements[$i]->getHeight($pdf); } -// else { -// $h += $pdf->getFootnotesHeight(); -// } + //else { + //$h += $pdf->getFootnotesHeight(); + //} } // Add up what's the final height @@ -1037,14 +1037,14 @@ class TextBoxPDF extends TextBox { } // Setup the border and background color - $cS = ""; // Class Style - if ($this->border) $cS = "D"; // D or empty string: Draw (default) + $cS = ""; // Class Style + if ($this->border) $cS = "D"; // D or empty string: Draw (default) $match = array(); // Fill the background if ($this->fill) { if (!empty($this->bgcolor)) { if (preg_match("/#?(..)(..)(..)/", $this->bgcolor, $match)) { - $cS .= "F"; // F: Fill the background + $cS .= "F"; // F: Fill the background $r = hexdec($match[1]); $g = hexdec($match[2]); $b = hexdec($match[3]); @@ -1306,7 +1306,7 @@ class FootnotePDF extends Footnote { } $temptext = spanLTRRTL($temptext, "BOTH"); $pdf->writeHTML($temptext."<br/>", true, false, true, false, ""); -// $pdf->Write($pdf->getCurrentStyleHeight(), $this->num.". ".$temptext."\n\n"); //@@ indi list of sources + //$pdf->Write($pdf->getCurrentStyleHeight(), $this->num.". ".$temptext."\n\n"); //@@ indi list of sources } /** @@ -1316,13 +1316,13 @@ class FootnotePDF extends Footnote { * @return float $h */ function getFootnoteHeight(&$pdf) { -// $style = $pdf->getStyle($this->styleName); -// $ct = substr_count($this->numText, "\n"); -// if ($ct > 0) { -// $ct += 1; -// } -// $h = ($style["size"] * $ct); -// return $h; + //$style = $pdf->getStyle($this->styleName); + //$ct = substr_count($this->numText, "\n"); + //if ($ct > 0) { + //$ct += 1; + //} + //$h = ($style["size"] * $ct); + //return $h; return 0; } @@ -1544,5 +1544,3 @@ class LinePDF extends Line { $pdf->Line($this->x1, $this->y1, $this->x2, $this->y2); } } - -?> diff --git a/includes/classes/class_stats.php b/includes/classes/class_stats.php index 8708edead3..2fcddb3c6b 100644 --- a/includes/classes/class_stats.php +++ b/includes/classes/class_stats.php @@ -128,7 +128,7 @@ class stats { $out .= "<td class=\"list_value_wrap\" align=\"{$alignRes}\" valign=\"top\">{$v}</td>"; $out .= "</tr>\n"; } - $out .= '</table>'; + $out .= '</table>'; return $out; } diff --git a/includes/classes/class_treenav.php b/includes/classes/class_treenav.php index 47cbf64d4f..75b712d64d 100644 --- a/includes/classes/class_treenav.php +++ b/includes/classes/class_treenav.php @@ -53,7 +53,7 @@ class TreeNav { function __construct($rootid='', $name='nav', $zoom=0) { global $SHOW_PRIVATE_RELATIONSHIPS; - $SHOW_PRIVATE_RELATIONSHIPS = true; // Interactive Tree doesn't work if this is "false" + $SHOW_PRIVATE_RELATIONSHIPS = true; // Interactive Tree doesn't work if this is "false" if ($rootid!='none') { $rootid = check_rootid($rootid); @@ -413,7 +413,7 @@ class TreeNav { if ($MULTI_MEDIA && $SHOW_HIGHLIGHT_IMAGES) { $object = $person->findHighlightedMedia(); if (!empty($object)) { - $whichFile = thumb_or_main($object); // Do we send the main image or a thumbnail? + $whichFile = thumb_or_main($object); // Do we send the main image or a thumbnail? $size = findImageSize($whichFile); $class = "pedigree_image_portrait"; if ($size[0]>$size[1]) $class = "pedigree_image_landscape"; @@ -680,4 +680,3 @@ class TreeNav { <?php } } -?> diff --git a/includes/controllers/advancedsearch_ctrl.php b/includes/controllers/advancedsearch_ctrl.php index c877ebb999..3c84a11bc1 100644 --- a/includes/controllers/advancedsearch_ctrl.php +++ b/includes/controllers/advancedsearch_ctrl.php @@ -5,7 +5,7 @@ // Copyright (C) 2010 webtrees development team. // // Derived from PhpGedView -// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. +// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -405,17 +405,17 @@ class AdvancedSearchController extends SearchController { $liketmp=''; for($j=0; $j<$ct; $j++) { $liketmp.= "%".($j+1)." ".$parts[$j]." %"; -// if ($j<$ct-1) { -// $sqlwhere .= "%"; -// } else { + //if ($j<$ct-1) { + //$sqlwhere .= "%"; + //} else { $liketmp .= "%{$value}%"; -// } + //} } $sqlwhere .= WT_DB::quote($liketmp); } } $sql = $sqlfields.$sqltables.$sqlwhere; -// print $sql; + //print $sql; if ($justSql) return $sql; $rows=WT_DB::prepare($sql)->fetchAll(PDO::FETCH_ASSOC); foreach ($rows as $row){ diff --git a/includes/controllers/ancestry_ctrl.php b/includes/controllers/ancestry_ctrl.php index 9514c5f06b..c587a349d8 100644 --- a/includes/controllers/ancestry_ctrl.php +++ b/includes/controllers/ancestry_ctrl.php @@ -5,7 +5,7 @@ // Copyright (C) 2010 webtrees development team. // // Derived from PhpGedView -// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. +// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -167,5 +167,4 @@ class AncestryController extends BaseController { } print "</li>\r\n"; } - } diff --git a/includes/controllers/descendancy_ctrl.php b/includes/controllers/descendancy_ctrl.php index f2d5822d83..757086f455 100644 --- a/includes/controllers/descendancy_ctrl.php +++ b/includes/controllers/descendancy_ctrl.php @@ -5,7 +5,7 @@ // Copyright (C) 2010 webtrees development team. // // Derived from PhpGedView -// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. +// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -288,5 +288,4 @@ function print_family_descendancy(&$person, &$family, $depth) { print "</li>\r\n"; } } - } diff --git a/includes/controllers/hourglass_ctrl.php b/includes/controllers/hourglass_ctrl.php index 6ba4df078c..fddef1a811 100644 --- a/includes/controllers/hourglass_ctrl.php +++ b/includes/controllers/hourglass_ctrl.php @@ -202,7 +202,6 @@ class HourglassController extends BaseController { $tablealign = "left"; $otablealign = "right"; } - // print $this->dgenerations; print "<!-- print_descendency for $pid -->"; //-- put a space between families on the last generation if ($count==$this->dgenerations-1) { @@ -494,37 +493,37 @@ class HourglassController extends BaseController { } // Hourglass control..... Ajax arrows at the end of chart - function ChangeDiv(div_id, ARID, full, spouse, width) { - var divelement = document.getElementById(div_id); - var oXmlHttp = createXMLHttp(); - oXmlHttp.open("get", "hourglass_ajax.php?show_full="+full+"&pid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); - oXmlHttp.onreadystatechange=function() - { - if (oXmlHttp.readyState==4) - { - divelement.innerHTML = oXmlHttp.responseText; - sizeLines(); - } - }; - oXmlHttp.send(null); - return false; + function ChangeDiv(div_id, ARID, full, spouse, width) { + var divelement = document.getElementById(div_id); + var oXmlHttp = createXMLHttp(); + oXmlHttp.open("get", "hourglass_ajax.php?show_full="+full+"&pid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); + oXmlHttp.onreadystatechange=function() + { + if (oXmlHttp.readyState==4) + { + divelement.innerHTML = oXmlHttp.responseText; + sizeLines(); + } + }; + oXmlHttp.send(null); + return false; } // Hourglass control..... Ajax arrows at the end of descendants chart function ChangeDis(div_id, ARID, full, spouse, width) { - var divelement = document.getElementById(div_id); - var oXmlHttp = createXMLHttp(); - oXmlHttp.open("get", "hourglass_ajax.php?type=desc&show_full="+full+"&pid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); - oXmlHttp.onreadystatechange=function() - { - if (oXmlHttp.readyState==4) - { - divelement.innerHTML = oXmlHttp.responseText; - sizeLines(); - } - }; - oXmlHttp.send(null); - return false; + var divelement = document.getElementById(div_id); + var oXmlHttp = createXMLHttp(); + oXmlHttp.open("get", "hourglass_ajax.php?type=desc&show_full="+full+"&pid="+ ARID + "&generations=1&box_width="+width+"&show_spouse="+spouse, true); + oXmlHttp.onreadystatechange=function() + { + if (oXmlHttp.readyState==4) + { + divelement.innerHTML = oXmlHttp.responseText; + sizeLines(); + } + }; + oXmlHttp.send(null); + return false; } function sizeLines() { @@ -557,5 +556,4 @@ class HourglassController extends BaseController { </script> <?php } - } diff --git a/includes/controllers/individual_ctrl.php b/includes/controllers/individual_ctrl.php index ca5879f983..8119715905 100644 --- a/includes/controllers/individual_ctrl.php +++ b/includes/controllers/individual_ctrl.php @@ -300,7 +300,7 @@ class IndividualController extends BaseController { if ($this->canShowHighlightedObject()) { $firstmediarec = $this->indi->findHighlightedMedia(); if (!empty($firstmediarec)) { - $filename = thumb_or_main($firstmediarec); // Do we send the main image or a thumbnail? + $filename = thumb_or_main($firstmediarec); // Do we send the main image or a thumbnail? if (!$USE_THUMBS_MAIN || $firstmediarec["_THUM"]=='Y') { $class = "image"; } else { @@ -464,10 +464,8 @@ class IndividualController extends BaseController { echo '</dd>'; echo '</dl>'; // -- find sources - // print " "; print_fact_sources($event->getGedComRecord(), 2); //-- find the notes - // print " "; print_fact_notes($event->getGedComRecord(), 2); echo '</div>'; } @@ -854,9 +852,9 @@ class IndividualController extends BaseController { $famcrec = get_sub_record(1, "1 FAMC @".$family->getXref()."@", $children[$i]->getGedcomRecord()); $pedi = get_gedcom_value("PEDI", 2, $famcrec, '', false); if ($pedi) { - if ($sex=="F" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_F[$pedi].")"; - else if ($sex=="M" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_M[$pedi].")"; - else if (isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES[$pedi].")"; + if ($sex=="F" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_F[$pedi].")"; + else if ($sex=="M" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_M[$pedi].")"; + else if (isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES[$pedi].")"; } $children[$i]->setLabel($label); } @@ -873,9 +871,9 @@ class IndividualController extends BaseController { } if ($newchildren[$i]->getXref()==$this->pid) $label = "<img src=\"". $WT_IMAGES["selected"]. "\" alt=\"\" />"; $pedi = $newchildren[$i]->getChildFamilyPedigree($family->getXref()); - if ($sex=="F" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_F[$pedi].")"; - else if ($sex=="M" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_M[$pedi].")"; - else if (isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES[$pedi].")"; + if ($sex=="F" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_F[$pedi].")"; + else if ($sex=="M" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_M[$pedi].")"; + else if (isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES[$pedi].")"; $newchildren[$i]->setLabel($label); } $num = count($delchildren); @@ -890,9 +888,9 @@ class IndividualController extends BaseController { } if ($delchildren[$i]->getXref()==$this->pid) $label = "<img src=\"". $WT_IMAGES["selected"]. "\" alt=\"\" />"; $pedi = $delchildren[$i]->getChildFamilyPedigree($family->getXref()); - if ($sex=="F" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_F[$pedi].")"; - else if ($sex=="M" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_M[$pedi].")"; - else if (isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES[$pedi].")"; + if ($sex=="F" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_F[$pedi].")"; + else if ($sex=="M" && isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES_M[$pedi].")"; + else if (isset($PEDI_CODES[$pedi])) $label .= "<br />(".$PEDI_CODES[$pedi].")"; $delchildren[$i]->setLabel($label); } if (!is_null($newhusb)) $people['newhusb'] = $newhusb; @@ -920,5 +918,4 @@ class IndividualController extends BaseController { // ----------------------------------------------------------------------------- // End GedFact Assistant Functions // ----------------------------------------------------------------------------- - } diff --git a/includes/controllers/media_ctrl.php b/includes/controllers/media_ctrl.php index e3efe0c9b4..cbb26c989f 100644 --- a/includes/controllers/media_ctrl.php +++ b/includes/controllers/media_ctrl.php @@ -323,7 +323,7 @@ class MediaController extends BaseController{ $facts = $this->mediaobject->getFacts($ignore); sort_facts($facts); -// if ($includeFileName) $facts[] = new Event("1 FILE ".$this->mediaobject->getFilename()); + //if ($includeFileName) $facts[] = new Event("1 FILE ".$this->mediaobject->getFilename()); $mediaType = $this->mediaobject->getMediatype(); if (array_key_exists($mediaType, $MEDIA_TYPES)) $facts[] = new Event("1 TYPE ".$MEDIA_TYPES[$mediaType]); else $facts[] = new Event("1 TYPE ".i18n::translate('Other')); @@ -398,6 +398,4 @@ class MediaController extends BaseController{ function getServerFilename() { return $this->mediaobject->getServerFilename(); } - } - diff --git a/includes/controllers/pedigree_ctrl.php b/includes/controllers/pedigree_ctrl.php index 740282040a..8e4af5c92f 100644 --- a/includes/controllers/pedigree_ctrl.php +++ b/includes/controllers/pedigree_ctrl.php @@ -68,7 +68,7 @@ class PedigreeController extends BaseController { $this->talloffset=safe_GET('talloffset', array('0', '1', '2', '3'), $PEDIGREE_LAYOUT); $this->PEDIGREE_GENERATIONS=safe_GET_integer('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS); - if ($this->talloffset==1) $this->talloffset=1; // Make SURE this is an integer + if ($this->talloffset==1) $this->talloffset=1; // Make SURE this is an integer if ($this->talloffset>1 && $this->PEDIGREE_GENERATIONS>8) $this->PEDIGREE_GENERATIONS=8; // TODO: some library functions expect this as a global. @@ -77,7 +77,7 @@ class PedigreeController extends BaseController { $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 + $this->show_full = ($this->show_full) ? 1 : 0; // Make SURE this is an integer if ($this->talloffset>3) { $this->talloffset=3; } elseif ($this->talloffset<0) { @@ -148,10 +148,10 @@ class PedigreeController extends BaseController { } } // -- this next section will create and position the DIV layers for the pedigree tree - $this->curgen = 1; // -- variable to track which generation the algorithm is currently working on - $this->yoffset=0; // -- used to offset the position of each box as it is generated + $this->curgen = 1; // -- variable to track which generation the algorithm is currently working on + $this->yoffset=0; // -- used to offset the position of each box as it is generated $this->xoffset=0; - $this->prevyoffset=0; // -- used to track the y position of the previous box + $this->prevyoffset=0; // -- used to track the y position of the previous box $this->offsetarray = array(); $this->minyoffset = 0; if ($this->treesize<3) $this->treesize=3; @@ -173,7 +173,7 @@ class PedigreeController extends BaseController { $genoffset = pow(2, $this->curgen-1); $boxspacing = $this->pbwidth+$byspacing; } - // -- calculate the yoffset Position in the generation Spacing between boxes put child between parents + // -- calculate the yoffset Position in the generation Spacing between boxes put child between parents $this->yoffset = $baseyoffset+($boxpos * ($boxspacing * $genoffset))+(($boxspacing/2)*$genoffset)+($boxspacing * $genoffset); // -- calculate the xoffset if ($this->talloffset==0) { @@ -216,7 +216,7 @@ class PedigreeController extends BaseController { else if ($this->talloffset==1) { $this->xoffset = 10 + $basexoffset + (($this->PEDIGREE_GENERATIONS - $this->curgen) * ($this->pbwidth+$bxspacing)); if ($this->curgen == $this->PEDIGREE_GENERATIONS) $this->xoffset += 10; - if ($this->PEDIGREE_GENERATIONS<4) $this->xoffset += 60; + if ($this->PEDIGREE_GENERATIONS<4) $this->xoffset += 60; } else if ($this->talloffset==2) { if ($this->show_full) $this->xoffset = ($this->curgen) * (($this->pbwidth+$bxspacing) / 2)+($this->curgen)*10+136.5; @@ -252,7 +252,7 @@ class PedigreeController extends BaseController { /** * return the title of this page - * @return string the title of the page to go in the <title> tags + * @return string the title of the page to go in the <title> tags */ function getPageTitle() { return $this->getPersonName()." ".i18n::translate('Pedigree Tree'); diff --git a/includes/controllers/remotelink_ctrl.php b/includes/controllers/remotelink_ctrl.php index 3111e8933b..8f2c68d08f 100644 --- a/includes/controllers/remotelink_ctrl.php +++ b/includes/controllers/remotelink_ctrl.php @@ -142,7 +142,7 @@ class RemoteLinkController extends BaseController { if (!$sid) { echo '<span class="error">failed to authenticate to remote site</span>'; $serverID=null; - } else { + } else { if (!$title) { $title=$service->getServiceTitle(); } diff --git a/includes/controllers/search_ctrl.php b/includes/controllers/search_ctrl.php index 18deead47d..35e126cde8 100644 --- a/includes/controllers/search_ctrl.php +++ b/includes/controllers/search_ctrl.php @@ -5,7 +5,7 @@ // Copyright (C) 2010 webtrees development team. // // Derived from PhpGedView -// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. +// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ class SearchController extends BaseController { var $multiTotalResults = -1; var $query; var $myquery = ""; -// var $soundex = "Russell"; + //var $soundex = "Russell"; var $soundex = "DaitchM"; var $subaction = ""; var $nameprt = ""; @@ -364,7 +364,7 @@ class SearchController extends BaseController { } /** - * Gathers results for a general search + * Gathers results for a general search */ function GeneralSearch() { global $GEDCOM; @@ -500,12 +500,12 @@ class SearchController extends BaseController { } else { if($this->replaceNames) { foreach($name_tags as $f=>$tag) { - $newRecord = preg_replace("~(\d) ".$tag." (.*)".$oldquery."(.*)~i", "$1 ".$tag." $2".$this->replace."$3", $newRecord); + $newRecord = preg_replace("~(\d) ".$tag." (.*)".$oldquery."(.*)~i", "$1 ".$tag." $2".$this->replace."$3", $newRecord); } } if($this->replacePlaces) { - if ($this->replacePlacesWord) $newRecord = preg_replace('~(\d) PLAC (.*)([,\W\s])'.$oldquery.'([,\W\s])~i', "$1 PLAC $2$3".$this->replace."$4",$newRecord); - else $newRecord = preg_replace("~(\d) PLAC (.*)".$oldquery."(.*)~i", "$1 PLAC $2".$this->replace."$3",$newRecord); + if ($this->replacePlacesWord) $newRecord = preg_replace('~(\d) PLAC (.*)([,\W\s])'.$oldquery.'([,\W\s])~i', "$1 PLAC $2$3".$this->replace."$4",$newRecord); + else $newRecord = preg_replace("~(\d) PLAC (.*)".$oldquery."(.*)~i", "$1 PLAC $2".$this->replace."$3",$newRecord); } } //-- if the record changed replace the record otherwise remove it from the search results @@ -526,8 +526,8 @@ class SearchController extends BaseController { } else { if($this->replacePlaces) { - if ($this->replacePlacesWord) $newRecord = preg_replace('~(\d) PLAC (.*)([,\W\s])'.$oldquery.'([,\W\s])~i', "$1 PLAC $2$3".$this->replace."$4",$newRecord); - else $newRecord = preg_replace("~(\d) PLAC (.*)".$oldquery."(.*)~i", "$1 PLAC $2".$this->replace."$3",$newRecord); + if ($this->replacePlacesWord) $newRecord = preg_replace('~(\d) PLAC (.*)([,\W\s])'.$oldquery.'([,\W\s])~i', "$1 PLAC $2$3".$this->replace."$4",$newRecord); + else $newRecord = preg_replace("~(\d) PLAC (.*)".$oldquery."(.*)~i", "$1 PLAC $2".$this->replace."$3",$newRecord); } } //-- if the record changed replace the record otherwise remove it from the search results @@ -547,18 +547,18 @@ class SearchController extends BaseController { $newRecord = preg_replace("~".$oldquery."~i", $this->replace, $newRecord); } else { if($this->replaceNames) { - $newRecord = preg_replace("~(\d) TITL (.*)".$oldquery."(.*)~i", "$1 TITL $2".$this->replace."$3", $newRecord); - $newRecord = preg_replace("~(\d) ABBR (.*)".$oldquery."(.*)~i", "$1 ABBR $2".$this->replace."$3", $newRecord); + $newRecord = preg_replace("~(\d) TITL (.*)".$oldquery."(.*)~i", "$1 TITL $2".$this->replace."$3", $newRecord); + $newRecord = preg_replace("~(\d) ABBR (.*)".$oldquery."(.*)~i", "$1 ABBR $2".$this->replace."$3", $newRecord); } if($this->replacePlaces) { - if ($this->replacePlacesWord) $newRecord = preg_replace('~(\d) PLAC (.*)([,\W\s])'.$oldquery.'([,\W\s])~i', "$1 PLAC $2$3".$this->replace."$4",$newRecord); - else $newRecord = preg_replace("~(\d) PLAC (.*)".$oldquery."(.*)~i", "$1 PLAC $2".$this->replace."$3",$newRecord); + if ($this->replacePlacesWord) $newRecord = preg_replace('~(\d) PLAC (.*)([,\W\s])'.$oldquery.'([,\W\s])~i', "$1 PLAC $2$3".$this->replace."$4",$newRecord); + else $newRecord = preg_replace("~(\d) PLAC (.*)".$oldquery."(.*)~i", "$1 PLAC $2".$this->replace."$3",$newRecord); } } //-- if the record changed replace the record otherwise remove it from the search results if($newRecord != $oldRecord) { replace_gedrec($source->getXref(), WT_GED_ID, $newRecord); - } else { + } else { unset($this->mysourcelist[$id]); } } @@ -574,14 +574,14 @@ class SearchController extends BaseController { //-- if the record changed replace the record otherwise remove it from the search results if($newRecord != $oldRecord) { replace_gedrec($note->getXref(), WT_GED_ID, $newRecord); - } else { + } else { unset($this->mynotelist[$id]); } } } /** - * Gathers results for a soundex search + * Gathers results for a soundex search * * TODO * ==== @@ -718,7 +718,7 @@ class SearchController extends BaseController { require_once WT_ROOT.'includes/functions/functions_print_lists.php'; global $GEDCOM, $TEXT_DIRECTION, $WT_IMAGES; - $somethingPrinted = false; // whether anything printed + $somethingPrinted = false; // whether anything printed // ---- section to search and display results on a general keyword search if ($this->action=="general" || $this->action=="soundex" || $this->action=="replace") { if ($this->myindilist || $this->myfamlist || $this->mysourcelist || $this->mynotelist) { @@ -917,7 +917,7 @@ class SearchController extends BaseController { $this->printPageResultsLinks($this->inputFieldNames, $this->totalResults, $this->multiResultsPerPage); } } - return $somethingPrinted; // whether anything printed + return $somethingPrinted; // whether anything printed } /************************************************ Helper Methods ****************************************************************/ |
