diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-09-10 17:55:33 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-09-10 17:55:33 +0000 |
| commit | 9b5fbf4d0de5d867fb509527f89876f1a9f4de7a (patch) | |
| tree | c874c61d6d379160866b83fbbf2f28eb355bf0c3 /includes | |
| parent | 7aabfda984ee9ad21cbf1d23d2831212b1891cb5 (diff) | |
| download | webtrees-9b5fbf4d0de5d867fb509527f89876f1a9f4de7a.tar.gz webtrees-9b5fbf4d0de5d867fb509527f89876f1a9f4de7a.tar.bz2 webtrees-9b5fbf4d0de5d867fb509527f89876f1a9f4de7a.zip | |
Tidy up some whitespace/formatting
Diffstat (limited to 'includes')
27 files changed, 193 insertions, 193 deletions
diff --git a/includes/classes/class_date.php b/includes/classes/class_date.php index 359e979a28..5368d8c68d 100644 --- a/includes/classes/class_date.php +++ b/includes/classes/class_date.php @@ -922,7 +922,7 @@ class HebrewDate extends JewishDate { const GERSHAYIM="״"; const GERSH="׳"; const ALAFIM="אלפים"; - + function FormatDayZeros() { return $this->NumToHebrew($this->d); } @@ -972,17 +972,17 @@ class HebrewDate extends JewishDate { // Hebrew does not have genitive forms return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); } - + static function NUM_TO_MONTH_LOCATIVE($n, $leap_year) { // Hebrew does not have locative forms return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); } - + static function NUM_TO_MONTH_INSTRUMENTAL($n, $leap_year) { // Hebrew does not have instrumental forms return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); } - + static function NUM_TO_SHORT_MONTH($n, $leap_year) { // TODO: Do these have short names? return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); @@ -1375,12 +1375,12 @@ class ArabicDate extends HijriDate { // Arabic does not have locative forms return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); } - + static function NUM_TO_MONTH_INSTRUMENTAL($n, $leap_year) { // Arabic does not have instrumental forms return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); } - + static function NUM_TO_SHORT_MONTH($n, $leap_year) { // TODO: Do these have short names? return self::NUM_TO_MONTH_NOMINATIVE($n, $leap_year); diff --git a/includes/classes/class_gedcomrecord.php b/includes/classes/class_gedcomrecord.php index 4758724773..8c4bbba4c8 100644 --- a/includes/classes/class_gedcomrecord.php +++ b/includes/classes/class_gedcomrecord.php @@ -382,7 +382,7 @@ class GedcomRecord { " FROM `##change`". " WHERE status='pending' AND gedcom_id=? AND xref=?". " ORDER BY change_id desc". - " LIMIT 1" + " LIMIT 1" )->execute(array($this->ged_id, $this->xref))->fetchOne(); return $tmp===''; diff --git a/includes/classes/class_i18n.php b/includes/classes/class_i18n.php index a34ea927c9..ffee5873bd 100644 --- a/includes/classes/class_i18n.php +++ b/includes/classes/class_i18n.php @@ -315,7 +315,7 @@ class i18n { // I18N: Description of someone's age at an event. e.g Died 14 Jan 1900 (aged more than 21 years) return i18n::translate('(aged more than %s)', $age); } else { - // I18N: Description of someone's age at an event. e.g Died 14 Jan 1900 (aged 43 years) + // I18N: Description of someone's age at an event. e.g Died 14 Jan 1900 (aged 43 years) return i18n::translate('(aged %s)', $age); } } else { diff --git a/includes/classes/class_menubar.php b/includes/classes/class_menubar.php index ef0d5862ce..422f9b6b94 100644 --- a/includes/classes/class_menubar.php +++ b/includes/classes/class_menubar.php @@ -184,7 +184,7 @@ class MenuBar global $TEXT_DIRECTION, $WT_IMAGES, $SEARCH_SPIDER; global $PEDIGREE_FULL_DETAILS, $PEDIGREE_LAYOUT; global $controller; - + $style = "top"; if ($rootid) $style = "sub"; if (isset($controller)) { @@ -325,7 +325,7 @@ class MenuBar $menuList["childTimeLine"] = i18n::translate('Show children on timeline chart'); $menuList["familyTimeLine"] = i18n::translate('Show family on timeline chart'); asort($menuList); - + // Produce the submenus in localized name order foreach($menuList as $menuType => $menuName) { switch ($menuType) { @@ -338,7 +338,7 @@ class MenuBar $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}"); $menu->addSubmenu($submenu); break; - + case "childTimeLine": // charts / children_timeline $submenu = new Menu(i18n::translate('Show children on timeline chart'), encode_url('timeline.php?'.$controller->getChildrenUrlTimeline())); @@ -348,7 +348,7 @@ class MenuBar $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}"); $menu->addSubmenu($submenu); break; - + case "familyTimeLine": // charts / family_timeline $submenu = new Menu(i18n::translate('Show family on timeline chart'), encode_url('timeline.php?pids[0]='.$controller->getHusband().'&pids[1]='.$controller->getWife().'&'.$controller->getChildrenUrlTimeline(2))); @@ -358,11 +358,11 @@ class MenuBar $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}"); $menu->addSubmenu($submenu); break; - + } } } - + break; case "lifespan": @@ -469,7 +469,7 @@ class MenuBar */ static function getListsMenu($surname="") { global $TEXT_DIRECTION, $WT_IMAGES, $MULTI_MEDIA, $SEARCH_SPIDER, $controller; - + $style = "top"; if ($surname) $style = "sub"; if (isset($controller)) { @@ -483,7 +483,7 @@ class MenuBar } } } - + if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff=""; if (!empty($SEARCH_SPIDER)) { // Only want the indi list for search engines. @@ -670,8 +670,8 @@ class MenuBar if (isset($controller->famid)) $famid = $controller->famid; } } - - + + if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff=""; if ((!file_exists(WT_ROOT.'reportengine.php')) || (!empty($SEARCH_SPIDER))) { $menu = new Menu("", "", ""); @@ -878,7 +878,7 @@ class MenuBar $current=get_user_setting(WT_USER_ID, 'theme'); $all_themes=get_theme_names(); if (!array_key_exists($current, $all_themes)) { - $current=$THEME_DIR; + $current=$THEME_DIR; } if ($ALLOW_THEME_DROPDOWN && !$SEARCH_SPIDER && get_site_setting('ALLOW_USER_THEMES')) { diff --git a/includes/classes/class_reportbase.php b/includes/classes/class_reportbase.php index 2722a4d7f0..22ed709636 100644 --- a/includes/classes/class_reportbase.php +++ b/includes/classes/class_reportbase.php @@ -117,7 +117,7 @@ class ReportBase { * @var string */ public $pageFormat = "A4"; - + /** * Height of page format in points * @see DocSHandler() @@ -157,27 +157,27 @@ class ReportBase { * @var string */ public $processing = "H"; - + /** * RTL Language (false=LTR, true=RTL) * @see ReportBase::setup() * @var boolean */ public $rtl = false; - + /** * User measure unit. * @var string const */ const unit = "pt"; - + /** * Character set * @see ReportBase::setup() * @var string */ public $charset = "UTF-8"; - + /** * Show the Generated by... (true=show the text) * @see DocSHandler() @@ -190,7 +190,7 @@ class ReportBase { * @var string */ public $generatedby = ""; - + /** * webtrees URL * @var string const @@ -255,15 +255,15 @@ class ReportBase { /** * The current ISO 216 standard was introduced in 1975 and is a direct follow up to the german DIN 476 standard from 1922. ISO 216 is also called EN 20216 in Europe. * The ISO paper sizes are based on the metric system so everything else is aproxiamte - * + * * The Series A is used for Standard Printing and Stationary. * The Series B is used for Posters, Wall-Charts etc. * 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 - * 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. - * + * 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 @@ -448,7 +448,7 @@ class ReportBase { } /** - * @deprecated + * @deprecated * @todo Is this a deprecated function or a future feature? * function get_type() { @@ -546,7 +546,7 @@ class Element { $this->text = $text; return 0; } - + } //-- END Element /** @@ -618,7 +618,7 @@ class Cell extends Element { */ public $bocolor; /** - * The HTML color code to fill the background of this cell. + * The HTML color code to fill the background of this cell. * @var string */ public $bgcolor; @@ -645,7 +645,7 @@ class Cell extends Element { */ public $newline; /** - * The name of the Style that should be used to render the text. + * The name of the Style that should be used to render the text. * @var string */ public $styleName; @@ -671,11 +671,11 @@ class Cell extends Element { public $url; /** * Cell width DEFAULT 0 (expressed in points) - * Setting the width to 0 will make it the width from the current location to the right margin. + * Setting the width to 0 will make it the width from the current location to the right margin. * @var int */ public $width; - + public $reseth; /** @@ -760,7 +760,7 @@ class TextBox extends Element { * @var array */ public $elements = array(); - + /** * Background color in HTML code * @var string @@ -771,7 +771,7 @@ class TextBox extends Element { * @var boolean */ public $fill; - + /** * Position the left corner of this box on the page(expressed in points). The default is the current position. * @var mix @@ -787,12 +787,12 @@ class TextBox extends Element { * @var boolean */ public $newline; - + /** * @var boolean */ public $pagecheck; - + /** * Whether or not a border should be printed around this box. 0 = no border, 1 = border. Default is 0 * @var boolean @@ -811,7 +811,7 @@ class TextBox extends Element { * @var string */ public $style; - + /** * @var array $borderstyle Border style of rectangle. Array with keys among the following: * <ul> @@ -841,7 +841,7 @@ class TextBox extends Element { * Resets this box last height after it's done */ public $reseth; - + /** * TextBox - Element - Base * @@ -1137,7 +1137,7 @@ class Image extends Element { * @var string */ public $line = ""; - + /** * Image class function - Base * @@ -1147,7 +1147,7 @@ class Image extends Element { * @param float $w Width of the image * @param float $h Height of the image * @param string $align Placement of the image. L: left, C:center, R:right - * @param string $ln T:same line, N:next line + * @param string $ln T:same line, N:next line */ function Image($file, $x, $y, $w, $h, $align, $ln) { $this->file = $file; @@ -1751,7 +1751,7 @@ function CellSHandler($attrs) { // int Cell height (expressed in points) The starting height of this cell. If the text wraps the height will automatically be adjusted. $height= 0; if (!empty($attrs["height"])) $height = (int)$attrs["height"]; - // int Cell width (expressed in points) Setting the width to 0 will make it the width from the current location to the right margin. + // int Cell width (expressed in points) Setting the width to 0 will make it the width from the current location to the right margin. $width = 0; if (!empty($attrs["width"])) $width = (int)$attrs["width"]; @@ -1782,7 +1782,7 @@ function CellSHandler($attrs) { } } - // string The name of the Style that should be used to render the text. + // string The name of the Style that should be used to render the text. $style = ""; if (!empty($attrs["style"])) $style = $attrs["style"]; @@ -1967,7 +1967,7 @@ function TextBoxSHandler($attrs) { // string Background color code $bgcolor = ""; if (!empty($attrs["bgcolor"])) $bgcolor = $attrs["bgcolor"]; - + // boolean Wether or not fill the background color $fill = true; if (isset($attrs["fill"])) { @@ -1999,14 +1999,14 @@ function TextBoxSHandler($attrs) { $borderstyle = ""; if (!empty($attrs["borderstyle"])) $borderstyle = $attrs["borderstyle"]; */ - + // int The starting height of this cell. If the text wraps the height will automatically be adjusted $height = 0; if (!empty($attrs["height"])) $height = (int)$attrs["height"]; // int Setting the width to 0 will make it the width from the current location to the margin $width = 0; if (!empty($attrs["width"])) $width = (int)$attrs["width"]; - + // mixed Position the left corner of this box on the page. The default is the current position. $left = "."; if (isset($attrs["left"])) { @@ -2104,7 +2104,7 @@ function TextSHandler($attrs) { array_push($printDataStack, $printData); $printData = true; - // string The name of the Style that should be used to render the text. + // string The name of the Style that should be used to render the text. $style = ""; if (!empty($attrs["style"])) $style = $attrs["style"]; @@ -2130,13 +2130,13 @@ function TextEHandler() { * Get the name * 1. id is empty - current GEDCOM record * 2. id is set with a record id -* +* * @param array $attrs an array of key value pairs for the attributes */ function GetPersonNameSHandler($attrs) { // @deprecated global $currentElement, $vars, $gedrec; - + $id = ""; $match = array(); if (empty($attrs["id"])) { @@ -2209,7 +2209,7 @@ function GetPersonNameSHandler($attrs) { /** * XML <GedcomValue> start elemnt handler -* +* * @param array $attrs an array of key value pairs for the attributes */ function GedcomValueSHandler($attrs) { @@ -2221,7 +2221,7 @@ function GedcomValueSHandler($attrs) { if (preg_match("/0 @(.+)@/", $gedrec, $match)) { $id = $match[1]; } - + if (isset($attrs["newline"]) && $attrs["newline"]=="1") { $useBreak = "1"; } else { @@ -2271,7 +2271,7 @@ function GedcomValueSHandler($attrs) { /** * XML <RepeatTag> start elemnt handler -* +* * @see RepeatTagEHandler() * @param array $attrs an array of key value pairs for the attributes */ @@ -2346,7 +2346,7 @@ function RepeatTagSHandler($attrs) { /** * XML </ RepeatTag> end elemnt handler -* +* * @see RepeatTagSHandler() */ function RepeatTagEHandler() { @@ -2429,20 +2429,20 @@ function RepeatTagEHandler() { /** * Variable lookup -* +* * Retrieve predefined variables : * @ desc GEDCOM fact description, example: * 1 EVEN This is a description * @ fact GEDCOM fact tag, such as BIRT, DEAT etc. * $ i18n::translate('....') * $ language_settings[] -* -* +* +* * Or retrieve variables preset with <SetVar> element -* +* * If the variable is a date and 'date="1"' attribute is set then the date will be reformated * from Sep to September -* +* * @param array $attrs an array of key value pairs for the attributes * @see SetVarSHandler() */ @@ -2455,7 +2455,7 @@ function varSHandler($attrs) { if (empty($attrs["var"])) { die("<strong>REPORT ERROR var: </strong> The attribute \"var=\" is missing or not set in the XML file on line: ".xml_get_current_line_number($parser)); } - + $var = $attrs["var"]; // SetVar element preset variables if (!empty($vars[$var]["id"])) { @@ -2484,7 +2484,7 @@ function varSHandler($attrs) { /** * Variable lookup, retrieve the first letter only -* +* * @param array $attrs an array of key value pairs for the attributes */ function varLetterSHandler($attrs) { @@ -2587,7 +2587,7 @@ function FactsSHandler($attrs) { /** * XML </ Facts> end elemnt handler -* +* * @see FactsSHandler() */ function FactsEHandler() { @@ -2681,7 +2681,7 @@ function SetVarSHandler($attrs) { if (empty($attrs["name"])) { die("<strong>REPORT ERROR var: </strong> The attribute \"name=\" is missing or not set in the XML file"); } - + $name = $attrs["name"]; $value = $attrs["value"]; $match = array(); @@ -2778,7 +2778,7 @@ function ifSHandler($attrs) { } elseif ($id=="generation") { $value = "\"$generation\""; } else { - + $temp = explode(" ", trim($gedrec)); $level = $temp[0]; if ($level==0) { @@ -2814,7 +2814,7 @@ function ifEHandler() { * XML <Footnote > start element * Collect the Footnote links * GEDCOM Records that are protected by Privacy setting will be ignore -* +* * @param array $attrs an array of key value pairs for the attributes * @see FootnoteEHandler() */ @@ -2846,7 +2846,7 @@ function FootnoteSHandler($attrs) { /** * XML <Footnote /> end element * Print the collected Footnote data -* +* * @see FootnoteSHandler() */ function FootnoteEHandler() { @@ -3012,10 +3012,10 @@ function ImageSHandler($attrs) { $height = 0; if (!empty($attrs["width"])) $width = (int)$attrs["width"]; if (!empty($attrs["height"])) $height = (int)$attrs["height"]; - + $file = ""; if (!empty($attrs["file"])) $file = $attrs["file"]; - + if ($file=="@FILE") { $match = array(); if (preg_match("/\d OBJE @(.+)@/", $gedrec, $match)) { @@ -3548,7 +3548,7 @@ function ListEHandler() { /** * XML <ListTotal> elemnt handler -* +* * Prints the total number of records in a list * The total number is collected from * List and Relatives @@ -3705,7 +3705,7 @@ function RelativesSHandler($attrs) { /** * XML </ Relatives> end elemnt handler -* +* * @see RelativesSHandler() */ function RelativesEHandler() { @@ -3773,7 +3773,7 @@ function RelativesEHandler() { xml_set_element_handler($repeat_parser, "startElement", "endElement"); //-- set the character data handler xml_set_character_data_handler($repeat_parser, "characterData"); - + if (!xml_parse($repeat_parser, $reportxml, true)) { printf($reportxml."\nRelativesEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); print_r($repeatsStack); @@ -3794,7 +3794,7 @@ function RelativesEHandler() { /** * XML <Generation /> elemnt handler -* +* * Prints the number of generations * @todo no info on wiki * @see Element::addText() diff --git a/includes/classes/class_reporthtml.php b/includes/classes/class_reporthtml.php index 9fa0810b83..f173edb0e6 100644 --- a/includes/classes/class_reporthtml.php +++ b/includes/classes/class_reporthtml.php @@ -1318,7 +1318,7 @@ class FootnoteHTML extends Footnote { * @param ReportBaseHTML &$html */ function renderFootnote(&$html) { - + if ($html->getCurrentStyle() != $this->styleName) { $html->setCurrentStyle($this->styleName); } @@ -1355,7 +1355,7 @@ class FootnoteHTML extends Footnote { /** * Get the width of text * Breaks up a text into lines if needed - * + * * @param ReportBaseHTML &$html * @return array */ diff --git a/includes/classes/class_reportpdf.php b/includes/classes/class_reportpdf.php index c7586488f2..ef1746e923 100644 --- a/includes/classes/class_reportpdf.php +++ b/includes/classes/class_reportpdf.php @@ -239,7 +239,7 @@ class ReportBasePDF extends ReportBase { * @param int $w Image width * @param int $h Image height * @param string $align L:left, C:center, R:right or empty to use x/y - * @param string $ln T:same line, N:next line + * @param string $ln T:same line, N:next line * @return ImagePDF */ function createImage($file, $x, $y, $w, $h, $align, $ln) { @@ -320,7 +320,7 @@ class PDF extends TCPDF { * @var int */ public $lastpicpage = 0; - + public $wt_report; /** @@ -518,7 +518,7 @@ class PDF extends TCPDF { $this->SetX($x); return $x; } - + /** * Get the maximum line width to draw from the curren position -PDF * RTL supported @@ -532,7 +532,7 @@ class PDF extends TCPDF { return ($this->getRemainingWidth() + $m["left"]); } } - + function getFootnotesHeight() { $h=0; foreach($this->printedfootnotes as $element) { @@ -578,7 +578,7 @@ class PDF extends TCPDF { $this->printedfootnotes[] = $footnote; return false; } - + /** * Used this function instead of AddPage() * This function will make sure that images will not be overwritten @@ -590,11 +590,11 @@ class PDF extends TCPDF { $this->AddPage(); } - + /******************************************* * TCPDF protected functions *******************************************/ - + /** * Add a page if needed -PDF * @param $height Cell height. Default value: 0 @@ -611,7 +611,7 @@ class PDF extends TCPDF { function getRemainingWidthPDF() { return $this->getRemainingWidth(); } - + } //-- END PDF /** @@ -662,7 +662,7 @@ class CellPDF extends Cell { * This is the bugfree version */ $cX = 0; // Class Left - + // Set up the text style if (($pdf->getCurrentStyle()) != ($this->styleName)) { $pdf->setCurrentStyle($this->styleName); @@ -1085,7 +1085,7 @@ class TextBoxPDF extends TextBox { } // Save the current page number $cPN = $pdf->getPage(); - + // Render the elements (write text, print picture...) foreach($this->elements as $element) { if (is_object($element)) { @@ -1180,7 +1180,7 @@ class TextPDF extends Text { /** * Splits the text into lines if necessary to fit into a giving cell - * + * * @param PDF &$pdf * @return array */ @@ -1329,7 +1329,7 @@ class FootnotePDF extends Footnote { /** * Splits the text into lines to fit into a giving cell * and returns the last lines width - * + * * @param PDF &$pdf * @return array */ @@ -1483,7 +1483,7 @@ class ImagePDF extends Image { } else { $pdf->SetY($this->y); } - + $pdf->Image($this->file, $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align); $lastpicpage = $pdf->PageNo(); $pdf->lastpicpage = $pdf->getPage(); diff --git a/includes/classes/class_treenav.php b/includes/classes/class_treenav.php index 36e077ce63..47cbf64d4f 100644 --- a/includes/classes/class_treenav.php +++ b/includes/classes/class_treenav.php @@ -287,7 +287,7 @@ class TreeNav { ?> <span class="name1"> - <?php $thumb = $this->getThumbnail($person); + <?php $thumb = $this->getThumbnail($person); if (!empty($thumb)) { echo $thumb; } else if ($USE_SILHOUETTE && isset($WT_IMAGES["default_image_U"])) { @@ -303,7 +303,7 @@ class TreeNav { } else { $thumbnail .= $WT_IMAGES["default_image_U"]; - } + } $thumbnail .="\" class=\"".$class."\" border=\"none\" alt=\"\" />"; echo $thumbnail; } ?> @@ -325,7 +325,7 @@ class TreeNav { if (!empty($spouse)) { $name = $spouse->getFullName(); ?> - <?php $thumb = $this->getThumbnail($spouse); + <?php $thumb = $this->getThumbnail($spouse); if (!empty($thumb)) { echo $thumb; } else if ($USE_SILHOUETTE && isset($WT_IMAGES["default_image_U"])) { @@ -341,7 +341,7 @@ class TreeNav { } else { $thumbnail .= $WT_IMAGES["default_image_U"]; - } + } $thumbnail .="\" class=\"".$class."\" border=\"none\" alt=\"\" />"; echo $thumbnail; } ?> diff --git a/includes/classes/class_wt_db.php b/includes/classes/class_wt_db.php index 62531330ce..53cdadd737 100644 --- a/includes/classes/class_wt_db.php +++ b/includes/classes/class_wt_db.php @@ -53,7 +53,7 @@ class WT_DB { public final function __clone() { trigger_error('WT_DB::clone() is not allowed.', E_USER_ERROR); } - + // Prevent instantiation via serialize() public final function __wakeup() { trigger_error('WT_DB::unserialize() is not allowed.', E_USER_ERROR); @@ -262,7 +262,7 @@ class WT_DB { } return new WT_DBStatement(self::$pdo->prepare($statement)); } - + // Map all other functions onto the base PDO object public function __call($function, $params) { return call_user_func_array(array(self::$pdo, $function), $params); diff --git a/includes/controllers/individual_ctrl.php b/includes/controllers/individual_ctrl.php index 69a07bdd11..ea3e64a84d 100644 --- a/includes/controllers/individual_ctrl.php +++ b/includes/controllers/individual_ctrl.php @@ -92,7 +92,7 @@ class IndividualController extends BaseController { // Start with the gedcom's default tab $this->default_tab=get_gedcom_setting(WT_GED_ID, 'GEDCOM_DEFAULT_TAB'); } - + if (find_person_record($this->pid, WT_GED_ID) || find_updated_record($this->pid, WT_GED_ID)!==null){ $this->indi = new Person($gedrec, false); $this->indi->ged_id=WT_GED_ID; // This record is from a file @@ -199,19 +199,19 @@ class IndividualController extends BaseController { $this->tabs = WT_Module::getActiveTabs(); foreach($this->tabs as $mod) { $mod->setController($this); - if ($mod->hasTabContent()) { + if ($mod->hasTabContent()) { if (empty($this->default_tab)) { $this->default_tab=$mod->getName(); } } } - + if (!isset($_SESSION['WT_pin']) && $DEFAULT_PIN_STATE) $_SESSION['WT_pin'] = true; - + if (!isset($_SESSION['WT_sb_closed']) && $DEFAULT_SB_CLOSED_STATE) $_SESSION['WT_sb_closed'] = true; - + //-- handle ajax calls if ($this->action=="ajax") { $tab = 0; @@ -229,17 +229,17 @@ class IndividualController extends BaseController { echo WT_JS_END; } } - + if (isset($_REQUEST['pin'])) { if ($_REQUEST['pin']=='true') $_SESSION['WT_pin'] = true; else $_SESSION['WT_pin'] = false; } - + if (isset($_REQUEST['sb_closed'])) { if ($_REQUEST['sb_closed']=='true') $_SESSION['WT_sb_closed'] = true; else $_SESSION['WT_sb_closed'] = false; } - + //-- only get the requested tab and then exit if (WT_DEBUG_SQL) { echo WT_DB::getQueryLog(); @@ -340,7 +340,7 @@ class IndividualController extends BaseController { $result .= $WT_IMAGES["default_image_M"]; } else { $result .= $WT_IMAGES["default_image_U"]; - } + } $result .="\" class=\"".$class."\" border=\"none\" alt=\"\" />"; return $result; } @@ -637,7 +637,7 @@ class IndividualController extends BaseController { $otherfacts = $this->indi->getOtherFacts(); return $otherfacts; } - + /** * get the person box stylesheet class * for the given person @@ -659,7 +659,7 @@ class IndividualController extends BaseController { } return "person_box".$isf; } - + /** * build an array of Person that will be used to build a list * of family members on the close relatives tab diff --git a/includes/controllers/media_ctrl.php b/includes/controllers/media_ctrl.php index 35a016365a..e3efe0c9b4 100644 --- a/includes/controllers/media_ctrl.php +++ b/includes/controllers/media_ctrl.php @@ -182,7 +182,7 @@ class MediaController extends BaseController{ $menu = new Menu(i18n::translate('Edit')); $menu->addIcon('edit_media'); $menu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "submenu{$ff}", 'icon_large_gedcom'); - + if (WT_USER_CAN_EDIT) { $submenu = new Menu(i18n::translate('Edit media')); $submenu->addOnclick("window.open('addmedia.php?action=editmedia&pid={$this->pid}', '_blank', 'top=50,left=50,width=600,height=500,resizable=1,scrollbars=1')"); @@ -193,10 +193,10 @@ class MediaController extends BaseController{ // main link displayed on page if (WT_USER_GEDCOM_ADMIN && file_exists(WT_ROOT.'modules/GEDFact_assistant/_MEDIA/media_1_ctrl.php')) { $submenu = new Menu(i18n::translate('Manage links')); - } else { + } else { $submenu = new Menu(i18n::translate('Set link')); } - + // GEDFact assistant Add Media Links ======================= if (WT_USER_GEDCOM_ADMIN && file_exists(WT_ROOT.'modules/GEDFact_assistant/_MEDIA/media_1_ctrl.php')) { $submenu->addOnclick("return ilinkitem('".$this->pid."','manage');"); diff --git a/includes/controllers/note_ctrl.php b/includes/controllers/note_ctrl.php index 350ceb6458..2d86118df9 100644 --- a/includes/controllers/note_ctrl.php +++ b/includes/controllers/note_ctrl.php @@ -172,7 +172,7 @@ class NoteController extends BaseController { $submenu->addIcon('edit_note'); $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "submenu{$ff}"); $menu->addSubmenu($submenu); - + $menu->addSeparator(); } diff --git a/includes/controllers/pedigree_ctrl.php b/includes/controllers/pedigree_ctrl.php index bb826d4009..740282040a 100644 --- a/includes/controllers/pedigree_ctrl.php +++ b/includes/controllers/pedigree_ctrl.php @@ -209,7 +209,7 @@ class PedigreeController extends BaseController { if ($i%2 == 0) $this->yoffset=$this->yoffset - (($boxspacing/2) * $temp); else $this->yoffset=$this->yoffset + (($boxspacing/2) * $temp); } - + } $this->yoffset-=(($boxspacing/2)*pow(2,($this->PEDIGREE_GENERATIONS-2))-($boxspacing/2)); } @@ -217,7 +217,7 @@ class PedigreeController extends BaseController { $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; - } + } else if ($this->talloffset==2) { if ($this->show_full) $this->xoffset = ($this->curgen) * (($this->pbwidth+$bxspacing) / 2)+($this->curgen)*10+136.5; else $this->xoffset = ($this->curgen) * (($this->pbwidth+$bxspacing) / 4)+($this->curgen)*10+215.75; diff --git a/includes/controllers/remotelink_ctrl.php b/includes/controllers/remotelink_ctrl.php index db002adfbd..3111e8933b 100644 --- a/includes/controllers/remotelink_ctrl.php +++ b/includes/controllers/remotelink_ctrl.php @@ -87,7 +87,7 @@ class RemoteLinkController extends BaseController { $this->form_txtPassword =safe_POST('txtPassword', WT_REGEX_PASSWORD); $this->form_cbExistingServers=safe_POST('cbExistingServers', array_keys($this->server_list)); $this->form_txtCB_Title =safe_POST('txtCB_Title', '[^<>"%{};]+'); - $this->form_txtCB_GID =safe_POST('txtCB_GID', $this->gedcom_list); + $this->form_txtCB_GID =safe_POST('txtCB_GID', $this->gedcom_list); $this->form_txtFS_URL =safe_POST('txtFS_URL', WT_REGEX_URL); $this->form_txtFS_Title =safe_POST('txtFS_Title', '[^<>"%{};]+'); $this->form_txtFS_GID =safe_POST('txtFS_GID', $this->gedcom_list); @@ -96,7 +96,7 @@ class RemoteLinkController extends BaseController { if (is_null($this->form_location)) { if ($this->server_list) { - $this->form_location='existing'; + $this->form_location='existing'; } else { $this->form_location='remote'; } @@ -126,7 +126,7 @@ class RemoteLinkController extends BaseController { if (!$url || !$gedcom_id || !$username || !$password) { return null; } - + if (preg_match('/\?wsdl$/', $url)==0) { $url.="?wsdl"; } @@ -275,16 +275,16 @@ class RemoteLinkController extends BaseController { $relation_type=$this->form_cbRelationship; if ($serverID && $link_pid) { $indirec=find_gedcom_record($this->pid, WT_GED_ID, true); - + switch ($relation_type) { case "father": $indistub="0 @new@ INDI\n1 SOUR @{$serverID}@\n2 PAGE {$link_pid}\n1 RFN {$serverID}:{$link_pid}"; $stub_id=append_gedrec($indistub, WT_GED_ID); $indistub=find_gedcom_record($stub_id, WT_GED_ID, true); - + $gedcom_fam="0 @new@ FAM\n1 HUSB @{$stub_id}@\n1 CHIL @{$this->pid}@"; $fam_id=append_gedrec($gedcom_fam, WT_GED_ID); - + $indirec.= "\n1 FAMC @{$fam_id}@"; replace_gedrec($this->pid, WT_GED_ID, $indirec); @@ -297,13 +297,13 @@ class RemoteLinkController extends BaseController { $indistub="0 @new@ INDI\n1 SOUR @{$serverID}@\n2 PAGE {$link_pid}\n1 RFN {$serverID}:{$link_pid}"; $stub_id=append_gedrec($indistub, WT_GED_ID); $indistub=find_gedcom_record($stub_id, WT_GED_ID, true); - + $gedcom_fam="0 @new@ FAM\n1 WIFE @{$stub_id}@\n1 CHIL @{$this->pid}@"; $fam_id=append_gedrec($gedcom_fam, WT_GED_ID); - + $indirec.="\n1 FAMC @{$fam_id}@"; replace_gedrec($this->pid, WT_GED_ID, $indirec); - + $serviceClient=ServiceClient::getInstance($serverID); $indistub=$serviceClient->mergeGedcomRecord($link_pid, $indistub, true, true); $indistub.="\n1 FAMS @".$fam_id."@"; @@ -313,13 +313,13 @@ class RemoteLinkController extends BaseController { $indistub="0 @new@ INDI\n1 SOUR @{$serverID}@\n2 PAGE {$link_pid}\n1 RFN {$serverID}:{$link_pid}"; $stub_id=append_gedrec($indistub, WT_GED_ID); $indistub=find_gedcom_record($stub_id, WT_GED_ID, true); - + $gedcom_fam="0 @new@ FAM\n1 MARR Y\n1 WIFE @{$this->pid}@\n1 HUSB @{$stub_id}@\n"; $fam_id=append_gedrec($gedcom_fam, WT_GED_ID); - + $indirec.="\n1 FAMS @{$fam_id}@"; replace_gedrec($this->pid, WT_GED_ID, $indirec); - + $serviceClient=ServiceClient::getInstance($serverID); $indistub=$serviceClient->mergeGedcomRecord($link_pid, $indistub, true, true); $indistub.="\n1 FAMS @{$fam_id}@"; @@ -332,10 +332,10 @@ class RemoteLinkController extends BaseController { $gedcom_fam="0 @new@ FAM\n1 MARR Y\n1 WIFE @{$stub_id}@\n1 HUSB @{$this->pid}@"; $fam_id=append_gedrec($gedcom_fam, WT_GED_ID); - + $indirec.="\n1 FAMS @{$fam_id}@"; replace_gedrec($this->pid, WT_GED_ID, $indirec); - + $serviceClient=ServiceClient::getInstance($serverID); $indistub=$serviceClient->mergeGedcomRecord($link_pid, $indistub, true, true); $indistub.="\n1 FAMS @{$fam_id}@\n"; @@ -346,7 +346,7 @@ class RemoteLinkController extends BaseController { $indistub="0 @new@ INDI\n1 SOUR @{$serverID}@\n2 PAGE {$link_pid}\n1 RFN {$serverID}:{$link_pid}"; $stub_id=append_gedrec($indistub, WT_GED_ID); $indistub=find_gedcom_record($stub_id, WT_GED_ID, true); - + if (get_gedcom_value('SEX', 1, $indirec, '', false)=='F') { $gedcom_fam="0 @new@ FAM\n1 WIFE @{$this->pid}@\n1 CHIL @{$stub_id}@"; } else { @@ -355,7 +355,7 @@ class RemoteLinkController extends BaseController { $fam_id=append_gedrec($gedcom_fam, WT_GED_ID); $indirec.="\n1 FAMS @{$fam_id}@"; replace_gedrec($this->pid, WT_GED_ID, $indirec); - + $serviceClient=ServiceClient::getInstance($serverID); $indistub=$serviceClient->mergeGedcomRecord($link_pid, $indistub, true, true); $indistub.="\n1 FAMC @".$fam_id."@"; @@ -363,7 +363,7 @@ class RemoteLinkController extends BaseController { break; case 'current_person': $indirec.="\n1 RFN {$serverID}:{$link_pid}\n1 SOUR @{$serverID}@\n2 PAGE {$link_pid}"; - + $serviceClient = ServiceClient::getInstance($serverID); if (!is_null($serviceClient)) { //-- get rid of change date diff --git a/includes/extras/functions.pl.php b/includes/extras/functions.pl.php index 89f9db3853..bfa1170671 100644 --- a/includes/extras/functions.pl.php +++ b/includes/extras/functions.pl.php @@ -43,7 +43,7 @@ function getFirstRelationsName_pl($pid) { $fname=''; } //return $fname; - + // tested $pname=''; $sex = Person::getInstance($pid)->getSex(); diff --git a/includes/functions/functions.php b/includes/functions/functions.php index 93922b45f4..122403808e 100644 --- a/includes/functions/functions.php +++ b/includes/functions/functions.php @@ -1769,7 +1769,7 @@ function get_relationship($pid1, $pid2, $followspouse=true, $maxlength=0, $ignor //echo execution_stats(); //echo "-->\n"; } - + // Convert "generic" relationships into sex-specific ones. foreach ($resnode['path'] as $n=>$pid) { switch ($resnode['relations'][$n]) { @@ -1911,7 +1911,7 @@ function get_relationship_name_from_path($path, $pid1, $pid2) { switch ($path) { case '': return i18n::translate('self'); - + // Level One relationships case 'mot': return i18n::translate('mother'); case 'fat': return i18n::translate('father'); @@ -1967,7 +1967,7 @@ function get_relationship_name_from_path($path, $pid1, $pid2) { } } return i18n::translate('sibling'); - + // Level Two relationships case 'brochi': return i18n::translate_c('brother\'s child', 'nephew/niece'); case 'brodau': return i18n::translate_c('brother\'s daughter', 'niece'); @@ -2762,7 +2762,7 @@ function get_relationship_name_from_path($path, $pid1, $pid2) { case 'es': // Source: Wes Groleau (adding doesn't change behavior, but needs to be better researched) default: switch ($last) { - + case 'son': // I18N: if you need a different number for %d, contact the developers, as a code-change is required return i18n::translate('great x%d grandson', $up-2); case 'dau': return i18n::translate('great x%d granddaughter', $up-2); @@ -3359,8 +3359,8 @@ function mediaFileInfo($fileName, $thumbName, $mid, $name='', $notes='', $obeyVi } else if (preg_match('/\.wmv$/i', $fileName)) { $type .= 'wmv'; } else if (strpos($fileName, 'http://maps.google.')===0) { - $type .= 'streetview'; - } else { + $type .= 'streetview'; + } else { $type .= 'other'; } // $type is now: (url | local) _ (flv | picasa | image | page | audio | wmv | streetview |other) @@ -3397,7 +3397,7 @@ function mediaFileInfo($fileName, $thumbName, $mid, $name='', $notes='', $obeyVi $url = encode_url($fileName) . "\" rel='clearbox({$LB_URL_WIDTH}, {$LB_URL_HEIGHT}, click)' rev=\"" . $mid . "::" . $GEDCOM . "::" . PrintReady(htmlspecialchars($name, ENT_COMPAT, 'UTF-8')) . "::" . htmlspecialchars($notes, ENT_COMPAT, 'UTF-8'); break 2; case 'url_streetview': - if (WT_SCRIPT_NAME != "media.php") { + if (WT_SCRIPT_NAME != "media.php") { echo '<iframe style="float:left; padding:5px;" width="264" height="176" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'. $fileName. '&output=svembed"></iframe>'; } break 2; diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php index 23f3b8f2e2..dff42ccd3a 100644 --- a/includes/functions/functions_charts.php +++ b/includes/functions/functions_charts.php @@ -518,7 +518,7 @@ function print_family_facts(&$family, $sosa = 0) { // -- new fact link if ($sosa==0 && WT_USER_CAN_EDIT) { print_add_new_fact($famid, $indifacts, "FAM"); - + // -- new note print "<tr><td class=\"descriptionbox\">"; print i18n::translate('Add Note'); @@ -527,7 +527,7 @@ function print_family_facts(&$family, $sosa = 0) { print "<a href=\"javascript:;\" onclick=\"return add_new_record('$famid','NOTE');\">" . i18n::translate('Add a new note') . "</a>"; print "<br />\n"; print "</td></tr>\n"; - + // -- new shared note print "<tr><td class=\"descriptionbox\">"; print i18n::translate('Add Shared Note'); @@ -536,7 +536,7 @@ function print_family_facts(&$family, $sosa = 0) { print "<a href=\"javascript:;\" onclick=\"return add_new_record('$famid','SHARED_NOTE');\">" . i18n::translate('Add a new shared note') . "</a>"; print "<br />\n"; print "</td></tr>\n"; - + // -- new media print "<tr><td class=\"descriptionbox\">"; print i18n::translate('Add media'); @@ -546,7 +546,7 @@ function print_family_facts(&$family, $sosa = 0) { print "<br />\n"; print "<a href=\"javascript:;\" onclick=\"window.open('inverselink.php?linktoid={$famid}&linkto=family', '_blank', 'top=50,left=50,width=400,height=300,resizable=1,scrollbars=1'); return false;\">".i18n::translate('Link to an existing Media item')."</a>"; print "</td></tr>\n"; - + // -- new source citation print "<tr><td class=\"descriptionbox\">"; print i18n::translate('Add Source Citation'); diff --git a/includes/functions/functions_db.php b/includes/functions/functions_db.php index 97caabd5f1..fd2fd2f6f9 100644 --- a/includes/functions/functions_db.php +++ b/includes/functions/functions_db.php @@ -837,7 +837,7 @@ function find_gedcom_record($xref, $ged_id, $pending=false) { } else { $gedcom=null; } - + if (is_null($gedcom)) { $gedcom=find_person_record($xref, $ged_id); } @@ -1262,7 +1262,7 @@ function search_indis_dates($day, $month, $year, $facts) { function search_indis_daterange($start, $end, $facts) { $sql="SELECT 'INDI' AS type, i_id AS xref, i_file AS ged_id, i_gedcom AS gedrec, i_isdead, i_sex FROM `##individuals` JOIN `##dates` ON i_id=d_gid AND i_file=d_file WHERE i_file=? AND d_julianday1 BETWEEN ? AND ?"; $vars=array(WT_GED_ID, $start, $end); - + if ($facts) { $facts=explode(',', $facts); foreach ($facts as $key=>$value) { @@ -1472,7 +1472,7 @@ function search_notes($query, $geds, $match, $skip) { $querysql=array(); // Convert the query into a regular expression $queryregex=array(); - + foreach ($query as $q) { $queryregex[]=preg_quote(utf8_strtoupper($q), '/'); $querysql[]="o_gedcom LIKE ".WT_DB::quote("%{$q}%")." COLLATE '".i18n::$collation."'"; diff --git a/includes/functions/functions_edit.php b/includes/functions/functions_edit.php index 8e980359a3..9b4daf5511 100644 --- a/includes/functions/functions_edit.php +++ b/includes/functions/functions_edit.php @@ -506,7 +506,7 @@ function print_indi_form($nextaction, $famid, $linenum='', $namerec='', $famtag= global $bdm, $TEXT_DIRECTION, $STANDARD_NAME_FACTS, $REVERSED_NAME_FACTS, $ADVANCED_NAME_FACTS, $ADVANCED_PLAC_FACTS; global $QUICK_REQUIRED_FACTS, $QUICK_REQUIRED_FAMFACTS, $NO_UPDATE_CHAN; - $SURNAME_TRADITION=get_gedcom_setting(WT_GED_ID, 'SURNAME_TRADITION'); + $SURNAME_TRADITION=get_gedcom_setting(WT_GED_ID, 'SURNAME_TRADITION'); $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR init_calendar_popup(); @@ -1041,7 +1041,7 @@ function print_calendar_popup($id, $asString=false) { */ function print_addnewmedia_link($element_id) { global $WT_IMAGES, $pid; - + $text = i18n::translate('Add a new media item'); if (isset($WT_IMAGES["button_addmedia"])) $Link = "<img src=\"".$WT_IMAGES["button_addmedia"]."\" alt=\"".$text."\" title=\"".$text."\" border=\"0\" align=\"middle\" />"; else $Link = $text; @@ -1068,7 +1068,7 @@ function print_addnewrepository_link($element_id) { */ function print_addnewnote_link($element_id) { global $WT_IMAGES, $pid; - + $text = i18n::translate('Create a new Shared Note'); if (isset($WT_IMAGES["button_addnote"])) $Link = "<img src=\"".$WT_IMAGES["button_addnote"]."\" alt=\"".$text."\" title=\"".$text."\" border=\"0\" align=\"middle\" />"; else $Link = $text; @@ -1313,18 +1313,18 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= echo " style=\"display:none;\""; } echo " >\n"; - + if (in_array($fact, $subnamefacts) || $fact=="LATI" || $fact=="LONG") { echo "<td class=\"optionbox $TEXT_DIRECTION wrap width25\">"; }else{ echo "<td class=\"descriptionbox $TEXT_DIRECTION wrap width25\">"; } - + if (WT_DEBUG) { echo $element_name, "<br />\n"; } - + // tag name if (!empty($label)) { @@ -1338,7 +1338,7 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= echo translate_fact('SHARED_NOTE'); /* if (file_exists(WT_ROOT.'modules/GEDFact_assistant/_CENS/census_1_ctrl.php') && $pid && $label=="GEDFact Assistant") { - // use $label (GEDFact Assistant); + // use $label (GEDFact Assistant); }else{ echo i18n::translate('Shared note'); } @@ -1384,8 +1384,8 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= echo "<input type=\"hidden\" name=\"islink[]\" value=\"", $islink, "\" />\n"; echo "<input type=\"hidden\" name=\"tag[]\" value=\"", $fact, "\" />\n"; - // Shared Notes Debug ------------------------------------------------ - // Please leave until GEDFact assistant/_CENS is released - B.Holland + // Shared Notes Debug ------------------------------------------------ + // Please leave until GEDFact assistant/_CENS is released - B.Holland // echo "<br />Label = ".$label; // echo "<br />Level = ".$level; // echo "<br />Link = ".$islink; @@ -1419,18 +1419,18 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= echo i18n::translate('Yes'); } /* - // If GEDFAct_assistant/_CENS/ module exists && we are on the INDI page && action is ADD a new CENS event + // If GEDFAct_assistant/_CENS/ module exists && we are on the INDI page && action is ADD a new CENS event // Then show the add Shared note input field and the GEDFact assisted icon. - // If GEDFAct_assistant/_CENS/ module not installed ... do not show + // If GEDFAct_assistant/_CENS/ module not installed ... do not show if (file_exists(WT_ROOT.'modules/GEDFact_assistant/_CENS/census_1_ctrl.php') && $pid && $fact=="CENS") { $type_pid=GedcomRecord::getInstance($pid); - if ($type_pid->getType()=="INDI" && $action=="add" ) { + if ($type_pid->getType()=="INDI" && $action=="add" ) { add_simple_tag("2 SHARED_NOTE", "", "GEDFact Assistant"); } } // ----------------------------------------------------------------------------------------------------- */ - + } else if ($fact=="TEMP") { echo "<select tabindex=\"", $tabkey, "\" name=\"", $element_name, "\" >\n"; @@ -1682,12 +1682,12 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= print_editnote_link($value); } // If GEDFact_assistant/_CENS/ module exists && we are on the INDI page and the action is a GEDFact CENS assistant addition. - // Then show the add Shared note assisted icon, if not ... show regular Shared note icons. + // Then show the add Shared note assisted icon, if not ... show regular Shared note icons. if (file_exists(WT_ROOT.'modules/GEDFact_assistant/_CENS/census_1_ctrl.php') && ($action=="add" || $action=="edit" ) && $pid) { // Check if a CENS event --------------------------- if ($event_add=="census_add") { $type_pid=GedcomRecord::getInstance($pid); - if ($type_pid->getType()=="INDI" ) { + if ($type_pid->getType()=="INDI" ) { echo " "; echo " "; echo "<a href=\"javascript:ADD;\" onclick=\"addnewnote_assisted(document.getElementById('", $element_id, "'), '", $pid, "' ); return false;\" title=\"".i18n::translate('Create a new Shared Note using Assistant')."\" alt=\"".i18n::translate('Create a new Shared Note using Assistant')."\">"; @@ -1699,17 +1699,17 @@ function add_simple_tag($tag, $upperlevel='', $label='', $readOnly='', $noClose= } } - if ($fact=="OBJE") { + if ($fact=="OBJE") { print_findmedia_link($element_id, "1media"); } if ($fact=="OBJE" && !$value) { print_addnewmedia_link($element_id); $value = "new"; } - + echo "<br />"; } - + // current value if ($TEXT_DIRECTION=="ltr") { if ($fact=="DATE") { @@ -2214,7 +2214,7 @@ function linkMedia($mediaid, $linktoid, $level=1, $chan=true) { if ($level!=1) return false; // Level 2 items get linked elsewhere // find Indi, Family, or Source record to link to $gedrec = find_gedcom_record($linktoid, WT_GED_ID, true); - + //-- check if we are re-editing an unaccepted link that is not already in the DB if (strpos($gedrec, "1 OBJE @$mediaid@")!==false) return false; @@ -2236,7 +2236,7 @@ function linkMedia($mediaid, $linktoid, $level=1, $chan=true) { * @param $linenum should be ALWAYS set to 'OBJE'. * @param int $level Level where the Media Object reference should be removed from (not used) * @param boolean $chan Whether or not to update/add the CHAN record -* +* * @return bool success or failure */ function unlinkMedia($linktoid, $linenum, $mediaid, $level=1, $chan=true) { @@ -2244,7 +2244,7 @@ function unlinkMedia($linktoid, $linenum, $mediaid, $level=1, $chan=true) { if ($level!=1) return false; // Level 2 items get unlinked elsewhere (maybe ??) // find Indi, Family, or Source record to unlink from $gedrec = find_gedcom_record($linktoid, WT_GED_ID, true); - + //-- when deleting/unlinking a media link //-- $linenum comes as an OBJE and the $mediaid to delete should be set if (!is_numeric($linenum)) { @@ -2264,7 +2264,7 @@ function create_add_form($fact) { global $tags, $FULL_SOURCES; $tags = array(); - + // GEDFact_assistant ================================================ if ($fact=="CENS") { global $TEXT_DIRECTION, $CensDate; @@ -2331,14 +2331,14 @@ function create_edit_form($gedrec, $linenum, $level0type) { $type = trim($fields[1]); $level1type = $type; - + // GEDFact_assistant ================================================ if ($type=="CENS") { global $TEXT_DIRECTION, $CensDate; $CensDate="yes"; } // ================================================================== - + if (count($fields)>2) { $ct = preg_match("/@.*@/", $fields[2]); $levellink = $ct > 0; @@ -2366,7 +2366,7 @@ function create_edit_form($gedrec, $linenum, $level0type) { if (preg_match_all('/('.WT_REGEX_TAG.')/', $ADVANCED_PLAC_FACTS, $match)) { $expected_subtags['PLAC']=array_merge($match[1], $expected_subtags['PLAC']); } - + $stack=array(0=>$level0type); // Loop on existing tags : while (true) { diff --git a/includes/functions/functions_mail.php b/includes/functions/functions_mail.php index 5c41f1d8f5..88c863084f 100644 --- a/includes/functions/functions_mail.php +++ b/includes/functions/functions_mail.php @@ -173,7 +173,7 @@ function webtreesMail($to, $from, $subject, $message) { return true; } } elseif ($SMTP_ACTIVE=='internal') { - // use original PHP mail sending function + // use original PHP mail sending function mail($to, hex4email($subject, 'UTF-8'), $message, $extraHeaders); } } diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php index 8420ade832..e73293d2b7 100644 --- a/includes/functions/functions_mediadb.php +++ b/includes/functions/functions_mediadb.php @@ -359,8 +359,8 @@ function get_medialist($currentdir = false, $directory = "", $linkonly = false, } } } -*/ - +*/ + if (!$excludeLinks) { foreach ($medialist as $key=>$media) { foreach (fetch_linked_indi($media["XREF"], 'OBJE', WT_GED_ID) as $indi) { @@ -1346,7 +1346,7 @@ function show_media_form($pid, $action = "newentry", $filename = "", $linktoid = $gedtitl = "TITL"; } add_simple_tag("2 $gedtitl"); - + if (strstr($ADVANCED_NAME_FACTS, "_HEB")!==false) { // 3 _HEB if ($gedrec == "") diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php index 95bb338b6a..3a4fec33b5 100644 --- a/includes/functions/functions_print_facts.php +++ b/includes/functions/functions_print_facts.php @@ -53,7 +53,7 @@ function expand_urls($text) { // This matches far too much while a "precise" regex is several pages long. // This is a compromise. $URL_REGEX='((https?|ftp]):)(//([^\s/?#<>]*))?([^\s?#<>]*)(\?([^\s#<>]*))?(#[^\s?#<>]+)?'; - + return preg_replace_callback( '/'.addcslashes("(?!>)$URL_REGEX(?!</a>)", '/').'/i', create_function( // Insert soft hyphens into the replaced string @@ -79,7 +79,7 @@ function print_fact(&$eventObj, $noedit=false) { if (!$eventObj->canShow()) { return false; } - + $fact = $eventObj->getTag(); $rawEvent = $eventObj->getDetail(); $event = htmlspecialchars($rawEvent, ENT_COMPAT, 'UTF-8'); @@ -168,10 +168,10 @@ function print_fact(&$eventObj, $noedit=false) { echo " <div style=\"width:25px;\">"; $menu->printMenu(); echo "</div>"; - } else { + } else { echo " <ul>"; $menu->printMenu(); - echo "</ul>"; + echo "</ul>"; } } echo "</td>"; @@ -223,7 +223,7 @@ function print_fact(&$eventObj, $noedit=false) { //echo "<td class=\"facts_value facts_value$styleadd\">"; if ((canDisplayFact($pid, WT_GED_ID, $factrec))) { if (isset($resn_value)) { - echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; + echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; echo help_link('RESN'); } // -- first print TYPE for some facts @@ -342,7 +342,7 @@ function print_fact(&$eventObj, $noedit=false) { if ($ct>0) echo " - ", translate_fact('_WT_USER'), ": ", $match[1]; // -- Find RESN tag if (isset($resn_value)) { - echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; + echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; echo help_link('RESN'); } if (preg_match("/\n2 FAMC @(.+)@/", $factrec, $match)) { @@ -907,7 +907,7 @@ function print_main_sources($factrec, $level, $pid, $linenum, $noedit=false) { if ($resn_tag > 0) $resn_value = strtolower(trim($rmatch[1])); // -- Find RESN tag if (isset($resn_value)) { - echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; + echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; echo help_link('RESN'); } $cs = preg_match("/$nlevel EVEN (.*)/", $srec, $cmatch); @@ -988,7 +988,7 @@ function printSourceStructure($textSOUR) { } foreach($textSOUR["TEXT"] as $text) { $data.="<br /> <span class=\"label\">".translate_fact('TEXT').": </span><span class=\"field\">".PrintReady(expand_urls($text))."</span>"; - if (!empty($text) && !empty($note_data)) $data.="<br />"; + if (!empty($text) && !empty($note_data)) $data.="<br />"; $data.=$note_data; } } @@ -1178,10 +1178,10 @@ function print_main_notes($factrec, $level, $pid, $linenum, $noedit=false) { if ( strstr($text, "|") && file_exists(WT_ROOT.'modules/GEDFact_assistant/_CENS/census_note_decode.php') ) { require WT_ROOT.'modules/GEDFact_assistant/_CENS/census_note_decode.php'; }else{ - $text = $centitl."".$text; + $text = $centitl."".$text; } } - + $align = ""; if (!empty($text)) { if ($TEXT_DIRECTION=="rtl" && !hasRTLText($text) && hasLTRText($text)) $align=" align=\"left\""; @@ -1196,7 +1196,7 @@ function print_main_notes($factrec, $level, $pid, $linenum, $noedit=false) { if ($resn_tag > 0) $resn_value = strtolower(trim($rmatch[1])); // -- Find RESN tag if (isset($resn_value)) { - echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; + echo '<img src="images/RESN_', $resn_value, '.gif" alt="', $RESN_CODES[$resn_value], '" title="', $RESN_CODES[$resn_value], '" />'; echo help_link('RESN'); } echo "<br />\n"; diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php index 813ac2cc75..bedc295735 100644 --- a/includes/functions/functions_print_lists.php +++ b/includes/functions/functions_print_lists.php @@ -1321,7 +1321,7 @@ function format_surname_list($surnames, $style, $totals) { $newcol=ceil($count/$col); $html2 ='<table class="list_table"><tr>'; $html2.='<td class="list_value" style="padding: 14px;">'; - + foreach ($html as $surn=>$surns) { $html2.= $surns.'<br />'; $i++; @@ -1331,7 +1331,7 @@ function format_surname_list($surnames, $style, $totals) { } } $html2.='</td></tr></table>'; - + return $html2; } } diff --git a/includes/functions/functions_privacy.php b/includes/functions/functions_privacy.php index 8a5042b1e6..9d12d1dc33 100644 --- a/includes/functions/functions_privacy.php +++ b/includes/functions/functions_privacy.php @@ -80,7 +80,7 @@ function is_dead($indirec, $gedcom_id) { } else { return false; } - + // "1 DEAT Y" or "1 DEAT/2 DATE" or "1 DEAT/2 PLAC" if (preg_match('/\n1 (?:'.WT_EVENTS_DEAT.')(?: Y|(?:\n[2-9].+)*\n2 (DATE|PLAC) )/', $indirec)) { return true; @@ -368,7 +368,7 @@ function canDisplayRecord($ged_id, $gedrec) { if (isset($global_facts[$type])) { return $cache[$cache_key]=($global_facts[$type]>=$pgv_USER_ACCESS_LEVEL); } - + // No restriction found - must be public: return $cache[$cache_key]=true; } diff --git a/includes/functions/functions_rtl.php b/includes/functions/functions_rtl.php index 9549a4e168..a17ee3996e 100644 --- a/includes/functions/functions_rtl.php +++ b/includes/functions/functions_rtl.php @@ -103,8 +103,8 @@ function spanLTRRTL($inputText, $direction='BOTH', $class='') { $endLTR = '</LTR>'; // This will become '</span>' at the end $startRTL = '<RTL>'; // This will become '<span dir="rtl">' at the end $endRTL = '</RTL>'; // This will become '</span>' at the end - $lenStart = strlen($startLTR); // RTL version MUST have same length - $lenEnd = strlen($endLTR); // RTL version MUST have same length + $lenStart = strlen($startLTR); // RTL version MUST have same length + $lenEnd = strlen($endLTR); // RTL version MUST have same length $previousState = ''; $currentState = strtoupper($TEXT_DIRECTION); @@ -376,7 +376,7 @@ function spanLTRRTL($inputText, $direction='BOTH', $class='') { // Lastly, do some more cleanups if ($debug) {echo '<b>Interim Output:</b>'; DumpString($result);} - + // Move leading RTL numeric strings to following LTR text // (this happens when the page direction is RTL and the original text begins with a number and is followed by LTR text) while (substr($result, 0, $lenStart+3) == $startRTL.WT_UTF8_LRE) { @@ -392,12 +392,12 @@ function spanLTRRTL($inputText, $direction='BOTH', $class='') { $result = $startLTR . substr($result, $lenStart, $spanEnd-$lenStart) . substr($result, $spanEnd+$lenStart+$lenEnd); break; } - + // On RTL pages, put trailing "." in RTL numeric strings into its own RTL span if ($TEXT_DIRECTION == 'rtl') { $result = str_replace(WT_UTF8_PDF.'.'.$endRTL, WT_UTF8_PDF.$endRTL.$startRTL.'.'.$endRTL, $result); } - + // Trim trailing blanks preceding <br /> in LTR text while ($previousState != 'RTL') { if (strpos($result, ' <LTRbr />') !== false) { diff --git a/includes/hitcount.php b/includes/hitcount.php index d9afcb0767..0dc81ab906 100644 --- a/includes/hitcount.php +++ b/includes/hitcount.php @@ -74,7 +74,7 @@ if ($page_parameter) { "SELECT page_count FROM `##hit_counter`". " WHERE gedcom_id=? AND page_name=? AND page_parameter=?" )->execute(array(WT_GED_ID, WT_SCRIPT_NAME, $page_parameter))->fetchOne(); - + // Only record one hit per session if ($page_parameter && empty($_SESSION['SESSION_PAGE_HITS'][WT_SCRIPT_NAME.$page_parameter])) { $_SESSION['SESSION_PAGE_HITS'][WT_SCRIPT_NAME.$page_parameter]=true; diff --git a/includes/session.php b/includes/session.php index a71ea07447..ed73db72e6 100644 --- a/includes/session.php +++ b/includes/session.php @@ -345,7 +345,7 @@ if ($MULTI_MEDIA) { require WT_ROOT.'includes/functions/functions_date.php'; // Use the server date to calculate privacy, etc. -// Use the client date to show ages, etc. +// Use the client date to show ages, etc. define('WT_SERVER_JD', timestamp_to_jd(time())); define('WT_CLIENT_JD', timestamp_to_jd(client_time())); |
