Default to OpenStreetMap site name
authorRichard Fairhurst <richard@systemeD.net>
Tue, 20 Aug 2013 12:07:42 +0000 (13:07 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Tue, 20 Aug 2013 12:07:42 +0000 (13:07 +0100)
net/systemeD/potlatch2/help/HelpDialog.mxml

index d774414..ad32742 100644 (file)
     }
 
     private function getIntroText():String {
-        var site_name:String = loaderInfo.parameters["site_name"];
+        var site_name:String = loaderInfo.parameters["site_name"] || "OpenStreetMap";
                var browser:String = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase();
 
                var intro:String = '';
                if (site_name=='OpenStreetMap' && browser.indexOf('msie')==-1) {
                        intro+="<p><font size='+4' color='#FF0000'><b>New user?</b> There's now an easier first-time editor you can try instead of this. Click the triangle by the Edit menu and select 'iD'.</font></p>";
                }
-               intro+="<p><b>Potlatch 2</b> is an intermediate-level OpenStreetMap (OSM) editor that allows you to make edits directly through ";
-        if (site_name) { intro+="the " + site_name + " website.</p>"; }
-               else { intro+="this website.</p>"; }
+               intro+="<p><b>Potlatch 2</b> is an intermediate-level OpenStreetMap (OSM) editor that allows you to make edits directly through the " + site_name + " website.</p>";
                return intro;
     }