From 3fe6c08a49535ee33f2ca388c9add31f8bb7898c Mon Sep 17 00:00:00 2001 From: John Mertic Date: Mon, 18 Apr 2011 14:36:36 -0400 Subject: [PATCH] Release 6.1.4 --- ModuleInstall/ModuleInstaller.php | 37 +- .../PackageManager/PackageManager.php | 32 +- .../PackageManager/PackageManagerDisplay.php | 4 +- .../tpls/PackageManagerScripts.tpl | 2 +- README | 1 + Zend/Crypt.php | 167 - Zend/Crypt/DiffieHellman.php | 380 - Zend/Crypt/DiffieHellman/Exception.php | 36 - Zend/Crypt/Exception.php | 35 - Zend/Crypt/Hmac.php | 181 - Zend/Crypt/Hmac/Exception.php | 36 - Zend/Crypt/Math.php | 102 - Zend/Crypt/Math/BigInteger.php | 117 - Zend/Crypt/Math/BigInteger/Bcmath.php | 203 - Zend/Crypt/Math/BigInteger/Exception.php | 36 - Zend/Crypt/Math/BigInteger/Gmp.php | 196 - Zend/Crypt/Math/BigInteger/Interface.php | 51 - Zend/Crypt/Math/Exception.php | 36 - Zend/Crypt/Rsa.php | 309 - Zend/Crypt/Rsa/Key.php | 95 - Zend/Crypt/Rsa/Key/Private.php | 75 - Zend/Crypt/Rsa/Key/Public.php | 74 - Zend/Exception.php | 95 - Zend/Gdata.php | 241 - Zend/Gdata/App.php | 1234 - Zend/Gdata/App/AuthException.php | 41 - Zend/Gdata/App/BadMethodCallException.php | 42 - Zend/Gdata/App/Base.php | 572 - Zend/Gdata/App/BaseMediaSource.php | 179 - Zend/Gdata/App/CaptchaRequiredException.php | 94 - Zend/Gdata/App/Entry.php | 389 - Zend/Gdata/App/Exception.php | 43 - Zend/Gdata/App/Extension.php | 40 - Zend/Gdata/App/Extension/Author.php | 43 - Zend/Gdata/App/Extension/Category.php | 140 - Zend/Gdata/App/Extension/Content.php | 88 - Zend/Gdata/App/Extension/Contributor.php | 43 - Zend/Gdata/App/Extension/Control.php | 98 - Zend/Gdata/App/Extension/Draft.php | 50 - Zend/Gdata/App/Extension/Edited.php | 49 - Zend/Gdata/App/Extension/Element.php | 58 - Zend/Gdata/App/Extension/Email.php | 49 - Zend/Gdata/App/Extension/Generator.php | 115 - Zend/Gdata/App/Extension/Icon.php | 49 - Zend/Gdata/App/Extension/Id.php | 49 - Zend/Gdata/App/Extension/Link.php | 219 - Zend/Gdata/App/Extension/Logo.php | 49 - Zend/Gdata/App/Extension/Name.php | 48 - Zend/Gdata/App/Extension/Person.php | 163 - Zend/Gdata/App/Extension/Published.php | 49 - Zend/Gdata/App/Extension/Rights.php | 49 - Zend/Gdata/App/Extension/Source.php | 46 - Zend/Gdata/App/Extension/Subtitle.php | 43 - Zend/Gdata/App/Extension/Summary.php | 43 - Zend/Gdata/App/Extension/Text.php | 90 - Zend/Gdata/App/Extension/Title.php | 43 - Zend/Gdata/App/Extension/Updated.php | 49 - Zend/Gdata/App/Extension/Uri.php | 49 - Zend/Gdata/App/Feed.php | 352 - Zend/Gdata/App/FeedEntryParent.php | 681 - Zend/Gdata/App/FeedSourceParent.php | 267 - Zend/Gdata/App/HttpException.php | 121 - Zend/Gdata/App/IOException.php | 43 - Zend/Gdata/App/InvalidArgumentException.php | 42 - .../App/LoggingHttpClientAdapterSocket.php | 119 - Zend/Gdata/App/MediaEntry.php | 119 - Zend/Gdata/App/MediaFileSource.php | 146 - Zend/Gdata/App/MediaSource.php | 73 - Zend/Gdata/App/Util.php | 112 - Zend/Gdata/App/VersionException.php | 42 - Zend/Gdata/AuthSub.php | 246 - Zend/Gdata/Books.php | 204 - Zend/Gdata/Books/CollectionEntry.php | 56 - Zend/Gdata/Books/CollectionFeed.php | 62 - Zend/Gdata/Books/Extension/AnnotationLink.php | 63 - Zend/Gdata/Books/Extension/BooksCategory.php | 59 - Zend/Gdata/Books/Extension/BooksLink.php | 61 - Zend/Gdata/Books/Extension/Embeddability.php | 122 - Zend/Gdata/Books/Extension/InfoLink.php | 59 - Zend/Gdata/Books/Extension/PreviewLink.php | 60 - Zend/Gdata/Books/Extension/Review.php | 152 - Zend/Gdata/Books/Extension/ThumbnailLink.php | 60 - Zend/Gdata/Books/Extension/Viewability.php | 123 - Zend/Gdata/Books/VolumeEntry.php | 687 - Zend/Gdata/Books/VolumeFeed.php | 62 - Zend/Gdata/Books/VolumeQuery.php | 112 - Zend/Gdata/Calendar.php | 169 - Zend/Gdata/Calendar/EventEntry.php | 164 - Zend/Gdata/Calendar/EventFeed.php | 106 - Zend/Gdata/Calendar/EventQuery.php | 491 - Zend/Gdata/Calendar/Extension/AccessLevel.php | 125 - Zend/Gdata/Calendar/Extension/Color.php | 125 - Zend/Gdata/Calendar/Extension/Hidden.php | 134 - Zend/Gdata/Calendar/Extension/Link.php | 125 - Zend/Gdata/Calendar/Extension/QuickAdd.php | 132 - Zend/Gdata/Calendar/Extension/Selected.php | 133 - .../Extension/SendEventNotifications.php | 132 - Zend/Gdata/Calendar/Extension/Timezone.php | 124 - Zend/Gdata/Calendar/Extension/WebContent.php | 177 - Zend/Gdata/Calendar/ListEntry.php | 246 - Zend/Gdata/Calendar/ListFeed.php | 106 - Zend/Gdata/ClientLogin.php | 182 - Zend/Gdata/Docs.php | 319 - Zend/Gdata/Docs/DocumentListEntry.php | 54 - Zend/Gdata/Docs/DocumentListFeed.php | 68 - Zend/Gdata/Docs/Query.php | 228 - Zend/Gdata/DublinCore.php | 65 - Zend/Gdata/DublinCore/Extension/Creator.php | 58 - Zend/Gdata/DublinCore/Extension/Date.php | 60 - .../DublinCore/Extension/Description.php | 58 - Zend/Gdata/DublinCore/Extension/Format.php | 58 - .../Gdata/DublinCore/Extension/Identifier.php | 58 - Zend/Gdata/DublinCore/Extension/Language.php | 58 - Zend/Gdata/DublinCore/Extension/Publisher.php | 58 - Zend/Gdata/DublinCore/Extension/Rights.php | 58 - Zend/Gdata/DublinCore/Extension/Subject.php | 58 - Zend/Gdata/DublinCore/Extension/Title.php | 58 - Zend/Gdata/Entry.php | 132 - Zend/Gdata/Exif.php | 65 - Zend/Gdata/Exif/Entry.php | 145 - Zend/Gdata/Exif/Extension/Distance.php | 61 - Zend/Gdata/Exif/Extension/Exposure.php | 61 - Zend/Gdata/Exif/Extension/FStop.php | 61 - Zend/Gdata/Exif/Extension/Flash.php | 61 - Zend/Gdata/Exif/Extension/FocalLength.php | 61 - Zend/Gdata/Exif/Extension/ImageUniqueId.php | 61 - Zend/Gdata/Exif/Extension/Iso.php | 61 - Zend/Gdata/Exif/Extension/Make.php | 61 - Zend/Gdata/Exif/Extension/Model.php | 61 - Zend/Gdata/Exif/Extension/Tags.php | 549 - Zend/Gdata/Exif/Extension/Time.php | 61 - Zend/Gdata/Exif/Feed.php | 70 - Zend/Gdata/Extension.php | 58 - Zend/Gdata/Extension/AttendeeStatus.php | 123 - Zend/Gdata/Extension/AttendeeType.php | 123 - Zend/Gdata/Extension/Comments.php | 117 - Zend/Gdata/Extension/EntryLink.php | 167 - Zend/Gdata/Extension/EventStatus.php | 101 - Zend/Gdata/Extension/ExtendedProperty.php | 106 - Zend/Gdata/Extension/FeedLink.php | 175 - .../Extension/OpenSearchItemsPerPage.php | 50 - Zend/Gdata/Extension/OpenSearchStartIndex.php | 50 - .../Extension/OpenSearchTotalResults.php | 50 - Zend/Gdata/Extension/OriginalEvent.php | 142 - Zend/Gdata/Extension/Rating.php | 240 - Zend/Gdata/Extension/Recurrence.php | 49 - Zend/Gdata/Extension/RecurrenceException.php | 215 - Zend/Gdata/Extension/Reminder.php | 171 - Zend/Gdata/Extension/Transparency.php | 123 - Zend/Gdata/Extension/Visibility.php | 123 - Zend/Gdata/Extension/When.php | 169 - Zend/Gdata/Extension/Where.php | 171 - Zend/Gdata/Extension/Who.php | 299 - Zend/Gdata/Feed.php | 251 - Zend/Gdata/Gapps.php | 1683 -- Zend/Gdata/Gapps/EmailListEntry.php | 214 - Zend/Gdata/Gapps/EmailListFeed.php | 53 - Zend/Gdata/Gapps/EmailListQuery.php | 187 - Zend/Gdata/Gapps/EmailListRecipientEntry.php | 146 - Zend/Gdata/Gapps/EmailListRecipientFeed.php | 53 - Zend/Gdata/Gapps/EmailListRecipientQuery.php | 153 - Zend/Gdata/Gapps/Error.php | 233 - Zend/Gdata/Gapps/Extension/EmailList.php | 144 - Zend/Gdata/Gapps/Extension/Login.php | 485 - Zend/Gdata/Gapps/Extension/Name.php | 181 - Zend/Gdata/Gapps/Extension/Nickname.php | 142 - Zend/Gdata/Gapps/Extension/Property.php | 180 - Zend/Gdata/Gapps/Extension/Quota.php | 142 - Zend/Gdata/Gapps/GroupEntry.php | 158 - Zend/Gdata/Gapps/GroupFeed.php | 53 - Zend/Gdata/Gapps/GroupQuery.php | 226 - Zend/Gdata/Gapps/MemberEntry.php | 159 - Zend/Gdata/Gapps/MemberFeed.php | 53 - Zend/Gdata/Gapps/MemberQuery.php | 194 - Zend/Gdata/Gapps/NicknameEntry.php | 189 - Zend/Gdata/Gapps/NicknameFeed.php | 53 - Zend/Gdata/Gapps/NicknameQuery.php | 186 - Zend/Gdata/Gapps/OwnerEntry.php | 158 - Zend/Gdata/Gapps/OwnerFeed.php | 53 - Zend/Gdata/Gapps/OwnerQuery.php | 147 - Zend/Gdata/Gapps/Query.php | 123 - Zend/Gdata/Gapps/ServiceException.php | 208 - Zend/Gdata/Gapps/UserEntry.php | 295 - Zend/Gdata/Gapps/UserFeed.php | 53 - Zend/Gdata/Gapps/UserQuery.php | 147 - Zend/Gdata/Gbase.php | 209 - Zend/Gdata/Gbase/Entry.php | 151 - Zend/Gdata/Gbase/Extension/BaseAttribute.php | 115 - Zend/Gdata/Gbase/Feed.php | 60 - Zend/Gdata/Gbase/ItemEntry.php | 161 - Zend/Gdata/Gbase/ItemFeed.php | 48 - Zend/Gdata/Gbase/ItemQuery.php | 101 - Zend/Gdata/Gbase/Query.php | 268 - Zend/Gdata/Gbase/SnippetEntry.php | 48 - Zend/Gdata/Gbase/SnippetFeed.php | 48 - Zend/Gdata/Gbase/SnippetQuery.php | 74 - Zend/Gdata/Geo.php | 70 - Zend/Gdata/Geo/Entry.php | 97 - Zend/Gdata/Geo/Extension/GeoRssWhere.php | 135 - Zend/Gdata/Geo/Extension/GmlPoint.php | 136 - Zend/Gdata/Geo/Extension/GmlPos.php | 61 - Zend/Gdata/Geo/Feed.php | 64 - Zend/Gdata/Health.php | 274 - Zend/Gdata/Health/Extension/Ccr.php | 124 - Zend/Gdata/Health/ProfileEntry.php | 135 - Zend/Gdata/Health/ProfileFeed.php | 67 - Zend/Gdata/Health/ProfileListEntry.php | 100 - Zend/Gdata/Health/ProfileListFeed.php | 53 - Zend/Gdata/Health/Query.php | 285 - Zend/Gdata/HttpAdapterStreamingProxy.php | 127 - Zend/Gdata/HttpAdapterStreamingSocket.php | 111 - Zend/Gdata/HttpClient.php | 352 - Zend/Gdata/Kind/EventEntry.php | 428 - Zend/Gdata/Media.php | 65 - Zend/Gdata/Media/Entry.php | 134 - Zend/Gdata/Media/Extension/MediaCategory.php | 148 - Zend/Gdata/Media/Extension/MediaContent.php | 522 - Zend/Gdata/Media/Extension/MediaCopyright.php | 116 - Zend/Gdata/Media/Extension/MediaCredit.php | 149 - .../Media/Extension/MediaDescription.php | 116 - Zend/Gdata/Media/Extension/MediaGroup.php | 566 - Zend/Gdata/Media/Extension/MediaHash.php | 115 - Zend/Gdata/Media/Extension/MediaKeywords.php | 52 - Zend/Gdata/Media/Extension/MediaPlayer.php | 178 - Zend/Gdata/Media/Extension/MediaRating.php | 118 - .../Media/Extension/MediaRestriction.php | 149 - Zend/Gdata/Media/Extension/MediaText.php | 211 - Zend/Gdata/Media/Extension/MediaThumbnail.php | 210 - Zend/Gdata/Media/Extension/MediaTitle.php | 118 - Zend/Gdata/Media/Feed.php | 70 - Zend/Gdata/MediaMimeStream.php | 190 - Zend/Gdata/MimeBodyString.php | 92 - Zend/Gdata/MimeFile.php | 66 - Zend/Gdata/Photos.php | 576 - Zend/Gdata/Photos/AlbumEntry.php | 610 - Zend/Gdata/Photos/AlbumFeed.php | 509 - Zend/Gdata/Photos/AlbumQuery.php | 149 - Zend/Gdata/Photos/CommentEntry.php | 195 - Zend/Gdata/Photos/Extension/Access.php | 63 - Zend/Gdata/Photos/Extension/AlbumId.php | 63 - Zend/Gdata/Photos/Extension/BytesUsed.php | 62 - Zend/Gdata/Photos/Extension/Checksum.php | 63 - Zend/Gdata/Photos/Extension/Client.php | 63 - Zend/Gdata/Photos/Extension/CommentCount.php | 63 - .../Photos/Extension/CommentingEnabled.php | 64 - Zend/Gdata/Photos/Extension/Height.php | 62 - Zend/Gdata/Photos/Extension/Id.php | 62 - Zend/Gdata/Photos/Extension/Location.php | 62 - .../Photos/Extension/MaxPhotosPerAlbum.php | 63 - Zend/Gdata/Photos/Extension/Name.php | 62 - Zend/Gdata/Photos/Extension/Nickname.php | 62 - Zend/Gdata/Photos/Extension/NumPhotos.php | 62 - .../Photos/Extension/NumPhotosRemaining.php | 62 - Zend/Gdata/Photos/Extension/PhotoId.php | 61 - Zend/Gdata/Photos/Extension/Position.php | 62 - Zend/Gdata/Photos/Extension/QuotaCurrent.php | 62 - Zend/Gdata/Photos/Extension/QuotaLimit.php | 63 - Zend/Gdata/Photos/Extension/Rotation.php | 63 - Zend/Gdata/Photos/Extension/Size.php | 62 - Zend/Gdata/Photos/Extension/Thumbnail.php | 62 - Zend/Gdata/Photos/Extension/Timestamp.php | 63 - Zend/Gdata/Photos/Extension/User.php | 62 - Zend/Gdata/Photos/Extension/Version.php | 63 - Zend/Gdata/Photos/Extension/Weight.php | 63 - Zend/Gdata/Photos/Extension/Width.php | 62 - Zend/Gdata/Photos/PhotoEntry.php | 691 - Zend/Gdata/Photos/PhotoFeed.php | 559 - Zend/Gdata/Photos/PhotoQuery.php | 98 - Zend/Gdata/Photos/TagEntry.php | 140 - Zend/Gdata/Photos/UserEntry.php | 366 - Zend/Gdata/Photos/UserFeed.php | 247 - Zend/Gdata/Photos/UserQuery.php | 355 - Zend/Gdata/Query.php | 418 - Zend/Gdata/Spreadsheets.php | 445 - Zend/Gdata/Spreadsheets/CellEntry.php | 103 - Zend/Gdata/Spreadsheets/CellFeed.php | 158 - Zend/Gdata/Spreadsheets/CellQuery.php | 417 - Zend/Gdata/Spreadsheets/DocumentQuery.php | 288 - Zend/Gdata/Spreadsheets/Extension/Cell.php | 201 - .../Gdata/Spreadsheets/Extension/ColCount.php | 59 - Zend/Gdata/Spreadsheets/Extension/Custom.php | 100 - .../Gdata/Spreadsheets/Extension/RowCount.php | 60 - Zend/Gdata/Spreadsheets/ListEntry.php | 208 - Zend/Gdata/Spreadsheets/ListFeed.php | 64 - Zend/Gdata/Spreadsheets/ListQuery.php | 305 - Zend/Gdata/Spreadsheets/SpreadsheetEntry.php | 64 - Zend/Gdata/Spreadsheets/SpreadsheetFeed.php | 64 - Zend/Gdata/Spreadsheets/WorksheetEntry.php | 187 - Zend/Gdata/Spreadsheets/WorksheetFeed.php | 64 - Zend/Gdata/YouTube.php | 874 - Zend/Gdata/YouTube/ActivityEntry.php | 232 - Zend/Gdata/YouTube/ActivityFeed.php | 66 - Zend/Gdata/YouTube/CommentEntry.php | 59 - Zend/Gdata/YouTube/CommentFeed.php | 66 - Zend/Gdata/YouTube/ContactEntry.php | 136 - Zend/Gdata/YouTube/ContactFeed.php | 68 - Zend/Gdata/YouTube/Extension/AboutMe.php | 51 - Zend/Gdata/YouTube/Extension/Age.php | 51 - Zend/Gdata/YouTube/Extension/Books.php | 51 - Zend/Gdata/YouTube/Extension/Company.php | 51 - Zend/Gdata/YouTube/Extension/Control.php | 133 - Zend/Gdata/YouTube/Extension/CountHint.php | 51 - Zend/Gdata/YouTube/Extension/Description.php | 51 - Zend/Gdata/YouTube/Extension/Duration.php | 126 - Zend/Gdata/YouTube/Extension/FirstName.php | 51 - Zend/Gdata/YouTube/Extension/Gender.php | 51 - Zend/Gdata/YouTube/Extension/Hobbies.php | 51 - Zend/Gdata/YouTube/Extension/Hometown.php | 51 - Zend/Gdata/YouTube/Extension/LastName.php | 51 - Zend/Gdata/YouTube/Extension/Link.php | 133 - Zend/Gdata/YouTube/Extension/Location.php | 51 - Zend/Gdata/YouTube/Extension/MediaContent.php | 120 - Zend/Gdata/YouTube/Extension/MediaCredit.php | 189 - Zend/Gdata/YouTube/Extension/MediaGroup.php | 336 - Zend/Gdata/YouTube/Extension/MediaRating.php | 150 - Zend/Gdata/YouTube/Extension/Movies.php | 51 - Zend/Gdata/YouTube/Extension/Music.php | 51 - Zend/Gdata/YouTube/Extension/NoEmbed.php | 54 - Zend/Gdata/YouTube/Extension/Occupation.php | 51 - Zend/Gdata/YouTube/Extension/PlaylistId.php | 51 - .../Gdata/YouTube/Extension/PlaylistTitle.php | 51 - Zend/Gdata/YouTube/Extension/Position.php | 90 - Zend/Gdata/YouTube/Extension/Private.php | 81 - Zend/Gdata/YouTube/Extension/QueryString.php | 51 - Zend/Gdata/YouTube/Extension/Racy.php | 124 - Zend/Gdata/YouTube/Extension/Recorded.php | 51 - Zend/Gdata/YouTube/Extension/Relationship.php | 51 - Zend/Gdata/YouTube/Extension/ReleaseDate.php | 51 - Zend/Gdata/YouTube/Extension/School.php | 51 - Zend/Gdata/YouTube/Extension/State.php | 193 - Zend/Gdata/YouTube/Extension/Statistics.php | 309 - Zend/Gdata/YouTube/Extension/Status.php | 51 - Zend/Gdata/YouTube/Extension/Token.php | 70 - Zend/Gdata/YouTube/Extension/Uploaded.php | 51 - Zend/Gdata/YouTube/Extension/Username.php | 51 - Zend/Gdata/YouTube/Extension/VideoId.php | 51 - Zend/Gdata/YouTube/InboxEntry.php | 281 - Zend/Gdata/YouTube/InboxFeed.php | 68 - Zend/Gdata/YouTube/MediaEntry.php | 81 - Zend/Gdata/YouTube/PlaylistListEntry.php | 300 - Zend/Gdata/YouTube/PlaylistListFeed.php | 68 - Zend/Gdata/YouTube/PlaylistVideoEntry.php | 132 - Zend/Gdata/YouTube/PlaylistVideoFeed.php | 68 - Zend/Gdata/YouTube/SubscriptionEntry.php | 446 - Zend/Gdata/YouTube/SubscriptionFeed.php | 68 - Zend/Gdata/YouTube/UserProfileEntry.php | 1041 - Zend/Gdata/YouTube/VideoEntry.php | 1095 - Zend/Gdata/YouTube/VideoFeed.php | 65 - Zend/Gdata/YouTube/VideoQuery.php | 540 - Zend/Http/Client.php | 1453 -- Zend/Http/Client/Adapter/Curl.php | 507 - Zend/Http/Client/Adapter/Exception.php | 38 - Zend/Http/Client/Adapter/Interface.php | 78 - Zend/Http/Client/Adapter/Proxy.php | 284 - Zend/Http/Client/Adapter/Socket.php | 544 - Zend/Http/Client/Adapter/Stream.php | 46 - Zend/Http/Client/Adapter/Test.php | 238 - Zend/Http/Client/Exception.php | 36 - Zend/Http/Exception.php | 36 - Zend/Http/Response.php | 667 - Zend/Http/Response/Stream.php | 235 - Zend/Loader.php | 329 - Zend/Oauth.php | 89 - Zend/Oauth/Client.php | 336 - Zend/Oauth/Config.php | 658 - Zend/Oauth/Config/ConfigInterface.php | 75 - Zend/Oauth/Consumer.php | 273 - Zend/Oauth/Exception.php | 33 - Zend/Oauth/Http.php | 266 - Zend/Oauth/Http/AccessToken.php | 189 - Zend/Oauth/Http/RequestToken.php | 162 - Zend/Oauth/Http/UserAuthorization.php | 78 - Zend/Oauth/Http/Utility.php | 217 - Zend/Oauth/Signature/Hmac.php | 54 - Zend/Oauth/Signature/Plaintext.php | 49 - Zend/Oauth/Signature/Rsa.php | 65 - Zend/Oauth/Signature/SignatureAbstract.php | 183 - Zend/Oauth/Token.php | 285 - Zend/Oauth/Token/Access.php | 99 - Zend/Oauth/Token/AuthorizedRequest.php | 102 - Zend/Oauth/Token/Request.php | 50 - Zend/Registry.php | 209 - Zend/Uri.php | 202 - Zend/Uri/Exception.php | 37 - Zend/Uri/Http.php | 769 - Zend/Validate/Abstract.php | 456 - Zend/Validate/Hostname.php | 740 - Zend/Validate/Hostname/Biz.php | 2917 --- Zend/Validate/Hostname/Cn.php | 2199 -- Zend/Validate/Hostname/Com.php | 198 - Zend/Validate/Hostname/Jp.php | 739 - Zend/Validate/Interface.php | 54 - Zend/Validate/Ip.php | 191 - Zend/Version.php | 53 - data/Link.php | 140 +- data/SugarBean.php | 6863 +++-- demoData.en_us.php | 21668 ++++++++++++++++ demoData.ja_jp.php | 555 + demoData.zh_cn.php | 880 + download.php | 44 +- examples/SoapTest.php | 4 +- examples/SoapTestPortal2.php | 4 +- export.php | 8 +- files.md5 | 2342 +- include/Dashlets/Dashlet.php | 215 +- include/Dashlets/DashletGeneric.php | 38 +- .../Dashlets/DashletGenericAutoRefresh.tpl | 58 - .../DashletGenericAutoRefreshDynamic.tpl | 64 - include/Dashlets/DashletGenericChart.php | 91 +- .../Dashlets/DashletGenericChartConfigure.tpl | 12 - .../DashletGenericChartScript.tpl | 18 +- include/Dashlets/DashletGenericConfigure.tpl | 12 +- include/Dashlets/DashletGenericDisplay.tpl | 4 +- include/DetailView/DetailView.tpl | 70 +- include/DetailView/header.tpl | 8 +- include/EditView/EditView.tpl | 53 +- include/EditView/EditView2.php | 78 +- include/EditView/footer.tpl | 6 +- include/EditView/header.tpl | 4 +- include/HTTP_WebDAV_Server/Server.php | 6 +- include/JSON.js | 2 +- include/JSON.php | 909 +- include/ListView/ListView.php | 2545 +- include/ListView/ListViewDCMenu.tpl | 189 - include/ListView/ListViewData.php | 40 +- include/ListView/ListViewDisplay.php | 220 +- include/ListView/ListViewGeneric.tpl | 9 +- include/ListView/ListViewSmarty.php | 17 +- include/Localization/Localization.php | 40 +- include/MVC/Controller/SugarController.php | 9 +- .../MVC/Controller/entry_point_registry.php | 13 +- include/MVC/SugarApplication.php | 239 +- include/MVC/SugarModule.php | 28 +- include/MVC/View/SugarView.php | 710 +- include/MVC/View/tpls/Importvcard.tpl | 2 +- include/MVC/View/tpls/modulelistmenu.tpl | 2 +- include/MVC/View/tpls/xsrf.tpl | 61 - include/MVC/View/views/view.ajax.php | 18 +- include/MVC/View/views/view.classic.php | 22 +- include/MVC/View/views/view.edit.php | 5 +- include/MVC/View/views/view.importvcard.php | 13 +- include/MVC/View/views/view.list.php | 184 +- include/MVC/View/views/view.noaccess.php | 18 +- include/MVC/View/views/view.quickcreate.php | 49 +- include/MVC/View/views/view.vcard.php | 7 +- include/MassUpdate.php | 37 +- .../MySugar/DashletsDialog/DashletsDialog.php | 4 +- include/MySugar/MySugar.php | 217 +- include/MySugar/javascript/MySugar.js | 10 +- include/MySugar/tpls/MySugar.tpl | 15 +- .../tpls/chartDashletsSearchResults.tpl | 2 +- .../MySugar/tpls/dashletsSearchResults.tpl | 2 +- include/MySugar/tpls/retrieveReportCharts.tpl | 2 +- include/OutboundEmail/OutboundEmail.php | 145 +- include/Popups/PopupSmarty.php | 5 +- include/Popups/tpls/PopupGeneric.tpl | 2 +- include/SearchForm/SearchForm2.php | 343 +- include/SearchForm/SugarSpot.php | 355 +- include/SearchForm/tpls/SearchFormGeneric.tpl | 6 +- .../tpls/SearchFormGenericAdvanced.tpl | 2 +- include/Smarty/Config_File.class.php | 9 +- .../plugins/function.html_select_date.php | 6 +- .../Smarty/plugins/function.sugar_button.php | 14 +- include/Smarty/plugins/function.sugarvar.php | 22 +- .../plugins/modifier.default_date_value.php | 3 +- include/SubPanel/SubPanel.php | 1 - include/SubPanel/SubPanelTiles.js | 3 +- include/SubPanel/SugarTab.php | 40 +- include/SugarCache/SugarCache.php | 181 - include/SugarCache/SugarCacheAbstract.php | 315 - include/SugarCache/SugarCacheFile.php | 149 - include/SugarCache/SugarCacheMemcache.php | 143 - include/SugarCache/SugarCacheMemcached.php | 143 - include/SugarCache/SugarCacheMemory.php | 98 - include/SugarCache/SugarCacheRedis.php | 175 - include/SugarCache/SugarCachesMash.php | 100 - .../SugarCharts/Jit/FlashCanvas/canvas2png.js | 9 - .../Jit/FlashCanvas/flashcanvas.js | 8 - .../Jit/FlashCanvas/flashcanvas.swf | Bin 21235 -> 0 bytes include/SugarCharts/Jit/FlashCanvas/proxy.php | 73 - include/SugarCharts/Jit/FlashCanvas/save.php | 49 - include/SugarCharts/Jit/Jit.php | 88 - include/SugarCharts/Jit/JitReports.php | 215 - include/SugarCharts/Jit/js/Jit/jit.js | 496 - include/SugarCharts/Jit/js/mySugarCharts.js | 39 - include/SugarCharts/Jit/js/sugarCharts.js | 76 - include/SugarCharts/JsChart.php | 675 - include/SugarCharts/SugarChart.php | 77 +- include/SugarCharts/{Jit => }/tpls/chart.tpl | 56 +- include/SugarDateTime.php | 584 - .../SugarEmailAddress/SugarEmailAddress.php | 150 +- .../templates/forDetailView.tpl | 12 +- .../SugarFields/Fields/Address/DetailView.tpl | 10 +- .../Fields/Address/SugarFieldAddress.php | 15 +- .../Fields/Address/en_us.DetailView.tpl | 12 +- .../SugarFieldAssigned_user_name.php | 4 +- .../SugarFields/Fields/Base/DetailView.tpl | 11 +- .../Fields/Base/SugarFieldBase.php | 133 +- .../SugarFields/Fields/Bool/DetailView.tpl | 2 +- include/SugarFields/Fields/Bool/ListView.tpl | 3 +- .../Fields/Bool/SugarFieldBool.php | 47 +- .../Collection/SugarFieldCollection.php | 4 +- .../Collection/ViewSugarFieldCollection.php | 49 +- .../Fields/Currency/DetailView.tpl | 2 +- .../Fields/Currency/SugarFieldCurrency.php | 18 +- .../SugarFields/Fields/Datetime/EditView.tpl | 6 +- .../Fields/Datetime/SugarFieldDatetime.php | 139 +- .../Fields/Datetimecombo/Datetimecombo.js | 11 +- .../Fields/Datetimecombo/EditView.tpl | 24 +- .../Fields/Datetimecombo/RangeSearchForm.tpl | 167 - .../Datetimecombo/SugarFieldDatetimecombo.php | 86 +- .../Fields/Download/DetailView.tpl | 6 +- .../Fields/Download/SugarFieldDownload.php | 2 +- .../SugarFields/Fields/Enum/DetailView.tpl | 6 +- .../Fields/Enum/DetailViewFunction.tpl | 2 +- include/SugarFields/Fields/Enum/EditView.tpl | 6 +- .../Fields/Enum/EditViewFunction.tpl | 4 +- .../Fields/Enum/SugarFieldEnum.php | 53 +- .../SugarFields/Fields/File/DetailView.tpl | 14 +- include/SugarFields/Fields/File/EditView.tpl | 181 +- .../SugarFields/Fields/File/SearchView.tpl | 39 - .../SugarFields/Fields/File/SugarFieldFile.js | 45 - .../Fields/File/SugarFieldFile.php | 129 +- .../SugarFields/Fields/Float/DetailView.tpl | 2 +- .../Fields/Float/SugarFieldFloat.php | 24 +- .../Fields/Fullname/DetailView.tpl | 9 +- .../Fields/Fullname/SugarFieldFullname.php | 42 +- .../SugarFields/Fields/Html/DetailView.tpl | 4 +- .../Fields/Html/SugarFieldHtml.php | 6 +- .../SugarFields/Fields/Id/SugarFieldId.php | 58 - .../SugarFields/Fields/Iframe/DetailView.tpl | 1 - include/SugarFields/Fields/Int/DetailView.tpl | 2 +- .../Fields/Int/RangeSearchForm.tpl | 107 - .../SugarFields/Fields/Int/SugarFieldInt.php | 39 +- .../SugarFields/Fields/Link/DetailView.tpl | 8 +- .../Fields/Multienum/DetailView.tpl | 6 +- .../SugarFields/Fields/Multienum/EditView.tpl | 2 +- .../Fields/Multienum/SugarFieldMultienum.php | 48 +- .../SugarFields/Fields/Parent/DetailView.tpl | 10 +- .../Fields/Parent/SugarFieldParent.php | 36 +- .../Fields/Password/SugarFieldPassword.php | 56 - .../DetailView.tpl} | 8 +- include/SugarFields/Fields/Phone/EditView.tpl | 50 - .../Fields/{File => Phone}/ListView.tpl | 10 +- .../Fields/Phone/SugarFieldPhone.php | 56 - .../Fields/Radioenum/DetailView.tpl | 6 +- .../SugarFields/Fields/Relate/DetailView.tpl | 2 +- .../Fields/Relate/SugarFieldRelate.php | 123 +- .../SugarFields/Fields/Text/DetailView.tpl | 9 +- .../Fields/Text/SugarFieldText.php | 16 +- include/SugarFields/Fields/URL/DetailView.tpl | 10 +- .../Fields/Username/DetailView.tpl | 4 +- .../Fields/Username/SugarFieldUsername.php | 7 +- include/SugarFields/Parsers/MetaParser.php | 3 + include/SugarFolders/SugarFolders.php | 54 +- include/SugarOauth.php | 153 - include/SugarObjects/VardefManager.php | 64 +- .../implements/team_security/vardefs.php | 2 +- .../SugarObjects/templates/basic/Basic.php | 20 +- .../templates/basic/metadata/SearchFields.php | 9 - .../SugarObjects/templates/basic/vardefs.php | 4 - .../templates/company/language/en_us.lang.php | 12 +- .../company/metadata/SearchFields.php | 19 +- include/SugarObjects/templates/file/File.php | 73 +- .../templates/file/language/en_us.lang.php | 5 +- .../templates/file/metadata/SearchFields.php | 13 +- .../templates/file/metadata/editviewdefs.php | 13 +- .../file/metadata/quickcreatedefs.php | 6 +- .../SugarObjects/templates/file/vardefs.php | 7 +- .../templates/file/views/view.edit.php | 2 +- .../issue/language/application/en_us.lang.php | 5 +- .../templates/issue/metadata/SearchFields.php | 15 - .../issue/metadata/detailviewdefs.php | 9 +- .../templates/issue/metadata/searchdefs.php | 1 - .../templates/person/language/en_us.lang.php | 1 - .../person/metadata/SearchFields.php | 18 - .../templates/sale/metadata/SearchFields.php | 18 - .../sale/metadata/detailviewdefs.php | 9 +- .../templates/sale/metadata/searchdefs.php | 1 - .../SugarObjects/templates/sale/vardefs.php | 5 +- .../DynamicAction.php => include/SugarPDF.php | 57 +- include/SugarTabs/SugarTab.php | 101 + include/SugarTabs/tpls/singletabmenu.tpl | 220 + include/SugarTheme/SugarTheme.php | 98 +- include/SugarTheme/getImage.php | 24 +- include/SugarTinyMCE.php | 1 - include/TemplateHandler/TemplateHandler.php | 15 +- include/TimeDate.php | 2656 +- include/VarDefHandler/SugarTabs/SugarTab.php | 101 + .../SugarTabs/tpls/singletabmenu.tpl | 220 + include/VarDefHandler/vardef_meta_arrays.php | 2 +- include/charts/Charts.php | 127 + include/charts/hBarF.swf | Bin 0 -> 6517 bytes include/charts/hBarS.swf | Bin 0 -> 5844 bytes include/charts/lineF.swf | Bin 0 -> 8187 bytes include/charts/pieF.swf | Bin 0 -> 5805 bytes include/charts/vBarF.swf | Bin 0 -> 6814 bytes include/connectors/component.php | 94 +- include/connectors/sources/default/source.php | 4 +- include/connectors/utils/ConnectorUtils.php | 466 +- include/database/DBHelper.php | 7 +- include/database/DBManager.php | 12 +- include/database/DBManagerFactory.php | 4 +- include/database/MssqlHelper.php | 30 +- include/database/MssqlManager.php | 43 +- include/database/MysqlHelper.php | 123 +- include/database/MysqlManager.php | 141 +- include/database/MysqliManager.php | 12 - include/database/SqlsrvHelper.php | 76 +- include/database/SqlsrvManager.php | 122 +- include/dir_inc.php | 26 +- include/entryPoint.php | 12 +- include/externalAPI/Base/ExternalAPIBase.php | 233 - .../externalAPI/Base/ExternalAPIPlugin.php | 61 - .../Base/ExternalOAuthAPIPlugin.php | 59 - include/externalAPI/Base/OAuthPluginBase.php | 199 - include/externalAPI/Base/WebDocument.php | 44 - include/externalAPI/Base/WebFeed.php | 40 - include/externalAPI/Base/WebMeeting.php | 45 - include/externalAPI/ExternalAPIFactory.php | 291 - include/generic/DeleteRelationship.php | 18 +- include/generic/LayoutManager.php | 9 +- .../generic/SugarWidgets/SugarWidgetField.php | 13 +- .../SugarWidgets/SugarWidgetFieldbool.php | 26 - .../SugarWidgets/SugarWidgetFieldcurrency.php | 33 +- .../SugarWidgets/SugarWidgetFielddatetime.php | 118 +- .../SugarWidgetFielddatetimecombo.php | 2 + .../SugarWidgets/SugarWidgetFieldenum.php | 6 +- .../SugarWidgets/SugarWidgetSubPanelIcon.php | 64 +- .../SugarWidgetSubPanelRemoveButton.php | 9 +- .../SugarWidgetSubPanelTopButton.php | 90 +- ...SugarWidgetSubPanelTopCreateNoteButton.php | 10 - ...SugarWidgetSubPanelTopCreateTaskButton.php | 10 - ...garWidgetSubPanelTopScheduleCallButton.php | 9 - ...WidgetSubPanelTopScheduleMeetingButton.php | 10 - ...ugarWidgetSubPanelTopSelectUsersButton.php | 5 - include/globalControlLinks.php | 12 +- include/images/1.gif | Bin 2603 -> 0 bytes include/images/default_user_feed_picture.png | Bin 3821 -> 0 bytes include/images/seed_chris_id.gif | Bin 3037 -> 0 bytes include/images/seed_jim_id.gif | Bin 2885 -> 0 bytes include/images/seed_max_id.gif | Bin 3090 -> 0 bytes include/images/seed_sally_id.gif | Bin 3315 -> 0 bytes include/images/seed_sarah_id.gif | Bin 3015 -> 0 bytes include/images/seed_will_id.gif | Bin 3210 -> 0 bytes include/javascript/calendar.js | 58 - include/javascript/dashlets.js | 3 +- include/javascript/getYUIComboFile.php | 14 +- include/javascript/iscroll.js | 66 - include/javascript/javascript.php | 49 +- include/javascript/jsAlerts.php | 137 +- include/javascript/jsclass_base.js | 6 +- include/javascript/popup_parent_helper.js | 2 +- include/javascript/quicksearch.js | 15 +- include/javascript/sugar_3.js | 52 +- include/javascript/sugar_grp1.js | 515 +- include/javascript/sugar_grp1_yui.js | 7311 +----- include/javascript/sugar_grp_emails.js | 795 +- include/javascript/sugar_grp_quickcomp.js | 187 +- include/javascript/sugar_grp_yui_widgets.css | 10 - include/javascript/sugar_grp_yui_widgets.js | 19 - include/javascript/swfobject.js | 4 +- .../yui/build/calendar/assets/calendar.css | 5 +- .../assets/skins/sam/calendar-skin.css | 1 - include/json_config.php | 70 +- include/language/en_us.lang.php | 165 +- include/language/en_us.notify_template.html | 3 - include/modules.php | 29 +- include/nusoap/class.wsdl.php | 297 +- include/nusoap/nusoap.php | 589 +- include/nusoap/nusoapmime.php | 54 +- include/pdf/LICENSE | 21 + include/pdf/class.ezpdf.php | 1666 ++ include/pdf/class.pdf.php | 3082 +++ include/tabConfig.php | 10 +- include/tcpdf/fonts/utils/makefont.php | 12 +- include/templates/TemplateDragDropChooser.php | 2 +- include/upload_file.php | 45 - include/utils.php | 211 +- include/utils/LogicHook.php | 37 +- include/utils/array_utils.php | 10 +- include/utils/db_utils.php | 49 +- include/utils/external_cache.php | 221 +- include/utils/external_cache/SugarCache.php | 229 + .../utils/external_cache/SugarCache_APC.php | 77 +- .../utils/external_cache/SugarCache_Base.php | 151 + .../SugarCache_ExternalAbstract.php | 146 + .../external_cache/SugarCache_Memcache.php | 118 + .../external_cache/SugarCache_Wincache.php} | 103 +- .../utils/external_cache/SugarCache_Zend.php | 88 +- .../external_cache/SugarCache_ZendServer.php} | 97 +- .../external_cache/SugarCache_sMash.php} | 106 +- include/utils/file_utils.php | 107 - include/utils/layout_utils.php | 112 +- include/utils/mvc_utils.php | 2 +- include/utils/php_zip_utils.php | 121 - include/utils/sugar_file_utils.php | 59 +- include/utils/zip_utils.php | 65 +- include/vCard.php | 171 +- install.php | 18 +- install/UploadLangFileCheck.php | 4 + install/UserDemoData.php | 16 - install/confirmSettings.php | 152 +- install/dbConfig_a.php | 2 +- install/demoData.en_us.php | 46 +- install/installSystemCheck.php | 14 +- install/install_utils.php | 151 +- install/language/en_us.lang.php | 35 +- install/performSetup.php | 8 +- install/populateSeedData.php | 66 +- .../seed_data/Advanced_Password_SeedData.php | 74 +- .../seed_data/basicSeedData.php | 94 +- .../seed_data/index.html | 10 +- jscalendar/calendar-setup_3.js | 51 + jscalendar/calendar-win2k-cold-1.css | 291 + jscalendar/calendar.js | 202 + jscalendar/img.gif | Bin 0 -> 223 bytes jscalendar/lang/calendar-af.js | 65 + jscalendar/lang/calendar-bg.js | 134 + jscalendar/lang/calendar-br.js | 73 + jscalendar/lang/calendar-ca.js | 73 + jscalendar/lang/calendar-cs-win.js | 62 + jscalendar/lang/calendar-da.js | 91 + jscalendar/lang/calendar-de.js | 131 + jscalendar/lang/calendar-du.js | 71 + jscalendar/lang/calendar-el.js | 117 + jscalendar/lang/calendar-en.js | 149 + jscalendar/lang/calendar-es.js | 160 + jscalendar/lang/calendar-fi.js | 126 + jscalendar/lang/calendar-fr.js | 152 + jscalendar/lang/calendar-hr-utf8.js | 75 + jscalendar/lang/calendar-hr.js | 77 + jscalendar/lang/calendar-hu.js | 73 + jscalendar/lang/calendar-it.js | 110 + jscalendar/lang/calendar-ja.js | 114 + jscalendar/lang/calendar-jp.js | 134 + jscalendar/lang/calendar-ko-utf8.js | 146 + jscalendar/lang/calendar-ko.js | 148 + jscalendar/lang/calendar-lt-utf8.js | 140 + jscalendar/lang/calendar-lt.js | 142 + jscalendar/lang/calendar-nl.js | 71 + jscalendar/lang/calendar-no.js | 73 + jscalendar/lang/calendar-pl-utf8.js | 119 + jscalendar/lang/calendar-pl.js | 82 + jscalendar/lang/calendar-pt.js | 76 + jscalendar/lang/calendar-ro.js | 92 + jscalendar/lang/calendar-ru.js | 101 + jscalendar/lang/calendar-si.js | 120 + jscalendar/lang/calendar-sk.js | 125 + jscalendar/lang/calendar-sp.js | 91 + jscalendar/lang/calendar-sv.js | 121 + jscalendar/lang/calendar-tr.js | 86 + jscalendar/lang/calendar-zh.js | 152 + jscalendar/license.txt | 461 + jscalendar/menuarrow.gif | Bin 0 -> 68 bytes jscalendar/menuarrow2.gif | Bin 0 -> 49 bytes json_server.php | 138 +- jssource/JSGroupings.php | 9 +- jssource/minify_utils.php | 1 + jssource/src_files/include/JSON.js | 2 +- .../include/MySugar/javascript/MySugar.js | 58 +- .../include/SubPanel/SubPanelTiles.js | 3 +- .../SugarCharts/Jit/FlashCanvas/canvas2png.js | 42 - .../Jit/FlashCanvas/flashcanvas.js | 28 - .../include/SugarCharts/Jit/js/Jit/jit.js | 20674 --------------- .../SugarCharts/Jit/js/mySugarCharts.js | 117 - .../include/SugarCharts/Jit/js/sugarCharts.js | 784 - .../Fields/Datetimecombo/Datetimecombo.js | 19 +- .../SugarFields/Fields/File/SugarFieldFile.js | 212 - .../src_files/include/javascript/calendar.js | 236 - .../src_files/include/javascript/dashlets.js | 13 +- .../src_files/include/javascript/iscroll.js | 725 - .../include/javascript/jsclass_base.js | 22 +- .../include/javascript/popup_parent_helper.js | 5 +- .../include/javascript/quicksearch.js | 98 +- .../src_files/include/javascript/sugar_3.js | 156 +- .../src_files/include/javascript/swfobject.js | 4 +- .../src_files/jscalendar/calendar-setup_3.js | 239 + jssource/src_files/jscalendar/calendar.js | 1778 ++ .../src_files/modules/Documents/documents.js | 8 +- jssource/src_files/modules/EAPM/EAPMEdit.js | 110 - .../modules/EmailTemplates/EmailTemplate.js | 28 +- .../modules/InboundEmail/InboundEmail.js | 11 +- jssource/src_files/themes/Sugar5/js/style.js | 150 - metadata/documents_accountsMetaData.php | 124 - metadata/documents_bugsMetaData.php | 124 - metadata/documents_casesMetaData.php | 124 - metadata/documents_contactsMetaData.php | 124 - metadata/documents_opportunitiesMetaData.php | 124 - metadata/email_addressesMetaData.php | 2 +- metadata/emails_beansMetaData.php | 2 +- modules/ACL/ACLController.php | 64 +- modules/ACL/install_actions.php | 46 +- modules/ACLActions/ACLAction.php | 846 +- modules/ACLRoles/ACLRole.php | 333 +- modules/ACLRoles/DetailUserRole.php | 90 +- modules/ACLRoles/EditAllBody.tpl | 2 +- modules/ACLRoles/EditRole.php | 2 +- modules/ACLRoles/EditRole.tpl | 2 +- modules/ACLRoles/ListUsers.php | 2 +- modules/ACLRoles/language/en_us.lang.php | 1 - modules/ACLRoles/metadata/subpaneldefs.php | 4 +- modules/Accounts/Account.php | 63 +- modules/Accounts/AccountFormBase.php | 17 +- modules/Accounts/ShowDuplicates.php | 10 +- modules/Accounts/language/en_us.lang.php | 5 +- modules/Accounts/metadata/SearchFields.php | 10 +- .../Accounts/metadata/additionalDetails.php | 4 +- modules/Accounts/metadata/detailviewdefs.php | 15 +- modules/Accounts/metadata/editviewdefs.php | 2 +- modules/Accounts/metadata/listviewdefs.php | 12 +- modules/Accounts/metadata/popupdefs.php | 25 - modules/Accounts/metadata/subpaneldefs.php | 33 +- modules/Accounts/vardefs.php | 54 +- modules/Accounts/views/view.detail.php | 4 +- modules/Accounts/views/view.list.php | 48 - modules/Activities/OpenListView.php | 68 +- modules/Activities/Popup_picker.html | 38 +- modules/Activities/Popup_picker.php | 200 +- modules/Activities/language/en_us.lang.php | 1 + modules/Administration/Administration.php | 176 +- modules/Administration/Backups.php | 155 + modules/Administration/Common.php | 54 +- .../Administration/ConfigureShortcutBar.php | 127 + modules/Administration/CustomizeFields.php | 3 +- modules/Administration/Development.php | 2 +- .../{Diagnostic.tpl => Diagnostic.html} | 61 +- modules/Administration/Diagnostic.php | 45 +- modules/Administration/DiagnosticDownload.php | 23 +- modules/Administration/DiagnosticRun.php | 11 +- modules/Administration/DstFix.php | 124 +- .../ExportCustomFieldStructure.php | 4 +- modules/Administration/Locale.php | 4 +- modules/Administration/PasswordManager.php | 13 +- .../Administration/QuickRepairAndRebuild.php | 88 +- .../Administration/RebuildRelationship.php | 10 +- modules/Administration/RebuildSchedulers.php | 2 +- modules/Administration/RepairActivities.php | 12 +- modules/Administration/RepairFieldCasing.php | 10 +- modules/Administration/RepairXSS.php | 2 +- modules/Administration/SupportPortal.php | 12 +- modules/Administration/Updater.html | 8 +- modules/Administration/Updater.php | 10 +- modules/Administration/Upgrade.php | 2 +- modules/Administration/UpgradeAccess.php | 9 +- modules/Administration/UpgradeHistory.php | 295 +- modules/Administration/UpgradeWizard.php | 9 +- .../Administration/UpgradeWizardCommon.php | 2 - .../Administration/UpgradeWizard_commit.php | 2 +- .../Administration/UpgradeWizard_prepare.php | 48 +- modules/Administration/action_view_map.php | 6 - modules/Administration/controller.php | 103 +- modules/Administration/expandDatabase.php | 54 +- modules/Administration/index.php | 4 +- .../Administration/language/en_us.lang.php | 52 +- .../metadata/adminpaneldefs.php | 22 +- modules/Administration/repairDatabase.php | 19 +- .../templates/ConfigureTabs.tpl | 2 +- .../templates/GlobalSearchSettings.tpl | 154 - .../Administration/templates/Languages.tpl | 152 - .../Administration/templates/ShortcutBar.tpl | 2 +- .../templates/themeSettings.tpl | 21 +- modules/Administration/updater_utils.php | 62 +- modules/Administration/views/view.backups.php | 189 - .../views/view.configuretabs.php | 4 +- .../views/view.themesettings.php | 7 +- modules/Bugs/language/en_us.lang.php | 1 - modules/Bugs/metadata/SearchFields.php | 15 - modules/Bugs/metadata/detailviewdefs.php | 47 +- modules/Bugs/metadata/editviewdefs.php | 44 +- modules/Bugs/metadata/searchdefs.php | 3 +- modules/Bugs/metadata/subpaneldefs.php | 21 - modules/Bugs/vardefs.php | 8 - modules/Calendar/Calendar.php | 192 +- .../Calendar/DateTime.php | 12 +- modules/Calendar/DateTimeUtil.php | 4 - modules/Calendar/Menu.php | 7 +- modules/Calendar/TasksListView.php | 8 +- modules/Calendar/index.php | 20 +- modules/Calendar/language/en_us.lang.php | 2 +- .../Calendar/templates/templates_calendar.php | 104 +- modules/Calls/Call.php | 91 +- modules/Calls/CallFormBase.php | 62 +- modules/Calls/CallsQuickCreate.php | 40 +- .../MyCallsDashlet/MyCallsDashlet.php | 4 +- modules/Calls/language/en_us.lang.php | 5 +- modules/Calls/metadata/SearchFields.php | 22 - modules/Calls/metadata/additionalDetails.php | 30 +- modules/Calls/metadata/editviewdefs.php | 20 +- modules/Calls/metadata/listviewdefs.php | 5 - modules/Calls/metadata/searchdefs.php | 4 +- modules/Calls/metadata/subpaneldefs.php | 2 +- modules/Calls/vardefs.php | 11 +- modules/Calls/views/view.edit.php | 20 +- modules/CampaignLog/CampaignLog.php | 137 +- modules/CampaignLog/vardefs.php | 54 +- modules/CampaignTrackers/CampaignTracker.php | 219 +- modules/CampaignTrackers/DetailView.php | 2 +- modules/CampaignTrackers/EditView.php | 6 +- modules/Campaigns/CampaignDiagnostic.php | 1 + modules/Campaigns/Charts.php | 97 +- modules/Campaigns/Charts1.php | 2 +- .../TopCampaignsDashlet.php | 70 +- .../TopCampaignsDashletConfigure.tpl | 74 - modules/Campaigns/Delete.php | 23 +- modules/Campaigns/GenerateWebToLeadForm.php | 4 +- modules/Campaigns/Menu.php | 25 + modules/Campaigns/PopupCampaignRoi.html | 16 +- modules/Campaigns/PopupCampaignRoi.php | 3 + modules/Campaigns/ProcessBouncedEmails.php | 2 +- modules/Campaigns/QueueCampaign.php | 54 +- .../{RoiDetailView.tpl => RoiDetailView.html} | 108 +- modules/Campaigns/RoiDetailView.php | 96 +- modules/Campaigns/Schedule.php | 4 +- modules/Campaigns/Subscriptions.php | 8 +- ...ackDetailView.tpl => TrackDetailView.html} | 103 +- modules/Campaigns/TrackDetailView.php | 83 +- modules/Campaigns/WebToLeadCapture.php | 7 +- modules/Campaigns/WizardHome.php | 6 +- modules/Campaigns/WizardMarketing.php | 4 +- modules/Campaigns/WizardMarketingSave.php | 2 +- modules/Campaigns/WizardNewsletter.php | 4 +- modules/Campaigns/image.php | 2 +- modules/Campaigns/metadata/SearchFields.php | 20 - modules/Campaigns/metadata/listviewdefs.php | 6 +- modules/Campaigns/utils.php | 16 +- modules/Campaigns/vardefs.php | 7 +- modules/Campaigns/views/view.classic.php | 27 +- modules/Cases/Case.php | 21 +- modules/Cases/Menu.php | 2 +- modules/Cases/language/en_us.lang.php | 1 - modules/Cases/metadata/SearchFields.php | 7 - modules/Cases/metadata/detailviewdefs.php | 16 +- modules/Cases/metadata/editviewdefs.php | 32 +- modules/Cases/metadata/listviewdefs.php | 16 +- modules/Cases/metadata/searchdefs.php | 4 +- modules/Cases/metadata/subpaneldefs.php | 21 - modules/Cases/vardefs.php | 10 +- .../CampaignROIChartDashlet.en_us.lang.php | 3 +- .../CampaignROIChartDashlet.php | 14 +- ...PipelineBySalesStageDashlet.en_us.lang.php | 3 +- .../MyPipelineBySalesStageDashlet.php | 92 +- ...unitiesByLeadSourceByOutcomeConfigure.tpl} | 0 ...tiesByLeadSourceByOutcomeDashlet.data.php} | 2 +- ...LeadSourceByOutcomeDashlet.en_us.lang.php} | 5 +- ...tiesByLeadSourceByOutcomeDashlet.meta.php} | 2 +- ...rtunitiesByLeadSourceByOutcomeDashlet.php} | 24 +- .../OpportunitiesByLeadSourceConfigure.tpl} | 0 ...OpportunitiesByLeadSourceDashlet.data.php} | 2 +- ...unitiesByLeadSourceDashlet.en_us.lang.php} | 5 +- ...OpportunitiesByLeadSourceDashlet.meta.php} | 2 +- .../OpportunitiesByLeadSourceDashlet.php} | 25 +- .../OutcomeByMonthDashlet.en_us.lang.php | 3 +- .../OutcomeByMonthDashlet.php | 55 +- ...PipelineBySalesStageDashlet.en_us.lang.php | 3 +- .../PipelineBySalesStageDashlet.php | 11 +- .../Dashlets/PredefinedChartDashletScript.tpl | 2 +- modules/Charts/PredefinedChart.php | 112 +- .../code/Chart_lead_source_by_outcome.php | 30 +- .../code/Chart_my_pipeline_by_sales_stage.php | 42 +- .../Charts/code/Chart_outcome_by_month.php | 34 +- .../code/Chart_pipeline_by_lead_source.php | 22 +- .../code/Chart_pipeline_by_sales_stage.php | 58 +- modules/Configurator/Configurator.php | 21 +- modules/Configurator/SugarpdfSettings.php | 178 + modules/Configurator/UploadFileCheck.php | 9 +- modules/Configurator/action_view_map.php | 2 +- modules/Configurator/controller.php | 34 - modules/Configurator/language/en_us.lang.php | 11 +- modules/Configurator/tpls/EditView.tpl | 15 +- modules/Configurator/tpls/adminwizard.tpl | 16 +- .../Configurator/views/view.addfontresult.php | 4 +- .../Configurator/views/view.addfontview.php | 4 +- modules/Configurator/views/view.edit.php | 6 +- .../Configurator/views/view.fontmanager.php | 4 +- .../views/view.sugarpdfsettings.php | 200 - .../Connectors/InstallDefaultConnectors.php | 73 +- modules/Connectors/controller.php | 215 +- modules/Connectors/language/en_us.lang.php | 21 +- .../Connectors/tpls/display_properties.tpl | 232 +- modules/Connectors/tpls/modify_display.tpl | 4 +- modules/Connectors/tpls/modify_mapping.tpl | 4 +- modules/Connectors/tpls/modify_properties.tpl | 4 +- modules/Connectors/tpls/modify_search.tpl | 4 +- .../views/view.connectorsettings.php | 4 +- .../views/view.displayproperties.php | 29 +- .../Connectors/views/view.modifydisplay.php | 2 +- .../Connectors/views/view.modifymapping.php | 9 +- .../views/view.modifyproperties.php | 28 +- .../Connectors/views/view.modifysearch.php | 2 +- modules/Contacts/BusinessCard.php | 2 +- modules/Contacts/Contact.php | 67 +- modules/Contacts/ContactFormBase.php | 12 +- .../ContactOpportunityRelationshipEdit.php | 2 +- modules/Contacts/Popup_picker.php | 70 +- modules/Contacts/ShowDuplicates.php | 10 +- modules/Contacts/contactSeedData.php | 21306 +++++++++++++++ modules/Contacts/contactSeedData_jp.php | 178 + modules/Contacts/language/en_us.lang.php | 8 +- modules/Contacts/metadata/SearchFields.php | 8 - .../Contacts/metadata/additionalDetails.php | 6 +- modules/Contacts/metadata/detailviewdefs.php | 54 +- modules/Contacts/metadata/editviewdefs.php | 44 +- modules/Contacts/metadata/listviewdefs.php | 7 +- modules/Contacts/metadata/quickcreatedefs.php | 4 +- modules/Contacts/metadata/subpaneldefs.php | 21 - modules/Contacts/vardefs.php | 11 +- modules/Contacts/views/view.detail.php | 4 +- modules/Contacts/views/view.list.php | 48 - modules/Currencies/index.php | 21 +- modules/Currencies/language/en_us.lang.php | 1 - modules/DocumentRevisions/DetailView.html | 90 + modules/DocumentRevisions/DetailView.php | 103 + .../DocumentRevisions/DocumentRevision.php | 65 +- modules/DocumentRevisions/EditView.html | 89 + modules/DocumentRevisions/EditView.php | 109 + .../Save.php} | 113 +- .../DocumentRevisions/language/en_us.lang.php | 3 - .../metadata/detailviewdefs.php | 76 - .../metadata/editviewdefs.php | 75 - modules/DocumentRevisions/vardefs.php | 58 +- .../MyDocumentsDashlet.data.php | 102 - .../MyDocumentsDashlet.meta.php | 45 - modules/Documents/Document.php | 133 +- .../Documents/DocumentExternalApiDropDown.php | 51 - modules/Documents/DocumentSoap.php | 2 +- modules/Documents/GetLatestRevision.php | 2 +- modules/Documents/action_view_map.php | 38 - modules/Documents/documents.js | 5 +- modules/Documents/language/en_us.lang.php | 26 +- modules/Documents/metadata/SearchFields.php | 9 - modules/Documents/metadata/detailviewdefs.php | 19 +- modules/Documents/metadata/editviewdefs.php | 15 +- modules/Documents/metadata/listviewdefs.php | 63 +- .../Documents/metadata/quickcreatedefs.php | 30 +- modules/Documents/metadata/searchdefs.php | 18 +- modules/Documents/metadata/subpaneldefs.php | 122 - .../Documents/metadata/subpanels/default.php | 74 +- .../subpanels/ForContractType.php} | 60 +- .../subpanels/default.php} | 121 +- modules/Documents/tpls/view.extdoc.tpl | 132 - modules/Documents/vardefs.php | 103 +- modules/Documents/views/view.detail.php | 4 +- modules/Documents/views/view.edit.php | 52 +- modules/Documents/views/view.extdoc.php | 187 - modules/DynamicFields/DynamicField.php | 778 +- modules/DynamicFields/FieldCases.php | 1 - modules/DynamicFields/FieldViewer.php | 7 - modules/DynamicFields/language/en_us.lang.php | 6 - .../templates/Fields/Forms/bool.tpl | 2 +- .../templates/Fields/Forms/coreTop.tpl | 3 - .../templates/Fields/Forms/currency.tpl | 11 +- .../templates/Fields/Forms/date.tpl | 17 +- .../templates/Fields/Forms/datetimecombo.tpl | 17 +- .../templates/Fields/Forms/encrypt.tpl | 4 +- .../templates/Fields/Forms/enum.tpl | 6 +- .../templates/Fields/Forms/enum2.php | 10 +- .../templates/Fields/Forms/float.tpl | 11 +- .../templates/Fields/Forms/html.php | 6 +- .../templates/Fields/Forms/int.tpl | 9 - .../templates/Fields/Forms/phone.php | 45 - .../templates/Fields/Forms/phone.tpl | 87 - .../templates/Fields/Forms/relate.php | 6 - .../templates/Fields/TemplateCurrency.php | 10 +- .../templates/Fields/TemplateDate.php | 10 +- .../Fields/TemplateDatetimecombo.php | 12 +- .../templates/Fields/TemplateDecimal.php | 8 +- .../templates/Fields/TemplateFloat.php | 10 +- .../templates/Fields/TemplateInt.php | 6 +- .../templates/Fields/TemplateMultiEnum.php | 8 +- .../templates/Fields/TemplatePhone.php | 18 - .../templates/Fields/TemplateRange.php | 287 - modules/EAPM/CheckLogins.php | 89 - modules/EAPM/EAPM.php | 230 - modules/EAPM/EAPMEdit.js | 41 - modules/EAPM/action_view_map.php | 38 - modules/EAPM/controller.php | 186 - modules/EAPM/language/en_us.lang.php | 106 - modules/EAPM/metadata/SearchFields.php | 57 - modules/EAPM/metadata/detailviewdefs.php | 85 - modules/EAPM/metadata/editviewdefs.php | 84 - modules/EAPM/metadata/listviewdefs.php | 69 - modules/EAPM/metadata/metafiles.php | 52 - modules/EAPM/metadata/popupdefs.php | 52 - modules/EAPM/metadata/quickcreatedefs.php | 64 - modules/EAPM/metadata/searchdefs.php | 62 - modules/EAPM/tpls/DetailViewFooter.tpl | 44 - modules/EAPM/tpls/EditViewFooter.tpl | 50 - modules/EAPM/tpls/EditViewHeader.tpl | 76 - modules/EAPM/vardefs.php | 200 - modules/EAPM/views/view.detail.php | 111 - modules/EAPM/views/view.edit.php | 121 - modules/EmailMan/EmailMan.php | 215 +- modules/EmailMan/EmailManDelivery.php | 85 +- modules/EmailMan/Forms.php | 4 + modules/EmailMan/Save.php | 7 +- modules/EmailMan/metadata/listviewdefs.php | 3 - modules/EmailMan/testOutboundEmail.php | 19 +- modules/EmailMan/tpls/config.tpl | 217 +- .../EmailMan/views/view.campaignconfig.php | 6 +- modules/EmailMan/views/view.config.php | 67 +- modules/EmailMan/views/view.list.php | 8 +- modules/EmailMarketing/DetailView.php | 1 + modules/EmailMarketing/EditView.php | 1 + modules/EmailMarketing/Save.php | 2 +- modules/EmailTemplates/CheckDeletable.php | 16 +- modules/EmailTemplates/DetailView.html | 7 +- modules/EmailTemplates/DetailView.php | 2 +- modules/EmailTemplates/EditView.html | 7 +- modules/EmailTemplates/EditView.php | 4 +- modules/EmailTemplates/EditViewMain.html | 7 +- modules/EmailTemplates/EmailTemplate.js | 9 +- modules/EmailTemplates/EmailTemplate.php | 4 - .../EmailTemplates/language/en_us.lang.php | 3 +- .../EmailTemplates/metadata/listviewdefs.php | 6 +- modules/Emails/Compose.php | 10 +- modules/Emails/DetailView.php | 22 +- modules/Emails/EditView.php | 4 +- modules/Emails/Email.php | 333 +- modules/Emails/EmailUI.php | 347 +- modules/Emails/EmailUIAjax.php | 110 +- modules/Emails/ListViewGroup.php | 2 +- modules/Emails/PopupDocuments.php | 6 +- modules/Emails/Save.php | 18 +- modules/Emails/Status.php | 2 +- modules/Emails/javascript/EmailUI.js | 584 +- modules/Emails/javascript/EmailUICompose.js | 6 - modules/Emails/javascript/ajax.js | 177 +- modules/Emails/javascript/complexLayout.js | 4 +- modules/Emails/javascript/init.js | 4 +- modules/Emails/language/en_us.lang.php | 2 - modules/Emails/metadata/qcmodulesdefs.php | 45 - modules/Emails/templates/advancedSearch.tpl | 9 +- modules/Emails/templates/outboundDialog.tpl | 3 +- modules/Employees/Employee.php | 3 - .../Employees/EmployeeStatus.php | 111 +- modules/Employees/Save.php | 10 +- modules/Employees/metadata/editviewdefs.php | 16 +- modules/Employees/metadata/listviewdefs.php | 9 +- modules/Employees/views/view.edit.php | 16 +- modules/Employees/views/view.list.php | 6 +- modules/Groups/DetailView.php | 2 +- modules/Groups/EditView.php | 2 +- modules/Home/About.php | 15 +- ...ieve.php => AdditionalDetailsRetrieve.php} | 89 +- .../ChartsDashlet.en_us.lang.php | 2 +- .../Dashlets/ChartsDashlet/ChartsDashlet.php | 20 +- .../ChartsDashlet/ChartsDashletScript.tpl | 2 +- .../InvadersDashlet.en_us.lang.php | 2 +- .../JotPadDashlet.en_us.lang.php | 2 +- .../RSSDashlet/RSSDashlet.en_us.lang.php | 2 +- .../Home/Dashlets/RSSDashlet/RSSDashlet.php | 11 +- .../Dashlets/RSSDashlet/RSSDashletOptions.tpl | 12 - .../SugarNewsDashlet/SugarNewsDashlet.php | 10 +- .../Dashlets/SugarNewsDashlet/configure.tpl | 26 +- .../Home/Dashlets/iFrameDashlet/configure.tpl | 26 +- .../Dashlets/iFrameDashlet/iFrameDashlet.php | 31 +- modules/Home/Home.tpl | 8 +- modules/Home/SubpanelCreates.php | 35 +- modules/Home/UnifiedSearch.php | 6 +- modules/Home/UnifiedSearchAdvanced.php | 563 +- modules/Home/UnifiedSearchAdvanced.tpl | 58 +- modules/Home/UnifiedSearchAdvancedForm.tpl | 135 +- modules/Home/UnifiedSearchAdvancedResults.tpl | 158 +- modules/Home/action_view_map.php | 38 - modules/Home/index.php | 57 +- modules/Home/language/en_us.lang.php | 4 +- modules/Home/quicksearchQuery.php | 36 +- modules/Import/Forms.php | 115 + modules/Import/ImportDuplicateCheck.php | 6 - modules/Import/ImportFieldSanitize.php | 574 +- modules/Import/ImportFile.php | 8 +- modules/Import/ImportMap.php | 101 +- modules/Import/UsersLastImport.php | 103 +- modules/Import/controller.php | 30 - modules/Import/tpls/step1.tpl | 7 - modules/Import/tpls/step3.tpl | 44 +- modules/Import/views/view.error.php | 3 + modules/Import/views/view.last.php | 54 +- modules/Import/views/view.step1.php | 52 +- modules/Import/views/view.step2.php | 61 +- modules/Import/views/view.step3.php | 335 +- modules/Import/views/view.step4.php | 111 +- modules/Import/views/view.undo.php | 3 + modules/InboundEmail/DetailView.php | 6 +- modules/InboundEmail/EditView.html | 12 +- modules/InboundEmail/EditView.php | 46 +- modules/InboundEmail/InboundEmail.js | 5 +- modules/InboundEmail/InboundEmail.php | 124 +- modules/InboundEmail/Popup.php | 16 +- modules/InboundEmail/Save.php | 52 +- .../InboundEmail/ShowInboundFoldersList.php | 9 +- modules/InboundEmail/index.php | 2 +- modules/InboundEmail/parseEncoding.php | 224 + modules/LabelEditor/EditView.php | 2 +- modules/Leads/Lead.php | 2 +- modules/Leads/language/en_us.lang.php | 2 +- modules/Leads/metadata/SearchFields.php | 15 - modules/Leads/metadata/additionalDetails.php | 6 +- modules/Leads/metadata/detailviewdefs.php | 12 +- modules/Leads/metadata/listviewdefs.php | 12 +- modules/Leads/metadata/searchdefs.php | 4 +- modules/Leads/vardefs.php | 3 +- modules/Leads/views/view.convertlead.php | 191 +- modules/Leads/views/view.list.php | 48 - modules/MailMerge/Step1.php | 10 +- .../MyMeetingsDashlet.data.php | 4 +- .../MyMeetingsDashlet/MyMeetingsDashlet.php | 14 +- modules/Meetings/JoinExternalMeeting.php | 83 - modules/Meetings/Meeting.php | 152 +- modules/Meetings/MeetingFormBase.php | 114 +- modules/Meetings/MeetingsQuickCreate.php | 4 +- modules/Meetings/language/en_us.lang.php | 32 +- modules/Meetings/metadata/SearchFields.php | 21 - modules/Meetings/metadata/detailviewdefs.php | 13 +- modules/Meetings/metadata/editviewdefs.php | 23 +- modules/Meetings/metadata/listviewdefs.php | 5 - modules/Meetings/metadata/quickcreatedefs.php | 3 +- modules/Meetings/metadata/searchdefs.php | 4 +- modules/Meetings/metadata/subpaneldefs.php | 2 +- .../metadata/subpanels/ForActivities.php | 4 +- modules/Meetings/tpls/extMeetingNoStart.tpl | 40 - .../Meetings/tpls/extMeetingNotInvited.tpl | 40 - modules/Meetings/vardefs.php | 86 +- modules/Meetings/views/view.edit.php | 2 +- modules/Meetings/views/view.listbytype.php | 124 - modules/MergeRecords/MergeRecord.php | 13 - modules/MergeRecords/Step3.php | 84 +- modules/MergeRecords/index.php | 10 - modules/ModuleBuilder/MB/MBLanguage.php | 8 +- modules/ModuleBuilder/MB/MBPackage.php | 2 +- modules/ModuleBuilder/controller.php | 76 +- .../ModuleBuilder/javascript/ModuleBuilder.js | 65 +- .../ModuleBuilder/javascript/SimpleList.js | 4 - modules/ModuleBuilder/language/en_us.lang.php | 54 +- .../ModuleBuilder/parsers/ParserFactory.php | 3 + .../ModuleBuilder/parsers/StandardField.php | 9 +- modules/ModuleBuilder/parsers/constants.php | 1 + .../parsers/parser.modifylistview.php | 6 - .../relationships/AbstractRelationship.php | 36 +- .../relationships/DeployedRelationships.php | 14 +- .../parsers/views/AbstractMetaDataParser.php | 5 - .../views/DeployedMetaDataImplementation.php | 11 - .../views/GridLayoutMetaDataParser.php | 64 +- .../ModuleBuilder/parsers/views/History.php | 31 +- .../views/ListLayoutMetaDataParser.php | 18 +- modules/ModuleBuilder/tpls/MB.css | 14 - .../ModuleBuilder/tpls/MBModule/dropdown.tpl | 5 +- .../ModuleBuilder/tpls/MBModule/module.tpl | 4 +- .../ModuleBuilder/tpls/MBModule/vardef.tpl | 3 - .../ModuleBuilder/tpls/MBPackage/package.tpl | 14 +- .../ModuleBuilder/tpls/Preview/layoutView.tpl | 11 +- .../ModuleBuilder/tpls/Preview/listView.tpl | 11 +- modules/ModuleBuilder/tpls/labels.tpl | 13 +- modules/ModuleBuilder/tpls/layoutView.tpl | 55 +- modules/ModuleBuilder/tpls/listView.tpl | 28 +- modules/ModuleBuilder/views/view.dashlet.php | 5 +- .../ModuleBuilder/views/view.deletemodule.php | 4 +- .../views/view.deletepackage.php | 4 +- .../views/view.displaydeploy.php | 4 +- .../views/view.displaydeployresult.php | 4 +- modules/ModuleBuilder/views/view.dropdown.php | 11 +- .../ModuleBuilder/views/view.dropdowns.php | 4 +- .../views/view.exportcustomizations.php | 4 +- modules/ModuleBuilder/views/view.history.php | 6 +- modules/ModuleBuilder/views/view.home.php | 4 +- modules/ModuleBuilder/views/view.labels.php | 18 +- .../ModuleBuilder/views/view.layoutview.php | 66 +- modules/ModuleBuilder/views/view.listview.php | 7 +- modules/ModuleBuilder/views/view.main.php | 4 +- modules/ModuleBuilder/views/view.module.php | 4 +- .../ModuleBuilder/views/view.modulefield.php | 15 +- .../ModuleBuilder/views/view.modulefields.php | 8 +- .../ModuleBuilder/views/view.modulelabels.php | 4 +- modules/ModuleBuilder/views/view.package.php | 25 +- .../ModuleBuilder/views/view.popupview.php | 5 +- modules/ModuleBuilder/views/view.property.php | 4 +- .../ModuleBuilder/views/view.relationship.php | 4 +- .../views/view.relationships.php | 4 +- .../ModuleBuilder/views/view.resetmodule.php | 4 +- .../ModuleBuilder/views/view.searchview.php | 4 +- modules/ModuleBuilder/views/view.tree.php | 4 +- modules/ModuleBuilder/views/view.wizard.php | 4 +- modules/MySettings/StoreQuery.php | 106 +- .../MyNotesDashlet/MyNotesDashlet.data.php | 126 - .../MyNotesDashlet/MyNotesDashlet.meta.php | 45 - .../MyNotesDashlet/MyNotesDashlet.php | 57 - modules/Notes/Note.php | 24 +- modules/Notes/NoteSoap.php | 12 +- modules/Notes/controller.php | 7 +- modules/Notes/language/en_us.lang.php | 3 +- modules/Notes/metadata/SearchFields.php | 9 - modules/Notes/metadata/detailviewdefs.php | 8 +- modules/Notes/metadata/editviewdefs.php | 44 +- modules/Notes/metadata/listviewdefs.php | 22 +- modules/Notes/metadata/quickcreatedefs.php | 32 +- modules/Notes/metadata/searchdefs.php | 1 - modules/Notes/metadata/subpanels/ForCalls.php | 127 - .../Notes/metadata/subpanels/ForHistory.php | 5 +- modules/Notes/metadata/subpanels/default.php | 5 +- modules/Notes/vardefs.php | 42 +- .../MyClosedOpportunitiesDashlet.php | 70 +- .../MyClosedOpportunitiesDashlet.tpl | 10 +- .../MyClosedOpportunitiesDashletConfigure.tpl | 74 - .../MyClosedOpportunitiesDashletOptions.tpl | 86 - modules/Opportunities/Opportunity.php | 105 +- modules/Opportunities/language/en_us.lang.php | 1 - .../Opportunities/metadata/SearchFields.php | 24 - .../Opportunities/metadata/detailviewdefs.php | 9 +- .../Opportunities/metadata/listviewdefs.php | 9 +- modules/Opportunities/metadata/searchdefs.php | 5 +- .../Opportunities/metadata/subpaneldefs.php | 21 - modules/Opportunities/vardefs.php | 18 +- modules/Opportunities/views/view.edit.php | 2 - modules/Project/metadata/SearchFields.php | 15 - modules/Project/vardefs.php | 10 +- .../Project/views/view.templatesdetail.php | 4 +- modules/Project/views/view.templatesedit.php | 4 +- modules/ProjectTask/MyProjectTasks.php | 2 +- modules/ProjectTask/metadata/SearchFields.php | 16 +- modules/ProjectTask/vardefs.php | 9 +- modules/ProjectTask/views/view.list.php | 2 +- modules/ProspectLists/Duplicate.php | 2 +- modules/ProspectLists/Menu.php | 9 +- modules/ProspectLists/TargetListUpdate.php | 22 +- modules/ProspectLists/language/en_us.lang.php | 5 +- .../ProspectLists/metadata/listviewdefs.php | 7 +- modules/ProspectLists/vardefs.php | 32 +- modules/Prospects/Menu.php | 8 +- modules/Prospects/Prospect.php | 2 +- modules/Prospects/language/en_us.lang.php | 2 +- modules/Prospects/metadata/SearchFields.php | 9 +- .../Prospects/metadata/additionalDetails.php | 6 +- modules/Prospects/metadata/detailviewdefs.php | 10 +- modules/Prospects/metadata/listviewdefs.php | 10 +- modules/Prospects/vardefs.php | 1 - modules/Prospects/views/view.list.php | 48 - modules/Releases/index.php | 2 +- modules/Roles/DetailView.php | 2 +- modules/Roles/EditView.php | 2 +- modules/SavedSearch/ListView.php | 2 +- modules/SavedSearch/SavedSearch.php | 97 +- modules/SavedSearch/SavedSearchForm.tpl | 6 +- modules/SavedSearch/index.php | 9 +- modules/Schedulers/EditView.html | 6 +- modules/Schedulers/EditView.php | 8 +- modules/Schedulers/JobThread.php | 2 +- modules/Schedulers/Scheduler.php | 151 +- modules/Schedulers/SchedulerDaemon.php | 41 +- modules/Schedulers/_AddJobsHere.php | 4 +- modules/Schedulers/index.php | 2 +- modules/Schedulers/language/en_us.lang.php | 2 - modules/SchedulersJobs/SchedulersJob.php | 76 +- modules/Studio/DropDowns/DropDownHelper.php | 8 +- modules/Studio/DropDowns/EditView.php | 2 +- modules/Studio/TabGroups/EditViewTabs.php | 2 +- modules/Studio/TabGroups/TabGroupHelper.php | 3 + modules/Studio/parsers/StudioParser.php | 8 +- modules/Studio/wizards/StudioWizard.php | 2 +- modules/SugarFeed/AdminSettings.php | 2 +- .../SugarFeed/{tpls => }/AdminSettings.tpl | 3 +- .../Dashlets/SugarFeedDashlet/Options.tpl | 124 +- .../SugarFeedDashlet/SugarFeedDashlet.php | 231 +- .../SugarFeedDashlet/SugarFeedScript.tpl | 47 +- .../SugarFeedDashlet/UserPostForm.tpl | 20 +- modules/SugarFeed/SugarFeed.php | 144 +- modules/SugarFeed/SugarFeedFlush.php | 14 +- modules/SugarFeed/action_view_map.php | 38 - modules/SugarFeed/language/en_us.lang.php | 34 +- .../SugarFeed/metadata/dashletviewdefs.php | 6 +- .../SugarFeed/views/view.adminsettings.php | 179 - modules/TableDictionary.php | 8 - modules/Tasks/MyTasks.php | 20 +- modules/Tasks/Save.php | 8 +- modules/Tasks/Task.php | 61 +- modules/Tasks/language/en_us.lang.php | 5 +- modules/Tasks/metadata/SearchFields.php | 22 - modules/Tasks/metadata/additionalDetails.php | 1 - modules/Tasks/metadata/listviewdefs.php | 7 +- modules/Tasks/metadata/searchdefs.php | 3 +- modules/Tasks/vardefs.php | 7 - modules/Tasks/views/view.edit.php | 16 +- modules/Trackers/Tracker.php | 80 +- modules/Trackers/monitor/Monitor.php | 66 +- modules/Trackers/populateSeedData.php | 20 +- .../SugarMerge/EditViewMerge.php | 6 - .../UpgradeWizard/SugarMerge/SearchMerge.php | 34 +- modules/UpgradeWizard/UploadFileCheck.php | 3 + modules/UpgradeWizard/commit.php | 14 +- modules/UpgradeWizard/end.php | 72 +- modules/UpgradeWizard/index.php | 2 +- modules/UpgradeWizard/preflight.php | 18 +- .../UpgradeWizard/silentUpgrade_dce_step2.php | 6 +- modules/UpgradeWizard/silentUpgrade_step1.php | 212 +- modules/UpgradeWizard/silentUpgrade_step2.php | 73 +- modules/UpgradeWizard/uw_ajax.php | 25 +- modules/UpgradeWizard/uw_files.php | 1 + modules/UpgradeWizard/uw_utils.php | 773 +- modules/UserPreferences/UserPreference.php | 561 +- modules/UserPreferences/vardefs.php | 2 +- modules/Users/Authenticate.php | 29 +- modules/Users/Changenewpassword.php | 6 +- modules/Users/DetailView.php | 59 +- modules/Users/DetailView.tpl | 2 +- modules/Users/EditView.php | 84 +- modules/Users/EditView.tpl | 122 +- modules/Users/GeneratePassword.php | 15 +- modules/Users/Login.php | 37 +- modules/Users/PopupSignature.php | 2 +- modules/Users/Save.php | 3 +- modules/Users/SetTimezone.php | 54 +- modules/Users/SetTimezone.tpl | 20 +- modules/Users/User.php | 30 +- .../AuthenticationController.php | 15 +- .../SugarAuthenticate/SugarAuthenticate.php | 5 - modules/Users/controller.php | 7 +- modules/Users/language/en_us.lang.php | 6 +- modules/Users/login.css | 3 +- modules/Users/login.tpl | 13 +- modules/Users/metadata/subpaneldefs.php | 20 - .../metadata/subpanels/ForProspectLists.php | 4 - modules/Users/password_utils.php | 41 +- modules/Users/reassignUserRecords.php | 13 +- modules/Users/tpls/wizard.tpl | 62 +- modules/Users/vardefs.php | 50 +- modules/Users/views/view.list.php | 12 +- modules/Users/views/view.wizard.php | 55 +- modules/Versions/DefaultVersions.php | 8 +- modules/vCals/vCal.php | 45 +- service/core/NusoapSoap.php | 32 +- service/core/PHP5Soap.php | 5 +- service/core/REST/SugarRestRSS.php | 142 +- service/core/SoapHelperWebService.php | 24 +- service/core/SugarRestService.php | 88 +- service/core/SugarWebServiceImpl.php | 25 +- service/v2_1/SugarWebServiceImplv2_1.php | 14 +- service/v3/SugarWebServiceImplv3.php | 4 +- service/v3/SugarWebServiceUtilv3.php | 104 +- service/v3_1/SugarWebServiceImplv3_1.php | 865 - service/v3_1/SugarWebServiceUtilv3_1.php | 565 - service/v3_1/registry.php | 289 - service/v3_1/rest.php | 50 - service/v3_1/soap.php | 50 - service/v4/SugarWebServiceImplv4.php | 585 - service/v4/SugarWebServiceUtilv4.php | 677 - service/v4/registry.php | 144 - service/v4/rest.php | 50 - service/v4/soap.php | 50 - soap/SoapDeprecated.php | 21 +- soap/SoapHelperFunctions.php | 114 +- soap/SoapPortalHelper.php | 27 +- soap/SoapPortalUsers.php | 5 +- soap/SoapSugarUsers.php | 44 +- sugar_version.php | 8 +- themes/Sugar5/css/style.css | 24 +- themes/Sugar5/css/yui.css | 20 +- themes/Sugar5/images/icon_SearchForm.gif | Bin 1993 -> 2509 bytes themes/Sugar5/images/sugarColors.xml | 49 +- themes/Sugar5/js/style.js | 22 +- themes/Sugar5/themedef.php | 1 - themes/Sugar5/tpls/_head.tpl | 1 - themes/Sugar5/tpls/_headerModuleList.tpl | 55 - themes/Sugar5/tpls/footer.tpl | 6 +- themes/default/images/backtotop.gif | Bin 124 -> 0 bytes themes/default/images/chartBg.png | Bin 583 -> 0 bytes themes/default/images/create-record.gif | Bin 1437 -> 0 bytes themes/default/images/icon_SearchForm.gif | Bin 1993 -> 2509 bytes themes/default/images/join_imeeting.gif | Bin 118 -> 0 bytes themes/default/images/join_meeting_inline.png | Bin 600 -> 0 bytes .../default/images/start_meeting_inline.png | Bin 579 -> 0 bytes themes/default/images/sugarColors.xml | 52 +- 1471 files changed, 81338 insertions(+), 142462 deletions(-) create mode 100644 README delete mode 100644 Zend/Crypt.php delete mode 100644 Zend/Crypt/DiffieHellman.php delete mode 100644 Zend/Crypt/DiffieHellman/Exception.php delete mode 100644 Zend/Crypt/Exception.php delete mode 100644 Zend/Crypt/Hmac.php delete mode 100644 Zend/Crypt/Hmac/Exception.php delete mode 100644 Zend/Crypt/Math.php delete mode 100644 Zend/Crypt/Math/BigInteger.php delete mode 100644 Zend/Crypt/Math/BigInteger/Bcmath.php delete mode 100644 Zend/Crypt/Math/BigInteger/Exception.php delete mode 100644 Zend/Crypt/Math/BigInteger/Gmp.php delete mode 100644 Zend/Crypt/Math/BigInteger/Interface.php delete mode 100644 Zend/Crypt/Math/Exception.php delete mode 100644 Zend/Crypt/Rsa.php delete mode 100644 Zend/Crypt/Rsa/Key.php delete mode 100644 Zend/Crypt/Rsa/Key/Private.php delete mode 100644 Zend/Crypt/Rsa/Key/Public.php delete mode 100644 Zend/Exception.php delete mode 100644 Zend/Gdata.php delete mode 100644 Zend/Gdata/App.php delete mode 100644 Zend/Gdata/App/AuthException.php delete mode 100644 Zend/Gdata/App/BadMethodCallException.php delete mode 100644 Zend/Gdata/App/Base.php delete mode 100644 Zend/Gdata/App/BaseMediaSource.php delete mode 100644 Zend/Gdata/App/CaptchaRequiredException.php delete mode 100644 Zend/Gdata/App/Entry.php delete mode 100644 Zend/Gdata/App/Exception.php delete mode 100644 Zend/Gdata/App/Extension.php delete mode 100644 Zend/Gdata/App/Extension/Author.php delete mode 100644 Zend/Gdata/App/Extension/Category.php delete mode 100644 Zend/Gdata/App/Extension/Content.php delete mode 100644 Zend/Gdata/App/Extension/Contributor.php delete mode 100644 Zend/Gdata/App/Extension/Control.php delete mode 100644 Zend/Gdata/App/Extension/Draft.php delete mode 100644 Zend/Gdata/App/Extension/Edited.php delete mode 100644 Zend/Gdata/App/Extension/Element.php delete mode 100644 Zend/Gdata/App/Extension/Email.php delete mode 100644 Zend/Gdata/App/Extension/Generator.php delete mode 100644 Zend/Gdata/App/Extension/Icon.php delete mode 100644 Zend/Gdata/App/Extension/Id.php delete mode 100644 Zend/Gdata/App/Extension/Link.php delete mode 100644 Zend/Gdata/App/Extension/Logo.php delete mode 100644 Zend/Gdata/App/Extension/Name.php delete mode 100644 Zend/Gdata/App/Extension/Person.php delete mode 100644 Zend/Gdata/App/Extension/Published.php delete mode 100644 Zend/Gdata/App/Extension/Rights.php delete mode 100644 Zend/Gdata/App/Extension/Source.php delete mode 100644 Zend/Gdata/App/Extension/Subtitle.php delete mode 100644 Zend/Gdata/App/Extension/Summary.php delete mode 100644 Zend/Gdata/App/Extension/Text.php delete mode 100644 Zend/Gdata/App/Extension/Title.php delete mode 100644 Zend/Gdata/App/Extension/Updated.php delete mode 100644 Zend/Gdata/App/Extension/Uri.php delete mode 100644 Zend/Gdata/App/Feed.php delete mode 100644 Zend/Gdata/App/FeedEntryParent.php delete mode 100644 Zend/Gdata/App/FeedSourceParent.php delete mode 100644 Zend/Gdata/App/HttpException.php delete mode 100644 Zend/Gdata/App/IOException.php delete mode 100644 Zend/Gdata/App/InvalidArgumentException.php delete mode 100644 Zend/Gdata/App/LoggingHttpClientAdapterSocket.php delete mode 100644 Zend/Gdata/App/MediaEntry.php delete mode 100644 Zend/Gdata/App/MediaFileSource.php delete mode 100644 Zend/Gdata/App/MediaSource.php delete mode 100644 Zend/Gdata/App/Util.php delete mode 100644 Zend/Gdata/App/VersionException.php delete mode 100644 Zend/Gdata/AuthSub.php delete mode 100644 Zend/Gdata/Books.php delete mode 100644 Zend/Gdata/Books/CollectionEntry.php delete mode 100644 Zend/Gdata/Books/CollectionFeed.php delete mode 100644 Zend/Gdata/Books/Extension/AnnotationLink.php delete mode 100644 Zend/Gdata/Books/Extension/BooksCategory.php delete mode 100644 Zend/Gdata/Books/Extension/BooksLink.php delete mode 100644 Zend/Gdata/Books/Extension/Embeddability.php delete mode 100644 Zend/Gdata/Books/Extension/InfoLink.php delete mode 100644 Zend/Gdata/Books/Extension/PreviewLink.php delete mode 100644 Zend/Gdata/Books/Extension/Review.php delete mode 100644 Zend/Gdata/Books/Extension/ThumbnailLink.php delete mode 100644 Zend/Gdata/Books/Extension/Viewability.php delete mode 100644 Zend/Gdata/Books/VolumeEntry.php delete mode 100644 Zend/Gdata/Books/VolumeFeed.php delete mode 100644 Zend/Gdata/Books/VolumeQuery.php delete mode 100644 Zend/Gdata/Calendar.php delete mode 100644 Zend/Gdata/Calendar/EventEntry.php delete mode 100644 Zend/Gdata/Calendar/EventFeed.php delete mode 100644 Zend/Gdata/Calendar/EventQuery.php delete mode 100644 Zend/Gdata/Calendar/Extension/AccessLevel.php delete mode 100644 Zend/Gdata/Calendar/Extension/Color.php delete mode 100644 Zend/Gdata/Calendar/Extension/Hidden.php delete mode 100644 Zend/Gdata/Calendar/Extension/Link.php delete mode 100644 Zend/Gdata/Calendar/Extension/QuickAdd.php delete mode 100644 Zend/Gdata/Calendar/Extension/Selected.php delete mode 100644 Zend/Gdata/Calendar/Extension/SendEventNotifications.php delete mode 100644 Zend/Gdata/Calendar/Extension/Timezone.php delete mode 100644 Zend/Gdata/Calendar/Extension/WebContent.php delete mode 100644 Zend/Gdata/Calendar/ListEntry.php delete mode 100644 Zend/Gdata/Calendar/ListFeed.php delete mode 100644 Zend/Gdata/ClientLogin.php delete mode 100644 Zend/Gdata/Docs.php delete mode 100644 Zend/Gdata/Docs/DocumentListEntry.php delete mode 100644 Zend/Gdata/Docs/DocumentListFeed.php delete mode 100644 Zend/Gdata/Docs/Query.php delete mode 100644 Zend/Gdata/DublinCore.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Creator.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Date.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Description.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Format.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Identifier.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Language.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Publisher.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Rights.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Subject.php delete mode 100644 Zend/Gdata/DublinCore/Extension/Title.php delete mode 100644 Zend/Gdata/Entry.php delete mode 100644 Zend/Gdata/Exif.php delete mode 100644 Zend/Gdata/Exif/Entry.php delete mode 100644 Zend/Gdata/Exif/Extension/Distance.php delete mode 100644 Zend/Gdata/Exif/Extension/Exposure.php delete mode 100644 Zend/Gdata/Exif/Extension/FStop.php delete mode 100644 Zend/Gdata/Exif/Extension/Flash.php delete mode 100644 Zend/Gdata/Exif/Extension/FocalLength.php delete mode 100644 Zend/Gdata/Exif/Extension/ImageUniqueId.php delete mode 100644 Zend/Gdata/Exif/Extension/Iso.php delete mode 100644 Zend/Gdata/Exif/Extension/Make.php delete mode 100644 Zend/Gdata/Exif/Extension/Model.php delete mode 100644 Zend/Gdata/Exif/Extension/Tags.php delete mode 100644 Zend/Gdata/Exif/Extension/Time.php delete mode 100644 Zend/Gdata/Exif/Feed.php delete mode 100644 Zend/Gdata/Extension.php delete mode 100644 Zend/Gdata/Extension/AttendeeStatus.php delete mode 100644 Zend/Gdata/Extension/AttendeeType.php delete mode 100644 Zend/Gdata/Extension/Comments.php delete mode 100644 Zend/Gdata/Extension/EntryLink.php delete mode 100644 Zend/Gdata/Extension/EventStatus.php delete mode 100644 Zend/Gdata/Extension/ExtendedProperty.php delete mode 100644 Zend/Gdata/Extension/FeedLink.php delete mode 100644 Zend/Gdata/Extension/OpenSearchItemsPerPage.php delete mode 100644 Zend/Gdata/Extension/OpenSearchStartIndex.php delete mode 100644 Zend/Gdata/Extension/OpenSearchTotalResults.php delete mode 100644 Zend/Gdata/Extension/OriginalEvent.php delete mode 100644 Zend/Gdata/Extension/Rating.php delete mode 100644 Zend/Gdata/Extension/Recurrence.php delete mode 100644 Zend/Gdata/Extension/RecurrenceException.php delete mode 100644 Zend/Gdata/Extension/Reminder.php delete mode 100644 Zend/Gdata/Extension/Transparency.php delete mode 100644 Zend/Gdata/Extension/Visibility.php delete mode 100644 Zend/Gdata/Extension/When.php delete mode 100644 Zend/Gdata/Extension/Where.php delete mode 100644 Zend/Gdata/Extension/Who.php delete mode 100644 Zend/Gdata/Feed.php delete mode 100644 Zend/Gdata/Gapps.php delete mode 100644 Zend/Gdata/Gapps/EmailListEntry.php delete mode 100644 Zend/Gdata/Gapps/EmailListFeed.php delete mode 100644 Zend/Gdata/Gapps/EmailListQuery.php delete mode 100644 Zend/Gdata/Gapps/EmailListRecipientEntry.php delete mode 100644 Zend/Gdata/Gapps/EmailListRecipientFeed.php delete mode 100644 Zend/Gdata/Gapps/EmailListRecipientQuery.php delete mode 100644 Zend/Gdata/Gapps/Error.php delete mode 100644 Zend/Gdata/Gapps/Extension/EmailList.php delete mode 100644 Zend/Gdata/Gapps/Extension/Login.php delete mode 100644 Zend/Gdata/Gapps/Extension/Name.php delete mode 100644 Zend/Gdata/Gapps/Extension/Nickname.php delete mode 100644 Zend/Gdata/Gapps/Extension/Property.php delete mode 100644 Zend/Gdata/Gapps/Extension/Quota.php delete mode 100644 Zend/Gdata/Gapps/GroupEntry.php delete mode 100644 Zend/Gdata/Gapps/GroupFeed.php delete mode 100644 Zend/Gdata/Gapps/GroupQuery.php delete mode 100644 Zend/Gdata/Gapps/MemberEntry.php delete mode 100644 Zend/Gdata/Gapps/MemberFeed.php delete mode 100644 Zend/Gdata/Gapps/MemberQuery.php delete mode 100644 Zend/Gdata/Gapps/NicknameEntry.php delete mode 100644 Zend/Gdata/Gapps/NicknameFeed.php delete mode 100644 Zend/Gdata/Gapps/NicknameQuery.php delete mode 100644 Zend/Gdata/Gapps/OwnerEntry.php delete mode 100644 Zend/Gdata/Gapps/OwnerFeed.php delete mode 100644 Zend/Gdata/Gapps/OwnerQuery.php delete mode 100644 Zend/Gdata/Gapps/Query.php delete mode 100644 Zend/Gdata/Gapps/ServiceException.php delete mode 100644 Zend/Gdata/Gapps/UserEntry.php delete mode 100644 Zend/Gdata/Gapps/UserFeed.php delete mode 100644 Zend/Gdata/Gapps/UserQuery.php delete mode 100644 Zend/Gdata/Gbase.php delete mode 100644 Zend/Gdata/Gbase/Entry.php delete mode 100644 Zend/Gdata/Gbase/Extension/BaseAttribute.php delete mode 100644 Zend/Gdata/Gbase/Feed.php delete mode 100644 Zend/Gdata/Gbase/ItemEntry.php delete mode 100644 Zend/Gdata/Gbase/ItemFeed.php delete mode 100644 Zend/Gdata/Gbase/ItemQuery.php delete mode 100644 Zend/Gdata/Gbase/Query.php delete mode 100644 Zend/Gdata/Gbase/SnippetEntry.php delete mode 100644 Zend/Gdata/Gbase/SnippetFeed.php delete mode 100644 Zend/Gdata/Gbase/SnippetQuery.php delete mode 100644 Zend/Gdata/Geo.php delete mode 100644 Zend/Gdata/Geo/Entry.php delete mode 100644 Zend/Gdata/Geo/Extension/GeoRssWhere.php delete mode 100644 Zend/Gdata/Geo/Extension/GmlPoint.php delete mode 100644 Zend/Gdata/Geo/Extension/GmlPos.php delete mode 100644 Zend/Gdata/Geo/Feed.php delete mode 100644 Zend/Gdata/Health.php delete mode 100644 Zend/Gdata/Health/Extension/Ccr.php delete mode 100644 Zend/Gdata/Health/ProfileEntry.php delete mode 100644 Zend/Gdata/Health/ProfileFeed.php delete mode 100644 Zend/Gdata/Health/ProfileListEntry.php delete mode 100644 Zend/Gdata/Health/ProfileListFeed.php delete mode 100644 Zend/Gdata/Health/Query.php delete mode 100644 Zend/Gdata/HttpAdapterStreamingProxy.php delete mode 100644 Zend/Gdata/HttpAdapterStreamingSocket.php delete mode 100644 Zend/Gdata/HttpClient.php delete mode 100644 Zend/Gdata/Kind/EventEntry.php delete mode 100644 Zend/Gdata/Media.php delete mode 100644 Zend/Gdata/Media/Entry.php delete mode 100644 Zend/Gdata/Media/Extension/MediaCategory.php delete mode 100644 Zend/Gdata/Media/Extension/MediaContent.php delete mode 100644 Zend/Gdata/Media/Extension/MediaCopyright.php delete mode 100644 Zend/Gdata/Media/Extension/MediaCredit.php delete mode 100644 Zend/Gdata/Media/Extension/MediaDescription.php delete mode 100644 Zend/Gdata/Media/Extension/MediaGroup.php delete mode 100644 Zend/Gdata/Media/Extension/MediaHash.php delete mode 100644 Zend/Gdata/Media/Extension/MediaKeywords.php delete mode 100644 Zend/Gdata/Media/Extension/MediaPlayer.php delete mode 100644 Zend/Gdata/Media/Extension/MediaRating.php delete mode 100644 Zend/Gdata/Media/Extension/MediaRestriction.php delete mode 100644 Zend/Gdata/Media/Extension/MediaText.php delete mode 100644 Zend/Gdata/Media/Extension/MediaThumbnail.php delete mode 100644 Zend/Gdata/Media/Extension/MediaTitle.php delete mode 100644 Zend/Gdata/Media/Feed.php delete mode 100644 Zend/Gdata/MediaMimeStream.php delete mode 100644 Zend/Gdata/MimeBodyString.php delete mode 100644 Zend/Gdata/MimeFile.php delete mode 100644 Zend/Gdata/Photos.php delete mode 100644 Zend/Gdata/Photos/AlbumEntry.php delete mode 100644 Zend/Gdata/Photos/AlbumFeed.php delete mode 100644 Zend/Gdata/Photos/AlbumQuery.php delete mode 100644 Zend/Gdata/Photos/CommentEntry.php delete mode 100644 Zend/Gdata/Photos/Extension/Access.php delete mode 100644 Zend/Gdata/Photos/Extension/AlbumId.php delete mode 100644 Zend/Gdata/Photos/Extension/BytesUsed.php delete mode 100644 Zend/Gdata/Photos/Extension/Checksum.php delete mode 100644 Zend/Gdata/Photos/Extension/Client.php delete mode 100644 Zend/Gdata/Photos/Extension/CommentCount.php delete mode 100644 Zend/Gdata/Photos/Extension/CommentingEnabled.php delete mode 100644 Zend/Gdata/Photos/Extension/Height.php delete mode 100644 Zend/Gdata/Photos/Extension/Id.php delete mode 100644 Zend/Gdata/Photos/Extension/Location.php delete mode 100644 Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php delete mode 100644 Zend/Gdata/Photos/Extension/Name.php delete mode 100644 Zend/Gdata/Photos/Extension/Nickname.php delete mode 100644 Zend/Gdata/Photos/Extension/NumPhotos.php delete mode 100644 Zend/Gdata/Photos/Extension/NumPhotosRemaining.php delete mode 100644 Zend/Gdata/Photos/Extension/PhotoId.php delete mode 100644 Zend/Gdata/Photos/Extension/Position.php delete mode 100644 Zend/Gdata/Photos/Extension/QuotaCurrent.php delete mode 100644 Zend/Gdata/Photos/Extension/QuotaLimit.php delete mode 100644 Zend/Gdata/Photos/Extension/Rotation.php delete mode 100644 Zend/Gdata/Photos/Extension/Size.php delete mode 100644 Zend/Gdata/Photos/Extension/Thumbnail.php delete mode 100644 Zend/Gdata/Photos/Extension/Timestamp.php delete mode 100644 Zend/Gdata/Photos/Extension/User.php delete mode 100644 Zend/Gdata/Photos/Extension/Version.php delete mode 100644 Zend/Gdata/Photos/Extension/Weight.php delete mode 100644 Zend/Gdata/Photos/Extension/Width.php delete mode 100644 Zend/Gdata/Photos/PhotoEntry.php delete mode 100644 Zend/Gdata/Photos/PhotoFeed.php delete mode 100644 Zend/Gdata/Photos/PhotoQuery.php delete mode 100644 Zend/Gdata/Photos/TagEntry.php delete mode 100644 Zend/Gdata/Photos/UserEntry.php delete mode 100644 Zend/Gdata/Photos/UserFeed.php delete mode 100644 Zend/Gdata/Photos/UserQuery.php delete mode 100644 Zend/Gdata/Query.php delete mode 100644 Zend/Gdata/Spreadsheets.php delete mode 100644 Zend/Gdata/Spreadsheets/CellEntry.php delete mode 100644 Zend/Gdata/Spreadsheets/CellFeed.php delete mode 100644 Zend/Gdata/Spreadsheets/CellQuery.php delete mode 100644 Zend/Gdata/Spreadsheets/DocumentQuery.php delete mode 100644 Zend/Gdata/Spreadsheets/Extension/Cell.php delete mode 100644 Zend/Gdata/Spreadsheets/Extension/ColCount.php delete mode 100644 Zend/Gdata/Spreadsheets/Extension/Custom.php delete mode 100644 Zend/Gdata/Spreadsheets/Extension/RowCount.php delete mode 100644 Zend/Gdata/Spreadsheets/ListEntry.php delete mode 100644 Zend/Gdata/Spreadsheets/ListFeed.php delete mode 100644 Zend/Gdata/Spreadsheets/ListQuery.php delete mode 100644 Zend/Gdata/Spreadsheets/SpreadsheetEntry.php delete mode 100644 Zend/Gdata/Spreadsheets/SpreadsheetFeed.php delete mode 100644 Zend/Gdata/Spreadsheets/WorksheetEntry.php delete mode 100644 Zend/Gdata/Spreadsheets/WorksheetFeed.php delete mode 100644 Zend/Gdata/YouTube.php delete mode 100644 Zend/Gdata/YouTube/ActivityEntry.php delete mode 100644 Zend/Gdata/YouTube/ActivityFeed.php delete mode 100644 Zend/Gdata/YouTube/CommentEntry.php delete mode 100644 Zend/Gdata/YouTube/CommentFeed.php delete mode 100644 Zend/Gdata/YouTube/ContactEntry.php delete mode 100644 Zend/Gdata/YouTube/ContactFeed.php delete mode 100644 Zend/Gdata/YouTube/Extension/AboutMe.php delete mode 100644 Zend/Gdata/YouTube/Extension/Age.php delete mode 100644 Zend/Gdata/YouTube/Extension/Books.php delete mode 100644 Zend/Gdata/YouTube/Extension/Company.php delete mode 100644 Zend/Gdata/YouTube/Extension/Control.php delete mode 100644 Zend/Gdata/YouTube/Extension/CountHint.php delete mode 100644 Zend/Gdata/YouTube/Extension/Description.php delete mode 100644 Zend/Gdata/YouTube/Extension/Duration.php delete mode 100644 Zend/Gdata/YouTube/Extension/FirstName.php delete mode 100644 Zend/Gdata/YouTube/Extension/Gender.php delete mode 100644 Zend/Gdata/YouTube/Extension/Hobbies.php delete mode 100644 Zend/Gdata/YouTube/Extension/Hometown.php delete mode 100644 Zend/Gdata/YouTube/Extension/LastName.php delete mode 100644 Zend/Gdata/YouTube/Extension/Link.php delete mode 100644 Zend/Gdata/YouTube/Extension/Location.php delete mode 100644 Zend/Gdata/YouTube/Extension/MediaContent.php delete mode 100644 Zend/Gdata/YouTube/Extension/MediaCredit.php delete mode 100644 Zend/Gdata/YouTube/Extension/MediaGroup.php delete mode 100644 Zend/Gdata/YouTube/Extension/MediaRating.php delete mode 100644 Zend/Gdata/YouTube/Extension/Movies.php delete mode 100644 Zend/Gdata/YouTube/Extension/Music.php delete mode 100644 Zend/Gdata/YouTube/Extension/NoEmbed.php delete mode 100644 Zend/Gdata/YouTube/Extension/Occupation.php delete mode 100644 Zend/Gdata/YouTube/Extension/PlaylistId.php delete mode 100644 Zend/Gdata/YouTube/Extension/PlaylistTitle.php delete mode 100644 Zend/Gdata/YouTube/Extension/Position.php delete mode 100644 Zend/Gdata/YouTube/Extension/Private.php delete mode 100644 Zend/Gdata/YouTube/Extension/QueryString.php delete mode 100644 Zend/Gdata/YouTube/Extension/Racy.php delete mode 100644 Zend/Gdata/YouTube/Extension/Recorded.php delete mode 100644 Zend/Gdata/YouTube/Extension/Relationship.php delete mode 100644 Zend/Gdata/YouTube/Extension/ReleaseDate.php delete mode 100644 Zend/Gdata/YouTube/Extension/School.php delete mode 100644 Zend/Gdata/YouTube/Extension/State.php delete mode 100644 Zend/Gdata/YouTube/Extension/Statistics.php delete mode 100644 Zend/Gdata/YouTube/Extension/Status.php delete mode 100644 Zend/Gdata/YouTube/Extension/Token.php delete mode 100644 Zend/Gdata/YouTube/Extension/Uploaded.php delete mode 100644 Zend/Gdata/YouTube/Extension/Username.php delete mode 100644 Zend/Gdata/YouTube/Extension/VideoId.php delete mode 100644 Zend/Gdata/YouTube/InboxEntry.php delete mode 100644 Zend/Gdata/YouTube/InboxFeed.php delete mode 100644 Zend/Gdata/YouTube/MediaEntry.php delete mode 100644 Zend/Gdata/YouTube/PlaylistListEntry.php delete mode 100644 Zend/Gdata/YouTube/PlaylistListFeed.php delete mode 100644 Zend/Gdata/YouTube/PlaylistVideoEntry.php delete mode 100644 Zend/Gdata/YouTube/PlaylistVideoFeed.php delete mode 100644 Zend/Gdata/YouTube/SubscriptionEntry.php delete mode 100644 Zend/Gdata/YouTube/SubscriptionFeed.php delete mode 100644 Zend/Gdata/YouTube/UserProfileEntry.php delete mode 100644 Zend/Gdata/YouTube/VideoEntry.php delete mode 100644 Zend/Gdata/YouTube/VideoFeed.php delete mode 100644 Zend/Gdata/YouTube/VideoQuery.php delete mode 100644 Zend/Http/Client.php delete mode 100644 Zend/Http/Client/Adapter/Curl.php delete mode 100644 Zend/Http/Client/Adapter/Exception.php delete mode 100644 Zend/Http/Client/Adapter/Interface.php delete mode 100644 Zend/Http/Client/Adapter/Proxy.php delete mode 100644 Zend/Http/Client/Adapter/Socket.php delete mode 100644 Zend/Http/Client/Adapter/Stream.php delete mode 100644 Zend/Http/Client/Adapter/Test.php delete mode 100644 Zend/Http/Client/Exception.php delete mode 100644 Zend/Http/Exception.php delete mode 100644 Zend/Http/Response.php delete mode 100644 Zend/Http/Response/Stream.php delete mode 100644 Zend/Loader.php delete mode 100644 Zend/Oauth.php delete mode 100644 Zend/Oauth/Client.php delete mode 100644 Zend/Oauth/Config.php delete mode 100644 Zend/Oauth/Config/ConfigInterface.php delete mode 100644 Zend/Oauth/Consumer.php delete mode 100644 Zend/Oauth/Exception.php delete mode 100644 Zend/Oauth/Http.php delete mode 100644 Zend/Oauth/Http/AccessToken.php delete mode 100644 Zend/Oauth/Http/RequestToken.php delete mode 100644 Zend/Oauth/Http/UserAuthorization.php delete mode 100644 Zend/Oauth/Http/Utility.php delete mode 100644 Zend/Oauth/Signature/Hmac.php delete mode 100644 Zend/Oauth/Signature/Plaintext.php delete mode 100644 Zend/Oauth/Signature/Rsa.php delete mode 100644 Zend/Oauth/Signature/SignatureAbstract.php delete mode 100644 Zend/Oauth/Token.php delete mode 100644 Zend/Oauth/Token/Access.php delete mode 100644 Zend/Oauth/Token/AuthorizedRequest.php delete mode 100644 Zend/Oauth/Token/Request.php delete mode 100644 Zend/Registry.php delete mode 100644 Zend/Uri.php delete mode 100644 Zend/Uri/Exception.php delete mode 100644 Zend/Uri/Http.php delete mode 100644 Zend/Validate/Abstract.php delete mode 100644 Zend/Validate/Hostname.php delete mode 100644 Zend/Validate/Hostname/Biz.php delete mode 100644 Zend/Validate/Hostname/Cn.php delete mode 100644 Zend/Validate/Hostname/Com.php delete mode 100644 Zend/Validate/Hostname/Jp.php delete mode 100644 Zend/Validate/Interface.php delete mode 100644 Zend/Validate/Ip.php delete mode 100644 Zend/Version.php create mode 100644 demoData.en_us.php create mode 100644 demoData.ja_jp.php create mode 100644 demoData.zh_cn.php delete mode 100644 include/Dashlets/DashletGenericAutoRefresh.tpl delete mode 100644 include/Dashlets/DashletGenericAutoRefreshDynamic.tpl rename include/{SugarCharts/Jit/tpls => Dashlets}/DashletGenericChartScript.tpl (83%) delete mode 100644 include/ListView/ListViewDCMenu.tpl delete mode 100644 include/MVC/View/tpls/xsrf.tpl delete mode 100644 include/SugarCache/SugarCache.php delete mode 100644 include/SugarCache/SugarCacheAbstract.php delete mode 100644 include/SugarCache/SugarCacheFile.php delete mode 100644 include/SugarCache/SugarCacheMemcache.php delete mode 100644 include/SugarCache/SugarCacheMemcached.php delete mode 100644 include/SugarCache/SugarCacheMemory.php delete mode 100644 include/SugarCache/SugarCacheRedis.php delete mode 100644 include/SugarCache/SugarCachesMash.php delete mode 100644 include/SugarCharts/Jit/FlashCanvas/canvas2png.js delete mode 100644 include/SugarCharts/Jit/FlashCanvas/flashcanvas.js delete mode 100644 include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf delete mode 100644 include/SugarCharts/Jit/FlashCanvas/proxy.php delete mode 100644 include/SugarCharts/Jit/FlashCanvas/save.php delete mode 100644 include/SugarCharts/Jit/Jit.php delete mode 100644 include/SugarCharts/Jit/JitReports.php delete mode 100644 include/SugarCharts/Jit/js/Jit/jit.js delete mode 100644 include/SugarCharts/Jit/js/mySugarCharts.js delete mode 100644 include/SugarCharts/Jit/js/sugarCharts.js delete mode 100644 include/SugarCharts/JsChart.php rename include/SugarCharts/{Jit => }/tpls/chart.tpl (57%) delete mode 100644 include/SugarDateTime.php delete mode 100644 include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl delete mode 100644 include/SugarFields/Fields/File/SearchView.tpl delete mode 100644 include/SugarFields/Fields/File/SugarFieldFile.js delete mode 100644 include/SugarFields/Fields/Id/SugarFieldId.php delete mode 100644 include/SugarFields/Fields/Int/RangeSearchForm.tpl delete mode 100644 include/SugarFields/Fields/Password/SugarFieldPassword.php rename include/SugarFields/Fields/{Assigned_user_name/EditViewFunction.tpl => Phone/DetailView.tpl} (88%) delete mode 100644 include/SugarFields/Fields/Phone/EditView.tpl rename include/SugarFields/Fields/{File => Phone}/ListView.tpl (79%) delete mode 100644 include/SugarFields/Fields/Phone/SugarFieldPhone.php delete mode 100644 include/SugarOauth.php rename modules/Charts/DynamicAction.php => include/SugarPDF.php (57%) create mode 100644 include/SugarTabs/SugarTab.php create mode 100644 include/SugarTabs/tpls/singletabmenu.tpl create mode 100644 include/VarDefHandler/SugarTabs/SugarTab.php create mode 100644 include/VarDefHandler/SugarTabs/tpls/singletabmenu.tpl create mode 100644 include/charts/Charts.php create mode 100644 include/charts/hBarF.swf create mode 100644 include/charts/hBarS.swf create mode 100644 include/charts/lineF.swf create mode 100644 include/charts/pieF.swf create mode 100644 include/charts/vBarF.swf delete mode 100644 include/externalAPI/Base/ExternalAPIBase.php delete mode 100644 include/externalAPI/Base/ExternalAPIPlugin.php delete mode 100644 include/externalAPI/Base/ExternalOAuthAPIPlugin.php delete mode 100644 include/externalAPI/Base/OAuthPluginBase.php delete mode 100644 include/externalAPI/Base/WebDocument.php delete mode 100644 include/externalAPI/Base/WebFeed.php delete mode 100644 include/externalAPI/Base/WebMeeting.php delete mode 100644 include/externalAPI/ExternalAPIFactory.php delete mode 100644 include/images/1.gif delete mode 100644 include/images/default_user_feed_picture.png delete mode 100644 include/images/seed_chris_id.gif delete mode 100644 include/images/seed_jim_id.gif delete mode 100644 include/images/seed_max_id.gif delete mode 100644 include/images/seed_sally_id.gif delete mode 100644 include/images/seed_sarah_id.gif delete mode 100644 include/images/seed_will_id.gif delete mode 100644 include/javascript/calendar.js delete mode 100644 include/javascript/iscroll.js create mode 100644 include/pdf/LICENSE create mode 100644 include/pdf/class.ezpdf.php create mode 100644 include/pdf/class.pdf.php create mode 100644 include/utils/external_cache/SugarCache.php rename modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php => include/utils/external_cache/SugarCache_APC.php (56%) create mode 100644 include/utils/external_cache/SugarCache_Base.php create mode 100644 include/utils/external_cache/SugarCache_ExternalAbstract.php create mode 100644 include/utils/external_cache/SugarCache_Memcache.php rename include/{SugarCache/SugarCacheAPC.php => utils/external_cache/SugarCache_Wincache.php} (55%) rename modules/Administration/views/view.globalsearchsettings.php => include/utils/external_cache/SugarCache_Zend.php (60%) rename include/{SugarCache/SugarCacheZend.php => utils/external_cache/SugarCache_ZendServer.php} (61%) rename include/{SugarCache/SugarCacheWincache.php => utils/external_cache/SugarCache_sMash.php} (56%) delete mode 100644 include/utils/php_zip_utils.php rename include/SugarCharts/SugarChartFactory.php => install/seed_data/basicSeedData.php (51%) rename modules/Meetings/action_view_map.php => install/seed_data/index.html (97%) create mode 100644 jscalendar/calendar-setup_3.js create mode 100644 jscalendar/calendar-win2k-cold-1.css create mode 100644 jscalendar/calendar.js create mode 100644 jscalendar/img.gif create mode 100644 jscalendar/lang/calendar-af.js create mode 100644 jscalendar/lang/calendar-bg.js create mode 100644 jscalendar/lang/calendar-br.js create mode 100644 jscalendar/lang/calendar-ca.js create mode 100644 jscalendar/lang/calendar-cs-win.js create mode 100644 jscalendar/lang/calendar-da.js create mode 100644 jscalendar/lang/calendar-de.js create mode 100644 jscalendar/lang/calendar-du.js create mode 100644 jscalendar/lang/calendar-el.js create mode 100644 jscalendar/lang/calendar-en.js create mode 100644 jscalendar/lang/calendar-es.js create mode 100644 jscalendar/lang/calendar-fi.js create mode 100644 jscalendar/lang/calendar-fr.js create mode 100644 jscalendar/lang/calendar-hr-utf8.js create mode 100644 jscalendar/lang/calendar-hr.js create mode 100644 jscalendar/lang/calendar-hu.js create mode 100644 jscalendar/lang/calendar-it.js create mode 100644 jscalendar/lang/calendar-ja.js create mode 100644 jscalendar/lang/calendar-jp.js create mode 100644 jscalendar/lang/calendar-ko-utf8.js create mode 100644 jscalendar/lang/calendar-ko.js create mode 100644 jscalendar/lang/calendar-lt-utf8.js create mode 100644 jscalendar/lang/calendar-lt.js create mode 100644 jscalendar/lang/calendar-nl.js create mode 100644 jscalendar/lang/calendar-no.js create mode 100644 jscalendar/lang/calendar-pl-utf8.js create mode 100644 jscalendar/lang/calendar-pl.js create mode 100644 jscalendar/lang/calendar-pt.js create mode 100644 jscalendar/lang/calendar-ro.js create mode 100644 jscalendar/lang/calendar-ru.js create mode 100644 jscalendar/lang/calendar-si.js create mode 100644 jscalendar/lang/calendar-sk.js create mode 100644 jscalendar/lang/calendar-sp.js create mode 100644 jscalendar/lang/calendar-sv.js create mode 100644 jscalendar/lang/calendar-tr.js create mode 100644 jscalendar/lang/calendar-zh.js create mode 100644 jscalendar/license.txt create mode 100644 jscalendar/menuarrow.gif create mode 100644 jscalendar/menuarrow2.gif delete mode 100644 jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js delete mode 100644 jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js delete mode 100644 jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js delete mode 100644 jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js delete mode 100644 jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js delete mode 100644 jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js delete mode 100644 jssource/src_files/include/javascript/calendar.js delete mode 100644 jssource/src_files/include/javascript/iscroll.js create mode 100644 jssource/src_files/jscalendar/calendar-setup_3.js create mode 100644 jssource/src_files/jscalendar/calendar.js delete mode 100644 jssource/src_files/modules/EAPM/EAPMEdit.js delete mode 100644 metadata/documents_accountsMetaData.php delete mode 100644 metadata/documents_bugsMetaData.php delete mode 100644 metadata/documents_casesMetaData.php delete mode 100644 metadata/documents_contactsMetaData.php delete mode 100644 metadata/documents_opportunitiesMetaData.php delete mode 100644 modules/Accounts/views/view.list.php create mode 100644 modules/Administration/Backups.php create mode 100644 modules/Administration/ConfigureShortcutBar.php rename modules/Administration/{Diagnostic.tpl => Diagnostic.html} (75%) delete mode 100644 modules/Administration/templates/GlobalSearchSettings.tpl delete mode 100644 modules/Administration/templates/Languages.tpl delete mode 100644 modules/Administration/views/view.backups.php rename include/generic/SugarWidgets/SugarWidgetFieldfile.php => modules/Calendar/DateTime.php (84%) delete mode 100644 modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl rename modules/Campaigns/{RoiDetailView.tpl => RoiDetailView.html} (51%) rename modules/Campaigns/{TrackDetailView.tpl => TrackDetailView.html} (61%) rename modules/Charts/Dashlets/{OppByLeadOutcomeDashlet/OppByLeadOutcomeConfigure.tpl => OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeConfigure.tpl} (100%) rename modules/Charts/Dashlets/{OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.data.php => OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php} (96%) rename modules/Charts/Dashlets/{OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.en_us.lang.php => OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.en_us.lang.php} (94%) rename modules/Charts/Dashlets/{OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.meta.php => OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.meta.php} (96%) rename modules/Charts/Dashlets/{OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.php => OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php} (91%) rename modules/Charts/Dashlets/{OppByLeadSourceDashlet/OppByLeadSourceConfigure.tpl => OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceConfigure.tpl} (100%) rename modules/Charts/Dashlets/{OppByLeadSourceDashlet/OppByLeadSourceDashlet.data.php => OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.data.php} (97%) rename modules/Charts/Dashlets/{OppByLeadSourceDashlet/OppByLeadSourceDashlet.en_us.lang.php => OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.en_us.lang.php} (94%) rename modules/Charts/Dashlets/{OppByLeadSourceDashlet/OppByLeadSourceDashlet.meta.php => OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.meta.php} (96%) rename modules/Charts/Dashlets/{OppByLeadSourceDashlet/OppByLeadSourceDashlet.php => OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php} (91%) create mode 100644 modules/Configurator/SugarpdfSettings.php delete mode 100644 modules/Configurator/views/view.sugarpdfsettings.php create mode 100644 modules/Contacts/contactSeedData.php create mode 100644 modules/Contacts/contactSeedData_jp.php delete mode 100644 modules/Contacts/views/view.list.php create mode 100644 modules/DocumentRevisions/DetailView.html create mode 100644 modules/DocumentRevisions/DetailView.php create mode 100644 modules/DocumentRevisions/EditView.html create mode 100644 modules/DocumentRevisions/EditView.php rename modules/{Administration/views/view.languages.php => DocumentRevisions/Save.php} (55%) delete mode 100644 modules/DocumentRevisions/metadata/detailviewdefs.php delete mode 100644 modules/DocumentRevisions/metadata/editviewdefs.php delete mode 100644 modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php delete mode 100644 modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php delete mode 100644 modules/Documents/DocumentExternalApiDropDown.php delete mode 100644 modules/Documents/action_view_map.php rename modules/{EAPM/metadata/subpanels/default.php => Documents/subpanels/ForContractType.php} (67%) rename modules/{Notes/metadata/subpanels/ForMeetings.php => Documents/subpanels/default.php} (55%) delete mode 100644 modules/Documents/tpls/view.extdoc.tpl delete mode 100644 modules/Documents/views/view.extdoc.php delete mode 100644 modules/DynamicFields/templates/Fields/Forms/phone.php delete mode 100644 modules/DynamicFields/templates/Fields/Forms/phone.tpl delete mode 100644 modules/DynamicFields/templates/Fields/TemplateRange.php delete mode 100644 modules/EAPM/CheckLogins.php delete mode 100644 modules/EAPM/EAPM.php delete mode 100644 modules/EAPM/EAPMEdit.js delete mode 100644 modules/EAPM/action_view_map.php delete mode 100644 modules/EAPM/controller.php delete mode 100644 modules/EAPM/language/en_us.lang.php delete mode 100644 modules/EAPM/metadata/SearchFields.php delete mode 100644 modules/EAPM/metadata/detailviewdefs.php delete mode 100644 modules/EAPM/metadata/editviewdefs.php delete mode 100644 modules/EAPM/metadata/listviewdefs.php delete mode 100644 modules/EAPM/metadata/metafiles.php delete mode 100644 modules/EAPM/metadata/popupdefs.php delete mode 100644 modules/EAPM/metadata/quickcreatedefs.php delete mode 100644 modules/EAPM/metadata/searchdefs.php delete mode 100644 modules/EAPM/tpls/DetailViewFooter.tpl delete mode 100644 modules/EAPM/tpls/EditViewFooter.tpl delete mode 100644 modules/EAPM/tpls/EditViewHeader.tpl delete mode 100644 modules/EAPM/vardefs.php delete mode 100644 modules/EAPM/views/view.detail.php delete mode 100644 modules/EAPM/views/view.edit.php delete mode 100644 modules/Emails/metadata/qcmodulesdefs.php rename include/SugarCharts/Jit/css/base.css => modules/Employees/EmployeeStatus.php (54%) rename modules/Home/{views/view.additionaldetailsretrieve.php => AdditionalDetailsRetrieve.php} (52%) delete mode 100644 modules/Home/action_view_map.php create mode 100644 modules/InboundEmail/parseEncoding.php delete mode 100644 modules/Leads/views/view.list.php delete mode 100644 modules/Meetings/JoinExternalMeeting.php delete mode 100644 modules/Meetings/tpls/extMeetingNoStart.tpl delete mode 100644 modules/Meetings/tpls/extMeetingNotInvited.tpl delete mode 100644 modules/Meetings/views/view.listbytype.php delete mode 100644 modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php delete mode 100644 modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.meta.php delete mode 100644 modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.php delete mode 100644 modules/Notes/metadata/subpanels/ForCalls.php delete mode 100644 modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl delete mode 100644 modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletOptions.tpl delete mode 100644 modules/Prospects/views/view.list.php rename modules/SugarFeed/{tpls => }/AdminSettings.tpl (98%) delete mode 100644 modules/SugarFeed/action_view_map.php delete mode 100644 modules/SugarFeed/views/view.adminsettings.php delete mode 100644 service/v3_1/SugarWebServiceImplv3_1.php delete mode 100644 service/v3_1/SugarWebServiceUtilv3_1.php delete mode 100644 service/v3_1/registry.php delete mode 100644 service/v3_1/rest.php delete mode 100644 service/v3_1/soap.php delete mode 100644 service/v4/SugarWebServiceImplv4.php delete mode 100644 service/v4/SugarWebServiceUtilv4.php delete mode 100644 service/v4/registry.php delete mode 100644 service/v4/rest.php delete mode 100644 service/v4/soap.php delete mode 100644 themes/default/images/backtotop.gif delete mode 100644 themes/default/images/chartBg.png delete mode 100644 themes/default/images/create-record.gif delete mode 100644 themes/default/images/join_imeeting.gif delete mode 100644 themes/default/images/join_meeting_inline.png delete mode 100644 themes/default/images/start_meeting_inline.png diff --git a/ModuleInstall/ModuleInstaller.php b/ModuleInstall/ModuleInstaller.php index 45901b44..c3965507 100644 --- a/ModuleInstall/ModuleInstaller.php +++ b/ModuleInstall/ModuleInstaller.php @@ -224,13 +224,10 @@ class ModuleInstaller{ $rac = new RepairAndClear(); $rac->repairAndClearAll($selectedActions, $installed_modules,true, false); $this->rebuild_relationships(); - UpdateSystemTabs('Add',$tab_modules); - - //clear the unified_search_module.php file - require_once('modules/Home/UnifiedSearchAdvanced.php'); - UnifiedSearchAdvanced::unlinkUnifiedSearchModulesFile(); - $this->log('
' . translate('LBL_MI_COMPLETE') . ''); + + UpdateSystemTabs('Add',$tab_modules); + }else{ die("No \$installdefs Defined In $this->base_dir/manifest.php"); } @@ -340,9 +337,7 @@ class ModuleInstaller{ //if it's not a sugar file then we remove it otherwise we can't restor it if(!$this->ms->sugarFileExists($to)){ $GLOBALS['log']->debug('ModuleInstaller[uninstall_new_file] deleting file ' . $to); - if(file_exists($to)) { - unlink($to); - } + unlink($to); }else{ $GLOBALS['log']->fatal('ModuleInstaller[uninstall_new_file] Could not remove file ' . $to . ' as no backup file was found to restore to'); } @@ -1266,10 +1261,6 @@ class ModuleInstaller{ UpdateSystemTabs('Restore',$installed_modules); - //clear the unified_search_module.php file - require_once('modules/Home/UnifiedSearchAdvanced.php'); - UnifiedSearchAdvanced::unlinkUnifiedSearchModulesFile(); - $this->log('
' . translate('LBL_MI_COMPLETE') . ''); if(!$this->silent){ update_progress_bar('install', $total_steps, $total_steps); @@ -1298,7 +1289,6 @@ class ModuleInstaller{ $this->merge_files('Ext/Vardefs/', 'vardefs.ext.php'); sugar_cache_reset(); } - function rebuild_layoutdefs(){ $this->log(translate('LBL_MI_REBUILDING') . " Layoutdefs..."); $this->merge_files('Ext/Layoutdefs/', 'layoutdefs.ext.php'); @@ -1312,12 +1302,12 @@ class ModuleInstaller{ function rebuild_dashletcontainers(){ $this->log(translate('LBL_MI_REBUILDING') . " DC Actions..."); - $this->merge_files('Ext/DashletContainer/Containers/', 'dcactions.ext.php'); + $this->merge_files('Ext/DashletContainer/Containers', 'dcactions.ext.php'); } function rebuild_modules(){ $this->log(translate('LBL_MI_REBUILDING') . " Modules..."); - $this->merge_files('Ext/Include/', 'modules.ext.php', '', true); + $this->merge_files('Ext/Include', 'modules.ext.php', '', true); } function rebuild_administration(){ @@ -1410,14 +1400,18 @@ class ModuleInstaller{ if (substr($entry, 0, 9) == '_override') { $override[] = $entry; } else { - $file = file_get_contents($module_install . '/' . $entry); + $fp = sugar_fopen($module_install . '/' . $entry, 'r'); + $file = fread($fp , filesize($module_install . '/' . $entry)); $GLOBALS['log']->debug(get_class($this)."->merge_files(): found {$module_install}{$entry}") ; + fclose($fp); $extension .= "\n". str_replace(array('', '', ' 0) && is_file($module_install.'/'.$entry) && $entry != '.' && $entry != '..' && strtolower(substr($entry, -4)) == ".php") { - $file = file_get_contents($module_install . '/' . $entry); + $fp = sugar_fopen($module_install . '/' . $entry, 'r'); + $file = fread($fp , filesize($module_install . '/' . $entry)); + fclose($fp); $extension .= "\n". str_replace(array('', 'read()){ @@ -1997,7 +1992,7 @@ private function dir_file_count($path){ $path ='custom/Extension/' . $relationship['module']. '/Ext/Layoutdefs'; } } - + if(!empty($relationship['module_layoutdefs']) && file_exists($path . '/'. $this->id_name . '.php')){ mkdir_recursive($path . '/'.DISABLED_PATH, true); rename( $path . '/'. $this->id_name . '.php', $path . '/'.DISABLED_PATH.'/'. $this->id_name . '.php'); diff --git a/ModuleInstall/PackageManager/PackageManager.php b/ModuleInstall/PackageManager/PackageManager.php index 49a174a7..a8aaaf17 100644 --- a/ModuleInstall/PackageManager/PackageManager.php +++ b/ModuleInstall/PackageManager/PackageManager.php @@ -233,7 +233,7 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); } function setCredentials($username, $password, $systemname){ - + $admin = new Administration(); $admin->retrieveSettings(); $admin->saveSetting(CREDENTIAL_CATEGORY, CREDENTIAL_USERNAME, $username); @@ -244,7 +244,7 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); } function getCredentials(){ - + $admin = new Administration(); $admin->retrieveSettings(CREDENTIAL_CATEGORY, true); $credentials = array(); @@ -619,7 +619,7 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); } function getImageForType( $type ){ - + $icon = ""; switch( $type ){ case "full": @@ -664,7 +664,7 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); $alreadyProcessed["$val"] = true; } } - + $upgrades_available = 0; $packages = array(); $mod_strings = return_module_language($current_language, "Administration"); @@ -703,7 +703,7 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); //check dependencies first if(!empty($dependencies)){ - + $uh = new UpgradeHistory(); $not_found = $uh->checkDependencies($dependencies); if(!empty($not_found) && count($not_found) > 0){ @@ -736,7 +736,7 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); $c = count($fileS); $fileName = (isset($fileS[$c-1]) && !empty($fileS[$c-1])) ? $fileS[$c-1] : $fileS[$c-2]; $upload_file = $sugar_config['upload_dir'].$fileName; - + $upgrade_content = urlencode($upgrade_content); $upload_content = urlencode($upload_file); $packages[] = array('name' => $name, 'version' => $version, 'published_date' => $published_date, 'description' => $description, 'uninstallable' =>$uninstallable, 'type' => $type, 'file_install' => fileToHash($file_install), 'file' => fileToHash($upgrade_content), 'upload_file' => $upload_content); @@ -751,7 +751,9 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); $base_tmp_upgrade_dir = "$base_upgrade_dir/temp"; $license_file = $this->extractFile($file, 'LICENSE.txt', $base_tmp_upgrade_dir); if(is_file($license_file)){ - $contents = file_get_contents($license_file); + $fh = sugar_fopen($license_file, 'r'); + $contents = fread($fh, filesize($license_file)); + fclose($fh); return $contents; }else{ return null; @@ -854,15 +856,15 @@ require_once('ModuleInstall/PackageManager/PackageManagerComm.php'); } else { $file_uninstall = fileToHash( $file_uninstall ); } - + $packages[] = array( - 'name' => $name, - 'version' => $version, - 'type' => $type, - 'published_date' => $date_entered, - 'description' => $description, - 'uninstallable' =>$uninstallable, - 'file_install' => $file_uninstall , + 'name' => $name, + 'version' => $version, + 'type' => $type, + 'published_date' => $date_entered, + 'description' => $description, + 'uninstallable' =>$uninstallable, + 'file_install' => $file_uninstall , 'file' => fileToHash($filename), 'enabled' => $enabled_string ); diff --git a/ModuleInstall/PackageManager/PackageManagerDisplay.php b/ModuleInstall/PackageManager/PackageManagerDisplay.php index 096d38ae..2969f86c 100644 --- a/ModuleInstall/PackageManager/PackageManagerDisplay.php +++ b/ModuleInstall/PackageManager/PackageManagerDisplay.php @@ -324,7 +324,9 @@ class PackageManagerDisplay{ function getLicenseDisplay($license_file, $form_action, $next_step, $zipFile, $type, $manifest, $modify_field){ global $current_language; $mod_strings = return_module_language($current_language, "Administration"); - $contents = sugar_file_get_contents($license_file); + $fh = sugar_fopen($license_file, 'r'); + $contents = fread($fh, filesize($license_file)); + fclose($fh); $div_id = urlencode($zipFile); $display = "
"; $display .= ""; diff --git a/ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl b/ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl index 907450bf..90738a7f 100644 --- a/ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl +++ b/ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl @@ -35,8 +35,8 @@ ********************************************************************************/ *} - {literal} + "; - $_SESSION['o_lock_save'] = $saveform; - header('Location: index.php?module=OptimisticLock&action=LockResolve'); - die(); - } - else - { - unset ($_SESSION['o_lock_object']); - unset ($_SESSION['o_lock_id']); - unset ($_SESSION['o_lock_dm']); - } - } - } - else - { - if(isset($_SESSION['o_lock_object'])) { unset ($_SESSION['o_lock_object']); } - if(isset($_SESSION['o_lock_id'])) { unset ($_SESSION['o_lock_id']); } - if(isset($_SESSION['o_lock_dm'])) { unset ($_SESSION['o_lock_dm']); } - if(isset($_SESSION['o_lock_fs'])) { unset ($_SESSION['o_lock_fs']); } - if(isset($_SESSION['o_lock_save'])) { unset ($_SESSION['o_lock_save']); } - } - } + /** + * Moved from save() method, functionality is the same, but this is intended to handle + * Optimistic locking functionality. + */ + private function _checkOptimisticLocking($action, $isUpdate){ + if($this->optimistic_lock && !isset($_SESSION['o_lock_fs'])){ + if(isset($_SESSION['o_lock_id']) && $_SESSION['o_lock_id'] == $this->id && $_SESSION['o_lock_on'] == $this->object_name) + { + if($action == 'Save' && $isUpdate && isset($this->modified_user_id) && $this->has_been_modified_since($_SESSION['o_lock_dm'], $this->modified_user_id)) + { + $_SESSION['o_lock_class'] = get_class($this); + $_SESSION['o_lock_module'] = $this->module_dir; + $_SESSION['o_lock_object'] = $this->toArray(); + $saveform = ""; + foreach($_POST as $key=>$arg) + { + $saveform .= ""; + } + $saveform .= "
"; + $_SESSION['o_lock_save'] = $saveform; + header('Location: index.php?module=OptimisticLock&action=LockResolve'); + die(); + } + else + { + unset ($_SESSION['o_lock_object']); + unset ($_SESSION['o_lock_id']); + unset ($_SESSION['o_lock_dm']); + } + } + } + else + { + if(isset($_SESSION['o_lock_object'])) { unset ($_SESSION['o_lock_object']); } + if(isset($_SESSION['o_lock_id'])) { unset ($_SESSION['o_lock_id']); } + if(isset($_SESSION['o_lock_dm'])) { unset ($_SESSION['o_lock_dm']); } + if(isset($_SESSION['o_lock_fs'])) { unset ($_SESSION['o_lock_fs']); } + if(isset($_SESSION['o_lock_save'])) { unset ($_SESSION['o_lock_save']); } + } + } - /** - * Send assignment notifications and invites for meetings and calls - */ - private function _sendNotifications($check_notify){ - if($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true)){ // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true. + /** + * Send assignment notifications and invites for meetings and calls + */ + private function _sendNotifications($check_notify){ + if($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true)){ // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true. - $admin = new Administration(); - $admin->retrieveSettings(); - $sendNotifications = false; + $admin = new Administration(); + $admin->retrieveSettings(); + $sendNotifications = false; - if ($admin->settings['notify_on']) - { - $GLOBALS['log']->info("Notifications: user assignment has changed, checking if user receives notifications"); - $sendNotifications = true; - } - elseif(isset($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == 1) - { - // cn: bug 5795 Send Invites failing for Contacts - $sendNotifications = true; - } - else - { - $GLOBALS['log']->info("Notifications: not sending e-mail, notify_on is set to OFF"); - } + if ($admin->settings['notify_on']) + { + $GLOBALS['log']->info("Notifications: user assignment has changed, checking if user receives notifications"); + $sendNotifications = true; + } + elseif(isset($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == 1) + { + // cn: bug 5795 Send Invites failing for Contacts + $sendNotifications = true; + } + else + { + $GLOBALS['log']->info("Notifications: not sending e-mail, notify_on is set to OFF"); + } - if($sendNotifications == true) - { - $notify_list = $this->get_notification_recipients(); - foreach ($notify_list as $notify_user) - { - $this->send_assignment_notifications($notify_user, $admin); - } - } - } - } + if($sendNotifications == true) + { + $notify_list = $this->get_notification_recipients(); + foreach ($notify_list as $notify_user) + { + $this->send_assignment_notifications($notify_user, $admin); + } + } + } + } /** @@ -5392,12 +5341,12 @@ function save_relationship_changes($is_update, $exclude=array()) * @param $module string the name of the module * @param $key string the type of field array we are referencing, i.e. list_fields, column_fields, required_fields **/ - private function _loadCachedArray( - $module_dir, - $module, - $key - ) - { + private function _loadCachedArray( + $module_dir, + $module, + $key + ) + { static $moduleDefs = array(); $fileName = 'field_arrays.php'; @@ -5406,13 +5355,13 @@ function save_relationship_changes($is_update, $exclude=array()) $result = sugar_cache_retrieve($cache_key); if(!empty($result)) { - // Use SugarCache::EXTERNAL_CACHE_NULL_VALUE to store null values in the cache. - if($result == SugarCache::EXTERNAL_CACHE_NULL_VALUE) + // Use EXTERNAL_CACHE_NULL_VALUE to store null values in the cache. + if($result == EXTERNAL_CACHE_NULL_VALUE) { return null; } - return $result; + return $result; } if(file_exists('modules/'.$module_dir.'/'.$fileName)) @@ -5420,14 +5369,14 @@ function save_relationship_changes($is_update, $exclude=array()) // If the data was not loaded, try loading again.... if(!isset($moduleDefs[$module])) { - include('modules/'.$module_dir.'/'.$fileName); + include('modules/'.$module_dir.'/'.$fileName); $moduleDefs[$module] = $fields_array; - } - // Now that we have tried loading, make sure it was loaded + } + // Now that we have tried loading, make sure it was loaded if(empty($moduleDefs[$module]) || empty($moduleDefs[$module][$module][$key])) { // It was not loaded.... Fail. Cache null to prevent future repeats of this calculation - sugar_cache_put($cache_key, SugarCache::EXTERNAL_CACHE_NULL_VALUE); + sugar_cache_put($cache_key, EXTERNAL_CACHE_NULL_VALUE); return null; } @@ -5437,31 +5386,7 @@ function save_relationship_changes($is_update, $exclude=array()) } // It was not loaded.... Fail. Cache null to prevent future repeats of this calculation - sugar_cache_put($cache_key, SugarCache::EXTERNAL_CACHE_NULL_VALUE); + sugar_cache_put($cache_key, EXTERNAL_CACHE_NULL_VALUE); return null; } - - /** - * Returns the ACL category for this module; defaults to the SugarBean::$acl_category if defined - * otherwise it is SugarBean::$module_dir - * - * @return string - */ - public function getACLCategory() - { - return !empty($this->acl_category)?$this->acl_category:$this->module_dir; - } - - /** - * Returns the query used for the export functionality for a module. Override this method if you wish - * to have a custom query to pull this data together instead - * - * @param string $order_by - * @param string $where - * @return string SQL query - */ - public function create_export_query($order_by, $where) - { - return $this->create_new_list_query($order_by, $where, array(), array(), 0, '', false, $this, true); - } } diff --git a/demoData.en_us.php b/demoData.en_us.php new file mode 100644 index 00000000..15c875b2 --- /dev/null +++ b/demoData.en_us.php @@ -0,0 +1,21668 @@ + 'seed_jim_id', + 'last_name' => 'Brennan', + 'first_name' => 'Jim', + 'user_name' => 'jim', + 'title' => 'VP Sales', + 'is_admin' => false, + 'reports_to' => null, + 'reports_to_name' => null, + 'email' => 'jim@example.com' +); + +//west team +$sugar_demodata['users'][] = array( + 'id' => 'seed_sarah_id', + 'last_name' => 'Smith', + 'first_name' => 'Sarah', + 'user_name' => 'sarah', + 'title' => 'Sales Manager West', + 'is_admin' => false, + 'reports_to' => 'seed_jim_id', + 'reports_to_name' => 'Brennan, Jim', + 'email' => 'sarah@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_sally_id', + 'last_name' => 'Bronsen', + 'first_name' => 'Sally', + 'user_name' => 'sally', + 'title' => 'Senior Account Rep', + 'is_admin' => false, + 'reports_to' => 'seed_sarah_id', + 'reports_to_name' => 'Smith, Sarah', + 'email' => 'sally@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_max_id', + 'last_name' => 'Jensen', + 'first_name' => 'Max', + 'user_name' => 'max', + 'title' => 'Account Rep', + 'is_admin' => false, + 'reports_to' => 'seed_sarah_id', + 'reports_to_name' => 'Smith, Sarah', + 'email' => 'tom@example.com' +); + +//east team +$sugar_demodata['users'][] = array( + 'id' => 'seed_will_id', + 'last_name' => 'Westin', + 'first_name' => 'Will', + 'user_name' => 'will', + 'title' => 'Sales Manager East', + 'is_admin' => false, + 'reports_to' => 'seed_jim_id', + 'reports_to_name' => 'Brennan, Jim', + 'email' => 'will@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_chris_id', + 'last_name' => 'Olliver', + 'first_name' => 'Chris', + 'user_name' => 'chris', + 'title' => 'Senior Account Rep', + 'is_admin' => false, + 'reports_to' => 'seed_will_id', + 'reports_to_name' => 'Westin, Will', + 'email' => 'chris@example.com' +); + +//teams demodata +$sugar_demodata['teams'][] = array( + 'name' => 'East', + 'description' => 'This is the team for the East', + 'team_id' => 'East', +); + +$sugar_demodata['teams'][] = array( + 'name' => 'West', + 'description' => 'This is the team for the West', + 'team_id' => 'West', +); + +//contacts accounts +$sugar_demodata['last_name_array'] = array( + "Smith", + "Johnson", + "Williams", + "Jones", + "Brown", + "Davis", + "Miller", + "Wilson", + "Moore", + "Taylor", + "Anderson", + "Thomas", + "Jackson", + "White", + "Harris", + "Martin", + "Thompson", + "Garcia", + "Martinez", + "Robinson", + "Clark", + "Rodriguez", + "Lewis", + "Lee", + "Walker", + "Hall", + "Allen", + "Young", + "Hernandez", + "King", + "Wright", + "Lopez", + "Hill", + "Scott", + "Green", + "Adams", + "Baker", + "Gonzalez", + "Nelson", + "Carter", + "Mitchell", + "Perez", + "Roberts", + "Turner", + "Phillips", + "Campbell", + "Parker", + "Evans", + "Edwards", + "Collins", + "Stewart", + "Sanchez", + "Morris", + "Rogers", + "Reed", + "Cook", + "Morgan", + "Bell", + "Murphy", + "Bailey", + "Rivera", + "Cooper", + "Richardson", + "Cox", + "Howard", + "Ward", + "Torres", + "Peterson", + "Gray", + "Ramirez", + "James", + "Watson", + "Brooks", + "Kelly", + "Sanders", + "Price", + "Bennett", + "Wood", + "Barnes", + "Ross", + "Henderson", + "Coleman", + "Jenkins", + "Perry", + "Powell", + "Long", + "Patterson", + "Hughes", + "Flores", + "Washington", + "Butler", + "Simmons", + "Foster", + "Gonzales", + "Bryant", + "Alexander", + "Russell", + "Griffin", + "Diaz", + "Hayes", + "Myers", + "Ford", + "Hamilton", + "Graham", + "Sullivan", + "Wallace", + "Woods", + "Cole", + "West", + "Jordan", + "Owens", + "Reynolds", + "Fisher", + "Ellis", + "Harrison", + "Gibson", + "Mcdonald", + "Cruz", + "Marshall", + "Ortiz", + "Gomez", + "Murray", + "Freeman", + "Wells", + "Webb", + "Simpson", + "Stevens", + "Tucker", + "Porter", + "Hunter", + "Hicks", + "Crawford", + "Henry", + "Boyd", + "Mason", + "Morales", + "Kennedy", + "Warren", + "Dixon", + "Ramos", + "Reyes", + "Burns", + "Gordon", + "Shaw", + "Holmes", + "Rice", + "Robertson", + "Hunt", + "Black", + "Daniels", + "Palmer", + "Mills", + "Nichols", + "Grant", + "Knight", + "Ferguson", + "Rose", + "Stone", + "Hawkins", + "Dunn", + "Perkins", + "Hudson", + "Spencer", + "Gardner", + "Stephens", + "Payne", + "Pierce", + "Berry", + "Matthews", + "Arnold", + "Wagner", + "Willis", + "Ray", + "Watkins", + "Olson", + "Carroll", + "Duncan", + "Snyder", + "Hart", + "Cunningham", + "Bradley", + "Lane", + "Andrews", + "Ruiz", + "Harper", + "Fox", + "Riley", + "Armstrong", + "Carpenter", + "Weaver", + "Greene", + "Lawrence", + "Elliott", + "Chavez", + "Sims", + "Austin", + "Peters", + "Kelley", + "Franklin", + "Lawson", + "Fields", + "Gutierrez", + "Ryan", + "Schmidt", + "Carr", + "Vasquez", + "Castillo", + "Wheeler", + "Chapman", + "Oliver", + "Montgomery", + "Richards", + "Williamson", + "Johnston", + "Banks", + "Meyer", + "Bishop", + "Mccoy", + "Howell", + "Alvarez", + "Morrison", + "Hansen", + "Fernandez", + "Garza", + "Harvey", + "Little", + "Burton", + "Stanley", + "Nguyen", + "George", + "Jacobs", + "Reid", + "Kim", + "Fuller", + "Lynch", + "Dean", + "Gilbert", + "Garrett", + "Romero", + "Welch", + "Larson", + "Frazier", + "Burke", + "Hanson", + "Day", + "Mendoza", + "Moreno", + "Bowman", + "Medina", + "Fowler", + "Brewer", + "Hoffman", + "Carlson", + "Silva", + "Pearson", + "Holland", + "Douglas", + "Fleming", + "Jensen", + "Vargas", + "Byrd", + "Davidson", + "Hopkins", + "May", + "Terry", + "Herrera", + "Wade", + "Soto", + "Walters", + "Curtis", + "Neal", + "Caldwell", + "Lowe", + "Jennings", + "Barnett", + "Graves", + "Jimenez", + "Horton", + "Shelton", + "Barrett", + "Obrien", + "Castro", + "Sutton", + "Gregory", + "Mckinney", + "Lucas", + "Miles", + "Craig", + "Rodriquez", + "Chambers", + "Holt", + "Lambert", + "Fletcher", + "Watts", + "Bates", + "Hale", + "Rhodes", + "Pena", + "Beck", + "Newman", + "Haynes", + "Mcdaniel", + "Mendez", + "Bush", + "Vaughn", + "Parks", + "Dawson", + "Santiago", + "Norris", + "Hardy", + "Love", + "Steele", + "Curry", + "Powers", + "Schultz", + "Barker", + "Guzman", + "Page", + "Munoz", + "Ball", + "Keller", + "Chandler", + "Weber", + "Leonard", + "Walsh", + "Lyons", + "Ramsey", + "Wolfe", + "Schneider", + "Mullins", + "Benson", + "Sharp", + "Bowen", + "Daniel", + "Barber", + "Cummings", + "Hines", + "Baldwin", + "Griffith", + "Valdez", + "Hubbard", + "Salazar", + "Reeves", + "Warner", + "Stevenson", + "Burgess", + "Santos", + "Tate", + "Cross", + "Garner", + "Mann", + "Mack", + "Moss", + "Thornton", + "Dennis", + "Mcgee", + "Farmer", + "Delgado", + "Aguilar", + "Vega", + "Glover", + "Manning", + "Cohen", + "Harmon", + "Rodgers", + "Robbins", + "Newton", + "Todd", + "Blair", + "Higgins", + "Ingram", + "Reese", + "Cannon", + "Strickland", + "Townsend", + "Potter", + "Goodwin", + "Walton", + "Rowe", + "Hampton", + "Ortega", + "Patton", + "Swanson", + "Joseph", + "Francis", + "Goodman", + "Maldonado", + "Yates", + "Becker", + "Erickson", + "Hodges", + "Rios", + "Conner", + "Adkins", + "Webster", + "Norman", + "Malone", + "Hammond", + "Flowers", + "Cobb", + "Moody", + "Quinn", + "Blake", + "Maxwell", + "Pope", + "Floyd", + "Osborne", + "Paul", + "Mccarthy", + "Guerrero", + "Lindsey", + "Estrada", + "Sandoval", + "Gibbs", + "Tyler", + "Gross", + "Fitzgerald", + "Stokes", + "Doyle", + "Sherman", + "Saunders", + "Wise", + "Colon", + "Gill", + "Alvarado", + "Greer", + "Padilla", + "Simon", + "Waters", + "Nunez", + "Ballard", + "Schwartz", + "Mcbride", + "Houston", + "Christensen", + "Klein", + "Pratt", + "Briggs", + "Parsons", + "Mclaughlin", + "Zimmerman", + "French", + "Buchanan", + "Moran", + "Copeland", + "Roy", + "Pittman", + "Brady", + "Mccormick", + "Holloway", + "Brock", + "Poole", + "Frank", + "Logan", + "Owen", + "Bass", + "Marsh", + "Drake", + "Wong", + "Jefferson", + "Park", + "Morton", + "Abbott", + "Sparks", + "Patrick", + "Norton", + "Huff", + "Clayton", + "Massey", + "Lloyd", + "Figueroa", + "Carson", + "Bowers", + "Roberson", + "Barton", + "Tran", + "Lamb", + "Harrington", + "Casey", + "Boone", + "Cortez", + "Clarke", + "Mathis", + "Singleton", + "Wilkins", + "Cain", + "Bryan", + "Underwood", + "Hogan", + "Mckenzie", + "Collier", + "Luna", + "Phelps", + "Mcguire", + "Allison", + "Bridges", + "Wilkerson", + "Nash", + "Summers", + "Atkins", + "Wilcox", + "Pitts", + "Conley", + "Marquez", + "Burnett", + "Richard", + "Cochran", + "Chase", + "Davenport", + "Hood", + "Gates", + "Clay", + "Ayala", + "Sawyer", + "Roman", + "Vazquez", + "Dickerson", + "Hodge", + "Acosta", + "Flynn", + "Espinoza", + "Nicholson", + "Monroe", + "Wolf", + "Morrow", + "Kirk", + "Randall", + "Anthony", + "Whitaker", + "Oconnor", + "Skinner", + "Ware", + "Molina", + "Kirby", + "Huffman", + "Bradford", + "Charles", + "Gilmore", + "Dominguez", + "Oneal", + "Bruce", + "Lang", + "Combs", + "Kramer", + "Heath", + "Hancock", + "Gallagher", + "Gaines", + "Shaffer", + "Short", + "Wiggins", + "Mathews", + "Mcclain", + "Fischer", + "Wall", + "Small", + "Melton", + "Hensley", + "Bond", + "Dyer", + "Cameron", + "Grimes", + "Contreras", + "Christian", + "Wyatt", + "Baxter", + "Snow", + "Mosley", + "Shepherd", + "Larsen", + "Hoover", + "Beasley", + "Glenn", + "Petersen", + "Whitehead", + "Meyers", + "Keith", + "Garrison", + "Vincent", + "Shields", + "Horn", + "Savage", + "Olsen", + "Schroeder", + "Hartman", + "Woodard", + "Mueller", + "Kemp", + "Deleon", + "Booth", + "Patel", + "Calhoun", + "Wiley", + "Eaton", + "Cline", + "Navarro", + "Harrell", + "Lester", + "Humphrey", + "Parrish", + "Duran", + "Hutchinson", + "Hess", + "Dorsey", + "Bullock", + "Robles", + "Beard", + "Dalton", + "Avila", + "Vance", + "Rich", + "Blackwell", + "York", + "Johns", + "Blankenship", + "Trevino", + "Salinas", + "Campos", + "Pruitt", + "Moses", + "Callahan", + "Golden", + "Montoya", + "Hardin", + "Guerra", + "Mcdowell", + "Carey", + "Stafford", + "Gallegos", + "Henson", + "Wilkinson", + "Booker", + "Merritt", + "Miranda", + "Atkinson", + "Orr", + "Decker", + "Hobbs", + "Preston", + "Tanner", + "Knox", + "Pacheco", + "Stephenson", + "Glass", + "Rojas", + "Serrano", + "Marks", + "Hickman", + "English", + "Sweeney", + "Strong", + "Prince", + "Mcclure", + "Conway", + "Walter", + "Roth", + "Maynard", + "Farrell", + "Lowery", + "Hurst", + "Nixon", + "Weiss", + "Trujillo", + "Ellison", + "Sloan", + "Juarez", + "Winters", + "Mclean", + "Randolph", + "Leon", + "Boyer", + "Villarreal", + "Mccall", + "Gentry", + "Carrillo", + "Kent", + "Ayers", + "Lara", + "Shannon", + "Sexton", + "Pace", + "Hull", + "Leblanc", + "Browning", + "Velasquez", + "Leach", + "Chang", + "House", + "Sellers", + "Herring", + "Noble", + "Foley", + "Bartlett", + "Mercado", + "Landry", + "Durham", + "Walls", + "Barr", + "Mckee", + "Bauer", + "Rivers", + "Everett", + "Bradshaw", + "Pugh", + "Velez", + "Rush", + "Estes", + "Dodson", + "Morse", + "Sheppard", + "Weeks", + "Camacho", + "Bean", + "Barron", + "Livingston", + "Middleton", + "Spears", + "Branch", + "Blevins", + "Chen", + "Kerr", + "Mcconnell", + "Hatfield", + "Harding", + "Ashley", + "Solis", + "Herman", + "Frost", + "Giles", + "Blackburn", + "William", + "Pennington", + "Woodward", + "Finley", + "Mcintosh", + "Koch", + "Best", + "Solomon", + "Mccullough", + "Dudley", + "Nolan", + "Blanchard", + "Rivas", + "Brennan", + "Mejia", + "Kane", + "Benton", + "Joyce", + "Buckley", + "Haley", + "Valentine", + "Maddox", + "Russo", + "Mcknight", + "Buck", + "Moon", + "Mcmillan", + "Crosby", + "Berg", + "Dotson", + "Mays", + "Roach", + "Church", + "Chan", + "Richmond", + "Meadows", + "Faulkner", + "Oneill", + "Knapp", + "Kline", + "Barry", + "Ochoa", + "Jacobson", + "Gay", + "Avery", + "Hendricks", + "Horne", + "Shepard", + "Hebert", + "Cherry", + "Cardenas", + "Mcintyre", + "Whitney", + "Waller", + "Holman", + "Donaldson", + "Cantu", + "Terrell", + "Morin", + "Gillespie", + "Fuentes", + "Tillman", + "Sanford", + "Bentley", + "Peck", + "Key", + "Salas", + "Rollins", + "Gamble", + "Dickson", + "Battle", + "Santana", + "Cabrera", + "Cervantes", + "Howe", + "Hinton", + "Hurley", + "Spence", + "Zamora", + "Yang", + "Mcneil", + "Suarez", + "Case", + "Petty", + "Gould", + "Mcfarland", + "Sampson", + "Carver", + "Bray", + "Rosario", + "Macdonald", + "Stout", + "Hester", + "Melendez", + "Dillon", + "Farley", + "Hopper", + "Galloway", + "Potts", + "Bernard", + "Joyner", + "Stein", + "Aguirre", + "Osborn", + "Mercer", + "Bender", + "Franco", + "Rowland", + "Sykes", + "Benjamin", + "Travis", + "Pickett", + "Crane", + "Sears", + "Mayo", + "Dunlap", + "Hayden", + "Wilder", + "Mckay", + "Coffey", + "Mccarty", + "Ewing", + "Cooley", + "Vaughan", + "Bonner", + "Cotton", + "Holder", + "Stark", + "Ferrell", + "Cantrell", + "Fulton", + "Lynn", + "Lott", + "Calderon", + "Rosa", + "Pollard", + "Hooper", + "Burch", + "Mullen", + "Fry", + "Riddle", + "Levy", + "David", + "Duke", + "Odonnell", + "Guy", + "Michael", + "Britt", + "Frederick", + "Daugherty", + "Berger", + "Dillard", + "Alston", + "Jarvis", + "Frye", + "Riggs", + "Chaney", + "Odom", + "Duffy", + "Fitzpatrick", + "Valenzuela", + "Merrill", + "Mayer", + "Alford", + "Mcpherson", + "Acevedo", + "Donovan", + "Barrera", + "Albert", + "Cote", + "Reilly", + "Compton", + "Raymond", + "Mooney", + "Mcgowan", + "Craft", + "Cleveland", + "Clemons", + "Wynn", + "Nielsen", + "Baird", + "Stanton", + "Snider", + "Rosales", + "Bright", + "Witt", + "Stuart", + "Hays", + "Holden", + "Rutledge", + "Kinney", + "Clements", + "Castaneda", + "Slater", + "Hahn", + "Emerson", + "Conrad", + "Burks", + "Delaney", + "Pate", + "Lancaster", + "Sweet", + "Justice", + "Tyson", + "Sharpe", + "Whitfield", + "Talley", + "Macias", + "Irwin", + "Burris", + "Ratliff", + "Mccray", + "Madden", + "Kaufman", + "Beach", + "Goff", + "Cash", + "Bolton", + "Mcfadden", + "Levine", + "Good", + "Byers", + "Kirkland", + "Kidd", + "Workman", + "Carney", + "Dale", + "Mcleod", + "Holcomb", + "England", + "Finch", + "Head", + "Burt", + "Hendrix", + "Sosa", + "Haney", + "Franks", + "Sargent", + "Nieves", + "Downs", + "Rasmussen", + "Bird", + "Hewitt", + "Lindsay", + "Le", + "Foreman", + "Valencia", + "Oneil", + "Delacruz", + "Vinson", + "Dejesus", + "Hyde", + "Forbes", + "Gilliam", + "Guthrie", + "Wooten", + "Huber", + "Barlow", + "Boyle", + "Mcmahon", + "Buckner", + "Rocha", + "Puckett", + "Langley", + "Knowles", + "Cooke", + "Velazquez", + "Whitley", + "Noel", + "Vang", + "Shea", + "Rouse", + "Hartley", + "Mayfield", + "Elder", + "Rankin", + "Hanna", + "Cowan", + "Lucero", + "Arroyo", + "Slaughter", + "Haas", + "Oconnell", + "Minor", + "Kendrick", + "Shirley", + "Kendall", + "Boucher", + "Archer", + "Boggs", + "Odell", + "Dougherty", + "Andersen", + "Newell", + "Crowe", + "Wang", + "Friedman", + "Bland", + "Swain", + "Holley", + "Felix", + "Pearce", + "Childs", + "Yarbrough", + "Galvan", + "Proctor", + "Meeks", + "Lozano", + "Mora", + "Rangel", + "Bacon", + "Villanueva", + "Schaefer", + "Rosado", + "Helms", + "Boyce", + "Goss", + "Stinson", + "Smart", + "Lake", + "Ibarra", + "Hutchins", + "Covington", + "Reyna", + "Gregg", + "Werner", + "Crowley", + "Hatcher", + "Mackey", + "Bunch", + "Womack", + "Polk", + "Jamison", + "Dodd", + "Childress", + "Childers", + "Camp", + "Villa", + "Dye", + "Springer", + "Mahoney", + "Dailey", + "Belcher", + "Lockhart", + "Griggs", + "Costa", + "Connor", + "Brandt", + "Winter", + "Walden", + "Moser", + "Tracy", + "Tatum", + "Mccann", + "Akers", + "Lutz", + "Pryor", + "Law", + "Orozco", + "Mcallister", + "Lugo", + "Davies", + "Shoemaker", + "Madison", + "Rutherford", + "Newsome", + "Magee", + "Chamberlain", + "Blanton", + "Simms", + "Godfrey", + "Flanagan", + "Crum", + "Cordova", + "Escobar", + "Downing", + "Sinclair", + "Donahue", + "Krueger", + "Mcginnis", + "Gore", + "Farris", + "Webber", + "Corbett", + "Andrade", + "Starr", + "Lyon", + "Yoder", + "Hastings", + "Mcgrath", + "Spivey", + "Krause", + "Harden", + "Crabtree", + "Kirkpatrick", + "Hollis", + "Brandon", + "Arrington", + "Ervin", + "Clifton", + "Ritter", + "Mcghee", + "Bolden", + "Maloney", + "Gagnon", + "Dunbar", + "Ponce", + "Pike", + "Mayes", + "Heard", + "Beatty", + "Mobley", + "Kimball", + "Butts", + "Montes", + "Herbert", + "Grady", + "Eldridge", + "Braun", + "Hamm", + "Gibbons", + "Seymour", + "Moyer", + "Manley", + "Herron", + "Plummer", + "Elmore", + "Cramer", + "Gary", + "Rucker", + "Hilton", + "Blue", + "Pierson", + "Fontenot", + "Field", + "Rubio", + "Grace", + "Goldstein", + "Elkins", + "Wills", + "Novak", + "John", + "Hickey", + "Worley", + "Gorman", + "Katz", + "Dickinson", + "Broussard", + "Fritz", + "Woodruff", + "Crow", + "Christopher", + "Britton", + "Forrest", + "Nance", + "Lehman", + "Bingham", + "Zuniga", + "Whaley", + "Shafer", + "Coffman", + "Steward", + "Delarosa", + "Nix", + "Neely", + "Numbers", + "Mata", + "Manuel", + "Davila", + "Mccabe", + "Kessler", + "Emery", + "Bowling", + "Hinkle", + "Welsh", + "Pagan", + "Goldberg", + "Goins", + "Crouch", + "Cuevas", + "Quinones", + "Mcdermott", + "Hendrickson", + "Samuels", + "Denton", + "Bergeron", + "Lam", + "Ivey", + "Locke", + "Haines", + "Thurman", + "Snell", + "Hoskins", + "Byrne", + "Milton", + "Winston", + "Arthur", + "Arias", + "Stanford", + "Roe", + "Corbin", + "Beltran", + "Chappell", + "Hurt", + "Downey", + "Dooley", + "Tuttle", + "Couch", + "Payton", + "Mcelroy", + "Crockett", + "Groves", + "Clement", + "Leslie", + "Cartwright", + "Dickey", + "Mcgill", + "Dubois", + "Muniz", + "Erwin", + "Self", + "Tolbert", + "Dempsey", + "Cisneros", + "Sewell", + "Latham", + "Garland", + "Vigil", + "Tapia", + "Sterling", + "Rainey", + "Norwood", + "Lacy", + "Stroud", + "Meade", + "Amos", + "Tipton", + "Lord", + "Kuhn", + "Hilliard", + "Bonilla", + "Teague", + "Courtney", + "Gunn", + "Ho", + "Greenwood", + "Correa", + "Reece", + "Weston", + "Poe", + "Trent", + "Pineda", + "Phipps", + "Frey", + "Kaiser", + "Ames", + "Paige", + "Gunter", + "Schmitt", + "Milligan", + "Espinosa", + "Carlton", + "Bowden", + "Vickers", + "Lowry", + "Pritchard", + "Costello", + "Piper", + "Mcclellan", + "Lovell", + "Drew", + "Sheehan", + "Quick", + "Hatch", + "Dobson", + "Singh", + "Jeffries", + "Hollingsworth", + "Sorensen", + "Meza", + "Fink", + "Donnelly", + "Burrell", + "Bruno", + "Tomlinson", + "Colbert", + "Billings", + "Ritchie", + "Helton", + "Sutherland", + "Peoples", + "Mcqueen", + "Gaston", + "Thomason", + "Mckinley", + "Givens", + "Crocker", + "Vogel", + "Robison", + "Dunham", + "Coker", + "Swartz", + "Keys", + "Lilly", + "Ladner", + "Hannah", + "Willard", + "Richter", + "Hargrove", + "Edmonds", + "Brantley", + "Albright", + "Murdock", + "Boswell", + "Muller", + "Quintero", + "Padgett", + "Kenney", + "Daly", + "Connolly", + "Pierre", + "Inman", + "Quintana", + "Lund", + "Barnard", + "Villegas", + "Simons", + "Land", + "Huggins", + "Tidwell", + "Sanderson", + "Bullard", + "Mcclendon", + "Duarte", + "Draper", + "Meredith", + "Marrero", + "Dwyer", + "Abrams", + "Stover", + "Goode", + "Fraser", + "Crews", + "Bernal", + "Smiley", + "Godwin", + "Fish", + "Conklin", + "Mcneal", + "Baca", + "Esparza", + "Crowder", + "Bower", + "Nicholas", + "Chung", + "Brewster", + "Mcneill", + "Dick", + "Rodrigues", + "Leal", + "Coates", + "Raines", + "Mccain", + "Mccord", + "Miner", + "Holbrook", + "Swift", + "Dukes", + "Carlisle", + "Aldridge", + "Ackerman", + "Starks", + "Ricks", + "Holliday", + "Ferris", + "Hairston", + "Sheffield", + "Lange", + "Fountain", + "Marino", + "Doss", + "Betts", + "Kaplan", + "Carmichael", + "Bloom", + "Ruffin", + "Penn", + "Kern", + "Bowles", + "Sizemore", + "Larkin", + "Dupree", + "Jewell", + "Silver", + "Seals", + "Metcalf", + "Hutchison", + "Henley", + "Farr", + "Castle", + "Mccauley", + "Hankins", + "Gustafson", + "Deal", + "Curran", + "Ash", + "Waddell", + "Ramey", + "Cates", + "Pollock", + "Major", + "Irvin", + "Cummins", + "Messer", + "Heller", + "Dewitt", + "Lin", + "Funk", + "Cornett", + "Palacios", + "Galindo", + "Cano", + "Hathaway", + "Singer", + "Pham", + "Enriquez", + "Aaron", + "Salgado", + "Pelletier", + "Painter", + "Wiseman", + "Blount", + "Hand", + "Feliciano", + "Temple", + "Houser", + "Doherty", + "Mead", + "Mcgraw", + "Toney", + "Swan", + "Melvin", + "Capps", + "Blanco", + "Blackmon", + "Wesley", + "Thomson", + "Mcmanus", + "Fair", + "Burkett", + "Post", + "Gleason", + "Rudolph", + "Ott", + "Dickens", + "Cormier", + "Voss", + "Rushing", + "Rosenberg", + "Hurd", + "Dumas", + "Benitez", + "Arellano", + "Story", + "Marin", + "Caudill", + "Bragg", + "Jaramillo", + "Huerta", + "Gipson", + "Colvin", + "Biggs", + "Vela", + "Platt", + "Cassidy", + "Tompkins", + "Mccollum", + "Kay", + "Gabriel", + "Dolan", + "Daley", + "Crump", + "Street", + "Sneed", + "Kilgore", + "Grove", + "Grimm", + "Davison", + "Brunson", + "Prater", + "Marcum", + "Devine", + "Kyle", + "Dodge", + "Stratton", + "Rosas", + "Choi", + "Tripp", + "Ledbetter", + "Lay", + "Hightower", + "Haywood", + "Feldman", + "Epps", + "Yeager", + "Posey", + "Sylvester", + "Scruggs", + "Cope", + "Stubbs", + "Richey", + "Overton", + "Trotter", + "Sprague", + "Cordero", + "Butcher", + "Burger", + "Stiles", + "Burgos", + "Woodson", + "Horner", + "Bassett", + "Purcell", + "Haskins", + "Gee", + "Akins", + "Abraham", + "Hoyt", + "Ziegler", + "Spaulding", + "Hadley", + "Grubbs", + "Sumner", + "Murillo", + "Zavala", + "Shook", + "Lockwood", + "Jarrett", + "Driscoll", + "Dahl", + "Thorpe", + "Sheridan", + "Redmond", + "Putnam", + "Mcwilliams", + "Mcrae", + "Cornell", + "Felton", + "Romano", + "Joiner", + "Sadler", + "Hedrick", + "Hager", + "Hagen", + "Fitch", + "Coulter", + "Thacker", + "Mansfield", + "Langston", + "Guidry", + "Ferreira", + "Corley", + "Conn", + "Rossi", + "Lackey", + "Cody", + "Baez", + "Saenz", + "Mcnamara", + "Darnell", + "Michel", + "Mcmullen", + "Mckenna", + "Mcdonough", + "Link", + "Engel", + "Browne", + "Roper", + "Peacock", + "Eubanks", + "Drummond", + "Stringer", + "Pritchett", + "Parham", + "Mims", + "Landers", + "Ham", + "Grayson", + "Stacy", + "Schafer", + "Egan", + "Timmons", + "Ohara", + "Keen", + "Hamlin", + "Finn", + "Cortes", + "Mcnair", + "Louis", + "Clifford", + "Nadeau", + "Moseley", + "Michaud", + "Rosen", + "Oakes", + "Kurtz", + "Jeffers", + "Calloway", + "Beal", + "Bautista", + "Winn", + "Suggs", + "Stern", + "Stapleton", + "Lyles", + "Laird", + "Montano", + "Diamond", + "Dawkins", + "Roland", + "Hagan", + "Goldman", + "Bryson", + "Barajas", + "Lovett", + "Segura", + "Metz", + "Lockett", + "Langford", + "Hinson", + "Eastman", + "Rock", + "Hooks", + "Woody", + "Smallwood", + "Shapiro", + "Crowell", + "Whalen", + "Triplett", + "Hooker", + "Chatman", + "Aldrich", + "Cahill", + "Youngblood", + "Ybarra", + "Stallings", + "Sheets", + "Samuel", + "Reeder", + "Person", + "Pack", + "Lacey", + "Connelly", + "Bateman", + "Abernathy", + "Winkler", + "Wilkes", + "Masters", + "Hackett", + "Granger", + "Gillis", + "Schmitz", + "Sapp", + "Napier", + "Souza", + "Lanier", + "Gomes", + "Weir", + "Otero", + "Ledford", + "Burroughs", + "Babcock", + "Ventura", + "Siegel", + "Dugan", + "Clinton", + "Christie", + "Bledsoe", + "Atwood", + "Wray", + "Varner", + "Spangler", + "Otto", + "Anaya", + "Staley", + "Kraft", + "Fournier", + "Eddy", + "Belanger", + "Wolff", + "Thorne", + "Bynum", + "Burnette", + "Boykin", + "Swenson", + "Purvis", + "Pina", + "Khan", + "Duvall", + "Darby", + "Xiong", + "Kauffman", + "Ali", + "Yu", + "Healy", + "Engle", + "Corona", + "Benoit", + "Valle", + "Steiner", + "Spicer", + "Shaver", + "Randle", + "Lundy", + "Dow", + "Chin", + "Calvert", + "Staton", + "Neff", + "Kearney", + "Darden", + "Oakley", + "Medeiros", + "Mccracken", + "Crenshaw", + "Block", + "Beaver", + "Perdue", + "Dill", + "Whittaker", + "Tobin", + "Cornelius", + "Washburn", + "Hogue", + "Goodrich", + "Easley", + "Bravo", + "Dennison", + "Vera", + "Shipley", + "Kerns", + "Jorgensen", + "Crain", + "Abel", + "Villalobos", + "Maurer", + "Longoria", + "Keene", + "Coon", + "Sierra", + "Witherspoon", + "Staples", + "Pettit", + "Kincaid", + "Eason", + "Madrid", + "Echols", + "Lusk", + "Wu", + "Stahl", + "Currie", + "Thayer", + "Shultz", + "Sherwood", + "Mcnally", + "Seay", + "North", + "Maher", + "Kenny", + "Hope", + "Gagne", + "Barrow", + "Nava", + "Myles", + "Moreland", + "Honeycutt", + "Hearn", + "Diggs", + "Caron", + "Whitten", + "Westbrook", + "Stovall", + "Ragland", + "Queen", + "Munson", + "Meier", + "Looney", + "Kimble", + "Jolly", + "Hobson", + "London", + "Goddard", + "Culver", + "Burr", + "Presley", + "Negron", + "Connell", + "Tovar", + "Marcus", + "Huddleston", + "Hammer", + "Ashby", + "Salter", + "Root", + "Pendleton", + "Oleary", + "Nickerson", + "Myrick", + "Judd", + "Jacobsen", + "Elliot", + "Bain", + "Adair", + "Starnes", + "Sheldon", + "Matos", + "Light", + "Busby", + "Herndon", + "Hanley", + "Bellamy", + "Jack", + "Doty", + "Bartley", + "Yazzie", + "Rowell", + "Parson", + "Gifford", + "Cullen", + "Christiansen", + "Benavides", + "Barnhart", + "Talbot", + "Mock", + "Crandall", + "Connors", + "Bonds", + "Whitt", + "Gage", + "Bergman", + "Arredondo", + "Addison", + "Marion", + "Lujan", + "Dowdy", + "Jernigan", + "Huynh", + "Bouchard", + "Dutton", + "Rhoades", + "Ouellette", + "Kiser", + "Rubin", + "Herrington", + "Hare", + "Denny", + "Blackman", + "Babb", + "Allred", + "Rudd", + "Paulson", + "Ogden", + "Koenig", + "Jacob", + "Irving", + "Geiger", + "Begay", + "Parra", + "Champion", + "Lassiter", + "Hawk", + "Esposito", + "Cho", + "Waldron", + "Vernon", + "Ransom", + "Prather", + "Keenan", + "Jean", + "Grover", + "Chacon", + "Vick", + "Sands", + "Roark", + "Parr", + "Mayberry", + "Greenberg", + "Coley", + "Bruner", + "Whitman", + "Skaggs", + "Shipman", + "Means", + "Leary", + "Hutton", + "Romo", + "Medrano", + "Ladd", + "Kruse", + "Friend", + "Darling", + "Askew", + "Valentin", + "Schulz", + "Alfaro", + "Tabor", + "Mohr", + "Gallo", + "Bermudez", + "Pereira", + "Isaac", + "Bliss", + "Reaves", + "Flint", + "Comer", + "Boston", + "Woodall", + "Naquin", + "Guevara", + "Earl", + "Delong", + "Carrier", + "Pickens", + "Brand", + "Tilley", + "Schaffer", + "Read", + "Lim", + "Knutson", + "Fenton", + "Doran", + "Chu", + "Vogt", + "Vann", + "Prescott", + "Mclain", + "Landis", + "Corcoran", + "Ambrose", + "Zapata", + "Hyatt", + "Hemphill", + "Faulk", + "Call", + "Dove", + "Boudreaux", + "Aragon", + "Whitlock", + "Trejo", + "Tackett", + "Shearer", + "Saldana", + "Hanks", + "Gold", + "Driver", + "Mckinnon", + "Koehler", + "Champagne", + "Bourgeois", + "Pool", + "Keyes", + "Goodson", + "Foote", + "Early", + "Lunsford", + "Goldsmith", + "Flood", + "Winslow", + "Sams", + "Reagan", + "Mccloud", + "Hough", + "Esquivel", + "Naylor", + "Loomis", + "Coronado", + "Ludwig", + "Braswell", + "Bearden", + "Sherrill", + "Huang", + "Fagan", + "Ezell", + "Edmondson", + "Cyr", + "Cronin", + "Nunn", + "Lemon", + "Guillory", + "Grier", + "Dubose", + "Traylor", + "Ryder", + "Dobbins", + "Coyle", + "Aponte", + "Whitmore", + "Smalls", + "Rowan", + "Malloy", + "Cardona", + "Braxton", + "Borden", + "Humphries", + "Carrasco", + "Ruff", + "Metzger", + "Huntley", + "Hinojosa", + "Finney", + "Madsen", + "Hong", + "Hills", + "Ernst", + "Dozier", + "Burkhart", + "Bowser", + "Peralta", + "Daigle", + "Whittington", + "Sorenson", + "Saucedo", + "Roche", + "Redding", + "Loyd", + "Fugate", + "Avalos", + "Waite", + "Lind", + "Huston", + "Hay", + "Benedict", + "Hawthorne", + "Hamby", + "Boyles", + "Boles", + "Regan", + "Faust", + "Crook", + "Beam", + "Barger", + "Hinds", + "Gallardo", + "Elias", + "Willoughby", + "Willingham", + "Wilburn", + "Eckert", + "Busch", + "Zepeda", + "Worthington", + "Tinsley", + "Russ", + "Li", + "Hoff", + "Hawley", + "Carmona", + "Varela", + "Rector", + "Newcomb", + "Mallory", + "Kinsey", + "Dube", + "Whatley", + "Strange", + "Ragsdale", + "Ivy", + "Bernstein", + "Becerra", + "Yost", + "Mattson", + "Ly", + "Felder", + "Cheek", + "Luke", + "Handy", + "Grossman", + "Gauthier", + "Escobedo", + "Braden", + "Beckman", + "Mott", + "Hillman", + "Gil", + "Flaherty", + "Dykes", + "Doe", + "Stockton", + "Stearns", + "Lofton", + "Kitchen", + "Coats", + "Cavazos", + "Beavers", + "Barrios", + "Tang", + "Parish", + "Mosher", + "Lincoln", + "Cardwell", + "Coles", + "Burnham", + "Weller", + "Lemons", + "Beebe", + "Aguilera", + "Ring", + "Parnell", + "Harman", + "Couture", + "Alley", + "Schumacher", + "Redd", + "Dobbs", + "Blum", + "Blalock", + "Merchant", + "Ennis", + "Denson", + "Cottrell", + "Chester", + "Brannon", + "Bagley", + "Aviles", + "Watt", + "Sousa", + "Rosenthal", + "Rooney", + "Dietz", + "Blank", + "Paquette", + "Mcclelland", + "Duff", + "Velasco", + "Lentz", + "Grubb", + "Burrows", + "Barbour", + "Ulrich", + "Shockley", + "Rader", + "German", + "Beyer", + "Mixon", + "Layton", + "Altman", + "Alonzo", + "Weathers", + "Titus", + "Stoner", + "Squires", + "Shipp", + "Priest", + "Lipscomb", + "Cutler", + "Caballero", + "Zimmer", + "Willett", + "Thurston", + "Storey", + "Medley", + "Lyle", + "Epperson", + "Shah", + "Mcmillian", + "Baggett", + "Torrez", + "Laws", + "Hirsch", + "Dent", + "Corey", + "Poirier", + "Peachey", + "Jacques", + "Farrar", + "Creech", + "Barth", + "Trimble", + "France", + "Dupre", + "Albrecht", + "Sample", + "Lawler", + "Crisp", + "Conroy", + "Chadwick", + "Wetzel", + "Nesbitt", + "Murry", + "Jameson", + "Wilhelm", + "Patten", + "Minton", + "Matson", + "Kimbrough", + "Iverson", + "Guinn", + "Gale", + "Fortune", + "Croft", + "Toth", + "Pulliam", + "Nugent", + "Newby", + "Littlejohn", + "Dias", + "Canales", + "Bernier", + "Baron", + "Barney", + "Singletary", + "Renteria", + "Pruett", + "Mchugh", + "Mabry", + "Landrum", + "Brower", + "Weldon", + "Stoddard", + "Ruth", + "Cagle", + "Stjohn", + "Scales", + "Kohler", + "Kellogg", + "Hopson", + "Gant", + "Tharp", + "Gann", + "Zeigler", + "Pringle", + "Hammons", + "Fairchild", + "Deaton", + "Chavis", + "Carnes", + "Rowley", + "Matlock", + "Libby", + "Kearns", + "Irizarry", + "Carrington", + "Starkey", + "Pepper", + "Lopes", + "Jarrell", + "Fay", + "Craven", + "Beverly", + "Baum", + "Spain", + "Littlefield", + "Linn", + "Humphreys", + "Hook", + "High", + "Etheridge", + "Cuellar", + "Chastain", + "Chance", + "Bundy", + "Speer", + "Skelton", + "Quiroz", + "Pyle", + "Portillo", + "Ponder", + "Moulton", + "Machado", + "Liu", + "Killian", + "Hutson", + "Hitchcock", + "Ellsworth", + "Dowling", + "Cloud", + "Burdick", + "Spann", + "Pedersen", + "Levin", + "Leggett", + "Hayward", + "Hacker", + "Dietrich", + "Beaulieu", + "Barksdale", + "Wakefield", + "Snowden", + "Paris", + "Briscoe", + "Bowie", + "Berman", + "Ogle", + "Mcgregor", + "Laughlin", + "Helm", + "Burden", + "Wheatley", + "Schreiber", + "Pressley", + "Parris", + "Ng", + "Alaniz", + "Agee", + "Urban", + "Swann", + "Snodgrass", + "Schuster", + "Radford", + "Monk", + "Mattingly", + "Main", + "Lamar", + "Harp", + "Girard", + "Cheney", + "Yancey", + "Wagoner", + "Ridley", + "Lombardo", + "Lau", + "Hudgins", + "Gaskins", + "Duckworth", + "Coe", + "Coburn", + "Willey", + "Prado", + "Newberry", + "Magana", + "Hammonds", + "Elam", + "Whipple", + "Slade", + "Serna", + "Ojeda", + "Liles", + "Dorman", + "Diehl", + "Angel", + "Upton", + "Reardon", + "Michaels", + "Kelsey", + "Goetz", + "Eller", + "Bauman", + "Baer", + "Augustine", + "Layne", + "Hummel", + "Brenner", + "Amaya", + "Adamson", + "Ornelas", + "Dowell", + "Cloutier", + "Christy", + "Castellanos", + "Wing", + "Wellman", + "Saylor", + "Orourke", + "Moya", + "Montalvo", + "Kilpatrick", + "Harley", + "Durbin", + "Shell", + "Oldham", + "Kang", + "Garvin", + "Foss", + "Branham", + "Bartholomew", + "Templeton", + "Maguire", + "Holton", + "Alonso", + "Rider", + "Monahan", + "Mccormack", + "Beaty", + "Anders", + "Streeter", + "Nieto", + "Nielson", + "Moffett", + "Lankford", + "Keating", + "Heck", + "Gatlin", + "Delatorre", + "Callaway", + "Adcock", + "Worrell", + "Unger", + "Robinette", + "Nowak", + "Jeter", + "Brunner", + "Ashton", + "Steen", + "Parrott", + "Overstreet", + "Nobles", + "Montanez", + "Luther", + "Clevenger", + "Brinkley", + "Trahan", + "Quarles", + "Pickering", + "Pederson", + "Jansen", + "Grantham", + "Gilchrist", + "Crespo", + "Aiken", + "Schell", + "Schaeffer", + "Lorenz", + "Leyva", + "Harms", + "Dyson", + "Wallis", + "Pease", + "Leavitt", + "Hyman", + "Cheng", + "Cavanaugh", + "Batts", + "Warden", + "Seaman", + "Rockwell", + "Quezada", + "Paxton", + "Linder", + "Houck", + "Fontaine", + "Durant", + "Caruso", + "Adler", + "Pimentel", + "Mize", + "Lytle", + "Donald", + "Cleary", + "Cason", + "Acker", + "Switzer", + "Salmon", + "Isaacs", + "Higginbotham", + "Han", + "Waterman", + "Vandyke", + "Stamper", + "Sisk", + "Shuler", + "Riddick", + "Redman", + "Mcmahan", + "Levesque", + "Hatton", + "Bronson", + "Bollinger", + "Arnett", + "Okeefe", + "Gerber", + "Gannon", + "Farnsworth", + "Baughman", + "Silverman", + "Satterfield", + "Royal", + "Mccrary", + "Kowalski", + "Joy", + "Grigsby", + "Greco", + "Cabral", + "Trout", + "Rinehart", + "Mahon", + "Linton", + "Gooden", + "Curley", + "Baugh", + "Wyman", + "Weiner", + "Schwab", + "Schuler", + "Morrissey", + "Mahan", + "Coy", + "Bunn", + "Andrew", + "Thrasher", + "Spear", + "Waggoner", + "Shelley", + "Robert", + "Qualls", + "Purdy", + "Mcwhorter", + "Mauldin", + "Mark", + "Jordon", + "Gilman", + "Perryman", + "Newsom", + "Menard", + "Martino", + "Graf", + "Billingsley", + "Artis", + "Simpkins", + "Salisbury", + "Quintanilla", + "Gilliland", + "Fraley", + "Foust", + "Crouse", + "Scarborough", + "Ngo", + "Grissom", + "Fultz", + "Rico", + "Marlow", + "Markham", + "Madrigal", + "Lawton", + "Barfield", + "Whiting", + "Varney", + "Schwarz", + "Huey", + "Gooch", + "Arce", + "Wheat", + "Truong", + "Poulin", + "Mackenzie", + "Leone", + "Hurtado", + "Selby", + "Gaither", + "Fortner", + "Culpepper", + "Coughlin", + "Brinson", + "Boudreau", + "Barkley", + "Bales", + "Stepp", + "Holm", + "Tan", + "Schilling", + "Morrell", + "Kahn", + "Heaton", + "Gamez", + "Douglass", + "Causey", + "Brothers", + "Turpin", + "Shanks", + "Schrader", + "Meek", + "Isom", + "Hardison", + "Carranza", + "Yanez", + "Way", + "Scroggins", + "Schofield", + "Runyon", + "Ratcliff", + "Murrell", + "Moeller", + "Irby", + "Currier", + "Butterfield", + "Yee", + "Ralston", + "Pullen", + "Pinson", + "Estep", + "East", + "Carbone", + "Lance", + "Hawks", + "Ellington", + "Casillas", + "Spurlock", + "Sikes", + "Motley", + "Mccartney", + "Kruger", + "Isbell", + "Houle", + "Francisco", + "Burk", + "Bone", + "Tomlin", + "Shelby", + "Quigley", + "Neumann", + "Lovelace", + "Fennell", + "Colby", + "Cheatham", + "Bustamante", + "Skidmore", + "Hidalgo", + "Forman", + "Culp", + "Bowens", + "Betancourt", + "Aquino", + "Robb", + "Rea", + "Milner", + "Martel", + "Gresham", + "Wiles", + "Ricketts", + "Gavin", + "Dowd", + "Collazo", + "Bostic", + "Blakely", + "Sherrod", + "Power", + "Kenyon", + "Gandy", + "Ebert", + "Deloach", + "Cary", + "Bull", + "Allard", + "Sauer", + "Robins", + "Olivares", + "Gillette", + "Chestnut", + "Bourque", + "Paine", + "Lyman", + "Hite", + "Hauser", + "Devore", + "Crawley", + "Chapa", + "Vu", + "Tobias", + "Talbert", + "Poindexter", + "Millard", + "Meador", + "Mcduffie", + "Mattox", + "Kraus", + "Harkins", + "Choate", + "Bess", + "Wren", + "Sledge", + "Sanborn", + "Outlaw", + "Kinder", + "Geary", + "Cornwell", + "Barclay", + "Adam", + "Abney", + "Seward", + "Rhoads", + "Howland", + "Fortier", + "Easter", + "Benner", + "Vines", + "Tubbs", + "Troutman", + "Rapp", + "Noe", + "Mccurdy", + "Harder", + "Deluca", + "Westmoreland", + "South", + "Havens", + "Guajardo", + "Ely", + "Clary", + "Seal", + "Meehan", + "Herzog", + "Guillen", + "Ashcraft", + "Waugh", + "Renner", + "Milam", + "Jung", + "Elrod", + "Churchill", + "Buford", + "Breaux", + "Bolin", + "Asher", + "Windham", + "Tirado", + "Pemberton", + "Nolen", + "Noland", + "Knott", + "Emmons", + "Cornish", + "Christenson", + "Brownlee", + "Barbee", + "Waldrop", + "Pitt", + "Olvera", + "Lombardi", + "Gruber", + "Gaffney", + "Eggleston", + "Banda", + "Archuleta", + "Still", + "Slone", + "Prewitt", + "Pfeiffer", + "Nettles", + "Mena", + "Mcadams", + "Henning", + "Gardiner", + "Cromwell", + "Chisholm", + "Burleson", + "Box", + "Vest", + "Oglesby", + "Mccarter", + "Malcolm", + "Lumpkin", + "Larue", + "Grey", + "Wofford", + "Vanhorn", + "Thorn", + "Teel", + "Swafford", + "Stclair", + "Stanfield", + "Ocampo", + "Herrmann", + "Hannon", + "Arsenault", + "Roush", + "Mcalister", + "Hiatt", + "Gunderson", + "Forsythe", + "Duggan", + "Delvalle", + "Cintron", + "Wilks", + "Weinstein", + "Uribe", + "Rizzo", + "Noyes", + "Mclendon", + "Gurley", + "Bethea", + "Winstead", + "Maples", + "Harry", + "Guyton", + "Giordano", + "Alderman", + "Valdes", + "Polanco", + "Pappas", + "Lively", + "Grogan", + "Griffiths", + "Bobo", + "Arevalo", + "Whitson", + "Sowell", + "Rendon", + "Matthew", + "Julian", + "Fernandes", + "Farrow", + "Edmond", + "Benavidez", + "Ayres", + "Alicea", + "Stump", + "Smalley", + "Seitz", + "Schulte", + "Gilley", + "Gallant", + "Dewey", + "Casper", + "Canfield", + "Wolford", + "Omalley", + "Mcnutt", + "Mcnulty", + "Mcgovern", + "Hardman", + "Harbin", + "Cowart", + "Chavarria", + "Brink", + "Beckett", + "Bagwell", + "Armstead", + "Anglin", + "Abreu", + "Reynoso", + "Krebs", + "Jett", + "Hoffmann", + "Greenfield", + "Forte", + "Burney", + "Broome", + "Sisson", + "Parent", + "Jude", + "Younger", + "Trammell", + "Partridge", + "Marvin", + "Mace", + "Lomax", + "Lemieux", + "Gossett", + "Frantz", + "Fogle", + "Cooney", + "Broughton", + "Pence", + "Paulsen", + "Neil", + "Muncy", + "Mcarthur", + "Hollins", + "Edward", + "Beauchamp", + "Withers", + "Osorio", + "Mulligan", + "Hoyle", + "Foy", + "Dockery", + "Cockrell", + "Begley", + "Amador", + "Roby", + "Rains", + "Lindquist", + "Gentile", + "Everhart", + "Bohannon", + "Wylie", + "Thao", + "Sommers", + "Purnell", + "Palma", + "Fortin", + "Dunning", + "Breeden", + "Vail", + "Phelan", + "Phan", + "Marx", + "Cosby", + "Colburn", + "Chong", + "Boling", + "Biddle", + "Ledesma", + "Gaddis", + "Denney", + "Chow", + "Bueno", + "Berrios", + "Wicker", + "Tolliver", + "Thibodeaux", + "Nagle", + "Lavoie", + "Fisk", + "Do", + "Crist", + "Barbosa", + "Reedy", + "March", + "Locklear", + "Kolb", + "Himes", + "Behrens", + "Beckwith", + "Beckham", + "Weems", + "Wahl", + "Shorter", + "Shackelford", + "Rees", + "Muse", + "Free", + "Cerda", + "Valadez", + "Thibodeau", + "Saavedra", + "Ridgeway", + "Reiter", + "Mchenry", + "Majors", + "Lachance", + "Keaton", + "Israel", + "Ferrara", + "Falcon", + "Clemens", + "Blocker", + "Applegate", + "Paz", + "Needham", + "Mojica", + "Kuykendall", + "Hamel", + "Escamilla", + "Doughty", + "Burchett", + "Ainsworth", + "Wilbur", + "Vidal", + "Upchurch", + "Thigpen", + "Strauss", + "Spruill", + "Sowers", + "Riggins", + "Ricker", + "Mccombs", + "Harlow", + "Garnett", + "Buffington", + "Yi", + "Sotelo", + "Olivas", + "Negrete", + "Morey", + "Macon", + "Logsdon", + "Lapointe", + "Florence", + "Cathey", + "Bigelow", + "Bello", + "Westfall", + "Stubblefield", + "Peak", + "Lindley", + "Jeffrey", + "Hein", + "Hawes", + "Farrington", + "Edge", + "Breen", + "Birch", + "Wilde", + "Steed", + "Sepulveda", + "Reinhardt", + "Proffitt", + "Minter", + "Messina", + "Mcnabb", + "Maier", + "Keeler", + "Gamboa", + "Donohue", + "Dexter", + "Basham", + "Shinn", + "Orlando", + "Crooks", + "Cota", + "Borders", + "Bills", + "Bachman", + "Tisdale", + "Tavares", + "Schmid", + "Pickard", + "Jasper", + "Gulley", + "Fonseca", + "Delossantos", + "Condon", + "Clancy", + "Batista", + "Wicks", + "Wadsworth", + "New", + "Martell", + "Lo", + "Littleton", + "Ison", + "Haag", + "Folsom", + "Brumfield", + "Broyles", + "Brito", + "Mireles", + "Mcdonnell", + "Leclair", + "Hamblin", + "Gough", + "Fanning", + "Binder", + "Winfield", + "Whitworth", + "Soriano", + "Palumbo", + "Newkirk", + "Mangum", + "Hutcherson", + "Comstock", + "Cecil", + "Carlin", + "Beall", + "Bair", + "Wendt", + "Watters", + "Walling", + "Putman", + "Otoole", + "Oliva", + "Morley", + "Mares", + "Lemus", + "Keener", + "Jeffery", + "Hundley", + "Dial", + "Damico", + "Billups", + "Strother", + "Mcfarlane", + "Lamm", + "Eaves", + "Crutcher", + "Caraballo", + "Canty", + "Atwell", + "Taft", + "Siler", + "Rust", + "Rawls", + "Rawlings", + "Prieto", + "Niles", + "Mcneely", + "Mcafee", + "Hulsey", + "Harlan", + "Hackney", + "Galvez", + "Escalante", + "Delagarza", + "Crider", + "Charlton", + "Bandy", + "Wilbanks", + "Stowe", + "Steinberg", + "Samson", + "Renfro", + "Masterson", + "Massie", + "Lanham", + "Haskell", + "Hamrick", + "Fort", + "Dehart", + "Card", + "Burdette", + "Branson", + "Bourne", + "Babin", + "Aleman", + "Worthy", + "Tibbs", + "Sweat", + "Smoot", + "Slack", + "Paradis", + "Packard", + "Mull", + "Luce", + "Houghton", + "Gantt", + "Furman", + "Danner", + "Christianson", + "Burge", + "Broderick", + "Ashford", + "Arndt", + "Almeida", + "Stallworth", + "Shade", + "Searcy", + "Sager", + "Noonan", + "Mclemore", + "Mcintire", + "Maxey", + "Lavigne", + "Jobe", + "Ireland", + "Ferrer", + "Falk", + "Edgar", + "Coffin", + "Byrnes", + "Aranda", + "Apodaca", + "Stamps", + "Rounds", + "Peek", + "Olmstead", + "Lewandowski", + "Kaminski", + "Her", + "Dunaway", + "Bruns", + "Brackett", + "Amato", + "Reich", + "Mcclung", + "Lacroix", + "Koontz", + "Herrick", + "Hardesty", + "Flanders", + "Cousins", + "Close", + "Cato", + "Cade", + "Vickery", + "Shank", + "Nagel", + "Dupuis", + "Croteau", + "Cotter", + "Cable", + "Stuckey", + "Stine", + "Porterfield", + "Pauley", + "Nye", + "Moffitt", + "Lu", + "Knudsen", + "Hardwick", + "Goforth", + "Dupont", + "Blunt", + "Barrows", + "Barnhill", + "Shull", + "Rash", + "Ralph", + "Penny", + "Lorenzo", + "Loftis", + "Lemay", + "Kitchens", + "Horvath", + "Grenier", + "Fuchs", + "Fairbanks", + "Culbertson", + "Calkins", + "Burnside", + "Beattie", + "Ashworth", + "Albertson", + "Wertz", + "Vo", + "Vaught", + "Vallejo", + "Tyree", + "Turk", + "Tuck", + "Tijerina", + "Sage", + "Picard", + "Peterman", + "Otis", + "Marroquin", + "Marr", + "Lantz", + "Hoang", + "Demarco", + "Daily", + "Cone", + "Berube", + "Barnette", + "Wharton", + "Stinnett", + "Slocum", + "Scanlon", + "Sander", + "Pinto", + "Mancuso", + "Lima", + "Judge", + "Headley", + "Epstein", + "Counts", + "Clarkson", + "Carnahan", + "Brice", + "Boren", + "Arteaga", + "Adame", + "Zook", + "Whittle", + "Whitehurst", + "Wenzel", + "Saxton", + "Rhea", + "Reddick", + "Puente", + "Hazel", + "Handley", + "Haggerty", + "Earley", + "Devlin", + "Dallas", + "Chaffin", + "Cady", + "Ahmed", + "Acuna", + "Solano", + "Sigler", + "Pollack", + "Pendergrass", + "Ostrander", + "Janes", + "Francois", + "Fine", + "Crutchfield", + "Cordell", + "Chamberlin", + "Brubaker", + "Baptiste", + "Willson", + "Reis", + "Neeley", + "Mullin", + "Mercier", + "Lira", + "Layman", + "Keeling", + "Higdon", + "Guest", + "Forrester", + "Espinal", + "Dion", + "Chapin", + "Carl", + "Warfield", + "Toledo", + "Pulido", + "Peebles", + "Nagy", + "Montague", + "Mello", + "Lear", + "Jaeger", + "Hogg", + "Graff", + "Furr", + "Derrick", + "Cave", + "Canada", + "Soliz", + "Poore", + "Mendenhall", + "Mclaurin", + "Maestas", + "Low", + "Gable", + "Belt", + "Barraza", + "Tillery", + "Snead", + "Pond", + "Neill", + "Mcculloch", + "Mccorkle", + "Lightfoot", + "Hutchings", + "Holloman", + "Harness", + "Dorn", + "Council", + "Bock", + "Zielinski", + "Turley", + "Treadwell", + "Stpierre", + "Starling", + "Somers", + "Oswald", + "Merrick", + "Marquis", + "Ivory", + "Easterling", + "Bivens", + "Truitt", + "Poston", + "Parry", + "Ontiveros", + "Olivarez", + "Neville", + "Moreau", + "Medlin", + "Ma", + "Lenz", + "Knowlton", + "Fairley", + "Cobbs", + "Chisolm", + "Bannister", + "Woodworth", + "Toler", + "Ocasio", + "Noriega", + "Neuman", + "Moye", + "Milburn", + "Mcclanahan", + "Lilley", + "Hanes", + "Flannery", + "Dellinger", + "Danielson", + "Conti", + "Blodgett", + "Beers", + "Weatherford", + "Strain", + "Karr", + "Hitt", + "Denham", + "Custer", + "Coble", + "Clough", + "Casteel", + "Bolduc", + "Batchelor", + "Ammons", + "Whitlow", + "Tierney", + "Staten", + "Sibley", + "Seifert", + "Schubert", + "Salcedo", + "Mattison", + "Laney", + "Haggard", + "Grooms", + "Dix", + "Dees", + "Cromer", + "Cooks", + "Colson", + "Caswell", + "Zarate", + "Swisher", + "Stacey", + "Shin", + "Ragan", + "Pridgen", + "Mcvey", + "Matheny", + "Leigh", + "Lafleur", + "Franz", + "Ferraro", + "Dugger", + "Whiteside", + "Rigsby", + "Mcmurray", + "Lehmann", + "Large", + "Jacoby", + "Hildebrand", + "Hendrick", + "Headrick", + "Goad", + "Fincher", + "Drury", + "Borges", + "Archibald", + "Albers", + "Woodcock", + "Trapp", + "Soares", + "Seaton", + "Richie", + "Monson", + "Luckett", + "Lindberg", + "Kopp", + "Keeton", + "Hsu", + "Healey", + "Garvey", + "Gaddy", + "Fain", + "Burchfield", + "Badger", + "Wentworth", + "Strand", + "Stack", + "Spooner", + "Saucier", + "Sales", + "Ruby", + "Ricci", + "Plunkett", + "Pannell", + "Ness", + "Leger", + "Hoy", + "Freitas", + "Fong", + "Elizondo", + "Duval", + "Chun", + "Calvin", + "Beaudoin", + "Urbina", + "Stock", + "Rickard", + "Partin", + "Moe", + "Mcgrew", + "Mcclintock", + "Ledoux", + "Forsyth", + "Faison", + "Devries", + "Bertrand", + "Wasson", + "Tilton", + "Scarbrough", + "Pride", + "Oh", + "Leung", + "Larry", + "Irvine", + "Garber", + "Denning", + "Corral", + "Colley", + "Castleberry", + "Bowlin", + "Bogan", + "Beale", + "Baines", + "True", + "Trice", + "Rayburn", + "Parkinson", + "Pak", + "Nunes", + "Mcmillen", + "Leahy", + "Lea", + "Kimmel", + "Higgs", + "Fulmer", + "Carden", + "Bedford", + "Taggart", + "Spearman", + "Register", + "Prichard", + "Morrill", + "Koonce", + "Heinz", + "Hedges", + "Guenther", + "Grice", + "Findley", + "Earle", + "Dover", + "Creighton", + "Boothe", + "Bayer", + "Arreola", + "Vitale", + "Valles", + "See", + "Raney", + "Peter", + "Osgood", + "Lowell", + "Hanlon", + "Burley", + "Bounds", + "Worden", + "Weatherly", + "Vetter", + "Tanaka", + "Stiltner", + "Sell", + "Nevarez", + "Mosby", + "Montero", + "Melancon", + "Harter", + "Hamer", + "Goble", + "Gladden", + "Gist", + "Ginn", + "Akin", + "Zaragoza", + "Towns", + "Tarver", + "Sammons", + "Royster", + "Oreilly", + "Muir", + "Morehead", + "Luster", + "Kingsley", + "Kelso", + "Grisham", + "Glynn", + "Baumann", + "Alves", + "Yount", + "Tamayo", + "Tam", + "Paterson", + "Oates", + "Menendez", + "Longo", + "Hargis", + "Greenlee", + "Gillen", + "Desantis", + "Conover", + "Breedlove", + "Wayne", + "Sumpter", + "Scherer", + "Rupp", + "Reichert", + "Heredia", + "Fallon", + "Creel", + "Cohn", + "Clemmons", + "Casas", + "Bickford", + "Belton", + "Bach", + "Williford", + "Whitcomb", + "Tennant", + "Sutter", + "Stull", + "Sessions", + "Mccallum", + "Manson", + "Langlois", + "Keel", + "Keegan", + "Emanuel", + "Dangelo", + "Dancy", + "Damron", + "Clapp", + "Clanton", + "Bankston", + "Trinidad", + "Oliveira", + "Mintz", + "Mcinnis", + "Martens", + "Mabe", + "Laster", + "Jolley", + "Irish", + "Hildreth", + "Hefner", + "Glaser", + "Duckett", + "Demers", + "Brockman", + "Blais", + "Back", + "Alcorn", + "Agnew", + "Toliver", + "Tice", + "Song", + "Seeley", + "Najera", + "Musser", + "Mcfall", + "Laplante", + "Galvin", + "Fajardo", + "Doan", + "Coyne", + "Copley", + "Clawson", + "Cheung", + "Barone", + "Wynne", + "Woodley", + "Tremblay", + "Stoll", + "Sparrow", + "Sparkman", + "Schweitzer", + "Sasser", + "Samples", + "Roney", + "Ramon", + "Legg", + "Lai", + "Joe", + "Heim", + "Farias", + "Concepcion", + "Colwell", + "Christman", + "Bratcher", + "Alba", + "Winchester", + "Upshaw", + "Southerland", + "Sorrell", + "Shay", + "Sells", + "Mount", + "Mccloskey", + "Martindale", + "Luttrell", + "Loveless", + "Lovejoy", + "Linares", + "Latimer", + "Holly", + "Embry", + "Coombs", + "Bratton", + "Bostick", + "Boss", + "Venable", + "Tuggle", + "Toro", + "Staggs", + "Sandlin", + "Jefferies", + "Heckman", + "Griffis", + "Crayton", + "Clem", + "Button", + "Browder", + "Allan", + "Thorton", + "Sturgill", + "Sprouse", + "Royer", + "Rousseau", + "Ridenour", + "Pogue", + "Perales", + "Peeples", + "Metzler", + "Mesa", + "Mccutcheon", + "Mcbee", + "Jay", + "Hornsby", + "Heffner", + "Corrigan", + "Armijo", + "Vue", + "Romeo", + "Plante", + "Peyton", + "Paredes", + "Macklin", + "Hussey", + "Hodgson", + "Granados", + "Frias", + "Carman", + "Brent", + "Becnel", + "Batten", + "Almanza", + "Turney", + "Teal", + "Sturgeon", + "Meeker", + "Mcdaniels", + "Limon", + "Keeney", + "Kee", + "Hutto", + "Holguin", + "Gorham", + "Fishman", + "Fierro", + "Blanchette", + "Rodrigue", + "Reddy", + "Osburn", + "Oden", + "Lerma", + "Kirkwood", + "Keefer", + "Haugen", + "Hammett", + "Chalmers", + "Carlos", + "Brinkman", + "Baumgartner", + "Zhang", + "Valerio", + "Tellez", + "Steffen", + "Shumate", + "Sauls", + "Ripley", + "Kemper", + "Jacks", + "Guffey", + "Evers", + "Craddock", + "Carvalho", + "Blaylock", + "Banuelos", + "Balderas", + "Wooden", + "Wheaton", + "Turnbull", + "Shuman", + "Pointer", + "Mosier", + "Mccue", + "Ligon", + "Kozlowski", + "Johansen", + "Ingle", + "Herr", + "Briones", + "Southern", + "Snipes", + "Rickman", + "Pipkin", + "Peace", + "Pantoja", + "Orosco", + "Moniz", + "Lawless", + "Kunkel", + "Hibbard", + "Galarza", + "Enos", + "Bussey", + "Settle", + "Schott", + "Salcido", + "Perreault", + "Mcdougal", + "Mccool", + "Haight", + "Garris", + "Ferry", + "Easton", + "Conyers", + "Atherton", + "Wimberly", + "Utley", + "Stephen", + "Spellman", + "Smithson", + "Slagle", + "Skipper", + "Ritchey", + "Rand", + "Petit", + "Osullivan", + "Oaks", + "Nutt", + "Mcvay", + "Mccreary", + "Mayhew", + "Knoll", + "Jewett", + "Harwood", + "Hailey", + "Cardoza", + "Ashe", + "Arriaga", + "Andres", + "Zeller", + "Wirth", + "Whitmire", + "Stauffer", + "Spring", + "Rountree", + "Redden", + "Mccaffrey", + "Martz", + "Loving", + "Larose", + "Langdon", + "Humes", + "Gaskin", + "Faber", + "Doll", + "Devito", + "Cass", + "Almond", + "Wingfield", + "Wingate", + "Villareal", + "Tyner", + "Smothers", + "Severson", + "Reno", + "Pennell", + "Maupin", + "Leighton", + "Janssen", + "Hassell", + "Hallman", + "Halcomb", + "Folse", + "Fitzsimmons", + "Fahey", + "Cranford", + "Bolen", + "Battles", + "Battaglia", + "Wooldridge", + "Weed", + "Trask", + "Rosser", + "Regalado", + "Mcewen", + "Keefe", + "Fuqua", + "Echevarria", + "Domingo", + "Dang", + "Caro", + "Boynton", + "Andrus", + "Wild", + "Viera", + "Vanmeter", + "Taber", + "Spradlin", + "Seibert", + "Provost", + "Prentice", + "Oliphant", + "Laporte", + "Hwang", + "Hatchett", + "Hass", + "Greiner", + "Freedman", + "Covert", + "Chilton", + "Byars", + "Wiese", + "Venegas", + "Swank", + "Shrader", + "Roderick", + "Roberge", + "Mullis", + "Mortensen", + "Mccune", + "Marlowe", + "Kirchner", + "Keck", + "Isaacson", + "Hostetler", + "Halverson", + "Gunther", + "Griswold", + "Gerard", + "Fenner", + "Durden", + "Blackwood", + "Bertram", + "Ahrens", + "Sawyers", + "Savoy", + "Nabors", + "Mcswain", + "Mackay", + "Loy", + "Lavender", + "Lash", + "Labbe", + "Jessup", + "Hubert", + "Fullerton", + "Donnell", + "Cruse", + "Crittenden", + "Correia", + "Centeno", + "Caudle", + "Canady", + "Callender", + "Alarcon", + "Ahern", + "Winfrey", + "Tribble", + "Tom", + "Styles", + "Salley", + "Roden", + "Musgrove", + "Minnick", + "Fortenberry", + "Carrion", + "Bunting", + "Bethel", + "Batiste", + "Woo", + "Whited", + "Underhill", + "Stillwell", + "Silvia", + "Rauch", + "Pippin", + "Perrin", + "Messenger", + "Mancini", + "Lister", + "Kinard", + "Hartmann", + "Fleck", + "Broadway", + "Wilt", + "Treadway", + "Thornhill", + "Speed", + "Spalding", + "Sam", + "Rafferty", + "Pitre", + "Patino", + "Ordonez", + "Linkous", + "Kelleher", + "Homan", + "Holiday", + "Galbraith", + "Feeney", + "Dorris", + "Curtin", + "Coward", + "Camarillo", + "Buss", + "Bunnell", + "Bolt", + "Beeler", + "Autry", + "Alcala", + "Witte", + "Wentz", + "Stidham", + "Shively", + "Nunley", + "Meacham", + "Martins", + "Lemke", + "Lefebvre", + "Kaye", + "Hynes", + "Horowitz", + "Hoppe", + "Holcombe", + "Estrella", + "Dunne", + "Derr", + "Cochrane", + "Brittain", + "Bedard", + "Beauregard", + "Torrence", + "Strunk", + "Soria", + "Simonson", + "Shumaker", + "Scoggins", + "Packer", + "Oconner", + "Moriarty", + "Leroy", + "Kuntz", + "Ives", + "Hutcheson", + "Horan", + "Hales", + "Garmon", + "Fitts", + "Dell", + "Bohn", + "Atchison", + "Worth", + "Wisniewski", + "Will", + "Vanwinkle", + "Sturm", + "Sallee", + "Prosser", + "Moen", + "Lundberg", + "Kunz", + "Kohl", + "Keane", + "Jorgenson", + "Jaynes", + "Funderburk", + "Freed", + "Frame", + "Durr", + "Creamer", + "Cosgrove", + "Candelaria", + "Berlin", + "Batson", + "Vanhoose", + "Thomsen", + "Teeter", + "Sommer", + "Smyth", + "Sena", + "Redmon", + "Orellana", + "Maness", + "Lennon", + "Heflin", + "Goulet", + "Frick", + "Forney", + "Dollar", + "Bunker", + "Asbury", + "Aguiar", + "Talbott", + "Southard", + "Pleasant", + "Mowery", + "Mears", + "Lemmon", + "Krieger", + "Hickson", + "Gracia", + "Elston", + "Duong", + "Delgadillo", + "Dayton", + "Dasilva", + "Conaway", + "Catron", + "Bruton", + "Bradbury", + "Bordelon", + "Bivins", + "Bittner", + "Bergstrom", + "Beals", + "Abell", + "Whelan", + "Travers", + "Tejada", + "Pulley", + "Pino", + "Norfleet", + "Nealy", + "Maes", + "Loper", + "Held", + "Gerald", + "Gatewood", + "Frierson", + "Freund", + "Finnegan", + "Cupp", + "Covey", + "Catalano", + "Boehm", + "Bader", + "Yoon", + "Walston", + "Tenney", + "Sipes", + "Roller", + "Rawlins", + "Medlock", + "Mccaskill", + "Mccallister", + "Marcotte", + "Maclean", + "Hughey", + "Henke", + "Harwell", + "Gladney", + "Gilson", + "Dew", + "Chism", + "Caskey", + "Brandenburg", + "Baylor", + "Villasenor", + "Veal", + "Van", + "Thatcher", + "Stegall", + "Shore", + "Petrie", + "Nowlin", + "Navarrete", + "Muhammad", + "Lombard", + "Loftin", + "Lemaster", + "Kroll", + "Kovach", + "Kimbrell", + "Kidwell", + "Hershberger", + "Fulcher", + "Eng", + "Cantwell", + "Bustos", + "Boland", + "Bobbitt", + "Binkley", + "Wester", + "Weis", + "Verdin", + "Tong", + "Tiller", + "Sisco", + "Sharkey", + "Seymore", + "Rosenbaum", + "Rohr", + "Quinonez", + "Pinkston", + "Nation", + "Malley", + "Logue", + "Lessard", + "Lerner", + "Lebron", + "Krauss", + "Klinger", + "Halstead", + "Haller", + "Getz", + "Burrow", + "Brant", + "Alger", + "Victor", + "Shores", + "Scully", + "Pounds", + "Pfeifer", + "Perron", + "Nelms", + "Munn", + "Mcmaster", + "Mckenney", + "Manns", + "Knudson", + "Hutchens", + "Huskey", + "Goebel", + "Flagg", + "Cushman", + "Click", + "Castellano", + "Carder", + "Bumgarner", + "Blaine", + "Bible", + "Wampler", + "Spinks", + "Robson", + "Neel", + "Mcreynolds", + "Mathias", + "Maas", + "Loera", + "Kasper", + "Jose", + "Jenson", + "Florez", + "Coons", + "Buckingham", + "Brogan", + "Berryman", + "Wilmoth", + "Wilhite", + "Thrash", + "Shephard", + "Seidel", + "Schulze", + "Roldan", + "Pettis", + "Obryan", + "Maki", + "Mackie", + "Hatley", + "Frazer", + "Fiore", + "Falls", + "Chesser", + "Bui", + "Bottoms", + "Bisson", + "Benefield", + "Allman", + "Wilke", + "Trudeau", + "Timm", + "Shifflett", + "Rau", + "Mundy", + "Milliken", + "Mayers", + "Leake", + "Kohn", + "Huntington", + "Horsley", + "Hermann", + "Guerin", + "Fryer", + "Frizzell", + "Foret", + "Flemming", + "Fife", + "Criswell", + "Carbajal", + "Bozeman", + "Boisvert", + "Archie", + "Antonio", + "Angulo", + "Wallen", + "Tapp", + "Silvers", + "Ramsay", + "Oshea", + "Orta", + "Moll", + "Mckeever", + "Mcgehee", + "Luciano", + "Linville", + "Kiefer", + "Ketchum", + "Howerton", + "Groce", + "Gaylord", + "Gass", + "Fusco", + "Corbitt", + "Blythe", + "Betz", + "Bartels", + "Amaral", + "Aiello", + "Yoo", + "Weddle", + "Troy", + "Sun", + "Sperry", + "Seiler", + "Runyan", + "Raley", + "Overby", + "Osteen", + "Olds", + "Mckeown", + "Mauro", + "Matney", + "Lauer", + "Lattimore", + "Hindman", + "Hartwell", + "Fredrickson", + "Fredericks", + "Espino", + "Clegg", + "Carswell", + "Cambell", + "Burkholder", + "August", + "Woodbury", + "Welker", + "Totten", + "Thornburg", + "Theriault", + "Stitt", + "Stamm", + "Stackhouse", + "Simone", + "Scholl", + "Saxon", + "Rife", + "Razo", + "Quinlan", + "Pinkerton", + "Olivo", + "Nesmith", + "Nall", + "Mattos", + "Leak", + "Lafferty", + "Justus", + "Giron", + "Geer", + "Fielder", + "Eagle", + "Drayton", + "Dortch", + "Conners", + "Conger", + "Chau", + "Boatwright", + "Billiot", + "Barden", + "Armenta", + "Antoine", + "Tibbetts", + "Steadman", + "Slattery", + "Sides", + "Rinaldi", + "Raynor", + "Rayford", + "Pinckney", + "Pettigrew", + "Nickel", + "Milne", + "Matteson", + "Halsey", + "Gonsalves", + "Fellows", + "Durand", + "Desimone", + "Cowley", + "Cowles", + "Brill", + "Barham", + "Barela", + "Barba", + "Ashmore", + "Withrow", + "Valenti", + "Tejeda", + "Spriggs", + "Sayre", + "Salerno", + "Place", + "Peltier", + "Peel", + "Merriman", + "Matheson", + "Lowman", + "Lindstrom", + "Hyland", + "Homer", + "Ha", + "Giroux", + "Fries", + "Frasier", + "Earls", + "Dugas", + "Damon", + "Dabney", + "Collado", + "Briseno", + "Baxley", + "Andre", + "Word", + "Whyte", + "Wenger", + "Vanover", + "Vanburen", + "Thiel", + "Schindler", + "Schiller", + "Rigby", + "Pomeroy", + "Passmore", + "Marble", + "Manzo", + "Mahaffey", + "Lindgren", + "Laflamme", + "Greathouse", + "Fite", + "Ferrari", + "Calabrese", + "Bayne", + "Yamamoto", + "Wick", + "Townes", + "Thames", + "Steel", + "Reinhart", + "Peeler", + "Naranjo", + "Montez", + "Mcdade", + "Mast", + "Markley", + "Marchand", + "Leeper", + "Kong", + "Kellum", + "Hudgens", + "Hennessey", + "Hadden", + "Guess", + "Gainey", + "Coppola", + "Borrego", + "Bolling", + "Beane", + "Ault", + "Slaton", + "Poland", + "Pape", + "Null", + "Mulkey", + "Lightner", + "Langer", + "Hillard", + "Glasgow", + "Fabian", + "Ethridge", + "Enright", + "Derosa", + "Baskin", + "Alfred", + "Weinberg", + "Turman", + "Tinker", + "Somerville", + "Pardo", + "Noll", + "Lashley", + "Ingraham", + "Hiller", + "Hendon", + "Glaze", + "Flora", + "Cothran", + "Cooksey", + "Conte", + "Carrico", + "Apple", + "Abner", + "Wooley", + "Swope", + "Summerlin", + "Sturgis", + "Sturdivant", + "Stott", + "Spurgeon", + "Spillman", + "Speight", + "Roussel", + "Popp", + "Nutter", + "Mckeon", + "Mazza", + "Magnuson", + "Lanning", + "Kozak", + "Jankowski", + "Heyward", + "Forster", + "Corwin", + "Callaghan", + "Bays", + "Wortham", + "Usher", + "Theriot", + "Sayers", + "Sabo", + "Rupert", + "Poling", + "Nathan", + "Loya", + "Lieberman", + "Levi", + "Laroche", + "Labelle", + "Howes", + "Harr", + "Garay", + "Fogarty", + "Everson", + "Durkin", + "Dominquez", + "Chaves", + "Chambliss", + "Alfonso", + "Witcher", + "Wilber", + "Vieira", + "Vandiver", + "Terrill", + "Stoker", + "Schreiner", + "Nestor", + "Moorman", + "Liddell", + "Lew", + "Lawhorn", + "Krug", + "Irons", + "Hylton", + "Hollenbeck", + "Herrin", + "Hembree", + "Hair", + "Goolsby", + "Goodin", + "Gilmer", + "Foltz", + "Dinkins", + "Daughtry", + "Caban", + "Brim", + "Briley", + "Bilodeau", + "Bear", + "Wyant", + "Vergara", + "Tallent", + "Swearingen", + "Stroup", + "Sherry", + "Scribner", + "Roger", + "Quillen", + "Pitman", + "Monaco", + "Mccants", + "Maxfield", + "Martinson", + "Landon", + "Holtz", + "Flournoy", + "Brookins", + "Brody", + "Baumgardner", + "Angelo", + "Straub", + "Sills", + "Roybal", + "Roundtree", + "Oswalt", + "Money", + "Mcgriff", + "Mcdougall", + "Mccleary", + "Maggard", + "Gragg", + "Gooding", + "Godinez", + "Doolittle", + "Donato", + "Cowell", + "Cassell", + "Bracken", + "Appel", + "Ahmad", + "Zambrano", + "Reuter", + "Perea", + "Olive", + "Nakamura", + "Monaghan", + "Mickens", + "Mcclinton", + "Mcclary", + "Marler", + "Kish", + "Judkins", + "Gilbreath", + "Freese", + "Flanigan", + "Felts", + "Erdmann", + "Dodds", + "Chew", + "Brownell", + "Brazil", + "Boatright", + "Barreto", + "Slayton", + "Sandberg", + "Saldivar", + "Pettway", + "Odum", + "Narvaez", + "Moultrie", + "Montemayor", + "Merrell", + "Lees", + "Keyser", + "Hoke", + "Hardaway", + "Hannan", + "Gilbertson", + "Fogg", + "Dumont", + "Deberry", + "Coggins", + "Carrera", + "Buxton", + "Bucher", + "Broadnax", + "Beeson", + "Araujo", + "Appleton", + "Amundson", + "Aguayo", + "Ackley", + "Yocum", + "Worsham", + "Shivers", + "Shelly", + "Sanches", + "Sacco", + "Robey", + "Rhoden", + "Pender", + "Ochs", + "Mccurry", + "Madera", + "Luong", + "Luis", + "Knotts", + "Jackman", + "Heinrich", + "Hargrave", + "Gault", + "Forest", + "Comeaux", + "Chitwood", + "Child", + "Caraway", + "Boettcher", + "Bernhardt", + "Barrientos", + "Zink", + "Wickham", + "Whiteman", + "Thorp", + "Stillman", + "Settles", + "Schoonover", + "Roque", + "Riddell", + "Rey", + "Pilcher", + "Phifer", + "Novotny", + "Maple", + "Macleod", + "Hardee", + "Haase", + "Grider", + "Fredrick", + "Earnest", + "Doucette", + "Clausen", + "Christmas", + "Bevins", + "Beamon", + "Badillo", + "Tolley", + "Tindall", + "Soule", + "Snook", + "Sebastian", + "Seale", + "Pitcher", + "Pinkney", + "Pellegrino", + "Nowell", + "Nemeth", + "Nail", + "Mondragon", + "Mclane", + "Lundgren", + "Ingalls", + "Hudspeth", + "Hixson", + "Gearhart", + "Furlong", + "Downes", + "Dionne", + "Dibble", + "Deyoung", + "Cornejo", + "Camara", + "Brookshire", + "Boyette", + "Wolcott", + "Tracey", + "Surratt", + "Sellars", + "Segal", + "Salyer", + "Reeve", + "Rausch", + "Philips", + "Labonte", + "Haro", + "Gower", + "Freeland", + "Fawcett", + "Eads", + "Driggers", + "Donley", + "Collett", + "Cage", + "Bromley", + "Boatman", + "Ballinger", + "Baldridge", + "Volz", + "Trombley", + "Stonge", + "Silas", + "Shanahan", + "Rivard", + "Rhyne", + "Pedroza", + "Matias", + "Mallard", + "Jamieson", + "Hedgepeth", + "Hartnett", + "Estevez", + "Eskridge", + "Denman", + "Chiu", + "Chinn", + "Catlett", + "Carmack", + "Buie", + "Book", + "Bechtel", + "Beardsley", + "Bard", + "Ballou", + "Windsor", + "Ulmer", + "Storm", + "Skeen", + "Robledo", + "Rincon", + "Reitz", + "Piazza", + "Pearl", + "Munger", + "Moten", + "Mcmichael", + "Loftus", + "Ledet", + "Kersey", + "Groff", + "Fowlkes", + "Folk", + "Crumpton", + "Collette", + "Clouse", + "Bettis", + "Villagomez", + "Timmerman", + "Strom", + "Saul", + "Santoro", + "Roddy", + "Phillip", + "Penrod", + "Musselman", + "Macpherson", + "Leboeuf", + "Harless", + "Haddad", + "Guido", + "Golding", + "Fulkerson", + "Fannin", + "Dulaney", + "Dowdell", + "Deane", + "Cottle", + "Ceja", + "Cate", + "Bosley", + "Benge", + "Albritton", + "Voigt", + "Trowbridge", + "Soileau", + "Seely", + "Rome", + "Rohde", + "Pearsall", + "Paulk", + "Orth", + "Nason", + "Mota", + "Mcmullin", + "Marquardt", + "Madigan", + "Hoag", + "Gillum", + "Gayle", + "Gabbard", + "Fenwick", + "Fender", + "Eck", + "Danforth", + "Cushing", + "Cress", + "Creed", + "Cazares", + "Casanova", + "Bey", + "Bettencourt", + "Barringer", + "Baber", + "Stansberry", + "Schramm", + "Rutter", + "Rivero", + "Race", + "Oquendo", + "Necaise", + "Mouton", + "Montenegro", + "Miley", + "Mcgough", + "Marra", + "Macmillan", + "Lock", + "Lamontagne", + "Jasso", + "Jaime", + "Horst", + "Hetrick", + "Heilman", + "Gaytan", + "Gall", + "Fried", + "Fortney", + "Eden", + "Dingle", + "Desjardins", + "Dabbs", + "Burbank", + "Brigham", + "Breland", + "Beaman", + "Banner", + "Arriola", + "Yarborough", + "Wallin", + "Treat", + "Toscano", + "Stowers", + "Reiss", + "Pichardo", + "Orton", + "Mitchel", + "Michels", + "Mcnamee", + "Mccrory", + "Leatherman", + "Kell", + "Keister", + "Jerome", + "Horning", + "Hargett", + "Guay", + "Friday", + "Ferro", + "Deboer", + "Dagostino", + "Clemente", + "Christ", + "Carper", + "Bowler", + "Blanks", + "Beaudry", + "Willie", + "Towle", + "Tafoya", + "Stricklin", + "Strader", + "Soper", + "Sonnier", + "Sigmon", + "Schenk", + "Saddler", + "Rodman", + "Pedigo", + "Mendes", + "Lunn", + "Lohr", + "Lahr", + "Kingsbury", + "Jarman", + "Hume", + "Holliman", + "Hofmann", + "Haworth", + "Harrelson", + "Hambrick", + "Flick", + "Edmunds", + "Dacosta", + "Crossman", + "Colston", + "Chaplin", + "Carrell", + "Budd", + "Weiler", + "Waits", + "Viola", + "Valentino", + "Trantham", + "Tarr", + "Straight", + "Solorio", + "Roebuck", + "Powe", + "Plank", + "Pettus", + "Palm", + "Pagano", + "Mink", + "Luker", + "Leathers", + "Joslin", + "Hartzell", + "Gambrell", + "Fears", + "Deutsch", + "Cepeda", + "Carty", + "Caputo", + "Brewington", + "Bedell", + "Ballew", + "Applewhite", + "Warnock", + "Walz", + "Urena", + "Tudor", + "Reel", + "Pigg", + "Parton", + "Mickelson", + "Meagher", + "Mclellan", + "Mcculley", + "Mandel", + "Leech", + "Lavallee", + "Kraemer", + "Kling", + "Kipp", + "Kingston", + "Kehoe", + "Hochstetler", + "Harriman", + "Gregoire", + "Grabowski", + "Gosselin", + "Gammon", + "Fancher", + "Edens", + "Desai", + "Butt", + "Brannan", + "Armendariz", + "Woolsey", + "Whitehouse", + "Whetstone", + "Ussery", + "Towne", + "Tower", + "Testa", + "Tallman", + "Studer", + "Strait", + "Steinmetz", + "Sorrells", + "Sauceda", + "Rolfe", + "Rae", + "Paddock", + "Mitchem", + "Mcginn", + "Mccrea", + "Luck", + "Lovato", + "Ling", + "Hazen", + "Gilpin", + "Gaynor", + "Fike", + "Devoe", + "Delrio", + "Curiel", + "Burkhardt", + "Bristol", + "Bode", + "Backus", + "Alton", + "Zinn", + "Watanabe", + "Wachter", + "Vanpelt", + "Turnage", + "Shaner", + "Schroder", + "Sato", + "Riordan", + "Quimby", + "Portis", + "Natale", + "Mckoy", + "Mccown", + "Marker", + "Lucio", + "Kilmer", + "Karl", + "Hotchkiss", + "Hesse", + "Halbert", + "Gwinn", + "Godsey", + "Desmond", + "Delisle", + "Chrisman", + "Canter", + "Brook", + "Arbogast", + "Angell", + "Acree", + "Yancy", + "Woolley", + "Wesson", + "Weatherspoon", + "Trainor", + "Stockman", + "Spiller", + "Sipe", + "Rooks", + "Reavis", + "Propst", + "Porras", + "Neilson", + "Mullens", + "Loucks", + "Llewellyn", + "Lamont", + "Kumar", + "Koester", + "Klingensmith", + "Kirsch", + "Kester", + "Honaker", + "Hodson", + "Hennessy", + "Helmick", + "Garrity", + "Garibay", + "Fee", + "Drain", + "Casarez", + "Callis", + "Botello", + "Bay", + "Aycock", + "Avant", + "Angle", + "Wingard", + "Wayman", + "Tully", + "Theisen", + "Szymanski", + "Stansbury", + "Segovia", + "Rudy", + "Rainwater", + "Preece", + "Pirtle", + "Padron", + "Mincey", + "Mckelvey", + "Mathes", + "Marty", + "Larrabee", + "Kornegay", + "Klug", + "Judy", + "Ingersoll", + "Hecht", + "Germain", + "Eggers", + "Dykstra", + "Denis", + "Deering", + "Decoteau", + "Deason", + "Dearing", + "Cofield", + "Carrigan", + "Brush", + "Bonham", + "Bahr", + "Aucoin", + "Appleby", + "Almonte", + "Yager", + "Womble", + "Wimmer", + "Weimer", + "Vanderpool", + "Stancil", + "Sprinkle", + "Romine", + "Remington", + "Pfaff", + "Peckham", + "Olivera", + "Meraz", + "Maze", + "Lathrop", + "Koehn", + "Jonas", + "Hazelton", + "Halvorson", + "Hallock", + "Haddock", + "Ducharme", + "Dehaven", + "Colton", + "Caruthers", + "Brehm", + "Bosworth", + "Bost", + "Blow", + "Bias", + "Beeman", + "Basile", + "Bane", + "Aikens", + "Zachary", + "Wold", + "Walther", + "Tabb", + "Suber", + "Strawn", + "Stocks", + "Stocker", + "Shirey", + "Schlosser", + "Salvador", + "Riedel", + "Rembert", + "Reimer", + "Pyles", + "Pickle", + "Peele", + "Merriweather", + "Letourneau", + "Latta", + "Kidder", + "Hixon", + "Hillis", + "Hight", + "Herbst", + "Henriquez", + "Haygood", + "Hamill", + "Gabel", + "Fritts", + "Eubank", + "Duty", + "Dawes", + "Correll", + "Coffee", + "Cha", + "Bushey", + "Buchholz", + "Brotherton", + "Bridge", + "Botts", + "Barnwell", + "Auger", + "Atchley", + "Westphal", + "Veilleux", + "Ulloa", + "Truman", + "Stutzman", + "Shriver", + "Ryals", + "Prior", + "Pilkington", + "Newport", + "Moyers", + "Miracle", + "Marrs", + "Mangrum", + "Maddux", + "Lockard", + "Laing", + "Kuhl", + "Harney", + "Hammock", + "Hamlett", + "Felker", + "Doerr", + "Depriest", + "Carrasquillo", + "Carothers", + "Bogle", + "Blood", + "Bischoff", + "Bergen", + "Albanese", + "Wyckoff", + "Vermillion", + "Vansickle", + "Thibault", + "Tetreault", + "Stickney", + "Shoemake", + "Ruggiero", + "Rawson", + "Racine", + "Philpot", + "Paschal", + "Mcelhaney", + "Mathison", + "Legrand", + "Lapierre", + "Kwan", + "Kremer", + "Jiles", + "Hilbert", + "Geyer", + "Faircloth", + "Ehlers", + "Egbert", + "Desrosiers", + "Dalrymple", + "Cotten", + "Cashman", + "Cadena", + "Breeding", + "Boardman", + "Alcaraz", + "Ahn", + "Wyrick", + "Therrien", + "Tankersley", + "Strickler", + "Puryear", + "Plourde", + "Pattison", + "Pardue", + "Milan", + "Mcginty", + "Mcevoy", + "Landreth", + "Kuhns", + "Koon", + "Hewett", + "Giddens", + "Everette", + "Emerick", + "Eades", + "Deangelis", + "Cosme", + "Ceballos", + "Birdsong", + "Benham", + "Bemis", + "Armour", + "Anguiano", + "Angeles", + "Welborn", + "Tsosie", + "Storms", + "Shoup", + "Sessoms", + "Samaniego", + "Rood", + "Rojo", + "Rhinehart", + "Raby", + "Northcutt", + "Myer", + "Munguia", + "Morehouse", + "More", + "Mcdevitt", + "Mateo", + "Mallett", + "Lozada", + "Lemoine", + "Kuehn", + "Hallett", + "Grim", + "Gillard", + "Gaylor", + "Garman", + "Gallaher", + "Feaster", + "Faris", + "Darrow", + "Dardar", + "Coney", + "Carreon", + "Byron", + "Braithwaite", + "Boylan", + "Boyett", + "Born", + "Bixler", + "Bigham", + "Benford", + "Barragan", + "Barnum", + "Zuber", + "Wyche", + "Westcott", + "Vining", + "Stoltzfus", + "Simonds", + "Shupe", + "Sabin", + "Ruble", + "Rittenhouse", + "Richman", + "Perrone", + "Mulholland", + "Millan", + "Meister", + "Mathew", + "Lomeli", + "Kite", + "Jemison", + "Hulett", + "Holler", + "Hickerson", + "Herold", + "Hazelwood", + "Griffen", + "Gause", + "Forde", + "Eisenberg", + "Dilworth", + "Charron", + "Chaisson", + "Brodie", + "Bristow", + "Breunig", + "Brace", + "Boutwell", + "Bentz", + "Belk", + "Bayless", + "Batchelder", + "Baran", + "Baeza", + "Zimmermann", + "Weathersby", + "Volk", + "Toole", + "Theis", + "Tedesco", + "Shine", + "Searle", + "Schenck", + "Satterwhite", + "Sandy", + "Ruelas", + "Royce", + "Rankins", + "Partida", + "Nesbit", + "Morel", + "Menchaca", + "Levasseur", + "Kaylor", + "Johnstone", + "Hulse", + "Hollar", + "Hersey", + "Harrigan", + "Harbison", + "Guyer", + "Gish", + "Giese", + "Gerlach", + "Geller", + "Geisler", + "Falcone", + "Ernest", + "Elwell", + "Doucet", + "Deese", + "Darr", + "Corder", + "Chafin", + "Byler", + "Bussell", + "Burdett", + "Brasher", + "Bowe", + "Bellinger", + "Bastian", + "Barner", + "Alleyne", + "Wilborn", + "Weil", + "Wegner", + "Wales", + "Tatro", + "Spitzer", + "Smithers", + "Schoen", + "Resendez", + "Pete", + "Parisi", + "Overman", + "Obrian", + "Mudd", + "Moy", + "Mclaren", + "Mahler", + "Maggio", + "Lindner", + "Lalonde", + "Lacasse", + "Laboy", + "Killion", + "Kahl", + "Jessen", + "Jamerson", + "Houk", + "Henshaw", + "Gustin", + "Groom", + "Graber", + "Durst", + "Duenas", + "Davey", + "Cundiff", + "Conlon", + "Colunga", + "Coakley", + "Chiles", + "Capers", + "Buell", + "Bricker", + "Bissonnette", + "Birmingham", + "Bartz", + "Bagby", + "Zayas", + "Volpe", + "Treece", + "Toombs", + "Thom", + "Terrazas", + "Swinney", + "Skiles", + "Silveira", + "Shouse", + "Senn", + "Rambo", + "Ramage", + "Nez", + "Moua", + "Marlin", + "Malik", + "Langham", + "Kyles", + "Holston", + "Hoagland", + "Herd", + "Hector", + "Feller", + "Emory", + "Denison", + "Corliss", + "Carraway", + "Burford", + "Bickel", + "Ambriz", + "Abercrombie", + "Yamada", + "Winner", + "Weidner", + "Waddle", + "Verduzco", + "Thurmond", + "Swindle", + "Schrock", + "Sanabria", + "Rosenberger", + "Probst", + "Peabody", + "Olinger", + "Neighbors", + "Nazario", + "Mccafferty", + "Mcbroom", + "Mcabee", + "Mazur", + "Matherne", + "Mapes", + "Leverett", + "Killingsworth", + "Heisler", + "Griego", + "Grande", + "Gosnell", + "Frankel", + "Franke", + "Ferrante", + "Fenn", + "Elmer", + "Ehrlich", + "Christopherso", + "Chick", + "Chasse", + "Chancellor", + "Caton", + "Brunelle", + "Bly", + "Bloomfield", + "Babbitt", + "Azevedo", + "Abramson", + "Ables", + "Abeyta", + "Youmans", + "Wozniak", + "Wainwright", + "Summer", + "Stowell", + "Smitherman", + "Sites", + "Samuelson", + "Runge", + "Rule", + "Rothman", + "Rosenfeld", + "Quan", + "Peake", + "Oxford", + "Owings", + "Olmos", + "Munro", + "Moreira", + "Leatherwood", + "Larkins", + "Krantz", + "Kovacs", + "Kizer", + "Kindred", + "Karnes", + "Jaffe", + "Hubbell", + "Hosey", + "Hauck", + "Harold", + "Goodell", + "Favors", + "Erdman", + "Dvorak", + "Doane", + "Cureton", + "Cofer", + "Buehler", + "Bierman", + "Berndt", + "Banta", + "Annis", + "Abram", + "Abdullah", + "Warwick", + "Waltz", + "Turcotte", + "Trinh", + "Torrey", + "Stith", + "Seger", + "Sachs", + "Quesada", + "Pinder", + "Peppers", + "Pascual", + "Paschall", + "Parkhurst", + "Ozuna", + "Oster", + "Nicholls", + "Mortimer", + "Lheureux", + "Lavalley", + "Kimura", + "Jablonski", + "Haun", + "Gourley", + "Gilligan", + "Fix", + "Derby", + "Croy", + "Cotto", + "Cargill", + "Burwell", + "Burgett", + "Buckman", + "Brett", + "Booher", + "Adorno", + "Wrenn", + "Whittemore", + "Urias", + "Szabo", + "Sayles", + "Saiz", + "Rutland", + "Rael", + "Plant", + "Pharr", + "Penney", + "Pelkey", + "Ogrady", + "Nickell", + "Musick", + "Moats", + "Mather", + "Massa", + "Laurent", + "Kirschner", + "Kieffer", + "Kellar", + "Hendershot", + "Gott", + "Godoy", + "Gadson", + "Furtado", + "Fiedler", + "Erskine", + "Edison", + "Dutcher", + "Dever", + "Daggett", + "Chevalier", + "Chao", + "Brake", + "Ballesteros", + "Amerson", + "Alejandro", + "Wingo", + "Waldon", + "Trott", + "Spikes", + "Silvey", + "Showers", + "Schlegel", + "Rue", + "Ritz", + "Pepin", + "Pelayo", + "Parsley", + "Palermo", + "Moorehead", + "Mchale", + "Lett", + "Kocher", + "Kilburn", + "Iglesias", + "Humble", + "Hulbert", + "Huckaby", + "Hix", + "Haven", + "Hartford", + "Hardiman", + "Gurney", + "Grigg", + "Grasso", + "Goings", + "Fillmore", + "Farber", + "Depew", + "Dandrea", + "Dame", + "Cowen", + "Covarrubias", + "Cory", + "Burrus", + "Bracy", + "Ardoin", + "Thompkins", + "Suzuki", + "Standley", + "Russel", + "Radcliffe", + "Pohl", + "Persaud", + "Percy", + "Parenteau", + "Pabon", + "Newson", + "Newhouse", + "Napolitano", + "Mulcahy", + "Maya", + "Malave", + "Keim", + "Hooten", + "Hernandes", + "Heffernan", + "Hearne", + "Greenleaf", + "Glick", + "Fuhrman", + "Fetter", + "Faria", + "Dishman", + "Dickenson", + "Crites", + "Criss", + "Clapper", + "Chenault", + "Castor", + "Casto", + "Bugg", + "Bove", + "Bonney", + "Blessing", + "Ard", + "Anderton", + "Allgood", + "Alderson", + "Woodman", + "Wisdom", + "Warrick", + "Toomey", + "Tooley", + "Tarrant", + "Summerville", + "Stebbins", + "Sokol", + "Sink", + "Searles", + "Schutz", + "Schumann", + "Scheer", + "Remillard", + "Raper", + "Proulx", + "Palmore", + "Monroy", + "Miguel", + "Messier", + "Melo", + "Melanson", + "Mashburn", + "Manzano", + "Lussier", + "Lovely", + "Lien", + "Jenks", + "Huneycutt", + "Hartwig", + "Grimsley", + "Fulk", + "Fielding", + "Fidler", + "Engstrom", + "Eldred", + "Dantzler", + "Crandell", + "Ching", + "Calder", + "Brumley", + "Breton", + "Brann", + "Bramlett", + "Boykins", + "Bianco", + "Bancroft", + "Almaraz", + "Alcantar", + "Whitmer", + "Whitener", + "Welton", + "Vineyard", + "Su", + "Rahn", + "Paquin", + "Mizell", + "Mix", + "Mcmillin", + "Mckean", + "Marston", + "Maciel", + "Lundquist", + "Louie", + "Liggins", + "Lampkin", + "Kranz", + "Koski", + "Kirkham", + "Jiminez", + "Hazzard", + "Harrod", + "Graziano", + "Grammer", + "Gendron", + "Garrido", + "Fordham", + "Englert", + "Elwood", + "Dryden", + "Demoss", + "Deluna", + "Crabb", + "Comeau", + "Claudio", + "Brummett", + "Blume", + "Benally", + "Wessel", + "Vanbuskirk", + "Thorson", + "Stumpf", + "Stockwell", + "Rocco", + "Reams", + "Radtke", + "Rackley", + "Pelton", + "Niemi", + "Newland", + "Nelsen", + "Morrissette", + "Miramontes", + "Mcginley", + "Mccluskey", + "Marley", + "Marchant", + "Luevano", + "Lampe", + "Lail", + "Jeffcoat", + "Infante", + "Hu", + "Hinman", + "Gaona", + "Erb", + "Eady", + "Desmarais", + "Decosta", + "Dansby", + "Cisco", + "Choe", + "Breckenridge", + "Bostwick", + "Borg", + "Bianchi", + "Beer", + "Alberts", + "Adrian", + "Wilkie", + "Whorton", + "Vargo", + "Tait", + "Sylvia", + "Soucy", + "Schuman", + "Ousley", + "Mumford", + "Lum", + "Lippert", + "Leath", + "Lavergne", + "Laliberte", + "Kirksey", + "Kenner", + "Johnsen", + "Izzo", + "Hiles", + "Gullett", + "Greenwell", + "Gaspar", + "Galbreath", + "Gaitan", + "Ericson", + "Duck", + "Delapaz", + "Croom", + "Cottingham", + "Clift", + "Bushnell", + "Boozer", + "Bice", + "Bernardo", + "Beason", + "Arrowood", + "Waring", + "Voorhees", + "Truax", + "Shreve", + "Shockey", + "Schatz", + "Sandifer", + "Rubino", + "Rozier", + "Roseberry", + "Roll", + "Player", + "Pieper", + "Peden", + "Nester", + "Nave", + "Murphey", + "Malinowski", + "Macgregor", + "Liang", + "Lafrance", + "Kunkle", + "Kirkman", + "Jorge", + "Hipp", + "Hasty", + "Haddix", + "Gervais", + "Gerdes", + "Garfield", + "Gamache", + "Fouts", + "Fitzwater", + "Dillingham", + "Deming", + "Deanda", + "Cedeno", + "Cannady", + "Burson", + "Bouldin", + "Arceneaux", + "Woodhouse", + "Whitford", + "Wescott", + "Welty", + "Weigel", + "Torgerson", + "Toms", + "Surber", + "Sunderland", + "Sterner", + "Setzer", + "Salvatore", + "Riojas", + "Pumphrey", + "Puga", + "Pedro", + "Patch", + "Metts", + "Mcgarry", + "Mccandless", + "Magill", + "Lupo", + "Loveland", + "Llamas", + "Leclerc", + "Koons", + "Kahler", + "Huss", + "Holbert", + "Heintz", + "Haupt", + "Grimmett", + "Gaskill", + "Flower", + "Ellingson", + "Dorr", + "Dingess", + "Deweese", + "Desilva", + "Crossley", + "Cordeiro", + "Converse", + "Conde", + "Cheeks", + "Caldera", + "Cairns", + "Burmeister", + "Burkhalter", + "Brawner", + "Bott", + "Youngs", + "Vierra", + "Valladares", + "Tiffany", + "Shrum", + "Shropshire", + "Sevilla", + "Rusk", + "Roof", + "Rodarte", + "Pedraza", + "Nino", + "Montana", + "Merino", + "Mcminn", + "Markle", + "Mapp", + "Lucia", + "Lajoie", + "Koerner", + "Kittrell", + "Kato", + "Hyder", + "Hollifield", + "Heiser", + "Hazlett", + "Greenwald", + "Fant", + "Eldredge", + "Dreher", + "Delafuente", + "Cravens", + "Claypool", + "Beecher", + "Aronson", + "Alanis", + "Worthen", + "Wojcik", + "Winger", + "Whitacre", + "Wellington", + "Valverde", + "Valdivia", + "Troupe", + "Thrower", + "Swindell", + "Suttles", + "Suh", + "Stroman", + "Spires", + "Slate", + "Shealy", + "Sarver", + "Sartin", + "Sadowski", + "Rondeau", + "Rolon", + "Rick", + "Rex", + "Rascon", + "Priddy", + "Pine", + "Paulino", + "Nolte", + "Munroe", + "Molloy", + "Mellon", + "Mciver", + "Lykins", + "Loggins", + "Lillie", + "Lenoir", + "Klotz", + "Kempf", + "Jone", + "Hupp", + "Hollowell", + "Hollander", + "Haynie", + "Hassan", + "Harkness", + "Harker", + "Gottlieb", + "Frith", + "Eddins", + "Driskell", + "Doggett", + "Densmore", + "Charette", + "Cassady", + "Carrol", + "Byrum", + "Burcham", + "Buggs", + "Benn", + "Whitted", + "Warrington", + "Vandusen", + "Vaillancourt", + "Steger", + "Spell", + "Siebert", + "Scofield", + "Quirk", + "Purser", + "Plumb", + "Orcutt", + "Northern", + "Nordstrom", + "Mosely", + "Michalski", + "Mcphail", + "Mcdavid", + "Mccraw", + "Martini", + "Marchese", + "Mannino", + "Leo", + "Lefevre", + "Largent", + "Lanza", + "Kress", + "Isham", + "Hunsaker", + "Hoch", + "Hildebrandt", + "Guarino", + "Grijalva", + "Graybill", + "Fick", + "Ewell", + "Ewald", + "Deangelo", + "Cusick", + "Crumley", + "Coston", + "Cathcart", + "Carruthers", + "Bullington", + "Brian", + "Bowes", + "Blain", + "Blackford", + "Barboza", + "Yingling", + "Woodland", + "Wert", + "Weiland", + "Varga", + "Silverstein", + "Sievers", + "Shuster", + "Shumway", + "Scudder", + "Runnels", + "Rumsey", + "Renfroe", + "Provencher", + "Polley", + "Mohler", + "Middlebrooks", + "Kutz", + "Koster", + "Korn", + "Grow", + "Groth", + "Glidden", + "Fazio", + "Deen", + "Corn", + "Copper", + "Chipman", + "Chenoweth", + "Champlin", + "Cedillo", + "Carrero", + "Carmody", + "Buckles", + "Brien", + "Boutin", + "Bosch", + "Bill", + "Berkowitz", + "Altamirano", + "Wilfong", + "Wiegand", + "Waites", + "Truesdale", + "Toussaint", + "Tobey", + "Tedder", + "Steelman", + "Sirois", + "Schnell", + "Robichaud", + "Ridge", + "Richburg", + "Pray", + "Plumley", + "Pizarro", + "Piercy", + "Ortego", + "Oberg", + "Neace", + "Music", + "Mickey", + "Mertz", + "Mcnew", + "Matta", + "Lawyer", + "Lapp", + "Lair", + "Kibler", + "Jessie", + "Howlett", + "Hollister", + "Hofer", + "Hatten", + "Hagler", + "Germany", + "Falgoust", + "Engelhardt", + "Eberle", + "Eastwood", + "Dombrowski", + "Dinsmore", + "Daye", + "Cool", + "Casares", + "Capone", + "Braud", + "Balch", + "Autrey", + "Wendel", + "Tyndall", + "Toy", + "Strobel", + "Stoltz", + "Spinelli", + "Serrato", + "Rochester", + "Reber", + "Real", + "Rathbone", + "Palomino", + "Noah", + "Nickels", + "Mayle", + "Mathers", + "Mach", + "Loeffler", + "Littrell", + "Levinson", + "Leong", + "Lemire", + "Lejeune", + "Lazo", + "Lasley", + "Koller", + "Kennard", + "Jester", + "Hoelscher", + "Hintz", + "Hagerman", + "Greaves", + "Fore", + "Eudy", + "Engler", + "Corrales", + "Cordes", + "Brunet", + "Bidwell", + "Bennet", + "Bare", + "Tyrrell", + "Tharpe", + "Swinton", + "Stribling", + "Steven", + "Southworth", + "Sisneros", + "Shane", + "Savoie", + "Samons", + "Ruvalcaba", + "Roscoe", + "Ries", + "Ramer", + "Omara", + "Mosqueda", + "Millar", + "Mcpeak", + "Macomber", + "Luckey", + "Litton", + "Lehr", + "Lavin", + "Hubbs", + "Hoard", + "Hibbs", + "Hagans", + "Futrell", + "Exum", + "Evenson", + "Dicks", + "Culler", + "Chou", + "Carbaugh", + "Callen", + "Brashear", + "Bloomer", + "Blakeney", + "Bigler", + "Addington", + "Woodford", + "Witter", + "Unruh", + "Tolentino", + "Sumrall", + "Stgermain", + "Smock", + "Sherer", + "Salem", + "Rochelle", + "Rayner", + "Pooler", + "Oquinn", + "Nero", + "Milano", + "Mcglothlin", + "Mars", + "Linden", + "Kowal", + "Kerrigan", + "Ibrahim", + "Harvell", + "Hanrahan", + "Goodall", + "Geist", + "Fussell", + "Fung", + "Ferebee", + "Federico", + "Eley", + "Eggert", + "Dorsett", + "Dingman", + "Destefano", + "Colucci", + "Clemmer", + "Caesar", + "Burnell", + "Brumbaugh", + "Boddie", + "Berryhill", + "Avelar", + "Alcantara", + "Abbey", + "Winder", + "Winchell", + "Vandenberg", + "Trotman", + "Thurber", + "Thibeault", + "Stlouis", + "Stilwell", + "Sperling", + "Shattuck", + "Sarmiento", + "Ruppert", + "Rumph", + "Renaud", + "Randazzo", + "Rademacher", + "Quiles", + "Pearman", + "Palomo", + "Mercurio", + "Lowrey", + "Lindeman", + "Lawlor", + "Larosa", + "Lander", + "Labrecque", + "Kimber", + "Hovis", + "Holifield", + "Henninger", + "Hawkes", + "Hartfield", + "Hann", + "Hague", + "Genovese", + "Garrick", + "Fudge", + "Frink", + "Eddings", + "Dinh", + "Dear", + "Cutter", + "Cribbs", + "Constant", + "Calvillo", + "Bunton", + "Brodeur", + "Bolding", + "Blanding", + "Agosto", + "Zahn", + "Wiener", + "Trussell", + "Tew", + "Tello", + "Teixeira", + "Stephan", + "Speck", + "Sharma", + "Shanklin", + "Sealy", + "Scanlan", + "Santamaria", + "Roundy", + "Robichaux", + "Ringer", + "Rigney", + "Prevost", + "Polson", + "Philip", + "Pass", + "Nord", + "Moxley", + "Mohammed", + "Medford", + "Mccaslin", + "Mcardle", + "Macarthur", + "Lewin", + "Lasher", + "Ketcham", + "Keiser", + "Heine", + "Hackworth", + "Grose", + "Grizzle", + "Grass", + "Gillman", + "Gartner", + "Garth", + "Frazee", + "Fleury", + "Fast", + "Edson", + "Edmonson", + "Derry", + "Deck", + "Cronk", + "Conant", + "Burress", + "Burgin", + "Broom", + "Brockington", + "Bolick", + "Boger", + "Birchfield", + "Billington", + "Baily", + "Bahena", + "Armbruster", + "Anson", + "Yoho", + "Wilcher", + "Tinney", + "Timberlake", + "Thoma", + "Thielen", + "Sutphin", + "Stultz", + "Sikora", + "Serra", + "Schulman", + "Scheffler", + "Santillan", + "Robin", + "Rego", + "Preciado", + "Pinkham", + "Monday", + "Mickle", + "Luu", + "Lomas", + "Lizotte", + "Lent", + "Lenard", + "Kellerman", + "Keil", + "Juan", + "Johanson", + "Hernadez", + "Hartsfield", + "Hang", + "Haber", + "Gorski", + "Farkas", + "Eberhardt", + "Duquette", + "Delano", + "Cropper", + "Cozart", + "Cockerham", + "Chamblee", + "Cartagena", + "Cahoon", + "Buzzell", + "Brister", + "Brewton", + "Blackshear", + "Benfield", + "Aston", + "Ashburn", + "Arruda", + "Wetmore", + "Weise", + "Vaccaro", + "Tucci", + "Sudduth", + "Stromberg", + "Stoops", + "Showalter", + "Shears", + "Runion", + "Rowden", + "Rosenblum", + "Riffle", + "Renfrow", + "Peres", + "Obryant", + "Nicolas", + "Leftwich", + "Lark", + "Landeros", + "Kistler", + "Killough", + "Kerley", + "Kastner", + "Hoggard", + "Hartung", + "Guertin", + "Govan", + "Gatling", + "Gailey", + "Fullmer", + "Fulford", + "Flatt", + "Esquibel", + "Endicott", + "Edmiston", + "Edelstein", + "Dufresne", + "Dressler", + "Dickman", + "Chee", + "Busse", + "Bonnett", + "Bogart", + "Berard", + "Barrington", + "Arena", + "Anton", + "Yoshida", + "Velarde", + "Veach", + "Vanhouten", + "Vachon", + "Tolson", + "Tolman", + "Tennyson", + "Stites", + "Soler", + "Shutt", + "Ruggles", + "Rhone", + "Pegues", + "Ong", + "Neese", + "Muro", + "Moncrief", + "Mefford", + "Mcphee", + "Mcmorris", + "Mceachern", + "Mcclurg", + "Mansour", + "Mai", + "Mader", + "Leija", + "Lecompte", + "Lafountain", + "Labrie", + "Jaquez", + "Heald", + "Hash", + "Hartle", + "Gainer", + "Frisby", + "Farina", + "Eidson", + "Edgerton", + "Dyke", + "Durrett", + "Duhon", + "Cuomo", + "Cobos", + "Cervantez", + "Bybee", + "Brockway", + "Borowski", + "Binion", + "Beery", + "Arguello", + "Amaro", + "Acton", + "Yuen", + "Winton", + "Wigfall", + "Weekley", + "Vidrine", + "Vannoy", + "Tardiff", + "Shoop", + "Shilling", + "Schick", + "Sand", + "Safford", + "Prendergast", + "Pilgrim", + "Pellerin", + "Osuna", + "Nissen", + "Nalley", + "Moritz", + "Moller", + "Messner", + "Messick", + "Merry", + "Merrifield", + "Mcguinness", + "Matherly", + "Marcano", + "Mahone", + "Lemos", + "Lebrun", + "Jara", + "Hoffer", + "Hewlett", + "Herren", + "Hecker", + "Haws", + "Haug", + "Hack", + "Gwin", + "Gober", + "Gilliard", + "Fredette", + "Favela", + "Echeverria", + "Downer", + "Donofrio", + "Desrochers", + "Dee", + "Crozier", + "Corson", + "Clyde", + "Bechtold", + "Argueta", + "Aparicio", + "Zamudio", + "Willette", + "Westover", + "Westerman", + "Utter", + "Troyer", + "Thies", + "Tapley", + "Slavin", + "Shirk", + "Sandler", + "Roop", + "Rimmer", + "Raymer", + "Range", + "Radcliff", + "Otten", + "Moorer", + "Millet", + "Mckibben", + "Mccutchen", + "Mcavoy", + "Mcadoo", + "Mayorga", + "Mastin", + "Martineau", + "Marek", + "Madore", + "Leflore", + "Kroeger", + "Kennon", + "Jimerson", + "Javier", + "Hostetter", + "Hornback", + "Hendley", + "Hance", + "Guardado", + "Granado", + "Gowen", + "Goodale", + "Flinn", + "Fleetwood", + "Fitz", + "Durkee", + "Duprey", + "Dipietro", + "Dilley", + "Clyburn", + "Brawley", + "Beckley", + "Arana", + "Weatherby", + "Vollmer", + "Victoria", + "Vestal", + "Tunnell", + "Trigg", + "Tingle", + "Takahashi", + "Sweatt", + "Storer", + "Snapp", + "Shiver", + "Rooker", + "Red", + "Rathbun", + "Poisson", + "Perrine", + "Perri", + "Pastor", + "Parmer", + "Parke", + "Pare", + "Papa", + "Palmieri", + "Nottingham", + "Midkiff", + "Mecham", + "Mccomas", + "Mcalpine", + "Lovelady", + "Lillard", + "Lally", + "Knopp", + "Kile", + "Kiger", + "Haile", + "Gupta", + "Goldsberry", + "Gilreath", + "Fulks", + "Friesen", + "Franzen", + "Flack", + "Findlay", + "Ferland", + "Dreyer", + "Dore", + "Dennard", + "Deckard", + "Debose", + "Crim", + "Coulombe", + "Cork", + "Chancey", + "Cantor", + "Branton", + "Bissell", + "Barns", + "Woolard", + "Witham", + "Wasserman", + "Waldo", + "Spiegel", + "Shoffner", + "Scholz", + "Ruch", + "Rossman", + "Ready", + "Petry", + "Palacio", + "Paez", + "Neary", + "Mortenson", + "Millsap", + "Miele", + "Mick", + "Menke", + "Mckim", + "Mcanally", + "Martines", + "Manor", + "Malcom", + "Lemley", + "Larochelle", + "Klaus", + "Klatt", + "Kaufmann", + "Kapp", + "Helmer", + "Hedge", + "Halloran", + "Glisson", + "Frechette", + "Fontana", + "Enoch", + "Eagan", + "Drum", + "Distefano", + "Danley", + "Creekmore", + "Chartier", + "Chaffee", + "Carillo", + "Burg", + "Bolinger", + "Berkley", + "Benz", + "Basso", + "Bash", + "Barrier", + "Zelaya", + "Woodring", + "Witkowski", + "Wilmot", + "Wilkens", + "Wieland", + "Virgil", + "Verdugo", + "Urquhart", + "Tsai", + "Timms", + "Swiger", + "Swaim", + "Sussman", + "Scarlett", + "Pires", + "Molnar", + "Mcatee", + "Maurice", + "Lowder", + "Loos", + "Linker", + "Landes", + "Kingery", + "Keeley", + "Hufford", + "Higa", + "Hendren", + "Hammack", + "Hamann", + "Gillam", + "Gerhardt", + "Fell", + "Eugene", + "Edelman", + "Eby", + "Delk", + "Deans", + "Curl", + "Constantine", + "Cleaver", + "Claar", + "Casiano", + "Carruth", + "Carlyle", + "Bump", + "Brophy", + "Bolanos", + "Bibbs", + "Bessette", + "Beggs", + "Baugher", + "Bartel", + "Averill", + "Andresen", + "Amin", + "Alden", + "Adames", + "Wildman", + "Via", + "Valente", + "Turnbow", + "Tse", + "Swink", + "Sublett", + "Stroh", + "Stringfellow", + "Ridgway", + "Pugliese", + "Poteat", + "Pang", + "Ohare", + "Neubauer", + "Murchison", + "Mohamed", + "Mingo", + "Lucky", + "Lemmons", + "Kwon", + "Kellam", + "Kean", + "Jarmon", + "Hyden", + "Hudak", + "Hollinger", + "Henkel", + "Hemingway", + "Hasson", + "Hansel", + "Halter", + "Haire", + "Goodnight", + "Ginsberg", + "Gillispie", + "Fogel", + "Flory", + "Etter", + "Elledge", + "Eckman", + "Deas", + "Currin", + "Crafton", + "Coomer", + "Colter", + "Claxton", + "Bulter", + "Braddock", + "Bowyer", + "Blizzard", + "Binns", + "Bing", + "Bellows", + "Baskerville", + "Barros", + "Ansley", + "Woolf", + "Wight", + "Waldman", + "Wadley", + "Tull", + "Trull", + "Tesch", + "Struck", + "Stouffer", + "Stadler", + "Slay", + "Shubert", + "Sedillo", + "Santacruz", + "Reinke", + "Raleigh", + "Poynter", + "Neri", + "Neale", + "Natividad", + "Mowry", + "Moralez", + "Monger", + "Mitchum", + "Merryman", + "Manion", + "Macdougall", + "Lux", + "Litchfield", + "Ley", + "Levitt", + "Lepage", + "Lasalle", + "Laine", + "Khoury", + "Kavanagh", + "Karns", + "Ivie", + "Huebner", + "Hodgkins", + "Halpin", + "Garica", + "Eversole", + "Dutra", + "Dunagan", + "Duffey", + "Dillman", + "Dillion", + "Deville", + "Dearborn", + "Damato", + "Courson", + "Coulson", + "Burdine", + "Bryce", + "Bousquet", + "Bonin", + "Bish", + "Atencio", + "Westbrooks", + "Wages", + "Vaca", + "Tye", + "Toner", + "Tomas", + "Tillis", + "Swett", + "Surface", + "Struble", + "Stanfill", + "Son", + "Solorzano", + "Slusher", + "Sipple", + "Sim", + "Silvas", + "Shults", + "Schexnayder", + "Saez", + "Rodas", + "Rager", + "Pulver", + "Plaza", + "Penton", + "Paniagua", + "Meneses", + "Mcfarlin", + "Mcauley", + "Matz", + "Maloy", + "Magruder", + "Lohman", + "Landa", + "Lacombe", + "Jaimes", + "Hom", + "Holzer", + "Holst", + "Heil", + "Hackler", + "Grundy", + "Gregor", + "Gilkey", + "Farnham", + "Durfee", + "Dunton", + "Dunston", + "Duda", + "Dews", + "Dana", + "Craver", + "Corriveau", + "Conwell", + "Colella", + "Chambless", + "Bremer", + "Boutte", + "Bourassa", + "Blaisdell", + "Backman", + "Babineaux", + "Audette", + "Alleman", + "Towner", + "Taveras", + "Tarango", + "Sullins", + "Suiter", + "Stallard", + "Solberg", + "Schlueter", + "Poulos", + "Pimental", + "Owsley", + "Olivier", + "Okelley", + "Nations", + "Moffatt", + "Metcalfe", + "Meekins", + "Medellin", + "Mcglynn", + "Mccowan", + "Marriott", + "Marable", + "Lennox", + "Lamoureux", + "Koss", + "Kerby", + "Karp", + "Jason", + "Isenberg", + "Howze", + "Hockenberry", + "Highsmith", + "Harbour", + "Hallmark", + "Gusman", + "Greeley", + "Giddings", + "Gaudet", + "Gallup", + "Fleenor", + "Eicher", + "Edington", + "Dimaggio", + "Dement", + "Demello", + "Decastro", + "Cruise", + "Bushman", + "Brundage", + "Brooker", + "Brooke", + "Bourg", + "Board", + "Blackstock", + "Bergmann", + "Beaton", + "Banister", + "Argo", + "Appling", + "Wortman", + "Watterson", + "Villalpando", + "Tillotson", + "Tighe", + "Sundberg", + "Sternberg", + "Stamey", + "Speaks", + "Shipe", + "Seeger", + "Scarberry", + "Sattler", + "Sain", + "Rothstein", + "Poteet", + "Plowman", + "Pettiford", + "Penland", + "Peach", + "Partain", + "Pankey", + "Oyler", + "Ogletree", + "Ogburn", + "Moton", + "Million", + "Merkel", + "Mask", + "Markus", + "Lucier", + "Lazarus", + "Lavelle", + "Lakey", + "Kratz", + "Kinser", + "Kershaw", + "Josephson", + "Jesse", + "Imhoff", + "Ibanez", + "Hendry", + "Hammon", + "Frisbie", + "Friedrich", + "Frawley", + "Fraga", + "Forester", + "Eskew", + "Emmert", + "Drennan", + "Doyon", + "Dominick", + "Dandridge", + "Cumming", + "Cawley", + "Carvajal", + "Bracey", + "Belisle", + "Batey", + "Ahner", + "Wysocki", + "Weiser", + "Veliz", + "Tincher", + "Sherlock", + "Santo", + "Sansone", + "Sankey", + "Sandstrom", + "Sale", + "Rohrer", + "Risner", + "Pridemore", + "Pfeffer", + "Persinger", + "Peery", + "Oubre", + "Orange", + "Nowicki", + "Musgrave", + "Murdoch", + "Mullinax", + "Mccary", + "Mathieu", + "Livengood", + "Leonardo", + "Kyser", + "Klink", + "Kimes", + "Kellner", + "Kavanaugh", + "Kasten", + "Imes", + "Hoey", + "Hinshaw", + "Halley", + "Hake", + "Gurule", + "Grube", + "Grillo", + "Geter", + "Gatto", + "Garver", + "Garretson", + "Farwell", + "Eiland", + "Dunford", + "Decarlo", + "Corso", + "Core", + "Colman", + "Collard", + "Cleghorn", + "Chasteen", + "Cavender", + "Carlile", + "Calvo", + "Byerly", + "Brogdon", + "Broadwater", + "Breault", + "Bono", + "Bergin", + "Behr", + "Ballenger", + "Amick", + "Yan", + "Vice", + "Tamez", + "Stiffler", + "Steinke", + "Simmon", + "Shankle", + "Schaller", + "Salmons", + "Sackett", + "Saad", + "Rideout", + "Reader", + "Ratcliffe", + "Rao", + "Ranson", + "Randell", + "Plascencia", + "Petterson", + "Olszewski", + "Olney", + "Olguin", + "Nilsson", + "Nevels", + "Morelli", + "Montiel", + "Monge", + "Michell", + "Michaelson", + "Mertens", + "Mcchesney", + "Mcalpin", + "Mathewson", + "Lower", + "Loudermilk", + "Lineberry", + "Liggett", + "Lamp", + "Kinlaw", + "Kight", + "Just", + "Jost", + "Hereford", + "Hardeman", + "Halpern", + "Halliday", + "Hafer", + "Gaul", + "Friel", + "Freitag", + "Frances", + "Forsberg", + "Evangelista", + "Doering", + "Dicarlo", + "Dendy", + "Delp", + "Deguzman", + "Dameron", + "Curtiss", + "Cousin", + "Cosper", + "Charley", + "Cauthen", + "Cao", + "Camper", + "Bradberry", + "Bouton", + "Bonnell", + "Bixby", + "Bieber", + "Beveridge", + "Belle", + "Bedwell", + "Barhorst", + "Bannon", + "Baltazar", + "Baier", + "Ayotte", + "Attaway", + "Arenas", + "Alex", + "Abrego", + "Watford", + "Valley", + "Turgeon", + "Tunstall", + "Thaxton", + "Thai", + "Tenorio", + "Stotts", + "Sthilaire", + "Spiker", + "Shedd", + "Seng", + "Seabolt", + "Scalf", + "Salyers", + "Ruhl", + "Rowlett", + "Robinett", + "Pfister", + "Perlman", + "Pepe", + "Parkman", + "Paradise", + "Olin", + "Nunnally", + "Norvell", + "Napper", + "Modlin", + "Mckellar", + "Mcclean", + "Mascarenas", + "Manchester", + "Leibowitz", + "Ledezma", + "Kuhlman", + "Kobayashi", + "Hunley", + "Holmquist", + "Hinkley", + "Hazard", + "Hartsell", + "Gribble", + "Gravely", + "Fifield", + "Eliason", + "Doctor", + "Doak", + "Crossland", + "Cover", + "Clair", + "Carleton", + "Butters", + "Bridgeman", + "Bojorquez", + "Boggess", + "Banker", + "Auten", + "Woosley", + "Wine", + "Whiteley", + "Wexler", + "Twomey", + "Tullis", + "Townley", + "To", + "Standridge", + "Stamp", + "Springs", + "Santoyo", + "Rueda", + "Riendeau", + "Revell", + "Pless", + "Ottinger", + "Nigro", + "Nickles", + "Mulvey", + "Menefee", + "Mcshane", + "Mcloughlin", + "Mckinzie", + "Marrow", + "Markey", + "Mariano", + "Lockridge", + "Lipsey", + "Knisley", + "Knepper", + "Kitts", + "Kiel", + "Jinks", + "Hathcock", + "Godin", + "Gallego", + "Fikes", + "Fecteau", + "Estabrook", + "Ellinger", + "Dustin", + "Dunlop", + "Dudek", + "Diego", + "Countryman", + "Chauvin", + "Chatham", + "Bullins", + "Brownfield", + "Boughton", + "Bloodworth", + "Bibb", + "Baucom", + "Barbieri", + "Aubin", + "Armitage", + "Alessi", + "Absher", + "Abbate", + "Zito", + "Woolery", + "Wiggs", + "Wacker", + "Violette", + "Tynes", + "Tolle", + "Telles", + "Tarter", + "Swarey", + "Strode", + "Stockdale", + "Stella", + "Stalnaker", + "Spina", + "Schiff", + "Saari", + "Risley", + "Reading", + "Rameriz", + "Rakes", + "Pettaway", + "Penner", + "Paulus", + "Palladino", + "Omeara", + "Montelongo", + "Melnick", + "Mehta", + "Mcgary", + "Mccourt", + "Mccollough", + "Marchetti", + "Manzanares", + "Lowther", + "Leiva", + "Lauderdale", + "Lafontaine", + "Kowalczyk", + "Knighton", + "Joubert", + "Jaworski", + "Ide", + "Huth", + "Hurdle", + "Hung", + "Housley", + "Hackman", + "Gulick", + "Gordy", + "Gilstrap", + "Gehrke", + "Gebhart", + "Gaudette", + "Foxworth", + "Finger", + "Essex", + "Endres", + "Dunkle", + "Clare", + "Cimino", + "Cardinal", + "Caddell", + "Brauer", + "Braley", + "Bodine", + "Blackmore", + "Belden", + "Backer", + "Ayer", + "Andress", + "Alva", + "Wisner", + "Walk", + "Vuong", + "Valliere", + "Twigg", + "Tso", + "Tavarez", + "Strahan", + "Steib", + "Staub", + "Sowder", + "Shoulders", + "Seiber", + "Schutt", + "Scharf", + "Schade", + "Rodriques", + "Risinger", + "Renshaw", + "Rath", + "Rahman", + "Presnell", + "Pillow", + "Piatt", + "Pasquale", + "Nieman", + "Nicol", + "Nevins", + "Milford", + "Mcilwain", + "Mcgaha", + "Mccully", + "Mccomb", + "Maye", + "Massengale", + "Macedo", + "Lines", + "Lesher", + "Leland", + "Kearse", + "Jauregui", + "Husted", + "Hudnall", + "Holmberg", + "Hertel", + "Hershey", + "Hardie", + "Glidewell", + "Frausto", + "Fassett", + "Dash", + "Dalessandro", + "Dahlgren", + "Corum", + "Constantino", + "Conlin", + "Colquitt", + "Colombo", + "Claycomb", + "Carley", + "Cardin", + "Cancel", + "Buller", + "Boring", + "Boney", + "Bocanegra", + "Blazer", + "Biggers", + "Benedetto", + "Araiza", + "Andino", + "Albin", + "Zorn", + "Werth", + "Weisman", + "Walley", + "Vanegas", + "Ulibarri", + "Towers", + "Towe", + "Tedford", + "Teasley", + "Suttle", + "Steffens", + "Stcyr", + "Squire", + "Smythe", + "Singley", + "Sifuentes", + "Shuck", + "Session", + "Schram", + "Sass", + "Rieger", + "Ridenhour", + "Rickert", + "Richerson", + "Rayborn", + "Rabe", + "Raab", + "Pendley", + "Pastore", + "Ordway", + "Moynihan", + "Mellott", + "Mckissick", + "Mcgann", + "Mccready", + "Mauney", + "Marrufo", + "List", + "Lenhart", + "Lazar", + "Lafave", + "Keele", + "Kautz", + "Jardine", + "Jahnke", + "Jacobo", + "Hord", + "Hardcastle", + "Hageman", + "Griffey", + "Giglio", + "Gehring", + "Fortson", + "Duque", + "Duplessis", + "Donner", + "Dicken", + "Derosier", + "Deitz", + "Dalessio", + "Cyrus", + "Cram", + "Chi", + "Center", + "Castleman", + "Candelario", + "Callison", + "Caceres", + "Bozarth", + "Biles", + "Bejarano", + "Beech", + "Bashaw", + "Avina", + "Armentrout", + "Angus", + "Alverez", + "Acord", + "Zack", + "Waterhouse", + "Vereen", + "Vanlandingham", + "Uhl", + "Strawser", + "Shotwell", + "Severance", + "Seltzer", + "Schoonmaker", + "Schock", + "Schaub", + "Schaffner", + "Roeder", + "Rodrigez", + "Riffe", + "Rhine", + "Rasberry", + "Rancourt", + "Railey", + "Quade", + "Pursley", + "Prouty", + "Perdomo", + "Oxley", + "Osterman", + "Nickens", + "Murphree", + "Mounts", + "Monte", + "Merida", + "Maus", + "Mattern", + "Masse", + "Martinelli", + "Mangan", + "Lutes", + "Ludwick", + "Loney", + "Laureano", + "Lasater", + "Knighten", + "Kissinger", + "Kimsey", + "Kessinger", + "Honea", + "Hollingshead", + "Hockett", + "Heyer", + "Heron", + "Gurrola", + "Gove", + "Glasscock", + "Gillett", + "Galan", + "Featherstone", + "Eckhardt", + "Duron", + "Dunson", + "Dasher", + "Culbreth", + "Cowden", + "Cowans", + "Claypoole", + "Churchwell", + "Chabot", + "Caviness", + "Cater", + "Caston", + "Callan", + "Byington", + "Burkey", + "Boden", + "Beckford", + "Atwater", + "Arms", + "Archambault", + "Alvey", + "Alsup", + "Yon", + "Whisenant", + "Weese", + "Voyles", + "Verret", + "Tsang", + "Tessier", + "Sweitzer", + "Sherwin", + "Shaughnessy", + "Revis", + "Remy", + "Prine", + "Philpott", + "Peavy", + "Paynter", + "Parmenter", + "Ovalle", + "Offutt", + "Nightingale", + "Newlin", + "Nakano", + "Myatt", + "Muth", + "Mohan", + "Mcmillon", + "Mccarley", + "Mccaleb", + "Maxson", + "Marinelli", + "Maley", + "Macy", + "Liston", + "Letendre", + "Kain", + "Huntsman", + "Hirst", + "Hagerty", + "Gulledge", + "Greenway", + "Grajeda", + "Gorton", + "Goines", + "Gittens", + "Frederickson", + "Fanelli", + "Embree", + "Eichelberger", + "Dunkin", + "Dull", + "Dixson", + "Dillow", + "Defelice", + "Chumley", + "Burleigh", + "Borkowski", + "Binette", + "Biggerstaff", + "Berglund", + "Beller", + "Audet", + "Arbuckle", + "Allain", + "Alfano", + "Zander", + "Youngman", + "Wittman", + "Weintraub", + "Vanzant", + "Vaden", + "Twitty", + "Trader", + "Toon", + "Till", + "Stollings", + "Standifer", + "Spinner", + "Sines", + "Shope", + "Scalise", + "Saville", + "Romans", + "Posada", + "Pisano", + "Otte", + "Nolasco", + "Napoli", + "Mier", + "Merkle", + "Mendiola", + "Melcher", + "Mejias", + "Mcmurry", + "Mccalla", + "Markowitz", + "Marine", + "Manis", + "Mallette", + "Macfarlane", + "Lough", + "Looper", + "Landin", + "Kittle", + "Kinsella", + "Kinnard", + "Hobart", + "Herald", + "Helman", + "Hellman", + "Hartsock", + "Halford", + "Hage", + "Gordan", + "Glasser", + "Gayton", + "Gattis", + "Gastelum", + "Gaspard", + "Frisch", + "Force", + "Fitzhugh", + "Eckstein", + "Eberly", + "Dowden", + "Despain", + "Crumpler", + "Crotty", + "Cornelison", + "Collin", + "Colin", + "Chouinard", + "Chamness", + "Catlin", + "Cann", + "Bumgardner", + "Budde", + "Branum", + "Bradfield", + "Braddy", + "Borst", + "Birdwell", + "Bent", + "Bazan", + "Bank", + "Banas", + "Bade", + "Aubrey", + "Arango", + "Ahearn", + "Addis", + "Zumwalt", + "Wurth", + "Wilk", + "Widener", + "Wagstaff", + "Vella", + "Urrutia", + "Terwilliger", + "Tart", + "Steinman", + "Staats", + "Sloat", + "Rives", + "Riggle", + "Revels", + "Reichard", + "Prickett", + "Poff", + "Pitzer", + "Petro", + "Pell", + "Northrup", + "Nicks", + "Moline", + "Mielke", + "Maynor", + "Mallon", + "Magness", + "Lingle", + "Lindell", + "Lieb", + "Lesko", + "Lebeau", + "Lammers", + "Lafond", + "Kiernan", + "Ketron", + "Jurado", + "Holmgren", + "Hilburn", + "Hayashi", + "Hashimoto", + "Harbaugh", + "Hans", + "Guillot", + "Gard", + "Froehlich", + "Felipe", + "Feinberg", + "Falco", + "Dufour", + "Drees", + "Doney", + "Diep", + "Delao", + "Daves", + "Dail", + "Cutting", + "Crowson", + "Coss", + "Congdon", + "Carner", + "Camarena", + "Butterworth", + "Burlingame", + "Bouffard", + "Bloch", + "Bilyeu", + "Barta", + "Bakke", + "Baillargeon", + "Avent", + "Aquilar", + "Ake", + "Aho", + "Zeringue", + "Yeh", + "Yarber", + "Wolfson", + "Wendell", + "Vogler", + "Voelker", + "Truss", + "Troxell", + "Thrift", + "Strouse", + "Spielman", + "Sistrunk", + "Shows", + "Sevigny", + "Schuller", + "Schaaf", + "Ruffner", + "Routh", + "Roseman", + "Ricciardi", + "Peraza", + "Pegram", + "Overturf", + "Olander", + "Odaniel", + "Neu", + "Millner", + "Melchor", + "Maxie", + "Marvel", + "Maroney", + "Machuca", + "Macaluso", + "Livesay", + "Layfield", + "Laskowski", + "Kwiatkowski", + "Ko", + "Kiley", + "Kilby", + "Julien", + "Hovey", + "Heywood", + "Hayman", + "Havard", + "Harville", + "Haigh", + "Hagood", + "Grieco", + "Glassman", + "Gebhardt", + "Garry", + "Freeze", + "Fleischer", + "Fann", + "Elson", + "Eccles", + "Cunha", + "Crumb", + "Crew", + "Blakley", + "Bardwell", + "Abshire", + "Woodham", + "Wines", + "Welter", + "Wargo", + "Varnado", + "Tutt", + "Traynor", + "Swaney", + "Svoboda", + "Stricker", + "Stoffel", + "Stambaugh", + "Sickler", + "Shackleford", + "Selman", + "Seaver", + "Sansom", + "Sanmiguel", + "Royston", + "Rourke", + "Rockett", + "Rioux", + "Puleo", + "Pitchford", + "Persons", + "Normand", + "Nardi", + "Mulvaney", + "Middaugh", + "Manners", + "Malek", + "Lodge", + "Leos", + "Lathan", + "Kujawa", + "Kimbro", + "Killebrew", + "Joshua", + "Houlihan", + "Hobby", + "Hinckley", + "Herod", + "Hepler", + "Hamner", + "Hammel", + "Hallowell", + "Gonsalez", + "Gingerich", + "Gambill", + "Funkhouser", + "Fricke", + "Fewell", + "Falkner", + "Endsley", + "Dulin", + "Drennen", + "Deaver", + "Dambrosio", + "Clover", + "Chadwell", + "Ceasar", + "Castanon", + "Canon", + "Burkes", + "Brune", + "Brisco", + "Brinker", + "Bowker", + "Boldt", + "Berner", + "Bee", + "Beaumont", + "Beaird", + "Bazemore", + "Barrick", + "Arnette", + "Albano", + "Younts", + "Wunderlich", + "Weidman", + "Vanness", + "Tu", + "Toland", + "Theobald", + "Stickler", + "Steiger", + "Stanger", + "Spies", + "Spector", + "Sollars", + "Smedley", + "Seibel", + "Scoville", + "Saito", + "Rye", + "Rummel", + "Rude", + "Rowles", + "Rouleau", + "Roos", + "Rogan", + "Roemer", + "Ream", + "Raya", + "Purkey", + "Priester", + "Perreira", + "Penick", + "Paulin", + "Parkins", + "Overcash", + "Oleson", + "Nicely", + "Neves", + "Muldrow", + "Minard", + "Midgett", + "Michalak", + "Melgar", + "Mcentire", + "Mcauliffe", + "Marti", + "Marte", + "Lydon", + "Lindholm", + "Leyba", + "Leader", + "Langevin", + "Lagasse", + "Lafayette", + "Kesler", + "Kelton", + "Kao", + "Kaminsky", + "Jump", + "Jaggers", + "Humbert", + "Huck", + "Howarth", + "Hinrichs", + "Higley", + "Gupton", + "Guimond", + "Gravois", + "Giguere", + "Fretwell", + "Fontes", + "Feeley", + "Faucher", + "Fall", + "Evan", + "Eichhorn", + "Ecker", + "Earp", + "Dole", + "Dinger", + "Derryberry", + "Demars", + "Deel", + "Copenhaver", + "Collinsworth", + "Colangelo", + "Cloyd", + "Claiborne", + "Caulfield", + "Carlsen", + "Calzada", + "Caffey", + "Broadus", + "Brenneman", + "Bouie", + "Bodnar", + "Blaney", + "Blanc", + "Blades", + "Beltz", + "Behling", + "Begin", + "Barahona", + "Yun", + "Yockey", + "Winkle", + "Windom", + "Wimer", + "Wilford", + "Wash", + "Villatoro", + "Trexler", + "Teran", + "Taliaferro", + "Sydnor", + "Swinson", + "Snelling", + "Smtih", + "Siu", + "Simonton", + "Simoneaux", + "Simoneau", + "Sherrer", + "Seavey", + "Scheel", + "Rushton", + "Rupe", + "Ruano", + "Rodney", + "Rippy", + "Reiner", + "Reiff", + "Rabinowitz", + "Quach", + "Penley", + "Odle", + "Nock", + "Minnich", + "Mckown", + "Mccarver", + "Mcandrew", + "Longley", + "Laux", + "Lamothe", + "Lafreniere", + "Kropp", + "Krick", + "Kates", + "Jepson", + "Huie", + "Howse", + "Howie", + "Henriques", + "Haydon", + "Haught", + "Hatter", + "Hartzog", + "Harkey", + "Grimaldo", + "Goshorn", + "Gormley", + "Gluck", + "Gilroy", + "Gillenwater", + "Giffin", + "Folks", + "Fluker", + "Feder", + "Eyre", + "Eshelman", + "Eakins", + "Dryer", + "Disney", + "Detwiler", + "Delrosario", + "Davisson", + "Celestine", + "Catalan", + "Canning", + "Calton", + "Buster", + "Brammer", + "Botelho", + "Blakney", + "Bartell", + "Averett", + "Askins", + "Aker", + "Zak", + "Worcester", + "Witmer", + "Wiser", + "Winkelman", + "Widmer", + "Whittier", + "Western", + "Weitzel", + "Wardell", + "Wagers", + "Ullman", + "Tupper", + "Tingley", + "Tilghman", + "Talton", + "Simard", + "Seda", + "Scheller", + "Sala", + "Rundell", + "Rost", + "Roa", + "Ribeiro", + "Rabideau", + "Primm", + "Porch", + "Polite", + "Pinon", + "Peart", + "Ostrom", + "Ober", + "Nystrom", + "Nussbaum", + "Nurse", + "Naughton", + "Murr", + "Moorhead", + "Monti", + "Monteiro", + "Melson", + "Meissner", + "Mclin", + "Mcgruder", + "Marotta", + "Makowski", + "Majewski", + "Madewell", + "Lunt", + "Lukens", + "Leininger", + "Lebel", + "Lakin", + "Laguna", + "Kepler", + "Jaques", + "Hunnicutt", + "Hungerford", + "Hoopes", + "Hertz", + "Heins", + "Hammers", + "Halliburton", + "Grosso", + "Gravitt", + "Glasper", + "Gideon", + "Gallman", + "Gallaway", + "Funke", + "Fulbright", + "Falgout", + "Eakin", + "Dostie", + "Dorado", + "Dewberry", + "Derose", + "Cutshall", + "Crampton", + "Costanzo", + "Colletti", + "Cloninger", + "Claytor", + "Chiang", + "Canterbury", + "Campagna", + "Burd", + "Brokaw", + "Broaddus", + "Bretz", + "Brainard", + "Binford", + "Bilbrey", + "Alpert", + "Aitken", + "Ahlers", + "Zajac", + "Yale", + "Woolfolk", + "Witten", + "Windle", + "Wayland", + "Tramel", + "Tittle", + "Talavera", + "Suter", + "Straley", + "Stetson", + "Specht", + "Sommerville", + "Soloman", + "So", + "Skeens", + "Sigman", + "Sibert", + "Shavers", + "Schuck", + "Schmit", + "Sartain", + "Sabol", + "Rosenblatt", + "Rollo", + "Rashid", + "Rabb", + "Province", + "Polston", + "Nyberg", + "Northrop", + "Navarra", + "Muldoon", + "Mulder", + "Mikesell", + "Mcdougald", + "Mcburney", + "Mauricio", + "Mariscal", + "Lui", + "Lozier", + "Lingerfelt", + "Legere", + "Latour", + "Lagunas", + "Lacour", + "Kurth", + "Ku", + "Killen", + "Kiely", + "Kayser", + "Kahle", + "Julius", + "Isley", + "Huertas", + "Hower", + "Hinz", + "Haugh", + "Gumm", + "Given", + "Galicia", + "Fortunato", + "Flake", + "Dunleavy", + "Duggins", + "Doby", + "Digiovanni", + "Devaney", + "Deltoro", + "Cribb", + "Crank", + "Corpuz", + "Coronel", + "Comfort", + "Coen", + "Charbonneau", + "Caine", + "Burchette", + "Blakey", + "Blakemore", + "Bergquist", + "Beene", + "Beaudette", + "Bayles", + "Ballance", + "Bakker", + "Bailes", + "Asberry", + "Arwood", + "Zucker", + "Willman", + "Whitesell", + "Wald", + "Walcott", + "Vancleave", + "Trump", + "Trail", + "Strasser", + "Simas", + "Shorts", + "Shick", + "Schleicher", + "Schaal", + "Saleh", + "Rotz", + "Resnick", + "Raphael", + "Rainer", + "Partee", + "Ollis", + "Oller", + "Oday", + "Noles", + "Munday", + "Mountain", + "Mong", + "Millican", + "Merwin", + "Mazzola", + "Mansell", + "Magallanes", + "Llanes", + "Lewellen", + "Lepore", + "Kisner", + "Keesee", + "Jim", + "Jeanlouis", + "Ingham", + "Hornbeck", + "Hermes", + "Hawn", + "Hartz", + "Harber", + "Haffner", + "Gutshall", + "Guth", + "Grays", + "Grams", + "Gowan", + "Finlay", + "Finkelstein", + "Eyler", + "Enloe", + "Dungan", + "Diez", + "Dearman", + "Dann", + "Cull", + "Crosson", + "Creek", + "Chronister", + "Cassity", + "Campion", + "Callihan", + "Butz", + "Breazeale", + "Blumenthal", + "Billy", + "Berkey", + "Batty", + "Batton", + "Barge", + "Arvizu", + "Alexis", + "Alderete", + "Aldana", + "Albaugh", + "Abernethy", + "Work", + "Wolter", + "Wille", + "Tweed", + "Tollefson", + "Thomasson", + "Teter", + "Testerman", + "Sproul", + "Spates", + "Southwick", + "Soukup", + "Skelly", + "Senter", + "Sealey", + "Sawicki", + "Sargeant", + "Rossiter", + "Rosemond", + "Repp", + "Pound", + "Pink", + "Pifer", + "Ormsby", + "Nickelson", + "Naumann", + "Morabito", + "Monzon", + "Millsaps", + "Millen", + "Mcelrath", + "Marcoux", + "Mantooth", + "Madson", + "Macneil", + "Mackinnon", + "Louque", + "Leister", + "Lampley", + "Kushner", + "Krouse", + "Kirwan", + "June", + "Jessee", + "Janson", + "Jahn", + "Jacquez", + "Islas", + "Hutt", + "Holladay", + "Hillyer", + "Hepburn", + "Hensel", + "Harrold", + "Guadalupe", + "Gingrich", + "Geis", + "Gales", + "Fults", + "Finnell", + "Ferri", + "Featherston", + "Epley", + "Ebersole", + "Eames", + "Dunigan", + "Drye", + "Dismuke", + "Devaughn", + "Delorenzo", + "Damiano", + "Confer", + "Collum", + "Clower", + "Clow", + "Claussen", + "Clack", + "Caylor", + "Cawthon", + "Casias", + "Carreno", + "Carlo", + "Bluhm", + "Bingaman", + "Bewley", + "Belew", + "Beckner", + "Beamer", + "Barefoot", + "Auld", + "Amey", + "Wolfenbarger", + "Wilkey", + "Wicklund", + "Waltman", + "Villalba", + "Valero", + "Valdovinos", + "Ung", + "Ullrich", + "Tyus", + "Twyman", + "Trost", + "Tardif", + "Tanguay", + "Stripling", + "Steinbach", + "Shumpert", + "Sasaki", + "Sappington", + "Sandusky", + "Reinhold", + "Reinert", + "Quijano", + "Pye", + "Poor", + "Placencia", + "Pinkard", + "Phinney", + "Perrotta", + "Pernell", + "Parrett", + "Oxendine", + "Owensby", + "Orman", + "Nuno", + "Mori", + "Mcroberts", + "Mcneese", + "Mckamey", + "Mccullum", + "Markel", + "Mardis", + "Maines", + "Lueck", + "Lubin", + "Lefler", + "Leffler", + "Lavery", + "Larios", + "Labarbera", + "Kershner", + "Josey", + "Jeanbaptiste", + "Izaguirre", + "Hermosillo", + "Haviland", + "Hartshorn", + "Hamlet", + "Hafner", + "Ginter", + "Getty", + "Franck", + "Fiske", + "Emmett", + "Dufrene", + "Doody", + "Davie", + "Dangerfield", + "Dahlberg", + "Cuthbertson", + "Crone", + "Coffelt", + "Claus", + "Chidester", + "Chesson", + "Cauley", + "Caudell", + "Cantara", + "Campo", + "Caines", + "Bullis", + "Bucci", + "Brochu", + "Bosco", + "Bogard", + "Bickerstaff", + "Benning", + "Arzola", + "Antonelli", + "Adkinson", + "Zellers", + "Wulf", + "Worsley", + "Woolridge", + "Whitton", + "Westerfield", + "Walczak", + "Vassar", + "Truett", + "Trueblood", + "Trawick", + "Townsley", + "Topping", + "Tobar", + "Telford", + "Sung", + "Steverson", + "Stagg", + "Sitton", + "Sill", + "Sherrell", + "Sergent", + "Schoenfeld", + "Sarabia", + "Rutkowski", + "Rubenstein", + "Rigdon", + "Prentiss", + "Pomerleau", + "Plumlee", + "Phoenix", + "Philbrick", + "Peer", + "Patty", + "Patnode", + "Oloughlin", + "Obregon", + "Nuss", + "Napoleon", + "Morell", + "Moose", + "Mikell", + "Mele", + "Mcinerney", + "Mcguigan", + "Mcbrayer", + "Lore", + "Lor", + "Look", + "Lollar", + "Lakes", + "Kuehl", + "Kinzer", + "Kamp", + "Joplin", + "Jacobi", + "Howells", + "Holstein", + "Hedden", + "Hassler", + "Harty", + "Halle", + "Greig", + "Granville", + "Gouge", + "Goodrum", + "Gerhart", + "Geier", + "Geddes", + "Gast", + "Forehand", + "Ferree", + "Fendley", + "Feltner", + "Fang", + "Esqueda", + "Encarnacion", + "Eichler", + "Egger", + "Edmundson", + "Eatmon", + "Dragon", + "Doud", + "Donohoe", + "Donelson", + "Dilorenzo", + "Digiacomo", + "Diggins", + "Delozier", + "Dejong", + "Danford", + "Crippen", + "Coppage", + "Cogswell", + "Clardy", + "Cioffi", + "Cabe", + "Brunette", + "Bresnahan", + "Bramble", + "Blomquist", + "Blackstone", + "Biller", + "Bevis", + "Bevan", + "Bethune", + "Benbow", + "Baty", + "Basinger", + "Balcom", + "Andes", + "Aman", + "Aguero", + "Adkisson", + "Yandell", + "Wilds", + "Whisenhunt", + "Weigand", + "Weeden", + "Voight", + "Villar", + "Trottier", + "Tillett", + "Suazo", + "Setser", + "Scurry", + "Schuh", + "Schreck", + "Schauer", + "Samora", + "Roane", + "Rinker", + "Reimers", + "Reason", + "Ratchford", + "Popovich", + "Parkin", + "Nichol", + "Natal", + "Melville", + "Mcbryde", + "Magdaleno", + "Loehr", + "Lockman", + "Lingo", + "Leduc", + "Larocca", + "Lao", + "Lamere", + "Laclair", + "Krall", + "Korte", + "Koger", + "Jumper", + "Jalbert", + "Hughs", + "Higbee", + "Henton", + "Heaney", + "Haith", + "Gump", + "Greeson", + "Goodloe", + "Gholston", + "Gasper", + "Gagliardi", + "Fregoso", + "Farthing", + "Fabrizio", + "Ensor", + "Elswick", + "Elgin", + "Eklund", + "Eaddy", + "Drouin", + "Dorton", + "Dizon", + "Derouen", + "Delia", + "Deherrera", + "Davy", + "Dark", + "Dampier", + "Cullum", + "Culley", + "Cowgill", + "Cardoso", + "Cardinale", + "Brodsky", + "Broadbent", + "Brimmer", + "Briceno", + "Branscum", + "Bolyard", + "Boley", + "Bennington", + "Beadle", + "Baur", + "Ballentine", + "Azure", + "Aultman", + "Augustus", + "Asuncion", + "Arciniega", + "Aguila", + "Aceves", + "Yepez", + "Yap", + "Woodrum", + "Wethington", + "Weissman", + "Veloz", + "Trusty", + "Troup", + "Trammel", + "Theodore", + "Tarpley", + "Stivers", + "Steck", + "Sprayberry", + "Spraggins", + "Spitler", + "Spiers", + "Sohn", + "Seagraves", + "Schiffman", + "Rudnick", + "Rizo", + "Riccio", + "Rennie", + "Quinton", + "Quackenbush", + "Puma", + "Plott", + "Pearcy", + "Parada", + "Paiz", + "Munford", + "Moskowitz", + "Mease", + "Mcnary", + "Mccusker", + "Matt", + "Lozoya", + "Longmire", + "Loesch", + "Lasky", + "Kuhlmann", + "Krieg", + "Koziol", + "Kowalewski", + "Konrad", + "Kindle", + "Jowers", + "Jolin", + "Jaco", + "Hua", + "Horgan", + "Hine", + "Hileman", + "Hepner", + "Heise", + "Heady", + "Hawkinson", + "Hannigan", + "Haberman", + "Guilford", + "Grimaldi", + "Gilles", + "Garton", + "Gagliano", + "Fruge", + "Follett", + "Fiscus", + "Ferretti", + "Ebner", + "Easterday", + "Eanes", + "Dirks", + "Dimarco", + "Depalma", + "Deforest", + "Dance", + "Cruce", + "Craighead", + "Christner", + "Candler", + "Cadwell", + "Burchell", + "Buettner", + "Brinton", + "Breed", + "Brazier", + "Brannen", + "Brame", + "Bova", + "Bomar", + "Blakeslee", + "Belknap", + "Bangs", + "Balzer", + "Athey", + "Armes", + "Alvis", + "Alverson", + "Alvardo", + "Alter", + "Zhao", + "Yeung", + "Yen", + "Wheelock", + "Westlund", + "Wessels", + "Volkman", + "Threadgill", + "Thelen", + "Tandy", + "Tague", + "Ta", + "Symons", + "Swinford", + "Sturtevant", + "Straka", + "Stier", + "Stagner", + "Segarra", + "Seawright", + "Sack", + "Rutan", + "Roux", + "Ringler", + "Riker", + "Ramsdell", + "Quattlebaum", + "Purifoy", + "Poulson", + "Permenter", + "Peloquin", + "Pasley", + "Pagel", + "Osman", + "Obannon", + "Nygaard", + "Nipper", + "Newcomer", + "Munos", + "Motta", + "Meadors", + "Mcquiston", + "Mcniel", + "Mcmann", + "Mccrae", + "Mayne", + "Matte", + "Martine", + "Lucy", + "Legault", + "Lechner", + "Lack", + "Kucera", + "Krohn", + "Kratzer", + "Koopman", + "Judson", + "Jeske", + "Horrocks", + "Homes", + "Hock", + "Hibbler", + "Hesson", + "Hersh", + "Harvin", + "Halvorsen", + "Griner", + "Grindle", + "Glen", + "Gladstone", + "Garofalo", + "Frampton", + "Forbis", + "Fernando", + "Eddington", + "Diorio", + "Dingus", + "Dewar", + "Desalvo", + "Curcio", + "Creasy", + "Cortese", + "Cordoba", + "Connally", + "Cluff", + "Cascio", + "Capuano", + "Canaday", + "Calabro", + "Bussard", + "Brayton", + "Borja", + "Bigley", + "Arnone", + "Arguelles", + "Acuff", + "Zamarripa", + "Wooton", + "Wolfgang", + "Widner", + "Wideman", + "Threatt", + "Thiele", + "Templin", + "Teeters", + "Synder", + "Swint", + "Swick", + "Sturges", + "Stogner", + "Stedman", + "Spratt", + "Six", + "Siegfried", + "Shetler", + "Scull", + "Savino", + "Sather", + "Rothwell", + "Rook", + "Rone", + "Rolf", + "Rhee", + "Quevedo", + "Privett", + "Pouliot", + "Poche", + "Pickel", + "Petrillo", + "Pellegrini", + "Peaslee", + "Partlow", + "Otey", + "Nunnery", + "Morelock", + "Morello", + "Meunier", + "Messinger", + "Mckie", + "Mccubbin", + "Mccarron", + "Maria", + "Lerch", + "Lavine", + "Laverty", + "Lariviere", + "Lamkin", + "Kugler", + "Krol", + "Kissel", + "Keeter", + "Hummer", + "Hubble", + "Hickox", + "Hetzel", + "Hayner", + "Hagy", + "Hadlock", + "Groh", + "Gregorio", + "Gottschalk", + "Goodsell", + "Gloria", + "Gerry", + "Gassaway", + "Garrard", + "Galligan", + "Fye", + "Firth", + "Fenderson", + "Feinstein", + "Etienne", + "Engleman", + "Emrick", + "Ellender", + "Drews", + "Doiron", + "Degraw", + "Deegan", + "Dart", + "Crissman", + "Corr", + "Cookson", + "Coil", + "Cleaves", + "Charest", + "Chapple", + "Chaparro", + "Castano", + "Carpio", + "Byer", + "Bufford", + "Bridgewater", + "Bridgers", + "Brandes", + "Borrero", + "Bonanno", + "Aube", + "Ancheta", + "Abarca", + "Abad", + "Yung", + "Yim", + "Wooster", + "Woodrow", + "Wimbush", + "Willhite", + "Willams", + "Wigley", + "Weisberg", + "Wardlaw", + "Vigue", + "Vanhook", + "Unknow", + "Torre", + "Tasker", + "Tarbox", + "Strachan", + "Standard", + "Slover", + "Shamblin", + "Semple", + "Schuyler", + "Schrimsher", + "Sayer", + "Salzman", + "Salomon", + "Rubalcava", + "Riles", + "Rickey", + "Reneau", + "Reichel", + "Rayfield", + "Rabon", + "Pyatt", + "Prindle", + "Poss", + "Polito", + "Plemmons", + "Pesce", + "Perrault", + "Pereyra", + "Ostrowski", + "Nilsen", + "Niemeyer", + "Nick", + "Munsey", + "Mundell", + "Moncada", + "Miceli", + "Meader", + "Mcmasters", + "Mckeehan", + "Matsumoto", + "Marron", + "Marden", + "Lizarraga", + "Lingenfelter", + "Lewallen", + "Laurence", + "Langan", + "Lamanna", + "Kovac", + "Kinsler", + "Kephart", + "Keown", + "Kass", + "Kammerer", + "Jeffreys", + "Hysell", + "Householder", + "Hosmer", + "Hardnett", + "Hanner", + "Guyette", + "Greening", + "Glazer", + "Ginder", + "Fromm", + "Fortuna", + "Fluellen", + "Finkle", + "Fey", + "Fessler", + "Essary", + "Eisele", + "Duren", + "Dittmer", + "Crochet", + "Cosentino", + "Cogan", + "Coelho", + "Cavin", + "Carrizales", + "Campuzano", + "Brough", + "Bow", + "Bopp", + "Bookman", + "Bobb", + "Blouin", + "Beesley", + "Battista", + "Bascom", + "Bakken", + "Badgett", + "Arneson", + "Anselmo", + "Albino", + "Ahumada", + "Agustin", + "Woodyard", + "Wolters", + "Wireman", + "Wilton", + "Willison", + "Warman", + "Wan", + "Waldrup", + "Vowell", + "Vantassel", + "Vale", + "Twombly", + "Toomer", + "Tennison", + "Teets", + "Tedeschi", + "Swanner", + "Swallow", + "Stutz", + "Stelly", + "Sheehy", + "Schermerhorn", + "Scala", + "Sandidge", + "Salters", + "Salo", + "Saechao", + "Roseboro", + "Rolle", + "Ressler", + "Renz", + "Renn", + "Redford", + "Raposa", + "Rainbolt", + "Pompey", + "Pelfrey", + "Orndorff", + "Oney", + "Nolin", + "Nimmons", + "Ney", + "Nardone", + "Myhre", + "Morman", + "Mines", + "Menjivar", + "Mcglone", + "Mccammon", + "Maxon", + "Maris", + "Marciano", + "Manus", + "Maiden", + "Lowrance", + "Lorenzen", + "Lonergan", + "Lollis", + "Littles", + "Lindahl", + "Lansing", + "Lamas", + "Lach", + "Kuster", + "Krawczyk", + "Knuth", + "Knecht", + "Kirkendall", + "Keitt", + "Keever", + "Kantor", + "Jarboe", + "Hoye", + "Houchens", + "Holter", + "Holsinger", + "Hickok", + "Herb", + "Helwig", + "Helgeson", + "Heater", + "Hassett", + "Harner", + "Hamman", + "Hames", + "Hadfield", + "Goree", + "Goldfarb", + "Gaughan", + "Gaudreau", + "Gantz", + "Gallion", + "Frady", + "Foti", + "Flesher", + "Ferrin", + "Faught", + "Engram", + "Elbert", + "Donegan", + "Desouza", + "Degroot", + "Cutright", + "Crowl", + "Criner", + "Coke", + "Coan", + "Clinkscales", + "Chewning", + "Chavira", + "Catchings", + "Carlock", + "Bye", + "Bulger", + "Buenrostro", + "Bramblett", + "Brack", + "Boulware", + "Bordeaux", + "Bookout", + "Bitner", + "Birt", + "Baranowski", + "Baisden", + "Augustin", + "Allmon", + "Alberto", + "Acklin", + "Yoakum", + "Wilbourn", + "Whisler", + "Weinberger", + "Washer", + "Vasques", + "Vanzandt", + "Vanatta", + "Troxler", + "Tomes", + "Tindle", + "Tims", + "Throckmorton", + "Thach", + "Stpeter", + "Stlaurent", + "Stenson", + "Spry", + "Spitz", + "Songer", + "Snavely", + "Sly", + "Sleeper", + "Shroyer", + "Shortridge", + "Shenk", + "Sevier", + "Seabrook", + "Scrivner", + "Saltzman", + "Rosenberry", + "Rockwood", + "Robeson", + "Roan", + "Reiser", + "Redwine", + "Ramires", + "Raber", + "Profit", + "Posner", + "Popham", + "Pipes", + "Piotrowski", + "Pinard", + "Peterkin", + "Pelham", + "Peiffer", + "Peay", + "Peavey", + "Nadler", + "Musso", + "Milo", + "Millett", + "Mestas", + "Mcgowen", + "Marques", + "Marasco", + "Manriquez", + "Manos", + "Mair", + "Lipps", + "Lesser", + "Leiker", + "Leeds", + "Krumm", + "Knorr", + "Kinslow", + "Kessel", + "Kendricks", + "Kelm", + "Ito", + "Irick", + "Ickes", + "Hurlburt", + "Horta", + "Hoekstra", + "Heuer", + "Helmuth", + "Heatherly", + "Hampson", + "Hagar", + "Haga", + "Greenlaw", + "Grau", + "Godbey", + "Gingras", + "Gillies", + "Gibb", + "Gayden", + "Gauvin", + "Garrow", + "Fontanez", + "Florio", + "Fleischman", + "Finke", + "Fasano", + "Fan", + "Faith", + "Ezzell", + "Ewers", + "Eveland", + "Eckenrode", + "Duclos", + "Drumm", + "Dimmick", + "Delancey", + "Defazio", + "Deacon", + "Dashiell", + "Damian", + "Cusack", + "Crowther", + "Crigger", + "Cray", + "Coolidge", + "Coldiron", + "Cleland", + "Chalfant", + "Cassel", + "Cape", + "Camire", + "Cabrales", + "Broomfield", + "Brittingham", + "Brisson", + "Brickey", + "Braziel", + "Brazell", + "Bragdon", + "Boulanger", + "Bos", + "Boman", + "Bohannan", + "Beem", + "Barto", + "Barre", + "Barley", + "Baptist", + "Azar", + "Ashbaugh", + "Armistead", + "Almazan", + "Adamski", + "Zendejas", + "Winburn", + "Willaims", + "Wilhoit", + "Westberry", + "Wentzel", + "Wendling", + "Wager", + "Visser", + "Vanscoy", + "Vankirk", + "Vallee", + "Tweedy", + "Thornberry", + "Sweeny", + "Stalker", + "Spradling", + "Spano", + "Smelser", + "Shim", + "Sechrist", + "Schall", + "Scaife", + "Rugg", + "Ruben", + "Rothrock", + "Roesler", + "Riehl", + "Ridings", + "Render", + "Ransdell", + "Radke", + "Pinero", + "Petree", + "Pendergast", + "Peluso", + "Pecoraro", + "Pascoe", + "Panek", + "Oshiro", + "Noon", + "Navarrette", + "Murguia", + "Moores", + "Moberg", + "Mike", + "Michaelis", + "Mcwhirter", + "Mcsweeney", + "Mcquade", + "Mccay", + "Mauk", + "Mariani", + "Marceau", + "Mandeville", + "Maeda", + "Lunde", + "Ludlow", + "Loeb", + "Lindo", + "Linderman", + "Leveille", + "Leith", + "Larock", + "Lambrecht", + "Kulp", + "Kinsley", + "Kimberlin", + "Kesterson", + "Jacinto", + "Ice", + "Hui", + "Hoyos", + "Helfrich", + "Hanke", + "Hail", + "Guillermo", + "Grisby", + "Goyette", + "Gouveia", + "Glazier", + "Gile", + "Gerena", + "Gelinas", + "Gasaway", + "Garden", + "Funches", + "Fujimoto", + "Flynt", + "Fenske", + "Fellers", + "Fehr", + "Eslinger", + "Escalera", + "Enciso", + "Duley", + "Dittman", + "Dineen", + "Diller", + "Devault", + "Dao", + "Collings", + "Clymer", + "Clowers", + "Chavers", + "Charland", + "Castorena", + "Castello", + "Camargo", + "Bunce", + "Bullen", + "Boyes", + "Borchers", + "Borchardt", + "Birnbaum", + "Birdsall", + "Billman", + "Benites", + "Bankhead", + "Ange", + "Ammerman", + "Adkison", + "Yuan", + "Winegar", + "Wickman", + "Wear", + "Warr", + "Warnke", + "Villeneuve", + "Veasey", + "Vassallo", + "Vannatta", + "Vadnais", + "Twilley", + "Truelove", + "Towery", + "Tomblin", + "Tippett", + "Theiss", + "Talkington", + "Talamantes", + "Swart", + "Swanger", + "Streit", + "Straw", + "Stines", + "Stabler", + "Spurling", + "Sobel", + "Sine", + "Simmers", + "Shippy", + "Shiflett", + "Shearin", + "Sauter", + "Sanderlin", + "Rusch", + "Runkle", + "Ruckman", + "Rorie", + "Roesch", + "Roberto", + "Richert", + "Rehm", + "Randel", + "Ragin", + "Quesenberry", + "Puentes", + "Plyler", + "Plotkin", + "Paugh", + "Oshaughnessy", + "Ohalloran", + "Norsworthy", + "Niemann", + "Nader", + "Moorefield", + "Mooneyham", + "Modica", + "Miyamoto", + "Mickel", + "Mebane", + "Mckinnie", + "Mazurek", + "Mancilla", + "Lukas", + "Lovins", + "Loughlin", + "Lotz", + "Lindsley", + "Liddle", + "Levan", + "Lederman", + "Leclaire", + "Lasseter", + "Lapoint", + "Lamoreaux", + "Lafollette", + "Kubiak", + "Kirtley", + "Keffer", + "Kaczmarek", + "Jennette", + "Housman", + "Honey", + "Hiers", + "Hibbert", + "Herrod", + "Hegarty", + "Hathorn", + "Harsh", + "Greenhaw", + "Grafton", + "Govea", + "Gardener", + "Futch", + "Furst", + "Frisbee", + "Fred", + "Franko", + "Forcier", + "Foran", + "Flickinger", + "Fairfield", + "Eure", + "Emrich", + "Embrey", + "Edgington", + "Ecklund", + "Eckard", + "Durante", + "Deyo", + "Delvecchio", + "Deeds", + "Dade", + "Currey", + "Cuff", + "Creswell", + "Cottrill", + "Casavant", + "Cartier", + "Cargile", + "Capel", + "Cammack", + "Calfee", + "Buzzard", + "Burse", + "Burruss", + "Brust", + "Brousseau", + "Bridwell", + "Braaten", + "Borkholder", + "Bloomquist", + "Bjork", + "Bartelt", + "Arp", + "Amburgey", + "Yeary", + "Yao", + "Whitefield", + "Vinyard", + "Vicente", + "Vanvalkenburg", + "Twitchell", + "Timmins", + "Tester", + "Tapper", + "Stringham", + "Starcher", + "Spotts", + "Slaugh", + "Simonsen", + "Sheffer", + "Sequeira", + "Rosati", + "Rode", + "Rhymes", + "Reza", + "Record", + "Quint", + "Pollak", + "Peirce", + "Patillo", + "Parkerson", + "Paiva", + "Nilson", + "Nice", + "Nevin", + "Narcisse", + "Nair", + "Mitton", + "Merriam", + "Merced", + "Meiners", + "Mckain", + "Mcelveen", + "Mcbeth", + "Marsden", + "Marez", + "Manke", + "Mahurin", + "Mabrey", + "Luper", + "Krull", + "Kees", + "Iles", + "Hunsicker", + "Hornbuckle", + "Holtzclaw", + "Hirt", + "Hinnant", + "Heston", + "Hering", + "Hemenway", + "Hegwood", + "Hearns", + "Halterman", + "Halls", + "Guiterrez", + "Grote", + "Granillo", + "Grainger", + "Glasco", + "Gilder", + "Garren", + "Garlock", + "Garey", + "Fu", + "Fryar", + "Fredricks", + "Fraizer", + "Foxx", + "Foshee", + "Ferrel", + "Felty", + "Feathers", + "Everitt", + "Evens", + "Esser", + "Elkin", + "Eberhart", + "Durso", + "Duguay", + "Driskill", + "Doster", + "Dewall", + "Deveau", + "Demps", + "Demaio", + "Delreal", + "Deleo", + "Delay", + "Deem", + "Darrah", + "Cumberbatch", + "Culberson", + "Cranmer", + "Cordle", + "Colgan", + "Chesley", + "Cavallo", + "Castellon", + "Castelli", + "Carreras", + "Carnell", + "Carmon", + "Carmen", + "Carlucci", + "Bottom", + "Bontrager", + "Blumberg", + "Blasingame", + "Becton", + "Ayon", + "Artrip", + "Arline", + "Andujar", + "Alkire", + "Alder", + "Agan", + "Zukowski", + "Zuckerman", + "Zehr", + "Wroblewski", + "Wrigley", + "Woodside", + "Wigginton", + "Westman", + "Westgate", + "Werts", + "Washam", + "Wardlow", + "Walser", + "Waiters", + "Teller", + "Tadlock", + "Stuck", + "Stringfield", + "Stimpson", + "Stickley", + "Starbuck", + "Standish", + "Spurlin", + "Spindler", + "Speller", + "Spaeth", + "Sotomayor", + "Sok", + "Sluder", + "Shryock", + "Shepardson", + "Shatley", + "Scannell", + "Santistevan", + "Rosner", + "Rolland", + "Rhode", + "Resto", + "Reinhard", + "Rathburn", + "Prisco", + "Poulsen", + "Pinney", + "Phares", + "Pennock", + "Pastrana", + "Oviedo", + "Ostler", + "Noto", + "Nauman", + "Mulford", + "Moise", + "Moberly", + "Mirabal", + "Ming", + "Metoyer", + "Metheny", + "Mentzer", + "Meldrum", + "Mcinturff", + "Mcelyea", + "Mcdougle", + "Massaro", + "Lumpkins", + "Loveday", + "Lofgren", + "Loe", + "Lirette", + "Lesperance", + "Lefkowitz", + "Ledger", + "Lauzon", + "Lain", + "Lachapelle", + "Kurz", + "Klassen", + "Keough", + "Kempton", + "Kaelin", + "Jeffords", + "Im", + "Huot", + "Hsieh", + "Hoyer", + "Horwitz", + "Hopp", + "Hoeft", + "Hennig", + "Haskin", + "Grill", + "Gourdine", + "Golightly", + "Girouard", + "Fulgham", + "Fritsch", + "Freer", + "Frasher", + "Foulk", + "Firestone", + "Fiorentino", + "Fedor", + "Feather", + "Ensley", + "Englehart", + "Eells", + "Ebel", + "Dunphy", + "Donahoe", + "Dimas", + "Dileo", + "Dibenedetto", + "Dabrowski", + "Crick", + "Coonrod", + "Conder", + "Coddington", + "Chunn", + "Choy", + "Chaput", + "Cerna", + "Carreiro", + "Calahan", + "Braggs", + "Bourdon", + "Boner", + "Bollman", + "Bittle", + "Ben", + "Behm", + "Bauder", + "Batt", + "Barreras", + "Aubuchon", + "Anzalone", + "Adamo", + "Zhou", + "Zerbe", + "Zachery", + "Witty", + "Wirt", + "Willcox", + "Westberg", + "Weikel", + "Waymire", + "Vroman", + "Vinci", + "Vallejos", + "Tutor", + "Truesdell", + "Troutt", + "Trotta", + "Tollison", + "Toles", + "Tichenor", + "Tai", + "Symonds", + "Surles", + "Sunday", + "Strayer", + "Stgeorge", + "Sroka", + "Sorrentino", + "Solares", + "Snelson", + "Silvestri", + "Sikorski", + "Shawver", + "Schumaker", + "Schorr", + "Schooley", + "Scates", + "Satterlee", + "Satchell", + "Sacks", + "Rymer", + "Roselli", + "Robitaille", + "Riegel", + "Richer", + "Regis", + "Reames", + "Provenzano", + "Proper", + "Priestley", + "Plaisance", + "Pettey", + "Palomares", + "Oman", + "Nowakowski", + "Nace", + "Monette", + "Minyard", + "Mclamb", + "Mchone", + "Mccarroll", + "Masson", + "Marco", + "Magoon", + "Maddy", + "Lundin", + "Loza", + "Licata", + "Lesley", + "Leonhardt", + "Lema", + "Landwehr", + "Kircher", + "Kinch", + "Karpinski", + "Johannsen", + "Hussain", + "Houghtaling", + "Hoskinson", + "Hollaway", + "Holeman", + "Hobgood", + "Hilt", + "Hiebert", + "Gros", + "Gram", + "Goggin", + "Gentle", + "Geissler", + "Gadbois", + "Gabaldon", + "Fleshman", + "Flannigan", + "Files", + "Fairman", + "Epp", + "Eilers", + "Dycus", + "Dunmire", + "Duffield", + "Dowler", + "Ditto", + "Deloatch", + "Dehaan", + "Deemer", + "Corner", + "Clayborn", + "Christofferso", + "Chilson", + "Chesney", + "Chatfield", + "Charlie", + "Caster", + "Carron", + "Canale", + "Camden", + "Buff", + "Brigman", + "Branstetter", + "Bosse", + "Borton", + "Bonar", + "Blau", + "Biron", + "Beagle", + "Barroso", + "Arvin", + "Arispe", + "Zacharias", + "Zabel", + "Yaeger", + "Works", + "Woolford", + "Whetzel", + "Weakley", + "Veatch", + "Vandeusen", + "Tufts", + "Troxel", + "Troche", + "Traver", + "Townsel", + "Tosh", + "Talarico", + "Swilley", + "Sterrett", + "Stenger", + "Springfield", + "Speakman", + "Sowards", + "Sours", + "Souders", + "Souder", + "Soles", + "Sobers", + "Snoddy", + "Smither", + "Sias", + "Shute", + "Shoaf", + "Shahan", + "Schuetz", + "Scaggs", + "Santini", + "Rosson", + "Rolen", + "Robidoux", + "Rentas", + "Recio", + "Pixley", + "Pawlowski", + "Pawlak", + "Paull", + "Pascal", + "Overbey", + "Orear", + "Oliveri", + "Oldenburg", + "Nutting", + "Naugle", + "Mote", + "Mossman", + "Moor", + "Misner", + "Milazzo", + "Michelson", + "Mei", + "Mcentee", + "Mccullar", + "Mccree", + "Mcaleer", + "Mazzone", + "Maxim", + "Marshal", + "Mandell", + "Manahan", + "Malott", + "Maisonet", + "Mailloux", + "Lumley", + "Lowrie", + "Louviere", + "Lipinski", + "Lindemann", + "Leppert", + "Leopold", + "Leasure", + "Leaf", + "Labarge", + "Kubik", + "Knisely", + "Knepp", + "Kenworthy", + "Kennelly", + "Kelch", + "Karg", + "Kanter", + "Ignacio", + "Hyer", + "Houchin", + "Hosley", + "Hosler", + "Hollon", + "Holleman", + "Heitman", + "Hebb", + "Haggins", + "Gwaltney", + "Guin", + "Greenman", + "Goulding", + "Gorden", + "Goodyear", + "Geraci", + "Georges", + "Gathers", + "Frison", + "Feagin", + "Falconer", + "Espada", + "Erving", + "Erikson", + "Eisenhauer", + "Eder", + "Ebeling", + "Durgin", + "Drown", + "Dowdle", + "Dinwiddie", + "Delcastillo", + "Dedrick", + "Crimmins", + "Covell", + "Cournoyer", + "Coria", + "Cohan", + "Cataldo", + "Carpentier", + "Canas", + "Campa", + "Brode", + "Brashears", + "Blaser", + "Bicknell", + "Berk", + "Bednar", + "Barwick", + "Ascencio", + "Althoff", + "Almodovar", + "Alamo", + "Zirkle", + "Zabala", + "Xu", + "Wolverton", + "Winebrenner", + "Wetherell", + "Westlake", + "Wegener", + "Weddington", + "Vong", + "Tuten", + "Trosclair", + "Trim", + "Tressler", + "Theroux", + "Teske", + "Sword", + "Swinehart", + "Swensen", + "Sundquist", + "Southall", + "Socha", + "Sizer", + "Silverberg", + "Shortt", + "Shimizu", + "Sherrard", + "Shen", + "Shaeffer", + "Seth", + "Scheid", + "Scheetz", + "Saravia", + "Sanner", + "Rubinstein", + "Rozell", + "Romer", + "Ringo", + "Rheaume", + "Reisinger", + "Raven", + "Randles", + "Pullum", + "Petrella", + "Payan", + "Papp", + "Pablo", + "Nordin", + "Norcross", + "Nicoletti", + "Nicholes", + "Newbold", + "Nakagawa", + "Mraz", + "Monteith", + "Milstead", + "Milliner", + "Mellen", + "Mccardle", + "Matthias", + "Marcy", + "Luft", + "Loo", + "Locker", + "Liptak", + "Lipp", + "Leitch", + "Latimore", + "Larrison", + "Landau", + "Laborde", + "Koval", + "Izquierdo", + "Hymel", + "Hoskin", + "Holte", + "Hoefer", + "Hayworth", + "Hausman", + "Harrill", + "Harrel", + "Hardt", + "Gully", + "Groover", + "Grinnell", + "Greenspan", + "Graver", + "Grandberry", + "Gorrell", + "Goldenberg", + "Goguen", + "Gilleland", + "Garr", + "Fuson", + "Foye", + "Felt", + "Feldmann", + "Everly", + "Dyess", + "Dyal", + "Dunnigan", + "Downie", + "Dolby", + "Divine", + "Deatherage", + "Dates", + "Danna", + "Cosey", + "Corrado", + "Cheever", + "Celaya", + "Caver", + "Cashion", + "Caplinger", + "Cansler", + "Byrge", + "Bruder", + "Brew", + "Breuer", + "Breslin", + "Brazelton", + "Botkin", + "Bonneau", + "Bones", + "Bondurant", + "Bohanan", + "Bogue", + "Boes", + "Bodner", + "Boatner", + "Blatt", + "Bickley", + "Belliveau", + "Beiler", + "Beier", + "Beckstead", + "Bart", + "Bang", + "Bachmann", + "Atkin", + "Aron", + "Andreas", + "Altizer", + "Alloway", + "Allaire", + "Albro", + "Abron", + "Zellmer", + "Yetter", + "Yelverton", + "Wiltshire", + "Wiens", + "Whidden", + "Wait", + "Viramontes", + "Vanwormer", + "Topper", + "Tarantino", + "Tanksley", + "Sumlin", + "Strauch", + "Strang", + "Stice", + "Spahn", + "Sosebee", + "Sigala", + "Shrout", + "Seamon", + "Schrum", + "Schneck", + "Schantz", + "Said", + "Ruddy", + "Romig", + "Roehl", + "Renninger", + "Reding", + "Pyne", + "Polak", + "Pohlman", + "Pasillas", + "Oldfield", + "Oldaker", + "Ohanlon", + "Ogilvie", + "Norberg", + "Nolette", + "Nies", + "Neufeld", + "Nellis", + "Mummert", + "Mulvihill", + "Mullaney", + "Monteleone", + "Mendonca", + "Meisner", + "Mcmullan", + "Mccluney", + "Mattis", + "Massengill", + "Manfredi", + "Luedtke", + "Lounsbury", + "Lora", + "Liberatore", + "Leek", + "Lease", + "Lazaro", + "Lamphere", + "Laforge", + "Kuo", + "Koo", + "Jourdan", + "Ismail", + "Iorio", + "Iniguez", + "Ikeda", + "Hubler", + "Hodgdon", + "Hocking", + "Heacock", + "Haslam", + "Haralson", + "Hanshaw", + "Hannum", + "Hallam", + "Haden", + "Garnes", + "Garces", + "Gammage", + "Gambino", + "Finkel", + "Faucett", + "Fahy", + "Esteban", + "Ehrhardt", + "Eggen", + "Dusek", + "Durrant", + "Dubay", + "Dones", + "Dey", + "Depasquale", + "Delucia", + "Degraff", + "Deer", + "Decamp", + "Davalos", + "Darwin", + "Dan", + "Cullins", + "Conard", + "Clouser", + "Clontz", + "Cifuentes", + "Chico", + "Chappel", + "Chaffins", + "Celis", + "Carwile", + "Byram", + "Bruggeman", + "Brick", + "Bressler", + "Brathwaite", + "Brasfield", + "Bradburn", + "Boose", + "Boon", + "Bodie", + "Blosser", + "Blas", + "Bise", + "Bertsch", + "Bernardi", + "Bernabe", + "Bengtson", + "Barrette", + "Astorga", + "Armand", + "Antone", + "Alday", + "Albee", + "Abrahamson", + "Yarnell", + "Wiltse", + "Wile", + "Wiebe", + "Waguespack", + "Vasser", + "Upham", + "Tyre", + "Turek", + "Tune", + "Traxler", + "Torain", + "Tomaszewski", + "Tinnin", + "Tiner", + "Tindell", + "Teed", + "Styron", + "Stahlman", + "Staab", + "Spoon", + "Spells", + "Skiba", + "Shih", + "Sheperd", + "Seidl", + "Secor", + "Schutte", + "Sanfilippo", + "Ruder", + "Rondon", + "Reina", + "Rearick", + "Rank", + "Procter", + "Prochaska", + "Pettengill", + "Pauly", + "Neilsen", + "Nally", + "Mutter", + "Mullenax", + "Morano", + "Meads", + "Mcnaughton", + "Mcmurtry", + "Mcmath", + "Mckinsey", + "Matthes", + "Massenburg", + "Marlar", + "Margolis", + "Marcos", + "Malin", + "Magallon", + "Mackin", + "Lovette", + "Loughran", + "Loring", + "Longstreet", + "Loiselle", + "Lenihan", + "Laub", + "Kunze", + "Kull", + "Koepke", + "Knights", + "Kerwin", + "Kalinowski", + "Kagan", + "Innis", + "Innes", + "Husband", + "Holtzman", + "Heinemann", + "Harshman", + "Haider", + "Haack", + "Guss", + "Grondin", + "Grissett", + "Greenawalt", + "Gravel", + "Goudy", + "Goodlett", + "Goldston", + "Gokey", + "Goin", + "Gardea", + "Galaviz", + "Gafford", + "Gabrielson", + "Furlow", + "Fritch", + "Fordyce", + "Folger", + "Elizalde", + "Ehlert", + "Eckhoff", + "Eccleston", + "Ealey", + "Dubin", + "Dolphin", + "Dieter", + "Diemer", + "Deschamps", + "Delapena", + "Decicco", + "Debolt", + "Daum", + "Cullinan", + "Crittendon", + "Crase", + "Cossey", + "Coppock", + "Coots", + "Colyer", + "Columbus", + "Cluck", + "Chamberland", + "Cane", + "Burkhead", + "Bumpus", + "Buchan", + "Borman", + "Bork", + "Boe", + "Birkholz", + "Berardi", + "Benda", + "Behnke", + "Barter", + "Auer", + "Amezquita", + "Wotring", + "Wirtz", + "Wingert", + "Wiesner", + "Whitesides", + "Weyant", + "Wainscott", + "Vivian", + "Venezia", + "Varnell", + "Tussey", + "Trainer", + "Toll", + "Thurlow", + "Tack", + "Tabares", + "Stiver", + "Stell", + "Starke", + "Stanhope", + "Stanek", + "Sisler", + "Sinnott", + "Sidney", + "Siciliano", + "Shehan", + "Selph", + "Seager", + "Scurlock", + "Scranton", + "Santucci", + "Santangelo", + "Saltsman", + "Ruel", + "Ropp", + "Rolling", + "Rogge", + "Rettig", + "Renwick", + "Reidy", + "Reider", + "Redfield", + "Quam", + "Premo", + "Port", + "Pier", + "Peet", + "Parente", + "Paolucci", + "Pan", + "Palmquist", + "Orme", + "Ohler", + "Ogg", + "Netherton", + "Mutchler", + "Morita", + "Mistretta", + "Minnis", + "Middendorf", + "Menzel", + "Mendosa", + "Mendelson", + "Meaux", + "Mcspadden", + "Mcquaid", + "Mcnatt", + "Manigault", + "Maney", + "Mager", + "Lung", + "Lukes", + "Lopresti", + "Liriano", + "Lipton", + "Letson", + "Lechuga", + "Lazenby", + "Lauria", + "Larimore", + "Kwok", + "Kwak", + "Krupp", + "Krupa", + "Krum", + "Kopec", + "Kinchen", + "Kifer", + "Kerney", + "Kerner", + "Kennison", + "Kegley", + "Kays", + "Karcher", + "Justis", + "Johson", + "Jellison", + "Janke", + "Isabell", + "Huskins", + "Holzman", + "Hollie", + "Hinojos", + "Highland", + "Hefley", + "He", + "Hatmaker", + "Harte", + "Halloway", + "Hallenbeck", + "Goodwyn", + "Glaspie", + "Gillian", + "Geise", + "Fullwood", + "Fryman", + "Frew", + "Frakes", + "Fraire", + "Farrer", + "Enlow", + "Engen", + "Ellzey", + "Eckles", + "Earles", + "Ealy", + "Dunkley", + "Drinkard", + "Dreiling", + "Draeger", + "Dinardo", + "Dills", + "Desroches", + "Desantiago", + "Current", + "Curlee", + "Crumbley", + "Critchlow", + "Coury", + "Courtright", + "Coffield", + "Cleek", + "Christen", + "Charpentier", + "Cardone", + "Caples", + "Cantin", + "Buntin", + "Bugbee", + "Brinkerhoff", + "Brackin", + "Bourland", + "Bohl", + "Bogdan", + "Blassingame", + "Beacham", + "Banning", + "Auguste", + "Andreasen", + "Amann", + "Almon", + "Alejo", + "Adelman", + "Abston", + "Zeno", + "Yerger", + "Wymer", + "Woodberry", + "Windley", + "Whiteaker", + "Westfield", + "Weibel", + "Wanner", + "Waldrep", + "Vital", + "Villani", + "Vanarsdale", + "Utterback", + "Updike", + "Triggs", + "Topete", + "Tolar", + "Tigner", + "Thoms", + "Tauber", + "Tarvin", + "Tally", + "Swiney", + "Sweatman", + "Studebaker", + "Streets", + "Stennett", + "States", + "Starrett", + "Stannard", + "Stalvey", + "Sonnenberg", + "Smithey", + "Sieber", + "Sickles", + "Shinault", + "Segars", + "Sanger", + "Salmeron", + "Rothe", + "Rizzi", + "Rine", + "Ricard", + "Restrepo", + "Ralls", + "Ragusa", + "Quiroga", + "Ping", + "Phung", + "Pero", + "Pegg", + "Pavlik", + "Papenfuss", + "Oropeza", + "Omar", + "Okane", + "Neer", + "Nee", + "Nathaniel", + "Mudge", + "Mozingo", + "Molinaro", + "Mikel", + "Mcvicker", + "Mcgarvey", + "Mcfalls", + "Mccraney", + "Matus", + "Magers", + "Llanos", + "Livermore", + "Liss", + "Linehan", + "Leto", + "Leitner", + "Laymon", + "Lawing", + "Lawerence", + "Lacourse", + "Kwong", + "Kollar", + "Kneeland", + "Keo", + "Kennett", + "Kellett", + "Kangas", + "Janzen", + "Hutter", + "Huse", + "Huling", + "Hoss", + "Hohn", + "Hofmeister", + "Hewes", + "Hern", + "Harjo", + "Habib", + "Gust", + "Guice", + "Grullon", + "Greggs", + "Grayer", + "Granier", + "Grable", + "Gowdy", + "Giannini", + "Getchell", + "Gartman", + "Garnica", + "Ganey", + "Gallimore", + "Fray", + "Fetters", + "Fergerson", + "Farlow", + "Fagundes", + "Exley", + "Esteves", + "Enders", + "Edenfield", + "Easterwood", + "Drakeford", + "Dipasquale", + "Desousa", + "Deshields", + "Deeter", + "Dedmon", + "Debord", + "Daughtery", + "Cutts", + "Courtemanche", + "Coursey", + "Copple", + "Coomes", + "Collis", + "Coll", + "Cogburn", + "Clopton", + "Choquette", + "Chaidez", + "Castrejon", + "Calhoon", + "Burbach", + "Bulloch", + "Buchman", + "Bruhn", + "Bohon", + "Blough", + "Bien", + "Belmont", + "Baynes", + "Barstow", + "Zeman", + "Zackery", + "Yardley", + "Yamashita", + "Wulff", + "Wilken", + "Wiliams", + "Wickersham", + "Wible", + "Whipkey", + "Wedgeworth", + "Walmsley", + "Walkup", + "Vreeland", + "Verrill", + "Valera", + "Umana", + "Traub", + "Timothy", + "Swingle", + "Swing", + "Summey", + "Stroupe", + "Stockstill", + "Steffey", + "Stefanski", + "Statler", + "Stapp", + "Speights", + "Sons", + "Solari", + "Soderberg", + "Slick", + "Shunk", + "Shorey", + "Shewmaker", + "Sheilds", + "Schiffer", + "Schank", + "Schaff", + "Sagers", + "Rodger", + "Rochon", + "Riser", + "Rickett", + "Reale", + "Raglin", + "Poon", + "Polly", + "Polen", + "Plata", + "Pitcock", + "Percival", + "Palen", + "Pahl", + "Orona", + "Oberle", + "Nocera", + "Navas", + "Nault", + "Mullings", + "Mouser", + "Moos", + "Montejano", + "Monreal", + "Minick", + "Middlebrook", + "Meece", + "Mcmillion", + "Mccullen", + "Mauck", + "Marshburn", + "Maillet", + "Mahaney", + "Magner", + "Maclin", + "Lucey", + "Litteral", + "Lippincott", + "Leite", + "Leis", + "Leaks", + "Laurie", + "Lamarre", + "Kost", + "Jurgens", + "Jesus", + "Jerkins", + "Jager", + "Hurwitz", + "Hughley", + "Hotaling", + "Horstman", + "Hohman", + "Hocker", + "Hively", + "Hipps", + "Hile", + "Hessler", + "Hermanson", + "Hepworth", + "Henn", + "Helland", + "Hedlund", + "Harkless", + "Haigler", + "Gutierez", + "Gum", + "Grindstaff", + "Glantz", + "Giardina", + "Gerken", + "Gadsden", + "Freda", + "Finnerty", + "Feld", + "Farnum", + "Encinas", + "Elton", + "Eager", + "Drakes", + "Dennie", + "Cutlip", + "Curtsinger", + "Couto", + "Cortinas", + "Corby", + "Choice", + "Chiasson", + "Carle", + "Carballo", + "Brindle", + "Borum", + "Bober", + "Blagg", + "Birk", + "Berthiaume", + "Beahm", + "Batres", + "Basnight", + "Barbara", + "Backes", + "Axtell", + "Aust", + "Au", + "Atterberry", + "Alvares", + "Alt", + "Alegria", + "Abe", + "Yow", + "Yip", + "Woodell", + "Wojciechowski", + "Winfree", + "Winbush", + "Wiest", + "Wesner", + "Wax", + "Wamsley", + "Wakeman", + "Verner", + "Truex", + "Trafton", + "Toman", + "Thorsen", + "Thor", + "Theus", + "Tellier", + "Tallant", + "Szeto", + "Strope", + "Stills", + "Stage", + "Sorg", + "Simkins", + "Shuey", + "Shaul", + "Servin", + "Serio", + "Serafin", + "Senior", + "Sebring", + "Salguero", + "Saba", + "Ryerson", + "Rudder", + "Ruark", + "Rother", + "Rohrbaugh", + "Rohrbach", + "Rohan", + "Rogerson", + "Risher", + "Rigg", + "Reeser", + "Pryce", + "Prokop", + "Prins", + "Priebe", + "Prejean", + "Pinheiro", + "Petrone", + "Petri", + "Penson", + "Pearlman", + "Parikh", + "Pal", + "Pair", + "Natoli", + "Murakami", + "Mullikin", + "Mullane", + "Motes", + "Morningstar", + "Monks", + "Mcveigh", + "Mcgrady", + "Mcgaughey", + "Mccurley", + "Masi", + "Marchan", + "Manske", + "Maine", + "Maez", + "Lusby", + "Linde", + "Lile", + "Likens", + "Licon", + "Leroux", + "Lemaire", + "Legette", + "Lax", + "Laskey", + "Laprade", + "Laplant", + "Lady", + "Kolar", + "Kittredge", + "Kinley", + "Kerber", + "Kanagy", + "Johannes", + "Jetton", + "Jayne", + "January", + "Janik", + "Ippolito", + "Inouye", + "Hunsinger", + "Howley", + "Howery", + "Horrell", + "Hoosier", + "Holthaus", + "Hiner", + "Hilson", + "Hilderbrand", + "Hasan", + "Hartzler", + "Harnish", + "Harada", + "Hansford", + "Halligan", + "Hagedorn", + "Gwynn", + "Gudino", + "Greenstein", + "Greear", + "Gracey", + "Goudeau", + "Gose", + "Goodner", + "Ginsburg", + "Gerth", + "Gerner", + "Fyfe", + "Fujii", + "Frier", + "Frenette", + "Folmar", + "Fleisher", + "Fleischmann", + "Fetzer", + "Fern", + "Eisenman", + "Earhart", + "Dupuy", + "Dunkelberger", + "Drummer", + "Drexler", + "Dillinger", + "Dilbeck", + "Diana", + "Dewald", + "Demby", + "Deford", + "Daniell", + "Dake", + "Craine", + "Como", + "Clever", + "Chesnut", + "Casady", + "Carstens", + "Carrick", + "Carino", + "Carignan", + "Canchola", + "Cale", + "Bushong", + "Burman", + "Buono", + "Brownlow", + "Broach", + "Britten", + "Brickhouse", + "Boyden", + "Boulton", + "Borne", + "Borland", + "Bohrer", + "Blubaugh", + "Bever", + "Berggren", + "Benevides", + "Arocho", + "Arends", + "Amezcua", + "Almendarez", + "Zalewski", + "Witzel", + "Winkfield", + "Wilhoite", + "Vara", + "Vangundy", + "Vanfleet", + "Vanetten", + "Vandergriff", + "Urbanski", + "Tyrell", + "Troiano", + "Tickle", + "Thibodaux", + "Straus", + "Stoneking", + "Stjean", + "Stillings", + "Stiff", + "Stange", + "Square", + "Speicher", + "Speegle", + "Sowa", + "Smeltzer", + "Slawson", + "Simmonds", + "Shuttleworth", + "Serpa", + "Senger", + "Seidman", + "Schweiger", + "Schloss", + "Schimmel", + "Schechter", + "Sayler", + "Sabb", + "Sabatini", + "Ronan", + "Rodiguez", + "Riggleman", + "Richins", + "Reep", + "Reamer", + "Prunty", + "Porath", + "Plunk", + "Piland", + "Philbrook", + "Pettitt", + "Perna", + "Peralez", + "Pascale", + "Padula", + "Oboyle", + "Nivens", + "Nickols", + "Murph", + "Mundt", + "Munden", + "Montijo", + "Mcmanis", + "Mcgrane", + "Mccrimmon", + "Manzi", + "Mangold", + "Malick", + "Mahar", + "Maddock", + "Lust", + "Losey", + "Loop", + "Litten", + "Liner", + "Leff", + "Leedy", + "Leavell", + "Ladue", + "Krahn", + "Kluge", + "Junker", + "Iversen", + "Imler", + "Hurtt", + "Huizar", + "Hubbert", + "Howington", + "Hollomon", + "Holdren", + "Hoisington", + "Hise", + "Heiden", + "Hauge", + "Hartigan", + "Gutirrez", + "Griffie", + "Greenhill", + "Gratton", + "Granata", + "Gottfried", + "Gertz", + "Gautreaux", + "Furry", + "Furey", + "Funderburg", + "Flippen", + "Fitzgibbon", + "Fergus", + "Felice", + "Eye", + "Dyar", + "Drucker", + "Donoghue", + "Dildy", + "Devers", + "Detweiler", + "Despres", + "Denby", + "Degeorge", + "Cueto", + "Cranston", + "Courville", + "Clukey", + "Cirillo", + "Chon", + "Chivers", + "Caudillo", + "Catt", + "Butera", + "Bulluck", + "Buckmaster", + "Braunstein", + "Bracamonte", + "Bourdeau", + "Border", + "Bonnette", + "Bobadilla", + "Boaz", + "Blackledge", + "Beshears", + "Bernhard", + "Bergeson", + "Baver", + "Barthel", + "Balsamo", + "Bak", + "Aziz", + "Awad", + "Authement", + "Altom", + "Altieri", + "Abels", + "Zigler", + "Zhu", + "Younker", + "Yeomans", + "Yearwood", + "Wurster", + "Winget", + "Whitsett", + "Wechsler", + "Weatherwax", + "Wathen", + "Warriner", + "Wanamaker", + "Walraven", + "Viens", + "Vandemark", + "Vancamp", + "Uchida", + "Triana", + "Tinoco", + "Terpstra", + "Tellis", + "Tarin", + "Taranto", + "Takacs", + "Studdard", + "Struthers", + "Strout", + "Stiller", + "Spataro", + "Soderquist", + "Sliger", + "Silberman", + "Shurtleff", + "Sheetz", + "Schillinger", + "Ritch", + "Reif", + "Raybon", + "Ratzlaff", + "Radley", + "Putt", + "Putney", + "Prime", + "Press", + "Pinette", + "Piner", + "Petrin", + "Parise", + "Osbourne", + "Nyman", + "Northington", + "Noblitt", + "Nishimura", + "Nell", + "Neher", + "Nalls", + "Naccarato", + "Mucha", + "Mounce", + "Miron", + "Millis", + "Meaney", + "Mcnichols", + "Mckinnis", + "Mcjunkin", + "Mcduffy", + "Max", + "Marcello", + "Manrique", + "Mannion", + "Mangual", + "Malveaux", + "Mains", + "Lumsden", + "Lucien", + "Lohmann", + "Lipe", + "Lightsey", + "Lemasters", + "Leist", + "Laxton", + "Laverriere", + "Latorre", + "Lamons", + "Kral", + "Kopf", + "Knauer", + "Kitt", + "Kaul", + "Karas", + "Kamps", + "Jusino", + "Janis", + "Islam", + "Hullinger", + "Huges", + "Hornung", + "Hiser", + "Hempel", + "Helsel", + "Hassinger", + "Hargraves", + "Hammes", + "Hallberg", + "Gutman", + "Gumbs", + "Gruver", + "Graddy", + "Gonsales", + "Goncalves", + "Glennon", + "Gilford", + "Geno", + "Freshour", + "Flippo", + "Fifer", + "Few", + "Fermin", + "Fason", + "Farrish", + "Fallin", + "Ewert", + "Estepp", + "Escudero", + "Ensminger", + "Emmanuel", + "Emberton", + "Elms", + "Ellerbe", + "Eide", + "Dysart", + "Dougan", + "Dierking", + "Dicus", + "Detrick", + "Deroche", + "Depue", + "Demartino", + "Delosreyes", + "Dalke", + "Culbreath", + "Crownover", + "Crisler", + "Crass", + "Corsi", + "Chagnon", + "Centers", + "Cavanagh", + "Casson", + "Carollo", + "Cadwallader", + "Burnley", + "Burciaga", + "Burchard", + "Broadhead", + "Boris", + "Booze", + "Bolte", + "Body", + "Berens", + "Bellman", + "Bellard", + "Baril", + "Arden", + "Antonucci", + "Amado", + "Allie", + "Wolfgram", + "Winsor", + "Wimbish", + "Wilbert", + "Wier", + "Wallach", + "Viveros", + "Vento", + "Varley", + "Vanslyke", + "Vangorder", + "Touchstone", + "Tomko", + "Tiemann", + "Throop", + "Tamura", + "Talmadge", + "Swayze", + "Sturdevant", + "Strauser", + "Stolz", + "Stenberg", + "Stayton", + "Spohn", + "Spillers", + "Spillane", + "Sluss", + "Sloane", + "Slavens", + "Simonetti", + "Shofner", + "Shead", + "Senecal", + "Seales", + "Schueler", + "Schley", + "Schacht", + "Sauve", + "Sarno", + "Salsbury", + "Rothschild", + "Rosier", + "Rines", + "Reveles", + "Rein", + "Redus", + "Redfern", + "Reck", + "Ranney", + "Raggs", + "Prout", + "Prill", + "Preble", + "Prager", + "Plemons", + "Pippen", + "Pilon", + "Piccirillo", + "Pewitt", + "Pesina", + "Pecora", + "Otani", + "Orsini", + "Ollie", + "Oestreich", + "Odea", + "Ocallaghan", + "Northup", + "Niehaus", + "Newberg", + "Nasser", + "Narron", + "Monarrez", + "Mishler", + "Mcsherry", + "Mcelfresh", + "Mayon", + "Mauer", + "Mattice", + "Mash", + "Marrone", + "Marmolejo", + "Marini", + "Marie", + "Mara", + "Malm", + "Machen", + "Lunceford", + "Loewen", + "Liverman", + "Litwin", + "Linscott", + "Levins", + "Lenox", + "Legaspi", + "Leeman", + "Leavy", + "Lannon", + "Lamson", + "Lambdin", + "Labarre", + "Knouse", + "Klemm", + "Kleinschmidt", + "Kirklin", + "Keels", + "Juliano", + "Howser", + "Hott", + "Hosier", + "Hosea", + "Hopwood", + "Holyfield", + "Hodnett", + "Hirsh", + "Heimann", + "Height", + "Heckel", + "Harger", + "Hamil", + "Hajek", + "Gurganus", + "Gunning", + "Grange", + "Gonzalas", + "Goggins", + "Gerow", + "Gaydos", + "Garduno", + "Ganley", + "Galey", + "Farner", + "Ester", + "Engles", + "Emond", + "Emert", + "Ellenburg", + "Edick", + "Duell", + "Dublin", + "Dorazio", + "Dong", + "Dimond", + "Diederich", + "Dewalt", + "Depuy", + "Dempster", + "Demaria", + "Dehoyos", + "Dearth", + "Dealba", + "Dane", + "Czech", + "Crose", + "Crespin", + "Cogdill", + "Clinard", + "Cipriano", + "Chretien", + "Chalk", + "Cerny", + "Ceniceros", + "Celestin", + "Caple", + "Cacho", + "Burrill", + "Buhr", + "Buckland", + "Branam", + "Boysen", + "Bovee", + "Boos", + "Boler", + "Blom", + "Blasko", + "Beyers", + "Belz", + "Belmonte", + "Bednarz", + "Beckmann", + "Beaudin", + "Bazile", + "Barbeau", + "Balentine", + "Abrahams", + "Able", + "Zielke", + "Yunker", + "Yeates", + "Wrobel", + "Wike", + "Whisnant", + "Wherry", + "Wagnon", + "Vogan", + "Vansant", + "Vannest", + "Vallo", + "Ullery", + "Towles", + "Towell", + "Tiger", + "Thill", + "Taormina", + "Tannehill", + "Taing", + "Storrs", + "Stickles", + "Stetler", + "Sparling", + "Solt", + "Silcox", + "Sheard", + "Shadle", + "Seman", + "Selleck", + "Schlemmer", + "Scher", + "Sapien", + "Sainz", + "Rumble", + "Roye", + "Rosamond", + "Romain", + "Rizzuto", + "Resch", + "Rentz", + "Rather", + "Rasch", + "Ranieri", + "Purtell", + "Primmer", + "Portwood", + "Pontius", + "Pons", + "Pletcher", + "Pledger", + "Pirkle", + "Pillsbury", + "Pentecost", + "Peng", + "Paxson", + "Ortez", + "Organ", + "Oles", + "Newborn", + "Mullett", + "Muirhead", + "Mouzon", + "Mork", + "Mollett", + "Mohn", + "Mitcham", + "Melillo", + "Mee", + "Medders", + "Mcmiller", + "Mccleery", + "Mccaughey", + "Manders", + "Mak", + "Maciejewski", + "Macaulay", + "Lute", + "Lipman", + "Lewter", + "Larocque", + "Langton", + "Kriner", + "Knipp", + "Killeen", + "Karn", + "Kalish", + "Kaczor", + "Jonson", + "Jerez", + "Jarrard", + "Janda", + "Hymes", + "Hollman", + "Hollandsworth", + "Holl", + "Hobdy", + "Hitch", + "Hennen", + "Hemmer", + "Hagins", + "Haddox", + "Guitierrez", + "Guernsey", + "Gorsuch", + "Gholson", + "Genova", + "Gazaway", + "Gauna", + "Gammons", + "Freels", + "Fonville", + "Fly", + "Florian", + "Fleet", + "Fetterman", + "Fava", + "Farquhar", + "Farish", + "Fabela", + "Escoto", + "Eisen", + "Dossett", + "Dority", + "Dorfman", + "Demmer", + "Dehn", + "Dawley", + "Darbonne", + "Damore", + "Damm", + "Crosley", + "Cron", + "Crompton", + "Crichton", + "Cotner", + "Cordon", + "Conerly", + "Colvard", + "Clauson", + "Chess", + "Cheeseman", + "Charity", + "Cavallaro", + "Castille", + "Cabello", + "Burgan", + "Buffum", + "Bruss", + "Brassfield", + "Bowerman", + "Bothwell", + "Borgen", + "Bonaparte", + "Bombard", + "Boivin", + "Boissonneault", + "Bogner", + "Bodden", + "Boan", + "Blanche", + "Bittinger", + "Bickham", + "Bedolla", + "Bale", + "Bainbridge", + "Aybar", + "Avendano", + "Ashlock", + "Amidon", + "Almanzar", + "Akridge", + "Ackermann", + "Zager", + "Yong", + "Xavier", + "Worrall", + "Winans", + "Wilsey", + "Wightman", + "Westrick", + "Wenner", + "Warne", + "Warford", + "Verville", + "Utecht", + "Upson", + "Tuma", + "Tseng", + "Troncoso", + "Trollinger", + "Torbert", + "Taulbee", + "Sutterfield", + "Stough", + "Storch", + "Stonebraker", + "Stolle", + "Stilson", + "Stiefel", + "Steptoe", + "Stepney", + "Stender", + "Stemple", + "Staggers", + "Spurrier", + "Spray", + "Spinney", + "Spengler", + "Smartt", + "Skoog", + "Silvis", + "Sieg", + "Shuford", + "Selfridge", + "Seguin", + "Sedgwick", + "Sease", + "Scotti", + "Schroer", + "Schlenker", + "Schill", + "Savarese", + "Sapienza", + "Sanson", + "Sandefur", + "Salamone", + "Rusnak", + "Rudisill", + "Royalty", + "Rothermel", + "Roca", + "Resendiz", + "Reliford", + "Rasco", + "Raiford", + "Quisenberry", + "Quijada", + "Pullins", + "Puccio", + "Postell", + "Poppe", + "Pinter", + "Piche", + "Petrucci", + "Pellegrin", + "Pelaez", + "Patti", + "Paton", + "Pasco", + "Parkes", + "Paden", + "Pabst", + "Orchard", + "Olmsted", + "Newlon", + "Mynatt", + "Mustafa", + "Mower", + "Morrone", + "Moree", + "Moffat", + "Mixson", + "Minner", + "Min", + "Millette", + "Mederos", + "Mcgahan", + "Mcconville", + "Maughan", + "Massingill", + "Marano", + "Macri", + "Lovern", + "Lichtenstein", + "Leonetti", + "Lehner", + "Lawley", + "Laramie", + "Lappin", + "Lahti", + "Lago", + "Lacayo", + "Kuester", + "Knee", + "Kincade", + "Junior", + "Juhl", + "Joslyn", + "Jiron", + "Jessop", + "Jerry", + "Jarosz", + "Jain", + "Hults", + "Hoge", + "Hodgins", + "Hoban", + "Hinkson", + "Hillyard", + "Herzig", + "Hervey", + "Henriksen", + "Hawker", + "Hause", + "Hard", + "Hankerson", + "Gregson", + "Golliday", + "Gilcrease", + "Gessner", + "Gerace", + "Garwood", + "Garst", + "Gaillard", + "Flinchum", + "Fishel", + "Fishback", + "Filkins", + "Fentress", + "Fabre", + "Ethier", + "Espana", + "Eisner", + "Ehrhart", + "Efird", + "Drennon", + "Dominy", + "Dominique", + "Domingue", + "Dipaolo", + "Dinan", + "Dimartino", + "Deskins", + "Dengler", + "Defreitas", + "Defranco", + "Dancer", + "Dahlin", + "Cutshaw", + "Cuthbert", + "Croyle", + "Crothers", + "Critchfield", + "Cowie", + "Costner", + "Coppedge", + "Copes", + "Ciccone", + "Champ", + "Cesar", + "Caufield", + "Capo", + "Cambron", + "Cambridge", + "Buser", + "Burnes", + "Buhl", + "Buendia", + "Brindley", + "Brecht", + "Bourgoin", + "Boomer", + "Blackshire", + "Birge", + "Benninger", + "Bembry", + "Beil", + "Begaye", + "Barrentine", + "Barks", + "Banton", + "Balmer", + "Baity", + "Auerbach", + "Ambler", + "Alexandre", + "Ackerson", + "Zurcher", + "Zell", + "Wynkoop", + "Wallick", + "Waid", + "Vos", + "Vizcaino", + "Vester", + "Veale", + "Vandermark", + "Vanderford", + "Tuthill", + "Trivette", + "Thiessen", + "Tewksbury", + "Tao", + "Tabron", + "Swim", + "Swasey", + "Swanigan", + "Stoughton", + "Stoudt", + "Stimson", + "Stecker", + "Stead", + "Stall", + "Spady", + "Souther", + "Smoak", + "Sklar", + "Simcox", + "Sidwell", + "Sharon", + "Seybert", + "Sesco", + "Seeman", + "Seaborn", + "Schwenk", + "Schmeling", + "Rossignol", + "Robillard", + "Robicheaux", + "Riveria", + "Rippeon", + "Ridgley", + "Remaley", + "Rehkop", + "Reddish", + "Reach", + "Rauscher", + "Rachel", + "Quirion", + "Pusey", + "Pruden", + "Pressler", + "Potvin", + "Pospisil", + "Paradiso", + "Pangburn", + "Palmateer", + "Ownby", + "Otwell", + "Osterberg", + "Osmond", + "Olsson", + "Old", + "Oberlander", + "Nusbaum", + "Novack", + "Nokes", + "Nicastro", + "Nehls", + "Nay", + "Naber", + "Mulhern", + "Motter", + "Moretz", + "Milian", + "Mercedes", + "Mckeel", + "Mcclay", + "Mccart", + "Matsuda", + "Mary", + "Martucci", + "Marple", + "Marko", + "Marciniak", + "Manes", + "Mancia", + "Maker", + "Macrae", + "Lybarger", + "Lint", + "Lineberger", + "Levingston", + "Lecroy", + "Lattimer", + "Laseter", + "Kulick", + "Krier", + "Knutsen", + "Klem", + "Kinne", + "Kinkade", + "Ketterman", + "Kerstetter", + "Kersten", + "Karam", + "Jury", + "Joshi", + "Jin", + "Jent", + "Jefcoat", + "Hillier", + "Hillhouse", + "Hettinger", + "Henthorn", + "Henline", + "Helzer", + "Heitzman", + "Heineman", + "Heenan", + "Haughton", + "Haris", + "Harbert", + "Haman", + "Grinstead", + "Gremillion", + "Gorby", + "Giraldo", + "Gioia", + "Gerardi", + "Geraghty", + "Gaunt", + "Gatson", + "Gardin", + "Gans", + "Gammill", + "Games", + "Gain", + "Friedlander", + "Frahm", + "Fossett", + "Fosdick", + "Forth", + "Forbush", + "Fondren", + "Fleckenstein", + "Fitchett", + "Filer", + "Feliz", + "Feist", + "Ewart", + "Evelyn", + "Esters", + "Elsner", + "Edgin", + "Eddie", + "Easterly", + "Dussault", + "Durazo", + "Don", + "Devereaux", + "Deshotel", + "Deckert", + "Dargan", + "Dare", + "Cornman", + "Conkle", + "Condit", + "Commander", + "Claunch", + "Clabaugh", + "Chute", + "Cheesman", + "Chea", + "Charney", + "Charleston", + "Casella", + "Carone", + "Carbonell", + "Canipe", + "Campana", + "Calles", + "Cabezas", + "Cabell", + "Buttram", + "Bustillos", + "Buskirk", + "Boyland", + "Bourke", + "Blakeley", + "Big", + "Berumen", + "Berrier", + "Bench", + "Belli", + "Behrendt", + "Baumbach", + "Bartsch", + "Baney", + "Arambula", + "Alldredge", + "Allbritton", + "Ziemba", + "Zanders", + "Youngquist", + "Yoshioka", + "Yohe", + "Wunder", + "Woodfin", + "Wojtowicz", + "Winkel", + "Wilmore", + "Willbanks", + "Wesolowski", + "Wendland", + "Walko", + "Votaw", + "Vanek", + "Uriarte", + "Urbano", + "Turnipseed", + "Triche", + "Trautman", + "Towler", + "Tokarz", + "Temples", + "Tefft", + "Teegarden", + "Syed", + "Swigart", + "Stryker", + "Stoller", + "Stapler", + "Stansfield", + "Smit", + "Smelley", + "Sicard", + "Shulman", + "Shew", + "Shear", + "Sheahan", + "Sharpton", + "Selvidge", + "Schlesinger", + "Savell", + "Sandford", + "Sabatino", + "Rosenbloom", + "Roepke", + "Rish", + "Rhames", + "Renken", + "Reger", + "Rappaport", + "Quarterman", + "Puig", + "Prasad", + "Poplar", + "Pizano", + "Pigott", + "Pick", + "Phair", + "Petrick", + "Patt", + "Pascua", + "Paramore", + "Papineau", + "Olivieri", + "Ogren", + "Norden", + "Noga", + "Nisbet", + "Munk", + "Munch", + "Mui", + "Morvant", + "Moro", + "Moloney", + "Merz", + "Meng", + "Meltzer", + "Mellinger", + "Mehl", + "Mcnealy", + "Mckernan", + "Mchaney", + "Mccleskey", + "Mcandrews", + "Mayton", + "Mayor", + "Markert", + "Maresca", + "Marcellus", + "Maner", + "Mandujano", + "Malpass", + "Macintyre", + "Lytton", + "Lyall", + "Lummus", + "Longshore", + "Longfellow", + "Lokey", + "Locher", + "Leverette", + "Lepe", + "Lefever", + "Leeson", + "Lederer", + "Lampert", + "Lagrone", + "La", + "Kreider", + "Korth", + "Knopf", + "Kleist", + "Kiss", + "Keltner", + "Kelling", + "Kaspar", + "Kappler", + "Justin", + "Josephs", + "Jiang", + "Huckins", + "Horace", + "Holub", + "Hofstetter", + "Hoehn", + "Higginson", + "Hennings", + "Heid", + "Havel", + "Hauer", + "Harnden", + "Hargreaves", + "Hanger", + "Guild", + "Guidi", + "Grate", + "Grandy", + "Grandstaff", + "Goza", + "Goodridge", + "Goodfellow", + "Goggans", + "Godley", + "Giusti", + "Gilyard", + "Geoghegan", + "Galyon", + "Gaeta", + "Funes", + "Font", + "Flor", + "Flanary", + "Fales", + "Erlandson", + "Ellett", + "Elia", + "Edinger", + "Dziedzic", + "Duerr", + "Draughn", + "Donoho", + "Dimatteo", + "Devos", + "Dematteo", + "Degnan", + "Darlington", + "Danis", + "Dam", + "Dahlstrom", + "Dahlke", + "Czajkowski", + "Cumbie", + "Culbert", + "Crosier", + "Croley", + "Corry", + "Clinger", + "Cheshire", + "Chalker", + "Cephas", + "Caywood", + "Cavalier", + "Capehart", + "Cales", + "Cadiz", + "Bussiere", + "Burriss", + "Burkart", + "Brundidge", + "Bronstein", + "Breeze", + "Bradt", + "Boydston", + "Bostrom", + "Borel", + "Bolles", + "Blay", + "Blackwelder", + "Bissett", + "Bevers", + "Bester", + "Bernardino", + "Benefiel", + "Belote", + "Beedle", + "Beckles", + "Baysinger", + "Bassler", + "Bartee", + "Barlett", + "Bargas", + "Barefield", + "Baptista", + "Arterburn", + "Armas", + "Apperson", + "Amoroso", + "Amedee", + "Zullo", + "Zellner", + "Yelton", + "Willems", + "Wilkin", + "Wiggin", + "Widman", + "Welk", + "Weingarten", + "Walla", + "Viers", + "Vess", + "Verdi", + "Veazey", + "Vannote", + "Tullos", + "Trudell", + "Trower", + "Trosper", + "Trimm", + "Trew", + "Tousignant", + "Topp", + "Tocco", + "Thoreson", + "Terhune", + "Tatom", + "Suniga", + "Sumter", + "Steeves", + "Stansell", + "Soltis", + "Sloss", + "Slaven", + "Sing", + "Shisler", + "Sheriff", + "Shanley", + "Servantes", + "Selders", + "Segrest", + "Seese", + "Seeber", + "Schaible", + "Savala", + "Sartor", + "Rutt", + "Rumbaugh", + "Ruis", + "Roten", + "Roessler", + "Ritenour", + "Riney", + "Restivo", + "Rene", + "Renard", + "Rakestraw", + "Rake", + "Rachal", + "Quiros", + "Pullin", + "Prudhomme", + "Primeaux", + "Prestridge", + "Presswood", + "Ponte", + "Polzin", + "Poarch", + "Pittenger", + "Piggott", + "Pickell", + "Phaneuf", + "Parvin", + "Parmley", + "Palmeri", + "Paisley", + "Ozment", + "Ormond", + "Ordaz", + "Ono", + "Olea", + "Obanion", + "Oakman", + "Novick", + "Nicklas", + "Nemec", + "Nappi", + "Mund", + "Morfin", + "Mera", + "Melgoza", + "Melby", + "Mcgoldrick", + "Mcelwain", + "Mcchristian", + "Mccaw", + "Marquart", + "Marlatt", + "Markovich", + "Mahr", + "Lupton", + "Lucus", + "Lorusso", + "Lerman", + "Leddy", + "Leaman", + "Leachman", + "Lavalle", + "Laduke", + "Kummer", + "Koury", + "Konopka", + "Koh", + "Koepp", + "Kloss", + "Klock", + "Khalil", + "Kernan", + "Kappel", + "Jakes", + "Inoue", + "Hutsell", + "Howle", + "Honore", + "Hole", + "Hockman", + "Hockaday", + "Hiltz", + "Hetherington", + "Hesser", + "Hershman", + "Heng", + "Heffron", + "Headen", + "Haskett", + "Hartline", + "Harned", + "Guillemette", + "Guglielmo", + "Guercio", + "Greenbaum", + "Goris", + "Glines", + "Gilmour", + "Gardella", + "Gadd", + "Gabler", + "Gabbert", + "Fuselier", + "Freudenburg", + "Fragoso", + "Follis", + "Flemings", + "Feltman", + "Febus", + "Farren", + "Fallis", + "Evert", + "Ekstrom", + "Eastridge", + "Dyck", + "Dufault", + "Dubreuil", + "Dresser", + "Drapeau", + "Domingues", + "Dolezal", + "Dinkel", + "Didonato", + "Devitt", + "Devane", + "Demott", + "Daughtrey", + "Daubert", + "Das", + "Darrell", + "Creason", + "Crary", + "Costilla", + "Chipps", + "Cheatwood", + "Carmean", + "Canton", + "Caffrey", + "Burgher", + "Buker", + "Brunk", + "Brodbeck", + "Brantner", + "Brandy", + "Bolivar", + "Boerner", + "Bodkin", + "Biel", + "Betty", + "Bencomo", + "Bellino", + "Beliveau", + "Beauvais", + "Beaupre", + "Baylis", + "Baskett", + "Barcus", + "Barbera", + "Baltz", + "Asay", + "Arney", + "Arcuri", + "Ankney", + "Agostini", + "Addy", + "Zwilling", + "Zubia", + "Zollinger", + "Zeitz", + "Yard", + "Yanes", + "Winship", + "Winningham", + "Wickline", + "Webre", + "Waddington", + "Vosburgh", + "Vessels", + "Verrett", + "Vedder", + "Varnum", + "Vandeventer", + "Vacca", + "Usry", + "Towry", + "Touchet", + "Tookes", + "Tonkin", + "Timko", + "Tibbitts", + "Thedford", + "Tarleton", + "Talty", + "Talamantez", + "Tafolla", + "Sugg", + "Strecker", + "Stirling", + "Steffan", + "Spiva", + "Slape", + "Siemens", + "Shatzer", + "Seyler", + "Seamans", + "Schmaltz", + "Schipper", + "Sasso", + "Sailor", + "Ruppe", + "Runner", + "Royals", + "Roudebush", + "Ripple", + "Riemer", + "Richarson", + "Revilla", + "Reichenbach", + "Ratley", + "Railsback", + "Quayle", + "Poplin", + "Poorman", + "Ponton", + "Polo", + "Pollitt", + "Poitras", + "Piscitelli", + "Piedra", + "Pickles", + "Pew", + "Perera", + "People", + "Penwell", + "Pelt", + "Pauline", + "Parkhill", + "Paladino", + "Ore", + "Oram", + "Olmo", + "Oliveras", + "Olivarria", + "Ogorman", + "Near", + "Naron", + "Na", + "Muncie", + "Mowbray", + "Morones", + "Moretti", + "Monn", + "Mitts", + "Minks", + "Minarik", + "Mimms", + "Milliron", + "Millington", + "Millhouse", + "Messersmith", + "Mcnett", + "Mckinstry", + "Mcgeorge", + "Mcdill", + "Mcateer", + "Mazzeo", + "Matchett", + "Mahood", + "Mabery", + "Lundell", + "Louden", + "Losoya", + "Lisk", + "Lezama", + "Leib", + "Lebo", + "Lanoue", + "Lanford", + "Lafortune", + "Kump", + "Krone", + "Kreps", + "Kott", + "Kopecky", + "Kolodziej", + "Knuckles", + "Kinman", + "Kimmons", + "Kelty", + "Kaster", + "Karlson", + "Kania", + "Jules", + "Joyal", + "Job", + "Jenner", + "Jasinski", + "Jandreau", + "Isenhour", + "Hunziker", + "Huhn", + "Houde", + "Houchins", + "Holtman", + "Hodo", + "Heyman", + "Hentges", + "Hedberg", + "Hayne", + "Haycraft", + "Harshbarger", + "Harshaw", + "Harriss", + "Haring", + "Hansell", + "Hanford", + "Handler", + "Hamburg", + "Hamblen", + "Gunnell", + "Groat", + "Gorecki", + "Gochenour", + "Gleeson", + "Genest", + "Geiser", + "Gabriele", + "Fulghum", + "Friese", + "Fridley", + "Freeborn", + "Frailey", + "Flaugher", + "Fiala", + "Ettinger", + "Etheredge", + "Espitia", + "Eriksen", + "Engelbrecht", + "Engebretson", + "Elie", + "Eickhoff", + "Edney", + "Edelen", + "Eberhard", + "Eastin", + "Eakes", + "Driggs", + "Doner", + "Donaghy", + "Disalvo", + "Deshong", + "Dahms", + "Dahlquist", + "Curren", + "Cripe", + "Cree", + "Creager", + "Corle", + "Conatser", + "Commons", + "Coggin", + "Coder", + "Coaxum", + "Closson", + "Clodfelter", + "Classen", + "Chittenden", + "Castilleja", + "Casale", + "Cartee", + "Carriere", + "Canup", + "Canizales", + "Burgoon", + "Bunger", + "Bugarin", + "Buchanon", + "Bruning", + "Bruck", + "Brookes", + "Broadwell", + "Brier", + "Brekke", + "Breese", + "Bracero", + "Bowley", + "Bowersox", + "Bose", + "Bogar", + "Blossom", + "Blauser", + "Blacker", + "Bjorklund", + "Belair", + "Baumer", + "Basler", + "Barb", + "Baltimore", + "Baize", + "Baden", + "Auman", + "Amundsen", + "Amore", + "Alvarenga", + "Adan", + "Adamczyk", + "Yerkes", + "Yerby", + "Yawn", + "Yamaguchi", + "Worthey", + "Wolk", + "Wixom", + "Wiersma", + "Wieczorek", + "Whiddon", + "Weyer", + "Wetherington", + "Wein", + "Watchman", + "Warf", + "Wansley", + "Vesely", + "Velazco", + "Vannorman", + "Valasquez", + "Utz", + "Urso", + "Turco", + "Turbeville", + "Trivett", + "Torrance", + "Toothaker", + "Toohey", + "Tondreau", + "Thaler", + "Sylvain", + "Swindler", + "Swigert", + "Swider", + "Stiner", + "Stever", + "Steffes", + "Stampley", + "Stair", + "Smidt", + "Skeete", + "Silvestre", + "Shy", + "Shutts", + "Shock", + "Shealey", + "Seigler", + "Schweizer", + "Schuldt", + "Schlichting", + "Scherr", + "Saulsberry", + "Saner", + "Rosin", + "Rosato", + "Roling", + "Rohn", + "Rix", + "Rister", + "Remley", + "Remick", + "Recinos", + "Ramm", + "Raabe", + "Pursell", + "Poythress", + "Poli", + "Pokorny", + "Plum", + "Pettry", + "Petrey", + "Petitt", + "Penman", + "Payson", + "Paquet", + "Pappalardo", + "Outland", + "Oscar", + "Orenstein", + "Nuttall", + "Nuckols", + "Nott", + "Nimmo", + "Murtagh", + "Mousseau", + "Moulder", + "Mooneyhan", + "Moak", + "Minch", + "Miera", + "Mercuri", + "Meighan", + "Mcnelly", + "Mcguffin", + "Mccreery", + "Mcclaskey", + "Man", + "Mainor", + "Luongo", + "Lundstrom", + "Loughman", + "Loose", + "Lobo", + "Lobb", + "Linhart", + "Liberty", + "Lever", + "Leu", + "Leiter", + "Lehoux", + "Lehn", + "Lares", + "Lapan", + "Langhorne", + "Lamon", + "Ladwig", + "Ladson", + "Kuzma", + "Kreitzer", + "Knop", + "Keech", + "Kea", + "Kadlec", + "Jo", + "Jhonson", + "Jantz", + "Inglis", + "Husk", + "Hulme", + "Housel", + "Hofman", + "Hillery", + "Heidenreich", + "Heaps", + "Haslett", + "Harting", + "Hartig", + "Hamler", + "Halton", + "Hallum", + "Gutierres", + "Guida", + "Guerrier", + "Grossi", + "Gress", + "Greenhalgh", + "Gravelle", + "Gow", + "Goslin", + "Gonyea", + "Gipe", + "Gerstner", + "Gasser", + "Garceau", + "Gannaway", + "Gama", + "Gallop", + "Gaiser", + "Fullilove", + "Foutz", + "Fossum", + "Flannagan", + "Farrior", + "Faller", + "Ericksen", + "Entrekin", + "Enochs", + "Englund", + "Ellenberger", + "Eastland", + "Earwood", + "Dudash", + "Du", + "Drozd", + "Desoto", + "Delph", + "Dekker", + "Dejohn", + "Degarmo", + "Defeo", + "Defalco", + "Deblois", + "Dacus", + "Cudd", + "Crossen", + "Crooms", + "Cronan", + "Costin", + "Costanza", + "Cordray", + "Comerford", + "Collie", + "Colegrove", + "Coldwell", + "Claassen", + "Chartrand", + "Castiglione", + "Carte", + "Cardella", + "Carberry", + "Capp", + "Capobianco", + "Cangelosi", + "Buch", + "Brunell", + "Brucker", + "Brockett", + "Brizendine", + "Brinegar", + "Brimer", + "Brase", + "Bosque", + "Bonk", + "Bolger", + "Bohanon", + "Bohan", + "Blazek", + "Berning", + "Bergan", + "Bennette", + "Beauchemin", + "Battiste", + "Barra", + "Balogh", + "Avis", + "Avallone", + "Aubry", + "Ashcroft", + "Asencio", + "Arledge", + "Anchondo", + "Amy", + "Alvord", + "Acheson", + "Zaleski", + "Yonker", + "Wyss", + "Wycoff", + "Woodburn", + "Wininger", + "Winders", + "Willmon", + "Wiechmann", + "Westley", + "Weatherholt", + "Warnick", + "Wardle", + "Warburton", + "Volkert", + "Virgin", + "Villanveva", + "Veit", + "Vass", + "Vanallen", + "Tung", + "Toribio", + "Toothman", + "Tiggs", + "Thornsberry", + "Thome", + "Tepper", + "Teeple", + "Tebo", + "Tassone", + "Tann", + "Sultan", + "Stucker", + "Stotler", + "Stoneman", + "Stehle", + "Stanback", + "Stallcup", + "Spurr", + "Speers", + "Spada", + "Solum", + "Smolen", + "Sinn", + "Silvernail", + "Sholes", + "Shives", + "Shain", + "Secrest", + "Seagle", + "Schuette", + "Schoch", + "Schnieders", + "Schild", + "Schiavone", + "Schiavo", + "Scharff", + "Santee", + "Sandell", + "Salvo", + "Rollings", + "Rollin", + "Rivenburg", + "Ritzman", + "Rist", + "Rio", + "Ricardo", + "Reynosa", + "Retana", + "Reiber", + "Regnier", + "Rarick", + "Ransome", + "Rall", + "Propes", + "Prall", + "Poyner", + "Ponds", + "Poitra", + "Plaster", + "Pippins", + "Pinion", + "Piccolo", + "Phu", + "Perillo", + "Penrose", + "Pendergraft", + "Pelchat", + "Peed", + "Patenaude", + "Palko", + "Odoms", + "Oddo", + "Novoa", + "Noone", + "Newburn", + "Negri", + "Nantz", + "Mosser", + "Moshier", + "Molter", + "Molinari", + "Moler", + "Millman", + "Meurer", + "Mendel", + "Mcray", + "Mcnicholas", + "Mcnerney", + "Mckillip", + "Mcilvain", + "Mcadory", + "Matter", + "Master", + "Marmol", + "Marinez", + "Manzer", + "Mankin", + "Makris", + "Majeski", + "Magnus", + "Maffei", + "Luoma", + "Luman", + "Luebke", + "Luby", + "Lomonaco", + "Loar", + "Litchford", + "Lintz", + "Licht", + "Levenson", + "Legge", + "Laughter", + "Lanigan", + "Krom", + "Kreger", + "Koop", + "Kober", + "Klima", + "Kitterman", + "Kinkead", + "Kimbell", + "Kilian", + "Kibbe", + "Kendig", + "Kemmer", + "Kash", + "Jenkin", + "Inniss", + "Hurlbut", + "Hunsucker", + "Hugo", + "Huckabee", + "Hoxie", + "Hoglund", + "Hockensmith", + "Hoadley", + "Hinkel", + "Higuera", + "Herrman", + "Heiner", + "Hausmann", + "Haubrich", + "Hassen", + "Hanlin", + "Hallinan", + "Haglund", + "Hagberg", + "Gullo", + "Gullion", + "Groner", + "Greenwalt", + "Grand", + "Goodwill", + "Gong", + "Gobert", + "Glowacki", + "Glessner", + "Gines", + "Gildersleeve", + "Gildea", + "Gerke", + "Gerhard", + "Gebhard", + "Gatton", + "Gately", + "Galasso", + "Fralick", + "Fouse", + "Fluharty", + "Faucette", + "Fairfax", + "Evanoff", + "Elser", + "Ellard", + "Egerton", + "Edie", + "Ector", + "Ebling", + "Dunkel", + "Duhart", + "Drysdale", + "Dostal", + "Dorey", + "Dolph", + "Doles", + "Dismukes", + "Digregorio", + "Digby", + "Dewees", + "Deramus", + "Denniston", + "Dennett", + "Deloney", + "Delaughter", + "Darcy", + "Cuneo", + "Cumberland", + "Crotts", + "Crosswhite", + "Cremeans", + "Creasey", + "Cottman", + "Cothern", + "Costales", + "Cosner", + "Corpus", + "Cora", + "Constable", + "Colligan", + "Cobble", + "Clutter", + "Chupp", + "Chevez", + "Chatmon", + "Chaires", + "Caplan", + "Caffee", + "Cabana", + "Burrough", + "Burditt", + "Buckler", + "Brunswick", + "Brouillard", + "Broady", + "Bowlby", + "Bouley", + "Borgman", + "Boltz", + "Boddy", + "Blackston", + "Birdsell", + "Bedgood", + "Bate", + "Basil", + "Bartos", + "Barriga", + "Barrie", + "Barna", + "Barcenas", + "Banach", + "Baccus", + "Auclair", + "Ashman", + "Arter", + "Arendt", + "Ansell", + "Allums", + "Allsop", + "Allender", + "Alber", + "Albarran", + "Adelson", + "Zoll", + "Wysong", + "Wimbley", + "Wildes", + "Whitis", + "Whitehill", + "Whicker", + "Weymouth", + "Well", + "Weldy", + "Wark", + "Wareham", + "Waddy", + "Viveiros", + "Vito", + "Vides", + "Vecchio", + "Vath", + "Vandoren", + "Vanderhoof", + "Unrein", + "Uecker", + "Tsan", + "Trepanier", + "Tregre", + "Torkelson", + "Ton", + "Tobler", + "Tineo", + "Timmer", + "Swopes", + "Swofford", + "Sweeten", + "Swarts", + "Summerfield", + "Sumler", + "Stucky", + "Strozier", + "Stigall", + "Stickel", + "Stennis", + "Stelzer", + "Steely", + "Solar", + "Slayden", + "Skillern", + "Shurtz", + "Shelor", + "Shellenbarger", + "Shand", + "Shabazz", + "Seo", + "Scroggs", + "Schwandt", + "Schrecengost", + "Schoenrock", + "Schirmer", + "Sandridge", + "Ruzicka", + "Rozek", + "Rowlands", + "Roser", + "Rosendahl", + "Romanowski", + "Romaine", + "Rolston", + "Rink", + "Riggio", + "Reichman", + "Redondo", + "Reay", + "Rawlinson", + "Raskin", + "Raine", + "Quandt", + "Purpura", + "Purdue", + "Pruneda", + "Prevatte", + "Prettyman", + "Pinedo", + "Pierro", + "Pidgeon", + "Phillippi", + "Pfeil", + "Penix", + "Peasley", + "Paro", + "Overall", + "Ospina", + "Ortegon", + "Ogata", + "Ogara", + "Normandin", + "Nordman", + "Nims", + "Nassar", + "Motz", + "Morlan", + "Mooring", + "Moles", + "Moir", + "Mizrahi", + "Mire", + "Minaya", + "Millwood", + "Mikula", + "Messmer", + "Meikle", + "Mctaggart", + "Mcgonagle", + "Mcewan", + "Mccasland", + "Mccane", + "Mccaffery", + "Mcalexander", + "Mattocks", + "Mattie", + "Matranga", + "Martone", + "Markland", + "Maravilla", + "Manno", + "Manly", + "Mancha", + "Mallery", + "Magno", + "Lorentz", + "Locklin", + "Livingstone", + "Lipford", + "Lininger", + "Line", + "Liao", + "Lepley", + "Leming", + "Lemelin", + "Leadbetter", + "Lawhon", + "Lattin", + "Langworthy", + "Lampman", + "Lambeth", + "Lamarr", + "Lahey", + "Krajewski", + "Klopp", + "Kinnison", + "Kestner", + "Kerry", + "Kennell", + "Karim", + "Jozwiak", + "Jakubowski", + "Jagger", + "Ivery", + "Ishmael", + "Iliff", + "Iddings", + "Hudkins", + "Houseman", + "Holz", + "Holderman", + "Hoehne", + "Highfill", + "Hiett", + "Heskett", + "Heldt", + "Hedman", + "Hayslett", + "Hatchell", + "Hasse", + "Hamon", + "Hamada", + "Hakala", + "Haislip", + "Haffey", + "Hackbarth", + "Guo", + "Gullickson", + "Guerrette", + "Guan", + "Greenblatt", + "Goudreau", + "Gongora", + "Godbout", + "Glaude", + "Gills", + "Gillison", + "Gigliotti", + "Gargano", + "Gallucci", + "Galli", + "Galante", + "Frasure", + "Fodor", + "Fizer", + "Fishburn", + "Finkbeiner", + "Finck", + "Fager", + "Estey", + "Espiritu", + "Eppinger", + "Epperly", + "Emig", + "Eckley", + "Dray", + "Dorsch", + "Dille", + "Devita", + "Deslauriers", + "Demery", + "Delorme", + "Delbosque", + "Dauphin", + "Dantonio", + "Curd", + "Crume", + "Crown", + "Cozad", + "Cossette", + "Comacho", + "Climer", + "Chadbourne", + "Cespedes", + "Cayton", + "Castaldo", + "Carpino", + "Carls", + "Capozzi", + "Canela", + "Cadet", + "Buzard", + "Busick", + "Burlison", + "Brinkmann", + "Bridgeforth", + "Bourbeau", + "Bornstein", + "Boots", + "Bonfiglio", + "Boice", + "Boese", + "Biondi", + "Bilski", + "Betton", + "Berwick", + "Berlanga", + "Behan", + "Becraft", + "Barrientez", + "Banh", + "Balke", + "Balderrama", + "Bahe", + "Bachand", + "Atlas", + "Armer", + "Arceo", + "Aliff", + "Alatorre", + "Zermeno", + "Zane", + "Younce", + "You", + "Yeoman", + "Yamasaki", + "Wroten", + "Worm", + "Woodby", + "Winer", + "Wilmer", + "Willits", + "Wilcoxon", + "Wehmeyer", + "Waterbury", + "Wass", + "Wann", + "Wake", + "Wachtel", + "Vizcarra", + "Vince", + "Victory", + "Veitch", + "Vanderbilt", + "Vallone", + "Vallery", + "Ureno", + "Tyer", + "Tipps", + "Tiedeman", + "Theberge", + "Texeira", + "Taub", + "Tapscott", + "Stutts", + "Stults", + "Stukes", + "Staff", + "Spink", + "Sottile", + "Smithwick", + "Slane", + "Simeone", + "Silvester", + "Siegrist", + "Shiffer", + "Sheedy", + "Sheaffer", + "Severin", + "Sellman", + "Scotto", + "Schupp", + "Schueller", + "Schreier", + "Schoolcraft", + "Schoenberger", + "Schnabel", + "Sangster", + "Samford", + "Saliba", + "Ryles", + "Ryans", + "Rossetti", + "Rodriguz", + "Risch", + "Riel", + "Rezendes", + "Rester", + "Rencher", + "Recker", + "Rathjen", + "Profitt", + "Poteete", + "Polizzi", + "Perrigo", + "Patridge", + "Osby", + "Orvis", + "Opperman", + "Oppenheim", + "Onorato", + "Olaughlin", + "Ohagan", + "Ogles", + "Oehler", + "Obyrne", + "Nuzzo", + "Nickle", + "Nease", + "Neagle", + "Navarette", + "Nagata", + "Musto", + "Morning", + "Morison", + "Montz", + "Mogensen", + "Mizer", + "Miraglia", + "Mingus", + "Migliore", + "Merideth", + "Menges", + "Mellor", + "Mcnear", + "Mcnab", + "Mcloud", + "Mcelligott", + "Mccollom", + "Maynes", + "Marquette", + "Markowski", + "Marcantonio", + "Mar", + "Maldanado", + "Makin", + "Macey", + "Lundeen", + "Lovin", + "Longino", + "Lisle", + "Linthicum", + "Limones", + "Lesure", + "Lesage", + "Leisure", + "Lauver", + "Laubach", + "Latshaw", + "Lary", + "Lapham", + "Lacoste", + "Lacher", + "Kutcher", + "Knickerbocker", + "Klos", + "Klingler", + "Kleiman", + "Kittleson", + "Kimbrel", + "Kimberly", + "Kemmerer", + "Kelson", + "Keese", + "Kam", + "Kallas", + "Jurgensen", + "Junkins", + "Juneau", + "Juergens", + "Jolliff", + "Jelks", + "Janicki", + "Jang", + "Innocent", + "Ingles", + "Inge", + "Huguley", + "Huggard", + "Howton", + "Hone", + "Holford", + "Holding", + "Hogle", + "Hipple", + "Heimbach", + "Heider", + "Heidel", + "Havener", + "Hattaway", + "Harrah", + "Hanscom", + "Hankinson", + "Hamdan", + "Gridley", + "Goulette", + "Goulart", + "Goodspeed", + "Goodrow", + "Go", + "Girardi", + "Gent", + "Gautreau", + "Ganz", + "Gandara", + "Gamblin", + "Galipeau", + "Fyffe", + "Furrow", + "Fulp", + "Fricks", + "Frase", + "Frandsen", + "Fout", + "Foulks", + "Fouche", + "Foskey", + "Forgey", + "Foor", + "Fobbs", + "Finklea", + "Fincham", + "Figueiredo", + "Festa", + "Ferrier", + "Fellman", + "Eslick", + "Eilerman", + "Eckart", + "Eaglin", + "Dunfee", + "Dumond", + "Drewry", + "Douse", + "Domino", + "Dimick", + "Diener", + "Dickert", + "Deines", + "Degree", + "Declue", + "Daw", + "Dattilo", + "Danko", + "Custodio", + "Cuccia", + "Crunk", + "Crispin", + "Corp", + "Cornwall", + "Corea", + "Coppin", + "Considine", + "Coniglio", + "Conboy", + "Collar", + "Cockrum", + "Clute", + "Clewis", + "Claude", + "Christiano", + "Channell", + "Channel", + "Cerrato", + "Cecere", + "Catoe", + "Castillon", + "Castile", + "Carstarphen", + "Carmouche", + "Caperton", + "Buteau", + "Bury", + "Bumpers", + "Brey", + "Brenton", + "Brazeal", + "Brassard", + "Brass", + "Braga", + "Bradham", + "Bourget", + "Borrelli", + "Borba", + "Boothby", + "Bohr", + "Bohm", + "Boehme", + "Bodin", + "Bloss", + "Blocher", + "Bizzell", + "Bieker", + "Berthelot", + "Bernardini", + "Berends", + "Benard", + "Belser", + "Baze", + "Bartling", + "Barrientes", + "Barras", + "Barcia", + "Banfield", + "Aurand", + "Artman", + "Arnott", + "Arend", + "Ardis", + "Amon", + "Almaguer", + "Allee", + "Albarado", + "Alameda", + "Abdo", + "Zuehlke", + "Zoeller", + "Yokoyama", + "Yocom", + "Wyllie", + "Woolum", + "Wint", + "Winland", + "Wink", + "Wilner", + "Wilmes", + "Whitlatch", + "Westervelt", + "Walthall", + "Walkowiak", + "Walburn", + "Viviano", + "Vanderhoff", + "Valez", + "Ugalde", + "Trumbull", + "Todaro", + "Tilford", + "Tidd", + "Tibbits", + "Terranova", + "Templeman", + "Tannenbaum", + "Talmage", + "Tabarez", + "Swearengin", + "Swartwood", + "Svendsen", + "Strum", + "Strack", + "Storie", + "Stockard", + "Steinbeck", + "Starns", + "Stanko", + "Stankiewicz", + "Stacks", + "Stach", + "Sproles", + "Spenser", + "Smotherman", + "Slusser", + "Sinha", + "Silber", + "Siefert", + "Siddiqui", + "Shuff", + "Sherburne", + "Seldon", + "Seddon", + "Schweigert", + "Schroeter", + "Schmucker", + "Saffold", + "Rutz", + "Rundle", + "Rosinski", + "Rosenow", + "Rogalski", + "Ridout", + "Rhymer", + "Replogle", + "Regina", + "Reda", + "Raygoza", + "Ratner", + "Rascoe", + "Rahm", + "Quincy", + "Quast", + "Pry", + "Pressnell", + "Predmore", + "Pou", + "Porto", + "Pleasants", + "Pigford", + "Pavone", + "Patnaude", + "Parramore", + "Papadopoulos", + "Palmatier", + "Ouzts", + "Oshields", + "Ortis", + "Olmeda", + "Olden", + "Okamoto", + "Norby", + "Nitz", + "Niebuhr", + "Nevius", + "Neiman", + "Neidig", + "Neece", + "Murawski", + "Mroz", + "Moylan", + "Moultry", + "Mosteller", + "Moring", + "Morganti", + "Mook", + "Moffet", + "Mettler", + "Merlo", + "Mengel", + "Mendelsohn", + "Meli", + "Melchior", + "Mcmeans", + "Mcfaddin", + "Mccullers", + "Mccollister", + "Mccloy", + "Mcclaine", + "Maury", + "Maser", + "Martelli", + "Manthey", + "Malkin", + "Maio", + "Magwood", + "Maginnis", + "Mabon", + "Luton", + "Lusher", + "Lucht", + "Lobato", + "Levis", + "Letellier", + "Legendre", + "Laurel", + "Latson", + "Larmon", + "Largo", + "Landreneau", + "Landgraf", + "Lamberson", + "Kurland", + "Kresge", + "Korman", + "Korando", + "Klapper", + "Kitson", + "Kinyon", + "Kincheloe", + "Kawamoto", + "Kawakami", + "Jenney", + "Jeanpierre", + "Ivers", + "Issa", + "Ince", + "Hugh", + "Hug", + "Honda", + "Hollier", + "Hollars", + "Hoerner", + "Hodgkinson", + "Hiott", + "Hibbitts", + "Herlihy", + "Henricks", + "Heavner", + "Hayhurst", + "Harvill", + "Harewood", + "Hanselman", + "Hanning", + "Gwyn", + "Gustavson", + "Grounds", + "Grizzard", + "Grinder", + "Graybeal", + "Gravley", + "Gorney", + "Goll", + "Goehring", + "Godines", + "Gobeil", + "Glickman", + "Giuliano", + "Gimbel", + "Gift", + "Geib", + "Gayhart", + "Gatti", + "Gains", + "Gadberry", + "Frei", + "Fraise", + "Fouch", + "Forst", + "Forsman", + "Folden", + "Fogleman", + "Figaro", + "Fetty", + "Feely", + "Fabry", + "Eury", + "Estill", + "Epling", + "Elamin", + "Echavarria", + "Dutil", + "Duryea", + "Dumais", + "Drago", + "Downard", + "Douthit", + "Doolin", + "Dobos", + "Dison", + "Dinges", + "Diebold", + "Desilets", + "Deshazo", + "Depaz", + "Degennaro", + "Dall", + "Cyphers", + "Cryer", + "Croce", + "Crisman", + "Credle", + "Coriell", + "Copp", + "Coop", + "Compos", + "Colmenero", + "Cogar", + "Cliff", + "Chapel", + "Carnevale", + "Campanella", + "Caley", + "Calderone", + "Burtch", + "Brouwer", + "Brehmer", + "Brassell", + "Brafford", + "Bourquin", + "Bourn", + "Bohnert", + "Blewett", + "Blass", + "Blakes", + "Bhakta", + "Besser", + "Berge", + "Bellis", + "Balfour", + "Avera", + "Austria", + "Applin", + "Ammon", + "Alsop", + "Aleshire", + "Akbar", + "Zoller", + "Zapien", + "Wymore", + "Wyble", + "Wolken", + "Wix", + "Wickstrom", + "Whobrey", + "Whigham", + "Westerlund", + "Welsch", + "Weisser", + "Weisner", + "Weinstock", + "Wehner", + "Watlington", + "Wakeland", + "Wafer", + "Virgen", + "Victorino", + "Veltri", + "Veith", + "Urich", + "Uresti", + "Umberger", + "Twedt", + "Tuohy", + "Tschida", + "Trumble", + "Troia", + "Tristan", + "Trimmer", + "Topps", + "Tonn", + "Tiernan", + "Threet", + "Thrall", + "Thetford", + "Teneyck", + "Tartaglia", + "Swords", + "Strohl", + "Streater", + "Strausbaugh", + "Stradley", + "Stonecipher", + "Steadham", + "Stansel", + "Stalcup", + "Stabile", + "Sprenger", + "Spradley", + "Speier", + "Southwood", + "Sorrels", + "Slezak", + "Skow", + "Sirmans", + "Simental", + "Silk", + "Sifford", + "Sievert", + "Shover", + "Sheley", + "Selzer", + "Scriven", + "Schwindt", + "Schwan", + "Schroth", + "Saylors", + "Saragosa", + "Sant", + "Salaam", + "Saephan", + "Routt", + "Rousey", + "Ros", + "Rolfes", + "Rieke", + "Rieder", + "Richeson", + "Redinger", + "Rasnick", + "Rapoza", + "Rambert", + "Rafael", + "Quist", + "Pyron", + "Punch", + "Pullman", + "Przybylski", + "Pridmore", + "Pooley", + "Pines", + "Perkinson", + "Perine", + "Perham", + "Pecor", + "Peavler", + "Partington", + "Panton", + "Oliverio", + "Olague", + "Ohman", + "Ohearn", + "Noyola", + "Nicolai", + "Nebel", + "Murtha", + "Muff", + "Mowrey", + "Moroney", + "Morgenstern", + "Morant", + "Monty", + "Monsour", + "Mohammad", + "Moffit", + "Mijares", + "Meriwether", + "Mendieta", + "Melendrez", + "Mejorado", + "Mckittrick", + "Mckey", + "Mckenny", + "Mckelvy", + "Mckechnie", + "Mcelvain", + "Mccoin", + "Mazzarella", + "Mazon", + "Maurin", + "Matthies", + "Maston", + "Maske", + "Marzano", + "Marmon", + "Marburger", + "Mangus", + "Mangino", + "Mallet", + "Luo", + "Losada", + "Londono", + "Lobdell", + "Lipson", + "Lesniak", + "Leighty", + "Lei", + "League", + "Lavallie", + "Lareau", + "Laperle", + "Lape", + "Laforce", + "Laffey", + "Kuehner", + "Kravitz", + "Kowalsky", + "Kohr", + "Kinsman", + "Keppler", + "Kennemer", + "Keiper", + "Keely", + "Kaler", + "Jun", + "Jelinek", + "Jarnagin", + "Issac", + "Isakson", + "Hypes", + "Hutzler", + "Huls", + "Horak", + "Hitz", + "Hice", + "Herrell", + "Henslee", + "Heitz", + "Heiss", + "Heiman", + "Hasting", + "Hartwick", + "Harmer", + "Harland", + "Hammontree", + "Haldeman", + "Hakes", + "Guse", + "Guillotte", + "Guard", + "Groleau", + "Greve", + "Greenough", + "Golub", + "Golson", + "Goldschmidt", + "Golder", + "Godbolt", + "Gilmartin", + "Gies", + "Gibby", + "Geren", + "Genthner", + "Gendreau", + "Gemmill", + "Gaymon", + "Galyean", + "Galeano", + "Friar", + "Folkerts", + "Fleeman", + "Fitzgibbons", + "Ferranti", + "Felan", + "Farrand", + "Eoff", + "Enger", + "Engels", + "Ducksworth", + "Duby", + "Dry", + "Drumheller", + "Douthitt", + "Doris", + "Donis", + "Dixion", + "Dittrich", + "Dials", + "Dessert", + "Descoteaux", + "Depaul", + "Denker", + "Demuth", + "Demelo", + "Delacerda", + "Deforge", + "Danos", + "Dalley", + "Daigneault", + "Cybulski", + "Crystal", + "Cristobal", + "Cothren", + "Corns", + "Corkery", + "Copas", + "Coco", + "Clubb", + "Clore", + "Chitty", + "Chichester", + "Chery", + "Charon", + "Chamber", + "Chace", + "Catanzaro", + "Castonguay", + "Cassella", + "Caroll", + "Carlberg", + "Cammarata", + "Calle", + "Cajigas", + "Byas", + "Buzbee", + "Busey", + "Burling", + "Bufkin", + "Brzezinski", + "Brun", + "Brickner", + "Brabham", + "Boller", + "Bodily", + "Bockman", + "Bleich", + "Blakeman", + "Bisbee", + "Bier", + "Bezanson", + "Bevilacqua", + "Besaw", + "Berrian", + "Berkeley", + "Bequette", + "Beauford", + "Baumgarten", + "Baudoin", + "Batie", + "Basaldua", + "Bardin", + "Bangert", + "Banes", + "Backlund", + "Avitia", + "Artz", + "Archey", + "Apel", + "Amico", + "Alam", + "Aden", + "Zebrowski", + "Yokota", + "Wormley", + "Wootton", + "Woodie", + "Womac", + "Wiltz", + "Wigington", + "Whitehorn", + "Whisman", + "Weisgerber", + "Weigle", + "Weedman", + "Watkin", + "Wasilewski", + "Wadlington", + "Wadkins", + "Viverette", + "Vidaurri", + "Vidales", + "Vezina", + "Vanleer", + "Vanhoy", + "Vanguilder", + "Vanbrunt", + "Uy", + "Updegraff", + "Tylor", + "Trinkle", + "Touchette", + "Tilson", + "Tilman", + "Tengan", + "Tarkington", + "Surrett", + "Super", + "Summy", + "Streetman", + "Straughter", + "Steere", + "Stalling", + "Spruell", + "Spadaro", + "Solley", + "Smathers", + "Silvera", + "Siems", + "Shreffler", + "Sholar", + "Selden", + "Schaper", + "Samayoa", + "Ruggeri", + "Rowen", + "Rosso", + "Rosenbalm", + "Roosevelt", + "Roose", + "Ronquillo", + "Rogowski", + "Rexford", + "Repass", + "Renzi", + "Renick", + "Renda", + "Rehberg", + "Reaper", + "Ranck", + "Raffa", + "Rackers", + "Raap", + "Pugsley", + "Puglisi", + "Prinz", + "Primus", + "Pounders", + "Pon", + "Pompa", + "Plasencia", + "Pipkins", + "Pillar", + "Petrosky", + "Pelley", + "Pauls", + "Pauli", + "Parkison", + "Parisien", + "Pangle", + "Pancoast", + "Palazzolo", + "Owenby", + "Overbay", + "Orris", + "Orlowski", + "Nipp", + "Newbern", + "Nedd", + "Nealon", + "Najar", + "Mysliwiec", + "Myron", + "Myres", + "Musson", + "Murrieta", + "Munsell", + "Mumma", + "Muldowney", + "Moyle", + "Mowen", + "Mose", + "Morejon", + "Moodie", + "Monier", + "Mikkelsen", + "Miers", + "Metzinger", + "Melin", + "Mcquay", + "Mcpeek", + "Mcneeley", + "Mcglothin", + "Mcghie", + "Mcdonell", + "Mccumber", + "Mccranie", + "Mcbean", + "Mayhugh", + "Marts", + "Marenco", + "Manges", + "Lynam", + "Lupien", + "Luff", + "Luebbert", + "Loh", + "Loflin", + "Lococo", + "Loch", + "Lis", + "Linke", + "Lightle", + "Lewellyn", + "Leishman", + "Lebow", + "Lebouef", + "Leanos", + "Lanz", + "Landy", + "Landaverde", + "Lacefield", + "Kyler", + "Kuebler", + "Kropf", + "Kroeker", + "Kluesner", + "Klass", + "Kimberling", + "Kilkenny", + "Kiker", + "Ketter", + "Kelemen", + "Keasler", + "Kawamura", + "Karst", + "Kardos", + "Jeremiah", + "Jared", + "Igo", + "Huseman", + "Huseby", + "Hurlbert", + "Huard", + "Hottinger", + "Hornberger", + "Hopps", + "Holdsworth", + "Hensen", + "Heilig", + "Heeter", + "Harpole", + "Haak", + "Gutowski", + "Gunnels", + "Grimmer", + "Grieve", + "Gravatt", + "Granderson", + "Gotcher", + "Gleaves", + "Genao", + "Garfinkel", + "Frerichs", + "Foushee", + "Flanery", + "Finnie", + "Feldt", + "Fagin", + "Ewalt", + "Ellefson", + "Eiler", + "Eckhart", + "Eastep", + "Dwight", + "Digirolamo", + "Didomenico", + "Devera", + "Delavega", + "Defilippo", + "Debusk", + "Daub", + "Damiani", + "Cupples", + "Cuddy", + "Crofoot", + "Courter", + "Coto", + "Costigan", + "Corning", + "Corman", + "Corlett", + "Cooperman", + "Collison", + "Coghlan", + "Cobbins", + "Coady", + "Coachman", + "Clothier", + "Client", + "Clear", + "Cipolla", + "Chmielewski", + "Chiodo", + "Chatterton", + "Chappelle", + "Chairez", + "Ceron", + "Casperson", + "Casler", + "Casados", + "Carrow", + "Carolina", + "Carlino", + "Carico", + "Cardillo", + "Caouette", + "Canto", + "Canavan", + "Cambra", + "Byard", + "Buterbaugh", + "Buse", + "Bucy", + "Buckwalter", + "Bubb", + "Bryd", + "Brissette", + "Brault", + "Bradwell", + "Boshears", + "Borchert", + "Blansett", + "Blanch", + "Blade", + "Biondo", + "Bilbo", + "Biehl", + "Bessey", + "Berta", + "Belles", + "Bella", + "Beeks", + "Beekman", + "Beaufort", + "Bayliss", + "Bardsley", + "Avilla", + "Astudillo", + "Ardito", + "Anwar", + "Antunez", + "Amen", + "Aderholt", + "Abate", + "Yowell", + "Yin", + "Yearby", + "Ye", + "Wurst", + "Woolverton", + "Woolbright", + "Wildermuth", + "Whittenburg", + "Whitely", + "Wetter", + "Wetherbee", + "Wenz", + "Welliver", + "Welling", + "Welcome", + "Wason", + "Warrior", + "Warlick", + "Voorhies", + "Vivier", + "Villines", + "Vida", + "Verde", + "Veiga", + "Varghese", + "Vanwyk", + "Vanwingerden", + "Vanhorne", + "Umstead", + "Twiggs", + "Tusing", + "Trego", + "Tompson", + "Tinkle", + "Thoman", + "Thole", + "Tatman", + "Tartt", + "Suda", + "Studley", + "Strock", + "Strawbridge", + "Stokely", + "Stec", + "Stang", + "Stalter", + "Speidel", + "Spafford", + "Spade", + "Sontag", + "Sokolowski", + "Skillman", + "Skelley", + "Skalski", + "Sison", + "Sippel", + "Sinquefield", + "Sin", + "Siegle", + "Sher", + "Sharrow", + "Setliff", + "Sera", + "Sellner", + "Selig", + "Seibold", + "Seery", + "Scriber", + "Schull", + "Schrupp", + "Schippers", + "Say", + "Saulsbury", + "Sao", + "Santillo", + "Sanor", + "Sancho", + "Rufus", + "Rubalcaba", + "Roosa", + "Ronk", + "Robbs", + "Roache", + "River", + "Riebe", + "Reinoso", + "Quin", + "Prude", + "Preuss", + "Pottorff", + "Pontiff", + "Plouffe", + "Picou", + "Picklesimer", + "Pettyjohn", + "Petti", + "Penaloza", + "Parmelee", + "Pardee", + "Palazzo", + "Overholt", + "Ogawa", + "Ofarrell", + "Nova", + "Nolting", + "Noda", + "Nicola", + "Nickson", + "Nevitt", + "Neveu", + "Navarre", + "Nam", + "Murrow", + "Munz", + "Mulloy", + "Monzo", + "Milliman", + "Metivier", + "Merlino", + "Mcpeters", + "Mckissack", + "Mckeen", + "Mcgurk", + "Mcfee", + "Mcfarren", + "Mcelwee", + "Mceachin", + "Mcdonagh", + "Mccarville", + "Mayhall", + "Mattoon", + "Martello", + "Marconi", + "Marbury", + "Mao", + "Manzella", + "Maly", + "Malec", + "Maitland", + "Maheu", + "Maclennan", + "Lyke", + "Luera", + "Loyola", + "Lowenstein", + "Losh", + "Lopiccolo", + "Longacre", + "Loman", + "Loden", + "Loaiza", + "Lieber", + "Libbey", + "Lenhardt", + "Lefebre", + "Lauterbach", + "Lauritsen", + "Lass", + "Larocco", + "Larimer", + "Lansford", + "Lanclos", + "Lamay", + "Lal", + "Kulikowski", + "Kriebel", + "Kosinski", + "Kleinman", + "Kleiner", + "Kleckner", + "Kistner", + "Kissner", + "Kissell", + "Kilroy", + "Kenna", + "Keisler", + "Keeble", + "Keaney", + "Kale", + "Joly", + "Jimison", + "Jeans", + "Ikner", + "Hursey", + "Hruska", + "Hove", + "Hou", + "Host", + "Hosking", + "Hoose", + "Holle", + "Hoeppner", + "Hittle", + "Hitchens", + "Hirth", + "Hinerman", + "Hilario", + "Higby", + "Hertzog", + "Hentz", + "Hensler", + "Heist", + "Heier", + "Hegg", + "Hassel", + "Harpe", + "Hara", + "Hank", + "Hain", + "Hagopian", + "Grimshaw", + "Grado", + "Gowin", + "Gowans", + "Googe", + "Goodlow", + "Goering", + "Gleaton", + "Gidley", + "Giannone", + "Gascon", + "Garneau", + "Gambrel", + "Galaz", + "Fuentez", + "Frisina", + "Fresquez", + "Fraher", + "Fitting", + "Feuerstein", + "Felten", + "Everman", + "Estell", + "Ertel", + "Erazo", + "Ensign", + "Endo", + "Ellerman", + "Eichorn", + "Edgell", + "Ebron", + "Eaker", + "Dundas", + "Duncanson", + "Duchene", + "Ducan", + "Dombroski", + "Doman", + "Dock", + "Dickison", + "Dewoody", + "Deloera", + "Delahoussaye", + "Dejean", + "Degroat", + "Decaro", + "Dearmond", + "Dashner", + "Dales", + "Crossett", + "Cressey", + "Cowger", + "Courts", + "Court", + "Cornette", + "Corbo", + "Coplin", + "Coover", + "Condie", + "Cokley", + "Cicero", + "Ceaser", + "Cannaday", + "Callanan", + "Cadle", + "Buscher", + "Bullion", + "Bucklin", + "Bruening", + "Bruckner", + "Brose", + "Branan", + "Bradway", + "Botsford", + "Bortz", + "Borelli", + "Bonetti", + "Bolan", + "Boerger", + "Bloomberg", + "Bingman", + "Bilger", + "Berns", + "Beringer", + "Beres", + "Beets", + "Beede", + "Beaudet", + "Beachum", + "Baughn", + "Bator", + "Bastien", + "Basquez", + "Barreiro", + "Barga", + "Baratta", + "Balser", + "Baillie", + "Axford", + "Attebery", + "Arakaki", + "Annunziata", + "Andrzejewski", + "Ament", + "Amendola", + "Adcox", + "Abril", + "Zenon", + "Zeitler", + "Zang", + "Zambrana", + "Ybanez", + "Yagi", + "Wolak", + "Wilcoxson", + "Whitesel", + "Whitehair", + "Weyand", + "Westendorf", + "Welke", + "Weinmann", + "Wei", + "Weesner", + "Weekes", + "Wedel", + "Wedding", + "Weatherall", + "Warthen", + "Vose", + "Villalta", + "Vila", + "Viator", + "Vaz", + "Valtierra", + "Urbanek", + "Tulley", + "Trojanowski", + "Trapani", + "Toups", + "Torpey", + "Tomita", + "Tindal", + "Tieman", + "Tevis", + "Tedrow", + "Taul", + "Tash", + "Tammaro", + "Sylva", + "Swiderski", + "Sweeting", + "Sund", + "Stutler", + "Stocking", + "Stich", + "Sterns", + "Stegner", + "Stalder", + "Splawn", + "Speirs", + "Southwell", + "Soltys", + "Smead", + "Slye", + "Skipworth", + "Sipos", + "Simmerman", + "Sigmund", + "Sidhu", + "Shuffler", + "Shingleton", + "Shadwick", + "Sermons", + "Seefeldt", + "Scipio", + "Schwanke", + "Schreffler", + "Schiro", + "Scheiber", + "Sandoz", + "Samsel", + "Ruddell", + "Royse", + "Rouillard", + "Rotella", + "Rosalez", + "Romriell", + "Rommel", + "Rizer", + "Riner", + "Rickards", + "Rhoton", + "Rhem", + "Reppert", + "Rayl", + "Raulston", + "Raposo", + "Rapier", + "Rainville", + "Radel", + "Quinney", + "Purdie", + "Puffer", + "Pizzo", + "Pincus", + "Petrus", + "Pendelton", + "Pendarvis", + "Peltz", + "Peguero", + "Peete", + "Patricio", + "Patchett", + "Parrino", + "Papke", + "Pam", + "Palafox", + "Ottley", + "Ostby", + "Oritz", + "Oren", + "Ogan", + "Odegaard", + "Oatman", + "Noell", + "Nida", + "Nicoll", + "Newhall", + "Newbill", + "Netzer", + "Nettleton", + "Neblett", + "Murley", + "Mungo", + "Mulhall", + "Mosca", + "Morissette", + "Morford", + "Montag", + "Monsen", + "Mitzel", + "Miskell", + "Minder", + "Mehaffey", + "Mcquillen", + "Mclennan", + "Mcgrail", + "Mccreight", + "Mayville", + "Maysonet", + "Maust", + "Mathieson", + "Mastrangelo", + "Maskell", + "Martina", + "Manz", + "Malmberg", + "Makela", + "Madruga", + "Luz", + "Lotts", + "Longnecker", + "Logston", + "Littell", + "Liska", + "Lindauer", + "Lillibridge", + "Levron", + "Letchworth", + "Lesh", + "Leffel", + "Leday", + "Leamon", + "Laura", + "Kulas", + "Kula", + "Kucharski", + "Kromer", + "Kraatz", + "Konieczny", + "Konen", + "Komar", + "Kivett", + "Kirts", + "Kinnear", + "Kersh", + "Keithley", + "Keifer", + "Judah", + "Jimenes", + "Jeppesen", + "Jasmin", + "Jansson", + "Huntsberry", + "Hund", + "Huitt", + "Huffine", + "Hosford", + "Hopes", + "Holmstrom", + "Hollen", + "Hodgin", + "Hirschman", + "Hiltner", + "Hilliker", + "Hibner", + "Hennis", + "Helt", + "Heidelberg", + "Heger", + "Heer", + "Hartness", + "Hardrick", + "Halladay", + "Gula", + "Guillaume", + "Guerriero", + "Grunewald", + "Grosse", + "Griffeth", + "Grenz", + "Grassi", + "Grandison", + "Ginther", + "Gimenez", + "Gillingham", + "Gillham", + "Gess", + "Gelman", + "Gearheart", + "Gaskell", + "Gariepy", + "Gamino", + "Gallien", + "Galentine", + "Fuquay", + "Froman", + "Froelich", + "Friedel", + "Foos", + "Fomby", + "Focht", + "Flythe", + "Fiqueroa", + "Filson", + "Filip", + "Fierros", + "Fett", + "Fedele", + "Fasching", + "Farney", + "Fargo", + "Everts", + "Even", + "Etzel", + "Elzey", + "Eichner", + "Eger", + "Eatman", + "Ducker", + "Duchesne", + "Donati", + "Domenech", + "Dollard", + "Dodrill", + "Dinapoli", + "Denn", + "Delfino", + "Delcid", + "Delaune", + "Delatte", + "Deems", + "Daluz", + "Cusson", + "Cullison", + "Cue", + "Cuadrado", + "Crumrine", + "Cruickshank", + "Crosland", + "Croll", + "Criddle", + "Crepeau", + "Coutu", + "Couey", + "Cort", + "Coppinger", + "Collman", + "Cockburn", + "Coca", + "Clayborne", + "Claflin", + "Cissell", + "Chowdhury", + "Chicoine", + "Chenier", + "Causby", + "Caulder", + "Cassano", + "Casner", + "Cardiel", + "Burner", + "Brunton", + "Bruch", + "Broxton", + "Brosius", + "Brooking", + "Branco", + "Bracco", + "Bourgault", + "Bosserman", + "Books", + "Bonet", + "Bolds", + "Bolander", + "Bohman", + "Boelter", + "Blohm", + "Blea", + "Blaise", + "Bischof", + "Billie", + "Beus", + "Bellew", + "Bastarache", + "Bast", + "Bartolome", + "Bark", + "Barcomb", + "Barco", + "Balls", + "Balk", + "Balas", + "Bakos", + "Avey", + "Atnip", + "Ashbrook", + "Arno", + "Arbour", + "Aquirre", + "Appell", + "Aldaco", + "Alcazar", + "Alban", + "Ahlstrom", + "Abadie", + "Zylstra", + "Zick", + "Zheng", + "Yother", + "Wyse", + "Wunsch", + "Whitty", + "Weist", + "Vrooman", + "Vine", + "Villalon", + "Vidrio", + "Vavra", + "Vasbinder", + "Vanmatre", + "Vandorn", + "Ugarte", + "Turberville", + "Tuel", + "Trogdon", + "Town", + "Toupin", + "Toone", + "Tolleson", + "Tinkham", + "Tinch", + "Tiano", + "Teston", + "Teer", + "Tea", + "Tawney", + "Taplin", + "Tant", + "Tansey", + "Swayne", + "Sutcliffe", + "Sunderman", + "Suits", + "Strothers", + "Stromain", + "Stork", + "Stoneburner", + "Stolte", + "Stolp", + "Stoehr", + "Stingley", + "Stegman", + "Stangl", + "Spinella", + "Spier", + "Soules", + "Sommerfield", + "Sipp", + "Simek", + "Siders", + "Shufelt", + "Shue", + "Shor", + "Shires", + "Shellenberger", + "Sheely", + "Service", + "Sepe", + "Seaberg", + "Schwing", + "Scherrer", + "Scalzo", + "Saver", + "Sasse", + "Sarvis", + "Santora", + "Sansbury", + "Salls", + "Saleem", + "Ryland", + "Rybicki", + "Ruggieri", + "Rothenberg", + "Rosenstein", + "Roquemore", + "Rollison", + "Rodden", + "Rivet", + "Rita", + "Ridlon", + "Riche", + "Riccardi", + "Reiley", + "Regner", + "Rech", + "Rayo", + "Rawley", + "Ranger", + "Raff", + "Radabaugh", + "Quon", + "Quill", + "Privette", + "Prange", + "Pickrell", + "Perino", + "Penning", + "Pankratz", + "Orlandi", + "Nyquist", + "Norrell", + "Noren", + "Naples", + "Nale", + "Nakashima", + "Musselwhite", + "Murrin", + "Murch", + "Mullinix", + "Mullican", + "Mullan", + "Morneau", + "Mondor", + "Molinar", + "Mo", + "Minjares", + "Minix", + "Mingle", + "Minchew", + "Mill", + "Milewski", + "Mikkelson", + "Mifflin", + "Messing", + "Merkley", + "Meis", + "Meas", + "Mcroy", + "Mcphearson", + "Mcneel", + "Mcmunn", + "Mcmorrow", + "Mcdorman", + "Mccroskey", + "Mccoll", + "Mcclusky", + "Mcclaran", + "Mccampbell", + "Mazzariello", + "Mauzy", + "Mauch", + "Mastro", + "Martinek", + "Marsala", + "Marcantel", + "Mahle", + "Lyda", + "Lucius", + "Luciani", + "Lubbers", + "Louder", + "Lobel", + "Linsey", + "Linch", + "Liller", + "Legros", + "Layden", + "Lapine", + "Lansberry", + "Lage", + "Laforest", + "Labriola", + "Koga", + "Knupp", + "Klimek", + "Kittinger", + "Kirchoff", + "Kinzel", + "Killinger", + "Kilbourne", + "Ketner", + "Kepley", + "Kemble", + "Kells", + "Kear", + "Kaya", + "Karsten", + "Kaneshiro", + "Kamm", + "Joines", + "Joachim", + "Janelle", + "Jacobus", + "Iler", + "Holgate", + "Hoar", + "Hisey", + "Hird", + "Hilyard", + "Heslin", + "Herzberg", + "Hennigan", + "Hegland", + "Hartl", + "Haner", + "Handel", + "Gualtieri", + "Greenly", + "Grasser", + "Gran", + "Goetsch", + "Godbold", + "Gilland", + "Gidney", + "Gibney", + "Giancola", + "Gettinger", + "Garzon", + "Garret", + "Galle", + "Galgano", + "Gaier", + "Gaertner", + "Fuston", + "Freel", + "Fortes", + "Flock", + "Fiorillo", + "Figgs", + "Fenstermacher", + "Fedler", + "Facer", + "Fabiano", + "Evins", + "Eusebio", + "Euler", + "Esquer", + "Enyeart", + "Elem", + "Eisenhower", + "Eich", + "Edgerly", + "Durocher", + "Durgan", + "Duffin", + "Drolet", + "Drewes", + "Dotts", + "Dossantos", + "Dolly", + "Dockins", + "Dirksen", + "Difiore", + "Dierks", + "Dickerman", + "Dice", + "Dery", + "Denault", + "Demaree", + "Delmonte", + "Delcambre", + "Days", + "Daulton", + "Darst", + "Dahle", + "Curnutt", + "Cully", + "Culligan", + "Cueva", + "Crosslin", + "Croskey", + "Cromartie", + "Crofts", + "Covin", + "Coutee", + "Countess", + "Cost", + "Coppa", + "Coogan", + "Condrey", + "Concannon", + "Coger", + "Cloer", + "Clatterbuck", + "Cieslak", + "Chumbley", + "Choudhury", + "Chiaramonte", + "Charboneau", + "Chai", + "Carneal", + "Cappello", + "Campisi", + "Callicoat", + "Burgoyne", + "Bucholz", + "Brumback", + "Brosnan", + "Brogden", + "Broder", + "Brendle", + "Breece", + "Bown", + "Bou", + "Boser", + "Bondy", + "Bolster", + "Boll", + "Bluford", + "Blandon", + "Biscoe", + "Bevill", + "Bence", + "Battin", + "Basel", + "Bartram", + "Barnaby", + "Barmore", + "Balbuena", + "Badgley", + "Backstrom", + "Auyeung", + "Ater", + "Arrellano", + "Arant", + "Ansari", + "Alling", + "Alejandre", + "Alcock", + "Alaimo", + "Aguinaldo", + "Aarons", + "Zurita", + "Zeiger", + "Zawacki", + "Yutzy", + "Yarger", + "Wygant", + "Wurm", + "Wuest", + "Wolfram", + "Witherell", + "Wisneski", + "Whitby", + "Whelchel", + "Weisz", + "Weisinger", + "Weishaar", + "Wehr", + "Wedge", + "Waxman", + "Waldschmidt", + "Walck", + "Waggener", + "Vosburg", + "Vita", + "Villela", + "Vercher", + "Venters", + "Vanscyoc", + "Vandyne", + "Valenza", + "Utt", + "Urick", + "Ungar", + "Ulm", + "Tumlin", + "Tsao", + "Tryon", + "Trudel", + "Treiber", + "Tow", + "Tober", + "Tipler", + "Tillson", + "Tiedemann", + "Thornley", + "Tetrault", + "Temme", + "Tarrance", + "Tackitt", + "Sykora", + "Sweetman", + "Swatzell", + "Sutliff", + "Suhr", + "Sturtz", + "Strub", + "Strayhorn", + "Stormer", + "Steveson", + "Stengel", + "Steinfeldt", + "Spiro", + "Spieker", + "Speth", + "Spero", + "Soza", + "Souliere", + "Soucie", + "Snedeker", + "Slifer", + "Skillings", + "Situ", + "Siniard", + "Simeon", + "Signorelli", + "Siggers", + "Shultis", + "Shrewsbury", + "Shippee", + "Shimp", + "Sherron", + "Shepler", + "Sharpless", + "Shadrick", + "Severt", + "Severs", + "Semon", + "Semmes", + "Seiter", + "Segers", + "Sclafani", + "Sciortino", + "Schroyer", + "Schrack", + "Schoenberg", + "Schober", + "Scheidt", + "Scheele", + "Satter", + "Sartori", + "Sarris", + "Sarratt", + "Salvaggio", + "Saladino", + "Sakamoto", + "Saine", + "Ryman", + "Rumley", + "Ruggerio", + "Rucks", + "Roughton", + "Room", + "Robards", + "Ricca", + "Rexroad", + "Resler", + "Reny", + "Rentschler", + "Redrick", + "Redick", + "Reagle", + "Raymo", + "Rape", + "Raker", + "Racette", + "Pyburn", + "Pritt", + "Presson", + "Pressman", + "Pough", + "Plain", + "Pisani", + "Perz", + "Perras", + "Pelzer", + "Pedrosa", + "Palos", + "Palmisano", + "Paille", + "Orem", + "Orbison", + "Oliveros", + "Nourse", + "Nordquist", + "Newbury", + "Nelligan", + "Nawrocki", + "Myler", + "Mumaw", + "Morphis", + "Moldenhauer", + "Miyashiro", + "Mignone", + "Mickelsen", + "Michalec", + "Mesta", + "Mcree", + "Mcqueary", + "Mcninch", + "Mcneilly", + "Mclelland", + "Mclawhorn", + "Mcgreevy", + "Mcconkey", + "Mattes", + "Maselli", + "Marten", + "Mart", + "Marcucci", + "Manseau", + "Manjarrez", + "Malbrough", + "Machin", + "Mabie", + "Lynde", + "Lykes", + "Lueras", + "Lokken", + "Loken", + "Linzy", + "Lillis", + "Lilienthal", + "Levey", + "Legler", + "Leedom", + "Lebowitz", + "Lazzaro", + "Larabee", + "Lapinski", + "Langner", + "Langenfeld", + "Lampkins", + "Lamotte", + "Lambright", + "Lagarde", + "Ladouceur", + "Labrador", + "Labounty", + "Lablanc", + "Laberge", + "Kyte", + "Kroon", + "Kron", + "Kraker", + "Kouba", + "Kirwin", + "Kincer", + "Kimbler", + "Kegler", + "Keach", + "Katzman", + "Katzer", + "Kalman", + "Journey", + "Jimmerson", + "Jenning", + "Janus", + "Iacovelli", + "Hust", + "Huson", + "Husby", + "Humphery", + "Hufnagel", + "Honig", + "Holsey", + "Holoman", + "Hohl", + "Hogge", + "Hinderliter", + "Hildebrant", + "Hick", + "Hey", + "Hemby", + "Helle", + "Heintzelman", + "Heidrick", + "Hearon", + "Heap", + "Hazelip", + "Hauk", + "Hasbrouck", + "Harton", + "Hartin", + "Harpster", + "Hansley", + "Hanchett", + "Haar", + "Guthridge", + "Gulbranson", + "Guill", + "Guerrera", + "Grund", + "Grosvenor", + "Grist", + "Grell", + "Grear", + "Granberry", + "Gonser", + "Giunta", + "Giuliani", + "Gillon", + "Gillmore", + "Gillan", + "Gibbon", + "Gettys", + "Gelb", + "Gano", + "Galliher", + "Fullen", + "Frese", + "Frates", + "Foxwell", + "Fleishman", + "Fleener", + "Fielden", + "Ferrera", + "Feng", + "Fells", + "Feemster", + "Fauntleroy", + "Fails", + "Evatt", + "Espy", + "Eno", + "Emmerich", + "Edwin", + "Edler", + "Eastham", + "Dunavant", + "Duca", + "Drinnon", + "Dowe", + "Dorgan", + "Dollinger", + "Divers", + "Dipalma", + "Difranco", + "Dietrick", + "Denzer", + "Demarest", + "Delee", + "Delariva", + "Delany", + "Decesare", + "Debellis", + "Deavers", + "Deardorff", + "Dawe", + "Darosa", + "Darley", + "Dalzell", + "Dahlen", + "Curto", + "Cupps", + "Cunniff", + "Cude", + "Crivello", + "Cripps", + "Cresswell", + "Cousar", + "Cotta", + "Compo", + "Colorado", + "Clyne", + "Clayson", + "Cearley", + "Catania", + "Carini", + "Cargo", + "Cantero", + "Cali", + "Buttrey", + "Buttler", + "Burpee", + "Bulkley", + "Buitron", + "Buda", + "Bublitz", + "Bryer", + "Bryden", + "Brouillette", + "Brott", + "Brookman", + "Bronk", + "Breshears", + "Brennen", + "Brannum", + "Brandl", + "Braman", + "Bracewell", + "Boyter", + "Bomberger", + "Bold", + "Bogen", + "Boeding", + "Bob", + "Blauvelt", + "Blandford", + "Bigger", + "Biermann", + "Bielecki", + "Bibby", + "Berthold", + "Berkman", + "Belvin", + "Bellomy", + "Beland", + "Behne", + "Beecham", + "Becher", + "Beams", + "Bax", + "Bassham", + "Barret", + "Baley", + "Bacchus", + "Auxier", + "Atkison", + "Ary", + "Arocha", + "Arechiga", + "Anspach", + "An", + "Algarin", + "Alcott", + "Alberty", + "Ager", + "Adolph", + "Ackman", + "Abdul", + "Abdallah", + "Zwick", + "Ziemer", + "Zastrow", + "Zajicek", + "Yokum", + "Yokley", + "Wittrock", + "Winebarger", + "Wilker", + "Wilham", + "Whitham", + "Wetzler", + "Westling", + "Westbury", + "Wendler", + "Wellborn", + "Weitzman", + "Weitz", + "Weight", + "Wallner", + "Waldroup", + "Vrabel", + "Vowels", + "Volker", + "Vitiello", + "Visconti", + "Villicana", + "Vibbert", + "Vesey", + "Vannatter", + "Vangilder", + "Vandervort", + "Vandegrift", + "Vanalstyne", + "Vallecillo", + "Usrey", + "Tynan", + "Turpen", + "Tuller", + "Trisler", + "Townson", + "Tillmon", + "Threlkeld", + "Thornell", + "Terrio", + "Taunton", + "Tarry", + "Tardy", + "Swoboda", + "Swihart", + "Sustaita", + "Suitt", + "Stuber", + "Strine", + "Stookey", + "Stmartin", + "Stiger", + "Stainbrook", + "Solem", + "Smail", + "Sligh", + "Siple", + "Sieben", + "Shumake", + "Shriner", + "Showman", + "Shiner", + "Sheen", + "Sheckler", + "Seim", + "Secrist", + "Scoggin", + "Schultheis", + "Schmalz", + "Schendel", + "Schacher", + "Savard", + "Saulter", + "Santillanes", + "Sandiford", + "Sande", + "Salzer", + "Salvato", + "Saltz", + "Sakai", + "Ryckman", + "Ryant", + "Ruck", + "Ronald", + "Rocker", + "Rittenberry", + "Ristau", + "Risk", + "Richart", + "Rhynes", + "Reyer", + "Reulet", + "Reser", + "Redington", + "Reddington", + "Rebello", + "Reasor", + "Raftery", + "Rabago", + "Raasch", + "Quintanar", + "Pylant", + "Purington", + "Provencal", + "Prom", + "Prioleau", + "Prestwood", + "Pothier", + "Popa", + "Polster", + "Politte", + "Poffenberger", + "Pinner", + "Pietrzak", + "Pettie", + "Penaflor", + "Pellot", + "Pellham", + "Paylor", + "Payeur", + "Papas", + "Paik", + "Oyola", + "Osbourn", + "Orzechowski", + "Oppenheimer", + "Olesen", + "Oja", + "Ohl", + "Nuckolls", + "Nordberg", + "Noonkester", + "Nold", + "Nitta", + "Niblett", + "Neuhaus", + "Nesler", + "Ned", + "Nanney", + "Myrie", + "Mutch", + "Motto", + "Mosquera", + "Morena", + "Montalto", + "Montagna", + "Mizelle", + "Mincy", + "Millikan", + "Millay", + "Miler", + "Milbourn", + "Mikels", + "Migues", + "Miesner", + "Mershon", + "Merrow", + "Merlin", + "Melia", + "Meigs", + "Mealey", + "Mcraney", + "Mcmartin", + "Mclachlan", + "Mcgeehan", + "Mcferren", + "Mcdole", + "Mccaulley", + "Mcanulty", + "Maziarz", + "Maul", + "Mateer", + "Martinsen", + "Marson", + "Mariotti", + "Manna", + "Mang", + "Mance", + "Malbon", + "Mah", + "Magnusson", + "Maclachlan", + "Macek", + "Lurie", + "Luc", + "Lown", + "Loranger", + "Lonon", + "Lisenby", + "Linsley", + "Linger", + "Lenk", + "Leavens", + "Learned", + "Lauritzen", + "Lathem", + "Lashbrook", + "Landman", + "Lamarche", + "Lamantia", + "Laguerre", + "Lagrange", + "Kogan", + "Klingbeil", + "Kist", + "Kimpel", + "Kime", + "Kier", + "Kerfoot", + "Kennamer", + "Kellems", + "Kammer", + "Kamen", + "Jess", + "Jepsen", + "Jarnigan", + "Isler", + "Ishee", + "Isabel", + "Hux", + "Hungate", + "Hummell", + "Hultgren", + "Huffaker", + "Hruby", + "Hover", + "Hornick", + "Hooser", + "Hooley", + "Hoggan", + "Hirano", + "Hilley", + "Higham", + "Heuser", + "Henrickson", + "Henegar", + "Hellwig", + "Heide", + "Hedley", + "Hasegawa", + "Hartt", + "Hambright", + "Halfacre", + "Hafley", + "Guion", + "Guinan", + "Grunwald", + "Grothe", + "Gries", + "Greaney", + "Granda", + "Grabill", + "Gothard", + "Gossman", + "Gosser", + "Gossard", + "Gosha", + "Goldner", + "Gobin", + "Gloss", + "Ginyard", + "Gilkes", + "Gilden", + "Gerson", + "Gephart", + "Gengler", + "Gautier", + "Gassett", + "Garon", + "Gandhi", + "Galusha", + "Gallager", + "Galdamez", + "Fulmore", + "Fritsche", + "Fowles", + "Foutch", + "Forward", + "Footman", + "Fludd", + "Flakes", + "Ferriera", + "Ferrero", + "Ferreri", + "Fenimore", + "Fegley", + "Fegan", + "Fearn", + "Farrier", + "Fansler", + "Fane", + "Falzone", + "Fairweather", + "Etherton", + "Elsberry", + "Dykema", + "Duppstadt", + "Dunnam", + "Dunklin", + "Duet", + "Due", + "Dudgeon", + "Dubuc", + "Doxey", + "Dory", + "Donmoyer", + "Dodgen", + "Disanto", + "Dingler", + "Dimattia", + "Dilday", + "Digennaro", + "Diedrich", + "Derossett", + "Deputy", + "Depp", + "Demasi", + "Degraffenreid", + "Deakins", + "Deady", + "Davin", + "Daigre", + "Daddario", + "Czerwinski", + "Cullens", + "Cubbage", + "Cracraft", + "Constance", + "Comes", + "Combest", + "Coletti", + "Coghill", + "Clerk", + "Claybrooks", + "Class", + "Christofferse", + "Chiesa", + "Chason", + "Chamorro", + "Cessna", + "Celentano", + "Cayer", + "Carolan", + "Carnegie", + "Capetillo", + "Callier", + "Cadogan", + "Caba", + "Byrom", + "Byrns", + "Burrowes", + "Burket", + "Burdge", + "Burbage", + "Bukowski", + "Buchholtz", + "Brunt", + "Brungardt", + "Brunetti", + "Brumbelow", + "Brugger", + "Broadhurst", + "Brigance", + "Brandow", + "Bouknight", + "Bottorff", + "Bottomley", + "Bosarge", + "Borger", + "Bona", + "Bombardier", + "Bologna", + "Boggan", + "Blumer", + "Blecha", + "Birney", + "Birkland", + "Betances", + "Beran", + "Benny", + "Benes", + "Belin", + "Belgrave", + "Bealer", + "Bauch", + "Bath", + "Bashir", + "Bartow", + "Baro", + "Barnhouse", + "Barile", + "Ballweg", + "Baisley", + "Bains", + "Baehr", + "Badilla", + "Bachus", + "Bacher", + "Bachelder", + "Auzenne", + "Aten", + "Astle", + "Allis", + "Agarwal", + "Adger", + "Adamek", + "Ziolkowski", + "Zinke", + "Zazueta", + "Zamorano", + "Younkin", + "Won", + "Wittig", + "Witman", + "Winsett", + "Winkles", + "Wiedman", + "Whitner", + "Whitcher", + "Wetherby", + "Westra", + "Westhoff", + "Wehrle", + "Wee", + "Wagaman", + "Voris", + "Vicknair", + "Vegas", + "Veasley", + "Vaugh", + "Vanish", + "Vanderburg", + "Valletta", + "Tunney", + "Trumbo", + "Truluck", + "Trueman", + "Truby", + "Trombly", + "Trojan", + "Tourville", + "Tostado", + "Tone", + "Titcomb", + "Timpson", + "Tignor", + "Thrush", + "Thresher", + "Thiede", + "Tews", + "Tamplin", + "Taff", + "Tacker", + "Syverson", + "Sylvestre", + "Summerall", + "Stumbaugh", + "Strouth", + "Straker", + "Stradford", + "Stoney", + "Stokley", + "Steinhoff", + "Steinberger", + "Stairs", + "Spigner", + "Soltero", + "Snively", + "Sletten", + "Sinkler", + "Sinegal", + "Simoes", + "Siller", + "Sigel", + "Shoe", + "Shire", + "Shinkle", + "Shellman", + "Sheller", + "Sheats", + "Sharer", + "Selvage", + "Sedlak", + "Sea", + "Schriver", + "Schimke", + "Scheuerman", + "Schanz", + "Savory", + "Saulters", + "Sauers", + "Sais", + "Rusin", + "Rumfelt", + "Ruhland", + "Rozar", + "Rosborough", + "Ronning", + "Rolph", + "Roloff", + "Rogue", + "Robie", + "Riviera", + "Rimer", + "Riehle", + "Ricco", + "Rhein", + "Retzlaff", + "Reisman", + "Reimann", + "Re", + "Rayes", + "Raub", + "Raminez", + "Quesinberry", + "Pua", + "Procopio", + "Priolo", + "Printz", + "Prewett", + "Preas", + "Prahl", + "Portugal", + "Poovey", + "Ploof", + "Platz", + "Plaisted", + "Pinzon", + "Pineiro", + "Pickney", + "Petrovich", + "Perl", + "Pehrson", + "Peets", + "Pavon", + "Pautz", + "Pascarella", + "Paras", + "Paolini", + "Pals", + "Pafford", + "Oyer", + "Ovellette", + "Outten", + "Outen", + "Ours", + "Orduna", + "Odriscoll", + "Oberlin", + "Nosal", + "Niven", + "Nisbett", + "Nevers", + "Nathanson", + "Mule", + "Mukai", + "Mozee", + "Mowers", + "Motyka", + "Morency", + "Montford", + "Mollica", + "Molden", + "Mitten", + "Miser", + "Mina", + "Millender", + "Midgette", + "Messerly", + "Melendy", + "Meisel", + "Meidinger", + "Meany", + "Mcnitt", + "Mcnemar", + "Mcmakin", + "Mcgaugh", + "Mccaa", + "Mauriello", + "Maudlin", + "Matzke", + "Mattia", + "Matteo", + "Matsumura", + "Masuda", + "Mangels", + "Maloof", + "Malizia", + "Mahmoud", + "Maglione", + "Maddix", + "Lucchesi", + "Lochner", + "Linquist", + "Lino", + "Lietz", + "Leventhal", + "Leopard", + "Lemanski", + "Leiser", + "Laury", + "Lauber", + "Lamberth", + "Kuss", + "Kung", + "Kulik", + "Kuiper", + "Krout", + "Kotter", + "Kort", + "Kohlmeier", + "Koffler", + "Koeller", + "Knipe", + "Knauss", + "Kleiber", + "Kissee", + "Kirst", + "Kirch", + "Kilgo", + "Kerlin", + "Kellison", + "Kehl", + "Kalb", + "Jorden", + "Jantzen", + "Jamar", + "Inabinet", + "Ikard", + "Husman", + "Hunsberger", + "Hundt", + "Hucks", + "Houtz", + "Houseknecht", + "Hoots", + "Hogsett", + "Hogans", + "Hintze", + "Hession", + "Henault", + "Hemming", + "Helsley", + "Heinen", + "Heffington", + "Heberling", + "Heasley", + "Heal", + "Hazley", + "Hazeltine", + "Hayton", + "Hayse", + "Hawke", + "Haston", + "Harward", + "Harvard", + "Harrow", + "Hanneman", + "Hafford", + "Hadnot", + "Guerro", + "Graig", + "Grahm", + "Gowins", + "Gordillo", + "Goosby", + "Glatt", + "Gibbens", + "Ghent", + "Gerrard", + "Germann", + "Geil", + "Gebo", + "Gean", + "Garling", + "Gardenhire", + "Garbutt", + "Gagner", + "Furguson", + "Funchess", + "Fujiwara", + "Fujita", + "Friley", + "Frigo", + "Forshee", + "Folkes", + "Filler", + "Fernald", + "Ferber", + "Feingold", + "Favorite", + "Faul", + "Farrelly", + "Fairbank", + "Failla", + "Estelle", + "Espey", + "Eshleman", + "Ertl", + "Erhart", + "Erhardt", + "Erbe", + "Elsea", + "Ells", + "Ellman", + "Eisenhart", + "Ehmann", + "Earnhardt", + "Duplantis", + "Dulac", + "Ducote", + "Draves", + "Dosch", + "Dolce", + "Divito", + "Ditch", + "Dimauro", + "Derringer", + "Demeo", + "Demartini", + "Delima", + "Dehner", + "Degen", + "Defrancisco", + "Defoor", + "Dedeaux", + "Debnam", + "Cypert", + "Cutrer", + "Cusumano", + "Custis", + "Croker", + "Courtois", + "Costantino", + "Cormack", + "Corbeil", + "Copher", + "Conlan", + "Conkling", + "Cogdell", + "Cilley", + "Chapdelaine", + "Cendejas", + "Castiglia", + "Cassette", + "Cashin", + "Carstensen", + "Carol", + "Caprio", + "Calcote", + "Calaway", + "Byfield", + "Butner", + "Bushway", + "Burritt", + "Browner", + "Brobst", + "Briner", + "Brighton", + "Bridger", + "Brickley", + "Brendel", + "Bratten", + "Bratt", + "Brainerd", + "Brackman", + "Bowne", + "Bouck", + "Borunda", + "Bordner", + "Bonenfant", + "Boer", + "Boehmer", + "Bodiford", + "Bleau", + "Blankinship", + "Blane", + "Blaha", + "Bitting", + "Bissonette", + "Bigby", + "Bibeau", + "Beverage", + "Bermudes", + "Berke", + "Bergevin", + "Bergerson", + "Bendel", + "Belville", + "Bechard", + "Bearce", + "Beadles", + "Batz", + "Bartlow", + "Barren", + "Ayoub", + "Avans", + "Aumiller", + "Arviso", + "Arpin", + "Arnwine", + "Armwood", + "Arent", + "Arehart", + "Arcand", + "Antle", + "Ambrosino", + "Alongi", + "Alm", + "Allshouse", + "Ahart", + "Aguon", + "Ziebarth", + "Zeledon", + "Zakrzewski", + "Yuhas", + "Yingst", + "Yedinak", + "Wommack", + "Winnett", + "Wingler", + "Wilcoxen", + "Whitmarsh", + "Whistler", + "Wayt", + "Watley", + "Wasser", + "Warkentin", + "Voll", + "Vogelsang", + "Voegele", + "Vivanco", + "Vinton", + "Villafane", + "Viles", + "Versace", + "Ver", + "Venne", + "Vanwagoner", + "Vanwagenen", + "Vanleuven", + "Vanauken", + "Uselton", + "Uren", + "Trumbauer", + "Tritt", + "Treadaway", + "Tozier", + "Tope", + "Tomczak", + "Tomberlin", + "Tomasini", + "Tollett", + "Toller", + "Titsworth", + "Tirrell", + "Tilly", + "Tavera", + "Tarnowski", + "Tanouye", + "Tall", + "Swarthout", + "Sutera", + "Surette", + "Styers", + "Styer", + "Stipe", + "Stickland", + "Steve", + "Stembridge", + "Stearn", + "Starkes", + "Stanberry", + "Stahr", + "Spino", + "Spicher", + "Sperber", + "Speece", + "Soo", + "Sonntag", + "Sneller", + "Smalling", + "Slowik", + "Slocumb", + "Sliva", + "Slemp", + "Slama", + "Sitz", + "Sisto", + "Sisemore", + "Sindelar", + "Shipton", + "Shillings", + "Sheeley", + "Sharber", + "Shaddix", + "Severns", + "Severino", + "Sever", + "Sensabaugh", + "Seder", + "Seawell", + "Seamons", + "Schrantz", + "Schooler", + "Scheffer", + "Scheerer", + "Scalia", + "Saum", + "Santibanez", + "Sano", + "Sanjuan", + "Sampley", + "Sailer", + "Sabella", + "Sabbagh", + "Royall", + "Rottman", + "Rivenbark", + "Rikard", + "Ricketson", + "Rickel", + "Rethman", + "Reily", + "Reddin", + "Reasoner", + "Reade", + "Rast", + "Ranallo", + "Rana", + "Quintal", + "Pung", + "Pucci", + "Proto", + "Prosperie", + "Prim", + "Preusser", + "Preslar", + "Powley", + "Postma", + "Pinnix", + "Pilla", + "Pietsch", + "Pickerel", + "Pica", + "Pharris", + "Petway", + "Petillo", + "Perin", + "Pereda", + "Pennypacker", + "Pennebaker", + "Pedrick", + "Patin", + "Patchell", + "Parodi", + "Parman", + "Pantano", + "Padua", + "Padro", + "Osterhout", + "Orner", + "Opp", + "Olivar", + "Ohlson", + "Odonoghue", + "Oceguera", + "Oberry", + "Novello", + "Noguera", + "Newquist", + "Newcombe", + "Neihoff", + "Nehring", + "Nees", + "Nebeker", + "Nau", + "Mundo", + "Mullenix", + "Morrisey", + "Moronta", + "Morillo", + "Morefield", + "Mongillo", + "Molino", + "Minto", + "Midgley", + "Michie", + "Menzies", + "Medved", + "Mechling", + "Mealy", + "Mcshan", + "Mcquaig", + "Mcnees", + "Mcglade", + "Mcgarity", + "Mcgahey", + "Mcduff", + "Mayweather", + "Mastropietro", + "Masten", + "Maranto", + "Maniscalco", + "Maize", + "Mahmood", + "Maddocks", + "Maday", + "Macha", + "Maag", + "Luken", + "Lopp", + "Lolley", + "Llanas", + "Litz", + "Litherland", + "Lindenberg", + "Lieu", + "Letcher", + "Lentini", + "Lemelle", + "Leet", + "Lecuyer", + "Leber", + "Laursen", + "Latch", + "Larrick", + "Lantigua", + "Langlinais", + "Lalli", + "Lafever", + "Labat", + "Labadie", + "Kurt", + "Krogman", + "Kohut", + "Knarr", + "Klimas", + "Klar", + "Kittelson", + "Kirschbaum", + "Kintzel", + "Kincannon", + "Kimmell", + "Killgore", + "Kettner", + "Kelsch", + "Karle", + "Kapoor", + "Johansson", + "Jock", + "Jenkinson", + "Janney", + "Isabelle", + "Iraheta", + "Insley", + "Hyslop", + "Hy", + "Human", + "Huckstep", + "Holleran", + "Hoerr", + "Hinze", + "Hinnenkamp", + "Hilger", + "Higgin", + "Hicklin", + "Heroux", + "Henkle", + "Helfer", + "Heikkinen", + "Heckstall", + "Heckler", + "Heavener", + "Haydel", + "Haveman", + "Haubert", + "Harrop", + "Harnois", + "Hansard", + "Hanover", + "Hammitt", + "Haliburton", + "Haefner", + "Hadsell", + "Haakenson", + "Guynn", + "Guizar", + "Grout", + "Grosz", + "Goo", + "Gomer", + "Golla", + "Godby", + "Glanz", + "Glancy", + "Givan", + "Giesen", + "Gerst", + "Gayman", + "Garraway", + "Gabor", + "Furness", + "Frisk", + "Fremont", + "Frary", + "Forand", + "Fessenden", + "Ferrigno", + "Fearon", + "Favreau", + "Faulks", + "Falbo", + "Ewen", + "Everton", + "Eurich", + "Etchison", + "Esterly", + "Entwistle", + "Ellingsworth", + "Elders", + "Ek", + "Eisenbarth", + "Edelson", + "Eckel", + "Earnshaw", + "Dunneback", + "Doyal", + "Donnellan", + "Dolin", + "Dibiase", + "Deschenes", + "Dermody", + "Denmark", + "Degregorio", + "Darnall", + "Dant", + "Dansereau", + "Danaher", + "Dammann", + "Dames", + "Czarnecki", + "Cuyler", + "Custard", + "Cummingham", + "Cuffie", + "Cuffee", + "Cudney", + "Cuadra", + "Crigler", + "Creger", + "Coughlan", + "Corvin", + "Cortright", + "Corchado", + "Connery", + "Conforti", + "Condron", + "Colosimo", + "Colclough", + "Cola", + "Cohee", + "Claire", + "Ciotti", + "Chill", + "Chien", + "Check", + "Chacko", + "Cevallos", + "Cavitt", + "Cavins", + "Castagna", + "Cashwell", + "Carrozza", + "Carrara", + "Capra", + "Campas", + "Callas", + "Caison", + "Cai", + "Caggiano", + "Cabot", + "Bynoe", + "Buswell", + "Burpo", + "Burnam", + "Burges", + "Buerger", + "Buelow", + "Bueche", + "Buckle", + "Bruni", + "Brummitt", + "Brodersen", + "Briese", + "Breit", + "Brakebill", + "Braatz", + "Boyers", + "Boughner", + "Borror", + "Borquez", + "Bonelli", + "Bohner", + "Blaze", + "Blaker", + "Blackmer", + "Bissette", + "Bibbins", + "Bhatt", + "Bhatia", + "Bessler", + "Bergh", + "Beresford", + "Bensen", + "Benningfield", + "Benito", + "Bellantoni", + "Behler", + "Beehler", + "Beazley", + "Beauchesne", + "Bargo", + "Bannerman", + "Baltes", + "Balog", + "Ballantyne", + "Bad", + "Axelson", + "Apgar", + "Aoki", + "Anstett", + "Alejos", + "Alcocer", + "Albury", + "Aichele", + "Ahl", + "Ackles", + "Zerangue", + "Zehner", + "Zank", + "Zacarias", + "Youngberg", + "Yorke", + "Yarbro", + "Xie", + "Wydra", + "Worthley", + "Wolbert", + "Wittmer", + "Witherington", + "Wishart", + "Wire", + "Winnie", + "Winkleman", + "Willilams", + "Willer", + "Wiedeman", + "Whittingham", + "Whitbeck", + "Whetsel", + "Wheless", + "Westerberg", + "Welcher", + "Wegman", + "Waterfield", + "Wasinger", + "Warfel", + "Wannamaker", + "Walborn", + "Wada", + "Vogl", + "Vizcarrondo", + "Vitela", + "Villeda", + "Veras", + "Venuti", + "Veney", + "Ulrey", + "Uhlig", + "Turcios", + "Tremper", + "Torian", + "Torbett", + "Thrailkill", + "Terrones", + "Teitelbaum", + "Teems", + "Tay", + "Swoope", + "Sunseri", + "Stutes", + "Stthomas", + "Strohm", + "Stroble", + "Striegel", + "Streicher", + "Stodola", + "Stinchcomb", + "Steves", + "Steppe", + "Stem", + "Steller", + "Staudt", + "Starner", + "Stamant", + "Stam", + "Stackpole", + "Sprankle", + "Speciale", + "Spahr", + "Sowders", + "Sova", + "Soluri", + "Soderlund", + "Slinkard", + "Skates", + "Sjogren", + "Sirianni", + "Siewert", + "Sickels", + "Sica", + "Shugart", + "Shoults", + "Shive", + "Shimer", + "Shier", + "Shield", + "Shepley", + "Sheeran", + "Sharper", + "Sevin", + "Severe", + "Seto", + "Segundo", + "Sedlacek", + "Scuderi", + "Schurman", + "Schuelke", + "Scholten", + "Schlater", + "Schisler", + "Schiefelbein", + "Schalk", + "Sanon", + "Sae", + "Sabala", + "Ruyle", + "Ruybal", + "Ruf", + "Rueb", + "Rowsey", + "Rosol", + "Rocheleau", + "Rishel", + "Rippey", + "Ringgold", + "Rieves", + "Ridinger", + "Rew", + "Retherford", + "Rempe", + "Reith", + "Rafter", + "Raffaele", + "Quinto", + "Putz", + "Purdom", + "Puls", + "Pulaski", + "Propp", + "Principato", + "Preiss", + "Prada", + "Polansky", + "Poch", + "Plath", + "Pittard", + "Pinnock", + "Pfarr", + "Pfannenstiel", + "Penniman", + "Pauling", + "Patchen", + "Paschke", + "Parkey", + "Pando", + "Overly", + "Ouimet", + "Ottman", + "Otter", + "Ostlund", + "Ormiston", + "Occhipinti", + "Nowacki", + "Norred", + "Noack", + "Nishida", + "Nilles", + "Nicodemus", + "Neth", + "Nealey", + "Myricks", + "Murff", + "Mungia", + "Mullet", + "Motsinger", + "Moscato", + "Mort", + "Morado", + "Moors", + "Monnier", + "Molyneux", + "Modzelewski", + "Miura", + "Minich", + "Militello", + "Milbrandt", + "Michalik", + "Meserve", + "Merle", + "Mendivil", + "Melara", + "Meadow", + "Mcnish", + "Mcelhannon", + "Mccroy", + "Mccrady", + "Mazzella", + "Maule", + "Mattera", + "Mathena", + "Matas", + "Mass", + "Mascorro", + "Marone", + "Marinello", + "Marguez", + "Marcell", + "Manwaring", + "Manhart", + "Mangano", + "Maggi", + "Lymon", + "Luter", + "Luse", + "Lukasik", + "Luiz", + "Ludlum", + "Luczak", + "Lowenthal", + "Lossett", + "Lorentzen", + "Loredo", + "Longworth", + "Lomanto", + "Lisi", + "Lish", + "Lipsky", + "Linck", + "Liedtke", + "Levering", + "Lessman", + "Lemond", + "Lembo", + "Ledonne", + "Leatham", + "Laufer", + "Lanphear", + "Langlais", + "Lando", + "Lamphear", + "Lamberton", + "Lafon", + "Lade", + "Lacross", + "Kyzer", + "Krok", + "Kring", + "Krell", + "Krehbiel", + "Kratochvil", + "Krach", + "Kovar", + "Kostka", + "Knudtson", + "Knaack", + "Kliebert", + "Klahn", + "Kirkley", + "Kimzey", + "Kettle", + "Kerrick", + "Kennerson", + "Keesler", + "Karlin", + "Kan", + "Jenny", + "Janousek", + "Jan", + "Imel", + "Icenhour", + "Hyler", + "Hunger", + "Hudock", + "Houpt", + "Hopping", + "Hoops", + "Holquin", + "Holiman", + "Holahan", + "Hodapp", + "Hires", + "Hillen", + "Hickmon", + "Hersom", + "Henrich", + "Helvey", + "Heidt", + "Heideman", + "Hedstrom", + "Hedin", + "Hebron", + "Hayter", + "Harn", + "Hardage", + "Harbor", + "Halsted", + "Hahne", + "Hagemann", + "Guzik", + "Guel", + "Groesbeck", + "Gritton", + "Grego", + "Graziani", + "Grasty", + "Graney", + "Gouin", + "Gossage", + "Golston", + "Goheen", + "Godina", + "Glade", + "Giorgi", + "Giambrone", + "Gerrity", + "Gerrish", + "Gero", + "Gerling", + "Gaulke", + "Garlick", + "Galiano", + "Gaiter", + "Gahagan", + "Gagnier", + "Friddle", + "Fredericksen", + "Franqui", + "Follansbee", + "Foerster", + "Flury", + "Fitzmaurice", + "Fiorini", + "Finlayson", + "Fiecke", + "Fickes", + "Fichter", + "Ferron", + "Ferdinand", + "Farrel", + "Fackler", + "Eyman", + "Escarcega", + "Errico", + "Erler", + "Erby", + "Engman", + "Engelmann", + "Elsass", + "Elliston", + "Eddleman", + "Eadie", + "Dummer", + "Drost", + "Dorrough", + "Dorrance", + "Doolan", + "Donalson", + "Domenico", + "Ditullio", + "Dittmar", + "Dishon", + "Dionisio", + "Dike", + "Devinney", + "Desir", + "Deschamp", + "Derrickson", + "Delamora", + "Deitch", + "Dechant", + "Dave", + "Danek", + "Dahmen", + "Curci", + "Cudjoe", + "Crumble", + "Croxton", + "Creasman", + "Craney", + "Crader", + "Cowling", + "Coulston", + "Cortina", + "Corlew", + "Corl", + "Copland", + "Convery", + "Cohrs", + "Clune", + "Clausing", + "Cipriani", + "Cinnamon", + "Cianciolo", + "Chubb", + "Chittum", + "Chenard", + "Charlesworth", + "Charlebois", + "Champine", + "Chamlee", + "Chagoya", + "Casselman", + "Cardello", + "Capasso", + "Cannella", + "Calderwood", + "Byford", + "Buttars", + "Bushee", + "Burrage", + "Buentello", + "Brzozowski", + "Bryner", + "Brumit", + "Brookover", + "Bronner", + "Bromberg", + "Brixey", + "Brinn", + "Briganti", + "Bremner", + "Brawn", + "Branscome", + "Brannigan", + "Bradsher", + "Bozek", + "Boulay", + "Bormann", + "Bongiorno", + "Bollin", + "Bohler", + "Bogert", + "Bodenhamer", + "Blose", + "Blind", + "Bivona", + "Bitter", + "Billips", + "Bibler", + "Benfer", + "Benedetti", + "Belue", + "Bellanger", + "Belford", + "Behn", + "Beerman", + "Barnhardt", + "Baltzell", + "Balling", + "Balducci", + "Bainter", + "Babineau", + "Babich", + "Baade", + "Attwood", + "Asmus", + "Asaro", + "Artiaga", + "April", + "Applebaum", + "Ang", + "Anding", + "Amar", + "Amaker", + "Allsup", + "Alligood", + "Alers", + "Agin", + "Agar", + "Achenbach", + "Abramowitz", + "Abbas", + "Aasen", + "Zehnder", + "Yopp", + "Yelle", + "Yeldell", + "Wynter", + "Woodmansee", + "Wooding", + "Woll", + "Winborne", + "Willsey", + "Willeford", + "Widger", + "Whiten", + "Whitchurch", + "Whang", + "Wen", + "Weissinger", + "Weinman", + "Weingartner", + "Weidler", + "Waltrip", + "Walt", + "Wagar", + "Wafford", + "Vitagliano", + "Villalvazo", + "Villacorta", + "Vigna", + "Vickrey", + "Vicini", + "Ventimiglia", + "Vandenbosch", + "Valvo", + "Valazquez", + "Utsey", + "Urbaniak", + "Unzueta", + "Trombetta", + "Trevizo", + "Trembley", + "Tremaine", + "Traverso", + "Tores", + "Tolan", + "Tillison", + "Tietjen", + "Tee", + "Teachout", + "Taube", + "Tatham", + "Tarwater", + "Tarbell", + "Sydow", + "Sy", + "Swims", + "Swader", + "Striplin", + "Stops", + "Stoltenberg", + "Steinhauer", + "Steil", + "Steigerwald", + "Starkweather", + "Stallman", + "Squier", + "Sparacino", + "Span", + "Spadafora", + "Shiflet", + "Shibata", + "Shevlin", + "Sherrick", + "Shake", + "Sessums", + "Servais", + "Senters", + "Seevers", + "Seelye", + "Searfoss", + "Seabrooks", + "Scoles", + "Schwager", + "Schrom", + "Schmeltzer", + "Scheffel", + "Sax", + "Sawin", + "Saterfiel", + "Sardina", + "Sanroman", + "Sane", + "Sandin", + "Salamanca", + "Saladin", + "Sak", + "Sabia", + "Rustin", + "Rushin", + "Ruley", + "Rueter", + "Row", + "Rotter", + "Rosenzweig", + "Roles", + "Rohe", + "Roder", + "Rockey", + "Ro", + "Riter", + "Rieth", + "Ried", + "Riding", + "Riddles", + "Ridder", + "Rennick", + "Remmers", + "Remer", + "Relyea", + "Reilley", + "Reder", + "Rasheed", + "Rakowski", + "Rabin", + "Queener", + "Pursel", + "Prue", + "Prowell", + "Pritts", + "Primo", + "Presler", + "Pouncy", + "Porche", + "Porcaro", + "Pollman", + "Pleas", + "Planas", + "Pinkley", + "Pinegar", + "Pilger", + "Philson", + "Petties", + "Perrodin", + "Pendergrast", + "Patao", + "Pasternak", + "Passarelli", + "Pasko", + "Parshall", + "Panos", + "Panella", + "Palombo", + "Padillo", + "Oyama", + "Overlock", + "Overbeck", + "Otterson", + "Orrell", + "Ornellas", + "Opitz", + "Okelly", + "Officer", + "Obando", + "Noggle", + "Nicosia", + "Netto", + "Negrin", + "Natali", + "Nakayama", + "Nagao", + "Nadel", + "Musial", + "Murrill", + "Murrah", + "Munsch", + "Mucci", + "Mrozek", + "Moyes", + "Mowrer", + "Moris", + "Morais", + "Moorhouse", + "Monico", + "Mone", + "Mondy", + "Moncayo", + "Mole", + "Miltenberger", + "Milsap", + "Milone", + "Millikin", + "Milardo", + "Mika", + "Micheals", + "Micco", + "Meyerson", + "Mericle", + "Mendell", + "Meinhardt", + "Meachum", + "Mcleroy", + "Mcgray", + "Mcgonigal", + "Maultsby", + "Matis", + "Matheney", + "Matamoros", + "Marro", + "Marcil", + "Marcial", + "Mantz", + "Mannings", + "Maltby", + "Malchow", + "Maiorano", + "Mahn", + "Mahlum", + "Maglio", + "Mae", + "Maberry", + "Lustig", + "Luellen", + "Longwell", + "Longenecker", + "Lofland", + "Locascio", + "Linney", + "Linneman", + "Lighty", + "Levell", + "Levay", + "Lenahan", + "Lemen", + "Lehto", + "Lebaron", + "Lanctot", + "Lamy", + "Lainez", + "Laffoon", + "Labombard", + "Kujawski", + "Kroger", + "Kreutzer", + "Korhonen", + "Kondo", + "Kollman", + "Kohan", + "Kogut", + "Knaus", + "Kivi", + "Kittel", + "Kinner", + "Kindig", + "Kindel", + "Kiesel", + "Kidney", + "Kibby", + "Khang", + "Kettler", + "Ketterer", + "Kepner", + "Kelliher", + "Keenum", + "Kanode", + "Kail", + "July", + "Juhasz", + "Jowett", + "Jolicoeur", + "Jeon", + "Iser", + "Ingrassia", + "Imai", + "Hutchcraft", + "Humiston", + "Hulings", + "Hukill", + "Huizenga", + "Hugley", + "Huddle", + "Hose", + "Hornyak", + "Hodder", + "Hisle", + "Hillenbrand", + "Hille", + "Higuchi", + "Hertzler", + "Herdon", + "Heppner", + "Hepp", + "Heitmann", + "Heckart", + "Hazlewood", + "Hayles", + "Hayek", + "Hawthorn", + "Hawkin", + "Haugland", + "Hasler", + "Harbuck", + "Happel", + "Hambly", + "Hambleton", + "Hagaman", + "Guzzi", + "Gullette", + "Guinyard", + "Grogg", + "Grise", + "Griffing", + "Goto", + "Gosney", + "Goods", + "Goley", + "Goldblatt", + "Gledhill", + "Girton", + "Giltner", + "Gillock", + "Gilham", + "Gilfillan", + "Giblin", + "Gentner", + "Gehlert", + "Gehl", + "Garten", + "Garney", + "Garlow", + "Garett", + "Galles", + "Galeana", + "Futral", + "Fuhr", + "Friedland", + "Franson", + "Fransen", + "Foulds", + "Follmer", + "Foland", + "Flax", + "Flavin", + "Firkins", + "Fillion", + "Figueredo", + "Ferrill", + "Fenster", + "Fenley", + "Fauver", + "Farfan", + "Factor", + "Eustice", + "Eppler", + "Engelman", + "Engelke", + "Emmer", + "Elzy", + "Ellwood", + "Ellerbee", + "Elks", + "Ehret", + "Ebbert", + "Durrah", + "Dupras", + "Dubuque", + "Dragoo", + "Donlon", + "Dolloff", + "Doi", + "Dibella", + "Derrico", + "Demko", + "Demar", + "Darrington", + "Czapla", + "Crooker", + "Creagh", + "Cranor", + "Craner", + "Crafts", + "Crabill", + "Coyer", + "Cowman", + "Cowherd", + "Cottone", + "Costillo", + "Coster", + "Costas", + "Cosenza", + "Corker", + "Collinson", + "Coello", + "Clingman", + "Clingerman", + "Claborn", + "Citizen", + "Chmura", + "Chausse", + "Chaudhry", + "Chapell", + "Chancy", + "Cerrone", + "Caves", + "Caverly", + "Caulkins", + "Carn", + "Campfield", + "Campanelli", + "Callaham", + "Cadorette", + "Butkovich", + "Buske", + "Burrier", + "Burkley", + "Bunyard", + "Budge", + "Buckelew", + "Buchheit", + "Broman", + "Brescia", + "Brasel", + "Brain", + "Boyster", + "Booe", + "Bonomo", + "Bonnet", + "Bondi", + "Bohnsack", + "Bobby", + "Blomberg", + "Blanford", + "Bilderback", + "Biggins", + "Bently", + "Behrends", + "Beegle", + "Bedoya", + "Bechtol", + "Beaubien", + "Bayerl", + "Baumgart", + "Baumeister", + "Barratt", + "Barlowe", + "Barkman", + "Barbagallo", + "Baldree", + "Baine", + "Bail", + "Baggs", + "Bacote", + "Aylward", + "Ashurst", + "Arvidson", + "Arthurs", + "Arrieta", + "Arrey", + "Arreguin", + "Arrant", + "Arner", + "Armor", + "Arizmendi", + "Anker", + "Amis", + "Amend", + "Alphin", + "Allbright", + "Aikin", + "Acres" + ); + +$sugar_demodata['first_name_array'] = array( + "Mary", + "Patricia", + "Linda", + "Barbara", + "Elizabeth", + "Jennifer", + "Maria", + "Susan", + "Margaret", + "Dorothy", + "Lisa", + "Nancy", + "Karen", + "Betty", + "Helen", + "Sandra", + "Donna", + "Carol", + "Ruth", + "Sharon", + "Michelle", + "Laura", + "Sarah", + "Kimberly", + "Deborah", + "Jessica", + "Shirley", + "Cynthia", + "Angela", + "Melissa", + "Brenda", + "Amy", + "Anna", + "Rebecca", + "Virginia", + "Kathleen", + "Pamela", + "Martha", + "Debra", + "Amanda", + "Stephanie", + "Carolyn", + "Christine", + "Marie", + "Janet", + "Catherine", + "Frances", + "Ann", + "Joyce", + "Diane", + "Alice", + "Julie", + "Heather", + "Teresa", + "Doris", + "Gloria", + "Evelyn", + "Jean", + "Cheryl", + "Mildred", + "Katherine", + "Joan", + "Ashley", + "Judith", + "Rose", + "Janice", + "Kelly", + "Nicole", + "Judy", + "Christina", + "Kathy", + "Theresa", + "Beverly", + "Denise", + "Tammy", + "Irene", + "Jane", + "Lori", + "Rachel", + "Marilyn", + "Andrea", + "Kathryn", + "Louise", + "Sara", + "Anne", + "Jacqueline", + "Wanda", + "Bonnie", + "Julia", + "Ruby", + "Lois", + "Tina", + "Phyllis", + "Norma", + "Paula", + "Diana", + "Annie", + "Lillian", + "Emily", + "Robin", + "Peggy", + "Crystal", + "Gladys", + "Rita", + "Dawn", + "Connie", + "Florence", + "Tracy", + "Edna", + "Tiffany", + "Carmen", + "Rosa", + "Cindy", + "Grace", + "Wendy", + "Victoria", + "Edith", + "Kim", + "Sherry", + "Sylvia", + "Josephine", + "Thelma", + "Shannon", + "Sheila", + "Ethel", + "Ellen", + "Elaine", + "Marjorie", + "Carrie", + "Charlotte", + "Monica", + "Esther", + "Pauline", + "Emma", + "Juanita", + "Anita", + "Rhonda", + "Hazel", + "Amber", + "Eva", + "Debbie", + "April", + "Leslie", + "Clara", + "Lucille", + "Jamie", + "Joanne", + "Eleanor", + "Valerie", + "Danielle", + "Megan", + "Alicia", + "Suzanne", + "Michele", + "Gail", + "Bertha", + "Darlene", + "Veronica", + "Jill", + "Erin", + "Geraldine", + "Lauren", + "Cathy", + "Joann", + "Lorraine", + "Lynn", + "Sally", + "Regina", + "Erica", + "Beatrice", + "Dolores", + "Bernice", + "Audrey", + "Yvonne", + "Annette", + "June", + "Samantha", + "Marion", + "Dana", + "Stacy", + "Ana", + "Renee", + "Ida", + "Vivian", + "Roberta", + "Holly", + "Brittany", + "Melanie", + "Loretta", + "Yolanda", + "Jeanette", + "Laurie", + "Katie", + "Kristen", + "Vanessa", + "Alma", + "Sue", + "Elsie", + "Beth", + "Jeanne", + "Vicki", + "Carla", + "Tara", + "Rosemary", + "Eileen", + "Terri", + "Gertrude", + "Lucy", + "Tonya", + "Ella", + "Stacey", + "Wilma", + "Gina", + "Kristin", + "Jessie", + "Natalie", + "Agnes", + "Vera", + "Willie", + "Charlene", + "Bessie", + "Delores", + "Melinda", + "Pearl", + "Arlene", + "Maureen", + "Colleen", + "Allison", + "Tamara", + "Joy", + "Georgia", + "Constance", + "Lillie", + "Claudia", + "Jackie", + "Marcia", + "Tanya", + "Nellie", + "Minnie", + "Marlene", + "Heidi", + "Glenda", + "Lydia", + "Viola", + "Courtney", + "Marian", + "Stella", + "Caroline", + "Dora", + "Jo", + "Vickie", + "Mattie", + "Terry", + "Maxine", + "Irma", + "Mabel", + "Marsha", + "Myrtle", + "Lena", + "Christy", + "Deanna", + "Patsy", + "Hilda", + "Gwendolyn", + "Jennie", + "Nora", + "Margie", + "Nina", + "Cassandra", + "Leah", + "Penny", + "Kay", + "Priscilla", + "Naomi", + "Carole", + "Brandy", + "Olga", + "Billie", + "Dianne", + "Tracey", + "Leona", + "Jenny", + "Felicia", + "Sonia", + "Miriam", + "Velma", + "Becky", + "Bobbie", + "Violet", + "Kristina", + "Toni", + "Misty", + "Mae", + "Shelly", + "Daisy", + "Ramona", + "Sherri", + "Erika", + "Katrina", + "Claire", + "Lindsey", + "Lindsay", + "Geneva", + "Guadalupe", + "Belinda", + "Margarita", + "Sheryl", + "Cora", + "Faye", + "Ada", + "Natasha", + "Sabrina", + "Isabel", + "Marguerite", + "Hattie", + "Harriet", + "Molly", + "Cecilia", + "Kristi", + "Brandi", + "Blanche", + "Sandy", + "Rosie", + "Joanna", + "Iris", + "Eunice", + "Angie", + "Inez", + "Lynda", + "Madeline", + "Amelia", + "Alberta", + "Genevieve", + "Monique", + "Jodi", + "Janie", + "Maggie", + "Kayla", + "Sonya", + "Jan", + "Lee", + "Kristine", + "Candace", + "Fannie", + "Maryann", + "Opal", + "Alison", + "Yvette", + "Melody", + "Luz", + "Susie", + "Olivia", + "Flora", + "Shelley", + "Kristy", + "Mamie", + "Lula", + "Lola", + "Verna", + "Beulah", + "Antoinette", + "Candice", + "Juana", + "Jeannette", + "Pam", + "Kelli", + "Hannah", + "Whitney", + "Bridget", + "Karla", + "Celia", + "Latoya", + "Patty", + "Shelia", + "Gayle", + "Della", + "Vicky", + "Lynne", + "Sheri", + "Marianne", + "Kara", + "Jacquelyn", + "Erma", + "Blanca", + "Myra", + "Leticia", + "Pat", + "Krista", + "Roxanne", + "Angelica", + "Johnnie", + "Robyn", + "Francis", + "Adrienne", + "Rosalie", + "Alexandra", + "Brooke", + "Bethany", + "Sadie", + "Bernadette", + "Traci", + "Jody", + "Kendra", + "Jasmine", + "Nichole", + "Rachael", + "Chelsea", + "Mable", + "Ernestine", + "Muriel", + "Marcella", + "Elena", + "Krystal", + "Angelina", + "Nadine", + "Kari", + "Estelle", + "Dianna", + "Paulette", + "Lora", + "Mona", + "Doreen", + "Rosemarie", + "Angel", + "Desiree", + "Antonia", + "Hope", + "Ginger", + "Janis", + "Betsy", + "Christie", + "Freda", + "Mercedes", + "Meredith", + "Lynette", + "Teri", + "Cristina", + "Eula", + "Leigh", + "Meghan", + "Sophia", + "Eloise", + "Rochelle", + "Gretchen", + "Cecelia", + "Raquel", + "Henrietta", + "Alyssa", + "Jana", + "Kelley", + "Gwen", + "Kerry", + "Jenna", + "Tricia", + "Laverne", + "Olive", + "Alexis", + "Tasha", + "Silvia", + "Elvira", + "Casey", + "Delia", + "Sophie", + "Kate", + "Patti", + "Lorena", + "Kellie", + "Sonja", + "Lila", + "Lana", + "Darla", + "May", + "Mindy", + "Essie", + "Mandy", + "Lorene", + "Elsa", + "Josefina", + "Jeannie", + "Miranda", + "Dixie", + "Lucia", + "Marta", + "Faith", + "Lela", + "Johanna", + "Shari", + "Camille", + "Tami", + "Shawna", + "Elisa", + "Ebony", + "Melba", + "Ora", + "Nettie", + "Tabitha", + "Ollie", + "Jaime", + "Winifred", + "Kristie", + "Marina", + "Alisha", + "Aimee", + "Rena", + "Myrna", + "Marla", + "Tammie", + "Latasha", + "Bonita", + "Patrice", + "Ronda", + "Sherrie", + "Addie", + "Francine", + "Deloris", + "Stacie", + "Adriana", + "Cheri", + "Shelby", + "Abigail", + "Celeste", + "Jewel", + "Cara", + "Adele", + "Rebekah", + "Lucinda", + "Dorthy", + "Chris", + "Effie", + "Trina", + "Reba", + "Shawn", + "Sallie", + "Aurora", + "Lenora", + "Etta", + "Lottie", + "Kerri", + "Trisha", + "Nikki", + "Estella", + "Francisca", + "Josie", + "Tracie", + "Marissa", + "Karin", + "Brittney", + "Janelle", + "Lourdes", + "Laurel", + "Helene", + "Fern", + "Elva", + "Corinne", + "Kelsey", + "Ina", + "Bettie", + "Elisabeth", + "Aida", + "Caitlin", + "Ingrid", + "Iva", + "Eugenia", + "Christa", + "Goldie", + "Cassie", + "Maude", + "Jenifer", + "Therese", + "Frankie", + "Dena", + "Lorna", + "Janette", + "Latonya", + "Candy", + "Morgan", + "Consuelo", + "Tamika", + "Rosetta", + "Debora", + "Cherie", + "Polly", + "Dina", + "Jewell", + "Fay", + "Jillian", + "Dorothea", + "Nell", + "Trudy", + "Esperanza", + "Patrica", + "Kimberley", + "Shanna", + "Helena", + "Carolina", + "Cleo", + "Stefanie", + "Rosario", + "Ola", + "Janine", + "Mollie", + "Lupe", + "Alisa", + "Lou", + "Maribel", + "Susanne", + "Bette", + "Susana", + "Elise", + "Cecile", + "Isabelle", + "Lesley", + "Jocelyn", + "Paige", + "Joni", + "Rachelle", + "Leola", + "Daphne", + "Alta", + "Ester", + "Petra", + "Graciela", + "Imogene", + "Jolene", + "Keisha", + "Lacey", + "Glenna", + "Gabriela", + "Keri", + "Ursula", + "Lizzie", + "Kirsten", + "Shana", + "Adeline", + "Mayra", + "Jayne", + "Jaclyn", + "Gracie", + "Sondra", + "Carmela", + "Marisa", + "Rosalind", + "Charity", + "Tonia", + "Beatriz", + "Marisol", + "Clarice", + "Jeanine", + "Sheena", + "Angeline", + "Frieda", + "Lily", + "Robbie", + "Shauna", + "Millie", + "Claudette", + "Cathleen", + "Angelia", + "Gabrielle", + "Autumn", + "Katharine", + "Summer", + "Jodie", + "Staci", + "Lea", + "Christi", + "Jimmie", + "Justine", + "Elma", + "Luella", + "Margret", + "Dominique", + "Socorro", + "Rene", + "Martina", + "Margo", + "Mavis", + "Callie", + "Bobbi", + "Maritza", + "Lucile", + "Leanne", + "Jeannine", + "Deana", + "Aileen", + "Lorie", + "Ladonna", + "Willa", + "Manuela", + "Gale", + "Selma", + "Dolly", + "Sybil", + "Abby", + "Lara", + "Dale", + "Ivy", + "Dee", + "Winnie", + "Marcy", + "Luisa", + "Jeri", + "Magdalena", + "Ofelia", + "Meagan", + "Audra", + "Matilda", + "Leila", + "Cornelia", + "Bianca", + "Simone", + "Bettye", + "Randi", + "Virgie", + "Latisha", + "Barbra", + "Georgina", + "Eliza", + "Leann", + "Bridgette", + "Rhoda", + "Haley", + "Adela", + "Nola", + "Bernadine", + "Flossie", + "Ila", + "Greta", + "Ruthie", + "Nelda", + "Minerva", + "Lilly", + "Terrie", + "Letha", + "Hilary", + "Estela", + "Valarie", + "Brianna", + "Rosalyn", + "Earline", + "Catalina", + "Ava", + "Mia", + "Clarissa", + "Lidia", + "Corrine", + "Alexandria", + "Concepcion", + "Tia", + "Sharron", + "Rae", + "Dona", + "Ericka", + "Jami", + "Elnora", + "Chandra", + "Lenore", + "Neva", + "Marylou", + "Melisa", + "Tabatha", + "Serena", + "Avis", + "Allie", + "Sofia", + "Jeanie", + "Odessa", + "Nannie", + "Harriett", + "Loraine", + "Penelope", + "Milagros", + "Emilia", + "Benita", + "Allyson", + "Ashlee", + "Tania", + "Tommie", + "Esmeralda", + "Karina", + "Eve", + "Pearlie", + "Zelma", + "Malinda", + "Noreen", + "Tameka", + "Saundra", + "Hillary", + "Amie", + "Althea", + "Rosalinda", + "Jordan", + "Lilia", + "Alana", + "Gay", + "Clare", + "Alejandra", + "Elinor", + "Michael", + "Lorrie", + "Jerri", + "Darcy", + "Earnestine", + "Carmella", + "Taylor", + "Noemi", + "Marcie", + "Liza", + "Annabelle", + "Louisa", + "Earlene", + "Mallory", + "Carlene", + "Nita", + "Selena", + "Tanisha", + "Katy", + "Julianne", + "John", + "Lakisha", + "Edwina", + "Maricela", + "Margery", + "Kenya", + "Dollie", + "Roxie", + "Roslyn", + "Kathrine", + "Nanette", + "Charmaine", + "Lavonne", + "Ilene", + "Kris", + "Tammi", + "Suzette", + "Corine", + "Kaye", + "Jerry", + "Merle", + "Chrystal", + "Lina", + "Deanne", + "Lilian", + "Juliana", + "Aline", + "Luann", + "Kasey", + "Maryanne", + "Evangeline", + "Colette", + "Melva", + "Lawanda", + "Yesenia", + "Nadia", + "Madge", + "Kathie", + "Eddie", + "Ophelia", + "Valeria", + "Nona", + "Mitzi", + "Mari", + "Georgette", + "Claudine", + "Fran", + "Alissa", + "Roseann", + "Lakeisha", + "Susanna", + "Reva", + "Deidre", + "Chasity", + "Sheree", + "Carly", + "James", + "Elvia", + "Alyce", + "Deirdre", + "Gena", + "Briana", + "Araceli", + "Katelyn", + "Rosanne", + "Wendi", + "Tessa", + "Berta", + "Marva", + "Imelda", + "Marietta", + "Marci", + "Leonor", + "Arline", + "Sasha", + "Madelyn", + "Janna", + "Juliette", + "Deena", + "Aurelia", + "Josefa", + "Augusta", + "Liliana", + "Young", + "Christian", + "Lessie", + "Amalia", + "Savannah", + "Anastasia", + "Vilma", + "Natalia", + "Rosella", + "Lynnette", + "Corina", + "Alfreda", + "Leanna", + "Carey", + "Amparo", + "Coleen", + "Tamra", + "Aisha", + "Wilda", + "Karyn", + "Cherry", + "Queen", + "Maura", + "Mai", + "Evangelina", + "Rosanna", + "Hallie", + "Erna", + "Enid", + "Mariana", + "Lacy", + "Juliet", + "Jacklyn", + "Freida", + "Madeleine", + "Mara", + "Hester", + "Cathryn", + "Lelia", + "Casandra", + "Bridgett", + "Angelita", + "Jannie", + "Dionne", + "Annmarie", + "Katina", + "Beryl", + "Phoebe", + "Millicent", + "Katheryn", + "Diann", + "Carissa", + "Maryellen", + "Liz", + "Lauri", + "Helga", + "Gilda", + "Adrian", + "Rhea", + "Marquita", + "Hollie", + "Tisha", + "Tamera", + "Angelique", + "Francesca", + "Britney", + "Kaitlin", + "Lolita", + "Florine", + "Rowena", + "Reyna", + "Twila", + "Fanny", + "Janell", + "Ines", + "Concetta", + "Bertie", + "Alba", + "Brigitte", + "Alyson", + "Vonda", + "Pansy", + "Elba", + "Noelle", + "Letitia", + "Kitty", + "Deann", + "Brandie", + "Louella", + "Leta", + "Felecia", + "Sharlene", + "Lesa", + "Beverley", + "Robert", + "Isabella", + "Herminia", + "Terra", + "Celina", + "Tori", + "Octavia", + "Jade", + "Denice", + "Germaine", + "Sierra", + "Michell", + "Cortney", + "Nelly", + "Doretha", + "Sydney", + "Deidra", + "Monika", + "Lashonda", + "Judi", + "Chelsey", + "Antionette", + "Margot", + "Bobby", + "Adelaide", + "Nan", + "Leeann", + "Elisha", + "Dessie", + "Libby", + "Kathi", + "Gayla", + "Latanya", + "Mina", + "Mellisa", + "Kimberlee", + "Jasmin", + "Renae", + "Zelda", + "Elda", + "Ma", + "Justina", + "Gussie", + "Emilie", + "Camilla", + "Abbie", + "Rocio", + "Kaitlyn", + "Jesse", + "Edythe", + "Ashleigh", + "Selina", + "Lakesha", + "Geri", + "Allene", + "Pamala", + "Michaela", + "Dayna", + "Caryn", + "Rosalia", + "James", + "John", + "Robert", + "Michael", + "William", + "David", + "Richard", + "Charles", + "Joseph", + "Thomas", + "Christopher", + "Daniel", + "Paul", + "Mark", + "Donald", + "George", + "Kenneth", + "Steven", + "Edward", + "Brian", + "Ronald", + "Anthony", + "Kevin", + "Jason", + "Matthew", + "Gary", + "Timothy", + "Jose", + "Larry", + "Jeffrey", + "Frank", + "Scott", + "Eric", + "Stephen", + "Andrew", + "Raymond", + "Gregory", + "Joshua", + "Jerry", + "Dennis", + "Walter", + "Patrick", + "Peter", + "Harold", + "Douglas", + "Henry", + "Carl", + "Arthur", + "Ryan", + "Roger", + "Joe", + "Juan", + "Jack", + "Albert", + "Jonathan", + "Justin", + "Terry", + "Gerald", + "Keith", + "Samuel", + "Willie", + "Ralph", + "Lawrence", + "Nicholas", + "Roy", + "Benjamin", + "Bruce", + "Brandon", + "Adam", + "Harry", + "Fred", + "Wayne", + "Billy", + "Steve", + "Louis", + "Jeremy", + "Aaron", + "Randy", + "Howard", + "Eugene", + "Carlos", + "Russell", + "Bobby", + "Victor", + "Martin", + "Ernest", + "Phillip", + "Todd", + "Jesse", + "Craig", + "Alan", + "Shawn", + "Clarence", + "Sean", + "Philip", + "Chris", + "Johnny", + "Earl", + "Jimmy", + "Antonio", + "Danny", + "Bryan", + "Tony", + "Luis", + "Mike", + "Stanley", + "Leonard", + "Nathan", + "Dale", + "Manuel", + "Rodney", + "Curtis", + "Norman", + "Allen", + "Marvin", + "Vincent", + "Glenn", + "Jeffery", + "Travis", + "Jeff", + "Chad", + "Jacob", + "Lee", + "Melvin", + "Alfred", + "Kyle", + "Francis", + "Bradley", + "Jesus", + "Herbert", + "Frederick", + "Ray", + "Joel", + "Edwin", + "Don", + "Eddie", + "Ricky", + "Troy", + "Randall", + "Barry", + "Alexander", + "Bernard", + "Mario", + "Leroy", + "Francisco", + "Marcus", + "Micheal", + "Theodore", + "Clifford", + "Miguel", + "Oscar", + "Jay", + "Jim", + "Tom", + "Calvin", + "Alex", + "Jon", + "Ronnie", + "Bill", + "Lloyd", + "Tommy", + "Leon", + "Derek", + "Warren", + "Darrell", + "Jerome", + "Floyd", + "Leo", + "Alvin", + "Tim", + "Wesley", + "Gordon", + "Dean", + "Greg", + "Jorge", + "Dustin", + "Pedro", + "Derrick", + "Dan", + "Lewis", + "Zachary", + "Corey", + "Herman", + "Maurice", + "Vernon", + "Roberto", + "Clyde", + "Glen", + "Hector", + "Shane", + "Ricardo", + "Sam", + "Rick", + "Lester", + "Brent", + "Ramon", + "Charlie", + "Tyler", + "Gilbert", + "Gene", + "Marc", + "Reginald", + "Ruben", + "Brett", + "Angel", + "Nathaniel", + "Rafael", + "Leslie", + "Edgar", + "Milton", + "Raul", + "Ben", + "Chester", + "Cecil", + "Duane", + "Franklin", + "Andre", + "Elmer", + "Brad", + "Gabriel", + "Ron", + "Mitchell", + "Roland", + "Arnold", + "Harvey", + "Jared", + "Adrian", + "Karl", + "Cory", + "Claude", + "Erik", + "Darryl", + "Jamie", + "Neil", + "Jessie", + "Christian", + "Javier", + "Fernando", + "Clinton", + "Ted", + "Mathew", + "Tyrone", + "Darren", + "Lonnie", + "Lance", + "Cody", + "Julio", + "Kelly", + "Kurt", + "Allan", + "Nelson", + "Guy", + "Clayton", + "Hugh", + "Max", + "Dwayne", + "Dwight", + "Armando", + "Felix", + "Jimmie", + "Everett", + "Jordan", + "Ian", + "Wallace", + "Ken", + "Bob", + "Jaime", + "Casey", + "Alfredo", + "Alberto", + "Dave", + "Ivan", + "Johnnie", + "Sidney", + "Byron", + "Julian", + "Isaac", + "Morris", + "Clifton", + "Willard", + "Daryl", + "Ross", + "Virgil", + "Andy", + "Marshall", + "Salvador", + "Perry", + "Kirk", + "Sergio", + "Marion", + "Tracy", + "Seth", + "Kent", + "Terrance", + "Rene", + "Eduardo", + "Terrence", + "Enrique", + "Freddie", + "Wade", + "Austin", + "Stuart", + "Fredrick", + "Arturo", + "Alejandro", + "Jackie", + "Joey", + "Nick", + "Luther", + "Wendell", + "Jeremiah", + "Evan", + "Julius", + "Dana", + "Donnie", + "Otis", + "Shannon", + "Trevor", + "Oliver", + "Luke", + "Homer", + "Gerard", + "Doug", + "Kenny", + "Hubert", + "Angelo", + "Shaun", + "Lyle", + "Matt", + "Lynn", + "Alfonso", + "Orlando", + "Rex", + "Carlton", + "Ernesto", + "Cameron", + "Neal", + "Pablo", + "Lorenzo", + "Omar", + "Wilbur", + "Blake", + "Grant", + "Horace", + "Roderick", + "Kerry", + "Abraham", + "Willis", + "Rickey", + "Jean", + "Ira", + "Andres", + "Cesar", + "Johnathan", + "Malcolm", + "Rudolph", + "Damon", + "Kelvin", + "Rudy", + "Preston", + "Alton", + "Archie", + "Marco", + "Wm", + "Pete", + "Randolph", + "Garry", + "Geoffrey", + "Jonathon", + "Felipe", + "Bennie", + "Gerardo", + "Ed", + "Dominic", + "Robin", + "Loren", + "Delbert", + "Colin", + "Guillermo", + "Earnest", + "Lucas", + "Benny", + "Noel", + "Spencer", + "Rodolfo", + "Myron", + "Edmund", + "Garrett", + "Salvatore", + "Cedric", + "Lowell", + "Gregg", + "Sherman", + "Wilson", + "Devin", + "Sylvester", + "Kim", + "Roosevelt", + "Israel", + "Jermaine", + "Forrest", + "Wilbert", + "Leland", + "Simon", + "Guadalupe", + "Clark", + "Irving", + "Carroll", + "Bryant", + "Owen", + "Rufus", + "Woodrow", + "Sammy", + "Kristopher", + "Mack", + "Levi", + "Marcos", + "Gustavo", + "Jake", + "Lionel", + "Marty", + "Taylor", + "Ellis", + "Dallas", + "Gilberto", + "Clint", + "Nicolas", + "Laurence", + "Ismael", + "Orville", + "Drew", + "Jody", + "Ervin", + "Dewey", + "Al", + "Wilfred", + "Josh", + "Hugo", + "Ignacio", + "Caleb", + "Tomas", + "Sheldon", + "Erick", + "Frankie", + "Stewart", + "Doyle", + "Darrel", + "Rogelio", + "Terence", + "Santiago", + "Alonzo", + "Elias", + "Bert", + "Elbert", + "Ramiro", + "Conrad", + "Pat", + "Noah", + "Grady", + "Phil", + "Cornelius", + "Lamar", + "Rolando", + "Clay", + "Percy", + "Dexter", + "Bradford", + "Merle", + "Darin", + "Amos", + "Terrell", + "Moses", + "Irvin", + "Saul", + "Roman", + "Darnell", + "Randal", + "Tommie", + "Timmy", + "Darrin", + "Winston", + "Brendan", + "Toby", + "Van", + "Abel", + "Dominick", + "Boyd", + "Courtney", + "Jan", + "Emilio", + "Elijah", + "Cary", + "Domingo", + "Santos", + "Aubrey", + "Emmett", + "Marlon", + "Emanuel", + "Jerald", + "Edmond", + "Emil", + "Dewayne", + "Will", + "Otto", + "Teddy", + "Reynaldo", + "Bret", + "Morgan", + "Jess", + "Trent", + "Humberto", + "Emmanuel", + "Stephan", + "Louie", + "Vicente", + "Lamont", + "Stacy", + "Garland", + "Miles", + "Micah", + "Efrain", + "Billie", + "Logan", + "Heath", + "Rodger", + "Harley", + "Demetrius", + "Ethan", + "Eldon", + "Rocky", + "Pierre", + "Junior", + "Freddy", + "Eli", + "Bryce", + "Antoine", + "Robbie", + "Kendall", + "Royce", + "Sterling", + "Mickey", + "Chase", + "Grover", + "Elton", + "Cleveland", + "Dylan", + "Chuck", + "Damian", + "Reuben", + "Stan", + "August", + "Leonardo", + "Jasper", + "Russel", + "Erwin", + "Benito", + "Hans", + "Monte", + "Blaine", + "Ernie", + "Curt", + "Quentin", + "Agustin", + "Murray", + "Jamal", + "Devon", + "Adolfo", + "Harrison", + "Tyson", + "Burton", + "Brady", + "Elliott", + "Wilfredo", + "Bart", + "Jarrod", + "Vance", + "Denis", + "Damien", + "Joaquin", + "Harlan", + "Desmond", + "Elliot", + "Darwin", + "Ashley", + "Gregorio", + "Buddy", + "Xavier", + "Kermit", + "Roscoe", + "Esteban", + "Anton", + "Solomon", + "Scotty", + "Norbert", + "Elvin", + "Williams", + "Nolan", + "Carey", + "Rod", + "Quinton", + "Hal", + "Brain", + "Rob", + "Elwood", + "Kendrick", + "Darius", + "Moises", + "Son", + "Marlin", + "Fidel", + "Thaddeus", + "Cliff", + "Marcel", + "Ali", + "Jackson", + "Raphael", + "Bryon", + "Armand", + "Alvaro", + "Jeffry", + "Dane", + "Joesph", + "Thurman", + "Ned", + "Sammie", + "Rusty", + "Michel", + "Monty", + "Rory", + "Fabian", + "Reggie", + "Mason", + "Graham", + "Kris", + "Isaiah", + "Vaughn", + "Gus", + "Avery", + "Loyd", + "Diego", + "Alexis", + "Adolph", + "Norris", + "Millard", + "Rocco", + "Gonzalo", + "Derick", + "Rodrigo", + "Gerry", + "Stacey", + "Carmen", + "Wiley", + "Rigoberto", + "Alphonso", + "Ty", + "Shelby", + "Rickie", + "Noe", + "Vern", + "Bobbie", + "Reed", + "Jefferson", + "Elvis", + "Bernardo", + "Mauricio", + "Hiram", + "Donovan", + "Basil", + "Riley", + "Ollie", + "Nickolas", + "Maynard", + "Scot", + "Vince", + "Quincy", + "Eddy", + "Sebastian", + "Federico", + "Ulysses", + "Heriberto", + "Donnell", + "Cole", + "Denny", + "Davis", + "Gavin", + "Emery", + "Ward", + "Romeo", + "Jayson", + "Dion", + "Dante", + "Clement", + "Coy", + "Odell", + "Maxwell", + "Jarvis", + "Bruno", + "Issac", + "Mary", + "Dudley", + "Brock", + "Sanford", + "Colby", + "Carmelo", + "Barney", + "Nestor", + "Hollis", + "Stefan", + "Donny", + "Art", + "Linwood", + "Beau", + "Weldon", + "Galen", + "Isidro", + "Truman", + "Delmar", + "Johnathon", + "Silas", + "Frederic", + "Dick", + "Kirby", + "Irwin", + "Cruz", + "Merlin", + "Merrill", + "Charley", + "Marcelino", + "Lane", + "Harris", + "Cleo", + "Carlo", + "Trenton", + "Kurtis", + "Hunter", + "Aurelio", + "Winfred", + "Vito", + "Collin", + "Denver", + "Carter", + "Leonel", + "Emory", + "Pasquale", + "Mohammad", + "Mariano", + "Danial", + "Blair", + "Landon", + "Dirk", + "Branden", + "Adan", + "Numbers", + "Clair", + "Buford", + "German", + "Bernie", + "Wilmer", + "Joan", + "Emerson", + "Zachery", + "Fletcher", + "Jacques", + "Errol", + "Dalton", + "Monroe", + "Josue", + "Dominique", + "Edwardo", + "Booker", + "Wilford", + "Sonny", + "Shelton", + "Carson", + "Theron", + "Raymundo", + "Daren", + "Tristan", + "Houston", + "Robby", + "Lincoln", + "Jame", + "Genaro", + "Gale", + "Bennett", + "Octavio", + "Cornell", + "Laverne", + "Hung", + "Arron", + "Antony", + "Herschel", + "Alva", + "Giovanni", + "Garth", + "Cyrus", + "Cyril", + "Ronny", + "Stevie", + "Lon", + "Freeman", + "Erin", + "Duncan", + "Kennith", + "Carmine", + "Augustine", + "Young", + "Erich", + "Chadwick", + "Wilburn", + "Russ", + "Reid", + "Myles", + "Anderson", + "Morton", + "Jonas", + "Forest", + "Mitchel", + "Mervin", + "Zane", + "Rich", + "Jamel", + "Lazaro", + "Alphonse", + "Randell", + "Major", + "Johnie", + "Jarrett", + "Brooks", + "Ariel", + "Abdul", + "Dusty", + "Luciano", + "Lindsey", + "Tracey", + "Seymour", + "Scottie", + "Eugenio", + "Mohammed", + "Sandy", + "Valentin", + "Chance", + "Arnulfo", + "Lucien", + "Ferdinand", + "Thad", + "Ezra", + "Sydney", + "Aldo", + "Rubin", + "Royal", + "Mitch", + "Earle", + "Abe", + "Wyatt", + "Marquis", + "Lanny", + "Kareem", + "Jamar", + "Boris", + "Isiah", + "Emile", + "Elmo", + "Aron", + "Leopoldo", + "Everette", + "Josef", + "Gail", + "Eloy", + "Dorian", + "Rodrick", + "Reinaldo", + "Lucio", + "Jerrod", + "Weston", + "Hershel", + "Barton", + "Parker", + "Lemuel", + "Lavern", + "Burt", + "Jules", + "Gil", + "Eliseo", + "Ahmad", + "Nigel", + "Efren", + "Antwan", + "Alden", + "Margarito", + "Coleman", + "Refugio", + "Dino", + "Osvaldo", + "Les", + "Deandre", + "Normand", + "Kieth", + "Ivory", + "Andrea", + "Trey", + "Norberto", + "Napoleon", + "Jerold", + "Fritz", + "Rosendo", + "Milford", + "Sang", + "Deon", + "Christoper", + "Alfonzo", + "Lyman", + "Josiah", + "Brant", + "Wilton", + "Rico", + "Jamaal", + "Dewitt", + "Carol", + "Brenton", + "Yong", + "Olin", + "Foster", + "Faustino", + "Claudio", + "Judson", + "Gino", + "Edgardo", + "Berry", + "Alec", + "Tanner", + "Jarred", + "Donn", + "Trinidad", + "Tad", + "Shirley", + "Prince", + "Porfirio", + "Odis", + "Maria", + "Lenard", + "Chauncey", + "Chang", + "Tod", + "Mel", + "Marcelo", + "Kory", + "Augustus", + "Keven", + "Hilario", + "Bud", + "Sal", + "Rosario", + "Orval", + "Mauro", + "Dannie", + "Zachariah", + "Olen", + "Anibal", + "Milo", + "Jed", + "Frances", + "Thanh", + "Dillon", + "Amado", + "Newton", + "Connie", + "Lenny", + "Tory", + "Richie", + "Lupe", + "Horacio", + "Brice", + "Mohamed", + "Delmer", + "Dario", + "Reyes", + "Dee", + "Mac", + "Jonah", + "Jerrold", + "Robt", + "Hank", + "Sung", + "Rupert", + "Rolland", + "Kenton", + "Damion", + "Chi", + "Antone", + "Waldo", + "Fredric", + "Bradly", + "Quinn", + "Kip", + "Burl", + "Walker", + "Tyree", + "Jefferey", + "Ahmed", + "Willy", + "Stanford", + "Oren", + "Noble", + "Moshe", + "Mikel", + "Enoch", + "Brendon", + "Quintin", + "Jamison", + "Florencio", + "Darrick", + "Tobias", + "Minh", + "Hassan", + "Giuseppe", + "Demarcus", + "Cletus", + "Tyrell", + "Lyndon", + "Keenan", + "Werner", + "Theo", + "Geraldo", + "Lou", + "Columbus", + "Chet", + "Bertram", + "Markus", + "Huey", + "Hilton", + "Dwain", + "Donte", + "Tyron", + "Omer", + "Isaias", + "Hipolito", + "Fermin", + "Chung", + "Adalberto", + "Valentine", + "Jamey", + "Bo", + "Barrett", + "Whitney", + "Teodoro", + "Mckinley", + "Maximo", + "Garfield", + "Sol", + "Raleigh", + "Lawerence", + "Abram", + "Rashad", + "King", + "Emmitt", + "Daron", + "Chong", + "Samual", + "Paris", + "Otha", + "Miquel", + "Lacy", + "Eusebio", + "Dong", + "Domenic", + "Darron", + "Buster", + "Antonia", + "Wilber", + "Renato", + "Jc", + "Hoyt", + "Haywood", + "Ezekiel", + "Chas", + "Florentino", + "Elroy", + "Clemente", + "Arden", + "Neville", + "Kelley", + "Edison", + "Deshawn", + "Carrol", + "Shayne", + "Nathanial", + "Jordon", + "Danilo", + "Claud", + "Val", + "Sherwood", + "Raymon", + "Rayford", + "Cristobal", + "Ambrose", + "Titus", + "Hyman", + "Felton", + "Ezequiel", + "Erasmo", + "Stanton", + "Lonny", + "Len", + "Ike", + "Milan", + "Lino", + "Jarod", + "Herb", + "Andreas", + "Walton", + "Rhett", + "Palmer", + "Jude", + "Douglass", + "Cordell", + "Oswaldo", + "Ellsworth", + "Virgilio", + "Toney", + "Nathanael", + "Del", + "Britt", + "Benedict", + "Mose", + "Hong", + "Leigh", + "Johnson", + "Isreal", + "Gayle", + "Garret", + "Fausto", + "Asa", + "Arlen", + "Zack", + "Warner", + "Modesto", + "Francesco", + "Manual", + "Jae", + "Gaylord", + "Gaston", + "Filiberto", + "Deangelo", + "Michale", + "Granville", + "Wes", + "Malik", + "Zackary", + "Tuan", + "Nicky", + "Eldridge", + "Cristopher", + "Cortez", + "Antione", + "Malcom", + "Long", + "Korey", + "Jospeh", + "Colton", + "Waylon", + "Von", + "Hosea", + "Shad", + "Santo", + "Rudolf", + "Rolf", + "Rey", + "Renaldo", + "Marcellus", + "Lucius", + "Lesley", + "Kristofer", + "Boyce", + "Benton", + "Man", + "Kasey", + "Jewell", + "Hayden", + "Harland", + "Arnoldo", + "Rueben", + "Leandro", + "Kraig", + "Jerrell", + "Jeromy", + "Hobert", + "Cedrick", + "Arlie", + "Winford", + "Wally", + "Patricia", + "Luigi", + "Keneth", + "Jacinto", + "Graig", + "Franklyn", + "Edmundo", + "Sid", + "Porter", + "Leif", + "Lauren", + "Jeramy", + "Elisha", + "Buck", + "Willian", + "Vincenzo", + "Shon", + "Michal", + "Lynwood", + "Lindsay", + "Jewel", + "Jere", + "Hai", + "Elden", + "Dorsey", + "Darell", + "Broderick", + "Alonso" +); + +$sugar_demodata['company_name_array'] = array( + "24/7 Couriers", + "2 Big Consolidation Corp", + "2 Tall Stores", + "360 Vacations", + "3rd Round Funding", + "5D Invest A/S", + "A 99 Capital Inc", + "A B Drivers Limited", + "A B Hammer Group Inc", + "A.D. Arts & Crafts Inc", + "A.D. Importing Company Inc", + "A.G. Parr PLC", + "A/Z Co Ltd", + "ABC FUEL CO", + "Air Geese", + "Air Safety Inc", + "Anytime Air Support Inc", + "B Cool Net Ltd", + "B Rubble Group Inc", + "B.C. Investing International", + "B.C. Reporting Ltd", + "B.H. Edwards Inc", + "Big Dog Marketing", + "BS Funding Coop", + "C Nelson Inc", + "Calm C Sailing", + "Chandler Logistics Inc", + "Cloud Cover Trust", + "COMPLETE HLDNG", + "CONS TRUST (AZ)", + "CUMBERLAND TRAILS", + "DD Furniture Inc", + "Dirt Mining Ltd", + "Doggie Diner Co Ltd", + "Do-Over Investing", + "Draft Diversified Energy Inc", + "First National S/B", + "Gifted Holdings AG", + "Green Tractor Group Limited", + "Grow-Fast Inc", + "Income Free Investing LP", + "International Art Inc", + "Itty-Bitty Conglomerate Inc", + "J.K.M. Corp (HA)", + "JAB Funds Ltd.", + "JBC Banking Inc", + "JJ Resources Inc", + "Jungle Man Inc", + "K Kringle Inc". + "K.A. Tower & Co", + "Kaos Theory Ltd", + "Kings Royalty Trust", + "Kitty Kat Inc", + "L Smith & Daughters", + "Lexington Shores Corp", + "Max Holdings Ltd", + "MISSISSIPPI BANKS", + "MMM Mortuary Corp", + "MTM Investment Bank F S B", + "Nimble Technologies Inc", + "NW Bridge Construction", + "NW Capital Corp", + "OTC Holdings", + "Overhead & Underfoot Ltd.", + "P Piper & Sons", + "Powder Puff Suppliers", + "Pullman Cart Company", + "Q.R.&E. Corp", + "Q3 ARVRO III PR", + "Rhyme & Reason Inc", + "RIVIERA HOTELS", + "RR. Talker Co", + "RRR Advertising Inc.", + "S Cane Sweeteners Ltd", + "SEA REGION S A", + "Slender Broadband Inc", + "Smallville Resources Inc", + "South Sea Plumbing Products", + "Southern Realty", + "Spend Thrift Inc", + "Spindle Broadcast Corp.", + "Start Over Trust", + "Super Star Holdings Inc", + "SuperG Tech", + "T-Cat Media Group Inc", + "TJ O'Rourke Inc", + "Tortoise Corp", + "TRACKER COM LP", + "Trait Institute Inc", + "Tri-State Medical Corp", + "T-SQUARED TECHS", + "EEE Endowments LTD", + "U.N.C.L.E. Inc.", + "UNION G H MISS", + "WEST ARKANSAS", + "White Cross Co", + "X-SELL HOLDINGS", + "XY&Z Funding Inc", +); + +$sugar_demodata['street_address_array'] = array( + "123 Anywhere Street", + "345 Sugar Blvd.", + "1715 Scott Dr", + "999 Baker Way", + "67321 West Siam St.", + "48920 San Carlos", + "777 West Filmore", + "9 IBM Path", + "111 Silicon Valley Road", + "321 University Ave.", + ); + +$sugar_demodata['city_array'] = array( + "San Jose", + "San Francisco", + "Sunnyvale", + "San Mateo", + "Cupertino", + "Los Angeles", + "Santa Monica", + "Denver", + "St. Petersburg", + "Santa Fe", + "Ohio", + "Salt Lake City", + "Persistance", + "Alabama", + "Kansas City", + ); + + + //cases demodata + $sugar_demodata['case_seed_names'] = array( + 'Having Trouble Plugging It In', + 'System is Performing Too Fast', + 'Need assistance with large customization', + 'Need to Purchase Additional Licenses', + 'Warning message when using the wrong browser' +); +$sugar_demodata['note_seed_names_and_Descriptions'] = array( + array('More Account Information','This could turn into a 3,000 user opportunity'), + array('Call Information','We had a call. The call went well.'), + array('Birthday Information','The Owner was born in October'), + array('Holliday Gift','The holliday gift was appreciated. Put them on the list for next year as well.') +); +$sugar_demodata['call_seed_data_names'] = array( + 'Get More information on the proposed deal', + 'Left a message', + 'Bad time, will call back', + 'Discuss Review Process' +); + +//titles +$sugar_demodata['titles'] = array( + "President", + "VP Operations", + "VP Sales", + "Director Operations", + "Director Sales", + "Mgr Operations", + "IT Developer", + "" +); + + +//tasks +$sugar_demodata['task_seed_data_names'] = array( + 'Assemble catalogs', + 'Make travel arrangements', + 'Send a letter', + 'Send contract', + 'Send fax', + 'Send a follow-up letter', + 'Send literature', + 'Send proposal', + 'Send quote', + 'Call to schedule meeting', + 'Setup evaluation', + 'Get demo feedback', + 'Arrange introduction', + 'Escalate support request', + 'Close out support request', + 'Ship product', + 'Arrange reference call', + 'Schedule training', + 'Send local user group information', + 'Add to mailing list', +); +$sugar_demodata['meeting_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; + +//meetings +$sugar_demodata['meeting_seed_data_names'] = array( + 'Follow-up on proposal', + 'Initial discussion', + 'Review needs', + 'Discuss pricing', + 'Demo', + 'Introduce all players', +); +$sugar_demodata['meeting_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; + +//emails +$sugar_demodata['email_seed_data_subjects'] = array( + 'Follow-up on proposal', + 'Initial discussion', + 'Review needs', + 'Discuss pricing', + 'Demo', + 'Introduce all players', +); +$sugar_demodata['email_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; + +//leads +$sugar_demodata['primary_address_state'] = 'CA'; +$sugar_demodata['billing_address_state']['east'] = 'NY'; +$sugar_demodata['billing_address_state']['west'] = 'CA'; +$sugar_demodata['primary_address_country'] = 'USA'; + + +//manufacturers +$sugar_demodata['manufacturer_seed_data_names'] = array( + 'TekkyWare Inc.', + 'Wally\'s Widget World' +); + +//Shippers +$sugar_demodata['shipper_seed_data_names'] = array( + 'FedEx', + 'USPS Ground' +); +//productcategories +$sugar_demodata['category_ext_name'] = ' Widgets'; +$sugar_demodata['product_ext_name'] = ' Gadget'; + +$sugar_demodata['productcategory_seed_data_names'] = array( + 'Desktops', + 'Laptops', + 'Stationary Widgets', + 'Wobbly Widgets' +); + +//producttype +$sugar_demodata['producttype_seed_data_names']= array( + 'Widgets', + 'Hardware', + 'Support Contract' +); +//taxrate +$sugar_demodata['taxrate_seed_data'][] = array( + 'name' => '8.25 - Cupertino, CA', + 'value' => '8.25', +); + +$sugar_demodata['currency_seed_data'][] = array( + 'name' => 'Euro', + 'conversion_rate' => 0.9, + 'iso4217' => 'EUR', + 'symbol' => '€', +); + +//producttemplate +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK 1000 Desktop', + 'tax_class' => 'Taxable', + 'cost_price' => 500.00, + 'cost_usdollar' => 500.00, + 'list_price' => 800.00, + 'list_usdollar' => 800.00, + 'discount_price' => 800.00, + 'discount_usdollar' => 800.00, + 'pricing_formula' => 'IsList', + 'mft_part_num' => 'XYZ7890122222', + 'pricing_factor' => '1', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '72', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK 1000 Desktop', + 'tax_class' => 'Taxable', + 'cost_price' => 600.00, + 'cost_usdollar' => 600.00, + 'list_price' => 900.00, + 'list_usdollar' => 900.00, + 'discount_price' => 900.00, + 'discount_usdollar' => 900.00, + 'pricing_formula' => 'IsList', + 'mft_part_num' => 'XYZ7890123456', + 'pricing_factor' => '1', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '65', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK m30 Desktop', + 'tax_class' => 'Taxable', + 'cost_price' => 1300.00, + 'cost_usdollar' => 1300.00, + 'list_price' => 1700.00, + 'list_usdollar' => 1700.00, + 'discount_price' => 1625.00, + 'discount_usdollar' => 1625.00, + 'pricing_formula' => 'ProfitMargin', + 'mft_part_num' => 'ABCD123456890', + 'pricing_factor' => '20', + 'status' => 'Available', + 'weight' => 5.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '12', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'Reflective Mirror Widget', + 'tax_class' => 'Taxable', + 'cost_price' => 200.00, + 'cost_usdollar' => 200.00, + 'list_price' => 325.00, + 'list_usdollar' => 325.00, + 'discount_price' => 266.50, + 'discount_usdollar' => 266.50, + 'pricing_formula' => 'PercentageDiscount', + 'mft_part_num' => '2.0', + 'pricing_factor' => '20', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '65', +); + +$sugar_demodata['contract_seed_data'][] = array( + 'name' => 'IT Tech Support for Moon Base', + 'reference_code' => 'EMP-9802', + 'total_contract_value' => '500600.01', + 'start_date' => '2010-05-15', + 'end_date' => '2020-05-15', + 'company_signed_date' => '2010-03-15', + 'customer_signed_date' => '2010-03-16', + 'description' => 'This is a sub-contract for a very large, very hush-hush project on the moon of Endor.', +); + +$sugar_demodata['contract_seed_data'][] = array( + 'name' => 'Ion Engines for Empire', + 'reference_code' => 'EMP-7277', + 'total_contract_value' => '333444.34', + 'start_date' => '2010-05-15', + 'end_date' => '2020-05-15', + 'company_signed_date' => '2010-03-15', + 'customer_signed_date' => '2010-03-16', + 'description' => 'In competition with Sienar Fleet Systems for this one.', +); + +$sugar_demodata['project_seed_data']['audit'] = array( + 'name' => 'Create new project plan for audit', + 'description' => 'Annual audit coming up next month.', + 'estimated_start_date' => '2007-11-01', + 'estimated_end_date' => '2007-12-31', + 'status' => 'Draft', + 'priority' => 'medium', +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Communicate to stakeholders', + 'date_start' => '2007/11/1', + 'date_finish' => '2007/11/8', + 'description' => 'Schedule individual meetings with Will, Max, and Sarah.', + 'duration' => '6', + 'duration_unit' => 'Days', + 'percent_complete' => 100, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Create draft of the plan', + 'date_start' => '2007/11/5', + 'date_finish' => '2007/11/20', + 'description' => 'Schedule individual meetings with Will, Max, and Sarah.', + 'duration' => '12', + 'duration_unit' => 'Days', + 'percent_complete' => 38, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Field work for collecting data.', + 'date_start' => '2007/11/5', + 'date_finish' => '2007/11/13', + 'description' => 'We need to get approval from all stakeholders on the plan', + 'duration' => '17', + 'duration_unit' => 'Days', + 'percent_complete' => 75, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Create draft of the plan', + 'date_start' => '2007/11/12', + 'date_finish' => '2007/11/19', + 'description' => 'Schedule the meeting with the head of business units to solicit help.', + 'duration' => '6', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Gather data from meetings', + 'date_start' => '2007/11/20', + 'date_finish' => '2007/11/20', + 'description' => 'Need to organize the data and put it in the right spreadsheet.', + 'duration' => '1', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); + + +?> diff --git a/demoData.ja_jp.php b/demoData.ja_jp.php new file mode 100644 index 00000000..3c50d2ac --- /dev/null +++ b/demoData.ja_jp.php @@ -0,0 +1,555 @@ + 'seed_jim_id', + 'last_name' => 'ブレナン', + 'first_name' => 'ジーム', + 'user_name' => 'jim', + 'title' => 'Sales Manager West', + 'is_admin' => false, + 'reports_to' => null, + 'reports_to_name' => null, + 'email' => 'jim@example.com' +); + +//west team +$sugar_demodata['users'][] = array( + 'id' => 'seed_sarah_id', + 'last_name' => 'スミス', + 'first_name' => 'サーラー', + 'user_name' => 'sarah', + 'title' => 'Sales Manager West', + 'is_admin' => false, + 'reports_to' => 'seed_jim_id', + 'reports_to_name' => 'ブレナン, ジーム', + 'email' => 'sarah@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_sally_id', + 'last_name' => 'ブロンソン', + 'first_name' => 'サーリー', + 'user_name' => 'sally', + 'title' => 'Senior Account Rep', + 'is_admin' => false, + 'reports_to' => 'seed_sarah_id', + 'reports_to_name' => 'スミス, サーラー', + 'email' => 'sally@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_max_id', + 'last_name' => 'ジェンソン', + 'first_name' => 'マクス', + 'user_name' => 'max', + 'title' => 'Account Rep', + 'is_admin' => false, + 'reports_to' => 'seed_sarah_id', + 'reports_to_name' => 'スミス、サーラー', + 'email' => 'tom@example.com' +); + +//east team +$sugar_demodata['users'][] = array( + 'id' => 'seed_will_id', + 'last_name' => 'ウエストン', + 'first_name' => 'ウイル', + 'user_name' => 'will', + 'title' => 'Sales Manager East', + 'is_admin' => false, + 'reports_to' => 'seed_jim_id', + 'reports_to_name' => 'ブレナン, ジーム', + 'email' => 'will@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_chris_id', + 'last_name' => 'オリバー', + 'first_name' => 'クリス', + 'user_name' => 'chris', + 'title' => 'Senior Account Rep', + 'is_admin' => false, + 'reports_to' => 'seed_will_id', + 'reports_to_name' => 'ウエストン, ウイル', + 'email' => 'chris@example.com' +); + +//teams demodata +$sugar_demodata['teams'][] = array( + 'name' => 'East イースト', + 'description' => 'これは東のためのチームです。', + 'team_id' => 'East', +); + +$sugar_demodata['teams'][] = array( + 'name' => 'West イースト', + 'description' => 'Westウエスト", "これは西のためのチームです。 ', + 'team_id' => 'West', +); + + +//company name array +$sugar_demodata['company_name_array'] = array( + "Butée Torique", + "Targéte", + "Wally Marté", + "Bünde-Mitte", + "Fabriqué Interationål", + "Életriqué Géneråle", + "Bénellî GMBh", + "реклама", + "Berufskolleg für Elektrotechnik", + "プロダクションG.I.", + "パンダビジュアル", + "A.B.ケアブレインズ", + "株式会社未来商事", +); + +//contacts accounts +$sugar_demodata['last_name_array'] = array( + "Cumberbund", + "Reînhold", + "für Büurigérre", + "Înténåénd", + "Väestörekisterikeskus", + "Elenå", + "あおき", + "オーラム", + "タイロー", + "ノルドウエル", + "ロベルトス", + "上原", + "伊藤", + "吉田", + "土見", + "大空寺", + "天川", + "小林", + "平", + "玉野", + "石橋", + "窪田", + "真田", + "徳川", + "菊地", + "谷山", + "速瀬", + "野島", + "青木", + "香月", + "鳴海", +); + +$sugar_demodata['first_name_array'] = array( + "Johånnes", + "Hénri", + "Marîe", + "Lars", + "Österreich", + "Klaüse", + "Александра", + "Валерия", + "Виктория", + "あゆ", + "クリス", + "クリント", + "さやか", + "ジェイコブ", + "ジョン", + "はるか", + "ひと美", + "まゆ", + "まりこ", + "モトコ", + "ラーズ", + "孝之", + "五郎", + "徹", + "紀章", + "勝昭", + "正二", + "健太", + "敏文", +); + + +$sugar_demodata['company_name_array'] = array( + "Butée Torique", + "Targéte", + "Wally Marté", + "Bünde-Mitte", + "Fabriqué Interationål", + "Életriqué Géneråle", + "Bénellî GMBh", + "реклама", + "Berufskolleg für Elektrotechnik", + "プロダクションG.I.", + "パンダビジュアル", + "A.B.ケアブレインズ", + "株式会社未来商事", +); + + +$sugar_demodata['street_address_array'] = array( + "123 Any Street", + "562 38th Avenue", + "2 Penultimate Loop", + "3 Ôester Ĭsland", + "777 ΩΔΠβκτηηκμ", + "10 Besançon Ave", + "4542 Rue Chambéry", + "678 Rue St. Angoulême", + "三番町1-2-5", + "富士見が丘545", + "北見通り659", + "海岸通り975", + "3丁目2-5", + "金岡町54654", + "多古4678", + "大洲5454", + "海浜幕張4789", + "御茶ノ水647", +); + + +$sugar_demodata['city_array'] = array ( + "Nice", + "Orléans", + "San Francisco", + "Cupertino", + "New York", + "London", + "Moscow", + "Lisbon", + "Böblingen", + "Thüringen", + "中央区", + "京都市", + "ニューヨーク", + "サンフランシスコ", + "ロサンゼルス", + "ロンドン", + "シカゴ", +); + + +//cases demo data +$sugar_demodata['case_seed_names'] = array( + 'プラグが差し込めません', + 'システムが異常に高速に動作中', + 'カスタマイズの支援について', + '追加ライセンスの購入について', + '間違ったブラウザを使用する場合の警告メッセージ' +); +$sugar_demodata['note_seed_names_and_Descriptions'] = array( + array('お客様情報の追加','3,000人のお客様にコンタクトすること'), + array('コール情報','再コールにより電話。いい話になった。'), + array('誕生日','担当者は10月生まれ'), + array('お歳暮','お歳暮は歓迎される。来年のためにリスト化すること。') +); +$sugar_demodata['call_seed_data_names'] = array( + '提案について詳細情報を得ること', + 'メッセージを残した', + '都合が悪いとのこと。掛けなおし', + 'レビュープロセスの討議' +); + + +//titles +$sugar_demodata['titles'] = array( + "President", + "VP Operations", + "VP Sales", + "Director Operations", + "Director Sales", + "Mgr Operations", + "IT Developer", +""); + +//tasks +$sugar_demodata['task_seed_data_names'] = array( + 'Assemble catalogs', + 'Make travel arrangements', + 'Send a letter', + 'Send contract', + 'Send fax', + 'Send a follow-up letter', + 'Send literature', + 'Send proposal', + 'Send quote', + 'Call to schedule meeting', + 'Setup evaluation', + 'Get demo feedback', + 'Arrange introduction', + 'Escalate support request', + 'Close out support request', + 'Ship product', + 'Arrange reference call', + 'Schedule training', + 'Send local user group information', + 'Add to mailing list', +); + +//meetings +$sugar_demodata['meeting_seed_data_names'] = array( + 'Follow-up on proposal', + 'Initial discussion', + 'Review needs', + 'Discuss pricing', + 'Demo', + 'Introduce all players', +); +$sugar_demodata['meeting_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; + +//emails +$sugar_demodata['email_seed_data_subjects'] = array( + 'Follow-up on proposal', + 'Initial discussion', + 'Review needs', + 'Discuss pricing', + 'Demo', + 'Introduce all players', +); +$sugar_demodata['email_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; + +//leads +$sugar_demodata['primary_address_state'] = 'CA'; +$sugar_demodata['billing_address_state']['east'] = 'NY'; +$sugar_demodata['billing_address_state']['west'] = 'CA'; +$sugar_demodata['primary_address_country'] = 'USA'; + +//manufacturers +$sugar_demodata['manufacturer_seed_data_names'] = array( + 'TekkyWare Inc.', + 'Wally\'s Widget World' +); + +//Shippers +$sugar_demodata['shipper_seed_data_names'] = array( + 'FedEx', + 'USPS Ground' +); +//productcategories +$sugar_demodata['category_ext_name'] = ' Widgets'; +$sugar_demodata['product_ext_name'] = ' Gadget'; +$sugar_demodata['productcategory_seed_data_names'] = array( + 'Desktops', + 'Laptops', + 'Stationary Widgets', + 'Wobbly Widgets' +); + +//producttype +$sugar_demodata['producttype_seed_data_names']= array( + 'Widgets', + 'Hardware', + 'Support Contract' +); +//taxrate +$sugar_demodata['taxrate_seed_data'][] = array( + 'name' => '8.25 - Cupertino, CA', + 'value' => '8.25', +); + +$sugar_demodata['currency_seed_data'][] = array( + 'name' => 'Euro', + 'conversion_rate' => 0.9, + 'iso4217' => 'EUR', + 'symbol' => '€', +); + +//producttemplate +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK 1000 Desktop', + 'tax_class' => 'Taxable', + 'cost_price' => 500.00, + 'cost_usdollar' => 500.00, + 'list_price' => 800.00, + 'list_usdollar' => 800.00, + 'discount_price' => 800.00, + 'discount_usdollar' => 800.00, + 'pricing_formula' => 'IsList', + 'mft_part_num' => 'XYZ7890122222', + 'pricing_factor' => '1', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '72', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK 1000 Desktop', + 'tax_class' => 'Taxable', + 'cost_price' => 600.00, + 'cost_usdollar' => 600.00, + 'list_price' => 900.00, + 'list_usdollar' => 900.00, + 'discount_price' => 900.00, + 'discount_usdollar' => 900.00, + 'pricing_formula' => 'IsList', + 'mft_part_num' => 'XYZ7890123456', + 'pricing_factor' => '1', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '65', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK m30 Desktop', + 'tax_class' => 'Taxable', + 'cost_price' => 1300.00, + 'cost_usdollar' => 1300.00, + 'list_price' => 1700.00, + 'list_usdollar' => 1700.00, + 'discount_price' => 1625.00, + 'discount_usdollar' => 1625.00, + 'pricing_formula' => 'ProfitMargin', + 'mft_part_num' => 'ABCD123456890', + 'pricing_factor' => '20', + 'status' => 'Available', + 'weight' => 5.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '12', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'Reflective Mirror Widget', + 'tax_class' => 'Taxable', + 'cost_price' => 200.00, + 'cost_usdollar' => 200.00, + 'list_price' => 325.00, + 'list_usdollar' => 325.00, + 'discount_price' => 266.50, + 'discount_usdollar' => 266.50, + 'pricing_formula' => 'PercentageDiscount', + 'mft_part_num' => '2.0', + 'pricing_factor' => '20', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '65', +); + +$sugar_demodata['contract_seed_data'][] = array( + 'name' => 'IT Tech Support for Moon Base', + 'reference_code' => 'EMP-9802', + 'total_contract_value' => '500600.01', + 'start_date' => '2010-05-15', + 'end_date' => '2020-05-15', + 'company_signed_date' => '2010-03-15', + 'customer_signed_date' => '2010-03-16', + 'description' => 'This is a sub-contract for a very large, very hush-hush project on the moon of Endor.', +); + +$sugar_demodata['contract_seed_data'][] = array( + 'name' => 'Ion Engines for Empire', + 'reference_code' => 'EMP-7277', + 'total_contract_value' => '333444.34', + 'start_date' => '2010-05-15', + 'end_date' => '2020-05-15', + 'company_signed_date' => '2010-03-15', + 'customer_signed_date' => '2010-03-16', + 'description' => 'In competition with Sienar Fleet Systems for this one.', +); + +$sugar_demodata['project_seed_data']['audit'] = array( + 'name' => 'Create new project plan for audit', + 'description' => 'Annual audit coming up next month.', + 'estimated_start_date' => '2007-11-01', + 'estimated_end_date' => '2007-12-31', + 'status' => 'Draft', + 'priority' => 'medium', +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Communicate to stakeholders', + 'date_start' => '2007/11/1', + 'date_finish' => '2007/11/8', + 'description' => 'Schedule individual meetings with Will, Max, and Sarah.', + 'duration' => '6', + 'duration_unit' => 'Days', + 'percent_complete' => 100, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Create draft of the plan', + 'date_start' => '2007/11/5', + 'date_finish' => '2007/11/20', + 'description' => 'Schedule individual meetings with Will, Max, and Sarah.', + 'duration' => '12', + 'duration_unit' => 'Days', + 'percent_complete' => 38, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Field work for collecting data.', + 'date_start' => '2007/11/5', + 'date_finish' => '2007/11/13', + 'description' => 'We need to get approval from all stakeholders on the plan', + 'duration' => '17', + 'duration_unit' => 'Days', + 'percent_complete' => 75, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Create draft of the plan', + 'date_start' => '2007/11/12', + 'date_finish' => '2007/11/19', + 'description' => 'Schedule the meeting with the head of business units to solicit help.', + 'duration' => '6', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Gather data from meetings', + 'date_start' => '2007/11/20', + 'date_finish' => '2007/11/20', + 'description' => 'Need to organize the data and put it in the right spreadsheet.', + 'duration' => '1', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); + +?> \ No newline at end of file diff --git a/demoData.zh_cn.php b/demoData.zh_cn.php new file mode 100644 index 00000000..eeffd65a --- /dev/null +++ b/demoData.zh_cn.php @@ -0,0 +1,880 @@ + 'seed_jim_id', + 'last_name' => '金', + 'first_name' => '丽', + 'user_name' => 'jim', + 'title' => '销售副总', + 'is_admin' => false, + 'reports_to' => null, + 'reports_to_name' => null, + 'email' => 'jim@example.com' +); + +//west team +$sugar_demodata['users'][] = array( + 'id' => 'seed_sarah_id', + 'last_name' => '韩', + 'first_name' => '云', + 'user_name' => 'sarah', + 'title' => '西区销售经理', + 'is_admin' => false, + 'reports_to' => 'seed_jim_id', + 'reports_to_name' => '金, 丽', + 'email' => 'sarah@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_sally_id', + 'last_name' => '王', + 'first_name' => '欣', + 'user_name' => 'sally', + 'title' => '资深销售代表', + 'is_admin' => false, + 'reports_to' => 'seed_sarah_id', + 'reports_to_name' => '韩, 云', + 'email' => 'sally@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_max_id', + 'last_name' => '马', + 'first_name' => '建军', + 'user_name' => 'max', + 'title' => '资深销售代表', + 'is_admin' => false, + 'reports_to' => 'seed_sarah_id', + 'reports_to_name' => '韩, 云', + 'email' => 'tom@example.com' +); + +//east team +$sugar_demodata['users'][] = array( + 'id' => 'seed_will_id', + 'last_name' => '王', + 'first_name' => '伟', + 'user_name' => 'will', + 'title' => '东区销售经理', + 'is_admin' => false, + 'reports_to' => 'seed_jim_id', + 'reports_to_name' => '金, 丽', + 'email' => 'will@example.com' +); + +$sugar_demodata['users'][] = array( + 'id' => 'seed_chris_id', + 'last_name' => '徐', + 'first_name' => '健', + 'user_name' => 'chris', + 'title' => '资深销售代表', + 'is_admin' => false, + 'reports_to' => 'seed_will_id', + 'reports_to_name' => '王, 伟', + 'email' => 'chris@example.com' +); + + +//teams demodata +$sugar_demodata['teams'][] = array( + 'name' => '东区', + 'description' => '东区团队', + 'team_id' => 'East', +); + +$sugar_demodata['teams'][] = array( + 'name' => '西区', + 'description' => '西区团队', + 'team_id' => 'West', +); + +//contacts accounts +$sugar_demodata['first_name_array'] = array( + "伟", + "刚", + "勇", + "毅", + "俊", + "峰", + "强", + "军", + "平", + "保", + "东", + "文", + "辉", + "力", + "明", + "永", + "健", + "世", + "广", + "志", + "义", + "兴", + "良", + "海", + "山", + "仁", + "波", + "宁", + "贵", + "福", + "生", + "龙", + "元", + "全", + "国", + "胜", + "学", + "祥", + "才", + "发", + "武", + "新", + "利", + "清", + "飞", + "彬", + "富", + "顺", + "信", + "子", + "杰", + "涛", + "昌", + "成", + "康", + "星", + "光", + "天", + "达", + "安", + "岩", + "中", + "茂", + "进", + "林", + "有", + "坚", + "和", + "彪", + "博", + "诚", + "先", + "敬", + "震", + "振", + "壮", + "会", + "思", + "群", + "豪", + "心", + "邦", + "承", + "乐", + "绍", + "功", + "松", + "善", + "厚", + "庆", + "磊", + "民", + "友", + "裕", + "河", + "哲", + "江", + "超", + "浩", + "亮", + "政", + "谦", + "亨", + "奇", + "固", + "之", + "轮", + "翰", + "朗", + "伯", + "宏", + "言", + "若", + "鸣", + "朋", + "斌", + "梁", + "栋", + "维", + "启", + "克", + "伦", + "翔", + "旭", + "鹏", + "泽", + "晨", + "辰", + "士", + "以", + "建", + "家", + "致", + "树", + "炎", + "德", + "行", + "时", + "泰", + "盛", + "雄", + "琛", + "钧", + "冠", + "策", + "腾", + "楠", + "榕", + "风", + "航", + "弘", + "秀", + "娟", + "英", + "华", + "慧", + "巧", + "美", + "娜", + "静", + "淑", + "惠", + "珠", + "翠", + "雅", + "芝", + "玉", + "萍", + "红", + "娥", + "玲", + "芬", + "芳", + "燕", + "彩", + "春", + "菊", + "兰", + "凤", + "洁", + "梅", + "琳", + "素", + "云", + "莲", + "真", + "环", + "雪", + "荣", + "爱", + "妹", + "霞", + "香", + "月", + "莺", + "媛", + "艳", + "瑞", + "凡", + "佳", + "嘉", + "琼", + "勤", + "珍", + "贞", + "莉", + "桂", + "娣", + "叶", + "璧", + "璐", + "娅", + "琦", + "晶", + "妍", + "茜", + "秋", + "珊", + "莎", + "锦", + "黛", + "青", + "倩", + "婷", + "姣", + "婉", + "娴", + "瑾", + "颖", + "露", + "瑶", + "怡", + "婵", + "雁", + "蓓", + "纨", + "仪", + "荷", + "丹", + "蓉", + "眉", + "君", + "琴", + "蕊", + "薇", + "菁", + "梦", + "岚", + "苑", + "婕", + "馨", + "瑗", + "琰", + "韵", + "融", + "园", + "艺", + "咏", + "卿", + "聪", + "澜", + "纯", + "毓", + "悦", + "昭", + "冰", + "爽", + "琬", + "茗", + "羽", + "希", + "宁", + "欣", + "飘", + "育", + "滢", + "馥", + "筠", + "柔", + "竹", + "霭", + "凝", + "晓", + "欢", + "霄", + "枫", + "芸", + "菲", + "寒", + "伊", + "亚", + "宜", + "可", + "姬", + "舒", + "影", + "荔", + "枝", + "思", + "丽 ", +); + +$sugar_demodata['last_name_array'] = array( + "李", + "王", + "张", + "刘", + "陈", + "杨", + "赵", + "黄", + "周", + "吴", + "徐", + "孙", + "胡", + "朱", + "高", + "林", + "何", + "郭", + "马", + "罗", + "梁", + "宋", + "郑", + "谢", + "韩", + "唐", + "冯", + "于", + "董", + "肖", + "程", + "曹", + "袁", + "邓", + "许", + "傅", + "沈", + "曾", + "彭", + "吕", + "苏", + "卢", + "蒋", + "蔡", + "贾", + "丁", + "魏", + "薛", + "叶", + "阎", + "余", + "潘", + "杜", + "戴", + "夏", + "钟", + "田", + "任", + "姜", + "范", + "方", + "石", + "姚", + "谭", + "廖", + "邹", + "熊", + "金", + "陆", + "郝", + "孔", + "白", + "崔", + "康", + "毛", + "邱", + "秦", + "江", + "史", + "顾", + "邵", + "候", + "孟", + "龙", + "万", + "段", + "雷", + "钱", + "汤", + "尹", + "黎", + "易", + "武", + "乔", + "贺", + "赖", + "龚", + "文", +); + + +$sugar_demodata['company_name_array'] = array( + "华新书局", + "北京阳光友谊商城", + "国际华侨大厦", + "上海联合汽车", + "出口信贷保险公司", + "中青宾馆", + "中国联合影业公司", + "中国糖果银行", + "世格软件", + "山东通用机械厂", + "青岛造船厂", + "东方科学仪器公司", + "海青航运公司", + "联合石油公司", + "长江集装箱海运公司", +); + + +$sugar_demodata['street_address_array'] = array( + "中山路75号", + "中山环路345号", + "湖南路99号", + "南京东路234号", + "淮海西路22号", + "居里路865号", + "北京东路789号", + "太平路827号", + "五棵松路324号", + "长寿路545", + "和平路659", + "永福路975", + "一德路3号2-5", + "珠江路54号6楼F", + "上海路46号7楼", + "中山二路1454号", + "连胜路47号8楼", + "文园路647号", +); + + +$sugar_demodata['city_array'] = array ( + "上海", + "北京", + "西安", + "南昌", + "苏州", + "杭州", + "南京", + "天津", + "海口", + "青岛", + "大连", + "广州", + "济南", + "太原", + "长沙", + "武汉", + "厦门", +); + + +//cases demo data +$sugar_demodata['case_seed_names'] = array( + '集成的问题', + '系统太快了', + '很多地方需要定制', + '我要购买序列号', + '用Firefox时错误的消息提示' +); +$sugar_demodata['note_seed_names_and_Descriptions'] = array( + array('更多客户信息','300多个潜在客户'), + array('电话信息','我们有个电话,看上去不错'), + array('生日信息','出生于10月'), + array('节日礼物','节日礼物非常棒,放在列表中以备以后选择') +); +$sugar_demodata['call_seed_data_names'] = array( + '获得更多的信息', + '留个口信', + '感觉不好,继续联系', + '讨论工作流程' +); + +//titles +$sugar_demodata['titles'] = array( + "董事长", + "业务副总裁", + "销售副总裁", + "业务总监", + "销售总监", + "业务经理", + "软件开发工程师", +""); + +//tasks +$sugar_demodata['task_seed_data_names'] = array( + '整理产品目录', + '安排行程', + '发送邮件', + '发送合同', + '传真', + '发送跟踪邮件', + '发送资料', + '投标', + '发送报价', + '安排会议', + '评估', + '获得样品反馈', + '安排介绍', + '提供技术支持', + '结束技术支持', + '海运产品', + '安排培训', + '发送本地用户组信息', + '添加至邮件列表', +); + +//meetings +$sugar_demodata['meeting_seed_data_names'] = array( + '报价的后续行动', + '初次讨论', + '审查需求', + '讨论报价', + '演示', + '介绍成员', +); +$sugar_demodata['meeting_seed_data_descriptions'] = '讨论项目的计划以及罗列实施的细节'; + + +//emails +$sugar_demodata['email_seed_data_subjects'] = array( + '报价的后续行动', + '初次讨论', + '审查需求', + '讨论报价', + '演示', + '介绍成员', +); +$sugar_demodata['email_seed_data_descriptions'] = '讨论项目的计划以及罗列实施的细节'; + +//leads +$sugar_demodata['primary_address_state'] = '上海'; +$sugar_demodata['billing_address_state']['east'] = '上海'; +$sugar_demodata['billing_address_state']['west'] = '昆明'; +$sugar_demodata['primary_address_country'] = '中国'; + +//manufacturers +$sugar_demodata['manufacturer_seed_data_names'] = array( + '塔奇克玩具有限公司', + '华仪配件制造有限公司', +); + +//Shippers +$sugar_demodata['shipper_seed_data_names'] = array( + 'FedEx', + 'USPS Ground' +); +//productcategories +$sugar_demodata['category_ext_name'] = '氏系列产品'; +$sugar_demodata['product_ext_name'] = '氏小配件'; + +$sugar_demodata['productcategory_seed_data_names'] = array( + '台式机', + '笔记本', + '紧固件', + '其他配件' +); + +//producttype +$sugar_demodata['producttype_seed_data_names']= array( + '其他配件', + '硬件', + '技术支持合同' +); +//taxrate +$sugar_demodata['taxrate_seed_data'][] = array( + 'name' => '增值税', + 'value' => '17', +); + +$sugar_demodata['currency_seed_data'][] = array( + 'name' => 'USD', + 'conversion_rate' => 0.146, + 'iso4217' => 'USD', + 'symbol' => '$', +); + +//producttemplate +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK 1000 台式机', + 'tax_class' => 'Taxable', + 'cost_price' => 500.00, + 'cost_usdollar' => 500.00, + 'list_price' => 800.00, + 'list_usdollar' => 800.00, + 'discount_price' => 800.00, + 'discount_usdollar' => 800.00, + 'pricing_formula' => 'IsList', + 'mft_part_num' => 'XYZ7890122222', + 'pricing_factor' => '1', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '72', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK 1000 台式机', + 'tax_class' => 'Taxable', + 'cost_price' => 600.00, + 'cost_usdollar' => 600.00, + 'list_price' => 900.00, + 'list_usdollar' => 900.00, + 'discount_price' => 900.00, + 'discount_usdollar' => 900.00, + 'pricing_formula' => 'IsList', + 'mft_part_num' => 'XYZ7890123456', + 'pricing_factor' => '1', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '65', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => 'TK m30 台式机', + 'tax_class' => 'Taxable', + 'cost_price' => 1300.00, + 'cost_usdollar' => 1300.00, + 'list_price' => 1700.00, + 'list_usdollar' => 1700.00, + 'discount_price' => 1625.00, + 'discount_usdollar' => 1625.00, + 'pricing_formula' => 'ProfitMargin', + 'mft_part_num' => 'ABCD123456890', + 'pricing_factor' => '20', + 'status' => 'Available', + 'weight' => 5.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '12', +); + +$sugar_demodata['producttemplate_seed_data'][] = array( + 'name' => '反射镜组件', + 'tax_class' => 'Taxable', + 'cost_price' => 200.00, + 'cost_usdollar' => 200.00, + 'list_price' => 325.00, + 'list_usdollar' => 325.00, + 'discount_price' => 266.50, + 'discount_usdollar' => 266.50, + 'pricing_formula' => 'PercentageDiscount', + 'mft_part_num' => '2.0', + 'pricing_factor' => '20', + 'status' => 'Available', + 'weight' => 20.0, + 'date_available' => '2004-10-15', + 'qty_in_stock' => '65', +); + +$sugar_demodata['contract_seed_data'][] = array( + 'name' => '给月球基地的IT技术支持', + 'reference_code' => 'EMP-9802', + 'total_contract_value' => '500600.01', + 'start_date' => '2010-05-15', + 'end_date' => '2020-05-15', + 'company_signed_date' => '2010-03-15', + 'customer_signed_date' => '2010-03-16', + 'description' => '在月球基地上进行的秘密项目', +); + +$sugar_demodata['contract_seed_data'][] = array( + 'name' => '离子发动机', + 'reference_code' => 'EMP-7277', + 'total_contract_value' => '333444.34', + 'start_date' => '2010-05-15', + 'end_date' => '2020-05-15', + 'company_signed_date' => '2010-03-15', + 'customer_signed_date' => '2010-03-16', + 'description' => '应用于深空973号探测器', +); + +$sugar_demodata['project_seed_data']['audit'] = array( + 'name' => '为审计所创建的项目', + 'description' => '六月份的年审', + 'estimated_start_date' => '2007-11-01', + 'estimated_end_date' => '2007-12-31', + 'status' => 'Draft', + 'priority' => 'medium', +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => '和股东进行沟通', + 'date_start' => '2007/11/1', + 'date_finish' => '2007/11/8', + 'description' => '与马东和刘伟单独会面', + 'duration' => '6', + 'duration_unit' => 'Days', + 'percent_complete' => 100, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => '创建计划草案', + 'date_start' => '2007/11/5', + 'date_finish' => '2007/11/20', + 'description' => '与马东和刘伟单独会面', + 'duration' => '12', + 'duration_unit' => 'Days', + 'percent_complete' => 38, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => '外勤工作收集数据', + 'date_start' => '2007/11/5', + 'date_finish' => '2007/11/13', + 'description' => '我们需要获得股东的支持', + 'duration' => '17', + 'duration_unit' => 'Days', + 'percent_complete' => 75, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => '创建计划草案', + 'date_start' => '2007/11/12', + 'date_finish' => '2007/11/19', + 'description' => 'Schedule the meeting with the head of business units to solicit help.', + 'duration' => '6', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); + +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => '收集会议资料', + 'date_start' => '2007/11/20', + 'date_finish' => '2007/11/20', + 'description' => '收集组织会议资料并归档', + 'duration' => '1', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); + + +?> diff --git a/download.php b/download.php index e7ef57f6..d96235ca 100644 --- a/download.php +++ b/download.php @@ -36,8 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -global $db; - if(empty($_REQUEST['id']) || empty($_REQUEST['type']) || !isset($_SESSION['authenticated_user_id'])) { die("Not a Valid Entry Point"); } @@ -51,7 +49,7 @@ else { if(!isset($_REQUEST['isTempFile'])) { //Custom modules may have capilizations anywhere in thier names. We should check the passed in format first. require('include/modules.php'); - $module = $db->quote($_REQUEST['type']); + $module = $_REQUEST['type']; $file_type = strtolower($_REQUEST['type']); if(empty($beanList[$module])) { //start guessing at a module name @@ -70,39 +68,7 @@ else { if(!$focus->ACLAccess('view')){ die($mod_strings['LBL_NO_ACCESS']); } // if - - // Pull up the document revision, if it's of type Document - if ( isset($focus->object_name) && $focus->object_name == 'Document' ) { - // It's a document, get the revision that really stores this file - $focusRevision = new DocumentRevision(); - $focusRevision->retrieve($_REQUEST['id']); - - if ( empty($focusRevision->id) ) { - // This wasn't a document revision id, it's probably actually a document id, we need to grab that, get the latest revision and use that - $focusDocument = new Document(); - $focusDocument->retrieve($_REQUEST['id']); - - $focusRevision->retrieve($focusDocument->document_revision_id); - - if ( !empty($focusRevision->id) ) { - $_REQUEST['id'] = $focusRevision->id; - } - } - } - - // See if it is a remote file, if so, send them that direction - if ( isset($focus->doc_url) && !empty($focus->doc_url) ) { - header('Location: '.$focus->doc_url); - sugar_die(); - } - - if ( isset($focusRevision) && isset($focusRevision->doc_url) && !empty($focusRevision->doc_url) ) { - header('Location: '.$focusRevision->doc_url); - sugar_die(); - } - } // if - $local_location = (isset($_REQUEST['isTempFile'])) ? "{$GLOBALS['sugar_config']['cache_dir']}/modules/Emails/{$_REQUEST['ieId']}/attachments/{$_REQUEST['id']}" : $GLOBALS['sugar_config']['upload_dir']."/".$_REQUEST['id']; @@ -119,16 +85,16 @@ else { if($file_type == 'documents') { // cn: bug 9674 document_revisions table has no 'name' column. $query = "SELECT filename name FROM document_revisions INNER JOIN documents ON documents.id = document_revisions.document_id "; - $query .= "WHERE document_revisions.id = '".$db->quote($_REQUEST['id'])."' "; + $query .= "WHERE document_revisions.id = '" . $_REQUEST['id'] ."'"; } elseif($file_type == 'kbdocuments') { $query="SELECT document_revisions.filename name FROM document_revisions INNER JOIN kbdocument_revisions ON document_revisions.id = kbdocument_revisions.document_revision_id INNER JOIN kbdocuments ON kbdocument_revisions.kbdocument_id = kbdocuments.id "; - $query .= "WHERE document_revisions.id = '" . $db->quote($_REQUEST['id']) ."'"; + $query .= "WHERE document_revisions.id = '" . $_REQUEST['id'] ."'"; } elseif($file_type == 'notes') { $query = "SELECT filename name FROM notes "; - $query .= "WHERE notes.id = '" . $db->quote($_REQUEST['id']) ."'"; + $query .= "WHERE notes.id = '" . $_REQUEST['id'] ."'"; } elseif( !isset($_REQUEST['isTempFile']) && !isset($_REQUEST['tempName'] ) && isset($_REQUEST['type']) && $file_type!='temp' ){ //make sure not email temp file. $query = "SELECT filename name FROM ". $file_type ." "; - $query .= "WHERE ". $file_type .".id= '".$db->quote($_REQUEST['id'])."'"; + $query .= "WHERE ". $file_type .".id= '".$_REQUEST['id']."'"; }elseif( $file_type == 'temp'){ $doQuery = false; } diff --git a/examples/SoapTest.php b/examples/SoapTest.php index dd347ba2..f5600c9a 100644 --- a/examples/SoapTest.php +++ b/examples/SoapTest.php @@ -59,8 +59,8 @@ if(isset($_REQUEST['offset'])){ $offset = $_REQUEST['offset'] + 20; echo $offset; } -require_once('include/nusoap/nusoap.php'); //must also have the nusoap code on the ClientSide. -$soapclient = new nusoapclient($GLOBALS['sugar_config']['site_url'].'/soap.php'); //define the SOAP Client an +require_once('../include/nusoap/nusoap.php'); //must also have the nusoap code on the ClientSide. +$soapclient = new nusoapclient('http://localhost/sugarcrm/soap.php'); //define the SOAP Client an echo 'LOGIN:
'; $result = $soapclient->call('login',array('user_auth'=>array('user_name'=>$user_name,'password'=>md5($user_password), 'version'=>'.01'), 'application_name'=>'SoapTest')); diff --git a/examples/SoapTestPortal2.php b/examples/SoapTestPortal2.php index 2ae5e136..2f60e519 100644 --- a/examples/SoapTestPortal2.php +++ b/examples/SoapTestPortal2.php @@ -60,8 +60,8 @@ echo <<LOGIN:
'; $result = $soapclient->call('portal_login',array('portal_auth'=>array('user_name'=>$portal_name,'password'=>$portal_password, 'version'=>'.01'),'user_name'=>$user_name, 'application_name'=>'SoapTestPortal')); diff --git a/export.php b/export.php index ecce4584..86eef6b0 100644 --- a/export.php +++ b/export.php @@ -46,15 +46,15 @@ global $current_user; $the_module = clean_string($_REQUEST['module']); -if($sugar_config['disable_export'] || (!empty($sugar_config['admin_export_only']) && !(is_admin($current_user) || (ACLController::moduleSupportsACL($the_module) && ACLAction::getUserAccessLevel($current_user->id,$the_module, 'access') == ACL_ALLOW_ENABLED && +if($sugar_config['disable_export'] || (!empty($sugar_config['admin_export_only']) && !(is_admin($current_user) || (ACLController::moduleSupportsACL($the_module) && ACLAction::getUserAccessLevel($current_user->id,$the_module, 'access') == ACL_ALLOW_ENABLED && (ACLAction::getUserAccessLevel($current_user->id, $the_module, 'admin') == ACL_ALLOW_ADMIN || ACLAction::getUserAccessLevel($current_user->id, $the_module, 'admin') == ACL_ALLOW_ADMIN_DEV))))){ die($GLOBALS['app_strings']['ERR_EXPORT_DISABLED']); } -if(!empty($_REQUEST['uid'])){ +if(!empty($_REQUEST['uid'])){ $content = export(clean_string($_REQUEST['module']), $_REQUEST['uid'], isset($_REQUEST['members']) ? $_REQUEST['members'] : false); -}else{ +}else{ $content = export(clean_string($_REQUEST['module'])); } $filename = $_REQUEST['module']; @@ -68,7 +68,7 @@ header("Content-type: application/octet-stream; charset=".$GLOBALS['locale']->ge header("Content-Disposition: attachment; filename={$filename}.csv"); header("Content-transfer-encoding: binary"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); -header("Last-Modified: " . TimeDate::httpTime() ); +header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); header("Cache-Control: post-check=0, pre-check=0", false ); header("Content-Length: ".strlen($content)); diff --git a/files.md5 b/files.md5 index 3005a4f5..c2c8a631 100644 --- a/files.md5 +++ b/files.md5 @@ -1,18 +1,15 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', './config.php' => 'd41d8cd98f00b204e9800998ecf8427e', + './demoData.zh_cn.php' => '7313f235fbb7391c4bffbd873ab98e54', + './demoData.ja_jp.php' => 'd46f98ad87821eb4bf2c20b4cd823aea', + './demoData.en_us.php' => 'f8552e99aa6b0d5190ed84a5b2e347eb', './vcal_server.php' => '71af6a5b63afd073c3b9f54346072ef2', './vCard.php' => 'fad02d68a8a43a6498ecd71b9edc8e90', './themes/default/js/style.js' => 'de82df7a57a937110f3fa1ed85e752bb', - './themes/default/images/start_meeting_inline.png' => '64eff1bab8d34659c583ca84ce36dd2a', - './themes/default/images/join_meeting_inline.png' => 'edf7837b58451bbfb4e9e827d9a13a22', - './themes/default/images/join_imeeting.gif' => 'efd4a8747417083048b1a256d1d715cd', - './themes/default/images/create-record.gif' => '26aa1d757ecdaa1f886cd2bfb24eddd5', - './themes/default/images/chartBg.png' => 'b2688aa9e2154d8f6c25fc16f94bf6e7', - './themes/default/images/backtotop.gif' => '81711b80ed00519d3c474f5e6cb76062', './themes/default/images/yes.gif' => '5d3f887e0dbcd70a4708534be3bfa41a', './themes/default/images/yellow_camp.gif' => '593075b0d0f3dca3343e500f0bc1b4f7', './themes/default/images/xls_image_inline.gif' => 'e68c72edc63f0f8ab22a9b2cd49909c4', @@ -37,7 +34,7 @@ $md5_string = array ( './themes/default/images/sugar_icon.png' => '8a98242f1aae07923bf0c7289405b93b', './themes/default/images/sugar_icon.ico' => '92f1ffd4b2fef157613e48d2d2c7d9c8', './themes/default/images/sugar_document.png' => '649eeaf6da95e66caa7f961a25995e65', - './themes/default/images/sugarColors.xml' => 'b62043bbf28f32ef441238580ef6cc8a', + './themes/default/images/sugarColors.xml' => '137a74bdecb9f1ce174bf1bd38a66b12', './themes/default/images/sugar-yui-sprites-grey.png' => '25009499774224ae1f35d19cd65df6a6', './themes/default/images/studio_undo.gif' => 'a8e4ca30f12eb152391782ebc1519264', './themes/default/images/studio_save.gif' => '9a879acb70dda07e06e7719461ac7fe4', @@ -182,7 +179,7 @@ $md5_string = array ( './themes/default/images/icon_Subpanels.gif' => '99b9a4c23b9d4d52c80db23b65241032', './themes/default/images/icon_Studio.gif' => '6cff1d99350160b388f5a1ac529c3ff9', './themes/default/images/icon_ShortcutBar.gif' => '4dd63de4f48c7600a9b463d579cadcb9', - './themes/default/images/icon_SearchForm.gif' => '9246e8668eb71fd1e2ebd20b6cb60ba1', + './themes/default/images/icon_SearchForm.gif' => 'fcbf9df82c578b11af82847150f9fe40', './themes/default/images/icon_SPUploadCSS.gif' => 'd912a8d76735acc061b566c950976995', './themes/default/images/icon_SPSync.gif' => 'bc384598e25a00faa9e2efd942b357a0', './themes/default/images/icon_Rss_32.gif' => 'adf9e9567964a6faf01005e83051d974', @@ -589,18 +586,18 @@ $md5_string = array ( './themes/default/css/deprecated.css' => '13f41876c3a31bde4ac2e1223bdd707c', './themes/default/css/chart.css' => 'dda00a834e88692f3d08bec70db12dc9', './themes/Sugar5/tpls/header.tpl' => 'a0fba0213a34dccdb5d6e1abafb8525c', - './themes/Sugar5/tpls/footer.tpl' => '7add32de99b51b0cd85086f95ad9ee6e', + './themes/Sugar5/tpls/footer.tpl' => 'f9d61274e09fb3c28b2ea8c8910cf8f5', './themes/Sugar5/tpls/_welcome.tpl' => 'fcf6220c8e3e3c9549e86e4082354ac2', './themes/Sugar5/tpls/_headerShortcuts.tpl' => 'b43780c04a2874ee1768845932567b0e', './themes/Sugar5/tpls/_headerSearch.tpl' => 'a4cd3c3b074d6f21d5bf2d20f2fae0ea', - './themes/Sugar5/tpls/_headerModuleList.tpl' => '2b3d435b2932dad411769c74bc7ca101', + './themes/Sugar5/tpls/_headerModuleList.tpl' => 'b3df18ceeeeeb77c89dc949022477c7d', './themes/Sugar5/tpls/_headerLastViewed.tpl' => 'cf8948eaee2c34049ab4b6d9b2e6ffb9', - './themes/Sugar5/tpls/_head.tpl' => '7f87d71644325839a9d490d9284e6674', + './themes/Sugar5/tpls/_head.tpl' => 'fa4d73d71a62a4ea28ea0e42c4669321', './themes/Sugar5/tpls/_globalLinks.tpl' => 'b8d95ed6b2227a463c08f0164816a1f4', './themes/Sugar5/tpls/_companyLogo.tpl' => 'a3d2e1addc77f8715213e07f94117075', - './themes/Sugar5/themedef.php' => 'b3b0e75757b82719cf012af93901dddf', + './themes/Sugar5/themedef.php' => 'a2a49ed8172850902248ba51338b5297', './themes/Sugar5/layout_utils.php' => '68fa4045b1668a3d24cc4482f9e25ba9', - './themes/Sugar5/js/style.js' => '16dcc22d1ca9a072fa6d267acf5765e9', + './themes/Sugar5/js/style.js' => 'f21dd02f5d005b357f10b70142e06637', './themes/Sugar5/images/yes.gif' => '5d3f887e0dbcd70a4708534be3bfa41a', './themes/Sugar5/images/yellow_camp.gif' => '593075b0d0f3dca3343e500f0bc1b4f7', './themes/Sugar5/images/xls_image_inline.gif' => 'e68c72edc63f0f8ab22a9b2cd49909c4', @@ -626,7 +623,7 @@ $md5_string = array ( './themes/Sugar5/images/sugar_icon.png' => '8a98242f1aae07923bf0c7289405b93b', './themes/Sugar5/images/sugar_icon.ico' => '92f1ffd4b2fef157613e48d2d2c7d9c8', './themes/Sugar5/images/sugar_document.png' => '649eeaf6da95e66caa7f961a25995e65', - './themes/Sugar5/images/sugarColors.xml' => 'cf9d69837a95f6167f126bf18d785884', + './themes/Sugar5/images/sugarColors.xml' => '137a74bdecb9f1ce174bf1bd38a66b12', './themes/Sugar5/images/sugar-yui-sprites.png' => '79e1cc79ea3c01d3a7a3ad8c96de34ec', './themes/Sugar5/images/sugar-yui-sprites-red.png' => '428926f9a17edbc9fbb714478803e6e4', './themes/Sugar5/images/sugar-yui-sprites-purple.png' => 'cc60edba84b9b93804eab9ad3775b357', @@ -761,7 +758,7 @@ $md5_string = array ( './themes/Sugar5/images/icon_SugarFeed.gif' => 'c121b4f625c494d54a7c6e60a7159e73', './themes/Sugar5/images/icon_Subpanels.gif' => '99b9a4c23b9d4d52c80db23b65241032', './themes/Sugar5/images/icon_Studio.gif' => '6cff1d99350160b388f5a1ac529c3ff9', - './themes/Sugar5/images/icon_SearchForm.gif' => '9246e8668eb71fd1e2ebd20b6cb60ba1', + './themes/Sugar5/images/icon_SearchForm.gif' => 'fcbf9df82c578b11af82847150f9fe40', './themes/Sugar5/images/icon_SPUploadCSS.gif' => 'd912a8d76735acc061b566c950976995', './themes/Sugar5/images/icon_SPSync.gif' => 'bc384598e25a00faa9e2efd942b357a0', './themes/Sugar5/images/icon_Rss_32.gif' => 'adf9e9567964a6faf01005e83051d974', @@ -1164,44 +1161,34 @@ $md5_string = array ( './themes/Sugar5/images/Accounts.gif' => 'e081de07d0263b270d0d306642375901', './themes/Sugar5/images/AccountReports.gif' => 'c98b4b2eb32be534f8fc1b2ac29fa1a2', './themes/Sugar5/images/ACLRoles.gif' => 'dcbf376b885458b1fc8c21de7884284e', - './themes/Sugar5/css/yui.css' => 'ab561cd401d774311653f92ff8336fbe', + './themes/Sugar5/css/yui.css' => 'd8e557f22d43924c57c8ec0d9e26620a', './themes/Sugar5/css/wizard.css' => '9f23702bef6e6bce98959a25f3e0f71e', - './themes/Sugar5/css/style.css' => '9cda0e41dc2769e0a2825736bed40d1b', + './themes/Sugar5/css/style.css' => 'da008a358211b18615c476155b2cebc8', './themes/Sugar5/css/print.css' => '629df961f98baab29b4530b56322a1ca', './themes/Sugar5/css/deprecated.css' => '13f41876c3a31bde4ac2e1223bdd707c', './themes/Sugar5/css/chart.css' => 'dda00a834e88692f3d08bec70db12dc9', - './sugar_version.php' => 'ed78e48cba51ae74974d05f0379824b1', + './sugar_version.php' => 'c584b555cb9a33c08d84f23f8215a621', './soap/SoapTypes.php' => 'b44fab9d2a11ee705798529a17ccd24e', - './soap/SoapSugarUsers.php' => '64195c9cdca985b78adaba2860f07f41', + './soap/SoapSugarUsers.php' => '5e65b5fc02625c7dedddb9d3aa21f838', './soap/SoapStudio.php' => '08ff60f88df7da98b081a199510858f8', './soap/SoapRelationshipHelper.php' => 'b2411195c28a0d05418ec95d7fc85c3d', - './soap/SoapPortalUsers.php' => '3e76580fb0d3f0754ec120ff93c2db85', - './soap/SoapPortalHelper.php' => '9151ef0312f56b2525b86082f5c102ca', - './soap/SoapHelperFunctions.php' => '9bb410a2431677d69c68165723ad79f7', + './soap/SoapPortalUsers.php' => 'a674ef3037747a35d36e64408f53b978', + './soap/SoapPortalHelper.php' => '6f4afabc66b71bcee5674505d9bae79c', + './soap/SoapHelperFunctions.php' => '5283070bee35305295da11c852598f9e', './soap/SoapErrorDefinitions.php' => 'f39459659519912f55b559e49acdd20b', './soap/SoapError.php' => 'd6440fe460e7a9f163e5f98ff6dd1157', - './soap/SoapDeprecated.php' => '4f7f3984799fea00f3075dba57b41a64', + './soap/SoapDeprecated.php' => 'b5aa9cc5ffd54346bc291c8597c4f081', './soap/SoapData.php' => '1daea86416c5b9706c6ec200704b6c8b', './soap.php' => '453ea7dc02b44113fab1f37dd203548a', - './service/v4/soap.php' => '270ed42705d7933e84e0032c4b8fd8ec', - './service/v4/rest.php' => 'f429b2a67d4f5a9302d9169d911da967', - './service/v4/registry.php' => '5eed51c9ea2ec836de9ccabfca13c11d', - './service/v4/SugarWebServiceUtilv4.php' => '3ac21d9fc5585eeba6946fce19df0f01', - './service/v4/SugarWebServiceImplv4.php' => 'c7e8d34adebb4d3c72ff2ef9133bcc18', - './service/v3_1/soap.php' => '1ba337904cc10a3ad9f1609fe14f6ae5', - './service/v3_1/rest.php' => '6ddcf6a263f3e87870155fe66e5cad42', - './service/v3_1/registry.php' => 'cf3ca508bdeef0dbcc53759fa0e4bcd2', - './service/v3_1/SugarWebServiceUtilv3_1.php' => 'da3bb6ef58bae317f5b18e0e07995be0', - './service/v3_1/SugarWebServiceImplv3_1.php' => 'fe73eec4f57dcaafb5e087281caf294e', './service/v3/soap.php' => '38149ba3c4bc6f68ed38e10d0a341799', './service/v3/rest.php' => '00cc4ae016b5fbc9506470e2bd84b92b', './service/v3/registry.php' => '775fd364c36a0e8ef151219ca0f03a8a', - './service/v3/SugarWebServiceUtilv3.php' => '59cec45e51367ab7974e35daf8106825', - './service/v3/SugarWebServiceImplv3.php' => '184093d1ea9d03dd4736a3f0885250c5', + './service/v3/SugarWebServiceUtilv3.php' => 'b7685665d35e78d29f302093a7828201', + './service/v3/SugarWebServiceImplv3.php' => '13ee49bc59bb56f35ab459f08fb98ef7', './service/v2_1/soap.php' => '51d80264bab2b10b0cf07b1fa232f5a2', './service/v2_1/rest.php' => '97716eb170c494d20f4424b851b7ed82', './service/v2_1/registry.php' => '44dced209606f86f712792d06a7488f3', - './service/v2_1/SugarWebServiceImplv2_1.php' => '35606eaf05d94941c38afc0fd03aa6fd', + './service/v2_1/SugarWebServiceImplv2_1.php' => '2a6aa5cbb827d1e447daec9da9ecc62b', './service/v2/soap.php' => '32f23f109f4ff981abf8e9ccc2df3236', './service/v2/rest.php' => '4e84dc75c44747059d916d213ef15188', './service/v2/registry.php' => '2a29c657ebbd837c8f49a51ef3780a29', @@ -1212,45 +1199,24 @@ $md5_string = array ( './service/example/Rest_Proxy.php' => 'f2067bb8f194b84c29a93cd1b8a5a3c0', './service/core/webservice.php' => '2b71c40f8b66256b6d350769de002aff', './service/core/WSDL.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', - './service/core/SugarWebServiceImpl.php' => 'f6375420ad0088e5aa7426d6b60fe2e4', + './service/core/SugarWebServiceImpl.php' => '840a691dd841d20692c39d4b87f42193', './service/core/SugarWebService.php' => '53760c0e2e503c35d78f170a275ea59d', './service/core/SugarSoapService.php' => 'a535e5a1fb0587666b8dcc5ac6046566', './service/core/SugarRestUtils.php' => '9ac2b9f16e789b2c8e9e3d8e981526aa', './service/core/SugarRestServiceImpl.php' => 'dcffa0dc980f16730ce498b68c834ccf', - './service/core/SugarRestService.php' => '0a0009b9f881f222eae15bf9086715bc', - './service/core/SoapHelperWebService.php' => 'c3cc8bcbd5e33dbb30acefb1f1c5c150', + './service/core/SugarRestService.php' => 'e6adb3f34baf2bdee83af5722f3ee04d', + './service/core/SoapHelperWebService.php' => '28fbd0c3d814677611774e44cf9420e5', './service/core/REST/SugarRestSerialize.php' => '5ec4341d9e56974f1467ff102a4eb5dc', - './service/core/REST/SugarRestRSS.php' => 'dad22f4846e062e40edc6a443009356b', + './service/core/REST/SugarRestRSS.php' => '1afa6156d13c9148e27fab84c3844626', './service/core/REST/SugarRestJSON.php' => '566fe67c55e0fd3bfb6cf3bd36bf7dfa', './service/core/REST/SugarRest.php' => 'bfd1b11c826ab05b802535d5b0eb5a9d', - './service/core/PHP5Soap.php' => '4bb99bfb2c2571301c4e7dd038b9e9ce', - './service/core/NusoapSoap.php' => 'af9622b9373bae1b8bc9be13e2c8aead', + './service/core/PHP5Soap.php' => '9ee70fabbcada7e2dc42d562b2d5dfd9', + './service/core/NusoapSoap.php' => 'e576fe696a93f2a3f3dcf7fb71b4cd42', './robots.txt' => 'f71d20196d4caf35b6a670db8c70b03d', './removeme.php' => 'c909fd8a94c02aad0439aa88999580a5', './pdf.php' => '2175c3d745bb23b7812cb7fea96dfefa', - './modules/EAPM/EAPMEdit.js' => '0da3de9fe26e14c515a820c11664a33a', - './modules/EAPM/views/view.edit.php' => 'f10e48f116d60d793098d27d9f440b14', - './modules/EAPM/views/view.detail.php' => 'ccd14d5ab309c68fbe4a527c967d5c34', - './modules/EAPM/vardefs.php' => '6f8af0161ebb3e033b6f1fbabb82dd74', - './modules/EAPM/tpls/EditViewHeader.tpl' => '9968d21c791e8b2fe89e6ba2265d7b3f', - './modules/EAPM/tpls/EditViewFooter.tpl' => '7e6d67537bacf08df11acf888d5d5b51', - './modules/EAPM/tpls/DetailViewFooter.tpl' => 'b94cc2039971178f1a62e04b7b017cee', - './modules/EAPM/metadata/subpanels/default.php' => 'c205ff13e601a72dde2a5a23d7950bba', - './modules/EAPM/metadata/searchdefs.php' => '4b1f356c95d5ae8405df454c2dc907e1', - './modules/EAPM/metadata/quickcreatedefs.php' => '3b835395a73e38d7f7bfe646f69f259e', - './modules/EAPM/metadata/popupdefs.php' => '40087dc17f8a28447bc181613579502e', - './modules/EAPM/metadata/metafiles.php' => '82cc6b332b2fbfb9c4e95765da6e9dcb', - './modules/EAPM/metadata/listviewdefs.php' => '2bed1cabe6a73878bbfa6007d98ed5b1', - './modules/EAPM/metadata/editviewdefs.php' => 'b6974cf3e104cf605382914081f86af0', - './modules/EAPM/metadata/detailviewdefs.php' => '0c4a3279d990c047c4521db8bcf92129', - './modules/EAPM/metadata/SearchFields.php' => 'e8effa2440f6759dd94173e6170592c8', - './modules/EAPM/language/en_us.lang.php' => 'ac9f45ca95a8a4cf709bfa176685b946', - './modules/EAPM/controller.php' => '261e9cca8e30eb6bbc7cc8c38ebd1bb7', - './modules/EAPM/action_view_map.php' => '7f9d495a7362c0e56dafa364b6a3046e', - './modules/EAPM/EAPM.php' => '02e9f519f5e2cda7139b581fb590d3fc', - './modules/EAPM/CheckLogins.php' => '2a700d0b0feed2831cfe1b1db55404c2', './modules/vCals/vardefs.php' => '1b1f5d3652b0c84f2af8c444b2b100e7', - './modules/vCals/vCal.php' => 'a8f75d33c72ff614137c08e9cc328356', + './modules/vCals/vCal.php' => '7087462d96c75f193f1b9fd76938998d', './modules/vCals/field_arrays.php' => '23cdf390f157fce35ac36130bff01a43', './modules/vCals/Server.php' => '4bdac2390625a292adc9a7a3dbc92926', './modules/vCals/HTTP_WebDAV_Server_vCal.php' => 'b28576b27b86f98cfb18399a10e1d6f7', @@ -1261,38 +1227,38 @@ $md5_string = array ( './modules/Versions/Version.php' => 'd1d8f342abe3c3564d85ed24355f9054', './modules/Versions/InstallDefaultVersions.php' => '6e58099c0876f79214f8238363d8bc39', './modules/Versions/ExpectedVersions.php' => 'abd307792c9969f56157dbb95e24f267', - './modules/Versions/DefaultVersions.php' => '685176ff71a709facf369caf0259b55e', + './modules/Versions/DefaultVersions.php' => 'f15e1c4eb9f05337db77f18029281e1f', './modules/Versions/CheckVersions.php' => 'ec34d2c876c83ff9b20eced20e062487', './modules/Users/DetailView.js' => '226e76165861456ca3c07a4984f0e98b', './modules/Users/PasswordRequirementBox.js' => '812d65c03c22c3356cdb889b71dc31da', './modules/Users/User.js' => '89d0867052db8e00bd24858bffe301f5', './modules/Users/login.js' => 'd167b63b648c06addd4abf49597c574f', - './modules/Users/views/view.wizard.php' => 'c3ae26a542bbd90586d75f39f5b83662', - './modules/Users/views/view.list.php' => 'fa77f89687ca1092ea0c605dd76303ae', - './modules/Users/vardefs.php' => 'aa468faf100ff528010f39d409c907e3', - './modules/Users/tpls/wizard.tpl' => '257b63ccccb59fac05e73150bc39ca4d', - './modules/Users/reassignUserRecords.php' => '9cc3174c7ffa193fefd6fd9051830fc8', - './modules/Users/password_utils.php' => 'c41679fe7f11523eac0cdd97248306bd', + './modules/Users/views/view.wizard.php' => 'ed6b785dc0cf1b43fa9de1cf35fdc564', + './modules/Users/views/view.list.php' => '207cc7e0d10b2460da7b227ffd55a093', + './modules/Users/vardefs.php' => '5858fad695439f988cb6d3fc98a3a6e0', + './modules/Users/tpls/wizard.tpl' => '1fca3660e09f243c2f529782a0a2e92a', + './modules/Users/reassignUserRecords.php' => 'ccd37b2ffc8e8f661129c3fb13d60775', + './modules/Users/password_utils.php' => '3f25318fc6a3c2128f684f3094f0c1cb', './modules/Users/metadata/subpanels/default.php' => 'c110665c9c3577b12ca45ec95f7e5b79', './modules/Users/metadata/subpanels/ForTeams.php' => '5677b1abc77a48c83426dfb0f374d809', - './modules/Users/metadata/subpanels/ForProspectLists.php' => '09b60438c79d6adfdf6cfc9bcbe14230', + './modules/Users/metadata/subpanels/ForProspectLists.php' => 'f8ef3af64c566ee4c6026a0a14edf8db', './modules/Users/metadata/subpanels/ForProject.php' => 'dbe7cb1aaae960b1b7f9312b98dc8528', './modules/Users/metadata/subpanels/ForMeetings.php' => '7583a569629ab26f01da7397daa0c21b', './modules/Users/metadata/subpanels/ForEmails.php' => '3fc8e0af16ed19897ee2f3703229cc6d', './modules/Users/metadata/subpanels/ForCalls.php' => 'aa17597d596adeeb00b750fc938f72e2', - './modules/Users/metadata/subpaneldefs.php' => '646cb58c8a90c3e914cb318839c97843', + './modules/Users/metadata/subpaneldefs.php' => '25ac9f3fb409901a545c10b1665afab7', './modules/Users/metadata/searchdefs.php' => '4ef2283a1a35bffe915388166b639de7', './modules/Users/metadata/reassignScriptMetadata.php' => 'e449cc5da384ffcd3c778c98bed7e87d', './modules/Users/metadata/popupdefs.php' => '84f62e9e59fd28ae84ecc976f5d5008b', './modules/Users/metadata/listviewdefs.php' => '5117909dab36844a94643acc44f7a9bb', './modules/Users/metadata/SearchFields.php' => '6b7ab730dfab23213f6287a2e2036652', - './modules/Users/login.tpl' => '50490eb850a02b01087afccbf85bc814', - './modules/Users/login.css' => '3fc617df6406081f31b2f3306e59c6ed', - './modules/Users/language/en_us.lang.php' => 'a8e84c73463785759093bd66e7c32c79', + './modules/Users/login.tpl' => 'b17ce30f6b8030526b51607b661f41a9', + './modules/Users/login.css' => 'd5ec0f25847b4cc3c715b94fed7593d6', + './modules/Users/language/en_us.lang.php' => '413ab0b751b756796e5d251a74aabb8f', './modules/Users/field_arrays.php' => '46dac3bcf42a3641b80eb507f6cc203a', - './modules/Users/controller.php' => 'c5a25f7c913e1d434b628c6bbe7fee7f', + './modules/Users/controller.php' => '36826fcfa3c617a4882fee6fdb259aa2', './modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php' => '412dc66d6fedfacdcf69fd23371efe05', - './modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php' => 'a35a41d26a301fa1f3595dbda55494c4', + './modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php' => '8d2af7954f1cccc0e08bb9379115d87a', './modules/Users/authentication/SAMLAuthenticate/settings.php' => '871bd3ac7732d6172a0320d52b938420', './modules/Users/authentication/SAMLAuthenticate/lib/xmlseclibs/xmlseclibs.php' => '05070f789165351c2946c679611fe44a', './modules/Users/authentication/SAMLAuthenticate/lib/xmlseclibs/CHANGELOG.txt' => '113d14ef4333039359236ffed624fb85', @@ -1309,47 +1275,47 @@ $md5_string = array ( './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticate.php' => '5d7c80203aba7b2249f84a3c5407536d', './modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php' => '062f2c32422c8e6e11e11b3020d1a525', './modules/Users/authentication/EmailAuthenticate/EmailAuthenticate.php' => 'bedbc545d6c1c13a65a44e00546fa2ac', - './modules/Users/authentication/AuthenticationController.php' => '924d58e79a9910a44334f0fc5e3a8905', + './modules/Users/authentication/AuthenticationController.php' => '1d471ac0cc1c293a4ae01fce639005f1', './modules/Users/UserSignatureEditView.html' => 'bbd67cc5332b92df27ca7c014fb6d544', './modules/Users/UserSignature.php' => '5456216c3e5b1f8db76456303b4dc71f', - './modules/Users/User.php' => '0cb0ec4d4d582ea5c3e6c55b1f213bb8', - './modules/Users/SetTimezone.tpl' => 'cf34dc1b1078752a75434a0384eb2b57', - './modules/Users/SetTimezone.php' => '1e823c77a370ac9711c65c945e426257', + './modules/Users/User.php' => 'ae48c53ccae652f86f6264afdd935638', + './modules/Users/SetTimezone.tpl' => '0f1887db925adfd025f3b464c3f3c253', + './modules/Users/SetTimezone.php' => '1460782ea0992794464ab468c0988478', './modules/Users/SaveTimezone.php' => 'fca4ed5d777fbcfab3d55de554de3bef', './modules/Users/SaveSignature.php' => '1de31710e9c753516fb513eca488e1c6', - './modules/Users/Save.php' => 'e00f12055fe2081dcf1a2abfec2ae377', + './modules/Users/Save.php' => 'a56540670f34211587297c70dc543b30', './modules/Users/Popup_picker.html' => '5b27b65f225c39e6dab14b381463f324', './modules/Users/Popup_Users_picker.html' => 'e94231d815056c82437b0e97cc5c1c33', './modules/Users/PopupUsers.php' => '907d639d7dae8d7fcecd8b7f6465d630', - './modules/Users/PopupSignature.php' => '126dd53e1ebb61733039070efac3c6f1', + './modules/Users/PopupSignature.php' => '2fb7cad8e40afc0ba4c26b17929d54d5', './modules/Users/PasswordRequirementBox.css' => 'bb346afe22bafdd935b85fd8fc4b2c06', './modules/Users/Menu.php' => 'b45197498fc8bd915f18379dbaa06000', './modules/Users/Logout.php' => '261edee3721dd9ad1e381d3d7d421dac', - './modules/Users/Login.php' => 'af0c080dff82f24dc1c47316d2c45319', + './modules/Users/Login.php' => '58d41de6978bdbd87432908557090ea7', './modules/Users/ListRoles.php' => 'f0724318d9f4d19b0e9d2fe0bdcfe898', - './modules/Users/GeneratePassword.php' => '020ec67f84a5a489af637d9de6e6f43e', + './modules/Users/GeneratePassword.php' => '421ad2305e96cd30f982038085051e1c', './modules/Users/Forms.php' => '61bb049bc61cde1712a8631bb812accf', './modules/Users/Error.php' => '4e9cd9d420e137c4ba95633c341b0e24', - './modules/Users/EditView.tpl' => '66c720509c562e4e456d93140a03591d', - './modules/Users/EditView.php' => '08d05d650c11cf3c529f8467f8f88107', - './modules/Users/DetailView.tpl' => 'b0654809a7fea5588ccdae6570353c09', - './modules/Users/DetailView.php' => 'c80852e6712dcbcae0b4e30603ed825f', + './modules/Users/EditView.tpl' => '642d0b7635aad51fb97d94cc51113454', + './modules/Users/EditView.php' => '1fe8ef5cdfb87c2e2bc205827ffa2168', + './modules/Users/DetailView.tpl' => 'cd17777924e3a3fc98c68a5c58e7bee1', + './modules/Users/DetailView.php' => '014491e7cb49b8b82071208f4dc1ad4e', './modules/Users/Changenewpassword.tpl' => '7e3894ab32dd3b85ce898aa156e493d4', - './modules/Users/Changenewpassword.php' => '6970f9264bab535e96f4d0b278be4d30', + './modules/Users/Changenewpassword.php' => '426c64df41c0fdbe941d6e8ac6758757', './modules/Users/ChangePassword.php' => '949feb7d487fb4cae17e1a7417bda3ee', './modules/Users/ChangeGroupTab.php' => 'fab6b8eaa7260b44d7bfa9c23b014ba7', - './modules/Users/Authenticate.php' => 'd5f53bfed576f3b39f85175e9651e232', - './modules/UserPreferences/vardefs.php' => '3bd284e0ea6a03f1ace7d7707aea83ab', + './modules/Users/Authenticate.php' => '665765dc5673f1b16c620d9141585f33', + './modules/UserPreferences/vardefs.php' => 'f946993a82a338a7024a48d162c4158e', './modules/UserPreferences/index.php' => 'a56f06c827d512f011a01ceea8802c51', './modules/UserPreferences/field_arrays.php' => 'd5873bcc7da2c957a90d2a1ad27904d6', './modules/UserPreferences/controller.php' => 'cc33cbd9645b36a8a9471ed53edab320', - './modules/UserPreferences/UserPreference.php' => '2569c09e4bbe171ff8fd4e07d7d819cb', + './modules/UserPreferences/UserPreference.php' => '0d5090cd86825ea1064a8eb47e87d216', './modules/UpgradeWizard/upgradeWizard.js' => '1fed20dbb04bb39a5e3811388dfbd22b', - './modules/UpgradeWizard/uw_utils.php' => '5f914473ef68c93a2abfdd1639d07599', + './modules/UpgradeWizard/uw_utils.php' => '0f2b5c34fb7be85a6ef43d039f837d88', './modules/UpgradeWizard/uw_main.tpl' => '4543b15b248aca9ada4bb50d7626e5a1', - './modules/UpgradeWizard/uw_files.php' => 'a3591043d2840d87f35e4f3c7750463f', + './modules/UpgradeWizard/uw_files.php' => 'bbc206174b6a8e60ad87a84529679e7b', './modules/UpgradeWizard/uw_emptyFunctions.php' => 'b87a790ffd80c140831a32f03ec06718', - './modules/UpgradeWizard/uw_ajax.php' => '3f1085d921fbaa13c9ceaff45f5c2442', + './modules/UpgradeWizard/uw_ajax.php' => 'f284e371e2cd949f97d5db4e5f8c9473', './modules/UpgradeWizard/upload.php' => '064e98fd37ed3cc802c0bf2d3b803656', './modules/UpgradeWizard/upgradeTimeCounter.php' => '62edce24d54fc137e1cac51c06993182', './modules/UpgradeWizard/upgradeMetaHelper.php' => '3b5c67ef5e7513e227c8b32202c84a10', @@ -1357,30 +1323,30 @@ $md5_string = array ( './modules/UpgradeWizard/systemCheckJson.php' => '7a87c2a6eaf73e94a4f2049481cb1420', './modules/UpgradeWizard/systemCheck.php' => '86d1269ccccdf0cfff9d85e26a5d52ba', './modules/UpgradeWizard/start.php' => '90631b73109f239d2d461147eae4c25a', - './modules/UpgradeWizard/silentUpgrade_step2.php' => '2e33dfaffa9393e389c60387cfd2753a', - './modules/UpgradeWizard/silentUpgrade_step1.php' => '93813d78ba8cde1a6b0200c26f4a85c2', - './modules/UpgradeWizard/silentUpgrade_dce_step2.php' => 'c36e25dc68e8f6371c14066225432b34', + './modules/UpgradeWizard/silentUpgrade_step2.php' => 'b343f5c6e9148a6b99d946b23c44a4b3', + './modules/UpgradeWizard/silentUpgrade_step1.php' => '27cbd158c2f417a17a01bc6647ef8f73', + './modules/UpgradeWizard/silentUpgrade_dce_step2.php' => '42fbabf047a08fe0ef5797578cc02b2f', './modules/UpgradeWizard/silentUpgrade_dce_step1.php' => 'ffc7b7d576e46fa15089df969a234fe3', './modules/UpgradeWizard/silentUpgrade.php' => '24fac0ff5b213d81224ea49ce4fb1960', './modules/UpgradeWizard/processing.gif' => 'd7c43fc19181ee59862601bfce100b41', './modules/UpgradeWizard/preflightJson.php' => '3ab7297c97ebe86905d59bcbead9b5dc', - './modules/UpgradeWizard/preflight.php' => '8df05a9d81df4260e079b23ff269fe05', + './modules/UpgradeWizard/preflight.php' => 'aafe04e40bbcca1a6c4b8fffc67e810b', './modules/UpgradeWizard/populateColumns.php' => 'f5ac3a6e957abbb79d5ec6770693468d', './modules/UpgradeWizard/layouts.php' => '016ec71c667a0d130072cf88e6640a39', './modules/UpgradeWizard/language/en_us.lang.php' => '693b929e6cba2a836c33884082132aff', - './modules/UpgradeWizard/index.php' => '303cb4b78b209399eca7c9cc4a7b97a4', - './modules/UpgradeWizard/end.php' => '0fcf81fabc33028a8360a3df6f36b696', + './modules/UpgradeWizard/index.php' => '588bb879bc6d6e079ac9c0b24e272d6e', + './modules/UpgradeWizard/end.php' => '8a014cad3e0f5caa39a3a073608a0f01', './modules/UpgradeWizard/deleteCache.php' => 'c1d87d7d28bcb80fd6d0525e9dc00813', './modules/UpgradeWizard/commitJson.php' => '4f787ab77508307f013b9541470413df', - './modules/UpgradeWizard/commit.php' => '5dffdfea11b038cba94a321a5c9fa6f9', + './modules/UpgradeWizard/commit.php' => '19d44ac408ddef2ca6b3108556f31076', './modules/UpgradeWizard/cancel.php' => '1a1861b844497c4b565def19369bdee4', - './modules/UpgradeWizard/UploadFileCheck.php' => '78f615eba31bb0f012280c769e895977', + './modules/UpgradeWizard/UploadFileCheck.php' => '1e07202ee9ab5660f44096db9ba991d4', './modules/UpgradeWizard/SugarMerge/SugarMerge.php' => '0d34bb5ba44497d886a8b201762a4ba5', './modules/UpgradeWizard/SugarMerge/SubpanelMerge.php' => 'ed1e45aeef4c9c67b1a3b2b6d314c5bc', - './modules/UpgradeWizard/SugarMerge/SearchMerge.php' => '8df136e1f77b58c54f0f49a59aedf8ac', + './modules/UpgradeWizard/SugarMerge/SearchMerge.php' => '35d93e218315b2a624017c8324453275', './modules/UpgradeWizard/SugarMerge/QuickCreateMerge.php' => '6e6cc59dcd415d950be5dd845530f62d', './modules/UpgradeWizard/SugarMerge/ListViewMerge.php' => '5d0a70b44b1c7373178f34359584f681', - './modules/UpgradeWizard/SugarMerge/EditViewMerge.php' => '5871d2fe09f2f99369791510a22f8357', + './modules/UpgradeWizard/SugarMerge/EditViewMerge.php' => '789eeefbae3b4a294306f850aa56a43d', './modules/UpgradeWizard/SugarMerge/DetailViewMerge.php' => '94856b898734b9aebdb2bdc4138d2887', './modules/UpgradeWizard/SILENTUPGRADE.txt' => '1b6463c295028ef776dc81f0582a409e', './modules/UpgradeWizard/Menu.php' => '46177baa2468358d3dbeb04fb55fadaa', @@ -1391,45 +1357,44 @@ $md5_string = array ( './modules/Trackers/store/Store.php' => 'fcdf5d2451d3d88673654e60da6acf6a', './modules/Trackers/store/DatabaseStore.php' => '46e236bcdd32bb051dc06ea5e7f24ce6', './modules/Trackers/monitor/tracker_monitor.php' => '16b610c8a86797487dea2a0fa0136e89', - './modules/Trackers/monitor/Monitor.php' => '64495f4d07f067d1b0d39b74f719ed86', + './modules/Trackers/monitor/Monitor.php' => 'e25cac5477321be537cdab87d42510b2', './modules/Trackers/monitor/BlankMonitor.php' => '6767a630898ae9aa008e91cc5150c050', './modules/Trackers/language/en_us.lang.php' => '1345b3505bb24d495e8e19fbba0ec9bb', './modules/Trackers/config.php' => '4051c5a73d564237b51e1471fa8c3328', - './modules/Trackers/populateSeedData.php' => '444a12a759370439bfe3f04649488df0', + './modules/Trackers/populateSeedData.php' => '3816cbc1ee3c61eb1732603af5d8397f', './modules/Trackers/TrackerManager.php' => 'b93c3c6b7915670318d6d020f844cd67', - './modules/Trackers/Tracker.php' => '680ae5a394f66296a161da0a335cb5eb', + './modules/Trackers/Tracker.php' => '0bba9f4b408ca2211013d3c227ac724c', './modules/Trackers/Trackable.php' => 'daea56a5d5fc440036947096f87303b7', './modules/Trackers/Metric.php' => 'd3dafcf4c7c3da916ccaec7dd1a13ebd', './modules/Trackers/BreadCrumbStack.php' => '131c50a6ab6e2b7324ec6537930db530', - './modules/Tasks/views/view.edit.php' => '1f87e6702874c411bc695c624ce57a38', - './modules/Tasks/vardefs.php' => '59766579bc73b1dc3091c22adaf89ac4', + './modules/Tasks/views/view.edit.php' => 'fe471c23e15d969b8f26d6bd589eebb2', + './modules/Tasks/vardefs.php' => 'fc6596bcf510570faa14c31fc9af565e', './modules/Tasks/tpls/QuickCreate.tpl' => 'a3e76184c8fd107945281b284ebc11fa', './modules/Tasks/metadata/subpanels/default.php' => '186d3ead2f8c74c638dfe9e5eceabcf7', './modules/Tasks/metadata/subpanels/ForHistory.php' => '0d5d2b41bb9c1187b5de4c657d330a0c', './modules/Tasks/metadata/subpanels/ForEmails.php' => '2ae86d7e7ec36d6034edff288766c38c', './modules/Tasks/metadata/subpanels/ForActivities.php' => '1e6fca2d6773ecb7159c2b9a21bc3b69', './modules/Tasks/metadata/studio.php' => 'a18e70360a5895dd7c0da4d7f930f33c', - './modules/Tasks/metadata/searchdefs.php' => 'bd3bf1c65daae0206b922a30296f8b57', + './modules/Tasks/metadata/searchdefs.php' => '6f1618c8fa892d463780df0ae4cff744', './modules/Tasks/metadata/quickcreatedefs.php' => 'fdb993a49bfc078b714d53bd364fcc7f', - './modules/Tasks/metadata/listviewdefs.php' => '35d2cc3b2face83ff13b96e9fa59dce8', + './modules/Tasks/metadata/listviewdefs.php' => '2fa8ed2183618603ce56f0ae07d4f248', './modules/Tasks/metadata/editviewdefs.php' => 'e7cc85c6c63a8031217705096a0778f4', './modules/Tasks/metadata/detailviewdefs.php' => 'd45f14a81beaf71702bd230415731de6', - './modules/Tasks/metadata/additionalDetails.php' => '62115b6e9f474ae4d723b25c9d5357fe', - './modules/Tasks/metadata/SearchFields.php' => '0b9e415252241158841c633377f6212a', - './modules/Tasks/language/en_us.lang.php' => '05ad7e321a629e5edd0ea40200518184', + './modules/Tasks/metadata/additionalDetails.php' => '2f4b5a057be125ad8ca89f894f9d4642', + './modules/Tasks/metadata/SearchFields.php' => 'c8441081865cf03a75aa3f324899d226', + './modules/Tasks/language/en_us.lang.php' => 'c409bfec56c58299fd2bfb43c5f3c032', './modules/Tasks/field_arrays.php' => '578586a9d27ef3519ec9bcad0f6b2073', './modules/Tasks/TasksQuickCreate.php' => '319575147ca931572d8ffe5f86d66479', - './modules/Tasks/Task.php' => 'e47e5c86532c53599f37a6d1de5b731f', - './modules/Tasks/Save.php' => '5901a0e97e3604b1303b95de3248f14b', - './modules/Tasks/MyTasks.php' => '0812e375cea310e135154a07c2233bf4', + './modules/Tasks/Task.php' => '37485dae358203c20b1469f737ec6904', + './modules/Tasks/Save.php' => '8ecd9d4adfef085b65e182b57ef08261', + './modules/Tasks/MyTasks.php' => '3b2c3afa164677dd831dafe200c86a78', './modules/Tasks/MyTasks.html' => 'eef2d088906a4a3ca2ed5c3fb7b8c3b9', './modules/Tasks/Menu.php' => '06049096d180e77230b22298fe3e008e', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.php' => 'bb5394ab47efe1853c123ffeead7f1ea', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.meta.php' => 'e27204f03b222e677251993b263af683', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php' => '0c5a8cb52b95ff6efd03a71d0160338a', - './modules/TableDictionary.php' => '25ef82d92853bf5d3ed424107a7bb758', - './modules/SugarFeed/views/view.adminsettings.php' => 'a3597caf672ff770a9ba86e62423843b', - './modules/SugarFeed/action_view_map.php' => '3b0679f45ce6cea84ea77d5783a3a024', + './modules/TableDictionary.php' => 'aba927333a4f9a4a082184f5254b86d8', + './modules/SugarFeed/AdminSettings.tpl' => '1a33664e286bf33b4f535024ead357dd', './modules/SugarFeed/vardefs.php' => '1c499286c8af124d3a3e10da2284b716', './modules/SugarFeed/metadata/subpanels/default.php' => '40bda533c59a5a627e1e18111223a33e', './modules/SugarFeed/metadata/searchdefs.php' => 'f31d790edd5f094f873836952beb35cd', @@ -1438,68 +1403,67 @@ $md5_string = array ( './modules/SugarFeed/metadata/listviewdefs.php' => 'e6ba6eb7eaf8d82f15793e269f315dac', './modules/SugarFeed/metadata/editviewdefs.php' => 'c7fe443df3a4bda848c4669cd85bc960', './modules/SugarFeed/metadata/detailviewdefs.php' => '255168df0d2024f156affb1fd0b60e65', - './modules/SugarFeed/metadata/dashletviewdefs.php' => 'dec6bef0e6afa31a0178eb260376ee8a', + './modules/SugarFeed/metadata/dashletviewdefs.php' => 'acfa0f1ad41d3df32c844ecc37b0af00', './modules/SugarFeed/metadata/SearchFields.php' => 'aa8d48635deda3ec77ff1522213f88d3', './modules/SugarFeed/linkHandlers/YouTube.php' => '5333d1f93f453a09ca91cb3d8d4dbe03', './modules/SugarFeed/linkHandlers/Link.php' => '030b059d4d21b3e69388afe01a99a4ba', './modules/SugarFeed/linkHandlers/Image.php' => '57eef89d5eca2a06a69929994a09d4fa', - './modules/SugarFeed/language/en_us.lang.php' => 'c386eb017aa688b08a132b2878e2fd4f', + './modules/SugarFeed/language/en_us.lang.php' => '2005d8fa5aba38a22c16b66d40ac2921', './modules/SugarFeed/feedLogicBase.php' => '5679ed4e941ac2f28a084af99eec7df9', - './modules/SugarFeed/tpls/AdminSettings.tpl' => '15e26141e5f98784f96f78a14decaee4', - './modules/SugarFeed/SugarFeedFlush.php' => 'd8f0148a9606cd3ea8ceced4a743ec53', + './modules/SugarFeed/SugarFeedFlush.php' => '014d0fb08d43da512573f1fcc1f89072', './modules/SugarFeed/Menu.php' => '689b6fac731f80c95a1fbf24da4aa5f9', './modules/SugarFeed/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', - './modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl' => 'f32a591995f0087b69a9c09cb126d248', - './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl' => '62dcebb59b5dfb0b297b83257c07b76b', - './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php' => '311306d8959e193fb7336c06ba94c75d', + './modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl' => 'ee1af0698de5fb28f533f05a20ed3045', + './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl' => '07bcd7a3b97bef1dc113fb71db667453', + './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php' => '06fab3578c6446f7cd692f77b125589b', './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.meta.php' => '671e67c8cb16fd2393c86741dc531172', - './modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl' => '3e52b000a5e4196dd906f276f6fffc5e', - './modules/SugarFeed/SugarFeed.php' => '43ea72ab8dd8a21f617020f1235f9103', - './modules/SugarFeed/AdminSettings.php' => '4a4e87f638d6408f72adc03d38485350', + './modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl' => '7536ba2eccb6a7a980c6f23964fdf5f6', + './modules/SugarFeed/SugarFeed.php' => 'a55e905e8455a9cba682fb38ede331d0', + './modules/SugarFeed/AdminSettings.php' => '0b3087d3c64f86b5f6b0c3a4e134c675', './modules/Studio/JSTransaction.js' => '36ddb37e1a173d58a1e8d3ac8c728399', './modules/Studio/studio.js' => '0ef9ae531b2dfd6710eafc9556c6e9bc', './modules/Studio/studiodd.js' => '5184cf38b52396d94afaec27b473d0f3', './modules/Studio/studiotabgroups.js' => '29c08f5ea908bfff0ce3f78656cd7289', './modules/Studio/ygDDListStudio.js' => '5a89d4bc04b8fe28e36c5d2df393953e', - './modules/Studio/wizards/StudioWizard.php' => '6a1b121436ad862ce331c37cb3d64120', + './modules/Studio/wizards/StudioWizard.php' => '9815ccf0cee472886bb27d5b6bc2fea7', './modules/Studio/wizards/EditDropDownWizard.php' => '2544faf813d767d5ee1d899f241bbb0b', './modules/Studio/wizard.php' => 'a3aa2c6e4f90f1ca59c9b27e1b662ae5', - './modules/Studio/parsers/StudioParser.php' => 'c6ad554e8dda163f8d8833a97366e941', + './modules/Studio/parsers/StudioParser.php' => '98375df4a92aca417cb628840d9a3b4a', './modules/Studio/language/en_us.lang.php' => '5ce8340c4396eefe1d636388c218e311', './modules/Studio/language/en_us.Portal.html' => '10ab579e1b9ade129b3f32d0de286f13', './modules/Studio/config.php' => 'c6a1c6733d94c91cdb40020db6251602', - './modules/Studio/TabGroups/TabGroupHelper.php' => '85916f7c571c0b1aecebe5c8e01c41a5', + './modules/Studio/TabGroups/TabGroupHelper.php' => 'd2e34da9791322a52c22d121450eae92', './modules/Studio/TabGroups/EditViewTabs.tpl' => 'ed1a9cba42a9baea7ec049969f101941', - './modules/Studio/TabGroups/EditViewTabs.php' => '3bce6ba3449444f0532d8df0d8c4c8d3', + './modules/Studio/TabGroups/EditViewTabs.php' => '37bf77a5031bed39b50c7931fd16bbc0', './modules/Studio/TabGroups.php' => '3044dc610184d333ebb4c3bb38a24ee5', './modules/Studio/SaveTabs.php' => '7a1bce049bb131087351407a91703c2e', './modules/Studio/Forms.php' => '81c69876362d18fb55b89e59735b2bee', './modules/Studio/DropDowns/EditView.tpl' => '62ee6ce084e14d75b2b812f571ff60d9', - './modules/Studio/DropDowns/EditView.php' => '8258a7a1ee8b2acef05b7688597a9a99', - './modules/Studio/DropDowns/DropDownHelper.php' => 'f312b9c50a862addcbb8d04f61048206', + './modules/Studio/DropDowns/EditView.php' => '8329840b5b2d63f2a445a2e5e0757ad0', + './modules/Studio/DropDowns/DropDownHelper.php' => '28282584f9ece19fc5fb5df25ded141b', './modules/SchedulersJobs/vardefs.php' => '3753fe65bb3e2b57182741b03d06b103', './modules/SchedulersJobs/metadata/subpanels/default.php' => '0fe13add4d444631a0185bef78a8a9d6', './modules/SchedulersJobs/language/en_us.lang.php' => '03324f484d6a373e8350d0248ffa155e', './modules/SchedulersJobs/field_arrays.php' => '13aae3a0ab1f82eb46affc848ad25ace', - './modules/SchedulersJobs/SchedulersJob.php' => '2a7d2796404109dd20bfa744b26ea340', + './modules/SchedulersJobs/SchedulersJob.php' => 'eb4812fe4181017a06fcab770bcfe74d', './modules/Schedulers/vardefs.php' => '5841af67faf74658d311e7c9b6f8fe62', './modules/Schedulers/metadata/subpanels/default.php' => '211c31e39227d3a7f847f6df832260cc', './modules/Schedulers/metadata/subpaneldefs.php' => '2e8f77cf8125cb5617d69739192625ec', - './modules/Schedulers/language/en_us.lang.php' => '3a5297c79088ad18cbe1145031eea605', - './modules/Schedulers/index.php' => '725d0499fe99123816fb1132fd28c0dc', + './modules/Schedulers/language/en_us.lang.php' => 'dadca7b586915c3433517f5d7f3d06c3', + './modules/Schedulers/index.php' => 'e3ba1ea616a95caf725e35d7681be1ce', './modules/Schedulers/field_arrays.php' => '7f556e11519f16ca7a2ca174efd196b9', - './modules/Schedulers/_AddJobsHere.php' => '30568dc7b8552ad338c7bdc364ee62c9', - './modules/Schedulers/SchedulerDaemon.php' => '75b412a5a0d4c06593139ddb0cae774c', - './modules/Schedulers/Scheduler.php' => 'c50dc4769f49dfeb3684d5de7c403c64', + './modules/Schedulers/_AddJobsHere.php' => 'dbbe4a966d7238e00ed0ea46d844ffb3', + './modules/Schedulers/SchedulerDaemon.php' => '26ec186443f5fbe66a74568786dd55db', + './modules/Schedulers/Scheduler.php' => '2eb2ee784346f72da1ea976c4913fd44', './modules/Schedulers/Scheduled.php' => 'ff2907aa3f299ef7167a938f42116004', './modules/Schedulers/Scheduled.html' => 'f6623756056847129c8c60b9b7209783', './modules/Schedulers/Save.php' => '10a6b3f889665314db290da1c967f977', './modules/Schedulers/Menu.php' => 'bce50cadfc1d4295d063c5b8a9909fca', './modules/Schedulers/ListView.php' => '67f433a9a7f2d28cd23d97ffabd122db', './modules/Schedulers/ListView.html' => '6e3ed1e28a2024c6dd8d3ed95c951b28', - './modules/Schedulers/JobThread.php' => '0501ccb1835c3ee8e2c48bd1c2705749', - './modules/Schedulers/EditView.php' => '5dd090303f4e62fcfa19f5ff4a38808e', - './modules/Schedulers/EditView.html' => 'ef6cfa5254f2b6afb37da045d148101d', + './modules/Schedulers/JobThread.php' => '4f4a8759eed6b9673f618ad1de84dc5d', + './modules/Schedulers/EditView.php' => '4248dce624b6835b1282496c9c5c4507', + './modules/Schedulers/EditView.html' => 'bb65dc9a0671c1efeb3d00eff113cab9', './modules/Schedulers/DetailView.php' => '2a107f341c14d5e8e8fedca898ca56d4', './modules/Schedulers/DetailView.html' => '6c143319127bea5c8f12fdc0f663b1a1', './modules/Schedulers/DeleteScheduled.php' => '4c316e04b8b1e166e4075d184bb3dd4c', @@ -1507,15 +1471,15 @@ $md5_string = array ( './modules/SavedSearch/vardefs.php' => '8170e468e6f1f82a000847df49c3bcd2', './modules/SavedSearch/metadata/listviewdefs.php' => '192cbaf9da9556966576a9ed5e0b3512', './modules/SavedSearch/language/en_us.lang.php' => 'e8cfb480cc94c076f2ea83952941264e', - './modules/SavedSearch/index.php' => 'efaefa81ecee8146203b2a5ae2c21a1e', + './modules/SavedSearch/index.php' => 'bd687932efe7065407739a06b586069b', './modules/SavedSearch/field_arrays.php' => '25b090694e486adc18ce183cacb9d643', './modules/SavedSearch/UpgradeSavedSearch.php' => '795be93009d7775a516ad02e35befc2b', './modules/SavedSearch/SearchForm.html' => '3e0e486147cc248570d85c55e4d8950d', './modules/SavedSearch/SavedSearchSelects.tpl' => 'e14b466d89ca1482ba925fadcdd05588', - './modules/SavedSearch/SavedSearchForm.tpl' => 'da3645cf5c9f21e2c6d11016e8d7102d', - './modules/SavedSearch/SavedSearch.php' => 'eb6d703feb1b5e95f0696a53572445c0', + './modules/SavedSearch/SavedSearchForm.tpl' => '352e9354bcd45ded1a02cf8fd8bd7491', + './modules/SavedSearch/SavedSearch.php' => '973e4266a31f6c763f021b84944605c7', './modules/SavedSearch/Menu.php' => '76c48e25df51f1a0a32e78aa08cf05d8', - './modules/SavedSearch/ListView.php' => 'd0dd70645af34446ebfb7b7c2a0b6572', + './modules/SavedSearch/ListView.php' => 'a19b5609b6dd523b21146b2834f0e62c', './modules/Roles/views/view.list.php' => '392d4bb043944c45287d3f4bdcd360ba', './modules/Roles/vardefs.php' => '5b7de081974cec1074d575a245c0925d', './modules/Roles/metadata/subpanels/default.php' => '2246d76c8778b443088e62d5ddbc4595', @@ -1532,15 +1496,15 @@ $md5_string = array ( './modules/Roles/Role.php' => '840f5e2e77ffde3fef8713377ad0f11d', './modules/Roles/Menu.php' => '9998ce5ca80ace0a3ec538c5e87fa7b5', './modules/Roles/Forms.php' => '86d7155dd64c40a91d7e7f25ee01fe08', - './modules/Roles/EditView.php' => 'd87986b438b3a43a5c3feb71cc71c7d8', + './modules/Roles/EditView.php' => '8cb4289d92af73455f72ef7100417599', './modules/Roles/EditView.html' => '85eb9914e8401320bad6dcecda33a70b', - './modules/Roles/DetailView.php' => 'fc296ea8b5ad617eace9f1e7b81dedd3', + './modules/Roles/DetailView.php' => 'b0fb779e3dceb8e508e5576069fe9298', './modules/Roles/DetailView.html' => 'e978da97c0f1567d1ae8aff98cf217c6', './modules/Roles/DeleteUserRelationship.php' => 'cb0f087d7215b0d54f7a7238efce4d98', './modules/Roles/Delete.php' => '1c5335b304b91abddd25a5b121d44cd1', './modules/Releases/vardefs.php' => 'eda3b2695643ab8cbaf2e8799ff4e403', './modules/Releases/language/en_us.lang.php' => '1868fa24b2b9db7528a57bbf14b1c3aa', - './modules/Releases/index.php' => 'b56b041809f81b7be8770e795a73b097', + './modules/Releases/index.php' => 'b4a5b43c58f7502bd7bfd66ff29735c7', './modules/Releases/field_arrays.php' => 'a7ad1478be87c4c28a336e71e780d885', './modules/Releases/Save.php' => '3836c0f3fc25ae9689f4e64cae875c8b', './modules/Releases/Release.php' => '7cd3b0714dd0e6176a4dde8a21840c06', @@ -1556,9 +1520,8 @@ $md5_string = array ( './modules/Relationships/field_arrays.php' => '45cd3e9bb1f7a0fe2bbfc15b95248c58', './modules/Relationships/RelationshipHandler.php' => 'f7cfdd20a3a14bf5c2d62ee52703c939', './modules/Relationships/Relationship.php' => '8e22b233f0c1cd7eb98a934548a967b3', - './modules/Prospects/views/view.list.php' => 'dffbd8d46cf6f37bf409596a8306d2d1', './modules/Prospects/views/view.detail.php' => '524460f732a66b8829430df637a4e9be', - './modules/Prospects/vardefs.php' => '87b7d11c7dc6ddbd893c78741fe39dde', + './modules/Prospects/vardefs.php' => 'ead2e1725c78bea49fddd3f7fda3f558', './modules/Prospects/tpls/DetailViewHeader.tpl' => '3f7b93710019238efa92653766cc748b', './modules/Prospects/metadata/subpanels/default.php' => '1339522c9eeec38f2a45541d189ce59f', './modules/Prospects/metadata/subpaneldefs.php' => 'c657fdaaa87dd0ee910c5295b95003d4', @@ -1566,46 +1529,46 @@ $md5_string = array ( './modules/Prospects/metadata/searchdefs.php' => 'dace2a3e6018d1cb79e9d500a0ae2f23', './modules/Prospects/metadata/quickcreatedefs.php' => 'c97898e1ba07f72f0f4f29a9135fb82a', './modules/Prospects/metadata/popupdefs.php' => '880e8450e847fcd39dc8a6a6487ffb14', - './modules/Prospects/metadata/listviewdefs.php' => '30c27f7f365a14974413ab73273b7f8f', + './modules/Prospects/metadata/listviewdefs.php' => '760f120464c25be9a6bc8bd039a36aba', './modules/Prospects/metadata/editviewdefs.php' => '77d1d32d21e6f0034cc9eeb89213de81', - './modules/Prospects/metadata/detailviewdefs.php' => '1ef40c7f0819f99c212a425c4f4e238c', - './modules/Prospects/metadata/additionalDetails.php' => 'f183e1b69fb95f7fa30a35b5f8b821aa', - './modules/Prospects/metadata/SearchFields.php' => '1e7ccc95eab7a01d885899825a2a435f', - './modules/Prospects/language/en_us.lang.php' => '51d25f98e3699f8a2f5f1e04af5dd5fa', + './modules/Prospects/metadata/detailviewdefs.php' => '7cd06e35ae4dd16f501cf614e2b2c116', + './modules/Prospects/metadata/additionalDetails.php' => '7b7da77a30d59f62fc885170bcd140ff', + './modules/Prospects/metadata/SearchFields.php' => '61f33ae33d0ef1a460019ea5b835ff0b', + './modules/Prospects/language/en_us.lang.php' => 'b5feafce765e7fb1e76da98c09619087', './modules/Prospects/field_arrays.php' => '51241a0004e0bb358a236fa8655258cd', './modules/Prospects/Save.php' => '774b5ad6afb0822f8b56afd85dde4d25', './modules/Prospects/ProspectFormBase.php' => '50497a920fc4b5155dd4c324e148315a', - './modules/Prospects/Prospect.php' => '6b69a8fa590f81f86ec12b402a2fd6e3', + './modules/Prospects/Prospect.php' => '7a8352702f95e73c3edf43275b0badca', './modules/Prospects/Popup_picker.html' => '0cab856872d14ffad67db705f9fac5c4', - './modules/Prospects/Menu.php' => 'cf73810172808b53ed5befcd8258e61f', + './modules/Prospects/Menu.php' => '22a0cf4bc9362a4b838b648a65d96445', './modules/Prospects/Import.php' => '901946e285e08b4e8edab5ecdc2a72aa', './modules/Prospects/Delete.php' => '8dd12fcb031cfad26cc8b0e6bac2ff27', - './modules/ProspectLists/vardefs.php' => '5a3361bd1b82da9910f92daa2864ac62', + './modules/ProspectLists/vardefs.php' => '8607d77fd68ee196a091045493af4ee2', './modules/ProspectLists/metadata/subpanels/default.php' => '3fbedc002f64433b6f50d7b64f0bc489', './modules/ProspectLists/metadata/subpaneldefs.php' => '87eaec0a7e33121dd60f0769f1dc3603', './modules/ProspectLists/metadata/searchdefs.php' => '1fb83db39751ba9e583a3d2019b46cf3', './modules/ProspectLists/metadata/popupdefs.php' => 'e5b406f2dd6981ef5925a11519f59f1e', - './modules/ProspectLists/metadata/listviewdefs.php' => '5a1861c39bd93d36e4445d0b5cb0dd18', + './modules/ProspectLists/metadata/listviewdefs.php' => '086c8bf283c34d552de4082fb17da4ff', './modules/ProspectLists/metadata/editviewdefs.php' => '09c4c64e5ea7adf58deebc4b3623aab6', './modules/ProspectLists/metadata/detailviewdefs.php' => '710d9ce60f9fdcf00d01bdf7facf92c6', './modules/ProspectLists/metadata/SearchFields.php' => '51bc2a44632ab09db184cbe82c0653f4', - './modules/ProspectLists/language/en_us.lang.php' => 'edd03416cf7d8102abdfa253fee45111', + './modules/ProspectLists/language/en_us.lang.php' => '6dee094e737f933228a92e89379d033b', './modules/ProspectLists/field_arrays.php' => 'c9ef4935b8a184a886e2b330ede6f4ce', - './modules/ProspectLists/TargetListUpdate.php' => 'eaaf076c5c0dd2c8353fa4ce5d96caba', + './modules/ProspectLists/TargetListUpdate.php' => 'c2962d863664b2b6702a8b451f74eb61', './modules/ProspectLists/SubPanelView.php' => '647be549716dd760cf29be7aa9630916', './modules/ProspectLists/SubPanelView.html' => '21e44461a9595bad1cce017d2058d2ad', './modules/ProspectLists/Save.php' => 'c0025df53ae0797b7787fd9b1737602f', './modules/ProspectLists/ProspectListFormBase.php' => 'bfaaf6b451bae7635bed05ad102fc3f9', './modules/ProspectLists/ProspectList.php' => '64a539a55212fbcd0ec762231dcb5e5e', './modules/ProspectLists/Popup_picker.html' => '6902311909d092e893ec8d583863ac35', - './modules/ProspectLists/Menu.php' => '45c02816fd458c1bf8e8c0a62411a57b', + './modules/ProspectLists/Menu.php' => '4a33745d64edd684972eff6fb7ed9583', './modules/ProspectLists/Forms.php' => 'e3e083f6f6892fb028f8e30bf5bffc1e', './modules/ProspectLists/Forms.html' => '15ef1dc459471b67c351282d3e00f836', - './modules/ProspectLists/Duplicate.php' => 'd89a7f0d0bd285a0930280c738527a63', + './modules/ProspectLists/Duplicate.php' => '4471f20ca05bc90963571dc7dbdbfdcc', './modules/ProspectLists/Delete.php' => '796118b7ceafc8f816c6f772798e9da1', './modules/ProjectTask/ProjectTask.js' => 'ada54f7db9ad037c753a6befdfee4791', - './modules/ProjectTask/views/view.list.php' => '71ea6bd90ec0ad45455f98b8e3e5256a', - './modules/ProjectTask/vardefs.php' => '0d34b70b22bd6811ec3ef2d2b2f896fa', + './modules/ProjectTask/views/view.list.php' => '2b20ed9e1ecb00211dc4c2cef66345b2', + './modules/ProjectTask/vardefs.php' => 'c24b7638273b50472456fd8a98028a28', './modules/ProjectTask/tpls/QuickCreate.tpl' => '4dd0099e05fdeaf25b578bea811b26cf', './modules/ProjectTask/metadata/subpanels/default.php' => 'ef6e514d97f20d3dfbb2073be6846378', './modules/ProjectTask/metadata/subpaneldefs.php' => 'ace4e4a48a923d36d07ca55a64634e24', @@ -1617,7 +1580,7 @@ $md5_string = array ( './modules/ProjectTask/metadata/detailviewdefs.php' => 'c891578c9ffb78c39d980c6b130aa9c4', './modules/ProjectTask/metadata/additionalDetails.php' => '3debf7d4223659965db368d9072236fa', './modules/ProjectTask/metadata/acldefs.php' => 'c3ff3175b906ede34a4c8b97439096d1', - './modules/ProjectTask/metadata/SearchFields.php' => 'ad9e6d2c7dd40f37075ed1e769a15893', + './modules/ProjectTask/metadata/SearchFields.php' => '9609d12685d8fd1fb00c27a73ba22635', './modules/ProjectTask/language/en_us.lang.php' => 'a3133e507944685ba101edb0576cd622', './modules/ProjectTask/field_arrays.php' => '99e9c75602079ee1ebe4483e96d48669', './modules/ProjectTask/SubPanelView.php' => 'ef83d3a0508bcccfb820913d4676918e', @@ -1628,7 +1591,7 @@ $md5_string = array ( './modules/ProjectTask/Popup_picker.html' => '5954d35200b3998993c6d3834bb79d69', './modules/ProjectTask/Popup.php' => 'c3edbfbdc357850743bfe913750e13d2', './modules/ProjectTask/Popup.html' => 'bd269239afeb5a9865df3eec230ec7f6', - './modules/ProjectTask/MyProjectTasks.php' => '8b0258241c7860ad9cd420743d435574', + './modules/ProjectTask/MyProjectTasks.php' => 'cc1ffbdb98f1f78f0a6a6d5d2fdd2d42', './modules/ProjectTask/MyProjectTasks.html' => '63f6b95493b9f5bbe06c4673d573b4b6', './modules/ProjectTask/Menu.php' => '5d44b3b3bd99d4546ca82baed21c62fe', './modules/ProjectTask/Forms.html' => 'b30faeb6fdb596c4dd425ecd22bcbb73', @@ -1637,12 +1600,12 @@ $md5_string = array ( './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.meta.php' => 'a7cb681795e78b00e9037ebda350a593', './modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.data.php' => '6adec2dfd0e401f5e97a4fadd53bc055', './modules/Project/Project.js' => '8b1002794632e9b0a91758b0be180c13', - './modules/Project/views/view.templatesedit.php' => '665c813d9c54d2e76ce0d2d6fd65db97', - './modules/Project/views/view.templatesdetail.php' => 'b87bced26b8e42afbf9208a307b57487', + './modules/Project/views/view.templatesedit.php' => '8f8ed92b50346d395e8c3b71afceb525', + './modules/Project/views/view.templatesdetail.php' => '7f83eee0a0f42d301c482ac3bd77bc22', './modules/Project/views/view.list.php' => '415b99993db68bcf349aaab12a7301c8', './modules/Project/views/view.edit.php' => '7585a5def6ad87871dde511e01d518f3', './modules/Project/views/view.detail.php' => 'f16e046281cd919a30dafa8f7d62b613', - './modules/Project/vardefs.php' => '0d8065e157c71059c36945be102877bc', + './modules/Project/vardefs.php' => 'efb5ab4157860a081a0ecea634bfd58e', './modules/Project/tpls/QuickCreate.tpl' => 'f945805bd5ddb1963cef79413c5c9cdd', './modules/Project/metadata/subpanels/default.php' => '6e4dd1edba8ea8d26a90bc2b47eeb146', './modules/Project/metadata/subpanels/ForEmails.php' => '3005add91d6d61f247093f9232af2570', @@ -1656,7 +1619,7 @@ $md5_string = array ( './modules/Project/metadata/editviewdefs.php' => '12684f40300a74aacd71923485acfb8c', './modules/Project/metadata/detailviewdefs.php' => '8286ec435357279811f854b06d4f944d', './modules/Project/metadata/additionalDetails.php' => 'a9ec9af1f3c83e5439695acce93911e2', - './modules/Project/metadata/SearchFields.php' => 'a3e27edbfa0063a91622ddff91a2c772', + './modules/Project/metadata/SearchFields.php' => '93cee2b25336bec4c5cedd953da49fc7', './modules/Project/language/en_us.lang.php' => '1758b6b050bb6e2aa9c6c3a8dceed672', './modules/Project/field_arrays.php' => '9d093e2a0ce97c512be35f3af7f1df81', './modules/Project/action_view_map.php' => '04326954b793fc76db528f949f541c8c', @@ -1671,26 +1634,26 @@ $md5_string = array ( './modules/OptimisticLock/Menu.php' => 'ab2d8a3388a4ad15ba2a8702d8167438', './modules/OptimisticLock/LockResolve.php' => 'af27e2702d189f540f87112c3ec7f060', './modules/OptimisticLock/Forms.php' => '1426ca53f6b7d0dfa8d2c12164ab814e', - './modules/Opportunities/views/view.edit.php' => '7d5f91f50318796a197ed5911ca89090', + './modules/Opportunities/views/view.edit.php' => '616c48fb396d786e9ddc1e22fa75709a', './modules/Opportunities/views/view.detail.php' => '2031e46f2fe3f86bfed2cb000d8152e7', - './modules/Opportunities/vardefs.php' => '66b2b45cd7f71db459e6d0e533d4d540', + './modules/Opportunities/vardefs.php' => '8703fd336c07c05ac318a45f33d6c069', './modules/Opportunities/tpls/QuickCreate.tpl' => 'a97086f3b05fd812fa5aa13c8934d518', './modules/Opportunities/metadata/subpanels/default.php' => '9055b5051763913602c1b0cfcec6a6a8', './modules/Opportunities/metadata/subpanels/ForEmails.php' => 'a23e3862c9ed6a4eafd63c2f6bd6926b', './modules/Opportunities/metadata/subpanels/ForAccounts.php' => '1c7dc76af48c49c5d32bf619f9fe58c3', - './modules/Opportunities/metadata/subpaneldefs.php' => '2e61a5d755c197597eef47005cbeefd2', + './modules/Opportunities/metadata/subpaneldefs.php' => 'c55852b1f65aa9bd4d9e8475bbad3f26', './modules/Opportunities/metadata/studio.php' => '2ecdfdc439cb4586bbe539e63d037c91', - './modules/Opportunities/metadata/searchdefs.php' => 'a2cf2aa25373055ba1557fb1ef259f7a', + './modules/Opportunities/metadata/searchdefs.php' => 'f155dc58c2b4307dbfbe0a426a2b1409', './modules/Opportunities/metadata/quickcreatedefs.php' => 'ce950482bcd273362f97c4da063ac262', './modules/Opportunities/metadata/popupdefs.php' => 'b33714d9154fb5f4ffaba5c01fc14021', './modules/Opportunities/metadata/metafiles.php' => '8c2f3857e7a218748033ea5ac9c72438', - './modules/Opportunities/metadata/listviewdefs.php' => '488ff35629356b012435b17b50190d99', + './modules/Opportunities/metadata/listviewdefs.php' => 'c09135bc9ec9bf27db53f59dce847104', './modules/Opportunities/metadata/editviewdefs.php' => '89552e6704b61aae1ac0c29ab856148e', - './modules/Opportunities/metadata/detailviewdefs.php' => '130c67be8848ca23ee84adcd7d578cdd', + './modules/Opportunities/metadata/detailviewdefs.php' => '9bec56cf096f01226c628c1fa6c7e551', './modules/Opportunities/metadata/additionalDetails.php' => '4e4a3f43d59864fa1d605ad1bd974c09', './modules/Opportunities/metadata/acldefs.php' => '5268a3225576dff2be5ed567f7754ea3', - './modules/Opportunities/metadata/SearchFields.php' => '408a3bc249b78244ce465c7cdd8f6ea4', - './modules/Opportunities/language/en_us.lang.php' => 'e4795af2749d63783d2de150f6368d3f', + './modules/Opportunities/metadata/SearchFields.php' => 'e9a779771d07a48ee88cefd80317cd4d', + './modules/Opportunities/language/en_us.lang.php' => '12004f1486f03db62307801ceb9ecc12', './modules/Opportunities/field_arrays.php' => 'fa73b1cbef1a90e6ff67dd27dac3dd94', './modules/Opportunities/SugarFeeds/OppFeed.php' => '6de18f1cdf081e6ea21d337d0dd0588c', './modules/Opportunities/SubPanelViewProjects.php' => 'd265850f1189b7af991f5d53f4a495d6', @@ -1700,7 +1663,7 @@ $md5_string = array ( './modules/Opportunities/SaveOverload.php' => '50296d5a9749d0cca36d0a2d7b851a67', './modules/Opportunities/Save.php' => '7fbc793c50fecad076ac08d121a5d87d', './modules/Opportunities/OpportunityFormBase.php' => '96d3099b41d15333f2c32a63ceb2f1de', - './modules/Opportunities/Opportunity.php' => '4d1a149fa8ce8cd5fc7ad799eaf529ca', + './modules/Opportunities/Opportunity.php' => '0e062faff5acdaecb8c461cfcf3c8761', './modules/Opportunities/OpportunitiesQuickCreate.php' => '6019102062aa4d93ef001e1d06691ea8', './modules/Opportunities/Menu.php' => 'c1213ce80b4cac1298505d3ef84b69d2', './modules/Opportunities/ListViewTop.php' => 'e77a90af42ace6193feab7d3893a9631', @@ -1708,104 +1671,97 @@ $md5_string = array ( './modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.php' => 'f038dcbab37f2c7b3412a533328d299b', './modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.meta.php' => '30c2ef6dc2728b55feefa6059c15166b', './modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.data.php' => '7ca8885c9c7d621bf6a362b6333bf8d7', - './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletOptions.tpl' => 'af2e87f986e73938a4df665c3baa219f', - './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl' => '85a1f82b9edf6d5c867fdbb49b645cda', - './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl' => 'b9cddf9611a364e83fffe6e70e25a466', - './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php' => '9ae01144105194e42072e3d378ef9fe7', + './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl' => '4575629107146c4cee8184854fd7c494', + './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php' => 'ff5b9548d08023d77c6e165d522ca155', './modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.meta.php' => 'cd8466622b1201d34fcbb7d13e3084f2', - './modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.php' => 'f9ab3897fc09f21ea1ecb3f953dad090', - './modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.meta.php' => '0184797e2c51448e2a176ff7c0d1cdaf', - './modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php' => 'ab49b04a87d38c96bf763dccff5fda0f', - './modules/Notes/vardefs.php' => 'da3a3314abfc2360532518ce50e8c685', + './modules/Notes/vardefs.php' => 'f0be924d892986f4756b0510e5c438e5', './modules/Notes/tpls/QuickCreate.tpl' => '0a9fb5e76a39a8a830f38e98c95b20db', './modules/Notes/tpls/EditViewHeader.tpl' => '6d17efa511b050306ad8917250a55612', - './modules/Notes/metadata/subpanels/ForMeetings.php' => '96a261d7cb62b23e280e0ed951838cc1', - './modules/Notes/metadata/subpanels/ForCalls.php' => '96a261d7cb62b23e280e0ed951838cc1', - './modules/Notes/metadata/subpanels/default.php' => '4be031ba9baa81f049e0a913e74699cd', - './modules/Notes/metadata/subpanels/ForHistory.php' => '6764b710d1f251c025ce769e23ae9362', + './modules/Notes/metadata/subpanels/default.php' => '32cd1c1f18585dc5d04ebdd818c009e4', + './modules/Notes/metadata/subpanels/ForHistory.php' => '3b608befa76684f07581fb2a76c68c56', './modules/Notes/metadata/studio.php' => '1f44d8404cbd0338366d6c8fa46736de', - './modules/Notes/metadata/searchdefs.php' => 'e8bd7141325af729998e8c28628987b0', - './modules/Notes/metadata/quickcreatedefs.php' => 'c00836e71bd882f126294c06a259bcb8', - './modules/Notes/metadata/listviewdefs.php' => 'c41f85e58d565bf47a82d6c81eb31c4a', - './modules/Notes/metadata/editviewdefs.php' => 'a56c4ca60082b5bf7e6e5e2033c8e77a', - './modules/Notes/metadata/detailviewdefs.php' => '826afd0a9cab3b34cef8bda901108828', + './modules/Notes/metadata/searchdefs.php' => 'b0a3403986b4f99996050a7eabfeaf15', + './modules/Notes/metadata/quickcreatedefs.php' => 'f51f32d4402ce776c96488225198de0c', + './modules/Notes/metadata/listviewdefs.php' => 'c54d81c15fd4693d569ca8969f26b931', + './modules/Notes/metadata/editviewdefs.php' => '978f73693cde87ed4e3e00fe924a6b72', + './modules/Notes/metadata/detailviewdefs.php' => '8642440618e20596686b1ec090b8eeb6', './modules/Notes/metadata/additionalDetails.php' => 'dee7ede2f0db07e060ef69e7d193b862', - './modules/Notes/metadata/SearchFields.php' => 'b1a7b3ea5cbfbe90e3f675278a64d52c', - './modules/Notes/language/en_us.lang.php' => 'a943d66117c8118f2603227b6066c392', + './modules/Notes/metadata/SearchFields.php' => '37a0b16f894f0d7cedf073404424d601', + './modules/Notes/language/en_us.lang.php' => '2b91081058bf9e23ebf93c52a345905a', './modules/Notes/field_arrays.php' => '400e52fbc9b6eadf5db444f142fa6fa7', - './modules/Notes/controller.php' => '5f0c26c4e8eb71dcab090cce6b5730f0', + './modules/Notes/controller.php' => '1cb10d070d451f9f5f1efca44375cd80', './modules/Notes/SubPanelView.php' => 'f099efee6491848eda33f1bb61a927b2', './modules/Notes/SubPanelView.html' => 'f3e126cc96a15934186b9c069d6feb2f', './modules/Notes/NotesQuickCreate.php' => 'b83915d88ed4d6317ffd84edc69e025a', - './modules/Notes/NoteSoap.php' => 'a4f0c48060767dcd129e7c53cfc0bc5c', - './modules/Notes/Note.php' => 'b87b2da97c012ae6e06df8e354432e0c', + './modules/Notes/NoteSoap.php' => '0d6133d32a884e4dce512467b74a9b7c', + './modules/Notes/Note.php' => '385f83e9806d44d5121703e51322b3c6', './modules/Notes/Menu.php' => '80e4a5be7e5f7a316f11f43e646e7dab', './modules/MySettings/language/en_us.lang.php' => '7ab73e2c534ab7d66597730282c87ae3', './modules/MySettings/TabController.php' => '5bccbc225eae09c59583f438f1525a1b', - './modules/MySettings/StoreQuery.php' => '352d80fb2aabd3075a5411d20dd9a4a6', + './modules/MySettings/StoreQuery.php' => '71ba3168bc08f0ab9c8f790a2b49b8fb', './modules/MySettings/LoadTabSubpanels.php' => 'a255e18695ce5a628f77ea5ee52cf87e', - './modules/ModuleBuilder/views/view.wizard.php' => 'c78cb93efd113dde2af478dfc573e804', - './modules/ModuleBuilder/views/view.tree.php' => '0b0b0db7b37c683bc7849394162c3222', - './modules/ModuleBuilder/views/view.searchview.php' => '4db474573b87f1c477d1a4fe27957938', - './modules/ModuleBuilder/views/view.resetmodule.php' => '133a265b7a93a0ba424bef0e518451bf', - './modules/ModuleBuilder/views/view.relationships.php' => 'd66fd2c1ef2b4cca10372f00718bf5d6', - './modules/ModuleBuilder/views/view.relationship.php' => '197a5b2f70e75fb4eecb70845d8f2c6d', - './modules/ModuleBuilder/views/view.property.php' => '1b93903fc16f80366722ea4e866e6556', - './modules/ModuleBuilder/views/view.popupview.php' => '226f20d1a309ada7dd37e7d33673d144', - './modules/ModuleBuilder/views/view.package.php' => '87f70506bf8828439178f39d894caf91', - './modules/ModuleBuilder/views/view.modulelabels.php' => '9dd48dfb5ba54814317ab9caa59a90ce', - './modules/ModuleBuilder/views/view.modulefields.php' => '552a0daeba8fbffc9ec8de6ef4adc687', - './modules/ModuleBuilder/views/view.modulefield.php' => '2da87211a7afadb1fd2a25d7ab84e423', - './modules/ModuleBuilder/views/view.module.php' => '5999056216764952a42fc53d30186e57', - './modules/ModuleBuilder/views/view.main.php' => '0f8f0d634d1370ca67726859d2dc9ca6', - './modules/ModuleBuilder/views/view.listview.php' => 'c2013e0c055b6ad7019a46d201e82c25', - './modules/ModuleBuilder/views/view.layoutview.php' => 'de45ac3a3d6bc24e53d664ae53877b9c', - './modules/ModuleBuilder/views/view.labels.php' => 'eb8d62e1dcc22b1aa1345ec4b2e39c23', - './modules/ModuleBuilder/views/view.home.php' => '52a4628291c14dad6755a3ad43895e82', - './modules/ModuleBuilder/views/view.history.php' => '9aa48373bfbe8324b69facbf2c89aff7', - './modules/ModuleBuilder/views/view.exportcustomizations.php' => '24a0779e56fdfc38baf0f7cf642c5d5e', - './modules/ModuleBuilder/views/view.dropdowns.php' => 'b702280afdb3e55fe695b1959d8e2c85', - './modules/ModuleBuilder/views/view.dropdown.php' => '0281c3b567a564c2a561af85c3fc9168', - './modules/ModuleBuilder/views/view.displaydeployresult.php' => '547cd6a7cbf757cba95ac2d899665cd5', - './modules/ModuleBuilder/views/view.displaydeploy.php' => '3ae8aa51e9e8c51004656380fe505429', - './modules/ModuleBuilder/views/view.deletepackage.php' => '48cac1895df4eb9517b3c10d94a32fac', - './modules/ModuleBuilder/views/view.deletemodule.php' => '7a2dc62d2d18191a6d0119e31037be02', - './modules/ModuleBuilder/views/view.dashlet.php' => '810c4c14c78e698e583dd95c7090eab0', + './modules/ModuleBuilder/views/view.wizard.php' => 'dce66b495e40714975affaa31a6fb324', + './modules/ModuleBuilder/views/view.tree.php' => '8c422f84d52636a46249e3156a45b150', + './modules/ModuleBuilder/views/view.searchview.php' => '398e9e83627e08550efc581bda16b14d', + './modules/ModuleBuilder/views/view.resetmodule.php' => '253dd6d46c7ee4c83bfdaaf9e3d7d8d7', + './modules/ModuleBuilder/views/view.relationships.php' => '906fabe8596b071bb9616c574830b635', + './modules/ModuleBuilder/views/view.relationship.php' => 'a0655a52340421468ffc290c8cf494f7', + './modules/ModuleBuilder/views/view.property.php' => '9f5c61aaab3332f5d1fb0b23843daf97', + './modules/ModuleBuilder/views/view.popupview.php' => 'e5bcb6922c5cabb40b8e5bbe1fb03ba9', + './modules/ModuleBuilder/views/view.package.php' => '03e13291125c78c926ca82f91c1f85d9', + './modules/ModuleBuilder/views/view.modulelabels.php' => '4e9d78635c9a7dc3ac6e2028352bf2e5', + './modules/ModuleBuilder/views/view.modulefields.php' => '902ec448535d4e90bca8bb4493db3bbf', + './modules/ModuleBuilder/views/view.modulefield.php' => '7e59b559a975f3790aaf4bd0ee74928d', + './modules/ModuleBuilder/views/view.module.php' => 'baeb41d40a5a27066bf94464a3aee5a0', + './modules/ModuleBuilder/views/view.main.php' => '68cbc384cbdd87c7a5700b147754f8af', + './modules/ModuleBuilder/views/view.listview.php' => '549357704def83453cd25a89636287cf', + './modules/ModuleBuilder/views/view.layoutview.php' => '9028bef29bc5e09fb162d6cbcb51f39b', + './modules/ModuleBuilder/views/view.labels.php' => '053e3e114f46d507031a358cc871be7d', + './modules/ModuleBuilder/views/view.home.php' => '9e8e883b4bf6674c80117cd89b083067', + './modules/ModuleBuilder/views/view.history.php' => '180d01373bed128968cc07fe8cf1d96e', + './modules/ModuleBuilder/views/view.exportcustomizations.php' => 'edfbc519dde506ebed9b838ba5be3e7e', + './modules/ModuleBuilder/views/view.dropdowns.php' => '686360d013ab5133c6081e51ef1939b4', + './modules/ModuleBuilder/views/view.dropdown.php' => 'b4c70d5eb481d7f1d6ccc70c8a1eea89', + './modules/ModuleBuilder/views/view.displaydeployresult.php' => 'ffbfebb8217a0c453f66a851131902c3', + './modules/ModuleBuilder/views/view.displaydeploy.php' => 'c2986ecb0eb107f3d25d675a5d8d01e8', + './modules/ModuleBuilder/views/view.deletepackage.php' => 'f62a473721f4f62345e7a90c07be6a8e', + './modules/ModuleBuilder/views/view.deletemodule.php' => '1405d85364da873684875e83c2a49a57', + './modules/ModuleBuilder/views/view.dashlet.php' => 'eb83a4ea9e25cfe13e9af72eb4276f6f', './modules/ModuleBuilder/tpls/wizard.tpl' => 'a16245f3694aaface1daf7cea52d235f', './modules/ModuleBuilder/tpls/tabBG.png' => '8e2561b0bba66f327d602e6c5f06aa08', './modules/ModuleBuilder/tpls/studioRelationships.tpl' => '63559e6743033f514eed689f5d458afa', './modules/ModuleBuilder/tpls/studioRelationship.tpl' => '8d7177bfcec39edddafae33573525c76', './modules/ModuleBuilder/tpls/resetModule.tpl' => '237bb16f4bfcd274404bfd261cc86d9c', './modules/ModuleBuilder/tpls/main.tpl' => '0a16177d0083d8db2c2821333164ee60', - './modules/ModuleBuilder/tpls/listView.tpl' => '232f172456a901a19f8ddf43510bc101', - './modules/ModuleBuilder/tpls/layoutView.tpl' => 'c12c505cde12cc8aec12c98f3a5b6eff', - './modules/ModuleBuilder/tpls/labels.tpl' => 'a7b10e70775c426d60830ea5e28ca413', + './modules/ModuleBuilder/tpls/listView.tpl' => 'd0c356b09ae3af65eb71a268dfd51895', + './modules/ModuleBuilder/tpls/layoutView.tpl' => '3ef07b98cfdfca8e649044b8041ba3ff', + './modules/ModuleBuilder/tpls/labels.tpl' => '57d6e517b4d1c714cc0f233c97274888', './modules/ModuleBuilder/tpls/index.tpl' => '9d267e68e0a713836dab11f5af3eb128', './modules/ModuleBuilder/tpls/includes.tpl' => '957fb37ef63708de02f5ff7495adb210', './modules/ModuleBuilder/tpls/history.tpl' => 'e75aad72381176b2b21a711956bcc025', './modules/ModuleBuilder/tpls/exportcustomizations.tpl' => '3f3a4edb5afbf1a87407de76ffd73b99', './modules/ModuleBuilder/tpls/editProperty.tpl' => '3e857e332bc62ea5849d60e262e57acc', './modules/ModuleBuilder/tpls/assistantJavascript.tpl' => '698546e9a25c7d0fdd69010b61ce5c0e', - './modules/ModuleBuilder/tpls/Preview/listView.tpl' => 'fc840cefbd0db68cad7dc06c3438bfbf', - './modules/ModuleBuilder/tpls/Preview/layoutView.tpl' => '656d3caf168fbccc5e5021e2916c72ae', - './modules/ModuleBuilder/tpls/MBPackage/package.tpl' => '2452daa01c1eca76c302600e0d08c4ba', + './modules/ModuleBuilder/tpls/Preview/listView.tpl' => '4c7e1035c413b4aa4bcaea1bc0914f81', + './modules/ModuleBuilder/tpls/Preview/layoutView.tpl' => '55bb032faa6fb73ff0127b63908769dc', + './modules/ModuleBuilder/tpls/MBPackage/package.tpl' => '9422d3366e252a805caea901f9f87aba', './modules/ModuleBuilder/tpls/MBPackage/deploy.tpl' => 'f7a7d0f2489b9caaef8f9cdfb25b4341', './modules/ModuleBuilder/tpls/MBPackage/appLanguage.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', - './modules/ModuleBuilder/tpls/MBModule/vardef.tpl' => '760c0eb16b8c95e971cfd0c7f01fc721', - './modules/ModuleBuilder/tpls/MBModule/module.tpl' => 'c211e3fe7226fa5e8e9db3ef854b536f', + './modules/ModuleBuilder/tpls/MBModule/vardef.tpl' => '2b8da71ad6a39b38d7ad25777de86493', + './modules/ModuleBuilder/tpls/MBModule/module.tpl' => '5131d437c7e75288baa6a02a6db46944', './modules/ModuleBuilder/tpls/MBModule/main.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/ModuleBuilder/tpls/MBModule/language.tpl' => 'f27ee7b7829bcb7f1306eb2153311f52', './modules/ModuleBuilder/tpls/MBModule/form.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/ModuleBuilder/tpls/MBModule/fields.tpl' => '1bf6aabbf8867f70b65df84518225b2f', './modules/ModuleBuilder/tpls/MBModule/field.tpl' => '02bd0401451644635445f344cdb3c6ba', './modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl' => 'fb5fef35a8894f518fe2f968c475977b', - './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => '62a3119527321d55ba7dbc3aa63dae9c', + './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => 'f48d693f85b7c1600358cf20de52b229', './modules/ModuleBuilder/tpls/MBModule/dropdown.css' => 'd80cad459209446b7e37eb50cc587402', './modules/ModuleBuilder/tpls/MBModule/Studio.tpl' => 'b22f8728a3a2587c2fb320b41f98e7f7', './modules/ModuleBuilder/tpls/MBModule/Menu.tpl' => '5c3fb02c1df609001b6b1befbf279fa7', './modules/ModuleBuilder/tpls/MBModule/DeveloperClass.tpl' => 'f88daf535fbee9bcace71677a659e750', './modules/ModuleBuilder/tpls/MBModule/Class.tpl' => '6b2e3d2e8cf7d24a444db0bdf833ee62', - './modules/ModuleBuilder/tpls/MB.css' => '5b3eb2ed2f3f390d28eea73c8cd38078', + './modules/ModuleBuilder/tpls/MB.css' => 'e78dc7d86d69e28b7ec065ba94679004', './modules/ModuleBuilder/tpls/ListEditor.css' => 'f602eca9103560b387d46714b556e9d4', './modules/ModuleBuilder/tpls/LayoutEditor.css' => 'e7f0eba7b6239f17056c9cf08b47a442', './modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php' => '8bf52486443c355c8b79e5fd1dc9cbbc', @@ -1815,14 +1771,14 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php' => 'b14ee5d20098eae316c670beccc64d59', './modules/ModuleBuilder/parsers/views/MetaDataParserInterface.php' => '9d05e19877d06257eaaa968336df70b2', './modules/ModuleBuilder/parsers/views/MetaDataImplementationInterface.php' => 'b162f891343be882c5592f2739565698', - './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => '6a6a48db17770889a0196bdc9ab3401f', + './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => 'efaa7a60159ae33195ff623fd4b6190e', './modules/ModuleBuilder/parsers/views/HistoryInterface.php' => 'eaccd7749cff5a9691088dce27bca75b', - './modules/ModuleBuilder/parsers/views/History.php' => 'c5165637f19abda0bdc5d643c479a6a5', - './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '0e4184f03a851dcbb669dbbcbcb32a49', + './modules/ModuleBuilder/parsers/views/History.php' => '46d2243c49e6872711077ed7c5e91b60', + './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '369aacb93f523e94e7c5031fab95fc57', './modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php' => '2c71bd7109457cb13c47e58a62c93272', - './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => 'bf6dd668cd14bf4e144951464af6a866', + './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => '64d88ca7d8cf05cc497ab872b503f0ac', './modules/ModuleBuilder/parsers/views/DashletMetaDataParser.php' => '3b4e0e01a297836dcd1082a5ba8c32ea', - './modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php' => '1676f510869784d571936d48bba17a58', + './modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php' => '49c7960683e2651956bbe4383cbf4e1a', './modules/ModuleBuilder/parsers/views/AbstractMetaDataImplementation.php' => '1cec425320c098a6cf3e280695ec7597', './modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php' => '198956b7f5e0b2503f887b34ca47c520', './modules/ModuleBuilder/parsers/relationships/RelationshipsInterface.php' => 'a3a82ab6f159ecffbe915f6ee51306cb', @@ -1831,20 +1787,20 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/OneToManyRelationship.php' => '76396e8d76dda04e4b907df7903a6a95', './modules/ModuleBuilder/parsers/relationships/ManyToOneRelationship.php' => '41d2a9d5654fd04996e24e34d237e4b6', './modules/ModuleBuilder/parsers/relationships/ManyToManyRelationship.php' => 'c585937c42e7f7d3922f5a79d98b3e88', - './modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' => '0541d0eefaba34110ca17fa25d2f5f37', + './modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' => '227f7879fd0945c6078e572a6c487f57', './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => '7fbd2c704593caf04aa9931c8cfe51b9', './modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php' => '22af5ffa09c436902cb68c41735cd999', - './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '4c2f2157798042c7d48ff8f92c59c22d', + './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '1dfe9673f0e743ede2dc1d981ad8a11b', './modules/ModuleBuilder/parsers/parser.modifysubpanel.php' => 'fb93686dcd29da10fccd9cca776665f5', - './modules/ModuleBuilder/parsers/parser.modifylistview.php' => '12e5f85436196e5716253850bff129d9', + './modules/ModuleBuilder/parsers/parser.modifylistview.php' => 'a4704c3dfc035e679fdcaec1f9079a6c', './modules/ModuleBuilder/parsers/parser.modifylayoutview.php' => '491f9ca2bd0dc9f0f8e671b4476b788e', './modules/ModuleBuilder/parsers/parser.label.php' => 'a964a5c343d8cb136cd8832ec5bc5e86', './modules/ModuleBuilder/parsers/parser.dropdown.php' => '0ef3cd0b11a27b01aa2c0f157f16b972', - './modules/ModuleBuilder/parsers/constants.php' => '878317c7a56c70704155d04d03af5990', - './modules/ModuleBuilder/parsers/StandardField.php' => 'a3c5f7fe7ff730579b881375e8e8a4de', - './modules/ModuleBuilder/parsers/ParserFactory.php' => 'f89c6c2f309d0e0f126e00ed79b58cd2', + './modules/ModuleBuilder/parsers/constants.php' => '03eee70cf3d3f8a406bddb01f6981a1c', + './modules/ModuleBuilder/parsers/StandardField.php' => '39ac1c87daac50370426647c2bdc9f39', + './modules/ModuleBuilder/parsers/ParserFactory.php' => '9ecab133de55df70f066f4716772f0df', './modules/ModuleBuilder/parsers/ModuleBuilderParser.php' => 'aaa840032d534a6f9feb5d0fe2f472ad', - './modules/ModuleBuilder/language/en_us.lang.php' => '053510ff32cbe2ec9fa439b938e304f4', + './modules/ModuleBuilder/language/en_us.lang.php' => '0264f6bde36c0331d9ff2b26eac6a48a', './modules/ModuleBuilder/javascript/wizardTemplate.js' => '9060030ef8eec5650ec7d47c2559aa3b', './modules/ModuleBuilder/javascript/studiotabgroups.js' => '0f917259b698ddac0270c8a6220ffad4', './modules/ModuleBuilder/javascript/studio2RowDD.js' => 'ee99ce0578e0505cb0a7fe4c2597141d', @@ -1852,10 +1808,10 @@ $md5_string = array ( './modules/ModuleBuilder/javascript/studio2ListDD.js' => '6711ade762b75e9fa47c6d7cf1796c3b', './modules/ModuleBuilder/javascript/studio2FieldDD.js' => 'e779f376e6e70d5815404581effc3cfc', './modules/ModuleBuilder/javascript/studio2.js' => '9f36fc7bf59b444a8e36409efe1299b4', - './modules/ModuleBuilder/javascript/SimpleList.js' => '27e1aa030d4084001416b400b8fc0dae', - './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '0a94445bf3c4c2a4146913dfbb35c8ce', + './modules/ModuleBuilder/javascript/SimpleList.js' => 'd9980787b70131d1b8089047fcad8521', + './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '51db66da7395f3fa8415ddba44da1471', './modules/ModuleBuilder/javascript/JSTransaction.js' => '33c082aaee31dd249e66c6a929e66dea', - './modules/ModuleBuilder/controller.php' => '06d73ecafdf17c991f34ad8945a786ac', + './modules/ModuleBuilder/controller.php' => '08b5591d11a918168f828c9daa5fbb3a', './modules/ModuleBuilder/action_view_map.php' => 'd1b1c375b7ebecd14628498dcad8dbe6', './modules/ModuleBuilder/Module/StudioTree.php' => '7aab267a0af104084a1b23c4ecab97e0', './modules/ModuleBuilder/Module/StudioModuleFactory.php' => '864942db27c8f1414dd0da5e63ee4a82', @@ -1869,18 +1825,18 @@ $md5_string = array ( './modules/ModuleBuilder/MB/MBVardefs.php' => 'f4170e6c5a68c8e315863d1693fbc0ba', './modules/ModuleBuilder/MB/MBRelationship.php' => '798e37becc33cfb9eb779b0eebf620c8', './modules/ModuleBuilder/MB/MBPackageTree.php' => '16ec5240bb853fa7595523b1b4f9f759', - './modules/ModuleBuilder/MB/MBPackage.php' => 'e4cd835c9c6e5f03ba7cbd73ce225467', + './modules/ModuleBuilder/MB/MBPackage.php' => 'a40c16f4f28572e3eb456fd9253580d3', './modules/ModuleBuilder/MB/MBModule.php' => '8866b13863363e31859883301835c378', - './modules/ModuleBuilder/MB/MBLanguage.php' => '3d19c7397e80b0a6f9ee3d5b37650966', + './modules/ModuleBuilder/MB/MBLanguage.php' => '3abd2db19c015b066f9623b0bc8e89a9', './modules/ModuleBuilder/MB/MBField.php' => '7d1e217fe809e63a3b4e6194ab0205dc', './modules/ModuleBuilder/MB/AjaxCompose.php' => '5482b26bfd548f815c4fdac0668f5075', './modules/ModuleBuilder/Forms.php' => 'e773d1cb9319008bb56c2522ab5021c4', './modules/MergeRecords/Merge.js' => '87d60172b31ff1a67ec5bb451db58a66', './modules/MergeRecords/vardefs.php' => '3ce697d50bfc595a8bb0241a7ca7455e', './modules/MergeRecords/language/en_us.lang.php' => 'f00c0932118f3adb4e78e2dc2411e6b8', - './modules/MergeRecords/index.php' => '3f1c68981f5902a648a17018e24ca43a', + './modules/MergeRecords/index.php' => '63b09ff3b637f6979962c554f9e77486', './modules/MergeRecords/controller.php' => '0865944914ee968c2bc1892da8940b31', - './modules/MergeRecords/Step3.php' => '729eee15723be80eb1ff81ca80201d2a', + './modules/MergeRecords/Step3.php' => '4c656f17668f2786d10b51115e7d376f', './modules/MergeRecords/Step3.html' => '5fde8a3ec87d93058ec6045c2c012f9a', './modules/MergeRecords/Step2.php' => 'be0020ae7d92d5e0eeeb6478f34058b0', './modules/MergeRecords/Step2.html' => 'ccf7c2669435aa24c38921880ad863e9', @@ -1888,44 +1844,39 @@ $md5_string = array ( './modules/MergeRecords/Step1.html' => '0141495f28378923446c97f24e17029f', './modules/MergeRecords/SearchForm.html' => '11f0b679a10c34338e9758ede1e86e93', './modules/MergeRecords/SaveMerge.php' => '9b196e0c0d3a1df0fc1748881bc72de8', - './modules/MergeRecords/MergeRecord.php' => 'a1e9378d97dd8f76b6314e5973381791', + './modules/MergeRecords/MergeRecord.php' => 'bada4760d390041f6da0799d177f5fa1', './modules/MergeRecords/MergeField.html' => 'c00b7430a29310be7eccf3f9791634a0', './modules/MergeRecords/Menu.php' => 'ad435ab227b7f339d340692eb81630d7', './modules/Meetings/jsclass_scheduler.js' => 'd2cd2f86a5c7792d7dd5976c7b410477', - './modules/Meetings/action_view_map.php' => '9353afb9cdccf0e50f984924645ea51e', - './modules/Meetings/JoinExternalMeeting.php' => 'd72c9518022c7b61fc939e27c9812437', - './modules/Meetings/views/view.listbytype.php' => '3942bad99c026b8e31166be85fedd59a', - './modules/Meetings/views/view.edit.php' => 'dc124e1a3d940c169ef609916851f634', - './modules/Meetings/vardefs.php' => 'f67ecb02f108bead3a03713fc5c12258', - './modules/Meetings/tpls/extMeetingNotInvited.tpl' => 'a16fac6c2878a546b25b7b8f96db6fd7', - './modules/Meetings/tpls/extMeetingNoStart.tpl' => '8f26c8850c6c4b011169f7703a301037', + './modules/Meetings/views/view.edit.php' => '2924ae498a1b3c6dbea4e1d66c9d6055', + './modules/Meetings/vardefs.php' => '408dedbb74b5dc7e11710f8c3180d7e1', './modules/Meetings/tpls/header.tpl' => '66489a8b22323aff40e2d825ccb17a9b', './modules/Meetings/tpls/footer.tpl' => 'c21ee3bf6df9db67b7ca95e0103ed207', './modules/Meetings/tpls/QuickCreate.tpl' => '3059bfc6a2c0b602aec17947eed77342', './modules/Meetings/metadata/subpanels/default.php' => '35394792be32e74f512ee190915aba45', './modules/Meetings/metadata/subpanels/ForHistory.php' => '7f8e8880c8454608aa5c245221d1e13b', - './modules/Meetings/metadata/subpanels/ForActivities.php' => '956443c7fefc8526ea83d54cd6952309', - './modules/Meetings/metadata/subpaneldefs.php' => 'e50d977f6a64ce9f6846b4f3dcd87668', + './modules/Meetings/metadata/subpanels/ForActivities.php' => '2652443c2d322f5113f675fc62c10046', + './modules/Meetings/metadata/subpaneldefs.php' => 'e8c2167e4ef1591dd3fd0de965d7d1b6', './modules/Meetings/metadata/studio.php' => '1981fa5a4500fc8baa39805f20774581', - './modules/Meetings/metadata/searchdefs.php' => '88c16d8f11fd6069d31377b27661dbfa', - './modules/Meetings/metadata/quickcreatedefs.php' => '114fac63f776dd420fde02d967e3b67f', - './modules/Meetings/metadata/listviewdefs.php' => 'ad9666beb71a77b362266866b0d9a7ac', - './modules/Meetings/metadata/editviewdefs.php' => '9322e10ac0c22822659c7cb362b15015', - './modules/Meetings/metadata/detailviewdefs.php' => '3a24ccd7bcb969cf3a56851cd871353b', + './modules/Meetings/metadata/searchdefs.php' => '056493268e8e66a39fef9ee9f4ba959f', + './modules/Meetings/metadata/quickcreatedefs.php' => 'f1b7a993d49a66490867225b42f47322', + './modules/Meetings/metadata/listviewdefs.php' => '81edf24437648d5db752a95448194383', + './modules/Meetings/metadata/editviewdefs.php' => '1889fd16ad1b57d95367030d495fd56c', + './modules/Meetings/metadata/detailviewdefs.php' => '35a74cc3453f5b7ac82b6bcbd05e0e22', './modules/Meetings/metadata/additionalDetails.php' => '17521ec60172b283b5f70d0530554f19', - './modules/Meetings/metadata/SearchFields.php' => 'ac6b61f3370200cbd09d80308774f41f', - './modules/Meetings/language/en_us.lang.php' => '72aa9397c10cc6dc1739c7645ba4d87f', + './modules/Meetings/metadata/SearchFields.php' => '38b09a7df284cda26356f70116e05081', + './modules/Meetings/language/en_us.lang.php' => '32f6aef72e5bb3add0df6e39fba23d0f', './modules/Meetings/field_arrays.php' => '841aa6a94d88a3ded39d98a1fca9ef1f', './modules/Meetings/SubPanelViewInvitees.php' => '1b7e228b1f978364ef44d6c685ea8a43', './modules/Meetings/SubPanelViewInvitees.html' => 'b326b8407ec99cf7bf729b4abb1ebdbd', './modules/Meetings/Save.php' => '78a9978019f2574a6cb3e245d50c2271', './modules/Meetings/Menu.php' => '1228f556ef6077e055d6a3c3c54961b2', - './modules/Meetings/MeetingsQuickCreate.php' => 'fe1af8fffc9869640fbced53801515ab', - './modules/Meetings/MeetingFormBase.php' => '0b976469ad53ec8902864c9febfb089d', - './modules/Meetings/Meeting.php' => '84eef79555d3b39b393efedcdccbaee3', - './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => '2a3fa5ad5e35ee01c5cb9517dbdd4924', + './modules/Meetings/MeetingsQuickCreate.php' => 'bc6190518fef5a3829c11df07a20c5e6', + './modules/Meetings/MeetingFormBase.php' => '2161e345371973a954d1a138372baf1b', + './modules/Meetings/Meeting.php' => 'f4adfdaa23b640cfe9f17e77c87c0af9', + './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => 'b2b85ea21e6aaebac274802267d0e40e', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.meta.php' => '17de05e1c0f4594e7e6fae86634c1871', - './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => 'bf07be2a58971f99255feb513e3c4a68', + './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => '7b812776b5a762e900b74fc498070be5', './modules/MailMerge/modules_array.php' => 'd7429db3ce45e1f3892bae3c16f7c648', './modules/MailMerge/language/en_us.lang.php' => 'b4f2b23f8c783c30d9bd978504f71244', './modules/MailMerge/index.php' => '83016d79c0d5339fb29cbf810f2db535', @@ -1938,7 +1889,7 @@ $md5_string = array ( './modules/MailMerge/Step3.html' => 'eb56b14c55aeda67fa0fcbb20389972e', './modules/MailMerge/Step2.php' => 'f9aefe6dc3ea6918799f6b702e5ef583', './modules/MailMerge/Step2.html' => '8b7a503eec1252b74963375cd95f84db', - './modules/MailMerge/Step1.php' => '08d7c525f2d4e7c884370e7a9c537907', + './modules/MailMerge/Step1.php' => 'a7af0a82614b047d926f1c663b9011d0', './modules/MailMerge/Step1.html' => 'f931d9d6a0068e27fbfe2fd7eb1d6c1a', './modules/MailMerge/Save.php' => '46e066bc591a9bab82b3045eeb54c01a', './modules/MailMerge/Merge.php' => '1fb9ec1f8b2b00da9902e3285c81552a', @@ -1948,9 +1899,8 @@ $md5_string = array ( './modules/MailMerge/EditView.php' => '8af659df9972420db817b302cdf6d2e7', './modules/MailMerge/DetailView.php' => '75ff223c12372a4313b3de488108fef1', './modules/Leads/Lead.js' => '8cddbfd55de6fb05ae7feaf42a68c700', - './modules/Leads/views/view.list.php' => '79cee6cbb0929820b27cacc3ae3cea68', - './modules/Leads/views/view.convertlead.php' => '1ac0edb8f44834e9235bd5229b556e03', - './modules/Leads/vardefs.php' => 'e2410b82291f154d12877b5e4e61f847', + './modules/Leads/views/view.convertlead.php' => 'aa1a0c21b7615d8c8b49b57f7c6df36d', + './modules/Leads/vardefs.php' => '58a8f00cb3ba6c9b32a0da9fb366a2ed', './modules/Leads/tpls/QuickCreate.tpl' => 'a76c0c529eadb1bef44454e7c7f5ebd9', './modules/Leads/tpls/DetailViewHeader.tpl' => 'f075c3a6effa72926e1a0f8a5cd5e6a6', './modules/Leads/tpls/ConvertLeadHeader.tpl' => '6ca934f6a0fb7829c2df9efc1c752108', @@ -1962,16 +1912,16 @@ $md5_string = array ( './modules/Leads/metadata/subpanels/ForCalls.php' => 'b3c3c02da24f25cce0a7cf478de67809', './modules/Leads/metadata/subpaneldefs.php' => 'e8771108264fcc6a9c01794505f4b003', './modules/Leads/metadata/studio.php' => '1d2702e596cf568c7705f857b207b481', - './modules/Leads/metadata/searchdefs.php' => '7839892852980e0f4f1196fd29f0b95c', + './modules/Leads/metadata/searchdefs.php' => '29d85d75ed9a9eba2a6120a78a10bfc5', './modules/Leads/metadata/quickcreatedefs.php' => '211f03435d7664712fc459ed0d396def', './modules/Leads/metadata/popupdefs.php' => '8bd61ecd2395b404135d6a2444d04566', - './modules/Leads/metadata/listviewdefs.php' => 'f3d23bdd5032749f94537349ff4c94f3', + './modules/Leads/metadata/listviewdefs.php' => 'c3d02d0c5de08987b6c245ef4a1b3923', './modules/Leads/metadata/editviewdefs.php' => 'ac0c2ae2f4302dff9957ee83606a4e94', - './modules/Leads/metadata/detailviewdefs.php' => '8c2dd819d9e99e5546f973c983605670', + './modules/Leads/metadata/detailviewdefs.php' => 'a19d96a4229f2e2ca88f2a8b4a7483eb', './modules/Leads/metadata/convertdefs.php' => '5b9422be772856ad372ff43cf37d1cab', - './modules/Leads/metadata/additionalDetails.php' => '7a0e37d6e021a4c3ae185f17f9bf56c0', - './modules/Leads/metadata/SearchFields.php' => '1105a52bed12ef1761e91ad890946140', - './modules/Leads/language/en_us.lang.php' => '034728e804b4cd847563a7b688f78fa0', + './modules/Leads/metadata/additionalDetails.php' => 'b3f8be2e143c9b01811710afceb33d06', + './modules/Leads/metadata/SearchFields.php' => 'c02d24c19aa7270d2281e707185af612', + './modules/Leads/language/en_us.lang.php' => '2abdc8d527b2d295cca31af3d30d901f', './modules/Leads/field_arrays.php' => '43f3d073ac584e5347be1edcd18e269c', './modules/Leads/controller.php' => '23f4cec6b391edf5ffa887e12120a7ad', './modules/Leads/action_view_map.php' => '667e4d332ea94abca24d8ee7f2feeb45', @@ -1985,7 +1935,7 @@ $md5_string = array ( './modules/Leads/Menu.php' => '9ff4db24b9e03909f7de8f0d3d89282f', './modules/Leads/LeadsQuickCreate.php' => '07ed1970eab3cbe82f3378aa43cfa54a', './modules/Leads/LeadFormBase.php' => 'd4ec745504b5dd5eb0d9cbff540eb38b', - './modules/Leads/Lead.php' => '761737b8018b56465224b8387b7248d3', + './modules/Leads/Lead.php' => '86c4acd62013cc4703199a5b0367560f', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.php' => 'd7e1e39172ab361dbfe553bad41145b5', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.meta.php' => '854c043c1061766f86fad727cc3f8b82', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.data.php' => 'd9d36456f7df31eec9941743f4a5b740', @@ -1995,46 +1945,47 @@ $md5_string = array ( './modules/LabelEditor/Menu.php' => 'afc3a627ab78a69c58b586095e79864a', './modules/LabelEditor/LabelList.php' => 'f23746d552d021ad5a19d2fb3d226f3d', './modules/LabelEditor/Forms.php' => 'fbafcea6235be8a109124d1870e5c76d', - './modules/LabelEditor/EditView.php' => '2eeb9a92ec8f14e4ecb1587aa59c3ff5', + './modules/LabelEditor/EditView.php' => '1c932d2d28064843f23ba12afb58a36e', './modules/LabelEditor/EditView.html' => 'd26998cd92945e931f4207509bd8444f', - './modules/InboundEmail/InboundEmail.js' => '40dcced2eee76088930804d810e19eb4', + './modules/InboundEmail/InboundEmail.js' => 'f5529449f6400759414f30a06c7fc308', './modules/InboundEmail/vardefs.php' => 'b502ad0ed0fbd0756c8dbfea8e6f0c3b', + './modules/InboundEmail/parseEncoding.php' => 'e577543f1dd4acdd9e1e56873612abe1', './modules/InboundEmail/language/en_us.lang.php' => '6efdc5c47a673ba196569159bb1da72f', - './modules/InboundEmail/index.php' => '8b465dd0e7055136f21eaddba390a92f', + './modules/InboundEmail/index.php' => 'b0194cbf89267c46b189e732cf43f902', './modules/InboundEmail/field_arrays.php' => 'a4337fd64c1ff5c5a78d6c3d1dda4960', './modules/InboundEmail/View.html' => '58f26da62e64f0630806e6dde187a357', - './modules/InboundEmail/ShowInboundFoldersList.php' => '45d7e8bfbff96456cb27a9f1ef3eea3c', + './modules/InboundEmail/ShowInboundFoldersList.php' => '9c96a82630327ce3de3ce4d3fd1053f8', './modules/InboundEmail/SaveGroupFolder.php' => 'b25cf3f6fae0a6220773c43966dfccdc', - './modules/InboundEmail/Save.php' => 'd1fa0cd35ffbb8b3e17687ee2225dde9', - './modules/InboundEmail/Popup.php' => 'dae5482f102fb7cbbcedd46b2cf6a550', + './modules/InboundEmail/Save.php' => '0e98437ecdf8dab66b0baa4c97ebb9a5', + './modules/InboundEmail/Popup.php' => '8aba5d50bea10d7bda49061ff6c5464e', './modules/InboundEmail/Menu.php' => '79c0619ae84aa23303de599889406019', './modules/InboundEmail/ListView.php' => '693d6cb94dede156a0ddf15b031ff031', './modules/InboundEmail/ListView.html' => 'd198339eed60a1f901c0082646ac3707', './modules/InboundEmail/InboundEmailTest.php' => '18e54a84dd10ebbdb875c4a0c2887bc9', - './modules/InboundEmail/InboundEmail.php' => '2f8914619fa8d6e4f1208dffd2f72be2', - './modules/InboundEmail/EditView.php' => '97e92df283f59d8beeafabe686c65a3e', - './modules/InboundEmail/EditView.html' => 'ae48de7b568c54f7891f5751651059d6', + './modules/InboundEmail/InboundEmail.php' => '0bd12b0c9353bf7775e97b5f69f0b8b9', + './modules/InboundEmail/EditView.php' => '62a789dc4ceb7b72bf6f79a096fc144d', + './modules/InboundEmail/EditView.html' => '0b756715535c7191425071dcdef5d345', './modules/InboundEmail/EditGroupFolder.php' => '52d841e00eeb5d43c736de0adbc5293f', - './modules/InboundEmail/DetailView.php' => '90c04ee9076496043b423a96ae44d155', + './modules/InboundEmail/DetailView.php' => '83323c4e3516f55322d710e296fd518d', './modules/InboundEmail/DetailView.html' => 'c26f51c1f5b4d301c56e773de896758d', './modules/InboundEmail/Delete.php' => '783bea5996b38be48d88bef0edf1189c', - './modules/Import/views/view.undo.php' => '57d944180c9f39b54a7a435fa2095154', - './modules/Import/views/view.step4.php' => 'b6022b98fe0d660c6bb842e8525097c6', - './modules/Import/views/view.step3.php' => 'afc16e641c2e311a1b1e6d800c14f3de', - './modules/Import/views/view.step2.php' => '942f30486caf79d52ae3e86af9c8f7a9', - './modules/Import/views/view.step1.php' => '9e56c783069b59b6513b0fccbc48fc40', - './modules/Import/views/view.last.php' => 'e3499c1f445cbae2ec6ec326ce8dafe8', - './modules/Import/views/view.error.php' => 'c19b5de391cdd9f4106ae85b9e0f4d51', + './modules/Import/views/view.undo.php' => 'c9c39ae6895b2cd309d0297762d0d7c3', + './modules/Import/views/view.step4.php' => '5e657863cf33cb02c97ce882adceaf87', + './modules/Import/views/view.step3.php' => '96b0b72042bde55665a8df8ca5af4163', + './modules/Import/views/view.step2.php' => '6db5b4581dc8c629f521e55282c96653', + './modules/Import/views/view.step1.php' => '745eb37b58b2fa5f720ab33d5d52fc68', + './modules/Import/views/view.last.php' => 'e1a31a5397f783f6ddcc4bc246bbb384', + './modules/Import/views/view.error.php' => '3316030141e5b0bfc56f406e46af8f55', './modules/Import/vardefs.php' => 'f386f7b3e194e8c0b6175b60671b4f11', './modules/Import/tpls/undo.tpl' => '07c0a5ae1d14facd9cb291f1d1c19f87', - './modules/Import/tpls/step3.tpl' => '821dd850badcf325d7f817ec164919df', + './modules/Import/tpls/step3.tpl' => '484240a496b0f1222a10315e14161072', './modules/Import/tpls/step2.tpl' => '79a84e8cb8caafc13d4636c6d5230914', - './modules/Import/tpls/step1.tpl' => 'd5be2d2396844d8e542a5be53b0cafb9', + './modules/Import/tpls/step1.tpl' => '9e85fde9ad5874f9008adad00fa0c5fb', './modules/Import/tpls/last.tpl' => 'cd2f76b2e8991cacaa7cb6504360e67d', './modules/Import/tpls/error.tpl' => '4c561e896c8cf26a72f934fc83b08ab6', './modules/Import/language/en_us.lang.php' => '83f1561638750f5f5f9c4e773aa86cf7', - './modules/Import/controller.php' => 'e81e3c248c0f2533bc3a30bae4adda96', - './modules/Import/UsersLastImport.php' => '9537110142dab755d1536ef0e438df91', + './modules/Import/controller.php' => '2cc7b89128f802b8893d48a62b594922', + './modules/Import/UsersLastImport.php' => 'b4b6454a31546df2bcc9357a7de26bd5', './modules/Import/Menu.php' => '4231e11718ef59bbaca20b46ea195950', './modules/Import/ImportMapTab.php' => 'c34339dd1b1c691ad605f7b2316c56e6', './modules/Import/ImportMapSalesforce.php' => '539a104896e214c018c8c81669236220', @@ -2042,56 +1993,55 @@ $md5_string = array ( './modules/Import/ImportMapOther.php' => 'fe11a14b72acbe9cde4511c5d7e4a09e', './modules/Import/ImportMapCsv.php' => '448d8931c85cacc4179120c2a20c4bc7', './modules/Import/ImportMapAct.php' => '78df0dfb26f4c89dd23eda4329917d70', - './modules/Import/ImportMap.php' => '8c3c3445cd1109331517d0f2be193c35', + './modules/Import/ImportMap.php' => 'b7db765d8c3858806609d1bbf03b762a', './modules/Import/ImportFileSplitter.php' => 'ff77217515cea4fe6bef98f72efbca20', - './modules/Import/ImportFile.php' => '1e67c950bc97e690c4c39dc58f3694ad', - './modules/Import/ImportFieldSanitize.php' => 'ef42108beab1cae966874ee9d12b9e70', - './modules/Import/ImportDuplicateCheck.php' => 'ffa9c7513f3ad00c70645e86ef686264', + './modules/Import/ImportFile.php' => 'af807c66046428b2b477145dd8af0640', + './modules/Import/ImportFieldSanitize.php' => 'aed1ef216ba5113b298c66ea76e37871', + './modules/Import/ImportDuplicateCheck.php' => '57907930d522a2c2dfb2dd35dc7742ab', './modules/Import/ImportCacheFiles.php' => '7ccd3d16e86f7e244afa2c3ec79d6585', - './modules/Import/Forms.php' => 'aa21c1468d24d31d1c1a8c2071acb940', + './modules/Import/Forms.php' => '708fc2a8218e0de6502b8998e358a722', './modules/Home/about.js' => 'd15c260b194de31361e331b841bff4fc', - './modules/Home/action_view_map.php' => '0fb6609851be65b5c71cb78738cddfda', - './modules/Home/views/view.additionaldetailsretrieve.php' => '4c1b017c7466a4d08e2fca1b5210e5a7', + './modules/Home/AdditionalDetailsRetrieve.php' => '35923423e5615a0e8287a37e1100db77', './modules/Home/views/view.modulelistmenu.php' => '53cad4dd9a279abd1f93be32d4c2249a', './modules/Home/views/view.list.php' => '24f2acac32fc46bba2b65617f742021b', './modules/Home/sitemap.tpl' => '0aaf71c46029f50c65cfc40244f4c123', './modules/Home/sitemap.php' => 'dc0b3803d35cd2a5dafb7ab98dd881b1', - './modules/Home/quicksearchQuery.php' => '7b3025ec8d69ab7e770a187f02d0f020', - './modules/Home/language/en_us.lang.php' => 'a412cb38ef330fac398279e30352fe42', + './modules/Home/quicksearchQuery.php' => '92c0211a1b821a7177cc1cdbe467e7f3', + './modules/Home/language/en_us.lang.php' => '2b5b75684a2af9b6e0917185a953ac1d', './modules/Home/dashlets.php' => '3336d96f1a154c5e8bb4486666d1e343', - './modules/Home/UnifiedSearchAdvancedResults.tpl' => 'ece94de0e868fd044c148642e5b821d0', - './modules/Home/UnifiedSearchAdvancedForm.tpl' => '3afe71c2a3ab906e6d832a909b8a4f73', - './modules/Home/index.php' => '65bacfb3bc4d126ebabe55e645f8a193', - './modules/Home/UnifiedSearchAdvanced.tpl' => '5133d64ca90bb45329fcb9fa8bad2e01', - './modules/Home/UnifiedSearchAdvanced.php' => '94d5fb5eede6e6fd92334d7c71bdbff1', + './modules/Home/index.php' => '7c47180fc37b9d6db14d0779c31e8f86', + './modules/Home/UnifiedSearchAdvancedResults.tpl' => '62a9ade6298d3c0586cb3efc6458cd03', + './modules/Home/UnifiedSearchAdvancedForm.tpl' => '950b855387ca97604ce46139f891f968', + './modules/Home/UnifiedSearchAdvanced.tpl' => 'e110afb39472a0caaee575afd3cbfeee', + './modules/Home/UnifiedSearchAdvanced.php' => 'fbbff8a476d1363323d327b66d6e5b5b', './modules/Home/TrainingPortal.tpl' => '0049d2a11e2aa770d91965fa140490e6', './modules/Home/TrainingPortal.php' => '355a092e948ab2740e8b63ecacd8110d', - './modules/Home/UnifiedSearch.php' => '8b1fd77832d3067cb6bd5c64296928e5', + './modules/Home/UnifiedSearch.php' => '6fb2ea979409efe83d42b15bd8833122', './modules/Home/SaveSubpanelLayout.php' => 'e338069c63a8aad2c3c27ed0dda7611e', './modules/Home/PopupSugar.php' => 'f95d5b92fb0d367436d09f9a235dda3d', './modules/Home/Menu.php' => '3fa23b2242e96d9891d841b336f351f5', './modules/Home/LastViewed.php' => 'c59382fac20f91b5081513da98827ad3', - './modules/Home/Home.tpl' => '22ea7307a163b643d2fdc57833bed091', + './modules/Home/Home.tpl' => 'cf81b61203b639c3e9405f81ff59d646', './modules/Home/Home.html' => '1cfd71deea974236ad79b5a59a39ac96', './modules/Home/DynamicAction.php' => '8de09f545e517b5a91039b605898627e', - './modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php' => '093c0b3886c49e37d542936e4fb3f325', + './modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php' => '8881862a27043c6b40411c349f86a333', './modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.meta.php' => '4227913d52f981f847c48e63e71b2d07', - './modules/Home/Dashlets/iFrameDashlet/configure.tpl' => 'af2e87f986e73938a4df665c3baa219f', - './modules/Home/Dashlets/SugarNewsDashlet/configure.tpl' => 'af2e87f986e73938a4df665c3baa219f', - './modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php' => 'a9bf3c4562700024d4089f87a0d5000c', + './modules/Home/Dashlets/iFrameDashlet/configure.tpl' => '8629b406963a4b85b213c984671eb048', + './modules/Home/Dashlets/SugarNewsDashlet/configure.tpl' => '8629b406963a4b85b213c984671eb048', + './modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php' => '944a5f50729632de6a9f5d5d540ed467', './modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.meta.php' => 'c61db581e2b16a9ae9459091a494c921', - './modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl' => 'd0077fe1045f2468f91b81a4f8e6435d', + './modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl' => '383538990e93b3a8d53eb8433a4733c4', './modules/Home/Dashlets/RSSDashlet/RSSDashlet.tpl' => '6736755324f99b169fd55cfb5186a039', - './modules/Home/Dashlets/RSSDashlet/RSSDashlet.php' => '01b329ff8f38eaef94475e176cf0d3d0', + './modules/Home/Dashlets/RSSDashlet/RSSDashlet.php' => 'c24ec36629aa2cc96dadf5af9814f432', './modules/Home/Dashlets/RSSDashlet/RSSDashlet.meta.php' => '2868db4815ce439503871be342c6aaba', './modules/Home/Dashlets/RSSDashlet/RSSDashlet.icon.jpg' => '7b0cb2ec97ce8e71d74d60a0da81ba53', - './modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php' => 'ec24eac2fde553b6a7190b0ac40b9068', + './modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php' => '485327b470463f509b172b40c0cc1457', './modules/Home/Dashlets/JotPadDashlet/JotPadDashletScript.tpl' => '44fe1cc9a5d2fc4d43207d37d9facba9', './modules/Home/Dashlets/JotPadDashlet/JotPadDashletOptions.tpl' => '3dec6d95f5b5297b9f184e2be3afb8fe', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.tpl' => '99b1f580406b7aa128719886b73e64e8', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php' => 'c2d3c87ddfae95bd4bbfc80d0a3f43a1', './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.meta.php' => 'f684f24e9455ff722136faf5ec2ce552', - './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php' => '05b9d95822105ffd36ffb87c09b94ef7', + './modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php' => '50087b854c95d3f433887b51d092847e', './modules/Home/Dashlets/InvadersDashlet/sprites/player.png' => 'e5cac3126e8afc4a33374c12651669ab', './modules/Home/Dashlets/InvadersDashlet/sprites/cube.png' => '2e8e87c58816e987578025e21a19c3e7', './modules/Home/Dashlets/InvadersDashlet/sprites/bg.png' => 'cd531b08b65ec6ed046d182122d54b3a', @@ -2102,14 +2052,14 @@ $md5_string = array ( './modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.php' => '54619be90827d7aa860a4af530856f9d', './modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.meta.php' => '4dfe49727e4a60650b8b23d39dd6460c', './modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.icon.jpg' => '7b0cb2ec97ce8e71d74d60a0da81ba53', - './modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.en_us.lang.php' => '55dfa5c7a2a87a8c07a823a739defa9e', - './modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl' => 'dd411a07bad4a9ff68676d92bccf8235', - './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php' => '24a3ca162a3be8d9dbbdd950c9756a19', + './modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.en_us.lang.php' => '513fe5bb7dc0cc661ed1ff6a0ce61252', + './modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl' => '1113a2d0524e6f67cbf06ef63c6b53bc', + './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php' => '1174b2d4d68d50a04bb58f109d62bd15', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.meta.php' => 'b63a2caee0d5d33921fab2017e0dc61d', - './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php' => 'a17865b601f0870d5e864f76839a47ee', - './modules/Home/SubpanelCreates.php' => 'b65d7d8997f074f8b981a3888ac76d81', + './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php' => 'd7ee9110dd93154ae352d03a705ae8ad', + './modules/Home/SubpanelCreates.php' => '657a7bb07ebf44f2ac6329f72cba4399', './modules/Home/AddToFavorites.php' => '4e113ab3ea13a302ce66e89a4ecce74d', - './modules/Home/About.php' => 'c799b63f8d13901a079d553ffe6df17e', + './modules/Home/About.php' => '817f54839e7fbf2128c940a78531a716', './modules/History/metadata/subpaneldefs.php' => 'f3986a34f5d8bb4a79b44903c3598144', './modules/History/language/en_us.lang.php' => '0daa27d2314c4abfed502f3cb5234cc7', './modules/Help/language/en_us.lang.php' => '344bf51c077fc8fdffe33f5fd238be25', @@ -2124,18 +2074,19 @@ $md5_string = array ( './modules/Groups/ListView.html' => 'c94c29c0800a97cf7bf85aaff058b8f2', './modules/Groups/Group.php' => '3c9c86fda7e9f7fcfd2e1e1d2224cf3f', './modules/Groups/Forms.php' => '3d78ea13abcc58a854ecb205320afc77', - './modules/Groups/EditView.php' => '4aafca0e9a90ea125b2e481a1d20f394', + './modules/Groups/EditView.php' => 'cb58659cce4b73a304369d3d30d172e3', './modules/Groups/EditView.html' => '5aa0ae8440621955c98ac8c973021f2e', - './modules/Groups/DetailView.php' => '2fb58d8e395a508e6acad046b4068c2c', + './modules/Groups/DetailView.php' => '254cae6ba230de270247739358df775f', './modules/Groups/DetailView.html' => '9dab041fc1be503de6769ea70911cba5', './modules/Groups/Delete.php' => '6766206f16b826890facdfc4be15e92c', - './modules/Employees/views/view.list.php' => 'e15d1d43c1d43b3cb62743447e260e6d', - './modules/Employees/views/view.edit.php' => 'd3e44391b0f1abe2c37716004a28e1ad', + './modules/Employees/EmployeeStatus.php' => '730fda3f0cfae621753e9c456f879199', + './modules/Employees/views/view.list.php' => '7cdb9242e3a3d289530c6ea6fbb05505', + './modules/Employees/views/view.edit.php' => '25e4526e77f582209371d6bd6c990cdc', './modules/Employees/views/view.detail.php' => 'b360b199402973c454b791bcf4034b35', './modules/Employees/vardefs.php' => '8479de606f3beb25e119178b5b46e646', './modules/Employees/metadata/searchdefs.php' => '1340db5e164cece39b1470a2a0a9c778', - './modules/Employees/metadata/listviewdefs.php' => '874253a6f56c264596721353f8cc5e3b', - './modules/Employees/metadata/editviewdefs.php' => 'c5f55fa972ce09fbd845ff49af6b04b2', + './modules/Employees/metadata/listviewdefs.php' => 'c752d818ee331fce16770cdc6c149c57', + './modules/Employees/metadata/editviewdefs.php' => 'f6b5ca20c3310f7e4b7cd65f36335a1a', './modules/Employees/metadata/detailviewdefs.php' => '929da865fd722196b482d18a20e4fe77', './modules/Employees/metadata/SearchFields.php' => 'fb28c93f3ebafbf436d4ca2e3e746200', './modules/Employees/language/en_us.lang.php' => '2ce4ae0dddca70df365b0e7fc9cc5365', @@ -2148,8 +2099,8 @@ $md5_string = array ( './modules/Employees/Menu.php' => 'f18a2a7887a5ef61b1feeb7deb894556', './modules/Employees/Forms.php' => '9ed5ba9fb7e1e06adf0346c68f23361c', './modules/Employees/Error.php' => 'c651b08c57c2b78dfa68520822cc6bc1', - './modules/Employees/Save.php' => '1a61bfa66090a2d66b6a0abc9f334c72', - './modules/Employees/Employee.php' => 'fdad9e9d9766399e8a7048f0e77b0bb2', + './modules/Employees/Save.php' => 'c1f6ba7b5002e63c599b838fed2f944b', + './modules/Employees/Employee.php' => '3457a02a53151d158c878ddda7fb63a2', './modules/Emails/views/view.quickcreate.php' => '58e2115f8d2a69f4afc2a04976fac02b', './modules/Emails/views/view.modulelistmenu.php' => 'e9ca39c1e0e3abc394b1a9dad2804ebd', './modules/Emails/views/view.classic.config.php' => 'bfb5df976e677f3b7ea82de5b403e2e4', @@ -2157,7 +2108,7 @@ $md5_string = array ( './modules/Emails/templates/successMessage.tpl' => 'f2a5b761c0f480ded16d358e0e650ae4', './modules/Emails/templates/overlay.tpl' => '064c362704b97dd6f41ba062d16f2552', './modules/Emails/templates/outboundDialogTest.tpl' => 'db35198ac6efcdb06604504a5e3fd5cb', - './modules/Emails/templates/outboundDialog.tpl' => '910c40e39314d9035af1c41746fedd0c', + './modules/Emails/templates/outboundDialog.tpl' => 'ad69d06864e9cb0818d00a7e074c4b41', './modules/Emails/templates/importRelate.tpl' => 'b3897fb62f70b64c9fc202320e176a8b', './modules/Emails/templates/emailSettingsRules.tpl' => '6fe8b27d9e161596113223f607b13c80', './modules/Emails/templates/emailSettingsGeneral.tpl' => '3563cc551b3103b1b50244843c121dfd', @@ -2171,7 +2122,7 @@ $md5_string = array ( './modules/Emails/templates/editAccountDialogue.tpl' => '8296045e10b01f885218bd15349ceb1c', './modules/Emails/templates/dceMenuQuickCreate.tpl' => 'e954a3bd597aa2fe455c9048acf822d8', './modules/Emails/templates/assignTo.tpl' => '79446b8acf76f9440bdcee11787a37d2', - './modules/Emails/templates/advancedSearch.tpl' => 'ba3419272ea3549ed31ee7e84470b64a', + './modules/Emails/templates/advancedSearch.tpl' => '39a6f1fccce8c9ac051a51b33d55cc10', './modules/Emails/templates/addressSearchContent.tpl' => '742860f9399e347935682184334ea250', './modules/Emails/templates/addressSearch.tpl' => 'a51678c98ec0d8962f0376c241d439e1', './modules/Emails/templates/addressBook.tpl' => 'd97ea06ba14fa80442685621698cd467', @@ -2184,7 +2135,6 @@ $md5_string = array ( './modules/Emails/subpanels/ForQueues.php' => '0b9d30578ba6ab100603332f15c333eb', './modules/Emails/subpanels/ForHistory.php' => 'c646947f0bd46cfbee6554b6caea8c3e', './modules/Emails/subpanels/ForContacts.php' => '125bee776e196e52371122f9abfcdde3', - './modules/Emails/metadata/qcmodulesdefs.php' => '81404f499637aa9c798863361f4720c5', './modules/Emails/metadata/subpanels/ForUsers.php' => '3f1cb8aa8dc7407fd9e98575d4d9c65e', './modules/Emails/metadata/subpanels/ForUnlinkedEmailHistory.php' => 'e50fbe692c61e34002ce0a3d37267f9b', './modules/Emails/metadata/subpanels/ForQueues.php' => '0b9d30578ba6ab100603332f15c333eb', @@ -2193,19 +2143,19 @@ $md5_string = array ( './modules/Emails/metadata/subpaneldefs.php' => 'c36b83707f89bb561749d97fa5dafb6b', './modules/Emails/metadata/popupdefs.php' => '0275329aead4baf66320f834ed573115', './modules/Emails/metadata/additionalDetails.php' => '31f34aadd311817bb2d43c0acb85b452', - './modules/Emails/language/en_us.lang.php' => 'edb317cb70b160089640bf448aa38c7a', + './modules/Emails/language/en_us.lang.php' => '5ab9689da33dfda6ee9e6eef84b8fb99', './modules/Emails/javascript/viewPrintable.js' => '5aab03393cdc54f2dd875441953c33fc', './modules/Emails/javascript/vars.js' => 'f33408357602a43c032aa90d7c751ee3', - './modules/Emails/javascript/init.js' => '1499225ea83f183744425213102bd030', + './modules/Emails/javascript/init.js' => 'c16f994e2e4f0e3e236d77fa10401235', './modules/Emails/javascript/grid.js' => 'd14d32123de014fabb7ad605883f4339', './modules/Emails/javascript/email_popup_helper.js' => 'd554d0576666510cd702a418e1fe47ae', './modules/Emails/javascript/displayOneEmailTemplate.js' => '36286f4d5dfa7b3ecb989eaa1347fc74', './modules/Emails/javascript/composeEmailTemplate.js' => '1d3a616e3192d976bc3dec881ec9e0e2', - './modules/Emails/javascript/complexLayout.js' => '05a5609d5457d093993b06cac8fbc145', - './modules/Emails/javascript/ajax.js' => '9ef0d1b8d475f971c0e14f773343c246', + './modules/Emails/javascript/complexLayout.js' => 'fd6075b10fbc6cb645346ee8f9ef0955', + './modules/Emails/javascript/ajax.js' => '9b74d0c87f1f421a05960465cb3c49b7', './modules/Emails/javascript/EmailUIShared.js' => 'a7be59721553f5754aa4a5b1ca719c08', - './modules/Emails/javascript/EmailUICompose.js' => '0c49c07f04baeac647dbbadb45a5f81b', - './modules/Emails/javascript/EmailUI.js' => 'b4d2307e6918292281961860bcdf5cff', + './modules/Emails/javascript/EmailUICompose.js' => 'd62981f919bc88b8a0777cad5d6d54bb', + './modules/Emails/javascript/EmailUI.js' => '088e04b3ccb969aeab4c6c97aa8b1f12', './modules/Emails/javascript/Email.js' => '9c505070f1ff470ab07ab79374a15cbd', './modules/Emails/index.php' => '6cc6a189db79619fe86fe1469e9ff7d3', './modules/Emails/images/sugarGroup.gif' => 'ad21210176b6a2a10a7a9b8f876ad83b', @@ -2223,16 +2173,16 @@ $md5_string = array ( './modules/Emails/SugarRoutingAsync.php' => '1a0be585c1d2bee11481b0e241a2a63c', './modules/Emails/SubPanelViewRecipients.php' => '732be5c347a5817672a6489ee90d5e89', './modules/Emails/SubPanelViewRecipients.html' => 'f07c4e81fa6c04a47fd45d727c4ea751', - './modules/Emails/Status.php' => 'bcb357445138451929653364e7ae07c5', + './modules/Emails/Status.php' => '0afbe4da50af4dbe5bf75fd4e5b19cf0', './modules/Emails/Status.html' => '1801ca32d3646ee0c98306f604919607', './modules/Emails/SearchFormSent.html' => '5b9f23633463ed27da895b70a17725e4', './modules/Emails/SearchFormMyInbox.html' => 'c339d9af64cfe5d63148f1f639730dad', './modules/Emails/SearchFormGroupInbox.html' => 'cc514802ad41c7c2a39651bbfc4c672f', './modules/Emails/SearchForm.html' => 'cf30409165e6f78d6341281e8de9845c', - './modules/Emails/Save.php' => 'fae1087bee2de233cb78d82833e1a2f6', + './modules/Emails/Save.php' => 'eb23c57c3c685b1c7644eb726a98101a', './modules/Emails/Popup_picker.php' => 'f7a97994261d17eef56d3909bd046efa', './modules/Emails/Popup_picker.html' => 'b64e7ed7ebea9b23d3a2becb000efacb', - './modules/Emails/PopupDocuments.php' => '5b833ead51454c4200f744890d271bae', + './modules/Emails/PopupDocuments.php' => 'f3b0944ee6820c77cde20e4e119a1bf6', './modules/Emails/PopupDocuments.html' => '2dc8dd008819e903f069a7c8fd5ba51f', './modules/Emails/Popup.php' => 'b9d8fd64d2ebf2b89fdb65df7ae65d23', './modules/Emails/PessimisticLock.php' => '5b25ed2ea1f768ace3381178c57b39d1', @@ -2243,46 +2193,46 @@ $md5_string = array ( './modules/Emails/ListViewHome.php' => '6cae8e0431e69db98940d4cc5f717ded', './modules/Emails/ListViewHome.html' => '171e189b1ab65677602f2e3d43c77901', './modules/Emails/ListViewGroupInbox.html' => '7069de21f85a2596a8bf3b4ddea21448', - './modules/Emails/ListViewGroup.php' => '35787a4cf90680cc47634e073225be41', + './modules/Emails/ListViewGroup.php' => '7b38913558aaef69a331c776826f570d', './modules/Emails/ListViewDrafts.html' => '67e8857521daaf70fc1468a363d9ec3f', './modules/Emails/Grab.php' => '95a6e008baa1cdeebbf72a74bf72db68', './modules/Emails/GenerateQuickComposeFrame.php' => '0c9dbc7d32d522b624198d21f57f6338', - './modules/Emails/EmailUIAjax.php' => '1a07741d81c08b0b7ab4173ac56a6669', - './modules/Emails/EmailUI.php' => 'e3149cad51065fc936964d51e140d156', + './modules/Emails/EmailUIAjax.php' => '34404a13426c9cd09b9deb932fa880cb', + './modules/Emails/EmailUI.php' => '4350dbb645ff920bf95af1b95e13cef9', './modules/Emails/EmailUI.css' => 'daf7eb7d61e5b8777613d4f550bfa572', - './modules/Emails/Email.php' => 'edf545a223eca70ec14fddfabcc348e4', + './modules/Emails/Email.php' => 'a6c3b3f2dc95aae9b5510f60b321c5fa', './modules/Emails/EditViewArchive.html' => 'ad802e567b75e39a6c7885bbb8fb9fcc', - './modules/Emails/EditView.php' => '26af8ed4744f4029ac287aab737c1dc0', + './modules/Emails/EditView.php' => '5dde865966c41fd192253a3bff98ff74', './modules/Emails/EditView.html' => 'dd94b8950eeac04fb7663ba68a54440c', './modules/Emails/DetailViewSent.html' => 'affa0cffa08a90c174a039d78230f7e1', - './modules/Emails/DetailView.php' => '6c69821e3d9e42d6af23760c707a2645', + './modules/Emails/DetailView.php' => 'a5810968266ba652c0c121fd453edf01', './modules/Emails/DetailView.html' => 'ef22c46096ec2e20e74582bcc2812b64', './modules/Emails/Delete.php' => '0b9f91d0aef5219b1be1d50592f3979f', './modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.php' => '30bf4eeabbd41decbef1747ebc8f8b56', './modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.meta.php' => '1d1f601cfbea07b1d59850fee27393ac', './modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.data.php' => 'e04693eb309f98f4afb83d419d9a5f5e', - './modules/Emails/Compose.php' => 'f39afb096cf094dec08d6f7b8b079e3f', + './modules/Emails/Compose.php' => '40c419d7815463cfa0a8f660ae75650d', './modules/Emails/Check.php' => '3643d7c5f3a716ac2f59ab358090badf', - './modules/EmailTemplates/EmailTemplate.js' => '41a0f2088124d487d8134fc0d522a162', + './modules/EmailTemplates/EmailTemplate.js' => '33a92f025af2cb8e0b8bc27748888ffb', './modules/EmailTemplates/vardefs.php' => 'c1db0f25697a39b8a2e458c383aec8c8', './modules/EmailTemplates/metadata/searchdefs.php' => 'afa314da331a40d53c5ae14c1eed1bcc', - './modules/EmailTemplates/metadata/listviewdefs.php' => 'c82edfad0756cb59915633e81a304fee', + './modules/EmailTemplates/metadata/listviewdefs.php' => '005ebaabb39a94ce69c778f67931b864', './modules/EmailTemplates/metadata/SearchFields.php' => '210c298a3aea2b198e3aa6219026fe29', - './modules/EmailTemplates/language/en_us.lang.php' => 'bf4c44ff40160b7ae1217b2be2709905', + './modules/EmailTemplates/language/en_us.lang.php' => 'c53c3d26fd201c37d16ee4f73082d66a', './modules/EmailTemplates/field_arrays.php' => '6da2acc09f343043e3e624d424aea6e9', './modules/EmailTemplates/Save.php' => '3ef908df02a47472b47f810c1dcd6499', './modules/EmailTemplates/PopupDocumentsCampaignTemplate.php' => '383a7ad98ff501f3d5e408a1a0ca5d7a', './modules/EmailTemplates/PopupDocumentsCampaignTemplate.html' => '042f740f594f4ff5b463bc8ad258fe6c', './modules/EmailTemplates/Menu.php' => '75d3b7fadc146b1bf2fd0b465a2099f1', './modules/EmailTemplates/EmailTemplateFormBase.php' => '78c467f8ae5ac646d95ec93e4c6a3526', - './modules/EmailTemplates/EmailTemplate.php' => 'c556a2a2fec319201b500e2318e6a8fc', - './modules/EmailTemplates/EditViewMain.html' => '198347cfe799371733dcc1929c5b0f07', - './modules/EmailTemplates/EditView.php' => '3893991b1768f0aef3a95f9870f1c4df', - './modules/EmailTemplates/EditView.html' => '7f83285c5c1b9763a4f085d3e83ea6c8', - './modules/EmailTemplates/DetailView.php' => '2d6718ce402a490aaf5b3b856bc0a9c1', - './modules/EmailTemplates/DetailView.html' => '4e07f3f529aa4dd7aa17ccc0f635700b', + './modules/EmailTemplates/EmailTemplate.php' => '7df379886de4faac3298115904876cbd', + './modules/EmailTemplates/EditViewMain.html' => '4206b18eec660ec77661d5df3a0dd844', + './modules/EmailTemplates/EditView.php' => '5a9d9b5ab6ba1cf245327049384df5f3', + './modules/EmailTemplates/EditView.html' => '8f931eba008ad05746761228db43ea27', + './modules/EmailTemplates/DetailView.php' => '5e93e7c70c5a457429f0b0d1203fa483', + './modules/EmailTemplates/DetailView.html' => 'df9e9580ae66775462de68736c310cca', './modules/EmailTemplates/Delete.php' => 'd26b04de325778d192333d1b4d1be8ce', - './modules/EmailTemplates/CheckDeletable.php' => '613ca7e81baf06d12df1117363b76b24', + './modules/EmailTemplates/CheckDeletable.php' => 'baa15642be3efb203695412013677119', './modules/EmailTemplates/AttachFiles.php' => '6d997841491bd058bfaaea67f2c6baf8', './modules/EmailMarketing/vardefs.php' => '3db38c851ee5b051461860f05d2754f4', './modules/EmailMarketing/subpanels/default.php' => '05cba11a3fc14ecd377696301a9c0a35', @@ -2292,158 +2242,153 @@ $md5_string = array ( './modules/EmailMarketing/field_arrays.php' => '726e7f9319b1753ee3a82c5e2ad966ea', './modules/EmailMarketing/SubPanelView.php' => '9af7ad5c01b8ea8b09f8e572c459f9f7', './modules/EmailMarketing/SubPanelView.html' => 'f0fbf5a76a52153e15456438ea6022e2', - './modules/EmailMarketing/Save.php' => 'b9fdcfb143d84fb5c5b8e6e3fc5d4cf0', + './modules/EmailMarketing/Save.php' => '21ca673e11fe366e0d42c280a5f8a7b9', './modules/EmailMarketing/Menu.php' => '22676bda0f00f43d9aa328268026869a', './modules/EmailMarketing/Forms.php' => 'b1b36a92909246484fea795acb03d363', './modules/EmailMarketing/EmailMarketing.php' => '6684471a20ef6dfa07aaa9ba755a5bff', - './modules/EmailMarketing/EditView.php' => '1db6cc5c64860de04a1d5b0bed3e5f2b', + './modules/EmailMarketing/EditView.php' => '3fa3209ae2c5698f8df7f5ddf56796db', './modules/EmailMarketing/EditView.html' => '91cf42cad9202f2062af36934049c8d5', - './modules/EmailMarketing/DetailView.php' => 'd070fb2de3d73129261c0a877e12e406', + './modules/EmailMarketing/DetailView.php' => '70f119052e3541ceb4a1fb0ed514b8a3', './modules/EmailMarketing/DetailView.html' => '7b65b4ff73fb5e80a0dc6f9e7d78b932', './modules/EmailMarketing/Delete.php' => '3c915ebc36fe5bbb3b785211465c0899', - './modules/EmailMan/views/view.list.php' => '6d4902b6cf464c45ef6b7b368b450136', - './modules/EmailMan/views/view.config.php' => '6aab29db0bb8706f46a523003dd943a0', - './modules/EmailMan/views/view.campaignconfig.php' => '35d5be99f58836dbf2ded6d05189911f', + './modules/EmailMan/views/view.list.php' => '672c229f6af8dea621aad97244dddc3f', + './modules/EmailMan/views/view.config.php' => '82f76a22ce15c7dc963e8a1c0808e549', + './modules/EmailMan/views/view.campaignconfig.php' => '1c61c91d839911c33b94fd570ce1f528', './modules/EmailMan/vardefs.php' => '11ea605c45446d341bd8590c2455340e', - './modules/EmailMan/tpls/config.tpl' => 'cf708f8e63b0ac2e1f6885d165f06748', + './modules/EmailMan/tpls/config.tpl' => '70cf462c9817c81c068f0ec4d764a111', './modules/EmailMan/tpls/campaignconfig.tpl' => '1374e1451a901d40270fedc86ecd942f', - './modules/EmailMan/testOutboundEmail.php' => 'f426713a1bee0bda8ee5e623094e62ce', + './modules/EmailMan/testOutboundEmail.php' => 'f8af6b745f56b3faddd986cc7e9285e9', './modules/EmailMan/subpanels/default.php' => 'a5bfe693b6607b29e6a7eedf0ae018d1', './modules/EmailMan/metadata/subpanels/default.php' => 'a5bfe693b6607b29e6a7eedf0ae018d1', './modules/EmailMan/metadata/searchdefs.php' => 'b03aec4d6d6af23ddac8788394f34367', - './modules/EmailMan/metadata/listviewdefs.php' => '00a5290dd11f4d2e12ff80df3e975191', + './modules/EmailMan/metadata/listviewdefs.php' => '40425220555821afc6d26b9695fb11fe', './modules/EmailMan/metadata/SearchFields.php' => '3366b325da4e03e28df43c1ec6864fab', './modules/EmailMan/language/en_us.lang.php' => '729f9dc0d3d90be0fadd3225b3894550', './modules/EmailMan/field_arrays.php' => '89e4e98aa8bf3c3f00b74d175e17be44', './modules/EmailMan/action_view_map.php' => '137158647e55f119ece5ef3106e08bd9', - './modules/EmailMan/Save.php' => '53866932041c1e0b684e61813ee19b3f', + './modules/EmailMan/Save.php' => '70680fb2ea3cdf7f56605a36150bee66', './modules/EmailMan/Menu.php' => '935f5e5e9940e2b115c0862dff26e96a', - './modules/EmailMan/Forms.php' => '712377fd87dd4176905b4b927fe39cbd', - './modules/EmailMan/EmailManDelivery.php' => '46d4d9c43c6f97251f54646d9b3fbc63', - './modules/EmailMan/EmailMan.php' => '95934f08c69cc52b3259152b0f5781cc', + './modules/EmailMan/Forms.php' => '6f1457f876f70c08f6a30c979a1e4353', + './modules/EmailMan/EmailManDelivery.php' => 'e28504b209d80ce01701d672a8d2aa5f', + './modules/EmailMan/EmailMan.php' => 'aa6dad9182139f6d027f17d8c17ea518', './modules/EmailAddresses/vardefs.php' => '8464b804f5be7f2e7ab271babb910ed7', './modules/EmailAddresses/language/en_us.lang.php' => '682d246e21989b838797f677b0517fda', './modules/EmailAddresses/EmailAddress.php' => '9c55bd8a741f19c7048d2fb1f28b11f1', './modules/DynamicFields/vardefs.php' => '1940251900df925de38b31049bb5fb3c', './modules/DynamicFields/templates/Files/EditView.php' => '96c1b1ae2d80412e5f9d9b8881c9c9fa', './modules/DynamicFields/templates/Files/DetailView.php' => '1049de42d76a8d790b31ab2156cd49b3', - './modules/DynamicFields/templates/Fields/TemplateRange.php' => 'c6f10b2314ac8ac1c11741a481c35388', './modules/DynamicFields/templates/Fields/TemplateURL.php' => 'e916b152a08645abf170f7848670a667', './modules/DynamicFields/templates/Fields/TemplateTextArea.php' => 'a44b7ca6cb1e9bf6a441abe6025412c3', './modules/DynamicFields/templates/Fields/TemplateText.php' => '4a19bab77eb7427451c1ed5a10aeb43c', './modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php' => 'a865d9b0d83eb33186d53cd077f49e0c', './modules/DynamicFields/templates/Fields/TemplateRadioEnum.php' => '6b8f1c4a074f726e7c19ca1664c6ba69', - './modules/DynamicFields/templates/Fields/TemplatePhone.php' => '3222ca1ab2170b5221c6b71dc6024b24', + './modules/DynamicFields/templates/Fields/TemplatePhone.php' => 'a7b138219546bb47ea75c54e4c1faf01', './modules/DynamicFields/templates/Fields/TemplateParentType.php' => '968bd9527d214ed6e9ff6d02c675fd3b', './modules/DynamicFields/templates/Fields/TemplateParent.php' => '52bac9df03d7b11cd4007a651db97d54', - './modules/DynamicFields/templates/Fields/TemplateMultiEnum.php' => '3bac9768ea7855733e163ca6962d5480', - './modules/DynamicFields/templates/Fields/TemplateInt.php' => 'a776d6dc3ae3316530134413c8643e78', + './modules/DynamicFields/templates/Fields/TemplateMultiEnum.php' => '3318f2b31768e714a6622f4dd9066052', + './modules/DynamicFields/templates/Fields/TemplateInt.php' => '65bcf6e4f2094fcb1ce282e8646be791', './modules/DynamicFields/templates/Fields/TemplateImage.php' => '804aee08f3169fa2f33a8889b8ba3692', './modules/DynamicFields/templates/Fields/TemplateId.php' => '64616dede55f5f1fa8cc9e0a48b5c02a', './modules/DynamicFields/templates/Fields/TemplateIFrame.php' => '86e361840afad1c98ec7565ce5e5146d', './modules/DynamicFields/templates/Fields/TemplateHTML.php' => 'de047ceef03750cf2c7a446b8c222c08', - './modules/DynamicFields/templates/Fields/TemplateFloat.php' => 'a692b82633c68b963b1839b5975f47a6', + './modules/DynamicFields/templates/Fields/TemplateFloat.php' => '13f4595ca377c46b327980a667accc3f', './modules/DynamicFields/templates/Fields/TemplateField.php' => '09ab55dc404802b1716d2058c7087944', './modules/DynamicFields/templates/Fields/TemplateEnum.php' => '68afaa64599ad85713df76ff57c479cd', './modules/DynamicFields/templates/Fields/TemplateEncrypt.php' => '581e09a06f8fb69ca495dde60fc2c9ad', './modules/DynamicFields/templates/Fields/TemplateEmail.php' => '61d3983c998fc97b75132b323da82e37', - './modules/DynamicFields/templates/Fields/TemplateDecimal.php' => '726f6c5b927e968a0e64352428210fd8', - './modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php' => '3d407715f96102e426cef14e3576ebc1', - './modules/DynamicFields/templates/Fields/TemplateDate.php' => '1c89210c5d7cd32d2319a44e8ae538b7', + './modules/DynamicFields/templates/Fields/TemplateDecimal.php' => 'c045cd22998fd85aca8cb35146a6ebcf', + './modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php' => 'c21a594dd787b6d2ad23ed146a6c8207', + './modules/DynamicFields/templates/Fields/TemplateDate.php' => '26aa379dff851794fd5c4a586cf49670', './modules/DynamicFields/templates/Fields/TemplateCurrencyId.php' => 'dc91f2deb794748114de23cc7b4cdc09', - './modules/DynamicFields/templates/Fields/TemplateCurrency.php' => '3cee6d3c8507486227baa80243a29fd4', + './modules/DynamicFields/templates/Fields/TemplateCurrency.php' => 'ee784781350356e84ac02ad2b4367a22', './modules/DynamicFields/templates/Fields/TemplateBoolean.php' => '060d4349e3756351791ac862a8814af6', './modules/DynamicFields/templates/Fields/TemplateAddressCountry.php' => '522ab825c2c18d722df9d9d0dda5c13b', './modules/DynamicFields/templates/Fields/TemplateAddress.php' => '9f24e128e05ad01de87b8e323c36c3e7', - './modules/DynamicFields/templates/Fields/Forms/phone.tpl' => '97581b77ffde48b0dbe8aef9a1a9f705', - './modules/DynamicFields/templates/Fields/Forms/phone.php' => '45a60141bef3af6ac5dd71259649e324', './modules/DynamicFields/templates/Fields/Forms/varchar.tpl' => '05aea29acabb0987bca9b932e70f61b1', './modules/DynamicFields/templates/Fields/Forms/url.tpl' => '4fbced3e9414687494d53fb40e535d87', './modules/DynamicFields/templates/Fields/Forms/url.php' => '21b0e80433b0cc07dccd3c6dbd2606bd', './modules/DynamicFields/templates/Fields/Forms/text.tpl' => 'b745f2b359fc21c1f8d6a3f000ef78a0', './modules/DynamicFields/templates/Fields/Forms/relate.tpl' => 'c04f3abe417f433d21da6854a8cabd7a', - './modules/DynamicFields/templates/Fields/Forms/relate.php' => '2776ceb54ad1e580d9311fbd44c32e41', + './modules/DynamicFields/templates/Fields/Forms/relate.php' => '3f2141508f3a0fbf1a36e09471c10437', './modules/DynamicFields/templates/Fields/Forms/radioenum.php' => '457c1027437211ad734331974c50513b', './modules/DynamicFields/templates/Fields/Forms/parent.tpl' => '8664691eee2fe9fa52ccbfd6502882b3', './modules/DynamicFields/templates/Fields/Forms/parent.php' => '6f73a276856953fe2bebcfb1a3c60fcc', './modules/DynamicFields/templates/Fields/Forms/multienum.tpl' => 'f76bbb109e3915416df7141ad2d6c7dd', './modules/DynamicFields/templates/Fields/Forms/multienum.php' => '17ad63f685ea5f289e42c3e973b01e1d', - './modules/DynamicFields/templates/Fields/Forms/int.tpl' => 'b00e937d643eb478200c61a8be35f913', + './modules/DynamicFields/templates/Fields/Forms/int.tpl' => 'c14b669f13fec08c2f837a714929e87d', './modules/DynamicFields/templates/Fields/Forms/image.tpl' => '8819674e601946cb15a4de99f9a6e10e', './modules/DynamicFields/templates/Fields/Forms/image.php' => '31df95d5969eed1a0f8bfdf356f6bc4a', './modules/DynamicFields/templates/Fields/Forms/iframe.tpl' => '6a99ae96432266b24229c988a742f037', './modules/DynamicFields/templates/Fields/Forms/iframe.php' => 'c6d042efca51ca0a99eb58f5840fa132', './modules/DynamicFields/templates/Fields/Forms/html.tpl' => 'a1bc8985dd422758b674c1e5047bfad6', - './modules/DynamicFields/templates/Fields/Forms/html.php' => '8bf209be25d0e3459470268685b5b1cd', - './modules/DynamicFields/templates/Fields/Forms/float.tpl' => 'eec764e851c0ebfd92f98b257cf5c942', - './modules/DynamicFields/templates/Fields/Forms/enum2.php' => 'fd3a49996fcd8ad2cfddde0df6666b22', - './modules/DynamicFields/templates/Fields/Forms/enum.tpl' => 'adc4c505d67fcd9c18febcf5d7aa34e0', - './modules/DynamicFields/templates/Fields/Forms/encrypt.tpl' => 'd680507b7d44a7732be8e46c8cfd2cf8', + './modules/DynamicFields/templates/Fields/Forms/html.php' => '2e9db09efda3e05d8f1a6c0557fcbd65', + './modules/DynamicFields/templates/Fields/Forms/float.tpl' => '27cc5987c72dbe28db026e6cfd0e3030', + './modules/DynamicFields/templates/Fields/Forms/enum2.php' => '509e4b42930122d0ba33627f512eb070', + './modules/DynamicFields/templates/Fields/Forms/enum.tpl' => '152d9dd436ed8bcaad37b1c6045c924d', + './modules/DynamicFields/templates/Fields/Forms/encrypt.tpl' => '8efedd1afa88fea2120a7e296ce7e25e', './modules/DynamicFields/templates/Fields/Forms/encrypt.php' => '41f5d5ff83df9e288f881b7f3bda4209', - './modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl' => '0aa8d6c1e37c646926b957b5e552b6d1', + './modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl' => 'bf0ad698a38811ac089ab50328c6543a', './modules/DynamicFields/templates/Fields/Forms/datetimecombo.php' => 'e95cc013b77efa88984ddde6a1ee41e3', - './modules/DynamicFields/templates/Fields/Forms/date.tpl' => 'b79d0cc53eababe4d1c0f3fcd036cbd3', + './modules/DynamicFields/templates/Fields/Forms/date.tpl' => 'e6b00c5b559b4e01b172dac61cd6c1d3', './modules/DynamicFields/templates/Fields/Forms/date.php' => '09b7d866f9654631c223410ee94a34e3', - './modules/DynamicFields/templates/Fields/Forms/currency.tpl' => '6edc5e3318e62f4b46b636a60a4cbf2a', - './modules/DynamicFields/templates/Fields/Forms/coreTop.tpl' => '5271cfdffa816a609b623cd6179fa65c', + './modules/DynamicFields/templates/Fields/Forms/currency.tpl' => 'd7208ece2e0d8fc7640538943d75d15a', + './modules/DynamicFields/templates/Fields/Forms/coreTop.tpl' => 'c9202e0c6a3d988ee425fb6a1e32fcc9', './modules/DynamicFields/templates/Fields/Forms/coreBottom.tpl' => '991541c474e4333e9757485d0dbaf7ad', - './modules/DynamicFields/templates/Fields/Forms/bool.tpl' => 'b44e01f200cf8e243c3d9a4602019056', + './modules/DynamicFields/templates/Fields/Forms/bool.tpl' => '79f39106e1c4cd933154584d490357f4', './modules/DynamicFields/templates/Fields/Forms/address.tpl' => 'bfaee150ccca6370715adfa01bd204d0', - './modules/DynamicFields/language/en_us.lang.php' => 'e904f9c5240dedc3cee49c5e3709b632', + './modules/DynamicFields/language/en_us.lang.php' => 'e51a110a2ab924890856353ddea55852', './modules/DynamicFields/UpgradeFields.php' => 'a1880f6a70750840063205c16bc4e2ca', './modules/DynamicFields/Save.php' => 'f47bc3a9fc4e35bb867d92b77676fee1', './modules/DynamicFields/FieldsMetaData.php' => '296f6d11e6572e1e4ac9f230b3b3dd45', - './modules/DynamicFields/FieldViewer.php' => '2050b8802e13802b36d4ca2dd0069417', - './modules/DynamicFields/FieldCases.php' => '8147d93a82ca4a415a38b744d36c50a2', - './modules/DynamicFields/DynamicField.php' => '7aa8f24fd5be276dbd2c47be8c220369', - './modules/Documents/documents.js' => '58425e6b28feb5424a1a44cc11e5e927', - './modules/Documents/tpls/view.extdoc.tpl' => 'b5c9539ff7427f60b075adbc04f4f0a1', - './modules/Documents/action_view_map.php' => 'e0852de31b1bbbbb80218205c2f2fbf7', - './modules/Documents/DocumentExternalApiDropDown.php' => '073eef6ba2b79bb25204419ebf96ddbe', - './modules/Documents/views/view.extdoc.php' => 'be76032ab4c036957cde42f5ccd75054', - './modules/Documents/views/view.edit.php' => '02b497a597f4c64e33f63932d41fb9f6', - './modules/Documents/views/view.detail.php' => '120516f7a34b3aad7c3542903a220d0d', - './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php' => '5de53713106c0ae6b5ad378fd156e5a0', - './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php' => '646b19ac73a520c331a9cae4e8b7fde9', - './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php' => 'ebbef0679a8b5bb7e02a4987cb6332f5', - './modules/Documents/vardefs.php' => '57ab47aaa2ca3fab68e244d29058ce9a', - './modules/Documents/metadata/subpanels/default.php' => 'c8eaa7900e9c63168f7bb080eed86aa4', + './modules/DynamicFields/FieldViewer.php' => '8712c6799e8f106fdc57b7ab43cb9a24', + './modules/DynamicFields/FieldCases.php' => '5a115e1c5b658c1f00c8655b66aadb49', + './modules/DynamicFields/DynamicField.php' => 'aaf9f8871c12613ab136a5f676ac802d', + './modules/Documents/documents.js' => '57c9cdf1bdc0d171d8d8b1c1124bff0d', + './modules/Documents/subpanels/default.php' => '02e579e2d07e14b3cc83d8563d6d8cd5', + './modules/Documents/subpanels/ForContractType.php' => '77e5c949270cd061aea40a638094d57b', + './modules/Documents/views/view.edit.php' => 'cd3334d871efb08ff11138469da33c94', + './modules/Documents/views/view.detail.php' => '3d836153f9e70d317f526d1cea675f60', + './modules/Documents/vardefs.php' => '958b957c100250642cb3222f40e6dd02', + './modules/Documents/metadata/subpanels/default.php' => '6d505e26bf95c15ec3deb6f69ed629fd', './modules/Documents/metadata/subpanels/ForContractType.php' => 'e4a3e73968acf2d0a2f211a291e6fcb5', - './modules/Documents/metadata/subpaneldefs.php' => 'e58d020bdf070a67368e346b56da70f7', + './modules/Documents/metadata/subpaneldefs.php' => '8b12d5aff0cc4ca0c279546154f7ff51', './modules/Documents/metadata/studio.php' => 'ef88e2e795f36cb9dddf39c59daf767e', - './modules/Documents/metadata/searchdefs.php' => '4d411dae4fd25c153fd398f7f6e3f4d6', - './modules/Documents/metadata/quickcreatedefs.php' => 'f0ae983deec7432bf0f98e581fbd9988', - './modules/Documents/metadata/listviewdefs.php' => '4ea73f783cf4c96fd94fc5050847ae02', - './modules/Documents/metadata/editviewdefs.php' => '17a1301aa3dc33229b9d03d65ff3f01a', - './modules/Documents/metadata/detailviewdefs.php' => '2f2e9944602d987b9312c9008be1e006', - './modules/Documents/metadata/SearchFields.php' => '9183287ac55da0719114a8e9f093b43b', - './modules/Documents/language/en_us.lang.php' => '2eab3bc37ccf0843360c55ec415a9430', + './modules/Documents/metadata/searchdefs.php' => '69da06b18dfb3fd064ccca38a7d5c1da', + './modules/Documents/metadata/quickcreatedefs.php' => 'e6eab6bf1400da40b029dbdcbbb5ca8e', + './modules/Documents/metadata/listviewdefs.php' => 'c534da3b2ddf4ba73fbffaabe864bea4', + './modules/Documents/metadata/editviewdefs.php' => 'b726625c6d48056a5888118a97b61b57', + './modules/Documents/metadata/detailviewdefs.php' => '9c048c9327cab23f2212e5978659bdcd', + './modules/Documents/metadata/SearchFields.php' => 'd5fac5c3cd65185fe82c6f316b9aa8b7', + './modules/Documents/language/en_us.lang.php' => '127ff8cfb6c2cf68e3cb91093bc87ba4', './modules/Documents/field_arrays.php' => '17ab246ffa0317da253689361f1dfb3a', './modules/Documents/TreeData.php' => '16ad8acdfecb80e79b2c6838ca5f6113', './modules/Documents/Popup_picker.php' => '975912e51cc22c5c8354843297b16ba6', './modules/Documents/Popup_picker.html' => '7e2f68d3ed1d18cdb6c658a661ff2659', './modules/Documents/Popup.php' => '468c860fd3edb73570cd47420165ab21', './modules/Documents/Menu.php' => '333b4909040dd17503600c4db615cdd7', - './modules/Documents/GetLatestRevision.php' => '3f0f3ab61f376d3cf50b759d8f655b8a', - './modules/Documents/DocumentSoap.php' => 'ea6ba67ff29c16ef8f22379ce4682a94', - './modules/Documents/Document.php' => '48a7eec0d4b328fbe31be84ce410f613', + './modules/Documents/GetLatestRevision.php' => '5f8bf6a3a6ab799b5f58c3007dba25d7', + './modules/Documents/DocumentSoap.php' => 'edc6c9ccc366864322d8d2374defa311', + './modules/Documents/Document.php' => '6cf5a71edc4cc7ba1a2abedcc9a406af', './modules/Documents/Delete.php' => '8620d185f38b20a32a492e02ee9d248c', + './modules/DocumentRevisions/EditView.php' => '75c13eaba7c0125c0e0278a30c241710', './modules/DocumentRevisions/subpanels/default.php' => 'dbc240b4c77f5ee6b8fb8e09c4c66d86', - './modules/DocumentRevisions/metadata/editviewdefs.php' => '62dbcf0f9879e49727b626caec71c64f', - './modules/DocumentRevisions/metadata/detailviewdefs.php' => '065930313ea614dff0044e40743a4e3d', './modules/DocumentRevisions/metadata/subpanels/default.php' => '0733fa74d8c63d07f3ddeb1464bf2b0e', - './modules/DocumentRevisions/language/en_us.lang.php' => '50f782d58ab988825e177eb716318c63', + './modules/DocumentRevisions/language/en_us.lang.php' => '22af55e5d02943a299bb53ba680084c8', './modules/DocumentRevisions/field_arrays.php' => '8946268a3f327b347bd6e6dbadd99927', + './modules/DocumentRevisions/Save.php' => 'b2bc51fe1a1cec56b83ce18e2c6dd7b0', './modules/DocumentRevisions/Menu.php' => 'e37e3e5bcfdeb6990f12b73ccfb49413', './modules/DocumentRevisions/ListView.html' => 'c4abed4e08f852d67f13884377595b1e', './modules/DocumentRevisions/Forms.php' => '45fa36924dbe3290cb54734c640bc549', - './modules/DocumentRevisions/vardefs.php' => '5dc107ecc501ac49924533b31cd4c1c4', - './modules/DocumentRevisions/DocumentRevision.php' => '7744d6c6f4d978e84818eacbab787e1e', + './modules/DocumentRevisions/EditView.html' => 'c63773893970a7bada6f54f48dd966b9', + './modules/DocumentRevisions/DetailView.php' => '76f3026cc10870a3c3654a075138f238', + './modules/DocumentRevisions/DetailView.html' => '6049a8f6ccc1b82e108cb1bce419d200', + './modules/DocumentRevisions/vardefs.php' => 'ad57f4e2e8aa8fe98fb0013b1f99b723', + './modules/DocumentRevisions/DocumentRevision.php' => 'b1c9a723bee6928dfa2637a06e343deb', './modules/Currencies/EditView.js' => '0556649f3fca63b880c53bbe8a8cfc64', './modules/Currencies/vardefs.php' => 'd6b4b591dda346931bee3509c3636428', - './modules/Currencies/language/en_us.lang.php' => '3c96645089ad8919955df4351a3f4b80', + './modules/Currencies/language/en_us.lang.php' => 'ed0ee2bbce4cc07df44be9f68a31f772', './modules/Currencies/iso4217.php' => 'e4b97cb7b108bfbb56a0f4b4ed634244', - './modules/Currencies/index.php' => '0200e0104be4d3e86c088ba274796c35', + './modules/Currencies/index.php' => 'b983c3000d56da57cd879418a55a7cf1', './modules/Currencies/field_arrays.php' => 'c6056d9901110e8e5b11a48dfd4b7bfa', './modules/Currencies/Menu.php' => '733f57c3acdbccd062a4dda2bb551c9f', './modules/Currencies/ListView.html' => '3d4e93cbef259fc09d386cc04fdd2b41', @@ -2453,12 +2398,12 @@ $md5_string = array ( './modules/Currencies/EditCurrency.php' => '8b484f51f73f2e2d7f308fed49c5bfd2', './modules/Currencies/Currency.php' => '14fc560933dee2e5d04c2677392cc6ce', './modules/Contacts/Contact.js' => 'c25c0f38cc8da0ed4dcf514593dc4015', - './modules/Contacts/views/view.list.php' => '0926c2683a1e47f09c90b6699022714a', + './modules/Contacts/contactSeedData_jp.php' => '3143e5fa445012373e29cec353356a79', './modules/Contacts/views/view.validportalusername.php' => 'd931af4e4d45c3bb81f6e35d93185c10', './modules/Contacts/views/view.retrieveemail.php' => '9640acc692cd227bb9eb62f5e093f5e7', './modules/Contacts/views/view.mailmergepopup.php' => '48644b73c9fd9d28f577756de1047d19', './modules/Contacts/views/view.edit.php' => '616587437c988dea31c3bcf6f164199a', - './modules/Contacts/views/view.detail.php' => 'ddc36d7454144420ca368a40d34c85d8', + './modules/Contacts/views/view.detail.php' => '2c45f28082533e70471952654369e1f4', './modules/Contacts/views/view.contactaddresspopup.php' => '5527c284f39b5b5a8f5b6442c66418e3', './modules/Contacts/views/view.closecontactaddresspopup.php' => 'ea49918991a66737c59935aab4b95868', './modules/Contacts/tpls/QuickCreate.tpl' => 'bc8b3245dd9829b8e3c43b368f03f535', @@ -2471,28 +2416,29 @@ $md5_string = array ( './modules/Contacts/metadata/subpanels/ForCases.php' => '11977517e432f540e8818390579b50be', './modules/Contacts/metadata/subpanels/ForCalls.php' => '05728178cd78cad474a8a0970b86d44c', './modules/Contacts/metadata/subpanels/ForAccounts.php' => 'dc4bc95c9ab4fa1a94932f0623c6b516', - './modules/Contacts/metadata/subpaneldefs.php' => 'eb042ef2d0bf11346e2f593f8b41a91d', + './modules/Contacts/metadata/subpaneldefs.php' => '94121beadcf079c36ca7137769c80b1f', './modules/Contacts/metadata/studio.php' => 'cd366f7f66c095df7ad089dc16c56dbf', './modules/Contacts/metadata/searchdefs.php' => 'd14992c1c5b35bf3ea9ff33f3c412f1a', - './modules/Contacts/metadata/quickcreatedefs.php' => 'f3071587fe73499a7436a46c73b20dc6', + './modules/Contacts/metadata/quickcreatedefs.php' => '1530b3dbe0af3aa7bdb10e75c33a3136', './modules/Contacts/metadata/popupdefsEmail.php' => 'ce9d210c9205a052bc4abd020301cf54', './modules/Contacts/metadata/popupdefs.php' => '29d9a8b0823c22649d62ab00d1e0b22e', './modules/Contacts/metadata/metafiles.php' => 'de7d02f5eed16516f68c430cd353bb9a', - './modules/Contacts/metadata/listviewdefs.php' => '45a70da06f20f60052498ff35bfc4fee', - './modules/Contacts/metadata/editviewdefs.php' => '2ff317404ec6cb66e3cbd33ec94db87f', - './modules/Contacts/metadata/detailviewdefs.php' => '75d4d4a0456df3d76f97ca46e1e1c791', - './modules/Contacts/metadata/additionalDetails.php' => 'c3253504941c2f8c61adb49647875de9', - './modules/Contacts/metadata/SearchFields.php' => 'c7ec0d2d5f13a516ec5a6898ffcefcc2', - './modules/Contacts/language/en_us.lang.php' => '9de3bfac54f4df57d472ba0259bc9e57', + './modules/Contacts/metadata/listviewdefs.php' => '613a5044881408b90aae0dca2c961e06', + './modules/Contacts/metadata/editviewdefs.php' => '7fb5eec08107985f4f601c1de959848f', + './modules/Contacts/metadata/detailviewdefs.php' => 'd8fe811223ef207614e14d511b9e88ec', + './modules/Contacts/metadata/additionalDetails.php' => '45f481a739f6a48423931bf4098dc548', + './modules/Contacts/metadata/SearchFields.php' => '352dbc56b126d2e4138a715671b27140', + './modules/Contacts/language/en_us.lang.php' => '8bd052b7926ee814e9cb2c288b8a7ff1', './modules/Contacts/field_arrays.php' => '7979238d640cc613dcb97ef7b8369520', './modules/Contacts/controller.php' => 'b2385209924456abde6cabff56a4afd5', - './modules/Contacts/vardefs.php' => 'ceb5a8b6dd43a21f3b8276f79d8097c4', + './modules/Contacts/contactSeedData.php' => 'bd6128941b466779ca5598bfccae797a', + './modules/Contacts/vardefs.php' => '7c21a4212739280e297971f7910e55dc', './modules/Contacts/SugarFeeds/ContactFeed.php' => '7660842c3373bb38fb4ea53066daabee', - './modules/Contacts/ShowDuplicates.php' => '1eab54c20a91e829674014ece2775ea0', + './modules/Contacts/ShowDuplicates.php' => '6d03e4321eba50a8a70049f1965a513e', './modules/Contacts/ShowDuplicates.html' => 'c326e91ae04dfa6833ddce04ee60d769', './modules/Contacts/SaveContactOpportunityRelationship.php' => '8ac7f5cbffc192f6322416d3d16bed96', './modules/Contacts/Save.php' => '1b4ce85e609248a628125166c5030077', - './modules/Contacts/Popup_picker.php' => '4de07c7a6064d7cb6cefb2036c3b8662', + './modules/Contacts/Popup_picker.php' => '02da6f45ac3193f245ff02c924a8b183', './modules/Contacts/Menu.php' => '8ddaf15eb43427d158a48ee8599442e3', './modules/Contacts/MailMergePicker.html' => 'a8cba0cba92b774e25ead5b3f976b74c', './modules/Contacts/Email_picker.html' => '78bdb107df9c0222aadaa98ae35ff69b', @@ -2500,40 +2446,40 @@ $md5_string = array ( './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.meta.php' => '3044ab418bf29f2ee89b06548dad7d07', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php' => '0d778c85679f45a9ae3b4a9bb7a49f49', './modules/Contacts/ContactsQuickCreate.php' => '461a6331753225577ea1b5c74815a052', - './modules/Contacts/ContactOpportunityRelationshipEdit.php' => 'd1946dd0e5403b21bbe9733e920c7678', + './modules/Contacts/ContactOpportunityRelationshipEdit.php' => 'c03c7a1476fb0c4e52110c9265c4f710', './modules/Contacts/ContactOpportunityRelationshipEdit.html' => 'f2eeb01bb169f5bd9a43c9985473583d', './modules/Contacts/ContactOpportunityRelationship.php' => '23e4e969874e613f7e55a37c4bbf96e8', - './modules/Contacts/ContactFormBase.php' => 'd6c1e53d1c119722feedec3c4251f7a6', - './modules/Contacts/Contact.php' => 'f807fed9e5e4044a84b401d705a74ae6', - './modules/Contacts/BusinessCard.php' => '32d5200d10e7996dd416c39a20401512', + './modules/Contacts/ContactFormBase.php' => 'ceaa181118f4a61911c13790ef6a8224', + './modules/Contacts/Contact.php' => '86d41af55e832d05e4b454e892affbb4', + './modules/Contacts/BusinessCard.php' => '7bdc7f435da07344ae622c15ea097d85', './modules/Contacts/BusinessCard.html' => 'c2bfce3507bdfd8b438c67f0a9e60cde', './modules/Contacts/Address_picker.html' => '7232668a97db6fa8eb87c87f0b033401', './modules/Contacts/AcceptDecline.php' => '09d9c0c134fa2488bf6cc22b2b0f7257', './modules/Connectors/Connector.js' => '448a920b04476b7e61ad78fc4c5c4123', './modules/Connectors/views/view.sourceproperties.php' => '5f43019c57e6c94cfa0b97694662c92a', './modules/Connectors/views/view.searchproperties.php' => 'b3a55332662378c058a05d75bcf00015', - './modules/Connectors/views/view.modifysearch.php' => 'a1c1d1b9410c593d8995bfbd4fa1f15b', - './modules/Connectors/views/view.modifyproperties.php' => 'ffb71afd16610191accf19caa1246d4a', - './modules/Connectors/views/view.modifymapping.php' => 'c46ba78f560ac98c7c634245ead59cb7', - './modules/Connectors/views/view.modifydisplay.php' => 'd317001974987b5783a313b102a89519', + './modules/Connectors/views/view.modifysearch.php' => 'cc545dfa1b7b84098cb83e24e0c099d0', + './modules/Connectors/views/view.modifyproperties.php' => '04159f31e3dad12ec8c8e1a6c4ff7a6a', + './modules/Connectors/views/view.modifymapping.php' => '0b4f195bddabdefc1af20f1bb6ac8163', + './modules/Connectors/views/view.modifydisplay.php' => '87611a83b1b0945b6355cff5718ecbfd', './modules/Connectors/views/view.mappingproperties.php' => '332325d9ec58a2e269a1773086c64468', - './modules/Connectors/views/view.displayproperties.php' => '031a0fb4f29803b4aaa55bdf19160cd3', - './modules/Connectors/views/view.connectorsettings.php' => 'b8a5bcb2dd0688d4cb51f169d9ab9942', + './modules/Connectors/views/view.displayproperties.php' => 'fd1bf72a9e5a5de82c700c33a0815ba0', + './modules/Connectors/views/view.connectorsettings.php' => '27b0e2533c955c67dc7f6c91abb70a2b', './modules/Connectors/tpls/tabs.css' => 'cdac9cfd5fb156606b441ec785bc677f', './modules/Connectors/tpls/source_properties.tpl' => '7f469c2832dd3dba7a14fdbb23ae1302', './modules/Connectors/tpls/search_properties.tpl' => 'a2f98440eb1dcb34dd0a465a6409b1cd', './modules/Connectors/tpls/search_form.tpl' => 'e69676baf219ad0e51cc2265a6503fe9', - './modules/Connectors/tpls/modify_search.tpl' => 'c2ffa75bfd81a2e53c89fa4cc2ecdf2e', - './modules/Connectors/tpls/modify_properties.tpl' => '1f18a624b7123d56d93aa03ba8f99f57', - './modules/Connectors/tpls/modify_mapping.tpl' => '2559ca3fb736e336e4776300099c1fc2', - './modules/Connectors/tpls/modify_display.tpl' => '4c578aecdf3b8194d9f4b62b1b53ae4d', + './modules/Connectors/tpls/modify_search.tpl' => '1e29f4f300f866ea5ede6027a2bb111c', + './modules/Connectors/tpls/modify_properties.tpl' => '9e3fc7bf53dbc9a0c1423710ab786d13', + './modules/Connectors/tpls/modify_mapping.tpl' => 'cecc0f7081e504cf5f945981c49030c6', + './modules/Connectors/tpls/modify_display.tpl' => '89fba21ad36add1b18e9ac34826ead3c', './modules/Connectors/tpls/mapping_properties.tpl' => 'bca2954c7d96ba94ad4fd3c107348854', './modules/Connectors/tpls/listview.tpl' => '4264ad6abd2ae56dbb0eea70300f7b63', - './modules/Connectors/tpls/display_properties.tpl' => 'b91385de219f5edb96681477869c088c', + './modules/Connectors/tpls/display_properties.tpl' => 'bf26ef4888010f7165d6d46496c74f00', './modules/Connectors/tpls/administration.tpl' => '5593390a3a543f00dc7abb6fd6582349', './modules/Connectors/metadata/searchdefs.php' => 'ac41e08a95787079b76e1b4214b48536', - './modules/Connectors/language/en_us.lang.php' => '7de2c6735b830221701cae546e0b0688', - './modules/Connectors/controller.php' => '6b664c1df209c9ec3c50807cad2ea55c', + './modules/Connectors/language/en_us.lang.php' => '2a29be51f017cdc6c8e326dfed53a673', + './modules/Connectors/controller.php' => '45f856a85fb256d9fe4a0bfd2302e698', './modules/Connectors/connectors/sources/ext/rest/linkedin/vardefs.php' => 'f58cabfef259cdfdd1c7f5c451579e9f', './modules/Connectors/connectors/sources/ext/rest/linkedin/mapping.php' => 'bdcb08f59c7f7190c89d522f8a8eb1bd', './modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php' => '02d33b07337483103e4ed86c4fbafcf2', @@ -2545,106 +2491,105 @@ $md5_string = array ( './modules/Connectors/connectors/formatters/ext/rest/linkedin/linkedin.php' => 'e5f3dc4e58123f2ed7c45e49c13cca2a', './modules/Connectors/action_view_map.php' => 'c7c6db82bfb2579b3e1cf60d32c60122', './modules/Connectors/Menu.php' => '6dc050c32fc631c5f5835272a95ca16e', - './modules/Connectors/InstallDefaultConnectors.php' => '134be513282c4d9c24bbb95b645b1c67', + './modules/Connectors/InstallDefaultConnectors.php' => '942aea80cb73a76259fdc8bf43685cb6', './modules/Connectors/Forms.php' => 'e773d1cb9319008bb56c2522ab5021c4', './modules/Connectors/ConnectorRecord.php' => 'ab7b51444082460d55cb5f62dd83a716', - './modules/Configurator/views/view.sugarpdfsettings.php' => 'dde9cc7d75d3f19f8ebc4358154b0ce3', - './modules/Configurator/views/view.fontmanager.php' => '89fc1754f7943bbab734a64f0786e5b1', - './modules/Configurator/views/view.edit.php' => '1cb57776f2d139bed2b0088f30ccde02', + './modules/Configurator/views/view.fontmanager.php' => '3ce0375ffd20d0a553cc7be5a20bf381', + './modules/Configurator/views/view.edit.php' => '937667b13835d513e56f67bb79158cf6', './modules/Configurator/views/view.adminwizard.php' => '6826936013bd84bcacf9e11337354ab7', - './modules/Configurator/views/view.addfontview.php' => '1465d6c0ee67ce9ee85e8b94abcf751a', - './modules/Configurator/views/view.addfontresult.php' => 'a22a73b6b915a13dce62431a27160a89', + './modules/Configurator/views/view.addfontview.php' => 'ccdb345fd966396e7de89ce764044099', + './modules/Configurator/views/view.addfontresult.php' => '6f1a8444207a196b5739ceae3cf56e66', './modules/Configurator/tpls/fontmanager.tpl' => '45f58b42e0a31f0ce33be60e420155e1', - './modules/Configurator/tpls/adminwizard.tpl' => 'afc0eac0c32019a82dab648f1619606d', + './modules/Configurator/tpls/adminwizard.tpl' => '1e1726f442c4ebcca562e4df41570549', './modules/Configurator/tpls/addFontView.tpl' => '730f5df9fcf9b30c3cb9aa58d0045c7b', './modules/Configurator/tpls/addFontResult.tpl' => '0788b5174905d3013feb14f7ec4381be', './modules/Configurator/tpls/SugarpdfSettingsFields.tpl' => '7a8b844ca3e554a8050ffc9a4bdbb294', './modules/Configurator/tpls/SugarpdfSettings.tpl' => '186fed1d7dffb54c8319d439d63c35de', - './modules/Configurator/tpls/EditView.tpl' => '8bc868d1724ef38a042f93d3acbcebd6', + './modules/Configurator/tpls/EditView.tpl' => 'd9ca44c76c35d5293fe5fccc63a830d6', './modules/Configurator/metadata/SugarpdfSettingsdefs.php' => 'd9b13b9d6b0ef655942d094d116f509d', - './modules/Configurator/language/en_us.lang.php' => '5d121c096948caf0675e743dafcba16f', - './modules/Configurator/controller.php' => '8304c1c649cb5549328ab56b406045b3', - './modules/Configurator/UploadFileCheck.php' => '9ea5cae1af2a1f9eec3bb6b48945dc27', - './modules/Configurator/action_view_map.php' => '5ae1cc06862e145e7726734cfd89d9a2', + './modules/Configurator/language/en_us.lang.php' => 'd3f0e29ad124ff21508493584c48548a', + './modules/Configurator/SugarpdfSettings.php' => '3ce388315f9383c1e2c3bbaf183b0ffb', + './modules/Configurator/controller.php' => 'd3d07dc0f1108e421cd9959707b52fed', + './modules/Configurator/UploadFileCheck.php' => 'b5e01af685abb09cfc735399cbc758b4', + './modules/Configurator/action_view_map.php' => 'dd3dccd29f4f0ad3ab6935a8dda0a359', './modules/Configurator/Menu.php' => 'f978c89aacc457107486e53fe5768f80', './modules/Configurator/LogView.php' => '77668af21cdf1132cbbff065419e56c0', './modules/Configurator/Forms.php' => 'a904600913c726e07c3ae5d7c81a9803', - './modules/Configurator/Configurator.php' => 'bf225a3445d6fb2111756c04e223311b', - './modules/Charts/DynamicAction.php' => '006d59c830fae1d8d2f61e66936dcb28', + './modules/Configurator/Configurator.php' => '535a1edadd10a8d0dc86428926f91437', './modules/Charts/language/en_us.lang.php' => '35fb7000f67e1a0a80e4082e07eee3ee', './modules/Charts/code/predefined_charts.php' => '26bb40f32bad05579ed73a87e07c3c32', - './modules/Charts/code/Chart_pipeline_by_sales_stage.php' => '6ddf4d467fbf5f66796fcc961e8df518', - './modules/Charts/code/Chart_pipeline_by_lead_source.php' => '7dfd55d4b930670002fee0f0e62e8c40', - './modules/Charts/code/Chart_outcome_by_month.php' => '725b9cd7b67a7ad88d266065a90e8add', - './modules/Charts/code/Chart_my_pipeline_by_sales_stage.php' => '801b0f178cd47f2e25eff2f7ab9da185', - './modules/Charts/code/Chart_lead_source_by_outcome.php' => '52f6db752fe424c66980c71d788dc480', + './modules/Charts/code/Chart_pipeline_by_sales_stage.php' => '27585f0e0bccb978b8327f286a5f7cdb', + './modules/Charts/code/Chart_pipeline_by_lead_source.php' => '7970b884c814b54e3fa0e0b36e67ac2c', + './modules/Charts/code/Chart_outcome_by_month.php' => '47c665fa4ba268e527845a6f7c67e0fb', + './modules/Charts/code/Chart_my_pipeline_by_sales_stage.php' => '4aad73747648eb0e03960051fbee8c09', + './modules/Charts/code/Chart_lead_source_by_outcome.php' => '33df77f76204346d53605c4cc16de710', './modules/Charts/chartdefs.php' => '9abdf4acefb1bf18df7d12cc9edb1ed1', - './modules/Charts/PredefinedChart.php' => 'd72fef32d4b54638fd16f2f2a9f0780d', - './modules/Charts/Dashlets/PredefinedChartDashletScript.tpl' => 'a6cb84b6eb49a5a777bd84179f3d7fb3', - './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php' => '0a3fb878b1dc6750d8978c9534f13ef9', + './modules/Charts/PredefinedChart.php' => '46cb05514e30ff26c40505805981312f', + './modules/Charts/Dashlets/PredefinedChartDashletScript.tpl' => '0a6bcd800a8ae556b28c159ded632d1a', + './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php' => 'b07650dd4337494a91a996d5b89e79cf', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.meta.php' => '596379d45a15cbfcab6df35fa7aea504', - './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php' => '1cfcb557f086058718227e063fb51174', + './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php' => 'edc42667b799f71a6e696984b4b90e9d', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.data.php' => '6fa623f04ca10da8cd5daa927308920c', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageConfigure.tpl' => '4c26515a8f4654ff635cec79d87fa18b', - './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php' => 'e79d8cbc1b3e709c1bd4e238c37d36ce', + './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php' => 'cf48260166c8b6c93f9ce7015c68ef69', './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.meta.php' => 'eb83981e07033343210913c8552e98cb', - './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.en_us.lang.php' => 'ad28142c5393a17c71b561466a09509a', + './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.en_us.lang.php' => '3abe026ee4e8cd2b4ac52e4408a48286', './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.data.php' => '320e1e77b43d882254febbbc151d15ac', './modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthConfigure.tpl' => '387bdbb2e000cd674ff76919f6e0d334', - './modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.php' => 'ad404e86d38ea1f603fa7fd79b58db55', - './modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.meta.php' => '1b0aef72159327751b70f28d56348a3b', - './modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.en_us.lang.php' => '31b731d78ef6ff8fc6c1ae685e65bd5b', - './modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.data.php' => 'b57e760d1e0be35e53cec4290d54a80d', - './modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceConfigure.tpl' => '26e1153049e0ec20b9b6092d1c274f37', - './modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.php' => 'e2b735735dbbfd483e6a2257756ac45c', - './modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.meta.php' => 'f410571259098d9c5351df98fe586a58', - './modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.en_us.lang.php' => 'f7f11fcc59acfc96595206d38442773d', - './modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.data.php' => 'd8337b4ff674acf896f15aa59598cf81', - './modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeConfigure.tpl' => '431b0d628ad92789389e58ba84f3715c', - './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php' => 'f470b9e8c9959ea9409c73a8ea0d2d65', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php' => 'e73624fec4174cbd8f113b4c9fa1f3d9', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.meta.php' => 'a4b159e9e5551cfa1cea237859ee868d', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.en_us.lang.php' => 'a15a9ae8f317a4810d8975410baa1a6e', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.data.php' => '4b3a23c0b352280cc4ce94f4317fc8ce', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceConfigure.tpl' => '26e1153049e0ec20b9b6092d1c274f37', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php' => '76e73fc1f162b023844a7372e64b1b1d', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.meta.php' => 'ad9b8520a2dd8e4a10f49e8fc5889379', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.en_us.lang.php' => '8bc907a5b785aff90d2e3c7b983c97c9', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php' => '288e013ed6c4b064e14e8b829936f04a', + './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeConfigure.tpl' => '431b0d628ad92789389e58ba84f3715c', + './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php' => 'c2d5549473fb0b94c557af3f5627fe35', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.meta.php' => '80a6fb7ae30d669bbde56b908907d381', - './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php' => 'af53f692afb8c957a29ebc997d034cc5', + './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php' => '1c5b04ebbec38ce64c1e78dbaad68c8e', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.data.php' => '69ac6d4207accac35af17dc7faea66ef', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageConfigure.tpl' => '37eafb5d1b8ef3df4e074a7d672f32dd', - './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php' => 'ddf0a69768bc1b44bd0aaa2008b5f720', + './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php' => '1761ad05e4ff7c9cf4811921e2354cd5', './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.meta.php' => '6b2964ec3b17a25ed8dfdcb61492f913', - './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.en_us.lang.php' => '4851b79a0581975e1b4e78aa4676e82b', + './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.en_us.lang.php' => 'bd93731236935961bd0fba507fdaa149', './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.data.php' => 'c8da14210aa4478fa84d9ed10f215349', './modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartConfigure.tpl' => 'e2f8e61a236a9f10a44909accac0777b', - './modules/Cases/vardefs.php' => 'c7659b74521095cb41152d2b494ed1af', + './modules/Cases/vardefs.php' => '4b6b74df7d7774b58294ae32e401bfff', './modules/Cases/tpls/QuickCreate.tpl' => '797858191cb07c7ca91d09fd93126694', './modules/Cases/metadata/subpanels/default.php' => '3c1eba43b601bd86dd4c7b8703d2a46f', './modules/Cases/metadata/subpanels/ForEmails.php' => '6facba33a069dc4ee000b6dcc358058a', './modules/Cases/metadata/subpanels/ForAccounts.php' => 'a1bfe3a4423771972a2a3773e8caa1ec', - './modules/Cases/metadata/subpaneldefs.php' => 'd137d32a50230212d86792f2776edf68', + './modules/Cases/metadata/subpaneldefs.php' => '8fb137da47549325079f3536c0ab7466', './modules/Cases/metadata/studio.php' => '11e821aac94c253d481d5a7be2a8a662', - './modules/Cases/metadata/searchdefs.php' => '467c870d47f30abe975501354935a2eb', + './modules/Cases/metadata/searchdefs.php' => 'a016afba8acd870dac7d9d574db218e1', './modules/Cases/metadata/quickcreatedefs.php' => '027b0adfdcf631f290d51db06b8a991e', './modules/Cases/metadata/popupdefs.php' => '944fabacbbbb5e1b7c8108e7dced46c0', - './modules/Cases/metadata/listviewdefs.php' => 'fbaffa79fc817cc6bacab216cd98e37b', - './modules/Cases/metadata/editviewdefs.php' => '9c7b9d83c0b7410112dcac58fb8c6100', - './modules/Cases/metadata/detailviewdefs.php' => '456060728ba6c23a7c21fca8eff48234', + './modules/Cases/metadata/listviewdefs.php' => '5dad5403ea9516fe8eb85a282ff50333', + './modules/Cases/metadata/editviewdefs.php' => '9dc03019470a24d5a9526d34f15797f7', + './modules/Cases/metadata/detailviewdefs.php' => 'e1f13c3858f36a4974e70b3616242bb7', './modules/Cases/metadata/additionalDetails.php' => 'b5fdd019a481f19c1ce2eca6791857f3', './modules/Cases/metadata/accountsquickcreatedefs.php' => '3356167b784bbcbb3eaabf31fd2b6f3f', - './modules/Cases/metadata/SearchFields.php' => 'efc6859977ba842d18c2942a5a230f95', - './modules/Cases/language/en_us.lang.php' => 'a1f9017806b75f77a704736b8280bcb8', + './modules/Cases/metadata/SearchFields.php' => '8242cb4de26b3a68e1451a38736cc1c3', + './modules/Cases/language/en_us.lang.php' => 'e5e00ef1d1699a9193f90f0053aba8ff', './modules/Cases/field_arrays.php' => '3b9c8352d892a4e19ca7ff5005a85f30', './modules/Cases/SugarFeeds/CaseFeed.php' => 'b9d038b0508335b872b2df25574140df', - './modules/Cases/Menu.php' => '86f7bab5fd40631e0565b376c201a5b0', + './modules/Cases/Menu.php' => '7ef12d4c78d3e65ca76138f5b8cf3494', './modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet.php' => '994eb878596fa41a8e14744d18cf8b46', './modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet.meta.php' => 'cb8284529059186a4c16765170ddff96', './modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet.data.php' => 'eb93b8b1caa0cfe15eaae4212014daed', './modules/Cases/CasesQuickCreate.php' => 'b879a8dcfbf3a942dce6fb262c823d74', - './modules/Cases/Case.php' => 'f2962240f2d093a7f47f5d1615dea6fa', + './modules/Cases/Case.php' => '5c74dc01d65f3f057a9373db8056bbb3', './modules/Campaigns/DetailView.js' => '9c71b63bea528bbf482fac49f0e38113', './modules/Campaigns/WebToLead.js' => 'da75713a096d89079d4ff82ebc385c7e', './modules/Campaigns/wizard.js' => 'f53e95ad336d9649168d18c5c6c4319b', './modules/Campaigns/views/view.newsletterlist.php' => '2015b9de130f1e78e94eedca04893be3', './modules/Campaigns/views/view.modulelistmenu.php' => '1751b4ef7f8b269f3b0af2d19f488e2f', './modules/Campaigns/views/view.detail.php' => 'af18d9f32a40b17ee42d7eab081cf2b7', - './modules/Campaigns/views/view.classic.php' => 'c21fffc7f64f157157aa94b046b98d5f', - './modules/Campaigns/vardefs.php' => 'd0278b4d89bb664c57f676d72787458e', - './modules/Campaigns/utils.php' => '9dac051dd98e886c7e8dcfb07f5f5747', + './modules/Campaigns/views/view.classic.php' => '062d38e63eff01be37644b19fbf7a384', + './modules/Campaigns/vardefs.php' => '439fd4b9a0cb487c37c343198327528d', + './modules/Campaigns/utils.php' => 'c1aa0d23b109ff55dc57a004e5524dfc', './modules/Campaigns/tpls/WizardNewsletter.tpl' => 'b5269b70c8f7dce81302806d37308738', './modules/Campaigns/tpls/WizardHomeStart.tpl' => 'b2c166db9c1b6d84f5e06fda0906d002', './modules/Campaigns/tpls/WizardCampaignTracker.tpl' => 'b99769ad295f43da1955b4f5ca99d6c8', @@ -2658,24 +2603,24 @@ $md5_string = array ( './modules/Campaigns/metadata/studio.php' => '141bd1ea7d7209a4d349fdc8ba795d38', './modules/Campaigns/metadata/searchdefs.php' => 'cd57f35951f25372ed5317aab5f2c74e', './modules/Campaigns/metadata/popupdefs.php' => 'b73f6ffbd1768594c157645e88d495dc', - './modules/Campaigns/metadata/listviewdefs.php' => 'ae1c799286ec57c7b997608036c89013', + './modules/Campaigns/metadata/listviewdefs.php' => 'dc2cb74bbf49db13a77fb94e3404b62d', './modules/Campaigns/metadata/editviewdefs.php' => '5974e03290fce92dfab03fdaf67ae0ee', './modules/Campaigns/metadata/detailviewdefs.php' => '6e53e967b9a001f0b85bcc2dba94eb3c', './modules/Campaigns/metadata/additionalDetails.php' => 'dadbd74bc0e5c908e63786758b706d17', - './modules/Campaigns/metadata/SearchFields.php' => 'a9fcb8e72d83353cb2f39af139b30492', + './modules/Campaigns/metadata/SearchFields.php' => 'c98fee058755b4a1d26bde1d3bd5aad2', './modules/Campaigns/language/en_us.lang.php' => 'c35bb1c0ec0cb28f3680db743939527a', - './modules/Campaigns/image.php' => '3fcaeccb6fd036d4b250be1f030ae4a9', + './modules/Campaigns/image.php' => '1a59056cbb8ef28cd2dd463d7117ece6', './modules/Campaigns/field_arrays.php' => '933825db8adca7af782b2dc8104e36cc', './modules/Campaigns/controller.php' => '241be0ccc9559c9a86c941cb6c961589', './modules/Campaigns/chart.tpl' => '323ee5c2992ae57303a540ba97ae9a4b', './modules/Campaigns/action_file_map.php' => 'fa8777d95f02d8105263d70f2d0856c7', './modules/Campaigns/WizardNewsletterSave.php' => '380e4d734a2bf0d7a03101fc98b19597', - './modules/Campaigns/WizardNewsletter.php' => '0a31e62d9373465c8b261ca4bca9bfbc', + './modules/Campaigns/WizardNewsletter.php' => 'a3de4bacd77a2adbeb0cdd965b7d1572', './modules/Campaigns/WizardNewsletter.html' => '005541645fa95275b0a607e1beff83af', - './modules/Campaigns/WizardMarketingSave.php' => '74336fd83c554fa45c81dfcbac6d2c1d', - './modules/Campaigns/WizardMarketing.php' => '46ba7cdcface748a224e1188a7dbd71e', + './modules/Campaigns/WizardMarketingSave.php' => '8cf3ecb62a79c5565a328163bb72e364', + './modules/Campaigns/WizardMarketing.php' => '0273c33f4a644ace98ca5747f5615904', './modules/Campaigns/WizardMarketing.html' => '9c790a08a611ef353b29108fc7619f49', - './modules/Campaigns/WizardHome.php' => '5ba81d74b4a335f4f8bf9d5706e125a9', + './modules/Campaigns/WizardHome.php' => 'cbffdbd1efab6b641909cd4d06169915', './modules/Campaigns/WizardHome.html' => '546c0d6b0954c035a7109927b77e6565', './modules/Campaigns/WizardEmailSetupSave.php' => '374734a4576af66f12c5698d80f48867', './modules/Campaigns/WizardEmailSetup.php' => '6459fad4a6876e6b31da710d4eb07e6d', @@ -2685,40 +2630,39 @@ $md5_string = array ( './modules/Campaigns/WebToLeadDownloadForm.html' => '0dad56489a4f4ee750ece5fb5a39c87b', './modules/Campaigns/WebToLeadCreation.php' => 'fe2eb3bf194f8e0657531aa3b6c9837d', './modules/Campaigns/WebToLeadCreation.html' => '2bc9da494178149c4f9c96eac5964392', - './modules/Campaigns/WebToLeadCapture.php' => '8165676b95d18de0c07aac4970e7dad5', + './modules/Campaigns/WebToLeadCapture.php' => '53e482d3733f6b75551878a163587de3', './modules/Campaigns/Tracker.php' => '88f83ca5e269791b2672e041484d018a', - './modules/Campaigns/TrackDetailView.tpl' => 'ccc80278e8a3043169831651120a28f8', - './modules/Campaigns/TrackDetailView.php' => 'dcc740690b11ec19085065c5d4415e44', + './modules/Campaigns/TrackDetailView.php' => '2a3dac5f2b46ad5323f9b06064541e7c', + './modules/Campaigns/TrackDetailView.html' => '106fe3cf7ce6b6b3b1b701bfa7b4c6e9', './modules/Campaigns/Subscriptions.tpl' => 'c4c0ce84e79bc1cb51cf675e1d78e940', - './modules/Campaigns/Subscriptions.php' => '5ab4f874103d5b4a2885b5bc86a42d88', + './modules/Campaigns/Subscriptions.php' => '69811a5aae1751d16fb9ae8690bfabda', './modules/Campaigns/Subscriptions.html' => 'c48c2e2ee5ad0a6d71d9bd3d424e311b', './modules/Campaigns/SubPanelViewer.php' => '685d8a558a788f75783c2fe27b0163b8', './modules/Campaigns/SearchForm_NewsLetter.html' => 'b63e7dff9a0bd5821d9edc4afca44700', - './modules/Campaigns/Schedule.php' => '66284d35a57831c6970c503b48e70c9d', + './modules/Campaigns/Schedule.php' => '5f0db5e34087037388a75a0b81ad9430', './modules/Campaigns/Schedule.html' => '0a8fcc4b6f67cf99dab1efb104bba071', './modules/Campaigns/Save.php' => '5cc149ddf1dc50ce8ebe13893615417a', - './modules/Campaigns/RoiDetailView.tpl' => '2cb5ff9612b303b9b83708b9584d958c', - './modules/Campaigns/RoiDetailView.php' => 'f52966766f1c651fdc9be9cbf8ac6eef', + './modules/Campaigns/RoiDetailView.php' => 'eb72858d051590b8780a48f1d4d06f3e', + './modules/Campaigns/RoiDetailView.html' => '266bfaca16fc4f219f316007c4b36403', './modules/Campaigns/RemoveMe.php' => '101b10e4dfbc2ded6217050feab4061d', - './modules/Campaigns/QueueCampaign.php' => '2339dd5a8e48272dc23edb41dd329af7', - './modules/Campaigns/ProcessBouncedEmails.php' => '0646fc980371a2060a816bcb73903853', + './modules/Campaigns/QueueCampaign.php' => '7c6dd34ac9d4cf2e1e16bf2bdb9e551b', + './modules/Campaigns/ProcessBouncedEmails.php' => '151573221f93352f39e03c5e79fda762', './modules/Campaigns/Popup_picker.php' => '16904e33546e9e4f7c831c3b47ad7f10', './modules/Campaigns/Popup_picker.html' => '98b49c1bbf13fc6c83007ab48f978a42', - './modules/Campaigns/PopupCampaignRoi.php' => 'b524b8d0e13b50886519077673ceb34f', - './modules/Campaigns/PopupCampaignRoi.html' => 'e6fce810a3f3191cd0ca321c2fea0159', - './modules/Campaigns/Menu.php' => 'ed5ab9b80037a9013a96ebdbe23a38db', + './modules/Campaigns/PopupCampaignRoi.php' => 'b185a6293b2a716c03a535038681fb57', + './modules/Campaigns/PopupCampaignRoi.html' => '565d8575d3c62c66d158d7d5e0f670bf', + './modules/Campaigns/Menu.php' => '7ce7e97a28d6cae9c4d6b5be04d163e7', './modules/Campaigns/MailMerge.php' => 'f875b21b8c8f5e60d256a09558f17799', - './modules/Campaigns/GenerateWebToLeadForm.php' => '56437b51720d89222126161b881e2672', + './modules/Campaigns/GenerateWebToLeadForm.php' => 'a2804d70d304d3413ed7e0ad04cc1744', './modules/Campaigns/EmailQueue.php' => '79151d29eef076a928194529519f530f', - './modules/Campaigns/Delete.php' => 'aae524b404a661c8ff3709219a1f9712', - './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl' => '85a1f82b9edf6d5c867fdbb49b645cda', + './modules/Campaigns/Delete.php' => '873d84048998ce7fb44d914f3bcfb8d1', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl' => 'c2f9905521e83c1af638f83e4988fc67', - './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php' => 'ec101f3befe73ca359fae4f6251c6d26', + './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php' => '345b063d81507fbf26902cc05e50b75c', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php' => '6da4b31958931a8f5138fecb7925b7c4', - './modules/Campaigns/Charts1.php' => '3e0262e983a12a06565b6865be74670a', - './modules/Campaigns/Charts.php' => '9199f1b68c7a79fdddf26859fb07bc33', + './modules/Campaigns/Charts1.php' => '55167185b59395e061f4ec83eb8f8a6e', + './modules/Campaigns/Charts.php' => '946864c0fa5e953efa6841b8f527f291', './modules/Campaigns/CaptchaValidate.php' => 'ba5f2ca64c8efd231363692da67be91a', - './modules/Campaigns/CampaignDiagnostic.php' => '3a22574096c9a30c12332d6c666bb7cc', + './modules/Campaigns/CampaignDiagnostic.php' => '14b20c6a36e0df162dc72359a0db063f', './modules/Campaigns/CampaignDiagnostic.html' => '8fab01d12a48e429496c63d383fbbb88', './modules/Campaigns/Campaign.php' => '1ec8c6e4a91c517b60354f67647e74b1', './modules/CampaignTrackers/vardefs.php' => 'f3a7c681ec09bbbb2e5771494acaf0ce', @@ -2728,80 +2672,81 @@ $md5_string = array ( './modules/CampaignTrackers/Menu.php' => '757e41606b50ef3bd765688c58da6ab6', './modules/CampaignTrackers/Forms.php' => '1cfbf63c2df97772313450ef33f404c2', './modules/CampaignTrackers/Forms.html' => 'fba11af98aec13a0240fdb1995649fab', - './modules/CampaignTrackers/EditView.php' => '1cd0eba6aecfdb1d2a2e610d2d64d3f4', + './modules/CampaignTrackers/EditView.php' => '68adb52bac2a15c5fcca66e3c3a9131b', './modules/CampaignTrackers/EditView.html' => '080d867a1b0fac32edbbffc2a1d565e9', - './modules/CampaignTrackers/DetailView.php' => '4ef4d9972013f7790404a43d3f3b19c3', + './modules/CampaignTrackers/DetailView.php' => '660e99351093c6a895966092ddef8a9e', './modules/CampaignTrackers/DetailView.html' => '4f5b76bc757284ac2a7dc029d733496d', - './modules/CampaignTrackers/CampaignTracker.php' => 'eaf4cb5ad33c4cd5aa497d94a89188de', - './modules/CampaignLog/vardefs.php' => '6d64865931155de64f176d507ba0ac30', + './modules/CampaignTrackers/CampaignTracker.php' => '69867be4d2c5d31bbb65502d4a2467fe', + './modules/CampaignLog/vardefs.php' => '7a008c4d7a237e0f92203fcdd848375d', './modules/CampaignLog/metadata/subpanels/default.php' => 'd29a247f61cf3e64cfec8c6bab63821d', './modules/CampaignLog/metadata/subpanels/ForTargets.php' => 'aea0656fb66b1762d3139bf70000d101', './modules/CampaignLog/language/en_us.lang.php' => '03e85595b5c4cb5b27425763e9592e76', './modules/CampaignLog/Popup_picker.php' => '355e51e3620b3d03c4417b7547c2d279', './modules/CampaignLog/Popup_picker.html' => '45f8b45d8730af406dddfdf19a6c7756', './modules/CampaignLog/Menu.php' => '72cee4346bd510cecbc46485b04ade14', - './modules/CampaignLog/CampaignLog.php' => 'ba7bff8e1cbbfbbc4cd511e1ff63935f', - './modules/Calls/views/view.edit.php' => '2de3014f25fd6bb22f2657ddf6d94d43', - './modules/Calls/vardefs.php' => '35b6a6a0024b522fbf9645f762972ea4', + './modules/CampaignLog/CampaignLog.php' => '65daa9fa8dd7b2aba1e1e9ee3260f937', + './modules/Calls/views/view.edit.php' => 'd9a7465f2a7505a60e1847dccdc125ec', + './modules/Calls/vardefs.php' => '03ebe28b63b489dc32cb8bcf138069eb', './modules/Calls/tpls/footer.tpl' => '6082af4d775df02784dc2e6038cc1cbf', './modules/Calls/tpls/QuickCreate.tpl' => 'd3152acfc1a288743f3a617d1051334c', './modules/Calls/metadata/subpanels/default.php' => '69cc2557c0ee5092e31e0e15dc3ccef0', './modules/Calls/metadata/subpanels/ForHistory.php' => '8f647c21eee39024e543e526579ce90d', './modules/Calls/metadata/subpanels/ForActivities.php' => '85ba197064ce84a95d0f863d0b42ef0a', - './modules/Calls/metadata/subpaneldefs.php' => '37cf3687ca0e24f995d7f3c9a998fdbe', + './modules/Calls/metadata/subpaneldefs.php' => '5d91d877a523b9b783e89daf15e27c0b', './modules/Calls/metadata/studio.php' => '6e05d6a206af3864af7b2fe2e00ce5dc', - './modules/Calls/metadata/searchdefs.php' => 'ed1582ec1c2f8aec4268b00b60cbeffb', + './modules/Calls/metadata/searchdefs.php' => '5dc9973566f08155175d1e2d6d9a43d1', './modules/Calls/metadata/quickcreatedefs.php' => 'e32f8243306633414f4e5fc074c52a7c', - './modules/Calls/metadata/listviewdefs.php' => '89051fa7faf2c02ecc5623604fd919fe', - './modules/Calls/metadata/editviewdefs.php' => '16d8c43a17106fc34cd6995fd862c090', + './modules/Calls/metadata/listviewdefs.php' => '5a4d15f05d7a8e0305e3c1a9cfcba680', + './modules/Calls/metadata/editviewdefs.php' => 'bc8e2dfa0b0d023859a4f6a1d95116f7', './modules/Calls/metadata/detailviewdefs.php' => 'fa642df7f3da9169e36da510579fd574', - './modules/Calls/metadata/additionalDetails.php' => '97f403bbf8c0989ec3db860f49e6db84', - './modules/Calls/metadata/SearchFields.php' => '1f35a511c44a9040f634ecd9c3c222ee', - './modules/Calls/language/en_us.lang.php' => 'cebca26458070b491b9e459a928e6e0b', + './modules/Calls/metadata/additionalDetails.php' => '5f500e4f79b2fbbd1716f5de4a14328b', + './modules/Calls/metadata/SearchFields.php' => 'fb3631f78cc66952412375ded78285a3', + './modules/Calls/language/en_us.lang.php' => '1df9e9d6d3623cdf81f388c4e02f6e52', './modules/Calls/field_arrays.php' => 'f4523e1742b9106acfaac6cb4f61175e', './modules/Calls/SubPanelViewInvitees.php' => '5cb02de48efd780fe2c4925cbebf7237', './modules/Calls/SubPanelViewInvitees.html' => '81983d6f2c7415c8602e21b33a60c896', './modules/Calls/Save.php' => 'ce8a54c0bd9cb48c0d680c7873674895', './modules/Calls/Menu.php' => 'e1fd861118213c1367bc3ab5df6b5cfa', - './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => '1a4e4aaebab7532336ee5860e931bffc', + './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => '40ccbfcd97fe826e9e798f196b0656f1', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php' => '67b5354cb664fb2f64c7d7d4778c0f0c', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => '128bb818a9174f56cc03a574aa6f378c', - './modules/Calls/CallsQuickCreate.php' => '29ce9ba05e059e7c66d576a93935c1c4', + './modules/Calls/CallsQuickCreate.php' => 'be92c8a4d6911d510f1c2aeb74969247', './modules/Calls/CallHelper.php' => 'd772215c0ab7f719711d3546d7529094', - './modules/Calls/CallFormBase.php' => '418352a6f8ab4c42d39789c20b1ef11b', - './modules/Calls/Call.php' => '9b1b2fec4fcd3e0f7ba1bb4002b0b4a1', + './modules/Calls/CallFormBase.php' => '6c3228ddd979627dfefd11be0ef79689', + './modules/Calls/Call.php' => 'eadd6668fe0560b59923c3782237e097', './modules/Calendar/views/view.list.php' => 'd0828a61e0acb41956f815c41e6cf609', - './modules/Calendar/templates/templates_calendar.php' => 'a840f71ec99db9c4dcc24d33371a7f9c', + './modules/Calendar/templates/templates_calendar.php' => '9b6fbe4006f34363e31540717faf336a', './modules/Calendar/templates/template_shared_calendar.php' => 'db4237ff405a53de6c8711f69433921a', './modules/Calendar/small_month.php' => '3365291aab18318106c40107d6d34dbb', './modules/Calendar/metadata/listviewdefs.php' => '7a5882bd93cc1353b402b5d2542f033e', - './modules/Calendar/language/en_us.lang.php' => 'eea61667d4e8fb2063b9826ddfa33a82', - './modules/Calendar/index.php' => '8820c0fbe6db19c497a838d567137a8c', - './modules/Calendar/TasksListView.php' => '9bd353c2ca21b290be495aa47b6241db', + './modules/Calendar/language/en_us.lang.php' => 'fc264ddfb971c39c574572248d73b437', + './modules/Calendar/index.php' => '4b0b6ee1096e43efbef454624e56a7c1', + './modules/Calendar/TasksListView.php' => 'a57d6444949072e5a90d3d648235a762', './modules/Calendar/TasksListView.html' => '9e88f3dfbaa5334dffa19fdb60413428', './modules/Calendar/SubPanelSharedCalendar.php' => '31f7f9a358e80cdc5f5bac5a30904760', + './modules/Calendar/Menu.php' => '905b5dc6952f58378b5c77ae8edad9d8', './modules/Calendar/Forms.php' => 'a7fe2be5ad8ae8abbd68ce16c70c1825', - './modules/Calendar/Menu.php' => '9ff62f2ed70cdf0feec71ac6d7a7cd56', - './modules/Calendar/DateTimeUtil.php' => '65cd9a6db1d67bf825fabe9343c136a8', - './modules/Calendar/Calendar.php' => '10d12a54e83dce736365cb6d7fc2ef94', + './modules/Calendar/DateTimeUtil.php' => '2cdd70909dc017d77a73c3d2ecd78b12', + './modules/Calendar/DateTime.php' => 'cad2a9dcc51b952a4664ce7785a6f6bc', + './modules/Calendar/Calendar.php' => 'cea7ec1f49fea975273b3ee7f7cee651', './modules/Bugs/views/view.edit.php' => 'e2ac75d46479fe3748b11782913ec248', './modules/Bugs/views/view.detail.php' => '4a33cf87111a05df094d38cead553683', - './modules/Bugs/vardefs.php' => '6398740b5e910547bc945b7fafe0ef35', + './modules/Bugs/vardefs.php' => '9b0d8d36bd34ba4b39fafc46f3f8ae74', './modules/Bugs/tpls/QuickCreate.tpl' => '34574e6b44da09c734660ee3e027ff24', './modules/Bugs/metadata/subpanels/default.php' => '66f7415c0f6bb180d4fa6b8099956c77', './modules/Bugs/metadata/subpanels/ForEmails.php' => '74fe97a99990f83e1bd3de1a8054036e', - './modules/Bugs/metadata/subpaneldefs.php' => '7b8507aeaf8a489c802f68bdd26db965', + './modules/Bugs/metadata/subpaneldefs.php' => '87bb8e0770441559fbaa1c438504a483', './modules/Bugs/metadata/studio.php' => '051b0e5dce864dec9c2a0c0279afee0f', - './modules/Bugs/metadata/searchdefs.php' => '36e62774c552c9706b1c4429e3437607', + './modules/Bugs/metadata/searchdefs.php' => '524154b069f4ed56c537fc94319ed52f', './modules/Bugs/metadata/quickcreatedefs.php' => 'acd4c7d420aba7e8ed8769983fb13152', './modules/Bugs/metadata/popupdefs.php' => 'e94d05768bb0cb4071b84aae03ab3e3c', './modules/Bugs/metadata/metafiles.php' => 'eb37f1cc4850e60e296ece70506aa4fe', './modules/Bugs/metadata/listviewdefs.php' => '6d7ca22bca5bcc3c8239c86830aaefe7', - './modules/Bugs/metadata/editviewdefs.php' => '7157e347cc165de5660354c6b67a5fe0', - './modules/Bugs/metadata/detailviewdefs.php' => '9465de63c8330e1fd96c2c30fab49c3e', + './modules/Bugs/metadata/editviewdefs.php' => 'c73a4cc9ee70d370a03ea27cb18d2e32', + './modules/Bugs/metadata/detailviewdefs.php' => '13e1c5e4ac1ca436276a69a68c95fe97', './modules/Bugs/metadata/additionalDetails.php' => '2d84911e0e5b611ebf5713106c24c6af', - './modules/Bugs/metadata/SearchFields.php' => 'c594a4a3436cf2f79792303faf1d4e54', - './modules/Bugs/language/en_us.lang.php' => 'f853c51736708c728c8baa40b2ef3b3e', + './modules/Bugs/metadata/SearchFields.php' => '6f3f2935b44c43ca16d2d379d83cd374', + './modules/Bugs/language/en_us.lang.php' => '69717abdbef5f4daefe2a2687eead098', './modules/Bugs/field_arrays.php' => '905bf453c39714dc786f94d7f252c7f8', './modules/Bugs/Menu.php' => 'f4eb9960fc4e7795d22b5d720d65e0cd', './modules/Bugs/Dashlets/MyBugsDashlet/MyBugsDashlet.php' => '82f002f167c39ef796f9122d46183377', @@ -2816,61 +2761,58 @@ $md5_string = array ( './modules/Audit/Popup_picker.php' => 'be9ec35605bed7b59aee3ea1c6fcdc37', './modules/Audit/Popup_picker.html' => '6789fbb26a2fb173f0318eaa7aa54a2c', './modules/Audit/Audit.php' => 'b24c748105c5a3787c67c3eabc834d2a', - './modules/Administration/views/view.languages.php' => '1cfa32f9c7f164c9163f17791d8ab848', - './modules/Administration/views/view.globalsearchsettings.php' => 'a5e8d3ad998f88ee347411e5b58ea8c5', - './modules/Administration/views/view.backups.php' => '516c2b886d0b0e7cab06b9d9a7ab30c7', - './modules/Administration/views/view.themesettings.php' => 'e2fc584638ded589a4a45dcce7c3737e', + './modules/Administration/views/view.themesettings.php' => '425361d2280b404827496b38b932787b', './modules/Administration/views/view.repair.php' => 'bd8a7f2a8c082b08482954355f1a6a6d', - './modules/Administration/views/view.configuretabs.php' => '92e1e1ddf483fb3f9062821a7efc6809', + './modules/Administration/views/view.configuretabs.php' => '1a439bc84b5848b1827188528209dbd9', './modules/Administration/vardefs.php' => '60e43233b0b2fa7a8495a300bca6a01b', './modules/Administration/upgrade_custom_relationships.php' => '025c57943e189ae2fb5793f725238001', './modules/Administration/updateclass.php' => 'a317ca3f3b24fb656a999c2730f0e883', './modules/Administration/updateTimezonePrefs.php' => '8a0baf4e4fdf997aa1c125c640a5232f', './modules/Administration/undoupdateclass.php' => 'bb8da501b8bd927812a9cf694da79c7b', - './modules/Administration/templates/Languages.tpl' => 'b858359aa8fa24dd9705a07a3022a93e', - './modules/Administration/templates/GlobalSearchSettings.tpl' => 'af3e174b2dc44eb2d6ba6221b53655b9', - './modules/Administration/templates/themeSettings.tpl' => '6f9ad6507725e0caa54087efa21cec74', - './modules/Administration/templates/ShortcutBar.tpl' => 'fb74964e1d7bfbb1f9ad8dbe4ea07dec', + './modules/Administration/templates/themeSettings.tpl' => 'abdc9285d67a3b208d5cd67f81f23542', + './modules/Administration/templates/ShortcutBar.tpl' => 'f71a9067594ce86544c94cdce49e380f', './modules/Administration/templates/RepairXSS.tpl' => 'a936c8f3386ac244bc600b60b0a42773', './modules/Administration/templates/RepairDatabase.tpl' => 'a26068c872051ebbdd727ee5e2475a7a', './modules/Administration/templates/QuickRepairAndRebuild.tpl' => '75659804131a655f3f79e628023bbba0', - './modules/Administration/templates/ConfigureTabs.tpl' => '5d5afb070db596dc828be765fb78cd3d', + './modules/Administration/templates/ConfigureTabs.tpl' => 'b55d54166ff8c64fe6eb62b8b57efe6b', './modules/Administration/repairUniSearch.php' => 'e687dbc61a6575390e985e05cbbaba1f', './modules/Administration/repairSelectModule.php' => 'dbda01e72f1bb45430b700e4e143914b', './modules/Administration/ncc_config.php' => 'aa5cbf334ba0430d97b0c370b5f1e83c', - './modules/Administration/metadata/adminpaneldefs.php' => '7415b75ef50d852c795af5714025b7a6', + './modules/Administration/metadata/adminpaneldefs.php' => '5a14f5999256bc6bd734ce1d67b9699d', './modules/Administration/metadata/SearchFields.php' => '4ad8c4a214135a7a1dc307aaf1576d9a', - './modules/Administration/language/en_us.lang.php' => 'c7c7a9d07fd42a14b8e0e1fecdf9ab1f', + './modules/Administration/language/en_us.lang.php' => 'ec8339b0262930ce4e84600df23a9716', './modules/Administration/javascript/Administration.js' => '47ab364695829994ccac9df0da22b960', './modules/Administration/javascript/Async.js' => 'dbab93ac538b27db2097547870bb798d', './modules/Administration/index.tpl' => 'd1f99979c433724a009c13b847a96b5e', './modules/Administration/index.html' => '5faed788211b0d671bf982f89b68d339', + './modules/Administration/Diagnostic.html' => '5e21c2633aaeee3b04a35c839b2d3252', './modules/Administration/clear_chart_cache.php' => '5aaf3f5813aae9666dcb6490f12d9859', + './modules/Administration/ConfigureShortcutBar.php' => 'e70024f5a98d04850b3abbe9150c4440', './modules/Administration/callJSRepair.php' => 'e1854b35f5e12e29aa44b7effd53dfff', - './modules/Administration/UpgradeWizard_prepare.php' => '0a5a65e0fcb335799ccec1a0b7ef72b8', - './modules/Administration/UpgradeWizard_commit.php' => '391e96a960d0942100541687e8ded4ab', - './modules/Administration/UpgradeWizard.php' => '09e311f0515cc62200e39b535ad7ccfd', + './modules/Administration/updater_utils.php' => '26a1d341008c99101e2ec370e78b2612', + './modules/Administration/repairDatabase.php' => '94caa48a793c4dcf440217a500947b50', + './modules/Administration/expandDatabase.php' => 'ddd95fe1c25174c9bdf00e8a2a6952e9', + './modules/Administration/controller.php' => 'e9778d3d7b9566c01a15ac417f31f929', './modules/Administration/UpgradeIISAccess.php' => 'f28b5f8203d1e759f9720f90137bbc1c', - './modules/Administration/updater_utils.php' => '626cdbf8ace9069bd1a012963e5ec481', + './modules/Administration/action_view_map.php' => 'd0537c6122f0cdefb16c48a16310057b', './modules/Administration/UpgradeFields.php' => '0d4606783c2ae9e605e8511a0e118191', - './modules/Administration/UpgradeAccess.php' => '2d8230957ce0ac95d4764956202bd2cf', - './modules/Administration/index.php' => '6ab549226783a8a6ad5628ab0a4c7550', - './modules/Administration/expandDatabase.php' => '88e6e137e945db23dcc3c3b3a1b79d38', - './modules/Administration/UpgradeWizardCommon.php' => '65de6441fc6d0f94ce1f5db904512626', + './modules/Administration/UpgradeWizard_prepare.php' => '54921e71e8d2897747754d703f3142ed', + './modules/Administration/UpgradeWizard_commit.php' => '6aa94f475593121d15a4bc07f94d0740', + './modules/Administration/UpgradeWizardCommon.php' => '37c393bc3854f8dcf64f7ac39dff8154', './modules/Administration/SupportPortal.tpl' => 'c2608013eda58535ad7ceaff45fbb2db', - './modules/Administration/Diagnostic.tpl' => 'cf1ec6c5b37859ba006458fe925bf1f1', - './modules/Administration/repairDatabase.php' => '0ee1055a74ed8e6936ae7fe5df0ecbe9', + './modules/Administration/UpgradeWizard.php' => '895ca5229bf6dbbf493b7d9ba3d047be', + './modules/Administration/UpgradeHistory.php' => '0b09d25575f35a6c10f3f42c12b03eb8', './modules/Administration/Save.php' => '8820d9ec573f90bb107616f0e5a344b1', - './modules/Administration/RepairXSS.php' => '344293c69d1cfd206a81dc16f65ba903', - './modules/Administration/controller.php' => 'efbecd1f823622ba6c3ccb251274d277', + './modules/Administration/index.php' => 'fadc2f8bf422337e6de7b42539c4eb66', + './modules/Administration/UpgradeAccess.php' => '35ff86e9632b9fde0054cc5d384a35a7', './modules/Administration/RepairSeedUsers.php' => 'aa568a6f3019b773ab86496d610ecbb6', './modules/Administration/RepairJSFile.php' => '9f7634a710ea20fbcd87752ab13effb0', './modules/Administration/RepairIndex.php' => '3992ab770c32db420d7fd560f2ae95d1', './modules/Administration/RepairIE.php' => 'e902626f208e5a41a87cfd53c0d1fddd', - './modules/Administration/action_view_map.php' => '02226b63be1e133468f6047838997115', - './modules/Administration/UpgradeHistory.php' => '82dd740b6973fde52bafdb5e0e5f4691', - './modules/Administration/RebuildSchedulers.php' => 'd6830c651d51d966aa8aaf72053e49c8', - './modules/Administration/RebuildRelationship.php' => 'aefd2a3512ddc04ae46ad377c01d1c19', + './modules/Administration/Upgrade.php' => '693526ef748a8e3034b5a6a36ece5ceb', + './modules/Administration/Updater.php' => '0173d6ed050872bade9859062b2181c3', + './modules/Administration/Updater.html' => '1f08c5d9a8b27f61457d26cec0305324', + './modules/Administration/SupportPortal.php' => '37cf5381924b289531dc870a1648eb11', './modules/Administration/RebuildJSLang.php' => '296049405f80d81f416cba73bc3c0969', './modules/Administration/RebuildFulltextIndices.php' => '0a3187381e10da07834e3acb6a3577a3', './modules/Administration/RebuildExpressionPlugins.php' => 'dbc337c8c58047aa0f64e79877bdf7f7', @@ -2878,71 +2820,70 @@ $md5_string = array ( './modules/Administration/RebuildConfig.php' => 'f0cfcb9081364d92d1f5b64ad00528ef', './modules/Administration/RebuildConfig.html' => 'e168d267267af1313aef423e5132ecab', './modules/Administration/RebuildAudit.php' => '742edda237b3ea73675cf4a4b5414ad9', - './modules/Administration/QuickRepairAndRebuild.php' => '8edec44758e4622cac3ca403855a09ad', './modules/Administration/PasswordManager.tpl' => 'a83bea75b5efad137994959162140dad', - './modules/Administration/Upgrade.php' => '30550d2d80a3bc25431344f1ea1b0c22', - './modules/Administration/Updater.php' => 'ac82b60037d73b1027948bcfdda1cba6', - './modules/Administration/SupportPortal.php' => 'aa08f5ea1a3aa708030163074cdf0089', + './modules/Administration/RepairXSS.php' => 'cf49496a7a18c97241ee918b1b03c30f', + './modules/Administration/RepairFieldCasing.php' => '8dd5686510e996f38faad739f6b7c3ae', + './modules/Administration/RepairActivities.php' => '63547a6cfc478c40ca49db3a571dd35c', + './modules/Administration/RebuildSchedulers.php' => '5dbb2559d3794a1d4321615ace51ccb4', './modules/Administration/Menu.php' => 'b3d795eeb0207fd94afa809483eef0a5', './modules/Administration/Locale.tpl' => '21cd1751ab0e347953cde5789ddfd65e', - './modules/Administration/RepairFieldCasing.php' => 'b19b00ee9fb585d0f0ed76f37474dbc9', - './modules/Administration/RepairActivities.php' => '3451129c5fb2238cd4474ea63ee2854c', - './modules/Administration/PasswordManager.php' => 'ac854237850e85bdbda11202b3134ec4', + './modules/Administration/RebuildRelationship.php' => '1ec5c7c3a761379532be4a287eab5643', + './modules/Administration/QuickRepairAndRebuild.php' => 'bbb1be887ce0e5dd63756c63868a4344', + './modules/Administration/PasswordManager.php' => 'df459a2c385692ef4691819626781fb0', './modules/Administration/ImportCustomFieldStructure.php' => '647f9b22ecd0a9c25ceafcffe44ee52b', './modules/Administration/Forms.php' => '7069bf25e2ea8f0dea84f57888342ffa', - './modules/Administration/ExportCustomFieldStructure.php' => '96ae8db0f2bc6899ab2b64fc8172c932', - './modules/Administration/DstFix.php' => '055ec23e49d4e004e94af374b51ac21a', + './modules/Administration/ExportCustomFieldStructure.php' => 'f638b11ed8a52b73342d6f7bb67fe0b9', + './modules/Administration/Locale.php' => '151adfcd541408cad3ab876474f526a1', './modules/Administration/DisplayWarnings.php' => '34df220bbe489ae2383d0712dd447adc', - './modules/Administration/DiagnosticRun.php' => 'fc7d37418eef959a335a53e2cb819e02', - './modules/Administration/DiagnosticDownload.php' => 'c83c765b948c58dd7c49b7bf0659bf41', + './modules/Administration/DiagnosticRun.php' => '32d46dd1e4bff57ca741639931d65575', + './modules/Administration/DiagnosticDownload.php' => '40afadd8a993034065f8ecb40d975c32', './modules/Administration/DiagnosticDelete.php' => 'dc08fd1ccf4dbf7eeed96b7c283d27a8', - './modules/Administration/Updater.html' => '04c70c9ff003335c4bea8de0382c973b', - './modules/Administration/Locale.php' => 'a42121cabed35bddcda16b1d07f73666', - './modules/Administration/Development.php' => '4c00066a4bfc60b2f2b8b5299957eb66', - './modules/Administration/CustomizeFields.php' => '35b0082f266f25617ed2099b9f15b228', - './modules/Administration/Diagnostic.php' => '2b63dd6c2b61b54e17becea02670981e', - './modules/Administration/Common.php' => 'a6d5797b16d8e8cccf53fc6aa84e6919', + './modules/Administration/Backups.php' => '8de2820f2f82a57b696de2c12f4d6472', + './modules/Administration/Diagnostic.php' => '8a3f65c383eef6d780e12fbedb38751e', + './modules/Administration/Development.php' => 'ee3878df785b2cb3ddabea7024f97472', + './modules/Administration/CustomizeFields.php' => 'cb1c9cc5ebba0d9d715f9052877d5f3a', + './modules/Administration/DstFix.php' => '889d4b65da67167dca4652225bbeebb9', + './modules/Administration/Common.php' => '29d9d64113024453fba87e461e18f361', './modules/Administration/Async.php' => '584be9abcffc33646555e2a3d8c7e031', - './modules/Administration/Administration.php' => '69f113587c5acb66659f8ac19de46d1e', + './modules/Administration/Administration.php' => '12bfaa9440e1753d0912f8c579ea3ff6', './modules/Activities/views/view.modulelistmenu.php' => '9efa778eae448089cb84a562f506d768', './modules/Activities/views/view.list.php' => '02c5c45c2b372377b8cb6bf5b5c24899', './modules/Activities/metadata/subpaneldefs.php' => '14e67382d41c1872b88fb385db9b358e', - './modules/Activities/language/en_us.lang.php' => '2cf2bd9f916453b28661237c5322e6b4', + './modules/Activities/language/en_us.lang.php' => '40e31c9298dfe8c861525732311269d0', './modules/Activities/config.php' => '3b2627039e24f44515ccdfc74ebfcc44', './modules/Activities/SubPanelViewContacts.html' => '9f2971c6ce64f5c5cc7167b594220ce7', './modules/Activities/SubPanelView.php' => '3eb692371455ab4315ee730ff074128d', './modules/Activities/SubPanelView.html' => '441a3dac1aff1ba0c2307fbb6142310b', './modules/Activities/SetAcceptStatus.php' => '56c167c5c05adb3850806573a6475e05', - './modules/Activities/Popup_picker.php' => '49b1309a0a5253f2c129b03e81c29447', - './modules/Activities/Popup_picker.html' => 'a47cea076ad0cf062049f81bf6c0671f', - './modules/Activities/OpenListView.php' => '7f437aabb36cb3095afc755dd2d6151f', + './modules/Activities/Popup_picker.php' => '4e2c166dcd61aea6fc5b97bd3aa1c9e6', + './modules/Activities/Popup_picker.html' => '930e4c6c3115a8e8116e008c3bae95f3', + './modules/Activities/OpenListView.php' => '93870121bf443abb4af3092af7e3a582', './modules/Activities/OpenListView.html' => '602ec3f7ea1feb0015d8db34cee32175', './modules/Activities/Menu.php' => '7c068e6241e35dfccf6adf5a3ed66a7a', './modules/Activities/Forms.php' => '8cb762e9eb0ed07d33a25fcfce415d0e', './modules/Accounts/Account.js' => 'aaadd93f63957d23c664defeeb4974a4', - './modules/Accounts/views/view.list.php' => '640d1efee8cbd6d341551888e616302a', - './modules/Accounts/views/view.detail.php' => '1db788034f47c0f7acf536cbda3d1e5c', - './modules/Accounts/vardefs.php' => '2ccb7872aa489baa97cc45b4b009cd02', + './modules/Accounts/views/view.detail.php' => 'f8d2968fb8029468dc6eb6f63c09f856', + './modules/Accounts/vardefs.php' => '7122c918377b229a4f52e2e1e0b04b70', './modules/Accounts/tpls/QuickCreate.tpl' => 'af5def51e0cf961b8bdb37e81d292b94', './modules/Accounts/metadata/subpanels/default.php' => '5d06b046d9953c23a18b2b65cdb2b06b', './modules/Accounts/metadata/subpanels/ForProspectLists.php' => '2c2510cc71ae4fef661e52e9ba71a005', './modules/Accounts/metadata/subpanels/ForEmails.php' => 'd01a68523d5f403deb8f365f81e59d67', - './modules/Accounts/metadata/subpaneldefs.php' => '68279085f4821bf2cac4be2f34c7106c', + './modules/Accounts/metadata/subpaneldefs.php' => 'ac24728106c58b398de330bbb8fa391b', './modules/Accounts/metadata/studio.php' => '60b423a0edb569abd941710ca3383438', './modules/Accounts/metadata/searchdefs.php' => '98e718406aa9654f709f87dfcb643f05', './modules/Accounts/metadata/quickcreatedefs.php' => '8126f101291cd19f2546c5fc2bd724fd', - './modules/Accounts/metadata/popupdefs.php' => 'a14dbb8989162637577dc18fb75e2501', + './modules/Accounts/metadata/popupdefs.php' => '67aae25e1926947cb505728a9cb1eee4', './modules/Accounts/metadata/metafiles.php' => '0563265a72e7938964052220f440019d', - './modules/Accounts/metadata/listviewdefs.php' => 'e98b01acea18e487334a94e7117fd38a', + './modules/Accounts/metadata/listviewdefs.php' => '01dea323cb8a5affc713952d75b65f11', './modules/Accounts/metadata/fieldGroups.php' => 'e773d1cb9319008bb56c2522ab5021c4', - './modules/Accounts/metadata/editviewdefs.php' => 'b6368fe684631549be229924278ecea7', - './modules/Accounts/metadata/detailviewdefs.php' => 'e8cb94fd84edcf11f1c6115abc057a52', - './modules/Accounts/metadata/additionalDetails.php' => '47166be7d697144cca990a877b05375e', + './modules/Accounts/metadata/editviewdefs.php' => '5d6e935a362a5b19bef57bafe5639bde', + './modules/Accounts/metadata/detailviewdefs.php' => '4e12199c51514fa23e3bd5ea1e3d2239', + './modules/Accounts/metadata/additionalDetails.php' => '8830a83decc2593180df701cb9e384ae', './modules/Accounts/metadata/acldefs.php' => '8b931397415eb8cdc913a163c207cf9e', - './modules/Accounts/metadata/SearchFields.php' => 'c5bbe8c8bbf3abfd68e180ab1707d743', - './modules/Accounts/language/en_us.lang.php' => '38e5b559daa2bc85753db511b6549eb9', + './modules/Accounts/metadata/SearchFields.php' => '9a014c8a6ec50fdec16903ff086076cc', + './modules/Accounts/language/en_us.lang.php' => '1c0478a585b086be73d7eac9a55fb2ea', './modules/Accounts/field_arrays.php' => '106c36b4c76a9be3cc79fcc93c740536', - './modules/Accounts/ShowDuplicates.php' => '20f5314b5d295100748fe56e330f03e8', + './modules/Accounts/ShowDuplicates.php' => '964780a9b56538455effb744f1e04061', './modules/Accounts/ShowDuplicates.html' => 'e7e020a2998798b0035d4274d91ee6ff', './modules/Accounts/Save.php' => '97cd93a301ffd3f067420b583f5c9606', './modules/Accounts/Popup_picker.html' => '1bde804fee020802014194059f937976', @@ -2951,63 +2892,58 @@ $md5_string = array ( './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.meta.php' => '03f72a153c4075edddc3ba3ce7be9fba', './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php' => 'c82b508ee4f8f2368a755262dfec3964', './modules/Accounts/AccountsQuickCreate.php' => '753f5606d9517aa9d1905dfa9b3f38ea', - './modules/Accounts/AccountFormBase.php' => '61c19c1c1e91292db336a74fa92da84b', - './modules/Accounts/Account.php' => 'b763b482d669dd38167c682e57c8b2c6', + './modules/Accounts/AccountFormBase.php' => '3997d8e33d5cdc46935133b57f4f0806', + './modules/Accounts/Account.php' => '3637ec1fa17cb576f7c1041d13d16d39', './modules/ACLRoles/ACLRoles.js' => '0bd3ee68360d56e1d30c308a3e41aee6', './modules/ACLRoles/views/view.list.php' => '3322a80f428bd1e850cdf0a7cff465bf', './modules/ACLRoles/vardefs.php' => '74b07d76833db7fe1de3135940326f14', './modules/ACLRoles/popup.tpl' => '3dfda18f986393f5b48e007573b24c72', './modules/ACLRoles/metadata/subpanels/default.php' => '1f1796d75be2ba7c12707168f8e8b0f5', './modules/ACLRoles/metadata/subpanels/admin.php' => '3542104728fc157a481e742e7c4f1ea5', - './modules/ACLRoles/metadata/subpaneldefs.php' => 'b331d588a8e29a1eee6fd3cf88964c6e', + './modules/ACLRoles/metadata/subpaneldefs.php' => '7af1b31371ce8441d889f7937d460dd1', './modules/ACLRoles/metadata/searchdefs.php' => '34d0cde4c0da69f86c71203d4a122bb0', './modules/ACLRoles/metadata/popupdefs.php' => 'fcbc192e90e3c3c1413c9bc2e70bf387', './modules/ACLRoles/metadata/listviewdefs.php' => '502ff91ae4c2307645d1a0400a30b606', './modules/ACLRoles/metadata/SearchFields.php' => '611839f897c04352be3c04a520255ea8', - './modules/ACLRoles/language/en_us.lang.php' => '8b9830b485b9b81c80c6965ff013c1af', + './modules/ACLRoles/language/en_us.lang.php' => '5f008915bcd7a6a94710aa3a391e7624', './modules/ACLRoles/Save.php' => '96a53590c707b0d49acb6868523f1c35', './modules/ACLRoles/Popup_picker.php' => '0746d71f28fc3079e04882890af40375', './modules/ACLRoles/Popup_picker.html' => '770647d71db7a99f56a9a49d220d6e70', './modules/ACLRoles/Menu.php' => '81d7c462edd2f34ef74afdb1e7d0c80e', - './modules/ACLRoles/ListUsers.php' => 'b1aa49e880af4f2eba3fcbe768f0ada0', + './modules/ACLRoles/ListUsers.php' => '235ed2b5a2467b34cb44ec8948d12cd8', './modules/ACLRoles/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/ACLRoles/EditViewBody.tpl' => 'b14fe85dd531ebcae5ffe2544e3dce8a', './modules/ACLRoles/EditView.tpl' => 'd4e46bbab0273ccbd0cbdcc2dbed3f9d', './modules/ACLRoles/EditView.php' => '913812dcb3b030f4210ac9d74d69720a', - './modules/ACLRoles/EditRole.tpl' => '2351443b01ebeffcd46a4d36fbc38a72', - './modules/ACLRoles/EditRole.php' => '4adb16d298a49f87702c9479f833754e', - './modules/ACLRoles/EditAllBody.tpl' => 'ae4adc42ac97354c095c29b10d85b51f', + './modules/ACLRoles/EditRole.tpl' => 'daa54f9f04e30c56e8715c66a8c6b199', + './modules/ACLRoles/EditRole.php' => '414d46930cc033e3a5ad5ba73ba76b77', + './modules/ACLRoles/EditAllBody.tpl' => 'e55f463b7612da08f3b67c082e080f29', './modules/ACLRoles/DetailViewUser.tpl' => '657b774282f68fc37dc8c8d8b9b77751', './modules/ACLRoles/DetailViewBody.tpl' => 'bd46bb5d18ae394f19ff7e9aec909beb', './modules/ACLRoles/DetailView.tpl' => '91dce288c76628529a523c80425c6bf0', './modules/ACLRoles/DetailView.php' => 'ef51f8b1296deebfe6271ba2ccd34132', - './modules/ACLRoles/DetailUserRole.php' => '00f1101abf19e5e012b5c9c06dc75cd0', + './modules/ACLRoles/DetailUserRole.php' => 'd655960a3f40a3dd753f43e9472d0bd8', './modules/ACLRoles/Delete.php' => '52df20fce849f424f27eaf23dad7d166', - './modules/ACLRoles/ACLRole.php' => '80ba5c9f82fbf1161e0da056c5a6737e', + './modules/ACLRoles/ACLRole.php' => 'f993a0c06e69405bb6c5ec8a309e1dac', './modules/ACLActions/vardefs.php' => '56901797986eb3077d243e42f7c07b27', './modules/ACLActions/metadata/subpaneldefs.php' => '44fde78af7fc63c493207f50a84cfb0c', './modules/ACLActions/language/en_us.lang.php' => 'e02750afad49f3660d697497767c8460', './modules/ACLActions/actiondefs.php' => '260cf35c9f8f54a3bd901205c957ae15', './modules/ACLActions/Menu.php' => '4e419af53d8e00ec63e6b54d25d4607f', './modules/ACLActions/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', - './modules/ACLActions/ACLAction.php' => 'f673ef7bced8513bf68431771800fb2e', + './modules/ACLActions/ACLAction.php' => 'f105d6a4833468e3078dd7be1ed6a432', './modules/ACL/vardefs.php' => 'a0bb6947c5dd41edd02000f4fa3583e4', './modules/ACL/remove_actions.php' => '1d521e3e7b37b81fb05a24c7f7eb0709', './modules/ACL/metadata/subpaneldefs.php' => '44fde78af7fc63c493207f50a84cfb0c', './modules/ACL/language/en_us.lang.php' => '370abfe5b94cd3997332aebb6f73bec5', - './modules/ACL/install_actions.php' => 'a02b58a42ce84ab7318a720426edae39', + './modules/ACL/install_actions.php' => '0794de0d27c9a9f7137dd2a0774a8869', './modules/ACL/Save.php' => '17f5017f24502538bbbf399128e74111', './modules/ACL/Menu.php' => '4e419af53d8e00ec63e6b54d25d4607f', './modules/ACL/List.php' => '863a968e6e27b80fc2501120c1683994', './modules/ACL/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/ACL/ACLJSController.php' => 'a8cefd0b088bae46168acbf514b6ce74', - './modules/ACL/ACLController.php' => 'a7ee7846c43fd81c606b246592c3a590', + './modules/ACL/ACLController.php' => 'cc71288c210335d45fcc76821a07ddac', './metagen.php' => '80dfab586cf8640852d36683d4007cad', - './metadata/documents_opportunitiesMetaData.php' => 'b776892c7a27b7e666b6bb4e23e94774', - './metadata/documents_contactsMetaData.php' => '6941f4fe0715d55f9aa7cea3af00b561', - './metadata/documents_casesMetaData.php' => 'ca42c730a65e33487f1bee05a80cb0a5', - './metadata/documents_bugsMetaData.php' => '60526589bfad1dabea30dd1e0bff7e7d', - './metadata/documents_accountsMetaData.php' => '1a40c95528106d1fba63e1dea97f961e', './metadata/users_signaturesMetaData.php' => '67c651bc9ed014ea15ac9fdd2f6bab61', './metadata/users_passwordLinkMetaData.php' => '142fbf7843981a13065b0d9ecc767302', './metadata/users_last_importMetaData.php' => '9ab931c7b2e6ef9dbd8a3505ec1814dd', @@ -3041,10 +2977,10 @@ $md5_string = array ( './metadata/import_mapsMetaData.php' => 'fbd92f30ed0272e500754a7c57b92eac', './metadata/foldersMetaData.php' => 'a9263e7f6e7001c15c129b9c57b37a0f', './metadata/fields_meta_dataMetaData.php' => 'fbd92f30ed0272e500754a7c57b92eac', - './metadata/emails_beansMetaData.php' => '4e01d0385cb35201c84cf3be307250af', + './metadata/emails_beansMetaData.php' => '70c8c63e7a2a82d17eecc23aa4ac1d30', './metadata/email_marketing_prospect_listsMetaData.php' => 'f7830fe5246d2932ad4c4a717ad2a956', './metadata/email_cacheMetaData.php' => '067d13920f88864eacc1ae54b2b0df3a', - './metadata/email_addressesMetaData.php' => '36d7a888e737eeebb1bd7100dbf8ed98', + './metadata/email_addressesMetaData.php' => '5d6e578255d9c15562de5e6a646cff82', './metadata/custom_fieldsMetaData.php' => '469a0e40bb1cbe229a15326eb664243d', './metadata/contacts_usersMetaData.php' => '45a4a253009fbfa71fcb8ba4d179968c', './metadata/contacts_casesMetaData.php' => '691a92b305bb34e379d16a0119d4dd31', @@ -3066,39 +3002,35 @@ $md5_string = array ( './log_file_restricted.html' => 'db7ac0ce0822e215c1c62e5592e56eac', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './leadCapture.php' => '6acff84b622ac060efef67d110f8f10b', - './jssource/src_files/include/JSON.js' => '513eb0113124c215e17c1495f8a202dd', - './jssource/src_files/include/MySugar/javascript/MySugar.js' => '320180d49455ae9978863f9d211a858f', - './jssource/src_files/include/SubPanel/SubPanelTiles.js' => 'a3f311e30548aa66e34a8a8542bb9eea', - './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '4c95a8c2071e0d5b4ae1531a790f1492', - './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => 'c06bd0d01f1daa8ee7c54b83fe33f03a', - './jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js' => '569389f06a8902b9ca8ee28d1526149b', - './jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js' => 'ea73d4e9be70f83c81fbea0e6864fe5a', - './jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js' => '5274ef040f4f386cd89b552b613644e6', + './jssource/src_files/jscalendar/calendar-setup_3.js' => '4e82c1fa626cdc1a2f749fd9ff9119fc', + './jssource/src_files/jscalendar/calendar.js' => '2906fbef6c6b6d501b93d7547945bcc0', + './jssource/src_files/include/JSON.js' => 'cee34cab2f2723ad0fbb17d319ca11d1', + './jssource/src_files/include/MySugar/javascript/MySugar.js' => '7cb282187fd595c1ac6c5fb92b7a0ac2', + './jssource/src_files/include/SubPanel/SubPanelTiles.js' => '3e2ba957843d0935a1ae6820e69228ec', './jssource/src_files/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => 'c7d0f70a1f6108ad01b66065d07ce3b0', './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => 'd1f2d39aeb58defc6c9e647792459621', './jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => '2230e649a72034d4e7aefe81fb964ccf', './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => 'd453a1b2ee708c96b17fe9e43c676c68', - './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => 'f5868f390ce9f214331f1c0c4feddf9f', - './jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js' => 'ec13311644ef4adddd6933491047492f', + './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '92b715c51465cdb4397d6b0c0785cc21', './jssource/src_files/include/connectors/formatters/default/company_detail.js' => 'bf41167826e3fd4019fb46a69e7d7560', './jssource/src_files/include/javascript/cookie.js' => 'eb329b102eecc7a6278e7c2712a531b5', - './jssource/src_files/include/javascript/dashlets.js' => 'aa8ae5e5853d88389628f36feca2554d', + './jssource/src_files/include/javascript/dashlets.js' => '1f3d27f65d9262a6587fffad39673f4a', './jssource/src_files/include/javascript/include.js' => '4fd5d7da5c00e4c0a9a83b4b65a493f1', './jssource/src_files/include/javascript/jsclass_async.js' => '616ca1070d5e3f3bf6dcb210a59b302c', - './jssource/src_files/include/javascript/jsclass_base.js' => '3f5f1bd86e7b3c501431a71269200cdd', + './jssource/src_files/include/javascript/jsclass_base.js' => '85b1aeb3b9f9980aa2645e73e0c17702', './jssource/src_files/include/javascript/menu.js' => '21f57ea7c6d0ab2166021bb928d98251', './jssource/src_files/include/javascript/overlibmws.js' => '9fb2df046948fb09baf9bf62cf8d7877', './jssource/src_files/include/javascript/overlibmws_iframe.js' => '3714ae1a5be03f1470b30e8920386d14', './jssource/src_files/include/javascript/popup_helper.js' => 'b329eaa528e55e17a70bca7e450ee865', - './jssource/src_files/include/javascript/popup_parent_helper.js' => '2753b1b6d525a4e1245605d544252465', + './jssource/src_files/include/javascript/popup_parent_helper.js' => 'c082ce76e1898495092d4f80df3f57c2', './jssource/src_files/include/javascript/quickCompose.js' => 'c87742cdae04b75afc7e59c9e9440d39', - './jssource/src_files/include/javascript/quicksearch.js' => 'f1660fd0ecb23c3ce215e0f1992442a6', + './jssource/src_files/include/javascript/quicksearch.js' => 'ed496427bcc648a621262401c67416ae', './jssource/src_files/include/javascript/report_additionals.js' => '7d8f86186481775d3f2b9577f62d7e01', - './jssource/src_files/include/javascript/sugar_3.js' => 'c9fb3f4ee58114e99226229c9f24a350', + './jssource/src_files/include/javascript/sugar_3.js' => 'e03a1053d2af3759bd9bf9e46c255989', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => '3f0ed5a6340391e82521b208d6b39e8d', './jssource/src_files/include/javascript/sugarwidgets/SugarYUILoader.js' => '91ce3f8311a938d63f6f4f41a2780855', './jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js' => '18d0fbff67ee96b852f8d3bf2d033978', - './jssource/src_files/include/javascript/swfobject.js' => 'a7dc61c4ada3b828e0e09e51f943c6db', + './jssource/src_files/include/javascript/swfobject.js' => 'd1ebd1442abcb65b835e4fda6ff3fe1c', './jssource/src_files/include/javascript/yui3/assets/dpSyntaxHighlighter.js' => '9f8e259fd1682f21971db93c2465812a', './jssource/src_files/include/javascript/yui3/assets/syntax.js' => '3dcb7c2cccb0b8d6eaa0bf2700a14645', './jssource/src_files/include/javascript/yui3/build/anim/anim-base-min.js' => '5cd35b730551e2f143f8b2aeb3dc43f0', @@ -3353,8 +3285,6 @@ $md5_string = array ( './jssource/src_files/include/javascript/yui3/build/yui/yui-log.js' => '22c5382de3ed58bda76dccc819529f0e', './jssource/src_files/include/javascript/yui3/build/yui/yui-min.js' => '79d543e9fe1ef95df39f721d4a1d23a9', './jssource/src_files/include/javascript/yui3/build/yui/yui.js' => '934ea2f120407922bc5631d51f90120c', - './jssource/src_files/include/javascript/calendar.js' => '9081f811752c095c74ba09a03e3ec6de', - './jssource/src_files/include/javascript/iscroll.js' => 'b6c232e3c54b2a1320b22c7ad920c842', './jssource/src_files/include/jsolait/init.js' => '8523493b1d0ccfc3ed8110a093672ebf', './jssource/src_files/include/jsolait/lib/codecs.js' => 'd3d41752845b924a0f69e1b3d0ad6c3e', './jssource/src_files/include/jsolait/lib/crypto.js' => '2b012a4eccd9ba700d54bb843b4728d5', @@ -3394,10 +3324,10 @@ $md5_string = array ( './jssource/src_files/modules/Connectors/Connector.js' => 'cbd618a5273c129f5e506582a8c035d3', './jssource/src_files/modules/Contacts/Contact.js' => '340c4f111e6bbfc76f2167defbebc169', './jssource/src_files/modules/Currencies/EditView.js' => '1f414bf3517628dfb9dd445739b9074e', - './jssource/src_files/modules/Documents/documents.js' => '869b8d2d02d44e4f7804405426b35aaf', - './jssource/src_files/modules/EmailTemplates/EmailTemplate.js' => 'f9043c6f84a7b077f0fb44b725a5b0f6', + './jssource/src_files/modules/Documents/documents.js' => '3b068dac2a20816b5bfda33f1b1e9a4d', + './jssource/src_files/modules/EmailTemplates/EmailTemplate.js' => '5f31b123e46b4e18c59e890bed779e45', './jssource/src_files/modules/Home/about.js' => '21f5494869cd5700b0c552747ad8c0f7', - './jssource/src_files/modules/InboundEmail/InboundEmail.js' => 'd01fb6beb97fbff465106ede1b300ed1', + './jssource/src_files/modules/InboundEmail/InboundEmail.js' => '77e6dec9fbf0ac40a4bca55b8563fe14', './jssource/src_files/modules/Leads/Lead.js' => 'd06ef9e18d4c85fa7aedf57cdb5fc9e7', './jssource/src_files/modules/Meetings/jsclass_scheduler.js' => '007c932cc101de1394d949008ed79c68', './jssource/src_files/modules/MergeRecords/Merge.js' => '753cc64c1b94ed8f161112d17a3e0b0e', @@ -3413,14 +3343,13 @@ $md5_string = array ( './jssource/src_files/modules/Users/PasswordRequirementBox.js' => '66744f0b7d5350ced33adaae7b85c09a', './jssource/src_files/modules/Users/User.js' => 'eef706110eb0afe0aa0cebc117f59af7', './jssource/src_files/modules/Users/login.js' => '4072981132901aad89bf2c26279b4a4e', - './jssource/src_files/modules/EAPM/EAPMEdit.js' => 'c16277ba5f134d888974539e11bb6a5a', './jssource/src_files/service/utils/SugarRest.js' => '050aa9a51d9de8b4a77b301d36223656', - './jssource/src_files/themes/Sugar5/js/style.js' => '0342dbdcb579b8db6e1ce37adbb8f9f3', + './jssource/src_files/themes/Sugar5/js/style.js' => '8742da9dcfa29744a220534cf4804edd', './jssource/src_files/themes/default/js/style.js' => 'bff5ec579bd904092b693f765ec9f95e', - './jssource/minify_utils.php' => '451d68994be2696da311409a880d57fc', + './jssource/minify_utils.php' => '42622144e11c3110d4de6b7db1c4b195', './jssource/minify.php' => 'b8960cda18806ed133dc05159c7f6bc9', './jssource/jsmin.php' => '1a523af482b74cfb955570e7473c0bf1', - './jssource/JSGroupings.php' => '93b7a444871b2427c7e2991b64e79958', + './jssource/JSGroupings.php' => '1870d1eafda525dffbc8e0410a39d391', './json.php' => '14eaa93f6fd401f83e7f4420186391b4', './install/dbConfig.js' => '50e0834bb5e0cdc64348eabcfe56a9fc', './install/installCommon.js' => '28c286b2ad390526f43df07a56546cee', @@ -3434,44 +3363,36 @@ $md5_string = array ( './install/siteConfig_b.php' => '0460d2110f0fa9cd31f649029564d865', './install/siteConfig_a.php' => '069857546bf6f42053bc3d30ae18264e', './install/seed_data/quotes_SeedData.php' => 'e7299ed86d47891705fd23fe617d96d6', - './install/seed_data/Advanced_Password_SeedData.php' => '6bc0432f3b1afcaf9870036f40c1b696', + './install/seed_data/index.html' => '13669541d94e9d09536337a3af22f8b9', + './install/seed_data/basicSeedData.php' => 'c0c07476568b3490bfa2df9e28086c7e', + './install/seed_data/Advanced_Password_SeedData.php' => 'c479235c4d0137ef719cb35c7e5ff5bf', './install/register.php' => '4b966e2b08bf929bb42c2c39ab22ddf7', './install/ready.php' => 'd839502c0b117ba30e8ff39a866c6fe7', './install/processing.gif' => 'd7c43fc19181ee59862601bfce100b41', './install/licensePrint.php' => '729a22dff5007140b80a0f2b74004e39', './install/license.php' => '1677efd52688a75b1e117ab893c98838', - './install/language/en_us.lang.php' => 'f470d7bb93e7819a4ce7f51b68d69fd5', - './install/performSetup.php' => 'f4da6a9200f7f9256b5d84e924d1f419', + './install/language/en_us.lang.php' => '4ec75dc67e4d1d82f1a29ec6f35a6748', + './install/populateSeedData.php' => 'b3e202e73db92457dc5a49305e65a7e4', './install/install_defaults.php' => 'd1f7954042d157bf247339d6287d3cfb', './install/installType.php' => 'f2e5190e2b1c6f479e27105274ce699e', - './install/installSystemCheck.php' => '536855633fb59c458b580a44e5fa2ce0', + './install/installSystemCheck.php' => 'e0453a784339379d434ef5a86bb34f1d', './install/installHelp.php' => 'b508e56bcf24baa43128cce37f256b65', './install/installDisabled.php' => 'c8ddd0efea951af37d0c70422d23bdfd', './install/install.css' => '3dbd8161ac8e4fb86eec530a1500bd21', './install/download_patches.php' => '1546b155f73b31ab560a5455390ecb67', './install/download_modules.php' => 'f368a12c71aecf9e08494fd3f8c4a218', - './install/install_utils.php' => '7f9779e4e5219b4b4f04e167c260f3f6', - './install/populateSeedData.php' => '6fc3d9148c6c7decab9851329652c63d', - './install/demoData.en_us.php' => '4e0ba9101da24a0074a58744a21d992b', - './install/dbConfig_a.php' => '72c6aa33afa0ed595f88a3d9102fdb25', + './install/performSetup.php' => 'd0e5ec16ad0c4064fe3228a1580b49b8', + './install/install_utils.php' => 'a0435d3491c06e8d254b2e6ac141d0a1', + './install/demoData.en_us.php' => 'd0397bb331d78b9d2afc35ae4b3a26d2', + './install/dbConfig_a.php' => 'd25c82c15a8f99f720d0be9a76636b8c', './install/data/disc_client.php' => 'b7f7853de0b429b9be5fdbc9532ecbe0', - './install/confirmSettings.php' => '7293087c8d9398db4a643bc46b1e39c1', + './install/confirmSettings.php' => '8c85669836523781f92215df375fd63a', './install/checkDBSettings.php' => '769cfd353424087bcada73508e5efea8', - './install/UserDemoData.php' => 'ca3d776503efa97372447c010084f39c', - './install/UploadLangFileCheck.php' => '261dc5321de4bb91d785421bf1256e69', + './install/UserDemoData.php' => 'bf1960cf02f4ec9191110c69a107f7d6', + './install/UploadLangFileCheck.php' => '95f3d18b8f5949bedb3dedf35292d975', './install/TeamDemoData.php' => '8c63181ad6d759ac25e980851b41b50f', './index.php' => 'ec6eb0c76d968e336e1721d1f6e31d42', - './include/JSON.js' => '603ba7c5edab1ce11d7d1ab3fd98e808', - './include/externalAPI/ExternalAPIFactory.php' => '99d142a5f3eeef813c4164fe16ef8f66', - './include/externalAPI/Base/WebMeeting.php' => 'f98a2dd54e431d4063d19c4e17c24d93', - './include/externalAPI/Base/WebFeed.php' => '05211420bd0fe9e85a1415f9a855442b', - './include/externalAPI/Base/WebDocument.php' => '44a5ad44ad8c272f39635eabe98a35c9', - './include/externalAPI/Base/OAuthPluginBase.php' => '0f482afe47428fa58613ba0b98e68b39', - './include/externalAPI/Base/ExternalOAuthAPIPlugin.php' => '3df84091ecb79be92c4fbd8930fee13d', - './include/externalAPI/Base/ExternalAPIPlugin.php' => '1cab79f253d174e349726f786429a52b', - './include/externalAPI/Base/ExternalAPIBase.php' => '5f3bc85035eae7832b79d57ae4d0ad84', - './include/SugarOauth.php' => '1a0d9ab6285929101d4b16ebf667a1b2', - './include/SugarDateTime.php' => '90a27d03de3ccb118a2d43e5200893d9', + './include/JSON.js' => '95acc2238c506f8f4faee18243655fbf', './include/ytree/treeutil.js' => '3ed885ac4154b25eb80fb2c272e63bca', './include/ytree/TreeView/HTMLNode.js' => '84858f719e9b3740d1c58991b0f50d44', './include/ytree/TreeView/MenuNode.js' => '8d001c1014dc6755f150cd83c1dfe07b', @@ -3541,33 +3462,41 @@ $md5_string = array ( './include/ytree/Tree.php' => 'dba7bc832c460882de6606b42fec5110', './include/ytree/Node.php' => '3fbb0e6b0a874dcec7e00120f6a67238', './include/ytree/ExtNode.php' => 'e79a18d84454f59a3d6041e3bc923e36', - './include/vCard.php' => 'f6b2d22c63948aaedc60e32b21cb33ef', - './include/utils/php_zip_utils.php' => 'e73ff6906b73e6e7f342ade77c532902', - './include/utils/sugar_file_utils.php' => '172fe11f930d93669caca3a1b933c8c5', + './include/vCard.php' => '331afdc156a9093c336b267aa53e06f9', + './include/utils/external_cache/SugarCache_sMash.php' => 'fa3358a29e9ef540cdba098a7c6ff820', + './include/utils/external_cache/SugarCache_ZendServer.php' => '5d253ce542e1089fb72185f4c719dd77', + './include/utils/external_cache/SugarCache_Zend.php' => 'e0f1fb94e2ae90a77f9b313481133afa', + './include/utils/external_cache/SugarCache_Wincache.php' => '6637bf7f2dac018e99c8ea0e05d84c08', + './include/utils/external_cache/SugarCache_Memcache.php' => '22f369e8ab6a93a104b0744fe7f196eb', + './include/utils/external_cache/SugarCache_ExternalAbstract.php' => 'f72717e2a8cbdcc62d67c56d61f2a360', + './include/utils/external_cache/SugarCache_Base.php' => '60ab9990bdb08423ea5161a3785f5cad', + './include/utils/external_cache/SugarCache_APC.php' => 'e39ee8bdf30fe177963bb2526443bb99', + './include/utils/external_cache/SugarCache.php' => 'edc4d9c83fe690dbc685c8fee98356f8', + './include/utils/sugar_file_utils.php' => 'ce332779dc506fee0d2e7a1f5e638a79', './include/utils/security_utils.php' => '1fd66ac45eb2d7a812efeff2cab267fc', './include/utils/progress_bar_utils.php' => '72633b667109464bafa8fc027c9938d4', - './include/utils/zip_utils.php' => '31f3c36e8262b2c459aac59324a5e122', + './include/utils/zip_utils.php' => '68ea31cbab69f33f9d30f386a9cc7982', './include/utils/logic_utils.php' => 'a59013e866e3bed66ea19d404dad3a5d', - './include/utils/layout_utils.php' => 'fbfbcf40a528c3f3d668aa3e534f9ce2', - './include/utils/file_utils.php' => '32a767ca3b41d57f6bd03bb8b6c896d0', - './include/utils/external_cache.php' => '466fe3b797c84f8dae0747999ab6b8dc', - './include/utils/mvc_utils.php' => 'cc4dbe47244ec12a530eed1c2df15605', + './include/utils/mvc_utils.php' => '90bca8943576ccf949759e1dfd909c82', + './include/utils/file_utils.php' => 'da6303d8964d5da5ebd8c2c7374fdec0', + './include/utils/layout_utils.php' => '8942e9784ca325da2aad70cb956f16c7', + './include/utils/external_cache.php' => '2d018926a89efdc108192dfcf7be0981', './include/utils/encryption_utils.php' => '18ee99143ae59f50d72b3c022fea5a39', - './include/utils/db_utils.php' => '4b5f58235f45f5ba81951abb6443dcd1', + './include/utils/db_utils.php' => '5370cd7afead7f461d6ffa9609f42caf', './include/utils/autoloader.php' => 'c17b72066f14f04cf397612ca6406d35', - './include/utils/array_utils.php' => 'f0e351c9612a903fefdac36e9894097c', + './include/utils/array_utils.php' => 'e19705c0c995be8545441c1fcdf01e84', './include/utils/activity_utils.php' => 'fc0b073a8b715799ec088c1452378686', - './include/utils/LogicHook.php' => '6dbc41ebec77d4359d1df5f411ccd2ff', - './include/utils.php' => 'a545314158d73488c9317566402e269c', - './include/upload_file.php' => 'fef35543cc9ff150f8ad13eb38ac0fb3', + './include/utils/LogicHook.php' => 'e4e3a8576e115f0282ed513068349c26', + './include/utils.php' => '9be09dc80cac69dc9146ff03a07eb39a', + './include/upload_file.php' => 'c50b407f1908ad5e986ca428ec4548f0', './include/timezone/timezones.php' => 'c1b535767fd4bb7fdb04d03a91ceed6c', './include/templates/TemplateGroupChooser.php' => '1971bdb38d86951c192a3f97e38a2ead', - './include/templates/TemplateDragDropChooser.php' => 'dd202c795367f01e884d5e2e95e48ec3', + './include/templates/TemplateDragDropChooser.php' => '86a0a78651c316bfc7bb099c58eee0e5', './include/templates/Template.php' => 'aa5a008f2461eef7ae668afb0e95a6fa', './include/tcpdf/unicode_data.php' => 'd20008bba6110e94611ac0939a92913b', './include/tcpdf/tcpdf.php' => '2d63d36838205a8d52725d0c888bbab5', './include/tcpdf/htmlcolors.php' => '0015bab537767d694b0304d91a87c5f1', - './include/tcpdf/fonts/utils/makefont.php' => '07068b0cd9415eaa2c4165f0bc980e7d', + './include/tcpdf/fonts/utils/makefont.php' => 'fa70c086e6c1f4aecc285c64fe619006', './include/tcpdf/fonts/utils/enc/koi8-u.map' => '9046b7222af56cb6bbc349cac9dbabdf', './include/tcpdf/fonts/utils/enc/koi8-r.map' => '04f520a75d940d47dec77f1cc0539fbb', './include/tcpdf/fonts/utils/enc/iso-8859-9.map' => '8647a52d390b37e26ed05e5ed6793b76', @@ -3602,7 +3531,7 @@ $md5_string = array ( './include/tcpdf/CHANGELOG.TXT' => 'b41664d05748e067b3d52ba1eba1e9c3', './include/tcpdf/2dbarcodes.php' => 'ffd7b4d2b008aeffecb7967041777c44', './include/tabs.php' => '040d7f98904ecbf8228d2cc907ca9be2', - './include/tabConfig.php' => '7cc5eece0701fae3dfeade19d4469039', + './include/tabConfig.php' => '80e70dba7bc1294b96bb659acb2bf5de', './include/resource/ResourceManager.php' => '362f6d3f49acde341c5c2cec87dc4bfd', './include/resource/Observers/WebResourceObserver.php' => 'ce9c1f7d7429a4bcab42ea6a5136aee4', './include/resource/Observers/SoapResourceObserver.php' => 'a89ef8aa12efcee5ff1e8eb6eef61432', @@ -3636,15 +3565,18 @@ $md5_string = array ( './include/phpmailer/class.smtp.php' => '64255208cd6f263a69d58918dcb7138d', './include/phpmailer/class.phpmailer.php' => 'a78d163362a44ff475e9141c3c75ed99', './include/phpmailer/README' => '9522b5930919ec251b6f4edda0584480', + './include/pdf/class.pdf.php' => '7151249d6840d010305d9c8b647bfa12', + './include/pdf/class.ezpdf.php' => '2dba18475903c083c6768ec1f7c955e8', + './include/pdf/LICENSE' => '3198c07f7a9e8e38c144b667e383b58b', './include/pclzip/readme.txt' => '2265cad9ccb84cfcd4093ce26b22dc97', './include/pclzip/pclzip.lib.php' => 'f42cfbdfccc2dcd85df39638ae2d141c', './include/pclzip/gnu-lgpl.txt' => '7fbc338309ac38fefcd64b04bb903e34', - './include/nusoap/nusoapmime.php' => '03ad5f19e5f8ca40b6ecc8bb5ff7d06d', - './include/nusoap/nusoap.php' => '08f16a90957ec98acd49a1a5a43458dc', + './include/nusoap/nusoapmime.php' => 'aca4029ae9211476ce8f56b9b4874494', + './include/nusoap/nusoap.php' => '175167b676d5ecc1d6f3844ac7e3325b', './include/nusoap/license.txt' => '25823f4a2e463ab2c6b5873f07e428e1', './include/nusoap/class.xmlschema.php' => '619375dc901a69c6ed625cc2e38beae9', './include/nusoap/class.wsdlcache.php' => 'f8f80fa3fa56b0d0c3169cff60bfc3c2', - './include/nusoap/class.wsdl.php' => 'cd7f1a43ca08891ac1ce04d4d1282c49', + './include/nusoap/class.wsdl.php' => 'baecc6c91e2ef64b429a6431a8aa5ae5', './include/nusoap/class.soapclient.php' => 'b013aebcb51815543091c4914cb16157', './include/nusoap/class.soap_val.php' => '084a898ecf261c201427fd41d4ee40e0', './include/nusoap/class.soap_transport_http.php' => 'fc8d8de37eeea8b79c9963bd8ef1357b', @@ -3653,11 +3585,11 @@ $md5_string = array ( './include/nusoap/class.soap_fault.php' => 'bf058747b0ecefe183194300dbd73dff', './include/nusoap/class.nusoap_base.php' => 'cf8310e722c8fc7e310dc5ba413b1ea6', './include/nusoap/changelog' => 'd75ed67ec93c02e5bce94eee8205b425', - './include/modules.php' => '78c531f6122d2ba38aa8c211d9ceb2db', + './include/modules.php' => '48180c85e7ce3a14418691fa6d62f39d', './include/language/jsLanguage.php' => 'c44b0ccdccdfbd7eb0e1eb36f6628c56', - './include/language/en_us.notify_template.html' => 'dc07fa34ed74873ba996cc637f8889a8', - './include/language/en_us.lang.php' => '3ffcc22b71675543a578164f674f2290', - './include/json_config.php' => '8c301d204675cf3efe0e2d72d40abe43', + './include/language/en_us.notify_template.html' => 'b05b6f7a4e2b199a1b8829dd2cb24272', + './include/language/en_us.lang.php' => '255672830fcf0dbc3963e67a224b9cc6', + './include/json_config.php' => '53171aa245ef863a833567545207bef0', './include/jsolait/init.js' => '15b8d113066ad400aa80d9dfc35b544b', './include/jsolait/missingmixin.js' => 'e87a7ee61bd9e134791325d98ca72d9b', './include/jsolait/lib/codecs.js' => 'c3e9eb73b3187f1b69e33bde1a635712', @@ -3671,32 +3603,30 @@ $md5_string = array ( './include/jsolait/lib/xmlrpc.js' => '561bc3aca65261c577ab56b9908d6b78', './include/jsolait/copying.txt' => '7fbc338309ac38fefcd64b04bb903e34', './include/jsolait/LICENSE' => '7fbc338309ac38fefcd64b04bb903e34', - './include/javascript/sugar_grp_quickcomp.js' => '3b337ebfdd4305d5d33c23b120effb5c', - './include/javascript/sugar_grp_emails.js' => '4c4ab7968fe0d9a61e35f8625b4d8365', + './include/javascript/sugar_grp_quickcomp.js' => '39a5b2e7dfa6eb9187caff130f5d0331', + './include/javascript/sugar_grp_emails.js' => '69fbe8d41a23c3c08e7e1f27c730bd11', './include/javascript/sugar_grp_overlib.js' => '697dc29858751a3a9848ded2d5cc9638', './include/javascript/sugar_grp_yui2.js' => '810b0d52b0d73ca309673fa8c88f7275', - './include/javascript/sugar_grp_yui_widgets.css' => '9fead3f803643c74f997b323e0a7b4e7', - './include/javascript/sugar_grp_yui_widgets.js' => '284e935d82048407ad58bb58b17e9f51', - './include/javascript/sugar_grp1_yui.js' => '49bb537e8497adc31c6eef821140542e', - './include/javascript/sugar_grp1.js' => 'a13d69863100d17adb938b1287dbf2cb', + './include/javascript/sugar_grp_yui_widgets.css' => 'f3b4057fe9151a52174c1f6b252495fd', + './include/javascript/sugar_grp_yui_widgets.js' => '35ddcaaacf3a5bd2536d64cad5b8e9d2', + './include/javascript/sugar_grp1_yui.js' => '8c4c32d01308873b67a9fdabad62ff23', + './include/javascript/sugar_grp1.js' => '5385f9f51b7044e7d5d79ea7219d9bbf', './include/javascript/cookie.js' => 'de61d7b1eb4ba59186984d89f628eae2', - './include/javascript/dashlets.js' => '8ce96c35d117268f854ee736ce3f8726', + './include/javascript/dashlets.js' => 'c58cce8a83dbb9623b5260c45a8b154f', './include/javascript/include.js' => '111549b33d8ca4011ca99a23105050fe', './include/javascript/jsclass_async.js' => '4c176f9adec386d72d222e4b52da0229', - './include/javascript/jsclass_base.js' => '757af42039add740fb838fac2d8baa4a', + './include/javascript/jsclass_base.js' => '6f7c03a1933cbd57542f87bdeafed70b', './include/javascript/menu.js' => '3abcb7c05eff710b8fa52d18d7a14834', './include/javascript/overlibmws.js' => 'f4bac256b9f8dc64ba4b22a8e1259ea2', './include/javascript/overlibmws_iframe.js' => 'e3c045ac5f7b73aeb761395339d82f30', './include/javascript/popup_helper.js' => 'b71cea0d43e03dd24bbef622e1b94e73', - './include/javascript/popup_parent_helper.js' => 'a6c24762a5082cd5c3714f5d6c817db5', + './include/javascript/popup_parent_helper.js' => 'e2c77fab931c6a45ed0bbc31bf022f4f', './include/javascript/quickCompose.js' => '8702e1904189f22c31f88b05e22398e7', - './include/javascript/quicksearch.js' => '31ff4f0a3ab8b060848420e09d9b7973', + './include/javascript/quicksearch.js' => 'fe8c4431483099b608ebe483d6e61ca3', './include/javascript/report_additionals.js' => 'bfb26a986bc020109f20b703fa6a6a9d', - './include/javascript/sugar_3.js' => '85fa75ab053d349298e1bd07e2498127', + './include/javascript/sugar_3.js' => 'ceb8d9708115b1e0436fcabd0e392339', './include/javascript/sugar_connection_event_listener.js' => '119ff2a497fd3c53d9f9a9b3d2226357', - './include/javascript/swfobject.js' => 'be72d27dc0b8bf006dcb764e41153465', - './include/javascript/calendar.js' => 'd6c576e0d7ddcb1dd04cf788e8215846', - './include/javascript/iscroll.js' => '0b9c55c0f6a677ef7ca628f156527456', + './include/javascript/swfobject.js' => '52ce7b9e2bf41b265102db45f6cc765a', './include/javascript/yui3/index.html' => '9ff89ada5571d6d03eccc45dad57bb16', './include/javascript/yui3/build/yui/get-min.js' => '1ef08bacb464ead1fbdb74d45addca6f', './include/javascript/yui3/build/yui/get.js' => '1b0ea131a29adf2a1957ad11be4547ff', @@ -4300,12 +4230,12 @@ $md5_string = array ( './include/javascript/yui/build/calendar/calendar.js' => '3fa723bf49850ee19651ccac34d0ac2e', './include/javascript/yui/build/calendar/calendar-min.js' => '852c2c3bc8c283b712d99c6c24e510ed', './include/javascript/yui/build/calendar/assets/skins/sam/calendar.css' => 'ad3ccb220f106da477a25f9a637f5053', - './include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css' => '215ba5a2c5a1dbd219db05a58f13b60c', + './include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css' => '707570ed8180305ab479b30d2ed15bb7', './include/javascript/yui/build/calendar/assets/calx.gif' => 'acc1427b926515c1ec846e04e3b635cd', './include/javascript/yui/build/calendar/assets/calrt.gif' => 'ba0b2098813b15aa3cc655e881c92d0a', './include/javascript/yui/build/calendar/assets/callt.gif' => '0718c393fbd4095b219803cb6b7bcbf8', './include/javascript/yui/build/calendar/assets/calgrad.png' => 'd028abaadeebb310606448cfc7ba2bfe', - './include/javascript/yui/build/calendar/assets/calendar.css' => 'cdee21e708db89a3f21611de213b4d9f', + './include/javascript/yui/build/calendar/assets/calendar.css' => '4f1dcf1f74209d36ea241704b4776735', './include/javascript/yui/build/calendar/assets/calendar-core.css' => 'be61597ae2a5d6745f4295f4e281a211', './include/javascript/yui/build/button/button.js' => '5513a50284659e706665a98f9b23835e', './include/javascript/yui/build/button/button-min.js' => '3442458b76b17709d00135e8e9c8ddc1', @@ -4636,17 +4566,9 @@ $md5_string = array ( './include/javascript/tiny_mce/langs/en.js' => '5a1cd3c93501e4f7c75267d5617e7c9a', './include/javascript/sugarwidgets/SugarYUILoader.js' => '3004b379974f68076dc298ab70e1f62d', './include/javascript/sugarwidgets/SugarYUIWidgets.js' => '101a53f750187962cd209b1cfe531099', - './include/javascript/jsAlerts.php' => 'b026aec8b25d773ffc2e2562d51991d8', - './include/javascript/javascript.php' => '688f6f9c621400fe6d8c60874d54c382', - './include/javascript/getYUIComboFile.php' => '301a1c825ce73b706c0d84a028bc40ef', - './include/images/seed_will_id.gif' => '2f106be21d1591fcb91636594eeb1689', - './include/images/seed_sarah_id.gif' => 'e2f269d97a3a3f500dff75b770d6c6b1', - './include/images/seed_sally_id.gif' => 'cf29cdbd09b88a5f0f8f038b5f6b1db6', - './include/images/seed_max_id.gif' => 'e208059a38b9899e47b9e3dad65e8888', - './include/images/seed_jim_id.gif' => 'ccdaf0d492f924e8af2611b374550abd', - './include/images/seed_chris_id.gif' => 'ec816fe3d80053c5225890e838a5813e', - './include/images/default_user_feed_picture.png' => '76d7a79b8b448b05b7e0107d72222b95', - './include/images/1.gif' => '9560abd50536d3d57c23316c75f93fe7', + './include/javascript/jsAlerts.php' => '415375bc5e9d2656873005559e86009b', + './include/javascript/javascript.php' => '906a991dcec7849d7798e8f5bae332e4', + './include/javascript/getYUIComboFile.php' => '48b9dcefe27d14a5d14908d9f52dfebe', './include/images/wiki.png' => '6d21a744511a1b55378fbc985daac0e4', './include/images/university.png' => '346083109b89352e3a4b77cc249c56df', './include/images/sugarsales_myarea.png' => '32a23fbbf16b4d48f2e07292818d8ace', @@ -4671,28 +4593,27 @@ $md5_string = array ( './include/images/cube_bg.gif' => 'bb01880551373dc9a2056697be69e5c1', './include/images/blank.gif' => 'fc94fb0c3ed8a8f909dbc7630a0987ff', './include/images/SugarPlanet.swf' => '5af57f2ee896225c65d9411aa2a1b971', - './include/globalControlLinks.php' => 'ce7bc3b7f32aafef2a9796cde652b356', - './include/generic/SugarWidgets/SugarWidgetFieldfile.php' => 'c5bc9bca34c26513b98edc87521c26e5', + './include/globalControlLinks.php' => '3fee8603bc3c5db1e83f2f1800809109', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSummaryButton.php' => '5696649565fb5a9d4ce9026896ccfc5f', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectUsersButton.php' => '9fae334284b2425e0793eac8e786e57c', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectUsersButton.php' => 'a87f8a424d547c88765e7c8c6814e80b', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectContactsButton.php' => 'e762dcee7db8e1cf6e4e2a00ee7026ba', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectButton.php' => 'ace464efc2015de1c6387f3086726bfc', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleMeetingButton.php' => '80202780d705fc3820af718521967ac3', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleCallButton.php' => '27c611e9a26d941e662520034e0fd05d', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php' => 'ffea8c95fa8a3aaa35ab5392245515a8', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php' => '7b5567ea71baa16d9c168378abb69a81', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleMeetingButton.php' => '42b7a7faddc54e6943b7c963f354e399', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleCallButton.php' => 'e5f4509ff2816e9d60616fb7ec58535b', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php' => '357ad7db3d28c208f315e626eaa0b5f9', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php' => 'f75c3449c86578e1b0e80889b2ea1fdf', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateLeadNameButton.php' => '8b965c92591f1f6aadc56be9bebe77f2', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'af0d6f1ec98b54b267fcc9fbba3e3563', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php' => 'bf9f9158ad56ac876c1608fe3e4c28ed', './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => '981a63a7c741406101e24d99890f9eba', './include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php' => 'e7982b2e1db4ec5bd1d3544e0da26a0c', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => 'a585b852abf10a6c8ca3580d841f9cad', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '93e0496f8488093c53ab8c0c3af272e7', './include/generic/SugarWidgets/SugarWidgetSubPanelTopArchiveEmailButton.php' => 'dc3ec22caf6297d2372565748171afbe', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonProjects.php' => '95410891867c4aa7c3ecf1d22f05960a', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonMeetings.php' => 'f0a69da4a6bcf4834f4bf95ed14f9152', - './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButton.php' => 'd2a945db662c90388b569a79bc18d712', + './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButton.php' => 'eaf47784ea7fdaf962856b7cbfc74920', './include/generic/SugarWidgets/SugarWidgetSubPanelLoadSignedButton.php' => 'd85482cfc0b3a551a12dfcf11c11c492', - './include/generic/SugarWidgets/SugarWidgetSubPanelIcon.php' => 'f53fa357004d47f82484f967aeacbf68', + './include/generic/SugarWidgets/SugarWidgetSubPanelIcon.php' => '6cbaacb0541aacca4c63e12a9d330daa', './include/generic/SugarWidgets/SugarWidgetSubPanelGetLatestButton.php' => '902c0450d1778518168e9a9f9ccfa6f5', './include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php' => '95ff0dc2d42b1b25107ef128ab096a9e', './include/generic/SugarWidgets/SugarWidgetSubPanelEditRoleButton.php' => '69b53a79d5ef87686e296fbc05e2ec56', @@ -4721,28 +4642,28 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldid.php' => '461a534ec0747e686e0ebda2d914845e', './include/generic/SugarWidgets/SugarWidgetFieldfullname.php' => '3682f5255bf8218b17fc66c30b884999', './include/generic/SugarWidgets/SugarWidgetFieldfloat.php' => '5d38efd212076d9f096e4225145198e4', - './include/generic/SugarWidgets/SugarWidgetFieldenum.php' => 'b793766549772ded73db9baf19a43451', + './include/generic/SugarWidgets/SugarWidgetFieldenum.php' => 'c74b8130858f9c63f6f073dc76c9d12e', './include/generic/SugarWidgets/SugarWidgetFieldemail.php' => '2b239faf616c60f7162fe4fe7259c055', './include/generic/SugarWidgets/SugarWidgetFielddouble.php' => '8a726ca346e99c9ca1bd6d4972158706', './include/generic/SugarWidgets/SugarWidgetFielddecimal.php' => '732686fb5739045a130f90f38055cd57', - './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => 'ed002f3290327c4159579183b42c7d2c', - './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => 'ef8b68006510a82183ca5f09cee12d59', + './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => '3cefae70591c1c9782cb80dcbf64fd3b', + './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => 'f98e2659c001196086a4c75c985fb6a5', './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => 'bccc9cba27b46155a0c37fb77531b976', './include/generic/SugarWidgets/SugarWidgetFielddate.php' => 'fd743d90553bb939b2fd5e8c47064e60', - './include/generic/SugarWidgets/SugarWidgetFieldcurrency.php' => '0d5b18e3408daba97dfb52642ccd759d', + './include/generic/SugarWidgets/SugarWidgetFieldcurrency.php' => '9f783fa9ddd75f0f0c8d0407354a5395', './include/generic/SugarWidgets/SugarWidgetFieldchar.php' => '0df053d7f26f7677a97cda3c03c1e212', - './include/generic/SugarWidgets/SugarWidgetFieldbool.php' => 'cf88ae65be60587132bd357ea5e12c94', - './include/generic/SugarWidgets/SugarWidgetField.php' => 'a495548c3eebdbfbd26d94a3588b4cb2', + './include/generic/SugarWidgets/SugarWidgetFieldbool.php' => 'f80a5e88cd001ff1c8395b23fe51bb9c', + './include/generic/SugarWidgets/SugarWidgetField.php' => '4962ad4eb7c33461564241ab9f69a89b', './include/generic/SugarWidgets/SugarWidget.php' => '0270ae80c91ede2bd270dd2c364451ed', './include/generic/Save2.php' => '8fe37a23641d1dac8c6eaa40e03356a9', - './include/generic/LayoutManager.php' => 'f683d0982c048f6ba6c1bd0386dcf746', - './include/generic/DeleteRelationship.php' => 'a09280088f5f6f6fcfb7fdb1477dd8b5', + './include/generic/LayoutManager.php' => '8a071a121d07bf610fcfcd0a767f7d65', + './include/generic/DeleteRelationship.php' => '494fb062e53251b7d1770734145ef9ce', './include/formbase.php' => 'a3a0d4280a6c00163c3f8f908fc56beb', - './include/fonts/License.html' => '8a22bc6b773aeb68f9748fd1920f84d4', './include/fonts/Times-Roman.afm' => 'f257a72c31f6a864f4e0994b1771628c', './include/fonts/Times-Italic.afm' => 'c41212e70e19627889aefef85212a47d', './include/fonts/Times-BoldItalic.afm' => '49d6b1de28b2f8f6f8a4eaff2485071f', './include/fonts/Times-Bold.afm' => 'e2244341873416fa5d56635b5bfb797e', + './include/fonts/License.html' => '8a22bc6b773aeb68f9748fd1920f84d4', './include/fonts/Helvetica.afm' => '9cceac6630e6963e1b4bfcd89ce91cb4', './include/fonts/Helvetica-Oblique.afm' => '6261d6f49c6d20fe257ddd8be12c5fa0', './include/fonts/Helvetica-BoldOblique.afm' => '1a0205dc4b27270f07aae77da1bdff1e', @@ -4752,32 +4673,32 @@ $md5_string = array ( './include/fonts/Courier-BoldOblique.afm' => '5c34aeefc1ef69ae2fb317abc1ccc9ca', './include/fonts/Courier-Bold.afm' => 'cb84ced0cc430a5d54497257a11638f5', './include/export_utils.php' => 'c2bc58e4366464ee38c82e54b5c8e231', - './include/entryPoint.php' => '7992853edeb130ccff864920956a5910', - './include/dir_inc.php' => '3d81f515f41d3f7d654560093e10fcd2', - './include/database/SqlsrvManager.php' => '4f26319dcb5863696334243bf7b4e579', - './include/database/SqlsrvHelper.php' => '192ad146c32328a5f6a0143d07253fd2', + './include/entryPoint.php' => '1b02a949b9b49557b97f273ef19ddf33', + './include/dir_inc.php' => '2546da87d674ce917e4786113056a8b5', + './include/database/SqlsrvManager.php' => '0dbc863ae25d118abdf2390508a3afb6', + './include/database/SqlsrvHelper.php' => '2358aa594df201e13411ab5befcc7464', './include/database/PearDatabase.php' => '04c1aaa57df1bc5516c455b8883d56d2', - './include/database/MysqliManager.php' => '422bf5cf16c77a4b04c4477dd884a145', + './include/database/MysqliManager.php' => 'c4d5476f46acc35c745d5dec5b5d178c', './include/database/MysqliHelper.php' => '5c29384d6a98b58e4a70222012ede66b', - './include/database/MysqlManager.php' => '2df7ae91dc3750abf2edf8ab66e85c25', - './include/database/MysqlHelper.php' => 'a6866f89272d781eae540a54437f50d8', - './include/database/MssqlManager.php' => 'a3532faae8ed3b2fb486207a91c05b78', - './include/database/MssqlHelper.php' => '4d98d46ecb0139685571d7c9a98984cb', + './include/database/MysqlManager.php' => 'ea5f7aec1d166e48ed6b21104b39d4fe', + './include/database/MysqlHelper.php' => '255e224011b7fcb968c719f2e100f8eb', + './include/database/MssqlManager.php' => '6aec9b35e565e52a2bcd454f81843694', + './include/database/MssqlHelper.php' => 'b5348532ed65c26c4406261198b1b627', './include/database/FreeTDSManager.php' => 'bbeb3f527257a0ebe0fd2f27f4090ca0', './include/database/FreeTDSHelper.php' => '1f725f014b815db50a02427b8ad07352', - './include/database/DBManagerFactory.php' => '83c89bd465be2c859b15f336d5e22a1d', - './include/database/DBManager.php' => 'cfd4407e7034285edd54e090101cfea8', - './include/database/DBHelper.php' => 'd23ca59ade289a4b826cf55936e92e1d', + './include/database/DBManagerFactory.php' => '09074cf5da055ebdbdc6f5dfca5ddec2', + './include/database/DBManager.php' => 'fb4fdaf467a6920690ad9a0a3bc07c0b', + './include/database/DBHelper.php' => '7e457f22399a0d7ad1ad884eb4715634', './include/controller/Controller.php' => 'f65e2428b4f9b9ed709278aced7099d6', './include/contextMenus/menuDefs/sugarPerson.php' => '6ba041d95634a9dbdbea99e55a8e51d6', './include/contextMenus/menuDefs/sugarObject.php' => '298c89b8c3e5386763e71515b4c11d93', './include/contextMenus/menuDefs/sugarAccount.php' => '2f933fb2dafb7273d5c98f05613ecfa9', './include/contextMenus/contextMenu.php' => 'fec90b47bb1071a653b972fc4947f2cc', - './include/connectors/utils/ConnectorUtils.php' => '7c28a58adec5ccf4e23cd1beec6a16ea', + './include/connectors/utils/ConnectorUtils.php' => '2d697e3a8af01639a1da4e42ecd7e782', './include/connectors/sources/loc/xml.php' => '45ca47d630dfd777456d2b3054dc1778', './include/connectors/sources/ext/soap/soap.php' => 'a7302d7bd5ebeea6c3d83ae5cd230b16', './include/connectors/sources/ext/rest/rest.php' => '78a5eab8f0a0ad3b41d92cf132db2b17', - './include/connectors/sources/default/source.php' => '97984ab7a11960de881fb7d04dceda6f', + './include/connectors/sources/default/source.php' => '9c2ac63a9c60180bd6e106515e958e6f', './include/connectors/sources/SourceFactory.php' => 'cb0d179dd2da3c8bc70a8bc93f86ecd8', './include/connectors/formatters/ext/soap/tpls/default.tpl' => '7b470afa25be5f2a9cb14cfcc2cbec25', './include/connectors/formatters/ext/rest/tpls/default.tpl' => 'ae976eb0b1c3a97ff1471746ddc07bda', @@ -4786,13 +4707,21 @@ $md5_string = array ( './include/connectors/formatters/FormatterFactory.php' => 'f2838a245924053435869c4ff981235e', './include/connectors/filters/default/filter.php' => 'c6a34cf14ec98a2a149c447b3c627a1c', './include/connectors/filters/FilterFactory.php' => 'a74c1562a8f4f6f49e98d0b85efc9b20', - './include/connectors/component.php' => '722227b98fc941d55b0f5dabcb0bff23', + './include/connectors/component.php' => '7681c10b991a46787753e0f86b8c9ee2', './include/connectors/ConnectorFactory.php' => '44f817c0e5e2db8db9ca5a40f3d4fe45', - './include/VarDefHandler/vardef_meta_arrays.php' => '6144157c776b1d019d0389d1ed0a9868', + './include/charts/vBarF.swf' => '8a747937205cc3f736895f3000bff703', + './include/charts/pieF.swf' => 'b90623056934ec3bf3db5ef963e217d5', + './include/charts/lineF.swf' => '438cebedf48cf504b0352eb484fab571', + './include/charts/hBarS.swf' => '04b6b37fd4b5951791562a665ba8fcf0', + './include/charts/hBarF.swf' => 'da5f55932e932793072ace1c9dd1aab8', + './include/charts/Charts.php' => 'da28c8c29494a15ae486228b60fe00e0', + './include/VarDefHandler/vardef_meta_arrays.php' => '5192667b08c9ba337c2ff5a1b1aaebc7', './include/VarDefHandler/listvardefoverride.php' => 'd9e443ba78875b7aec6f0cf7b9e17468', './include/VarDefHandler/VarDefHandler.php' => 'fab80ef153197b304b35cca428000009', - './include/TimeDate.php' => '935896bea5c3d4c78ff212d5170584ca', - './include/TemplateHandler/TemplateHandler.php' => '6854cd6b85466421987803f7962c4b5c', + './include/VarDefHandler/SugarTabs/tpls/singletabmenu.tpl' => '227465fee5c0d49008b431afc3c5668d', + './include/VarDefHandler/SugarTabs/SugarTab.php' => '995c9108afa6765530004225165874cd', + './include/TimeDate.php' => '3d0dcb201947f2a42183d80ea7abc161', + './include/TemplateHandler/TemplateHandler.php' => 'b7e7c5716ed271bc8fa15976b2e35e36', './include/Sugarpdf/sugarpdf_default.php' => 'a0310a0194f541373e42c96e83b2b144', './include/Sugarpdf/sugarpdf_config.php' => '5bb0994c91417984853bb9a33c7277e5', './include/Sugarpdf/sugarpdf/sugarpdf.smarty.php' => '682203646fe9e1e21972ae28cf626723', @@ -4801,33 +4730,25 @@ $md5_string = array ( './include/Sugarpdf/Sugarpdf.php' => 'c338aadbb7e308c2c5e1ca85e9d32c2a', './include/Sugarpdf/FontManager.php' => '4a2de9036d79ab5ebe45ab3eee82695e', './include/Sugar_Smarty.php' => '547322d4d90cf3c8f9a272bde06ea156', - './include/SugarTinyMCE.php' => 'ad41bfa32103b12916cd596893217566', - './include/SugarTheme/getImage.php' => '2da8f180e461703dafc2e95cc421dd8b', + './include/SugarTinyMCE.php' => '7dcfc326c1c9bffa0289ab39f9304616', + './include/SugarTheme/getImage.php' => 'f1b60c0a3445ede87a9d61c992af4e14', './include/SugarTheme/cssmin.php' => '05384ba957435def09368425e4480688', - './include/SugarTheme/SugarTheme.php' => 'b7454114e7c736cf807e9dd7e13afbe3', + './include/SugarTheme/SugarTheme.php' => '605b5f3c34b6b4da3ae3b662eee54626', + './include/SugarTabs/tpls/singletabmenu.tpl' => 'd595567a2ece28c77feaab96b51a6f9d', + './include/SugarTabs/SugarTab.php' => '995c9108afa6765530004225165874cd', './include/SugarPHPMailer.php' => 'c4fb090f36f4d295af06ff02049d59eb', - './include/SugarCache/SugarCachesMash.php' => 'd08b32ef33a07c4a1960f326fb5f4b14', - './include/SugarCache/SugarCacheZend.php' => 'e8d3c30797a8e3f3d9717833f7ac2cd4', - './include/SugarCache/SugarCacheWincache.php' => '6bf210ca6bad3f4626c01a15cd598e2c', - './include/SugarCache/SugarCacheRedis.php' => '1d3300c42f473e7a0cc1bb21dcd3ea15', - './include/SugarCache/SugarCacheMemory.php' => 'd84fd2039ca0607fbe03ea23cde088d1', - './include/SugarCache/SugarCacheMemcached.php' => '4f804c06901db015780f373ed669a386', - './include/SugarCache/SugarCacheMemcache.php' => '4795c41709b2dfb3dd64414f7e75d2af', - './include/SugarCache/SugarCacheFile.php' => '6e2628da550c6235d87248825d3eb13e', - './include/SugarCache/SugarCacheAbstract.php' => '134458b0b255e28c6455e77ec0f170ba', - './include/SugarCache/SugarCacheAPC.php' => 'bd0a80c914aa68152e9429a9e3f86777', - './include/SugarCache/SugarCache.php' => 'ea7a05845f592a44da4b9057237000e1', - './include/SugarObjects/templates/sale/vardefs.php' => 'c7e359ed4c4876b961b4171641021ae0', + './include/SugarPDF.php' => '8d8723eacc63e132e77144a4ab6becd8', + './include/SugarObjects/templates/sale/vardefs.php' => '9a188e521522e606751fbe43f8664f82', './include/SugarObjects/templates/sale/metadata/subpanels/default.php' => '8fb6a0b90aab32115fdec077adfee755', - './include/SugarObjects/templates/sale/metadata/searchdefs.php' => '01fab0adf7fb0aec30bb84ab07f551fa', + './include/SugarObjects/templates/sale/metadata/searchdefs.php' => '68f53568d9892825ae812a5a5d8efbe4', './include/SugarObjects/templates/sale/metadata/quickcreatedefs.php' => 'd28a9e618293f5aedcfa2d02cd3c2705', './include/SugarObjects/templates/sale/metadata/popupdefs.php' => 'c1e9b08060c35ec85c272c6494e3ccf6', './include/SugarObjects/templates/sale/metadata/metafiles.php' => '349e6ae03d64d736e8c362da98d71c5b', './include/SugarObjects/templates/sale/metadata/listviewdefs.php' => '962f7f6c741c3693bcb6e5ad7b1ef5cd', './include/SugarObjects/templates/sale/metadata/editviewdefs.php' => '3b7bef9b86fe2e2acf45e9d8d7fec67a', - './include/SugarObjects/templates/sale/metadata/detailviewdefs.php' => '42aa1f0f13dce34821b418f06b3e8e9b', + './include/SugarObjects/templates/sale/metadata/detailviewdefs.php' => '10057fa2acf0e7f84f8f2b2a2f68a5a1', './include/SugarObjects/templates/sale/metadata/dashletviewdefs.php' => '8480c18ee629a8743d5acf9d793110ec', - './include/SugarObjects/templates/sale/metadata/SearchFields.php' => 'b48d639de511f148dc0f0f8f069987ba', + './include/SugarObjects/templates/sale/metadata/SearchFields.php' => 'd8e01e5f58d281775e588e849291ddb8', './include/SugarObjects/templates/sale/language/en_us.lang.php' => 'e17866d97b78d60cab78d64119eaceff', './include/SugarObjects/templates/sale/language/application/en_us.lang.php' => '88a7f50d64f44799c5b4909ab55a0a80', './include/SugarObjects/templates/sale/icons/sale_32.gif' => 'f73940c5f0691ffcc4758052272ffc44', @@ -4849,8 +4770,8 @@ $md5_string = array ( './include/SugarObjects/templates/person/metadata/editviewdefs.php' => '6e716bae04fa96ec21f8827ab226b47e', './include/SugarObjects/templates/person/metadata/detailviewdefs.php' => '9975beb00d896f3bcd6ea1699ab75b60', './include/SugarObjects/templates/person/metadata/dashletviewdefs.php' => 'cc28034dbe0d1bda3c6778254168990c', - './include/SugarObjects/templates/person/metadata/SearchFields.php' => '1cdf25fc8f2f44f8b0336b12c7f7f256', - './include/SugarObjects/templates/person/language/en_us.lang.php' => 'ffd666b39971db1d0bbe8e454d0fe43f', + './include/SugarObjects/templates/person/metadata/SearchFields.php' => '23f116f505732b17994a97d482ce39fe', + './include/SugarObjects/templates/person/language/en_us.lang.php' => '7044cb904e8ee1edded11659ccaadf4a', './include/SugarObjects/templates/person/icons/person_32.gif' => '1550c24a793910550200679be1c5c078', './include/SugarObjects/templates/person/icons/person.gif' => 'ea5e2b2022166291d01ccedaf24b4e33', './include/SugarObjects/templates/person/icons/Createperson.gif' => '2e20692d501b15729294b80f4f311d77', @@ -4858,40 +4779,40 @@ $md5_string = array ( './include/SugarObjects/templates/person/Person.php' => '644282f973fcb83d3555d22a482d7390', './include/SugarObjects/templates/issue/vardefs.php' => '9891c01794faa4962c37f1e88724c49d', './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => '55fefed3cdd67df4470e62d806bf69a2', - './include/SugarObjects/templates/issue/metadata/searchdefs.php' => '6ed06477c8f74fa2c347e8dfe54babf6', + './include/SugarObjects/templates/issue/metadata/searchdefs.php' => '7829b1b8438cb03dc3d4906811c3cfd5', './include/SugarObjects/templates/issue/metadata/quickcreatedefs.php' => '9245483009fd5637fc59cd43e3549e20', './include/SugarObjects/templates/issue/metadata/popupdefs.php' => '604126a5cfcb85b6dba8ecea992188e3', './include/SugarObjects/templates/issue/metadata/metafiles.php' => 'b08ff06cfacb9c839860955c149cde9b', './include/SugarObjects/templates/issue/metadata/listviewdefs.php' => '9574102213b07d831532b60476d16345', './include/SugarObjects/templates/issue/metadata/editviewdefs.php' => '74cd547e922d0e3c7b617f4f3e17b4df', - './include/SugarObjects/templates/issue/metadata/detailviewdefs.php' => '3bf56f585aa0ca6cd641839146a7be3b', + './include/SugarObjects/templates/issue/metadata/detailviewdefs.php' => '4a2fc9ad1eb5b6d180fb3d6681116bd9', './include/SugarObjects/templates/issue/metadata/dashletviewdefs.php' => 'cc28034dbe0d1bda3c6778254168990c', - './include/SugarObjects/templates/issue/metadata/SearchFields.php' => '414756f5fd12364a365ab10ecd68819b', + './include/SugarObjects/templates/issue/metadata/SearchFields.php' => '4459aea9567631e474a953fe73088b74', './include/SugarObjects/templates/issue/language/en_us.lang.php' => '624b8d8abc8bdb409e2447b8dd3bb51d', - './include/SugarObjects/templates/issue/language/application/en_us.lang.php' => 'd3c5595f7b0afbe04034d8cf26d43cd7', + './include/SugarObjects/templates/issue/language/application/en_us.lang.php' => '7fce12305690ca0916a37e77def4523c', './include/SugarObjects/templates/issue/icons/issue_32.gif' => 'b2f4acfa921e04b500320c2f6e271478', './include/SugarObjects/templates/issue/icons/issue.gif' => 'b991bb74ff3c649b1f6592a4f3c6c114', './include/SugarObjects/templates/issue/icons/Createissue.gif' => '269352232732ae705318612e960b9eba', './include/SugarObjects/templates/issue/config.php' => '6f9cdfda0abefeab1262260d9030468c', './include/SugarObjects/templates/issue/Issue.php' => '94069381dc9edadcfa1c231f1f7b4205', - './include/SugarObjects/templates/file/views/view.edit.php' => '5f65187fb35d6ea4b9dcd15a2e1011a4', - './include/SugarObjects/templates/file/vardefs.php' => '0e5a1978b2fbf76e6aff450942d75c07', + './include/SugarObjects/templates/file/views/view.edit.php' => '25c2b33651905c058de2cec20a59fe87', + './include/SugarObjects/templates/file/vardefs.php' => '01d8d8294f3be21c1cc0e614dcf7a507', './include/SugarObjects/templates/file/metadata/subpanels/default.php' => 'e68b8639a483574b567629cf5bd08807', './include/SugarObjects/templates/file/metadata/searchdefs.php' => '0ee0f29439e89162c8aef48953f45368', - './include/SugarObjects/templates/file/metadata/quickcreatedefs.php' => 'a20d8b973b3eadf4d5f22766b0f16408', + './include/SugarObjects/templates/file/metadata/quickcreatedefs.php' => '60f600d6f99438041448477b784b976b', './include/SugarObjects/templates/file/metadata/metafiles.php' => 'e7d5c1d5e0c06c7984a7db04ee3f6383', './include/SugarObjects/templates/file/metadata/listviewdefs.php' => '96f0351f161a616abc216f1e60064f5e', - './include/SugarObjects/templates/file/metadata/editviewdefs.php' => '1300d3e0819a32c4e8d8abf344d491fc', + './include/SugarObjects/templates/file/metadata/editviewdefs.php' => 'fd4ad0d8c983d914982d75e0ab3e2c6a', './include/SugarObjects/templates/file/metadata/detailviewdefs.php' => 'cd73435c99737ea80a61ea8e41c902bf', './include/SugarObjects/templates/file/metadata/dashletviewdefs.php' => '330f959e99840611d6f9cd0772c0892e', - './include/SugarObjects/templates/file/metadata/SearchFields.php' => '1960514f7d8268fc6842fa61b7edf365', - './include/SugarObjects/templates/file/language/en_us.lang.php' => '898b828442b97e1768533da6bd0ec262', + './include/SugarObjects/templates/file/metadata/SearchFields.php' => '80eba84b381cabd65626687f9dac1314', + './include/SugarObjects/templates/file/language/en_us.lang.php' => 'f54019e7fc8c24ed54bac75f12598334', './include/SugarObjects/templates/file/language/application/en_us.lang.php' => '73927a49ad5d7b030819fe9735e0e3ee', './include/SugarObjects/templates/file/icons/file_32.gif' => '16b6a44601f20a651d1c83dc1a020c12', './include/SugarObjects/templates/file/icons/file.gif' => 'a577b65a0589e748d18aa1baef4e05c6', './include/SugarObjects/templates/file/icons/Createfile.gif' => '3ed1d93938f715b1af93c0e99e900af5', './include/SugarObjects/templates/file/controller.php' => 'd63646be092ad4d77c1ca096c413c43c', - './include/SugarObjects/templates/file/File.php' => 'b8f71060ea100f8d957176efa7d5dd5c', + './include/SugarObjects/templates/file/File.php' => 'dc70999ee71c454196955f37513dc6b8', './include/SugarObjects/templates/company/vardefs.php' => '1b297504eb8a626027d9acbb3ba986b1', './include/SugarObjects/templates/company/metadata/subpanels/default.php' => '2ab6e9a96e88586d6060f1b8ec003397', './include/SugarObjects/templates/company/metadata/searchdefs.php' => '7f963db941a6086a9b07c0ead95f3459', @@ -4902,15 +4823,15 @@ $md5_string = array ( './include/SugarObjects/templates/company/metadata/editviewdefs.php' => '1fbcdf5012b949eab9c7688cb6340009', './include/SugarObjects/templates/company/metadata/detailviewdefs.php' => 'fc34b1ab8299a43de9a56f6a3aee928c', './include/SugarObjects/templates/company/metadata/dashletviewdefs.php' => 'cc28034dbe0d1bda3c6778254168990c', - './include/SugarObjects/templates/company/metadata/SearchFields.php' => 'fc8ac6014765325f5021bdada6175cda', - './include/SugarObjects/templates/company/language/en_us.lang.php' => '660bc6f5262880cf44d6a1d0e20bce1f', + './include/SugarObjects/templates/company/metadata/SearchFields.php' => '3cd7a6024da7a6fb2e7b2a92f43301e4', + './include/SugarObjects/templates/company/language/en_us.lang.php' => '7e9e32bd5391772b32f829589e30e08d', './include/SugarObjects/templates/company/language/application/en_us.lang.php' => '2d87dea43be8c2850cf3abf0ba7ea7c5', './include/SugarObjects/templates/company/icons/company_32.gif' => 'eb850fc1863a46987cdafca12693c789', './include/SugarObjects/templates/company/icons/company.gif' => '7890367dfe0e337a2f5f2839b3e6dac7', './include/SugarObjects/templates/company/icons/Createcompany.gif' => '3978b32e01cbeb974d86b1da0617dae9', './include/SugarObjects/templates/company/config.php' => '6ae18f6ce9daa6605a8a7b03c48273db', './include/SugarObjects/templates/company/Company.php' => '193b46d2590072af5ea6b0f694744460', - './include/SugarObjects/templates/basic/vardefs.php' => '706febff3b66254a7244f6bf3b005f12', + './include/SugarObjects/templates/basic/vardefs.php' => '20f01e070069d84d10bfd707210e7642', './include/SugarObjects/templates/basic/metadata/subpanels/default.php' => '1531d794b6709aeb4a0111d83b786cdb', './include/SugarObjects/templates/basic/metadata/searchdefs.php' => '77a426e0d55e076a745302a411935d22', './include/SugarObjects/templates/basic/metadata/quickcreatedefs.php' => 'a55835f923d33db8a0174aad417655a8', @@ -4920,19 +4841,19 @@ $md5_string = array ( './include/SugarObjects/templates/basic/metadata/editviewdefs.php' => '53ebfaff9a10a57b406b778f1b7d889c', './include/SugarObjects/templates/basic/metadata/detailviewdefs.php' => '3d27bd9aa9f359248caf8c2f44c1ba25', './include/SugarObjects/templates/basic/metadata/dashletviewdefs.php' => '8480c18ee629a8743d5acf9d793110ec', - './include/SugarObjects/templates/basic/metadata/SearchFields.php' => '6d5cb8f2752706d6e56393c3d3aa870f', + './include/SugarObjects/templates/basic/metadata/SearchFields.php' => 'f7a318f5eebb4498139c7c2dc2cb07c3', './include/SugarObjects/templates/basic/language/en_us.lang.php' => 'f5baa3b5a84319da06f2c31cf78749a9', './include/SugarObjects/templates/basic/icons/basic_32.gif' => 'd92dc1c8a1ef6e0351b6948d78bf1436', './include/SugarObjects/templates/basic/icons/basic.gif' => '75faad9850edd06df55b63abce42d014', './include/SugarObjects/templates/basic/icons/Createbasic.gif' => 'e25889cd660d838655f5e213fe565f0d', './include/SugarObjects/templates/basic/Dashlets/Dashlet/m-n-Dashlet.php' => '1891bc6878bb4864ef6135145e5d0908', './include/SugarObjects/templates/basic/Dashlets/Dashlet/m-n-Dashlet.meta.php' => '75b2139565dc7c4fe4d9d9b8e1973634', - './include/SugarObjects/templates/basic/Basic.php' => 'aae8cc20c1510feac2e68a2d481649eb', - './include/SugarObjects/implements/team_security/vardefs.php' => 'a61bfc389a5f6f58f64a72dca231f50e', + './include/SugarObjects/templates/basic/Basic.php' => 'ac647cd952906a0eb597e233c83f8bb3', + './include/SugarObjects/implements/team_security/vardefs.php' => '439d816b85020846ee60938738fc259b', './include/SugarObjects/implements/team_security/language/en_us.lang.php' => 'c00816fcc370c97c6190059119c4c3c0', './include/SugarObjects/implements/assignable/vardefs.php' => 'f388916ada054d6afa05f954e0a2cd3e', './include/SugarObjects/implements/assignable/language/en_us.lang.php' => 'e4acab8de35121957fb86900899e0763', - './include/SugarObjects/VardefManager.php' => 'c1f9129f8ab826cda750895e6020ac61', + './include/SugarObjects/VardefManager.php' => 'c141cd866be7d8c76c7418d629d03e4e', './include/SugarObjects/SugarSession.php' => '514ac6afae766a48937041187d9c3b49', './include/SugarObjects/SugarRegistry.php' => '98e36a91582216044880950f43ba725b', './include/SugarObjects/SugarConfig.php' => 'df914787952d788704ca6a7593f4eb4c', @@ -4940,7 +4861,7 @@ $md5_string = array ( './include/SugarLogger/SugarLogger.php' => '2af3c5f2ad5229e7c55d298e4122b8e3', './include/SugarLogger/LoggerTemplate.php' => '865497592529cb74a6033a5155f015b0', './include/SugarLogger/LoggerManager.php' => '62171c14b68db2be07810744dead9519', - './include/SugarFolders/SugarFolders.php' => '4c4eecf343d46449ad4dbb64ac45e52f', + './include/SugarFolders/SugarFolders.php' => 'eb2799e16548c5fdc0d384e40a3bfedc', './include/SugarFields/SugarFieldHandler.php' => '5c16ae65725f0cab8b8a498fa7e7dfb5', './include/SugarFields/Parsers/SearchFormMetaParser.php' => '02267a9149b7e09830109655a8a4b373', './include/SugarFields/Parsers/Rules/VariableSubstitutionRule.php' => 'da69179d8f94d54dd68c23feafbbc832', @@ -4966,100 +4887,93 @@ $md5_string = array ( './include/SugarFields/Parsers/Rules/ActivitiesParseRule.php' => 'dc3448fde70fb776eabb2fe14e54a364', './include/SugarFields/Parsers/Rules/AccountsParseRule.php' => 'b61c2fd3ef2f1911e5c80f868d2322f8', './include/SugarFields/Parsers/QuickCreateMetaParser.php' => '33160aa871736e67ba9f3161770f26a7', - './include/SugarFields/Parsers/MetaParser.php' => 'f4fc34a2e1a360fa03fda3feaf9f7a1d', + './include/SugarFields/Parsers/MetaParser.php' => '70de52273f84683857cc8ee9f8fc244b', './include/SugarFields/Parsers/EditViewMetaParser.php' => '56e8c08febb69176e24e27474efc02a6', './include/SugarFields/Parsers/DetailViewMetaParser.php' => '067153dd72b6ccead212f5c05989467d', - './include/SugarFields/Fields/Id/SugarFieldId.php' => '4e9671259741f5e9bdad9134536d0b0b', - './include/SugarFields/Fields/Username/SugarFieldUsername.php' => '68b2a346bb6bc9a37fd5997839a3ef22', - './include/SugarFields/Fields/Username/DetailView.tpl' => '265789b155e8f0627ee8f09e7442556a', + './include/SugarFields/Fields/Username/SugarFieldUsername.php' => 'c2cd1bff34cc7b78af9661d2cbdcf13a', + './include/SugarFields/Fields/Username/DetailView.tpl' => '927c99877ce30394e8912c7873353f0e', './include/SugarFields/Fields/URL/ListView.tpl' => '348cdc6eb954f912b7ad3de52386b044', './include/SugarFields/Fields/URL/EditView.tpl' => '6c4b5eace8297f1ab1b9a591a996cf53', - './include/SugarFields/Fields/URL/DetailView.tpl' => 'ca276cf6c74d44072082dd4d2bb9df67', - './include/SugarFields/Fields/Text/SugarFieldText.php' => '09062f54c8846717b788223389539921', + './include/SugarFields/Fields/URL/DetailView.tpl' => 'fcd1b679fb3fc6730e45088c34895940', + './include/SugarFields/Fields/Text/SugarFieldText.php' => '6beb76d0c5cca258cf2c8cbdf3b18d1b', './include/SugarFields/Fields/Text/EditView.tpl' => 'c894ddc45353fcbb4bb0ff6ced41dc6a', - './include/SugarFields/Fields/Text/DetailView.tpl' => '569a73fb57f61968c44b8b89d1fa85c8', + './include/SugarFields/Fields/Text/DetailView.tpl' => 'f233c324ae83f4c98cc30e267d43bb48', './include/SugarFields/Fields/Text/ClassicEditView.tpl' => '64b3798cb9493699ba6753f8d1308800', - './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => '9a4e59ddc32a34efac991a47db3b3330', + './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => '67ea9f8f83e9a39fa5885b9bef2ae124', './include/SugarFields/Fields/Relate/SearchView.tpl' => '06aa8e553038827a8180f033345d980d', './include/SugarFields/Fields/Relate/EditView.tpl' => '7104af2a6eb8a8677b8bf8a5129a6efe', - './include/SugarFields/Fields/Relate/DetailView.tpl' => '1d58830f1002d63405955e15402f154f', + './include/SugarFields/Fields/Relate/DetailView.tpl' => '823434be7bd92fb89eb09d409538726c', './include/SugarFields/Fields/Readonly/SugarFieldReadonly.php' => 'c94a8504b58aa243752d0ea79ba58d35', './include/SugarFields/Fields/Radioenum/EditView.tpl' => '43624976527f15572ccf9c3e9e913dcf', - './include/SugarFields/Fields/Radioenum/DetailView.tpl' => '40e967a3e3d8d84759ec757e10d87698', - './include/SugarFields/Fields/Phone/SugarFieldPhone.php' => 'e31438e2425b63be6640b3fb4e73d7a5', - './include/SugarFields/Fields/Phone/EditView.tpl' => '9b9ef604b528e14f9e11abbf236de147', - './include/SugarFields/Fields/Password/SugarFieldPassword.php' => 'ce8e8aef9cc8df2b2323402a4b2ff1d6', + './include/SugarFields/Fields/Radioenum/DetailView.tpl' => 'eca8779d060fdc09f25584dfabdbb949', + './include/SugarFields/Fields/Phone/ListView.tpl' => 'b3d2314a6f2f09904994935c5f0452c1', + './include/SugarFields/Fields/Phone/DetailView.tpl' => '16666b79f14487d3cf94866020810da1', './include/SugarFields/Fields/Password/EditView.tpl' => '1edeebd3c8b1ecc3e2c7e85cbe6d082b', - './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '01a9d1328c58c997609e19d4e6a1fad8', + './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '7c6c2ae535ea0edb33b7a7646c66ad07', './include/SugarFields/Fields/Parent/SearchView.tpl' => 'bbd6fbd734276c39c8f54ff47d97389f', './include/SugarFields/Fields/Parent/EditView.tpl' => '38dff65450e0495924448d6ee756aa6b', - './include/SugarFields/Fields/Parent/DetailView.tpl' => '81cf3af6a61d38101e3cfe747dd9a64a', - './include/SugarFields/Fields/Multienum/SugarFieldMultienum.php' => 'a2a08b6a251a8074fece78676e2c6517', + './include/SugarFields/Fields/Parent/DetailView.tpl' => 'c056703feaa195c114e8b3fe24a16e86', + './include/SugarFields/Fields/Multienum/SugarFieldMultienum.php' => '2e2d91cfe7b57358e1ad24ccec13c966', './include/SugarFields/Fields/Multienum/SearchView.tpl' => 'dc5d9652e9a630788ddb7578a850d36c', './include/SugarFields/Fields/Multienum/ListView.tpl' => '20999318663962eb6e9f9df6c4cc0a93', './include/SugarFields/Fields/Multienum/EditViewFunction.tpl' => '9f0bd6fbdd370ba799181b420700d690', - './include/SugarFields/Fields/Multienum/EditView.tpl' => 'b76caf30b40ead7e5e77ee385680e623', - './include/SugarFields/Fields/Multienum/DetailView.tpl' => 'b2c0824e4a3585cac4e7dd5b8cbc44fb', + './include/SugarFields/Fields/Multienum/EditView.tpl' => '43ffbc8b4e08c2d57d2506f2d4ac071f', + './include/SugarFields/Fields/Multienum/DetailView.tpl' => '9c4cb831817a1589af1eb682ff4e95f4', './include/SugarFields/Fields/Link/ListView.tpl' => '3efb0c3d1e5f5f7cc825664416795b6f', './include/SugarFields/Fields/Link/EditView.tpl' => '13c9dd96fe5d5997ff6626414f51daea', - './include/SugarFields/Fields/Link/DetailView.tpl' => '7cf2bcf75d842bfaf7c2aefe29badd8e', - './include/SugarFields/Fields/Int/RangeSearchForm.tpl' => '7bd5ddf1034ac84f3a76318dc2a08ba7', - './include/SugarFields/Fields/Int/SugarFieldInt.php' => '37b89119cbc9e5654454c94ef9434612', + './include/SugarFields/Fields/Link/DetailView.tpl' => 'eedaba81ed1cbd1db8534c0920559dfd', + './include/SugarFields/Fields/Int/SugarFieldInt.php' => 'd5c98d7f31a2630aa00f1d49e74a1f9e', './include/SugarFields/Fields/Int/SearchForm.tpl' => '49dfd8196ff5a647550a0102ec302b40', './include/SugarFields/Fields/Int/EditView.tpl' => 'ef85b3701213ec7fbf270b7a652f665b', - './include/SugarFields/Fields/Int/DetailView.tpl' => '2a2e939aa1f46920974d4e55b3e536ed', + './include/SugarFields/Fields/Int/DetailView.tpl' => '49dcd50d171ab1cd0f97bf6523308e93', './include/SugarFields/Fields/Iframe/EditView.tpl' => 'd932cd74d2aa8f150e05e4fc1842a9ff', - './include/SugarFields/Fields/Iframe/DetailView.tpl' => '166e7c48cf8508bf8475d93e9fa7cc65', - './include/SugarFields/Fields/Html/SugarFieldHtml.php' => '52fbd9c0870c72a93f5ff77fb331b5a5', - './include/SugarFields/Fields/Html/DetailView.tpl' => 'fb7614d8b124259ec226e0419c1de02a', - './include/SugarFields/Fields/Fullname/SugarFieldFullname.php' => '04f64aa66c5bb260769cc0383b82dabd', - './include/SugarFields/Fields/Fullname/DetailView.tpl' => '5013b528be98fb2c5cd89b79a95e7f04', - './include/SugarFields/Fields/Float/SugarFieldFloat.php' => 'cde383c4826dc6789d4564ddf7557f0a', + './include/SugarFields/Fields/Iframe/DetailView.tpl' => 'a3ad68e7cba18f9795b1762ec8733eeb', + './include/SugarFields/Fields/Html/SugarFieldHtml.php' => 'b6e92e60f13de1776c4657d7727034d4', + './include/SugarFields/Fields/Html/DetailView.tpl' => 'b29a4af2f0942c0f23a3c64a5e76036b', + './include/SugarFields/Fields/Fullname/SugarFieldFullname.php' => '61273b6d9b7e5aec61ffa01b0fd45e0f', + './include/SugarFields/Fields/Fullname/DetailView.tpl' => '52a93340de467e68b0710145f2b05ef2', + './include/SugarFields/Fields/Float/SugarFieldFloat.php' => 'a3560d243076446a7dfc8dc727849aec', './include/SugarFields/Fields/Float/EditView.tpl' => '0fb9f47fb2ff78b80b4be921d083c4fa', - './include/SugarFields/Fields/Float/DetailView.tpl' => 'd262f314387c02eea26e73e7b13eeded', - './include/SugarFields/Fields/File/SugarFieldFile.js' => '8235879c29fa930c1b41a9d7a913c4f1', - './include/SugarFields/Fields/File/SearchView.tpl' => '714c86e492dad340a8b6d7fb02402190', - './include/SugarFields/Fields/File/ListView.tpl' => 'e721c525ebe3f10e1d92111f3fa96faf', - './include/SugarFields/Fields/File/SugarFieldFile.php' => '73ba55ea4efb3e5b3fdc67f867e7ca01', - './include/SugarFields/Fields/File/EditView.tpl' => '6809bea5bf1a9d932a44499b807e8a79', - './include/SugarFields/Fields/File/DetailView.tpl' => 'e1a8b7dc324439b6616483c9db5bef54', - './include/SugarFields/Fields/Enum/SugarFieldEnum.php' => 'f20e65f73f58126986b4fdc04a70c3e0', + './include/SugarFields/Fields/Float/DetailView.tpl' => '07f854637f3160f739fb2b3471ad7717', + './include/SugarFields/Fields/File/SugarFieldFile.php' => 'c736922788be9a561b6c9d68d5699092', + './include/SugarFields/Fields/File/EditView.tpl' => '19aa4242c33252a6b4609d699674f23f', + './include/SugarFields/Fields/File/DetailView.tpl' => '81ec9782261fc34a0403412b2df66045', + './include/SugarFields/Fields/Enum/SugarFieldEnum.php' => '6dadd7eb1e0a9d07981e22c177f70c82', './include/SugarFields/Fields/Enum/SearchView.tpl' => '0b28499163b68dd7d5830e72420234fd', - './include/SugarFields/Fields/Enum/EditViewFunction.tpl' => '12a4667e9b589c9f765ef85a5caa0a14', - './include/SugarFields/Fields/Enum/EditView.tpl' => 'be6dd8ebec706676b32f71807874426f', - './include/SugarFields/Fields/Enum/DetailViewFunction.tpl' => 'ac68398d2c03f5fd9efe88e63c09115e', - './include/SugarFields/Fields/Enum/DetailView.tpl' => '2202329800d7476db244306c357f8468', - './include/SugarFields/Fields/Download/SugarFieldDownload.php' => '779b5b9abfcae1a71934b838f5eb0799', - './include/SugarFields/Fields/Download/DetailView.tpl' => 'f6d2e5bc05d4918321f840c17e98bbdb', - './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => 'e8a30237305aaebef40a69e66f5510df', - './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => 'c4dae0f0f5f4e521ce03803e35817204', - './include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php' => '19177c0d55dae3f974cb4ad185061208', + './include/SugarFields/Fields/Enum/EditViewFunction.tpl' => '1f51faa160fe0191beba0b26a080bfc6', + './include/SugarFields/Fields/Enum/EditView.tpl' => 'acc16649c139b68afc91af5559e9478e', + './include/SugarFields/Fields/Enum/DetailViewFunction.tpl' => '424ee8062ffb12e2aa32f711268229bc', + './include/SugarFields/Fields/Enum/DetailView.tpl' => '8878df81e832fcf2dff321eaf71c20e7', + './include/SugarFields/Fields/Download/SugarFieldDownload.php' => '4808e73741a6f3f29e866cd18d2b95bf', + './include/SugarFields/Fields/Download/DetailView.tpl' => '82ef678d73b48369c2fbb01b3a912e02', + './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => 'ba6231e36655fb2c00929b565a875af8', + './include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php' => '9476f1723f373f8f7a4bdf542e167ec2', './include/SugarFields/Fields/Datetimecombo/SearchView.tpl' => '794430573ea1f10bc910017e977315dd', - './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => 'c07feccf3b23395688857fffd182071f', - './include/SugarFields/Fields/Datetime/SugarFieldDatetime.php' => '795d0c525855ab25231a428879234895', - './include/SugarFields/Fields/Datetime/EditView.tpl' => 'cecc4c2aedea1f00200956b4ce57c382', - './include/SugarFields/Fields/Currency/SugarFieldCurrency.php' => '29694b4b7e7c008b1176898b41603197', + './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => 'a19d05b65159f6c1166828a0593c41e8', + './include/SugarFields/Fields/Datetime/SugarFieldDatetime.php' => '8eac0ac355d7215f9f5ce70f2f26cc75', + './include/SugarFields/Fields/Datetime/EditView.tpl' => '1ba8a2dcea8857f5127643174ddc4312', + './include/SugarFields/Fields/Currency/SugarFieldCurrency.php' => '9ddef180cfa22302364f1c876c1d939a', './include/SugarFields/Fields/Currency/ListView.tpl' => 'fa4ab79b0660390d5fbf44f9d69ebea7', './include/SugarFields/Fields/Currency/EditView.tpl' => 'ec497a7ccc2665af341a4e0b4ba4d00d', - './include/SugarFields/Fields/Currency/DetailView.tpl' => '34e955ee65eb1b10d02b20213d934b61', + './include/SugarFields/Fields/Currency/DetailView.tpl' => '077e02ea442f28424ed046d7d2929940', './include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '60966b950f10e2f289473c33eb806ddb', './include/SugarFields/Fields/Collection/view.sugarfieldcollection.php' => 'f58f76131d63b8587d8344e43fe6a713', - './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => '799f44cc04c8f8c693c10c998bf47a83', - './include/SugarFields/Fields/Collection/SugarFieldCollection.php' => '445a08388c087f5c8346430087a76a3c', + './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => '48a714210310a707d38f6b984b14c35f', + './include/SugarFields/Fields/Collection/SugarFieldCollection.php' => '5790b292e456e1bd9fd4fa2f55fed042', './include/SugarFields/Fields/Collection/EditView.tpl' => '8be320b6638a81aeaf0dae3200eeee96', './include/SugarFields/Fields/Collection/DetailView.tpl' => '5847e6e86b00ce6911f5f0efbb143bd8', './include/SugarFields/Fields/Collection/CollectionEditViewRow.tpl' => '550c330e047e904e1681d403f0075c45', './include/SugarFields/Fields/Collection/CollectionEditView.tpl' => '92dbf9dccbead9ce2d506e87572e3a40', './include/SugarFields/Fields/Collection/CollectionDetailView.tpl' => '89e4fa568874dafc3b7c84bf98ad6b67', - './include/SugarFields/Fields/Bool/SugarFieldBool.php' => 'a218eca4959d94b5701a327d941c3714', + './include/SugarFields/Fields/Bool/SugarFieldBool.php' => 'e0bd8c6265a6c11c15558d40d5bc96cb', './include/SugarFields/Fields/Bool/SearchView.tpl' => '5ba5e1bec319cc466c2bf8c5c6f36bcd', - './include/SugarFields/Fields/Bool/ListView.tpl' => '2cf9cfe7f0224625a9db87a55c862066', + './include/SugarFields/Fields/Bool/ListView.tpl' => '3ff44e4497deff831519971a0224dbc4', './include/SugarFields/Fields/Bool/InlineEditView.tpl' => 'fc9ecf7e13414039acd38b619b3e5400', './include/SugarFields/Fields/Bool/InlineEdit.tpl' => '2c1e27debc2a992ca2f8a41ea01a0600', './include/SugarFields/Fields/Bool/EditView.tpl' => '20c4753b0534a3bdbc22ae54ba629301', - './include/SugarFields/Fields/Bool/DetailView.tpl' => 'a3b5e1308c6b998830711c3a7581bec1', + './include/SugarFields/Fields/Bool/DetailView.tpl' => 'd6940cbf2c9bb6edcbf496aef8d4d0a6', './include/SugarFields/Fields/Base/ImportViewFunction.tpl' => '3dcc32cf3cbf29446433bd3a807fa168', - './include/SugarFields/Fields/Base/SugarFieldBase.php' => 'cec1d8e7ac97a0095cdc22cb71ae8bce', + './include/SugarFields/Fields/Base/SugarFieldBase.php' => '1bceccc82f2fc464d1c8ccf3fd976150', './include/SugarFields/Fields/Base/SearchForm.tpl' => '5a526a4a1d48dcb1c53cd1bc725ee24b', './include/SugarFields/Fields/Base/ListView.tpl' => '23022cb491510574c46d3a985524d4f2', './include/SugarFields/Fields/Base/InlineEditView.tpl' => 'cad6ed8451a2f8bfe93a12c7a9e226ca', @@ -5067,22 +4981,21 @@ $md5_string = array ( './include/SugarFields/Fields/Base/EditViewFunction.tpl' => '3dcc32cf3cbf29446433bd3a807fa168', './include/SugarFields/Fields/Base/EditView.tpl' => 'f1c6961334f3242047b999020fabdb09', './include/SugarFields/Fields/Base/DetailViewFunction.tpl' => '424ee8062ffb12e2aa32f711268229bc', - './include/SugarFields/Fields/Base/DetailView.tpl' => 'fc7c2563d528bbbc328f60fd9e39e089', - './include/SugarFields/Fields/Assigned_user_name/EditViewFunction.tpl' => '69fca202aeeb72fd5617e20d560631c3', - './include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php' => 'b2ba2feaf8b1db87700965a6314cf656', + './include/SugarFields/Fields/Base/DetailView.tpl' => '8319aab7e6bc6058c642c7b6ccddaf45', + './include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php' => '990343c239f7d6618f4c7f1a45ed1a09', './include/SugarFields/Fields/Assigned_user_name/SearchView.tpl' => 'a98eb4befbdcb21fc499f0fa975f8a1a', './include/SugarFields/Fields/Address/SugarFieldAddress.js' => 'afd9583270e6a2eac3bf72c308f09183', './include/SugarFields/Fields/Address/en_us.EditView.tpl' => '6a840da6d8a18eb6d11393d73670932b', - './include/SugarFields/Fields/Address/en_us.DetailView.tpl' => '5bf7266e333859717d82eadb479f13b9', - './include/SugarFields/Fields/Address/SugarFieldAddress.php' => '6ae12612bffcfa91e88b72a17622ec36', + './include/SugarFields/Fields/Address/en_us.DetailView.tpl' => '93fc2a85607b4064fca0d4a4bda513c2', + './include/SugarFields/Fields/Address/SugarFieldAddress.php' => 'cfd8aa8be201419bd0395c52b5722778', './include/SugarFields/Fields/Address/EditView.tpl' => '6a840da6d8a18eb6d11393d73670932b', - './include/SugarFields/Fields/Address/DetailView.tpl' => 'cda7b5ebe9f6fdc86850509718024d8e', + './include/SugarFields/Fields/Address/DetailView.tpl' => '083b4db0bc67e9f92e295f8b2fdfd8f2', './include/SugarEmailAddress/SugarEmailAddress.js' => 'd7aa1b86fa26ed7d9d10d63d6d540270', './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => 'f553c5c7e78e1eac9f28d8193d000d1b', './include/SugarEmailAddress/templates/forEditView.tpl' => 'a017738db1cb591c8215e7e01c6f1c39', './include/SugarEmailAddress/templates/forDuplicatesView.tpl' => '09f861c23cd12077f050e3079af3d23f', - './include/SugarEmailAddress/templates/forDetailView.tpl' => 'c482472d715f94594f4c5b0dc1d46557', - './include/SugarEmailAddress/SugarEmailAddress.php' => 'bb09409a336736629f0fdc95ba3bcba1', + './include/SugarEmailAddress/templates/forDetailView.tpl' => 'b8bada2e77152a7cb89e6f503d42e202', + './include/SugarEmailAddress/SugarEmailAddress.php' => 'bb8630e02cf3f480bf78a59dc4b06f34', './include/SugarDependentDropdown/metadata/dependentDropdown.php' => 'ad07b642238039f6dd8b366019feca3c', './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => 'b5f8625205567f3d436ce7182375c881', './include/SugarDependentDropdown/SugarDependentDropdown.php' => 'ac4385687c68504d233e39a1c13b89ea', @@ -5094,33 +5007,19 @@ $md5_string = array ( './include/SugarCharts/swf/lineChart.swf' => 'e4b6eef95ff87f5e1b36cdfe74966ddd', './include/SugarCharts/swf/pieChart.swf' => 'c8a528dc470ac904864ea88549b3adc9', './include/SugarCharts/swf/stackedGroupByChart.swf' => '0d524ea04b2c56d1c7cdc86194f59ed1', - './include/SugarCharts/SugarChartFactory.php' => 'c12c6dddeeff4a0b91d2bd436c305e57', - './include/SugarCharts/JsChart.php' => 'a47703d7cebaed44448d0c11475411d1', - './include/SugarCharts/Jit/tpls/chart.tpl' => 'db663713468e49441f7fc6c0ccafab54', - './include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl' => '669af80b8d685e3a7184a54e0c0e3141', - './include/SugarCharts/Jit/js/mySugarCharts.js' => '365b6a9f00fd025442ed582dd7e9c557', - './include/SugarCharts/Jit/js/sugarCharts.js' => 'dc7b0776216db012d32e96d9b23d7745', - './include/SugarCharts/Jit/js/Jit/jit.js' => 'fcff6ed6bcecfc5f8a36a053089c33d3', - './include/SugarCharts/Jit/css/base.css' => '8ce4e603ad49e48925a013c9ad565e52', - './include/SugarCharts/Jit/JitReports.php' => 'a41d2f8c71fb1691c9af14590122fa2e', - './include/SugarCharts/Jit/Jit.php' => '3079c345047407c2d3ab746241927682', - './include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '71a23466955e17ab3094233fee8db708', - './include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => '8bc523ae2dce6eb2d191cbb561a218b5', - './include/SugarCharts/Jit/FlashCanvas/save.php' => 'b128689255043db993d1cc2f4bc484bc', - './include/SugarCharts/Jit/FlashCanvas/proxy.php' => '82ccbc7400b0bda3a33316920de41e60', - './include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf' => '528d82bb81799f23d4def3425badf913', - './include/SugarCharts/SugarChart.php' => 'aa23b4fac128341d6112ba185003a08a', - './include/SubPanel/SubPanelTiles.js' => 'ea6a4b3add603885bbe3100d62d36c40', + './include/SugarCharts/tpls/chart.tpl' => 'd181164aaf4353aca6fbe11af6965c6a', + './include/SugarCharts/SugarChart.php' => '0ba742633101c9394546ba43a6c88eb1', + './include/SubPanel/SubPanelTiles.js' => '0d570a02800c04d603e50981021aa0da', './include/SubPanel/tpls/singletabmenu.tpl' => '3070f73cc977481a36dbb69ad8f4e23a', './include/SubPanel/subpanels.txt' => '754316b019dc694b893e830ffe65f49d', './include/SubPanel/registered_layout_defs.php' => '6784a47eba53d5940d743958bfd1cef5', - './include/SubPanel/SugarTab.php' => 'b401ecf5483d99d56f12d1ff91edf97c', + './include/SubPanel/SugarTab.php' => '701fcb3468e7b2153f53c3da87eefea1', './include/SubPanel/SubPanelViewer.php' => '2ee30a85709d5abe7bc8e203721d5b68', './include/SubPanel/SubPanelTilesTabs.php' => '3a7a49c6dbcab329119c74aa96833ae9', './include/SubPanel/SubPanelTiles.php' => '174bac5837e8db811f8eb691c2dc1395', './include/SubPanel/SubPanelDynamic.html' => '73e24930846c23f2cedb379ce9053a5e', './include/SubPanel/SubPanelDefinitions.php' => 'b4e34f38b2c722ad4a143092da5cdc66', - './include/SubPanel/SubPanel.php' => '2eb2ebfb7b6dfd3b067a44d5be750a91', + './include/SubPanel/SubPanel.php' => 'e4d0d3aeede40a4f191d5ae20e912b0f', './include/Smarty/plugins/shared.make_timestamp.php' => '2d98e1b8ae60c93316d90bf152d3f5a5', './include/Smarty/plugins/shared.escape_special_chars.php' => '1a8d89273862e174b64f683d42feb198', './include/Smarty/plugins/outputfilter.trimwhitespace.php' => '25a2cdd916bf01bb8caa45a23fdf8d63', @@ -5140,7 +5039,7 @@ $md5_string = array ( './include/Smarty/plugins/modifier.indent.php' => 'ee36b10a3f19acbdd06a6bd9185e62ab', './include/Smarty/plugins/modifier.in_array.php' => 'f5aabe01841e76d205eec79f091ded5f', './include/Smarty/plugins/modifier.escape.php' => 'aae08c2908d653176d5cdcdae0a8cd97', - './include/Smarty/plugins/modifier.default_date_value.php' => '6c4f7433ed3982422e83736ac0e1fc50', + './include/Smarty/plugins/modifier.default_date_value.php' => '1b7cecc21e0c351fe7521bb8b0c60e80', './include/Smarty/plugins/modifier.default.php' => '0fe3023b34a89cb5f9168c558fc7cdaa', './include/Smarty/plugins/modifier.debug_print_var.php' => '681a55a868dbeb1fb6ebcd993be9ed40', './include/Smarty/plugins/modifier.date_format.php' => '779b980e5296f6e0814b26940c69afb8', @@ -5151,7 +5050,7 @@ $md5_string = array ( './include/Smarty/plugins/modifier.cat.php' => '0bdc246da1c7628c41296b51705ef4cf', './include/Smarty/plugins/modifier.capitalize.php' => 'b6bcbaf3b0c8770898148e483a223c7e', './include/Smarty/plugins/function.sugarvar_connector.php' => 'c84020dc3c970932cb3f4cc21ce10dfd', - './include/Smarty/plugins/function.sugarvar.php' => '5e7f2cf7aa362630648ce79689c643a9', + './include/Smarty/plugins/function.sugarvar.php' => '2327f2c07caf9e038b0b1239d4665689', './include/Smarty/plugins/function.sugar_variable_constructor.php' => '6561cdb5987f989d18090a4713c9a27a', './include/Smarty/plugins/function.sugar_translate.php' => 'b52ec4b3da8315a561df668fdfa82a1a', './include/Smarty/plugins/function.sugar_run_helper.php' => '2118a0bb279e18aae2b0fe9237e6ba6d', @@ -5172,7 +5071,7 @@ $md5_string = array ( './include/Smarty/plugins/function.sugar_currency_format.php' => '328379f1c05a4e8e60d640ce4fc8cb15', './include/Smarty/plugins/function.sugar_connector_display.php' => '266cbf9b85deea2b1aa7407ca46f069d', './include/Smarty/plugins/function.sugar_button_slider.php' => '6152ab8014fecf6fa1b6af75c28af497', - './include/Smarty/plugins/function.sugar_button.php' => '04e4e9f30503a9b62ba91c505c2620ca', + './include/Smarty/plugins/function.sugar_button.php' => '5f9eed2207d1c6fa60f14ce0b4c34e36', './include/Smarty/plugins/function.popup_init.php' => 'bbf08a63f3a1ae2679b324d23cfce520', './include/Smarty/plugins/function.popup.php' => 'cf231d09647d1b1cf0adf5904b66b6a6', './include/Smarty/plugins/function.overlib_includes.php' => 'a9ebdebac2bff90663da6090767b3f39', @@ -5181,7 +5080,7 @@ $md5_string = array ( './include/Smarty/plugins/function.mailto.php' => '5ba678549af1712ff9e64c244a8806c1', './include/Smarty/plugins/function.html_table.php' => '2931b5dd6b495a332f4074094f6c1534', './include/Smarty/plugins/function.html_select_time.php' => '780246c13ff291a61a80e69a12690e4a', - './include/Smarty/plugins/function.html_select_date.php' => 'ec3b1e591143de9dda0bf4c35bb6bf4c', + './include/Smarty/plugins/function.html_select_date.php' => 'aaada6e0f70368154e98197d5b1db2cc', './include/Smarty/plugins/function.html_radios.php' => 'dde3b081e27db52945838e1f52a24714', './include/Smarty/plugins/function.html_options.php' => 'a7903c34c86b166373946497fac2b7bb', './include/Smarty/plugins/function.html_image.php' => '06abba1563143b4b1190ca07d53b0a0d', @@ -5223,21 +5122,21 @@ $md5_string = array ( './include/Smarty/Smarty.class.php' => '44dbf7377bba64c38900cc56d6b0b5b7', './include/Smarty/README' => '1a3fe37eed420a020489d1082ea150c8', './include/Smarty/LICENSE' => '8c2e1ec1540fb3e0beb68361344cba7e', - './include/Smarty/Config_File.class.php' => '8852379ae39541f5e3355591ee0bfa03', + './include/Smarty/Config_File.class.php' => 'a3ba068dece64ff445542379e0d812d2', './include/Smarty/COPYING.lib' => '8c2e1ec1540fb3e0beb68361344cba7e', './include/SearchForm/tpls/header.tpl' => '66a8fd41e599af7cdaddbf5ec6ddc6e7', './include/SearchForm/tpls/footer.tpl' => '63029c5d9fb81f706b61e346fd237254', - './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '6c503de6635ffff0d7a3cf913add9a70', - './include/SearchForm/tpls/SearchFormGeneric.tpl' => 'f4cee5cd0a6f267f23d3b493fbc05c8f', - './include/SearchForm/SugarSpot.php' => '59b4acdf92ea5e88bdc62a9eda76aada', - './include/SearchForm/SearchForm2.php' => '566b757e9259eb6b33a7d5be61d293e2', + './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '297a8f97d9c31d8fdc7072aab5de81e5', + './include/SearchForm/tpls/SearchFormGeneric.tpl' => 'f6a33c900a2d164fa9130351f047a226', + './include/SearchForm/SugarSpot.php' => '7f1c636851c92665df06b9ceabe8f73d', + './include/SearchForm/SearchForm2.php' => '4c870d14ccc68874dfbcf8162ce937a2', './include/SearchForm/SearchForm.php' => '18fa71b0f4d20ec60fc9f907009a2dc3', './include/QuickSearchDefaults.php' => '674dd947d5a73cbb7f671dc0c70326ee', './include/Popups/tpls/header.tpl' => '100057ca98c7ac829a36cebd232c6bd3', './include/Popups/tpls/footer.tpl' => 'e973a29e7d29e9ab18a1c41bf6a0318e', - './include/Popups/tpls/PopupGeneric.tpl' => 'bfe6dcbb71e502382816288507264a62', + './include/Popups/tpls/PopupGeneric.tpl' => '3fdb74ac66582d40c6b34414eb7e422a', './include/Popups/Popup_picker.php' => '5778cbee0092c9812b687180ac9c3dcf', - './include/Popups/PopupSmarty.php' => '47845112dc6f4561a1b414b345a9cdf5', + './include/Popups/PopupSmarty.php' => '93c9c2b2a00f3c9f7de088c3325e2554', './include/Pear/XML_HTMLSax3/LICENSE' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/XML_HTMLSax3/HTMLSax3/States.php' => '5b528baa84631f85349a7183597d2fb3', './include/Pear/XML_HTMLSax3/HTMLSax3/Decorators.php' => '34a9a95566c891f013584073fbadaf7e', @@ -5247,503 +5146,154 @@ $md5_string = array ( './include/Pear/Crypt_Blowfish/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/Crypt_Blowfish/Blowfish/DefaultKey.php' => '8274b556662cc178342ea96940b36514', './include/Pear/Crypt_Blowfish/Blowfish.php' => 'b391980575340d0fe5bf2df72bc13932', - './include/OutboundEmail/OutboundEmail.php' => 'c502e2caaeaa94b514dd2a14f791745e', - './include/MySugar/tpls/retrieveReportCharts.tpl' => '72c137f9c8df056f8ec6ffaf01aa3bd6', + './include/OutboundEmail/OutboundEmail.php' => 'e84cbe1ebbcd8ac718dc48397772c7cf', + './include/MySugar/tpls/retrieveReportCharts.tpl' => '1e7c4ae7cebae3d1ce56a4cbfcb5686f', './include/MySugar/tpls/retrievePage.tpl' => 'aba0b602f74d0f8d420af10fdfd703be', - './include/MySugar/tpls/dashletsSearchResults.tpl' => '1f101a6547e7bd0653cc47fbcb5ac90a', - './include/MySugar/tpls/chartDashletsSearchResults.tpl' => '67fc336767e4e9048e4d59905257b443', + './include/MySugar/tpls/dashletsSearchResults.tpl' => 'ee66f9f318bd6769159f8cb342de3223', + './include/MySugar/tpls/chartDashletsSearchResults.tpl' => '6dc462c4dbe6ad75ee330cc0e8fc93a5', './include/MySugar/tpls/addDashletsDialog.tpl' => '7c87bb1474e1a740c12245c5396efc6f', - './include/MySugar/tpls/MySugar.tpl' => '931e27d4210d26221451f428119e43cd', - './include/MySugar/javascript/MySugar.js' => '78e42672503843e14f0c3195a558d87f', - './include/MySugar/MySugar.php' => 'eeaf9f743996136c20d8b666ecbd8994', - './include/MySugar/DashletsDialog/DashletsDialog.php' => 'e744aa3227983c1359009470bca4efd4', - './include/MassUpdate.php' => '40ff490a2fd6d983c14187bca22cdbea', + './include/MySugar/tpls/MySugar.tpl' => 'baf7033bd65e73fcc63d357541ebe3ac', + './include/MySugar/javascript/MySugar.js' => '95480bf96ab6fe08446e52b8c1236557', + './include/MySugar/MySugar.php' => '8db3f12d62d5827268dfe4a3b26226a8', + './include/MySugar/DashletsDialog/DashletsDialog.php' => '3725a75570ef02be822d74e31a6f1e7f', + './include/MassUpdate.php' => 'eb6468cc2d9737d6dd1a2d56cd3190f2', './include/MVC/View/views/view.xml.php' => '899ce32b620a040d2f04dd32bf32cd6d', - './include/MVC/View/views/view.vcard.php' => '3b04600e1920cef4e3d6b74e26c0e386', + './include/MVC/View/views/view.vcard.php' => 'f40aefcaf222ae87d5717603327a4ceb', './include/MVC/View/views/view.sugarpdf.php' => 'fffb5f92357ed83e618ccf726747443e', './include/MVC/View/views/view.sugarpdf.config.php' => 'f2e716a709d667779fae8f7339a41f8f', './include/MVC/View/views/view.serialized.php' => '419a311f5b59f154f53c683f56863a5f', - './include/MVC/View/views/view.quickcreate.php' => 'b130d5c1db8f57870ce01a33bdbe6664', + './include/MVC/View/views/view.quickcreate.php' => 'fab642619cdafe5c5203a595a1a20e55', './include/MVC/View/views/view.quick.php' => 'd9fb0ab43dc329674181db536fc738a3', './include/MVC/View/views/view.popup.php' => 'de27b3d994b115c78c34444e91c1854f', - './include/MVC/View/views/view.noaccess.php' => '97a35342d7a3eed867b1bdbaea229fcd', + './include/MVC/View/views/view.noaccess.php' => 'e50a68464bc808edb90b2a9fc8ec99fe', './include/MVC/View/views/view.multiedit.php' => '5e113a540d3bbac4d7329b1c6b808377', './include/MVC/View/views/view.modulelistmenu.php' => 'e903cb33f76f8e66c57ff218698a6a9b', - './include/MVC/View/views/view.list.php' => '3da830a3debfd98e6d0f46f8c463366a', + './include/MVC/View/views/view.list.php' => 'fafbf45cfbe248539e1f301d8457f997', './include/MVC/View/views/view.json.php' => '860bdf32d8d0c5e223f7d54c41ae017e', './include/MVC/View/views/view.importvcardsave.php' => '41068e4fead26d11306ed9de7f03a12b', - './include/MVC/View/views/view.importvcard.php' => '63a6f9060dd84fdd9970e34c31857b6f', + './include/MVC/View/views/view.importvcard.php' => '2274194b1f6fe4c6df0d80645652ac26', './include/MVC/View/views/view.html.php' => 'b0b55af897d4035b5fade1506d6d8db5', - './include/MVC/View/views/view.edit.php' => '0c3e2cf6a1d4da57feac747562bfcb76', + './include/MVC/View/views/view.edit.php' => 'aba694bfe0d8efce718fe5b7056b6607', './include/MVC/View/views/view.detail.php' => '8270e3714b50f262b5e6b71418655278', './include/MVC/View/views/view.config.php' => '3ed505354fa6e7c166ab25cd5244426d', - './include/MVC/View/views/view.classic.php' => 'f42a4229cbdc0234d839e0ea7f2b592d', + './include/MVC/View/views/view.classic.php' => 'c8b5b4a9876335a398d2c094f3070b14', './include/MVC/View/views/view.classic.config.php' => 'a24241005a762569f3a5b0e2c906b0cc', - './include/MVC/View/views/view.ajax.php' => 'e5efe32ce8532928396be74f1d2f39a3', - './include/MVC/View/tpls/xsrf.tpl' => '779535fac8004ae61d70a9fb2141e7df', - './include/MVC/View/tpls/modulelistmenu.tpl' => '30e9e17ede95641e61d081bdc55bbf1b', - './include/MVC/View/tpls/Importvcard.tpl' => '76a9b0c70a3b0a143ea483481a11458b', + './include/MVC/View/views/view.ajax.php' => '441889f9b32bcea2988e5848a930264b', + './include/MVC/View/tpls/modulelistmenu.tpl' => '970d74162fdb76e1530797aadf383bf0', + './include/MVC/View/tpls/Importvcard.tpl' => '92e01d24df92aa0f0884790a2b851bed', './include/MVC/View/ViewFactory.php' => 'c7ebee5efbeae00db163c01401ba28e8', - './include/MVC/View/SugarView.php' => '6f087797e1a4bc67abb8c17fcae9aac1', - './include/MVC/SugarModule.php' => '549e85c67ab4e6e4298976410b9fa0e4', - './include/MVC/SugarApplication.php' => 'a3309d3aa416fd21e33df4ab636929ae', + './include/MVC/View/SugarView.php' => '904d3aa05473b3fdfda7de362aad3071', + './include/MVC/SugarModule.php' => 'cc8fe8b2b0239c40d0b04abe12ab31cf', + './include/MVC/SugarApplication.php' => '0a1ab47fd5c8d0047a77ffbb6173a65f', './include/MVC/Controller/file_access_control_map.php' => 'e04c44c836810acfbc21c7ffb10f00d6', - './include/MVC/Controller/entry_point_registry.php' => '63da395b9079b223b4a921ee0d1af7c9', + './include/MVC/Controller/entry_point_registry.php' => 'e66983d43c99752a61da1aa1db9d7bad', './include/MVC/Controller/action_view_map.php' => 'f86f9461f69d408db31d4c726c53bc9e', './include/MVC/Controller/action_file_map.php' => '5a5579b9cee401b91d6d421cf6f95576', - './include/MVC/Controller/SugarController.php' => '4efe413ff1a79f05c2f8fa7782c610dc', + './include/MVC/Controller/SugarController.php' => '7e1934b5106f690529695d82a788efc1', './include/MVC/Controller/ControllerFactory.php' => '0df016a533ab996705d00d709c65c353', - './include/Localization/Localization.php' => '233e770470587ab67c7cf6a3fdffa9b3', - './include/ListView/ListViewDCMenu.tpl' => '2f65467af069a9497f43f09e020b797d', + './include/Localization/Localization.php' => '1ab3ed206c19eb04c815c2a2ae50ef05', './include/ListView/ListViewXTPL.php' => '1565e08d5508441d4fc6528e41dda507', - './include/ListView/ListViewSmarty.php' => '072e1dc0db96f0272ca30be6a96fb49e', + './include/ListView/ListViewSmarty.php' => 'b692d47d13906099305f50287f0d8eeb', './include/ListView/ListViewPagination.tpl' => 'bab0422f5ab27b8c37fd10cf45b5f910', './include/ListView/ListViewNoMassUpdate.tpl' => 'eed55b49e2b787d71106e4e54d30f45f', - './include/ListView/ListViewGeneric.tpl' => '9ffc51d5bb72ac1eb186dc4d9696b57c', + './include/ListView/ListViewGeneric.tpl' => '3754068a0f671ff29a8cafaa3cc0a9b0', './include/ListView/ListViewFacade.php' => '09ab474e08eb514a7fe506b6faa3abae', - './include/ListView/ListViewDisplay.php' => 'a814a93190a4442eeb8c78278608a218', - './include/ListView/ListViewData.php' => 'd3842252060a33a735401eb6476e8486', - './include/ListView/ListView.php' => '9f6e57223e08b58929c6b9899a87e700', - './include/JSON.php' => 'e5d193ad3ae6461e297797e204e99e46', + './include/ListView/ListViewDisplay.php' => 'a2db16a5eba82ab3281a8e75444acfcb', + './include/ListView/ListViewData.php' => '36876ea156812985f1155fcf439406e9', + './include/ListView/ListView.php' => '8baaa72b1b8c6fe24a82baedc8deadd0', + './include/JSON.php' => '1a8d53c6b92eb5886884a6fb923dbf38', './include/HTTP_WebDAV_Server/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/HTTP_WebDAV_Server/dav.txt' => 'c5235ed64efa685da638c6dcdb6a9708', './include/HTTP_WebDAV_Server/Tools/_parse_proppatch.php' => '70971e2e4a07137ef26d6f4777194a9c', './include/HTTP_WebDAV_Server/Tools/_parse_propfind.php' => 'a714317051491612e3d70d066e18b7b6', './include/HTTP_WebDAV_Server/Tools/_parse_lockinfo.php' => 'bf062d20864aa65ad832b96961b90b01', - './include/HTTP_WebDAV_Server/Server.php' => '85e6613006abbd02d316572254f9f97f', + './include/HTTP_WebDAV_Server/Server.php' => 'f5c657adf649d6895960d5fe6543b5fd', './include/HTTP_WebDAV_Server/README' => 'e6f0ca3d7e4fa2b20310995f269c3ef2', './include/GroupedTabs/GroupedTabStructure.php' => '40657e2a1b291caa5868b843bc683eec', - './include/EditView/header.tpl' => '13b6c6dcd13b71ea8e0f70b4cc544b09', - './include/EditView/footer.tpl' => 'ecd19cb2e11819d8fd4e6002da1e50a9', + './include/EditView/header.tpl' => '62787ac75c78d5ff7985a797410701ea', + './include/EditView/footer.tpl' => '508275297450c6b713b65f47f3081e08', './include/EditView/SugarVCR.php' => 'da2c12eea813bacc8d6f004e01fdad09', './include/EditView/SubpanelQuickCreate.php' => '12637ec7294ec293924c9bd8a4980d8b', './include/EditView/QuickCreate.tpl' => 'db1d0c687df9587bba18ed50015e7c00', './include/EditView/QuickCreate.php' => '785ea6d1ee8a781c3be2caa6ad8e6f18', './include/EditView/PopupQuickCreate.php' => '337f225f03fc21c831155bbaf984125a', - './include/EditView/EditView2.php' => 'dc8f8ab0999c20c65c3ef0c47f27c7d1', - './include/EditView/EditView.tpl' => '2414bcf1a7e7618a1ef5008ee4c9fca8', + './include/EditView/EditView2.php' => '6207e352a902542e1b6d8cc94785b03a', + './include/EditView/EditView.tpl' => '8ebc7bd2078a1b50dc20fb921ac768dd', './include/EditView/EditView.php' => '0c0e9448689883c371cca32397e79ec8', - './include/DetailView/header.tpl' => '09b011bb23a5b632218aeaf00ca03d0f', + './include/DetailView/header.tpl' => 'a17839af5202d9a1c01be1fd14943491', './include/DetailView/footer.tpl' => '3c66d5fab6cadba3277505554b234ae9', './include/DetailView/DetailView2.php' => '5438db41056ed8f5a6cb6828e2828818', - './include/DetailView/DetailView.tpl' => '87c2b8ef3017ce19626f750f4e49a0c9', + './include/DetailView/DetailView.tpl' => '62c81e196ee5f5b8e952d82bc0264763', './include/DetailView/DetailView.php' => 'edba64550e8750167aeca183f0917c52', - './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => 'cf058a5e3ebf1467326a8b6cac9d8394', - './include/Dashlets/DashletGenericDisplay.tpl' => '0789f0bfd1de579ce83bdf4895665056', - './include/Dashlets/DashletGenericConfigure.tpl' => 'e0b44a273303bed6eaee040a78762d2d', - './include/Dashlets/DashletGenericAutoRefresh.tpl' => '4fb7e5de13f7f786557453913973dad8', - './include/Dashlets/DashletGenericChartConfigure.tpl' => 'acc6b9ec91ce12ef66209851f924473c', - './include/Dashlets/DashletGenericChart.php' => 'c076507694384a248687e95224cf78fe', - './include/Dashlets/DashletGeneric.php' => '740d2e86717fd9769dc16b7554c785be', + './include/Dashlets/DashletGenericDisplay.tpl' => 'ccfcd0f798783f94fc3b9b13013d2061', + './include/Dashlets/DashletGenericConfigure.tpl' => '317bdd8bad0958f4c765823c3126c9bc', + './include/Dashlets/DashletGenericChartScript.tpl' => '0a6bcd800a8ae556b28c159ded632d1a', + './include/Dashlets/DashletGenericChartConfigure.tpl' => '0b17ec5eaeaad700892ba7b7dfec792f', + './include/Dashlets/DashletGenericChart.php' => '4258cf44134728192464379e3d756b03', + './include/Dashlets/DashletGeneric.php' => '41285b76d5df62e3573d10f65394c308', './include/Dashlets/DashletCacheBuilder.php' => '2450bc0178c619d93dfa457795a6fa31', - './include/Dashlets/Dashlet.php' => '4e97d5df8cdd4337913e1df1c7dc5977', + './include/Dashlets/Dashlet.php' => '56a29661401bc9d29836c4a3e4988e17', './image.php' => '9b23aefc874f7518e0f8c32c8ea53711', - './json_server.php' => '336652fc4e8c10c12889751f7fd64b3a', - './examples/SoapTestPortal2.php' => '1df38f1a9deb711ac020176352775ea8', + './jscalendar/calendar-setup_3.js' => 'f1d93f2a317bcab41c644db51d8439f8', + './jscalendar/calendar.js' => '148d801f09a0107deb8dc5bc04866152', + './jscalendar/menuarrow2.gif' => '1f8c673c8f76832febaeeac88a5f4353', + './jscalendar/menuarrow.gif' => 'b5a91d7a2755198b2eb729541ad3288c', + './jscalendar/license.txt' => 'a1eb59fdc7f0963feade867619a88ef2', + './jscalendar/lang/calendar-zh.js' => 'bf0554dec95a398f330f941795c2dc16', + './jscalendar/lang/calendar-tr.js' => '4f26da0c8959a1dc68f49a4c6da60b1b', + './jscalendar/lang/calendar-sv.js' => 'aaf935cffcc35a4528f818a3a07ed72e', + './jscalendar/lang/calendar-sp.js' => '27ac469017cebce7794313c8f32ba7f6', + './jscalendar/lang/calendar-sk.js' => 'd5796cc4101c1dec5b554fc9e0127803', + './jscalendar/lang/calendar-si.js' => 'da19a72dbc58cd74106136c5aef5bb4d', + './jscalendar/lang/calendar-ru.js' => '909dc190c7b0fe329e2603393c6779bb', + './jscalendar/lang/calendar-ro.js' => 'b29fefbfe3fd11caa40a9a82be7b6204', + './jscalendar/lang/calendar-pt.js' => '90e91a702a0c0f99d62acaa93670e869', + './jscalendar/lang/calendar-pl.js' => '5af1cc6832bc750706e8c06ac073b9ec', + './jscalendar/lang/calendar-pl-utf8.js' => '0bd95ba962e67841c8ed239a3df2d997', + './jscalendar/lang/calendar-no.js' => 'ccbab441f5fee37c200d9abe40d1255f', + './jscalendar/lang/calendar-nl.js' => 'c3fdd897e775b6ba7bbf5211237cd0bf', + './jscalendar/lang/calendar-lt.js' => '219ddd500ed21049afe38bd966ba9f17', + './jscalendar/lang/calendar-lt-utf8.js' => 'f0bf1897c54875c29fbf0c2fd2b1a5be', + './jscalendar/lang/calendar-ko.js' => '1be9407851b7839140f5277aa7b7fae7', + './jscalendar/lang/calendar-ko-utf8.js' => '39e8231f7bf5a6d1781deb70fd8e7fe8', + './jscalendar/lang/calendar-jp.js' => '3eaa9eb64bc928f8c4364319a0204959', + './jscalendar/lang/calendar-ja.js' => 'ef5e1d785b57e1e150beca96540e95ba', + './jscalendar/lang/calendar-it.js' => '7a4663a750ffcd81a0b17d6a2124364a', + './jscalendar/lang/calendar-hu.js' => 'a7c703a053a53b9e315313bf15c534bc', + './jscalendar/lang/calendar-hr.js' => '567465632e7302851f1ddc77be3e2ca9', + './jscalendar/lang/calendar-hr-utf8.js' => '0a632ebf18b40031ae7c9557a24852a5', + './jscalendar/lang/calendar-fr.js' => 'f60c78f5b964e73fee918e40f44d714a', + './jscalendar/lang/calendar-fi.js' => 'e7a287b17d4ba3dc5a632358ff5d914a', + './jscalendar/lang/calendar-es.js' => 'ea6595a64bcbf55f0b1520fe1a1e55af', + './jscalendar/lang/calendar-en.js' => 'fdbbbc911ebb911cb43db7098cf1649c', + './jscalendar/lang/calendar-el.js' => '947598b7481e533ac4c4465ba73721a1', + './jscalendar/lang/calendar-du.js' => 'e0d97e770e2c0f4022a884dc189c0f9c', + './jscalendar/lang/calendar-de.js' => '7c4a63e2db946fca37000886d79eefa2', + './jscalendar/lang/calendar-da.js' => '07bf90de5b986f72aa4f7e03aa6d607e', + './jscalendar/lang/calendar-cs-win.js' => '1d09a7ab540d7e5535793203c667730d', + './jscalendar/lang/calendar-ca.js' => 'c925aee68a819ea6dd0d3e4289dd3df3', + './jscalendar/lang/calendar-br.js' => 'e255943e1e229e7094f4678c3ea8bac9', + './jscalendar/lang/calendar-bg.js' => '845b886440564ca66a697beb4d33e49a', + './jscalendar/lang/calendar-af.js' => '329f4502104ac5e0f20b91a0cac91b91', + './jscalendar/img.gif' => 'c1e5255bd358fcd5a0779a0cc310a2fe', + './jscalendar/calendar-win2k-cold-1.css' => '54ef849188279f7e9e77461fadd87b02', + './json_server.php' => '2bab1d6a77c668efc56d0c1a4cf1cd99', + './examples/SoapTestPortal2.php' => '47f16aff36eb05fafa19985a43d2ecd4', './examples/SoapTestPortal.php' => '2d5550a7519f3ef62c445673df39077c', - './examples/SoapTest.php' => 'f026c807b4bdc6c0c4b177f82f5cbcd8', + './examples/SoapTest.php' => '0d88dd112cbb500dad0513ee9b40a5b1', './examples/ProgressBarTest.php' => 'eb3f978a9d71831cd893e79935867ea1', './examples/FormValidationTest.php' => 'a9369a5e1d04c7394ab652339abec6da', './examples/ExampleLeadCapture.php' => '5427510db86ff439c9345bd3673c7173', './examples/EXAMPLES_README.txt' => 'b55744b5e2684d91f6d3f98db4553673', './emailmandelivery.php' => 'c48b3d73c8359b341ce50b1963847944', - './download.php' => '3751125d0074b4ecb4ba8f0b3aa3f6d9', + './install.php' => '0aabe8ef297d36bcc57eb8269cc07e9a', './dictionary.php' => 'e4e8f9cad5a1e40989cfb246d5f8f99b', - './Zend/Version.php' => '7ed9dea03172b0f8fb11f085a17f100b', - './Zend/Validate/Ip.php' => '05326c26a0f419d8dac8c168f6cb7f12', - './Zend/Validate/Interface.php' => 'e4740491b21885d7439b9df6fd669288', - './Zend/Validate/Hostname/Jp.php' => '8edee6d942534ea8037ceb6f23640d5c', - './Zend/Validate/Hostname/Com.php' => '19562d7628ecd73ac147577b96eb8641', - './Zend/Validate/Hostname/Cn.php' => '326faf778c688e6bee5ce0fe006d46a9', - './Zend/Validate/Hostname/Biz.php' => 'ee5319555a6d9089848846b7dece3326', - './Zend/Validate/Hostname.php' => '6e2caae3fccade0947ef2f55fa1db12a', - './Zend/Validate/Abstract.php' => '0e617afaf441ae142ca03eea964e1afc', - './Zend/Uri/Http.php' => 'c7f0cddbf8f25abf27870f055f6a3233', - './Zend/Uri/Exception.php' => 'd887f44a926f35ceb936871537dc5ac8', - './Zend/Uri.php' => 'cde07c0e943c7cda721794d3df422f72', - './Zend/Registry.php' => '56b05bc37aa19203e114fe93782b33b0', - './Zend/Oauth/Token/Request.php' => 'affe7ec2aa5d5213c04faefd241658fe', - './Zend/Oauth/Token/AuthorizedRequest.php' => '89fbdd54439eb00ab07d6cdfee9c230e', - './Zend/Oauth/Token/Access.php' => '3f0660a492b66f94342ab3a0db44869d', - './Zend/Oauth/Token.php' => '66c75d877789a6c9f76fcb56eca8f69f', - './Zend/Oauth/Signature/SignatureAbstract.php' => 'd44f7c92c85ba7915a6774e78f426b1c', - './Zend/Oauth/Signature/Rsa.php' => '1c34a9f3ba22e92181fd20635bd165a0', - './Zend/Oauth/Signature/Plaintext.php' => '172f0dbf4ffed18d6aa136bbe752c4d2', - './Zend/Oauth/Signature/Hmac.php' => '7de78bcbd009391679c290259d4f0b7e', - './Zend/Oauth/Http/Utility.php' => 'b423ef547710255a45cac24c0f2212b6', - './Zend/Oauth/Http/UserAuthorization.php' => '19865a03744565805aedc37c211451b1', - './Zend/Oauth/Http/RequestToken.php' => 'a601ddf2a654043d45c8850970c3f81d', - './Zend/Oauth/Http/AccessToken.php' => '1d1fb8b5fa88827ea8170738cb44ddf0', - './Zend/Oauth/Http.php' => 'b71dc11811eb3b4ce48555c4ee836664', - './Zend/Oauth/Exception.php' => '8aa7149c933281a33beec3e6e29527ac', - './Zend/Oauth/Consumer.php' => 'a7e6bd2b6e40437980f8489790bc6a53', - './Zend/Oauth/Config/ConfigInterface.php' => '6830164ea9812294fc750da1337098f5', - './Zend/Oauth/Config.php' => '80ff096d8cec0c5bb7d1388a480c8803', - './Zend/Oauth/Client.php' => '45f14e23ad50d4d85b1656681d81d487', - './Zend/Oauth.php' => 'a194292fb9c2439c2909d2b0fe17a2bd', - './Zend/Loader.php' => '3a440481f38852f58a39b712ca87d1f9', - './Zend/Http/Response/Stream.php' => '83d96a23bada94448d56b7302916d4ef', - './Zend/Http/Response.php' => '0594b4e9572d27007e49442abe309918', - './Zend/Http/Exception.php' => '98f4737ee4d6b3de93fdf05a3fc7aa4c', - './Zend/Http/Client/Exception.php' => '30da2add08b4555e5fa1dc8c157ca37f', - './Zend/Http/Client/Adapter/Test.php' => 'e06773a4f74eac882c7f22c7f20761e5', - './Zend/Http/Client/Adapter/Stream.php' => '8d522d85b6bff060c9a10f9fd611ec0a', - './Zend/Http/Client/Adapter/Socket.php' => '6d6db9d986cfca0ce18d17c33cc612f6', - './Zend/Http/Client/Adapter/Proxy.php' => '892ba28ced3643b8ed5aca54f3896969', - './Zend/Http/Client/Adapter/Interface.php' => 'a0f8555e41c4679e3e0efc2822235e3a', - './Zend/Http/Client/Adapter/Exception.php' => '89c054ccc9f1db399d3b97051b146d0a', - './Zend/Http/Client/Adapter/Curl.php' => 'a0f409edfe1f0b0dffbf98709c846f19', - './Zend/Http/Client.php' => '0fdc1a5e0e0df69543f9aa98359d0fdc', - './Zend/Gdata/YouTube/VideoQuery.php' => 'd08f02e20e12871425d05490ef7bf634', - './Zend/Gdata/YouTube/VideoFeed.php' => '07eaed57637e2e490c1ff29f18c3af0a', - './Zend/Gdata/YouTube/VideoEntry.php' => '78db67e2d267168f00d82d23454532c3', - './Zend/Gdata/YouTube/UserProfileEntry.php' => '359456a0bed13649bf015ad24660e0a8', - './Zend/Gdata/YouTube/SubscriptionFeed.php' => '6ef548ff24d60cb264c7e38ac6fbaca7', - './Zend/Gdata/YouTube/SubscriptionEntry.php' => 'f4bf339e2ffad6815cabc42ec8981b73', - './Zend/Gdata/YouTube/PlaylistVideoFeed.php' => '3ebd122ccc2d3c6cb2fa97f2522aef0b', - './Zend/Gdata/YouTube/PlaylistVideoEntry.php' => 'd74666010c8a5d60950863bb6c1d9d50', - './Zend/Gdata/YouTube/PlaylistListFeed.php' => '3507e7a2c09dcb5ee8387cbee50da98a', - './Zend/Gdata/YouTube/PlaylistListEntry.php' => 'd8aa220766d77a83e916bfd0192f7364', - './Zend/Gdata/YouTube/MediaEntry.php' => '3478e5d65938b5ec5bdfc4382ebf89f3', - './Zend/Gdata/YouTube/InboxFeed.php' => '20eb4fa2025a9c9a98c5d3fa605f6cf0', - './Zend/Gdata/YouTube/InboxEntry.php' => 'dca5d2c467e84e7fb08dd7e43048e868', - './Zend/Gdata/YouTube/Extension/VideoId.php' => '5fa1f60078f30cff4216d4a9ff814f40', - './Zend/Gdata/YouTube/Extension/Username.php' => '982784449807f558d3eb733fdf805a68', - './Zend/Gdata/YouTube/Extension/Uploaded.php' => '36cdd75b4c5a2e999cca2136d11960ba', - './Zend/Gdata/YouTube/Extension/Token.php' => 'b8f0ea9931e09a2519cc365c257eab90', - './Zend/Gdata/YouTube/Extension/Status.php' => '1d0216cd5c04340148ea8c22a25a28c3', - './Zend/Gdata/YouTube/Extension/Statistics.php' => '50c584bdd099e939c711d1fd38204c2f', - './Zend/Gdata/YouTube/Extension/State.php' => '2f29a2e918dea080bce7b4947a5cf1a7', - './Zend/Gdata/YouTube/Extension/School.php' => '4307b603d94845f53259794be5dfc2ad', - './Zend/Gdata/YouTube/Extension/ReleaseDate.php' => '2f820ec0f859a4a758b15fa6db91032c', - './Zend/Gdata/YouTube/Extension/Relationship.php' => '0aad7884eadc0207c6c37c6d73195deb', - './Zend/Gdata/YouTube/Extension/Recorded.php' => '4fdcc93cbd4897396a7212471a121772', - './Zend/Gdata/YouTube/Extension/Racy.php' => '74ca091807a7e8817da850ddd7823950', - './Zend/Gdata/YouTube/Extension/QueryString.php' => 'ab0e180254036a30661bb2e13e796245', - './Zend/Gdata/YouTube/Extension/Private.php' => 'cae31d4bf0bcaf8a70881dd9cf8327d5', - './Zend/Gdata/YouTube/Extension/Position.php' => '85ddb29ec12e5712cf02e198e16213cf', - './Zend/Gdata/YouTube/Extension/PlaylistTitle.php' => 'c2d90679e77c0db14c3641b4feffd66b', - './Zend/Gdata/YouTube/Extension/PlaylistId.php' => '1d0f3a4a9c7409e0c9e48260d1733e19', - './Zend/Gdata/YouTube/Extension/Occupation.php' => '15d49f27af36ee458375d4e463dbd3e7', - './Zend/Gdata/YouTube/Extension/NoEmbed.php' => '474501835ffcef3db7ce66a3fc990dc4', - './Zend/Gdata/YouTube/Extension/Music.php' => '88fe6680609c5151603b0c440f3c0cf7', - './Zend/Gdata/YouTube/Extension/Movies.php' => '64d0579c0b8024d6ecfcff8715d104fc', - './Zend/Gdata/YouTube/Extension/MediaRating.php' => 'e521e0e474677af81229e53d26660085', - './Zend/Gdata/YouTube/Extension/MediaGroup.php' => '780666a1707fbc6f66131c567513ce0e', - './Zend/Gdata/YouTube/Extension/MediaCredit.php' => 'df56bc66783d7728e91733d21b30f1c2', - './Zend/Gdata/YouTube/Extension/MediaContent.php' => '418f1480bc0e1705c8aea34214346c63', - './Zend/Gdata/YouTube/Extension/Location.php' => '7f31e4011644e3f78462003005bcc128', - './Zend/Gdata/YouTube/Extension/Link.php' => 'e490e2123fa255a08403838cdbb1797f', - './Zend/Gdata/YouTube/Extension/LastName.php' => '38eb3a8a73940421ef5d96e0d9b00344', - './Zend/Gdata/YouTube/Extension/Hometown.php' => '1e45365d9ef59f0685d4951ff2c10008', - './Zend/Gdata/YouTube/Extension/Hobbies.php' => 'c4824a0ecf6c61ee08585e7eb31f7fd5', - './Zend/Gdata/YouTube/Extension/Gender.php' => '09f2ad8e233248a52c88dcc957bf6949', - './Zend/Gdata/YouTube/Extension/FirstName.php' => 'e4ee02e4af42fbdf362fcf1f484f6cef', - './Zend/Gdata/YouTube/Extension/Duration.php' => 'd3cd34eaad5bc28bc95e70f4997e8eed', - './Zend/Gdata/YouTube/Extension/Description.php' => '1efbfbc83319bf470112cebfc4b325da', - './Zend/Gdata/YouTube/Extension/CountHint.php' => '392b457b91e6deac12753af92a0972b1', - './Zend/Gdata/YouTube/Extension/Control.php' => '77805b2e407809fdedba6f9b817f0a57', - './Zend/Gdata/YouTube/Extension/Company.php' => '571ed8acf0f7e498442fefcdfb53607f', - './Zend/Gdata/YouTube/Extension/Books.php' => 'aa8cc7495b93762e1a5141568ca69d9a', - './Zend/Gdata/YouTube/Extension/Age.php' => '823d6b5a30800dfe8ff0e1ce911ad020', - './Zend/Gdata/YouTube/Extension/AboutMe.php' => 'c81b3f7b441c0cb22e57bd32fd37d1ae', - './Zend/Gdata/YouTube/ContactFeed.php' => 'd9df7a110f5f8c7929451f6f7db62eb7', - './Zend/Gdata/YouTube/ContactEntry.php' => 'e65c537e9246bef0bd33502c2b271b36', - './Zend/Gdata/YouTube/CommentFeed.php' => '2a7f5aa0b70e7c1ec9c0585f4101839e', - './Zend/Gdata/YouTube/CommentEntry.php' => '511706a609bfcaa3b9f6365f39decb8c', - './Zend/Gdata/YouTube/ActivityFeed.php' => '3cc4414f4a907b0b4215851041d7cd06', - './Zend/Gdata/YouTube/ActivityEntry.php' => '0b4ecdc019d7f5bc2202e197b8a52ef1', - './Zend/Gdata/YouTube.php' => '55c50f1e97915e71d8d074ec58545193', - './Zend/Gdata/Spreadsheets/WorksheetFeed.php' => 'c236e0a8fb83879d9cfc70c98bd94a79', - './Zend/Gdata/Spreadsheets/WorksheetEntry.php' => '28585b9947db42a3cebafa8305e35ec4', - './Zend/Gdata/Spreadsheets/SpreadsheetFeed.php' => '07edc2e2f0eba835e57d77c82b80adb4', - './Zend/Gdata/Spreadsheets/SpreadsheetEntry.php' => '0db99ce56cc1f60c4912701ea4b6bb44', - './Zend/Gdata/Spreadsheets/ListQuery.php' => '914b1eef2c6d215d95cd9d50c5888ea9', - './Zend/Gdata/Spreadsheets/ListFeed.php' => '7ca20a1f04afddbc182d4a9237720ee9', - './Zend/Gdata/Spreadsheets/ListEntry.php' => '453dd5c3a99a8b85af6983883cdd6331', - './Zend/Gdata/Spreadsheets/Extension/RowCount.php' => '7dd692b4c1078a5c816979898444c551', - './Zend/Gdata/Spreadsheets/Extension/Custom.php' => '2121726d40bef96d5cd6f63fccb9d442', - './Zend/Gdata/Spreadsheets/Extension/ColCount.php' => '5ee3185c11569d23a45e124da3b0187b', - './Zend/Gdata/Spreadsheets/Extension/Cell.php' => '0e1a402993243dbf103b663ae3a65b82', - './Zend/Gdata/Spreadsheets/DocumentQuery.php' => '6ecca6b1509d7c70c96abd5e5c9e84ae', - './Zend/Gdata/Spreadsheets/CellQuery.php' => '2f90c329430c3f7abd6b5e0bc38a489e', - './Zend/Gdata/Spreadsheets/CellFeed.php' => 'e1a2bfe06f4ce23ae9c165b5cd4fbd0f', - './Zend/Gdata/Spreadsheets/CellEntry.php' => '898b3bbeb5f37e933e084ca71e652282', - './Zend/Gdata/Spreadsheets.php' => 'd6987183f1b327ccc11c9613fef7e474', - './Zend/Gdata/Query.php' => 'e2757f1bc039f2aaeed8ad4e7e86722f', - './Zend/Gdata/Photos/UserQuery.php' => '38c69ef30c96b164332f65a331ee0547', - './Zend/Gdata/Photos/UserFeed.php' => '56fdfaed72ad83487b13c9a6724a4c89', - './Zend/Gdata/Photos/UserEntry.php' => '356163021b933a5fa4d5944705be9534', - './Zend/Gdata/Photos/TagEntry.php' => 'db7cc947d50fdecfcf2f61eec00da421', - './Zend/Gdata/Photos/PhotoQuery.php' => '6ad0e3dc10de7c3dca800b77356a77ba', - './Zend/Gdata/Photos/PhotoFeed.php' => 'bf98655deba36706cdd23061f7c9d5ce', - './Zend/Gdata/Photos/PhotoEntry.php' => '3912e922f088f379912993e97f536db7', - './Zend/Gdata/Photos/Extension/Width.php' => '577629fed6de78472df888e378079c7c', - './Zend/Gdata/Photos/Extension/Weight.php' => 'b492aec4b790d2cd4c0eae047c01ec8f', - './Zend/Gdata/Photos/Extension/Version.php' => 'e8913ab213d21e2e4dd24d825aa7e940', - './Zend/Gdata/Photos/Extension/User.php' => 'f165bf08593fee86f7e4717ebaec1b47', - './Zend/Gdata/Photos/Extension/Timestamp.php' => '75eb2c121fa06c129e5d28fbeaa2bec0', - './Zend/Gdata/Photos/Extension/Thumbnail.php' => '43fb1e62312f079d64c7baab2963cea5', - './Zend/Gdata/Photos/Extension/Size.php' => '2630ae3ec766e4474d965736082ebbad', - './Zend/Gdata/Photos/Extension/Rotation.php' => 'a68e0eaf62d7373b40e3134a6b9c5ea4', - './Zend/Gdata/Photos/Extension/QuotaLimit.php' => 'a320dae891db029e4886bdd06371b583', - './Zend/Gdata/Photos/Extension/QuotaCurrent.php' => '71be9182545794213360b44d31164e10', - './Zend/Gdata/Photos/Extension/Position.php' => 'eb5d326804d6934286494155f56a56ec', - './Zend/Gdata/Photos/Extension/PhotoId.php' => '0a1dca01961755747c4f7dfaf18001cf', - './Zend/Gdata/Photos/Extension/NumPhotosRemaining.php' => 'bca831419999d05e562380ab5bf896a0', - './Zend/Gdata/Photos/Extension/NumPhotos.php' => '6409e2ab85a661ec85ddc280323370f2', - './Zend/Gdata/Photos/Extension/Nickname.php' => 'b671bd7ac595645c7df32306dbb0724b', - './Zend/Gdata/Photos/Extension/Name.php' => '65b004def0d96e6df4dc98732d765c72', - './Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php' => '54c496b1aebfad69b0b6aa54072ff35f', - './Zend/Gdata/Photos/Extension/Location.php' => 'f796cf33da904ad63ce48bfd314e6899', - './Zend/Gdata/Photos/Extension/Id.php' => '361b94fd39a07c5b185b9fbd7ba41fb1', - './Zend/Gdata/Photos/Extension/Height.php' => 'd602dc7f176bd6a9d868af0d09bc2303', - './Zend/Gdata/Photos/Extension/CommentingEnabled.php' => '49165c783a798d688b41bbbcbe060124', - './Zend/Gdata/Photos/Extension/CommentCount.php' => '543d6e8ec2766eab5feead7b5a717c4f', - './Zend/Gdata/Photos/Extension/Client.php' => '89bf5e2b85b34d1658fc5f44cbd7231e', - './Zend/Gdata/Photos/Extension/Checksum.php' => 'fd7cd4114add2accc8c8739d4ad022b1', - './Zend/Gdata/Photos/Extension/BytesUsed.php' => '9b827f57b6df8b455edbece3f841ccd1', - './Zend/Gdata/Photos/Extension/AlbumId.php' => '165002b61b7b6e2cff7da3e071c77cba', - './Zend/Gdata/Photos/Extension/Access.php' => '4dcc5ef6fa65be6d7c90cb94ff7e8cef', - './Zend/Gdata/Photos/CommentEntry.php' => '3d6e4d837f802a70383d382a8e16c046', - './Zend/Gdata/Photos/AlbumQuery.php' => '46c69253e0c22851915671300cf76bfd', - './Zend/Gdata/Photos/AlbumFeed.php' => '8f923c1bfefdba885bf2a4e549f2ef2c', - './Zend/Gdata/Photos/AlbumEntry.php' => 'f357bde1a27fe69bf9f7d30ca404737e', - './Zend/Gdata/Photos.php' => '9ddecf3bc25e69715e48eda73ec50314', - './Zend/Gdata/MimeFile.php' => '7c590cfb35853728314b660496957cc8', - './Zend/Gdata/MimeBodyString.php' => '8cc543fe62bfee59fd60edfa1755f1de', - './Zend/Gdata/MediaMimeStream.php' => 'c43c413eec9556f1dd103b3279e7f1b0', - './Zend/Gdata/Media/Feed.php' => '5eff2741c0df2fa38192f356cd38a105', - './Zend/Gdata/Media/Extension/MediaTitle.php' => '22d2b650c4ac47eaf7d44d4c79303417', - './Zend/Gdata/Media/Extension/MediaThumbnail.php' => 'c6da2b5cb45fcef98045213bddacc19f', - './Zend/Gdata/Media/Extension/MediaText.php' => 'a532decd15211d332c740b5fb9f2cb86', - './Zend/Gdata/Media/Extension/MediaRestriction.php' => '5ca5d055a993c9d2a8d90798542d9b15', - './Zend/Gdata/Media/Extension/MediaRating.php' => 'c0379615ef7e105805513a106264f5bc', - './Zend/Gdata/Media/Extension/MediaPlayer.php' => 'f8a5d5cba705113cf3ebde25fe1d5501', - './Zend/Gdata/Media/Extension/MediaKeywords.php' => '4af6605e2a9d3097314197c6d7723ff2', - './Zend/Gdata/Media/Extension/MediaHash.php' => '6efe3050750396957b4c134297cec762', - './Zend/Gdata/Media/Extension/MediaGroup.php' => '5df9c900f8c20293ff9b480d07ad09e2', - './Zend/Gdata/Media/Extension/MediaDescription.php' => 'e2687081069be0d2540f4337d40c6361', - './Zend/Gdata/Media/Extension/MediaCredit.php' => '849a2d69e6c0911887faeedaa2a8fdde', - './Zend/Gdata/Media/Extension/MediaCopyright.php' => 'a188c2607b2ba47dd2806c9c8f2705d7', - './Zend/Gdata/Media/Extension/MediaContent.php' => '2d565a102eef2a2015f04a49cd01426e', - './Zend/Gdata/Media/Extension/MediaCategory.php' => '3d304d1f7556b320766a62d05d6c9cce', - './Zend/Gdata/Media/Entry.php' => '3b616e1f80cab56dfa3d70b5c0a5f0cc', - './Zend/Gdata/Media.php' => '01c1520ff214209bd33bbcbead394d64', - './Zend/Gdata/Kind/EventEntry.php' => 'a43630a2d2067d3b485cef550d42dc9f', - './Zend/Gdata/HttpClient.php' => '8fb2007caccb17a77dad778d8af0b60d', - './Zend/Gdata/HttpAdapterStreamingSocket.php' => '7bbd9ba33d8d6df39b51b14a8d3486a1', - './Zend/Gdata/HttpAdapterStreamingProxy.php' => '7affc3e70de3fff146d250317d2d9030', - './Zend/Gdata/Health/Query.php' => '17fabebdad3be441f8dac2b826fca3a4', - './Zend/Gdata/Health/ProfileListFeed.php' => '20ec77b8a95c063f04d5f06e40f4d31c', - './Zend/Gdata/Health/ProfileListEntry.php' => 'a0148f1cc9353b297de31f12b14fb498', - './Zend/Gdata/Health/ProfileFeed.php' => '740a08f3445dac331c2ccf8ad04761be', - './Zend/Gdata/Health/ProfileEntry.php' => '76e93dd6da4feede52a9e2f33b7a3f2c', - './Zend/Gdata/Health/Extension/Ccr.php' => '7820c80f6a5a596dffee19ad86adda4d', - './Zend/Gdata/Health.php' => 'b6ed0d0b12be634f972bab3b99942e74', - './Zend/Gdata/Geo/Feed.php' => 'beb9344c11b85ea47c8d88d5d426add6', - './Zend/Gdata/Geo/Extension/GmlPos.php' => 'a0ff7fdff628fbfc6356ee88d3caaf34', - './Zend/Gdata/Geo/Extension/GmlPoint.php' => '0097670a0c6795935dcd80aaede6192c', - './Zend/Gdata/Geo/Extension/GeoRssWhere.php' => '681591874d4ac36147d432024a036e1b', - './Zend/Gdata/Geo/Entry.php' => 'acaa2f05954dccd840b95a8c4029235b', - './Zend/Gdata/Geo.php' => '8ef08655344ff86003c62f23db98954d', - './Zend/Gdata/Gbase/SnippetQuery.php' => '1feca4717ee466378378931160afde51', - './Zend/Gdata/Gbase/SnippetFeed.php' => 'ffe624be953dea771db41282527cb58e', - './Zend/Gdata/Gbase/SnippetEntry.php' => '40a7196df3511ae3ce963d23bc709c6b', - './Zend/Gdata/Gbase/Query.php' => '80659494e0a9fcb6215b4c4596609d2f', - './Zend/Gdata/Gbase/ItemQuery.php' => 'dd4dc6f47df900fe97254590f7c2d89a', - './Zend/Gdata/Gbase/ItemFeed.php' => '4ec749d978812d02e4aa7ea39326d139', - './Zend/Gdata/Gbase/ItemEntry.php' => '9f2267926147400f176037cfa47250dc', - './Zend/Gdata/Gbase/Feed.php' => 'e56b61fefa051c5596dd107dee255ba5', - './Zend/Gdata/Gbase/Extension/BaseAttribute.php' => 'e621931c3a259452fea4edf13431bfd9', - './Zend/Gdata/Gbase/Entry.php' => '4f0fd497fa906d00230af75f10b22322', - './Zend/Gdata/Gbase.php' => 'b3ee9fb6647e020d710ef1b8fdb7247a', - './Zend/Gdata/Gapps/UserQuery.php' => '7cc7cedbf1261c718ec5e9efd2b8e209', - './Zend/Gdata/Gapps/UserFeed.php' => '910e7651d59bfcc32aaf8539c01aa11c', - './Zend/Gdata/Gapps/UserEntry.php' => 'd4c36359c0de3c0047887cd8e7cc467c', - './Zend/Gdata/Gapps/ServiceException.php' => '44bb02fd9c7ee600b2946d4872c48421', - './Zend/Gdata/Gapps/Query.php' => '5804bf0e612cccb95fd109dfbc8d990b', - './Zend/Gdata/Gapps/OwnerQuery.php' => '2e28da5f124ab4ccdda91cfd69ad65ae', - './Zend/Gdata/Gapps/OwnerFeed.php' => '3f73aa0690ecd2bea62d459a86ae6aee', - './Zend/Gdata/Gapps/OwnerEntry.php' => 'a283e5d08b9640b1e73634b9eac1242f', - './Zend/Gdata/Gapps/NicknameQuery.php' => 'da4a417afde13ce7c511df9faa3c136b', - './Zend/Gdata/Gapps/NicknameFeed.php' => '0ecac922acaff29cea48fdea3dfb29f3', - './Zend/Gdata/Gapps/NicknameEntry.php' => '381398d8b64c684845bd95f696d38216', - './Zend/Gdata/Gapps/MemberQuery.php' => '1655bca8880182513af9eb085de7b05a', - './Zend/Gdata/Gapps/MemberFeed.php' => 'f358e81473a4e695fce3cf6001863140', - './Zend/Gdata/Gapps/MemberEntry.php' => 'e8fd0a7f5a95697e21424df53c2e26f9', - './Zend/Gdata/Gapps/GroupQuery.php' => '86fce715639be938d9eaf926dd20bcfb', - './Zend/Gdata/Gapps/GroupFeed.php' => '2303a0202e5ccaaa9a9531cc5de3eac8', - './Zend/Gdata/Gapps/GroupEntry.php' => '71a9305f473ebd479141b498a3494866', - './Zend/Gdata/Gapps/Extension/Quota.php' => 'd82e3541bbf2d29033963d2c198ab817', - './Zend/Gdata/Gapps/Extension/Property.php' => 'ab9b1a604822fd2f50e7eb230e8227f5', - './Zend/Gdata/Gapps/Extension/Nickname.php' => 'e858a3eafc46e8ba51de5cbe123a5f6d', - './Zend/Gdata/Gapps/Extension/Name.php' => 'f172f52f0db4d0c153205c4e065ea4b2', - './Zend/Gdata/Gapps/Extension/Login.php' => 'ea5ef17c68ab4f008200c5ef1c9ba11c', - './Zend/Gdata/Gapps/Extension/EmailList.php' => '66888e850a10ddfa540b3cb383556337', - './Zend/Gdata/Gapps/Error.php' => 'c7a499123a8aac5ae674582de89409cd', - './Zend/Gdata/Gapps/EmailListRecipientQuery.php' => '4fe617162091b96284cf6b30d4f8d45c', - './Zend/Gdata/Gapps/EmailListRecipientFeed.php' => '054c494d29479aef7fc90ad72a18c148', - './Zend/Gdata/Gapps/EmailListRecipientEntry.php' => '81124d2cbc9bb158df22b9c60ed9abca', - './Zend/Gdata/Gapps/EmailListQuery.php' => '11727b5f93fd88982dccc9bffe990661', - './Zend/Gdata/Gapps/EmailListFeed.php' => '3a00eea9d8c256ccda9ed2de0c5a0f56', - './Zend/Gdata/Gapps/EmailListEntry.php' => '1bb495a41c2e871ff542d2ace03083af', - './Zend/Gdata/Gapps.php' => '344bad2ed2ad479a4f57fda1b7b28670', - './Zend/Gdata/Feed.php' => '84a86a1adb03cf41a52edfb2f1bbd1a9', - './Zend/Gdata/Extension/Who.php' => '68b82339fb38fbd24c46117035604a49', - './Zend/Gdata/Extension/Where.php' => '5e3d0267266d786b86a4eb2c3dc6a7be', - './Zend/Gdata/Extension/When.php' => 'a58d5c1d94f7c340d5c47d1f153c3ca1', - './Zend/Gdata/Extension/Visibility.php' => 'bfcbf78cb8720f7a8eede9897dd4e28d', - './Zend/Gdata/Extension/Transparency.php' => '55a3f7b531fbcd1b8fdf217eb24f4b77', - './Zend/Gdata/Extension/Reminder.php' => 'e17b2f4ee1e0b2c080e24d9c70f0f526', - './Zend/Gdata/Extension/RecurrenceException.php' => '2f229486b249a3ba034dc1922002433e', - './Zend/Gdata/Extension/Recurrence.php' => 'd3a85bd86f5761074d663f3404babce4', - './Zend/Gdata/Extension/Rating.php' => '402217d483bd62c029be175166b0e0f6', - './Zend/Gdata/Extension/OriginalEvent.php' => 'a35914d5d59f8f9286aa816aee6ce058', - './Zend/Gdata/Extension/OpenSearchTotalResults.php' => 'bd1fdeec1ad50db6930597f25ac00976', - './Zend/Gdata/Extension/OpenSearchStartIndex.php' => 'f537eb3df18a5a2cde301b3b1fe550f7', - './Zend/Gdata/Extension/OpenSearchItemsPerPage.php' => 'b2607a72db7ac52eb8384b517d63f132', - './Zend/Gdata/Extension/FeedLink.php' => '9228248336b8904d1d0466fdabeb54ec', - './Zend/Gdata/Extension/ExtendedProperty.php' => '58ceef287b114ab1dd6c8463026cc389', - './Zend/Gdata/Extension/EventStatus.php' => '63dd0b4dc1fd822b792d05c544f41381', - './Zend/Gdata/Extension/EntryLink.php' => '133d38758dc1aa4460f42c5f6429bd98', - './Zend/Gdata/Extension/Comments.php' => '5284e3c442faa4fd195d2f4e90e734ca', - './Zend/Gdata/Extension/AttendeeType.php' => 'b8d7be4de6154f63a908ff36f929d1fb', - './Zend/Gdata/Extension/AttendeeStatus.php' => '38ea8daff33ec27ace3e35bb3399aff9', - './Zend/Gdata/Extension.php' => 'f4983203262813c5b20be865cd651e60', - './Zend/Gdata/Exif/Feed.php' => '8f28a030312f17288dfa452b6535eea1', - './Zend/Gdata/Exif/Extension/Time.php' => '2fc3c0a61ad2774cd262dd2eb18925c0', - './Zend/Gdata/Exif/Extension/Tags.php' => 'fb41e356cf6d13e718df13308c4977a5', - './Zend/Gdata/Exif/Extension/Model.php' => 'e50b5c8c91f132a9688c04979a3a7f2a', - './Zend/Gdata/Exif/Extension/Make.php' => '6a73ecf5a9d9f457a1e2105d6becbe04', - './Zend/Gdata/Exif/Extension/Iso.php' => '27d57264785569ff25f27b56f0626d28', - './Zend/Gdata/Exif/Extension/ImageUniqueId.php' => '2d335e6f555dd161ad56b62cafd227a9', - './Zend/Gdata/Exif/Extension/FocalLength.php' => '37e01682a9ba61f4ed6d4f89482442d5', - './Zend/Gdata/Exif/Extension/Flash.php' => '47d698699c2a3b38367d40e2c921be7e', - './Zend/Gdata/Exif/Extension/FStop.php' => '4048127b24094f8510679c356fb4130b', - './Zend/Gdata/Exif/Extension/Exposure.php' => '17a221583b3d9295310a7105f381b14d', - './Zend/Gdata/Exif/Extension/Distance.php' => '508d9351f48a0c4b89657252970ed753', - './Zend/Gdata/Exif/Entry.php' => 'cf9064fd8345152c90c629a9be667f3c', - './Zend/Gdata/Exif.php' => '2307cff4532c815e782d61daab7ea160', - './Zend/Gdata/Entry.php' => '9ab68a7da9ab47a8c8ebe09377d7ca6e', - './Zend/Gdata/DublinCore/Extension/Title.php' => '4201ad4501a44390d7d20be6e73f55a0', - './Zend/Gdata/DublinCore/Extension/Subject.php' => 'e4e3c9fb6b276ac42a74459ff000b4e6', - './Zend/Gdata/DublinCore/Extension/Rights.php' => '154e444ee89f1a8b61dbb4574f81812f', - './Zend/Gdata/DublinCore/Extension/Publisher.php' => '7b5fbe6b6c8b10a85edd0cd7dbfe7615', - './Zend/Gdata/DublinCore/Extension/Language.php' => '68b69a28430e42a2f1939de30c54fd2d', - './Zend/Gdata/DublinCore/Extension/Identifier.php' => 'da25ea992cd4591161cf7dcb838f6b81', - './Zend/Gdata/DublinCore/Extension/Format.php' => 'f90e804a999bc7ea9de7528f20d7c6b2', - './Zend/Gdata/DublinCore/Extension/Description.php' => '2941724eb29ead9b97aa5d487a8d4a97', - './Zend/Gdata/DublinCore/Extension/Date.php' => 'f6a1f1f6de749607aefe748c0032f52f', - './Zend/Gdata/DublinCore/Extension/Creator.php' => 'd90628cbac0f51ebc078265b77ea2450', - './Zend/Gdata/DublinCore.php' => 'b0bac63dc1a6b8cdedf8eb0a614688c3', - './Zend/Gdata/Docs/Query.php' => 'd78e6e5d4921f901d42ee1470a0037be', - './Zend/Gdata/Docs/DocumentListFeed.php' => '0e1f8bd2edd405a2cc7338398ebc8193', - './Zend/Gdata/Docs/DocumentListEntry.php' => 'eca757a3e4835b698ca58ed561c62528', - './Zend/Gdata/Docs.php' => 'bf405da462f8af4c2b482e1c396df580', - './Zend/Gdata/ClientLogin.php' => '24f07d68ad16d4d76c3ac02b0a172179', - './Zend/Gdata/Calendar/ListFeed.php' => '689104be14f604a351305bd4f259534b', - './Zend/Gdata/Calendar/ListEntry.php' => 'a703e4f6997b1d2220ea7d8ca71bfeac', - './Zend/Gdata/Calendar/Extension/WebContent.php' => 'abc03a658fa837b5da4a16095ddc14be', - './Zend/Gdata/Calendar/Extension/Timezone.php' => 'c32233c244828a0a7700c535f48b42e8', - './Zend/Gdata/Calendar/Extension/SendEventNotifications.php' => '6016ad8af905ebf27c5362dc6aa3c101', - './Zend/Gdata/Calendar/Extension/Selected.php' => 'fb15731ec66ff7140a114a7338c68340', - './Zend/Gdata/Calendar/Extension/QuickAdd.php' => '7238895758792d2ac86e5f665a7ac948', - './Zend/Gdata/Calendar/Extension/Link.php' => '0537bbcc9a494a46e886807825ac4f54', - './Zend/Gdata/Calendar/Extension/Hidden.php' => '3d57e2ec1823f5d8dc40d330670c4b34', - './Zend/Gdata/Calendar/Extension/Color.php' => 'e5ed39bd28bfe0068afafae27053483d', - './Zend/Gdata/Calendar/Extension/AccessLevel.php' => '77d388464e13fa29d6f3458ee43df6c6', - './Zend/Gdata/Calendar/EventQuery.php' => '1b2d94211af1eb3f4d9564a10b26a133', - './Zend/Gdata/Calendar/EventFeed.php' => 'f19c9145cf905a1701dadb117a5dbf75', - './Zend/Gdata/Calendar/EventEntry.php' => '4bfdcba72023f25ca41fef5d91a75073', - './Zend/Gdata/Calendar.php' => '4f403359ac413aea1fc8f6a24a627abc', - './Zend/Gdata/Books/VolumeQuery.php' => 'b976b6765a2e6df2c309db22b5e76160', - './Zend/Gdata/Books/VolumeFeed.php' => 'b8ff187c65a5fe2bf5ce990c18e44da9', - './Zend/Gdata/Books/VolumeEntry.php' => '0f837082c8fa04eaa220a9a951430869', - './Zend/Gdata/Books/Extension/Viewability.php' => 'f70735b6816c819338289cd5bac08364', - './Zend/Gdata/Books/Extension/ThumbnailLink.php' => 'cacfc1c756c927ef1ddeb5d9045534e4', - './Zend/Gdata/Books/Extension/Review.php' => '27afeb43e74846d178909d0300db6735', - './Zend/Gdata/Books/Extension/PreviewLink.php' => 'a3ce28689c7a7918a3e5699dea2545f3', - './Zend/Gdata/Books/Extension/InfoLink.php' => 'f87cad2a8305227311a44158f06c93f7', - './Zend/Gdata/Books/Extension/Embeddability.php' => '8b23184acfcf1d95e3eb35f7ae319c82', - './Zend/Gdata/Books/Extension/BooksLink.php' => '615384af3b31d3b54e3088e0d7ce4fe5', - './Zend/Gdata/Books/Extension/BooksCategory.php' => '1be9d61273496693c7c2b082184f0812', - './Zend/Gdata/Books/Extension/AnnotationLink.php' => '82f10d58503d6efac755aaebbe89e6e2', - './Zend/Gdata/Books/CollectionFeed.php' => '06ba2427be03e2b6ffddecde3abc1f19', - './Zend/Gdata/Books/CollectionEntry.php' => '62d3b17fce4c075fe1fbe88e8b85cab3', - './Zend/Gdata/Books.php' => '19e28ddea7b1e4e528783f72f160d9f3', - './Zend/Gdata/AuthSub.php' => '10bc8d63c7d29afea2a64816ef40be42', - './Zend/Gdata/App/VersionException.php' => 'f79b340a6e76df8235e8936cf1f6dea8', - './Zend/Gdata/App/Util.php' => '4f0103d76da6c1df3b5446d1d4cab1aa', - './Zend/Gdata/App/MediaSource.php' => 'd66435bd23f29c74d16a97ef7bd3c237', - './Zend/Gdata/App/MediaFileSource.php' => '228605cfbe7bd1a56ce499948cffc44f', - './Zend/Gdata/App/MediaEntry.php' => 'e604853b65b83ff22b67aa42333b1470', - './Zend/Gdata/App/LoggingHttpClientAdapterSocket.php' => '80a5cfc9e2d5228d34a83728589c375c', - './Zend/Gdata/App/InvalidArgumentException.php' => '7d25d4e28c5716d5a623f69e3f34f1d5', - './Zend/Gdata/App/IOException.php' => 'a7c6b306054e4393868b4c3abfee4cb3', - './Zend/Gdata/App/HttpException.php' => '6eaf643eed81a95a0185f09597ab598c', - './Zend/Gdata/App/FeedSourceParent.php' => '4b2310f917e8942d5f6ab6322a7980b6', - './Zend/Gdata/App/FeedEntryParent.php' => 'ee305afd397993b2668272e75aa20609', - './Zend/Gdata/App/Feed.php' => 'dd719b4feb53568fdad80ccef14d557d', - './Zend/Gdata/App/Extension/Uri.php' => '493b2a3364cbf5ebe297a548b6f3a0a5', - './Zend/Gdata/App/Extension/Updated.php' => '3f4da2bf87a0c81b7c9f12656e6c1c37', - './Zend/Gdata/App/Extension/Title.php' => '48de3c92ebb8e5fbf923ea43ae0a748f', - './Zend/Gdata/App/Extension/Text.php' => 'c6b9d3a8870ed4540a133455fcd43be6', - './Zend/Gdata/App/Extension/Summary.php' => '1c5fdc5ace6f74e7e8d8d5ade87a695f', - './Zend/Gdata/App/Extension/Subtitle.php' => 'e3e62bb19d1d5ca2a854234a7ff3f8bc', - './Zend/Gdata/App/Extension/Source.php' => 'c0552deee4ae8ec73cfb237d759999ad', - './Zend/Gdata/App/Extension/Rights.php' => 'c623ecc998bbed7e7c52571b37a27c3c', - './Zend/Gdata/App/Extension/Published.php' => 'c2c0fa40b7c7e9c858bf978edd5a0381', - './Zend/Gdata/App/Extension/Person.php' => '4958e01b770f9238e38863b887c0ed77', - './Zend/Gdata/App/Extension/Name.php' => '7d03477dbe90f4484e5477b690a3320f', - './Zend/Gdata/App/Extension/Logo.php' => '3433509934553948b86bda803ee38c99', - './Zend/Gdata/App/Extension/Link.php' => '16a58f5e61a5cc943ec03115c7fc739b', - './Zend/Gdata/App/Extension/Id.php' => 'b5bc2ae8e3e0a762fcb353ea3437ef4e', - './Zend/Gdata/App/Extension/Icon.php' => '231765bce9ed753dce83c97c5cc3944c', - './Zend/Gdata/App/Extension/Generator.php' => '9b1965c558067f31358616766de1aa00', - './Zend/Gdata/App/Extension/Email.php' => '6af7122bfdf49aea8b261a81cae56e05', - './Zend/Gdata/App/Extension/Element.php' => 'e985283b1b696bfb0d326f08fd19d8ad', - './Zend/Gdata/App/Extension/Edited.php' => '330aa08d5ca463aa359af76e5f5b17fa', - './Zend/Gdata/App/Extension/Draft.php' => '99ebe71f8b8b3fd840a181a24c08ae60', - './Zend/Gdata/App/Extension/Control.php' => 'be358f494629721b7c2d3f34d619bdb6', - './Zend/Gdata/App/Extension/Contributor.php' => '52b7be7179f68bd41e8033c7c61de368', - './Zend/Gdata/App/Extension/Content.php' => 'dc5f2ed1b1471d8bf26a4a3a083c2e9e', - './Zend/Gdata/App/Extension/Category.php' => 'e799a0a6548ddfefa0cc14f7c8ff8d1c', - './Zend/Gdata/App/Extension/Author.php' => 'd565809e5cd9f16f4b27c5384d8c5dfb', - './Zend/Gdata/App/Extension.php' => '8e4d504243e904fb21896e5aaa41e986', - './Zend/Gdata/App/Exception.php' => '83d110552e64d66b3e658f53011d1dfe', - './Zend/Gdata/App/Entry.php' => '133cf11a6726a895c2a570b51aeeeab4', - './Zend/Gdata/App/CaptchaRequiredException.php' => '654404b4361bcefcaacb2895199c3ce6', - './Zend/Gdata/App/BaseMediaSource.php' => 'f03d9750e70786156510a6bbf035e50d', - './Zend/Gdata/App/Base.php' => '0812ad5e71d4da23e6dac0b174d72dac', - './Zend/Gdata/App/BadMethodCallException.php' => '7d6e59e67eddf8e29065a07bfafbfbb1', - './Zend/Gdata/App/AuthException.php' => 'b71068b440931bf94ce5c8a1bc1c0963', - './Zend/Gdata/App.php' => '040846a1bbf23b95286b6ce6d92f11e8', - './Zend/Gdata.php' => 'c3979fa5ca85014295e6f78333ade8b4', - './Zend/Exception.php' => '55ee8977abba3e9c8c56937432434c4c', - './Zend/Crypt/Rsa/Key/Public.php' => 'bab2f532d07354d76d66ea559ce8cf91', - './Zend/Crypt/Rsa/Key/Private.php' => 'fa5a88c09c54728381b80ab7f2d1f515', - './Zend/Crypt/Rsa/Key.php' => '74438b6cecba7b323f86817c06bbd5e9', - './Zend/Crypt/Rsa.php' => 'c1b32cc26f5a09dccfae97c4b8a4aab0', - './Zend/Crypt/Math/Exception.php' => 'fa1df64deb5a50dba4b2291087ce73c4', - './Zend/Crypt/Math/BigInteger/Interface.php' => 'ddfb6e640c5e8e70c0145265c6766827', - './Zend/Crypt/Math/BigInteger/Gmp.php' => '961c30bc8a8a1fa5c0639bae35c96c8b', - './Zend/Crypt/Math/BigInteger/Exception.php' => '2abd4617fbef3a5707d674395aa54f17', - './Zend/Crypt/Math/BigInteger/Bcmath.php' => '711aca90da8cb203310549c16a40569a', - './Zend/Crypt/Math/BigInteger.php' => '4e83a33b019afde2b3f465078da98ae1', - './Zend/Crypt/Math.php' => '34803bb199f584d0ddb40c6b10c6926d', - './Zend/Crypt/Hmac/Exception.php' => '0f5e7197d44598e88b0f3c4bc76ce548', - './Zend/Crypt/Hmac.php' => '263965ebc65320101b7b812674d27c35', - './Zend/Crypt/Exception.php' => '1259690d0861934b9aec872583cb77b4', - './Zend/Crypt/DiffieHellman/Exception.php' => '767330f408c58b089aa082d990b73099', - './Zend/Crypt/DiffieHellman.php' => 'ec0a4f522b732f7fcbb9c4ab94d926e1', - './Zend/Crypt.php' => '0e72fd104506094fd2c7682b0b924542', - './install.php' => '53a5f32608389deae7fb6d57b552b39e', - './export.php' => '4d3cf3590901a87b525fd340238e7556', + './export.php' => '065ad70485a6c090cb72c65a9a3568c4', + './download.php' => 'c317f1bac5d59bd281c6e5c14751a5fd', './data/upload/index.html' => '9cd784063d39b18d308932c28c385853', './data/Tracker.php' => '29c14ab7333e8d37a7ff77fe42b516bd', - './data/SugarBean.php' => '7fb508b71a67ee4f25b80dc4502e84b5', - './data/Link.php' => '06d9fa82aa3f1f4d2a3ab563174dab60', + './data/SugarBean.php' => 'd2c806ad84d85a561d433d6c0efa2430', + './data/Link.php' => '2a8ceda7d409ac0e0580259e0c92505d', './custom/index.html' => 'b0070a296647b6026d1800db14510e3c', './cron.php' => 'a8ad27b49bafc80799a504760c007bdd', './campaign_trackerv2.php' => 'e1420743b082e8191b7e231db0810d0e', @@ -5763,19 +5313,19 @@ $md5_string = array ( './WebToLeadCapture.php' => 'e78cc96ab80dad03479a72eb439e60b5', './TreeData.php' => '93ba2c53f2781017b5b0f2f962c398f4', './SugarSecurity.php' => '4d8d0d7caf9aa942ff0f7ab61b8bfaae', - './ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl' => '1a32055544e7142252c7335e3e10d60f', + './ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl' => 'ae7f452bd7379b69cae1438cd842b12b', './ModuleInstall/PackageManager/tpls/PackageManagerLicense.tpl' => '89219bcdad610f475111c9d19c524df7', './ModuleInstall/PackageManager/tpls/PackageForm.tpl' => '6a286fef17f4ad90cce0aaca456e47d2', './ModuleInstall/PackageManager/tpls/ModuleLoaderListView.tpl' => '89644c510ea26bc19a338a9039fd14c5', './ModuleInstall/PackageManager/metadata/listviewdefs.php' => 'e5a304b0e3f59b9655fee84251f859ad', './ModuleInstall/PackageManager/PackageManagerDownloader.php' => '4b7278a48d4f5924ccab01fa79244e22', - './ModuleInstall/PackageManager/PackageManagerDisplay.php' => '26df5fc37509ae7a4fe28b1f424096c6', + './ModuleInstall/PackageManager/PackageManagerDisplay.php' => '93b924429334f29e194a1a8a12fdc0a8', './ModuleInstall/PackageManager/PackageManagerComm.php' => 'd9e4d2d8af57cc28fa6e57cf01eb1e68', - './ModuleInstall/PackageManager/PackageManager.php' => 'a47fe97c2797785e179b781744a3ed92', + './ModuleInstall/PackageManager/PackageManager.php' => 'ec3d9abe813278ba4c01a0d18151fd18', './ModuleInstall/PackageManager/PackageController.php' => '5a41f4e7bb19d5585e4b694be0691bed', './ModuleInstall/PackageManager/ListViewPackages.php' => '9cb9a457724974797f68f6e5bd094842', './ModuleInstall/ModuleScanner.php' => '533ad4511f2d9d521cb30ac7c10c48f1', - './ModuleInstall/ModuleInstaller.php' => '3445fef26e0ea0d86f0b93e97bf6ec26', + './ModuleInstall/ModuleInstaller.php' => 'cf6bfa920741cc12c9640ad0fd317fed', './HandleAjaxCall.php' => '7c97cd2c9be97a8fd845fe4706a65f1c', ); ?> diff --git a/include/Dashlets/Dashlet.php b/include/Dashlets/Dashlet.php index 0032b6d8..b7ed5747 100644 --- a/include/Dashlets/Dashlet.php +++ b/include/Dashlets/Dashlet.php @@ -35,11 +35,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -require_once('include/Sugar_Smarty.php'); -require_once('include/utils/layout_utils.php'); -class Dashlet -{ +class Dashlet { /** * Id of the Dashlet * @var guid @@ -70,90 +67,51 @@ class Dashlet * @var array */ var $dashletStrings; - /** - * Time period in minutes to refresh the dashlet (0 for never) - * Do not refresh if $isRefreshable is set to false - * - * To support auto refresh all refreshable dashlets that override process() must call processAutoRefresh() - * @var int - */ - var $autoRefresh = "0"; - /** - * Constructor - * - * @param $id - */ - public function Dashlet($id) - { + function Dashlet($id) { $this->id = $id; } - /** - * Returns the HTML for the configure icon - * - * @return string HTML - */ - public function setConfigureIcon() - { - if($this->isConfigurable) { - $additionalTitle = '
' . SugarThemeRegistry::current()->getImage('dashlet-header-edit','title="' . translate('LBL_DASHLET_EDIT', 'Home') . '" alt="' . translate('LBL_DASHLET_EDIT', 'Home') . '" border="0" align="absmiddle"').'' . ''; - } - else { + else $additionalTitle = '
'; - } return $additionalTitle; } - /** - * Returns the HTML for the refresh icon - * - * @return string HTML - */ - public function setRefreshIcon() - { + function setRefreshIcon(){ + + $additionalTitle = ''; - if($this->isRefreshable) { - $additionalTitle .= '' . SugarThemeRegistry::current()->getImage('dashlet-header-refresh','border="0" align="absmiddle" title="' . translate('LBL_DASHLET_REFRESH', 'Home') . '" alt="' . translate('LBL_DASHLET_REFRESH', 'Home') . '"') . ''; - } - return $additionalTitle; } - /** - * Returns the HTML for the delete icon - * - * @return string HTML - */ - public function setDeleteIcon() - { - global $sugar_config; - - if (!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) { + function setDeleteIcon(){ + global $image_path, $sugar_config, $current_user; + if (!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) return '
'; - } - $additionalTitle = '' . SugarThemeRegistry::current()->getImage('dashlet-header-close','border="0" align="absmiddle" title="' . translate('LBL_DASHLET_DELETE', 'Home') . '" alt="' . translate('LBL_DASHLET_DELETE', 'Home') . '"') . '
'; return $additionalTitle; } - /** - * @deprecated No longer needed, replaced with Dashlet::getHeader() and Dashlet::getFooter() - * - * @param string $text - * @return string HTML - */ - public function getTitle($text = '') - { + // No longer needed, replaced with getHeader/getFooter + function getTitle($text = '') { return ''; } @@ -163,17 +121,21 @@ class Dashlet * @param string $text text after the title * @return string Header html */ - public function getHeader($text = '') - { - global $sugar_config; + function getHeader($text = '') { + global $app_strings, $sugar_config; $title = ''; $title .= $this->setConfigureIcon(); $title .= $this->setRefreshIcon(); $title .= $this->setDeleteIcon(); + if(!function_exists('get_form_header')) { + global $theme; + + } + $str = '
id . '" class="hd">
' . get_form_header($this->title, $title, false) . '
'; return $str; @@ -182,12 +144,13 @@ class Dashlet /** * Called when Dashlet is displayed * - * @return string footer HTML + * @param string $text text after the title + * @return string footer html */ - public function getFooter() - { + function getFooter($text = '') { + //$footer = '
'; + $footer = '
'; - return $footer; } @@ -195,68 +158,27 @@ class Dashlet * Called when Dashlet is displayed, override this * * @param string $text text after the title - * @return string title HTML + * @return string title html */ - public function display($text = '') - { + function display($text = '') { return ''; } /** * Called when Dashlets configuration options are called + * */ - public function displayOptions() - { + function displayOptions() { } /** - * Override if you need to do pre-processing before display is called + * override if you need to do pre-processing before display is called + * */ - public function process() - { + function process() { } - /** - * Processes and displays the auto refresh code for the dashlet - * - * @param int $dashletOffset - * @return string HTML code - */ - protected function processAutoRefresh($dashletOffset = 0) - { - global $sugar_config; - - if ( empty($dashletOffset) ) { - $dashletOffset = 0; - $module = $_REQUEST['module']; - if(isset($_REQUEST[$module.'2_'.strtoupper($this->seedBean->object_name).'_offset'])) { - $dashletOffset = $_REQUEST[$module.'2_'.strtoupper($this->seedBean->object_name).'_offset']; - } - } - - if ( !$this->isRefreshable ) { - return ''; - } - if ( !empty($sugar_config['dashlet_auto_refresh_min']) && $sugar_config['dashlet_auto_refresh_min'] == -1 ) { - return ''; - } - $autoRefreshSS = new Sugar_Smarty(); - $autoRefreshSS->assign('dashletOffset', $dashletOffset); - $autoRefreshSS->assign('dashletId', $this->id); - $autoRefreshSS->assign('strippedDashletId', str_replace("-","",$this->id)); //javascript doesn't like "-" in function names - if ( empty($this->autoRefresh) ) { - $this->autoRefresh = 0; - } - elseif ( !empty($sugar_config['dashlet_auto_refresh_min']) ) { - $this->autoRefresh = min($sugar_config['dashlet_auto_refresh_min'],$this->autoRefresh); - } - $autoRefreshSS->assign('dashletRefreshInterval', $this->autoRefresh * 1000); - $tpl = 'include/Dashlets/DashletGenericAutoRefresh.tpl'; - if ( $_REQUEST['action'] == "DynamicAction" ) { - $tpl = 'include/Dashlets/DashletGenericAutoRefreshDynamic.tpl'; - } - - return $autoRefreshSS->fetch($tpl); + function save() { } /** @@ -264,20 +186,19 @@ class Dashlet * Filters the array for only the parameters it needs to save * * @param array $req the array to pull options from + * * @return array options array */ - public function saveOptions($req) - { + function saveOptions($req) { } /** * Sets the language strings * * @param string $dashletClassname classname of the dashlet - * @param string $dashletDirectory directory path of the dashlet + * */ - public function loadLanguage($dashletClassname, $dashletDirectory = 'modules/Home/Dashlets/') - { + function loadLanguage($dashletClassname, $dashletDirectory = 'modules/Home/Dashlets/') { global $current_language, $dashletStrings; if(!isset($dashletStrings[$dashletClassname])) { @@ -309,10 +230,8 @@ class Dashlet * * @param array $optionsArray the array to save */ - public function storeOptions($optionsArray) - { + function storeOptions($optionsArray) { global $current_user; - $dashletDefs = $current_user->getPreference('dashlets', 'Home'); // load user's dashlets config $dashletDefs[$this->id]['options'] = $optionsArray; $current_user->setPreference('dashlets', $dashletDefs, 0, 'Home'); @@ -323,10 +242,8 @@ class Dashlet * * @return array options array stored in UserPreferences */ - public function loadOptions() - { + function loadOptions() { global $current_user; - $dashletDefs = $current_user->getPreference('dashlets', 'Home'); // load user's dashlets config if(isset($dashletDefs[$this->id]['options'])) return $dashletDefs[$this->id]['options']; @@ -339,40 +256,8 @@ class Dashlet * * @return bool indicating whether or not the current user has access to display this Dashlet. */ - public function hasAccess() - { + function hasAccess(){ return true; } - - /** - * Returns the available auto refresh settings you can set a dashlet to - * - * @return array options available - */ - protected function getAutoRefreshOptions() - { - $options = $GLOBALS['app_list_strings']['dashlet_auto_refresh_options']; - - if ( isset($GLOBALS['sugar_config']['dashlet_auto_refresh_min']) ) { - foreach ( $options as $time => $desc ) { - if ( $time != -1 && $time < $GLOBALS['sugar_config']['dashlet_auto_refresh_min'] ) { - unset($options[$time]); - } - } - } - - return $options; - } - - /** - * Returns true if the dashlet is auto refreshable - * - * @return bool - */ - protected function isAutoRefreshable() - { - return $this->isRefreshable && - ( isset($GLOBALS['sugar_config']['dashlet_auto_refresh_min']) ? - $GLOBALS['sugar_config']['dashlet_auto_refresh_min'] != -1 : true ); - } -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/include/Dashlets/DashletGeneric.php b/include/Dashlets/DashletGeneric.php index ab9a509c..045a35ff 100644 --- a/include/Dashlets/DashletGeneric.php +++ b/include/Dashlets/DashletGeneric.php @@ -116,7 +116,6 @@ class DashletGeneric extends Dashlet { if(!empty($options['displayRows'])) $this->displayRows = $options['displayRows']; if(!empty($options['displayColumns'])) $this->displayColumns = $options['displayColumns']; if(isset($options['myItemsOnly'])) $this->myItemsOnly = $options['myItemsOnly']; - if(isset($options['autoRefresh'])) $this->autoRefresh = $options['autoRefresh']; } $this->layoutManager = new LayoutManager(); @@ -147,8 +146,7 @@ class DashletGeneric extends Dashlet { $chooser->args['values_array'][1] = array(); $this->loadCustomMetadata(); - // Bug 39517 - Don't add custom fields automatically to the available fields to display in the listview - //$this->addCustomFields(); + $this->addCustomFields(); if($this->displayColumns) { // columns to display foreach($this->displayColumns as $num => $name) { @@ -221,9 +219,7 @@ class DashletGeneric extends Dashlet { 'myItems' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_MY_ITEMS_ONLY'], 'displayRows' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_DISPLAY_ROWS'], 'title' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_TITLE'], - 'save' => $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'], - 'autoRefresh' => $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH'], - )); + 'save' => $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'])); $this->configureSS->assign('id', $this->id); $this->configureSS->assign('showMyItemsOnly', $this->showMyItemsOnly); $this->configureSS->assign('myItemsOnly', $this->myItemsOnly); @@ -235,12 +231,6 @@ class DashletGeneric extends Dashlet { $displayRowOptions = $GLOBALS['sugar_config']['dashlet_display_row_options']; $this->configureSS->assign('displayRowOptions', $displayRowOptions); $this->configureSS->assign('displayRowSelect', $this->displayRows); - - if($this->isAutoRefreshable()) { - $this->configureSS->assign('isRefreshable', true); - $this->configureSS->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $this->configureSS->assign('autoRefreshSelect', $this->autoRefresh); - } } /** * Displays the options for this Dashlet @@ -350,7 +340,7 @@ class DashletGeneric extends Dashlet { if(isset($this->filters) || $this->myItemsOnly) { $whereArray = $this->buildWhere(); } - + $this->lvs->export = false; $this->lvs->multiSelect = false; // columns @@ -372,12 +362,12 @@ class DashletGeneric extends Dashlet { } $this->lvs->displayColumns = $displayColumns; - $this->lvs->lvd->setVariableName($this->seedBean->object_name, array()); $lvdOrderBy = $this->lvs->lvd->getOrderBy(); // has this list been ordered, if not use default - - $nameRelatedFields = array(); - if(empty($lvdOrderBy['orderBy'])) { + if(!empty($lvsParams['orderBy']) && !empty($lvsParams['sortOrder'])){ + $lvsParams['overrideOrder'] = true; + } + else if(empty($lvdOrderBy['orderBy'])) { foreach($displayColumns as $colName => $colParams) { if(!empty($colParams['defaultOrderColumn'])) { $lvsParams['overrideOrder'] = true; @@ -386,13 +376,7 @@ class DashletGeneric extends Dashlet { } } } - // Check for 'last_name' column sorting with related fields (last_name, first_name) - // See ListViewData.php for actual sorting change. - if ($lvdOrderBy['orderBy'] == 'last_name' && !empty($displayColumns['NAME']) && !empty($displayColumns['NAME']['related_fields']) && - in_array('last_name', $displayColumns['NAME']['related_fields']) && - in_array('first_name', $displayColumns['NAME']['related_fields'])) { - $lvsParams['overrideLastNameOrder'] = true; - } + if(!empty($this->displayTpl)) { @@ -400,7 +384,7 @@ class DashletGeneric extends Dashlet { $where = ''; if(!empty($whereArray)){ $where = '(' . implode(') AND (', $whereArray) . ')'; - } + } $this->lvs->setup($this->seedBean, $this->displayTpl, $where , $lvsParams, 0, $this->displayRows/*, $filterFields*/); if(in_array('CREATED_BY', array_keys($displayColumns))) { // handle the created by field foreach($this->lvs->data['data'] as $row => $data) { @@ -417,6 +401,7 @@ class DashletGeneric extends Dashlet { } $this->lvs->ss->assign('dashletId', $this->id); + } } @@ -426,7 +411,7 @@ class DashletGeneric extends Dashlet { * @return string HTML that displays Dashlet */ function display() { - return parent::display() . $this->lvs->display(false) . $this->processAutoRefresh(); + return parent::display() . $this->lvs->display(false); } /** @@ -473,7 +458,6 @@ class DashletGeneric extends Dashlet { if(!empty($req['displayColumnsDef'])) { $options['displayColumns'] = explode('|', $req['displayColumnsDef']); } - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; return $options; } diff --git a/include/Dashlets/DashletGenericAutoRefresh.tpl b/include/Dashlets/DashletGenericAutoRefresh.tpl deleted file mode 100644 index 4c829a5a..00000000 --- a/include/Dashlets/DashletGenericAutoRefresh.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - - - -*} - - - \ No newline at end of file diff --git a/include/Dashlets/DashletGenericAutoRefreshDynamic.tpl b/include/Dashlets/DashletGenericAutoRefreshDynamic.tpl deleted file mode 100644 index 7dee1526..00000000 --- a/include/Dashlets/DashletGenericAutoRefreshDynamic.tpl +++ /dev/null @@ -1,64 +0,0 @@ -{* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - - - -*} - - - \ No newline at end of file diff --git a/include/Dashlets/DashletGenericChart.php b/include/Dashlets/DashletGenericChart.php index a2672dd9..9806d7f5 100644 --- a/include/Dashlets/DashletGenericChart.php +++ b/include/Dashlets/DashletGenericChart.php @@ -118,8 +118,6 @@ abstract class DashletGenericChart extends Dashlet if ( empty($options['title']) ) $this->title = $this->dashletStrings['LBL_TITLE']; - if ( isset($options['autoRefresh']) ) - $this->autoRefresh = $options['autoRefresh']; $this->layoutManager = new LayoutManager(); $this->layoutManager->setAttribute('context', 'Report'); @@ -129,9 +127,6 @@ abstract class DashletGenericChart extends Dashlet $this->layoutManager->setAttributePtr('reporter', $temp); } - /** - * @see Dashlet::setRefreshIcon() - */ public function setRefreshIcon() { $additionalTitle = ''; @@ -149,11 +144,21 @@ abstract class DashletGenericChart extends Dashlet */ public function displayScript() { + global $sugar_config, $current_user, $current_language; + + $xmlFile = $sugar_config['tmp_dir']. $current_user->id . '_' . $this->id . '.xml'; + $chartStringsXML = $GLOBALS['sugar_config']['tmp_dir'].'chart_strings.' . $current_language .'.lang.xml'; + + $ss = new Sugar_Smarty(); + $ss->assign('chartName', $this->id); + $ss->assign('chartXMLFile', $xmlFile); - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); - return $sugarChart->getDashletScript($this->id); - + $ss->assign('chartStyleCSS', SugarThemeRegistry::current()->getCSSURL('chart.css')); + $ss->assign('chartColorsXML', SugarThemeRegistry::current()->getImageURL('sugarColors.xml')); + $ss->assign('chartStringsXML', $chartStringsXML); + + $str = $ss->fetch('include/Dashlets/DashletGenericChartScript.tpl'); + return $str; } /** @@ -205,8 +210,6 @@ abstract class DashletGenericChart extends Dashlet if (!empty($req['dashletTitle'])) $options['title'] = $req['dashletTitle']; - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; - return $options; } @@ -254,13 +257,6 @@ abstract class DashletGenericChart extends Dashlet $this->getConfigureSmartyInstance()->assign('dashletType', 'predefined_chart'); $this->getConfigureSmartyInstance()->assign('module', $_REQUEST['module']); - if($this->isAutoRefreshable()) { - $this->getConfigureSmartyInstance()->assign('isRefreshable', true); - $this->getConfigureSmartyInstance()->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $this->getConfigureSmartyInstance()->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $this->getConfigureSmartyInstance()->assign('autoRefreshSelect', $this->autoRefresh); - } - return parent::displayOptions() . $this->getConfigureSmartyInstance()->fetch($this->_configureTpl); } @@ -272,8 +268,8 @@ abstract class DashletGenericChart extends Dashlet */ protected function getSeedBean() { - if ( !($this->_seedBean instanceof SugarBean) ) - $this->_seedBean = SugarModule::get($this->_seedName)->loadBean(); + if ( !($this->_seedBean instanceof $this->_seedName) ) + $this->_seedBean = loadBean($this->_seedName); return $this->_seedBean; } @@ -297,58 +293,5 @@ abstract class DashletGenericChart extends Dashlet { return array(); } - - /** - * Displays the Dashlet, must call process() prior to calling this - * - * @return string HTML that displays Dashlet - */ - public function display() - { - return parent::display() . $this->processAutoRefresh(); - } - - /** - * Processes and displays the auto refresh code for the dashlet - * - * @param int $dashletOffset - * @return string HTML code - */ - protected function processAutoRefresh($dashletOffset = 0) - { - global $sugar_config; - - if ( empty($dashletOffset) ) { - $dashletOffset = 0; - $module = $_REQUEST['module']; - if(isset($_REQUEST[$module.'2_'.strtoupper($this->getSeedBean()->object_name).'_offset'])) { - $dashletOffset = $_REQUEST[$module.'2_'.strtoupper($this->getSeedBean()->object_name).'_offset']; - } - } - - if ( !$this->isRefreshable ) { - return ''; - } - if ( !empty($sugar_config['dashlet_auto_refresh_min']) && $sugar_config['dashlet_auto_refresh_min'] == -1 ) { - return ''; - } - $autoRefreshSS = new Sugar_Smarty(); - $autoRefreshSS->assign('dashletOffset', $dashletOffset); - $autoRefreshSS->assign('dashletId', $this->id); - $autoRefreshSS->assign('strippedDashletId', str_replace("-","",$this->id)); //javascript doesn't like "-" in function names - if ( empty($this->autoRefresh) ) { - $this->autoRefresh = 0; - } - elseif ( !empty($sugar_config['dashlet_auto_refresh_min']) ) { - $this->autoRefresh = min($sugar_config['dashlet_auto_refresh_min'],$this->autoRefresh); - } - $autoRefreshSS->assign('dashletRefreshInterval', $this->autoRefresh * 1000); - $autoRefreshSS->assign('url', "predefined_chart"); - $tpl = 'include/Dashlets/DashletGenericAutoRefresh.tpl'; - if ( $_REQUEST['action'] == "DynamicAction" ) { - $tpl = 'include/Dashlets/DashletGenericAutoRefreshDynamic.tpl'; - } - - return $autoRefreshSS->fetch($tpl); - } } +?> diff --git a/include/Dashlets/DashletGenericChartConfigure.tpl b/include/Dashlets/DashletGenericChartConfigure.tpl index a3f08857..6a97b53c 100644 --- a/include/Dashlets/DashletGenericChartConfigure.tpl +++ b/include/Dashlets/DashletGenericChartConfigure.tpl @@ -60,18 +60,6 @@ - {if $isRefreshable} - - - - - {/if} {foreach name=searchIteration from=$searchFields key=name item=params} - + - {if $isRefreshable} - - - {/if} - {{/if}} {{/if}} {{/foreach}} {{/if}} diff --git a/include/EditView/EditView.tpl b/include/EditView/EditView.tpl index 5711beb0..bab360c4 100644 --- a/include/EditView/EditView.tpl +++ b/include/EditView/EditView.tpl @@ -39,7 +39,7 @@ {sugar_include include=$includes} -
{{assign var='columnsInRow' value=$rowData|@count}} @@ -105,39 +103,30 @@ class="yui-navset" {{assign var="colCount" value=0}} {{/if}} - {{if !empty($colData.field.hideIf)}} - {if !({{$colData.field.hideIf}}) } - {{/if}} {{if empty($def.templateMeta.labelsOnTop) && empty($colData.field.hideLabel)}}
{{/if}} - {counter name="fieldsUsed"} + - {/if} - {{/if}} {{/foreach}} -{/capture} -{if $fieldsUsed > 0 } -{$tableRow} -{/if} {{/foreach}}
' . $text . '
- {$autoRefresh} - - -
diff --git a/include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl b/include/Dashlets/DashletGenericChartScript.tpl similarity index 83% rename from include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl rename to include/Dashlets/DashletGenericChartScript.tpl index 9e040ab5..d6f76dca 100644 --- a/include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl +++ b/include/Dashlets/DashletGenericChartScript.tpl @@ -1,4 +1,5 @@ {* + /********************************************************************************* * SugarCRM is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. @@ -34,18 +35,11 @@ * "Powered by SugarCRM". ********************************************************************************/ + + + *} \ No newline at end of file + SUGAR.mySugar.addToChartsArray('{$chartName}', '{$chartXMLFile}', '100%', '480', '{$chartStyleCSS}', '{$chartColorsXML}', '{$chartStringsXML}'); + diff --git a/include/Dashlets/DashletGenericConfigure.tpl b/include/Dashlets/DashletGenericConfigure.tpl index a8c672d0..d014d60a 100644 --- a/include/Dashlets/DashletGenericConfigure.tpl +++ b/include/Dashlets/DashletGenericConfigure.tpl @@ -70,21 +70,11 @@ {$strings.displayRows} - {$strings.autoRefresh} - - -
diff --git a/include/Dashlets/DashletGenericDisplay.tpl b/include/Dashlets/DashletGenericDisplay.tpl index 776182f5..cbeef37c 100644 --- a/include/Dashlets/DashletGenericDisplay.tpl +++ b/include/Dashlets/DashletGenericDisplay.tpl @@ -124,9 +124,7 @@ {$arrowAlt} {/if} {else} - {if !isset($params.noHeader) || $params.noHeader == false} - {sugar_translate label=$params.label module=$pageData.bean.moduleDir} - {/if} + {sugar_translate label=$params.label module=$pageData.bean.moduleDir} {/if} diff --git a/include/DetailView/DetailView.tpl b/include/DetailView/DetailView.tpl index be65ab0f..d0456a4a 100644 --- a/include/DetailView/DetailView.tpl +++ b/include/DetailView/DetailView.tpl @@ -37,7 +37,7 @@ *} {{include file=$headerTpl}} {sugar_include include=$includes} -
{sugar_translate label='{{$label}}' module='{{$module}}'} {{/if}} {{* Print out the table data *}} + - - + {{foreach name=rowIteration from=$panel key=row item=rowData}} - {counter name="fieldsUsed" start=0 print=false assign="fieldsUsed"} - {counter name="fieldsHidden" start=0 print=false assign="fieldsHidden"} - {capture name="tr" assign="tableRow"} {{assign var='columnsInRow' value=$rowData|@count}} {{assign var='columnsUsed' value=0}} - {{foreach name=colIteration from=$rowData key=col item=colData}} - {{if !empty($colData.field.hideIf)}} - {if !({{$colData.field.hideIf}}) } - {{/if}} - {counter name="fieldsUsed"} + {{foreach name=colIteration from=$rowData key=col item=colData}} - - {{if !empty($colData.field.hideIf)}} - {else} - - - {/if} - {{/if}} {{/foreach}} - {/capture} - {if $fieldsUsed > 0 && $fieldsUsed != $fieldsHidden} - {$tableRow} - {/if} {{/foreach}}
- {{if !empty($colData.field.name)}} - {if !$fields.{{$colData.field.name}}.hidden} - {{/if}} {{if isset($colData.field.customLabel)}} {{$colData.field.customLabel}} {{elseif isset($colData.field.label) && strpos($colData.field.label, '$')}} - {capture name="label" assign="label"}{{$colData.field.label}}{/capture} + {capture name="label" assign="label"} + {{$colData.field.label}} + {/capture} {$label|strip_semicolon}: {{elseif isset($colData.field.label)}} - {capture name="label" assign="label"}{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}{/capture} + {capture name="label" assign="label"} + {sugar_translate label='{{$colData.field.label}}' module='{{$module}}'} + {/capture} {$label|strip_semicolon}: {{elseif isset($fields[$colData.field.name])}} - {capture name="label" assign="label"}{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}{/capture} + {capture name="label" assign="label"} + {sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'} + {/capture} {$label|strip_semicolon}: {{else}}   {{/if}} - {{if isset($colData.field.popupHelp) || isset($fields[$colData.field.name]) && isset($fields[$colData.field.name].popupHelp) }} - {{if isset($colData.field.popupHelp) }} - {capture name="popupText" assign="popupText"}{sugar_translate label="{{$colData.field.popupHelp}}" module='{{$module}}'}{/capture} - {{elseif isset($fields[$colData.field.name].popupHelp)}} - {capture name="popupText" assign="popupText"}{sugar_translate label="{{$fields[$colData.field.name].popupHelp}}" module='{{$module}}'}{/capture} - {{/if}} - {overlib_includes} - {sugar_help text=$popupText WIDTH=400} - {{/if}} - {{if !empty($colData.field.name)}} - {/if} - {{/if}} - {{if !empty($colData.field.name)}} - {if !$fields.{{$colData.field.name}}.hidden} - {{/if}} + {{if $colData.field.customCode || $colData.field.assign}} {counter name="panelFieldCount"} - {{sugar_evalcolumn var=$colData.field colData=$colData}} + {{sugar_evalcolumn var=$colData.field colData=$colData}} {{elseif $fields[$colData.field.name] && !empty($colData.field.fields) }} {{foreach from=$colData.field.fields item=subField}} {{if $fields[$subField]}} @@ -134,27 +115,14 @@ class="yui-navset detailview_tabs" {counter name="panelFieldCount"} {{$subField}} {{/if}} - {{/foreach}} + {{/foreach}} {{elseif $fields[$colData.field.name]}} {counter name="panelFieldCount"} {{sugar_field parentFieldArray='fields' vardef=$fields[$colData.field.name] displayType='DetailView' displayParams=$colData.field.displayParams typeOverride=$colData.field.type}} {{/if}} - {{if !empty($colData.field.name)}} - {/if} - {{/if}}   
{{/if}} @@ -167,9 +135,9 @@ class="yui-navset detailview_tabs"
{{include file=$footerTpl}} {{if $useTabs}} - + + {{/if}} \ No newline at end of file diff --git a/include/DetailView/header.tpl b/include/DetailView/header.tpl index c431d90e..744fc812 100644 --- a/include/DetailView/header.tpl +++ b/include/DetailView/header.tpl @@ -48,13 +48,13 @@ - + {{if isset($form.hidden)}} {{foreach from=$form.hidden item=field}} -{{$field}} +{{$field}} {{/foreach}} {{/if}} @@ -77,13 +77,9 @@ {{if count($form.buttons) > $num_buttons}} {{foreach from=$form.buttons key=val item=button}} {{if is_array($button) && $button.customCode}} - {{if isset($closeFormBeforeCustomButtons)}}
- {{/if}} {{sugar_button module="$module" id="$button" view="EditView"}} - {{if isset($closeFormBeforeCustomButtons)}} {{if isset($colData.field.customLabel)}} {{$colData.field.customLabel}} {{elseif isset($colData.field.label)}} - {capture name="label" assign="label"}{sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}{/capture} + {capture name="label" assign="label"} + {sugar_translate label='{{$colData.field.label}}' module='{{$module}}'} + {/capture} {$label|strip_semicolon}: {{elseif isset($fields[$colData.field.name])}} - {capture name="label" assign="label"}{sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}{/capture} + {capture name="label" assign="label"} + {sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'} + {/capture} {$label|strip_semicolon}: {{/if}} {{* Show the required symbol if field is required, but override not set. Or show if override is set *}} - {{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) || - (isset($colData.field.displayParams.required) && $colData.field.displayParams.required)}} + {{if ($fields[$colData.field.name].required && !isset($colData.field.displayParams.required)) || + (isset($colData.field.displayParams.required) && $colData.field.displayParams.required && $fields[$colData.field.name].required !== false)}} {{$APP.LBL_REQUIRED_SYMBOL}} {{/if}} - {{if isset($colData.field.popupHelp) || isset($fields[$colData.field.name]) && isset($fields[$colData.field.name].popupHelp) }} - {{if isset($colData.field.popupHelp) }} - {capture name="popupText" assign="popupText"}{sugar_translate label="{{$colData.field.popupHelp}}" module='{{$module}}'}{/capture} - {{elseif isset($fields[$colData.field.name].popupHelp)}} - {capture name="popupText" assign="popupText"}{sugar_translate label="{{$fields[$colData.field.name].popupHelp}}" module='{{$module}}'}{/capture} - {{/if}} - {capture name="overlibStuff" assign="overlibStuff"}{overlib_includes}{/capture} - {sugar_help text=$popupText WIDTH=-1} - {{/if}} - {{if !empty($def.templateMeta.labelsOnTop)}} {{if isset($colData.field.label)}} @@ -147,9 +136,9 @@ class="yui-navset" {{elseif isset($fields[$colData.field.name])}} {sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}: {{/if}} - + {{* Show the required symbol if field is required, but override not set. Or show if override is set *}} - {{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) || + {{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) || (isset($colData.field.displayParams.required) && $colData.field.displayParams.required)}} {{$APP.LBL_REQUIRED_SYMBOL}} {{/if}} @@ -158,7 +147,7 @@ class="yui-navset" {{/if}} {{/if}} - + {{if $fields[$colData.field.name] && !empty($colData.field.fields) }} {{foreach from=$colData.field.fields item=subField}} {{if $fields[$subField.name]}} @@ -174,18 +163,9 @@ class="yui-navset" {{$colData.displayParams}} {{sugar_field parentFieldArray='fields' tabindex=$colData.field.tabindex vardef=$fields[$colData.field.name] displayType='EditView' displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}} {{/if}} - {{if !empty($colData.field.hideIf)}} - {else} -
@@ -199,16 +179,15 @@ class="yui-navset" {{/foreach}}
{{include file=$footerTpl}} -{$overlibStuff} {{if $useTabs}} - + + {{/if}} \n"; - - $massUpdateRun = isset($_REQUEST['massupdate']) && $_REQUEST['massupdate'] == 'true'; - $uids = empty($_REQUEST['uid']) || $massUpdateRun ? '' : $_REQUEST['uid']; - $select_entire_list = isset($_REQUEST['select_entire_list']) && !$massUpdateRun ? $_REQUEST['select_entire_list'] : 0; - - echo "\n" . - "\n". - "\n". - "\n"; - - } - - - $GLOBALS['log']->debug("Offsets: (start, previous, next, last)(0, $previous_offset, $next_offset, $last_offset)"); - - if(0 == $current_offset) { - $start_link = ""; - $previous_link = ""; - } else { - if($this->multi_select_popup) {// nav links for multiselect popup, submit form to save checks. - $start_link = ""; - $previous_link = ""; - } elseif($this->shouldProcess) { - $start_link = ""; - $previous_link = ""; - } else { - $onClick = ''; - if(0 != preg_match('/javascript.*/', $start_URL)){ - $onClick = "\"$start_URL;\""; - }else{ - $onClick ="'location.href=\"$start_URL\";'"; - } - $start_link = ""; - - $onClick = ''; - if(0 != preg_match('/javascript.*/', $previous_URL)){ - $onClick = "\"$previous_URL;\""; - }else{ - $onClick = "'location.href=\"$previous_URL\";'"; - } - $previous_link = ""; - } - } - - if($last_offset <= $current_offset) { - $end_link = ""; - $next_link = ""; - } else { - if($this->multi_select_popup) { // nav links for multiselect popup, submit form to save checks. - $end_link = ""; - if(!empty($sugar_config['disable_count_query'])) { - $end_link = ''; - } - $next_link = ""; - } elseif($this->shouldProcess) { - $end_link = ""; - $next_link = ""; - } else { - $onClick = ''; - if(0 != preg_match('/javascript.*/', $next_URL)){ - $onClick = "\"$next_URL;\""; - }else{ - $onClick ="'location.href=\"$next_URL\";'"; - } - $next_link = ""; - - $onClick = ''; - if(0 != preg_match('/javascript.*/', $end_URL)){ - $onClick = "\"$end_URL;\""; - }else{ - $onClick = "'location.href=\"$end_URL\";'"; - } - $end_link = ""; - - } - } - - $GLOBALS['log']->info("Offset (next, current, prev)($next_offset, $current_offset, $previous_offset)"); - $GLOBALS['log']->info("Start/end records ($start_record, $end_record)"); - - $end_record = $end_record-1; - - echo ""; - - if($this->show_select_menu) { - $select_link = "".$this->local_app_strings['LBL_LINK_SELECT']." ".""; - } else { - $select_link = " "; - } - - // put overlib strings into functions to avoid backslash plague! - /*echo ""; - */ - //$export_link = "".SugarThemeRegistry::current()->getImage("export","alt='".$this->local_app_strings['LBL_EXPORT']."' border='0' align='absmiddle'")." ".$this->local_app_strings['LBL_EXPORT'].""; - $export_link = ''; - - if($this->show_delete_button) { - $delete_link = ''; - } else { - $delete_link = ' '; - } - - $admin = new Administration(); - $admin->retrieveSettings('system'); - - $user_merge = $current_user->getPreference('mailmerge_on'); - if($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) { - echo ""; - $merge_link = " | ".$this->local_app_strings['LBL_MAILMERGE'].""; - } else { - $merge_link = " "; - } - - $selected_objects_span = " | {$this->local_app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}"; - - if($_REQUEST['module'] == 'Home' || $this->local_current_module == 'Import' - || $this->show_export_button == false - || (!empty($sugar_config['disable_export'])) - || (!empty($sugar_config['admin_export_only']) - && !( - is_admin($current_user) - || (ACLController::moduleSupportsACL($_REQUEST['module']) - && ACLAction::getUserAccessLevel($current_user->id,$_REQUEST['module'], 'access') == ACL_ALLOW_ENABLED - && (ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN || - ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN_DEV))))) - { - if ($_REQUEST['module'] != 'InboundEmail' && $_REQUEST['module'] != 'EmailMan' && $_REQUEST['module'] != 'iFrames') { - $selected_objects_span = ''; - } - $export_link = " "; - $merge_link = " "; - } elseif($_REQUEST['module'] != "Accounts" && $_REQUEST['module'] != "Cases" && $_REQUEST['module'] != "Contacts" && $_REQUEST['module'] != "Leads" && $_REQUEST['module'] != "Opportunities") { - $merge_link = " "; - } - - if($this->show_paging == true) { - if(!empty($sugar_config['disable_count_query'])) { - if($row_count > $end_record) { - $row_count .= '+'; - } - } + if($row_count == 0) + $start_record = 0; - $html_text = ''; - $html_text .= "\n"; - $html_text .= "\n"; - //$html_text .= "\n"; - //$html_text .= "
$export_link$merge_link$selected_objects_span
{if $prerow} - +
"; - if ($subpanel_def != null) { - include_once('include/SubPanel/SubPanelTiles.php'); - $subpanelTiles = new SubPanelTiles($sugarbean); - $html_text .= "\n"; + $html_text .= " {/if} {if !empty($quickViewLinks)} - + {/if} {counter start=0 name="colCounter" print=false assign="colCounter"} {foreach from=$displayColumns key=col item=params} {strip} - {/if} - + {if $rowCounter % 2 == 1} {/if} diff --git a/include/MySugar/tpls/retrieveReportCharts.tpl b/include/MySugar/tpls/retrieveReportCharts.tpl index 173e9240..83e81f85 100644 --- a/include/MySugar/tpls/retrieveReportCharts.tpl +++ b/include/MySugar/tpls/retrieveReportCharts.tpl @@ -38,7 +38,7 @@
"; + $end_record = $start_record + $this->records_per_page; + // back up the the last page. + if($end_record > $row_count+1) { + $end_record = $row_count+1; + } + // Deterime the start location of the last page + if($row_count == 0) + $number_pages = 0; + else + $number_pages = floor(($row_count - 1) / $this->records_per_page); + + $last_offset = $number_pages * $this->records_per_page; + + if(empty($this->query_limit) || $this->query_limit > $this->records_per_page) { + $this->base_URL = $this->getBaseURL($html_varName); + $dynamic_url = ''; + + if($this->is_dynamic) { + $dynamic_url .='&'. $this->getSessionVariableName($html_varName,'ORDER_BY') . '='. $this->getSessionVariable($html_varName,'ORDER_BY').'&sort_order='.$this->sort_order.'&to_pdf=true&action=SubPanelViewer&subpanel=' . $this->subpanel_module; + } + + $current_URL = $this->base_URL.$current_offset.$dynamic_url; + $start_URL = $this->base_URL."0".$dynamic_url; + $previous_URL = $this->base_URL.$previous_offset.$dynamic_url; + $next_URL = $this->base_URL.$next_offset.$dynamic_url; + $end_URL = $this->base_URL.'end'.$dynamic_url; + + if(!empty($this->start_link_wrapper)) { + $current_URL = $this->start_link_wrapper.$current_URL.$this->end_link_wrapper; + $start_URL = $this->start_link_wrapper.$start_URL.$this->end_link_wrapper; + $previous_URL = $this->start_link_wrapper.$previous_URL.$this->end_link_wrapper; + $next_URL = $this->start_link_wrapper.$next_URL.$this->end_link_wrapper; + $end_URL = $this->start_link_wrapper.$end_URL.$this->end_link_wrapper; + } + + $moduleString = "{$currentModule}_{$html_varName}_offset"; + $moduleStringOrder = "{$currentModule}_{$html_varName}_ORDER_BY"; + if($this->shouldProcess && !$this->multi_select_popup) { + // check the checkboxes onload + echo "\n"; + + $massUpdateRun = isset($_REQUEST['massupdate']) && $_REQUEST['massupdate'] == 'true'; + $uids = empty($_REQUEST['uid']) || $massUpdateRun ? '' : $_REQUEST['uid']; + $select_entire_list = isset($_REQUEST['select_entire_list']) && !$massUpdateRun ? $_REQUEST['select_entire_list'] : 0; + + echo "\n" . + "\n". + "\n". + "\n"; + + } + + + $GLOBALS['log']->debug("Offsets: (start, previous, next, last)(0, $previous_offset, $next_offset, $last_offset)"); + + if(0 == $current_offset) { + $start_link = ""; + $previous_link = ""; + } else { + if($this->multi_select_popup) {// nav links for multiselect popup, submit form to save checks. + $start_link = ""; + $previous_link = ""; + } elseif($this->shouldProcess) { + $start_link = ""; + $previous_link = ""; + } else { + $onClick = ''; + if(0 != preg_match('/javascript.*/', $start_URL)){ + $onClick = "\"$start_URL;\""; + }else{ + $onClick ="'location.href=\"$start_URL\";'"; + } + $start_link = ""; + + $onClick = ''; + if(0 != preg_match('/javascript.*/', $previous_URL)){ + $onClick = "\"$previous_URL;\""; + }else{ + $onClick = "'location.href=\"$previous_URL\";'"; + } + $previous_link = ""; + } + } + + if($last_offset <= $current_offset) { + $end_link = ""; + $next_link = ""; + } else { + if($this->multi_select_popup) { // nav links for multiselect popup, submit form to save checks. + $end_link = ""; + if(!empty($sugar_config['disable_count_query'])) { + $end_link = ''; + } + $next_link = ""; + } elseif($this->shouldProcess) { + $end_link = ""; + $next_link = ""; + } else { + $onClick = ''; + if(0 != preg_match('/javascript.*/', $next_URL)){ + $onClick = "\"$next_URL;\""; + }else{ + $onClick ="'location.href=\"$next_URL\";'"; + } + $next_link = ""; + + $onClick = ''; + if(0 != preg_match('/javascript.*/', $end_URL)){ + $onClick = "\"$end_URL;\""; + }else{ + $onClick = "'location.href=\"$end_URL\";'"; + } + $end_link = ""; + + } + } + + $GLOBALS['log']->info("Offset (next, current, prev)($next_offset, $current_offset, $previous_offset)"); + $GLOBALS['log']->info("Start/end records ($start_record, $end_record)"); + + $end_record = $end_record-1; + + echo ""; + + if($this->show_select_menu) { + $select_link = "".$this->local_app_strings['LBL_LINK_SELECT']." ".""; + } else { + $select_link = " "; + } + + // put overlib strings into functions to avoid backslash plague! + /*echo ""; + */ + //$export_link = "".SugarThemeRegistry::current()->getImage("export","alt='".$this->local_app_strings['LBL_EXPORT']."' border='0' align='absmiddle'")." ".$this->local_app_strings['LBL_EXPORT'].""; + $export_link = ''; + + if($this->show_delete_button) { + $delete_link = ''; + } else { + $delete_link = ' '; + } + + $admin = new Administration(); + $admin->retrieveSettings('system'); + + $user_merge = $current_user->getPreference('mailmerge_on'); + if($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) { + echo ""; + $merge_link = " | ".$this->local_app_strings['LBL_MAILMERGE'].""; + } else { + $merge_link = " "; + } + + $selected_objects_span = " | {$this->local_app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}"; + + if($_REQUEST['module'] == 'Home' || $this->local_current_module == 'Import' + || $this->show_export_button == false + || (!empty($sugar_config['disable_export'])) + || (!empty($sugar_config['admin_export_only']) + && !( + is_admin($current_user) + || (ACLController::moduleSupportsACL($_REQUEST['module']) + && ACLAction::getUserAccessLevel($current_user->id,$_REQUEST['module'], 'access') == ACL_ALLOW_ENABLED + && (ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN || + ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN_DEV))))) + { + if ($_REQUEST['module'] != 'InboundEmail' && $_REQUEST['module'] != 'EmailMan' && $_REQUEST['module'] != 'iFrames') { + $selected_objects_span = ''; + } + $export_link = " "; + $merge_link = " "; + } elseif($_REQUEST['module'] != "Accounts" && $_REQUEST['module'] != "Cases" && $_REQUEST['module'] != "Contacts" && $_REQUEST['module'] != "Leads" && $_REQUEST['module'] != "Opportunities") { + $merge_link = " "; + } + + if($this->show_paging == true) { + if(!empty($sugar_config['disable_count_query'])) { + if($row_count > $end_record) { + $row_count .= '+'; + } + } + + $html_text = ''; + $html_text .= "
\n"; + //$html_text .= "\n"; + //$html_text .= "
$export_link$merge_link$selected_objects_span
\n"; + $html_text .= "\n"; + $this->xTemplate->assign("PAGINATION",$html_text); + } + + //C.L. - Fix for 23461 + if(empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') { + $_SESSION['export_where'] = $this->query_where; + } + $this->xTemplate->parse($xtemplateSection.".list_nav_row"); + } + } // end processListNavigation + + function processOrderBy($html_varName) { + + if(!isset($this->base_URL)) { + $this->base_URL = $_SERVER['PHP_SELF']; + + if(isset($_SERVER['QUERY_STRING'])) { + $this->base_URL = preg_replace("/\&".$this->getSessionVariableName($html_varName,"ORDER_BY")."=[0-9a-zA-Z\_\.]*/","",$this->base_URL .'?'.$_SERVER['QUERY_STRING']); + $this->base_URL = preg_replace("/\&".$this->getSessionVariableName($html_varName,"offset")."=[0-9]*/","",$this->base_URL); + } + if($_SERVER['REQUEST_METHOD'] == 'POST') { + $this->base_URL .= '?'; + if(isset($_REQUEST['action'])) $this->base_URL .= '&action='.$_REQUEST['action']; + if(isset($_REQUEST['record'])) $this->base_URL .= '&record='.$_REQUEST['record']; + if(isset($_REQUEST['module'])) $this->base_URL .= '&module='.$_REQUEST['module']; + } + $this->base_URL .= "&".$this->getSessionVariableName($html_varName,"offset")."="; + } - if($sort_URL_base !== "") - { - $this->xTemplate->assign("ORDER_BY", $sort_URL_base); - return $sort_URL_base; - } else { - return ''; - } - } + if($this->is_dynamic) { + $this->base_URL.='&to_pdf=true&action=SubPanelViewer&subpanel=' . $this->source_module; + } + $sort_URL_base = $this->base_URL. "&".$this->getSessionVariableName($html_varName,"ORDER_BY")."="; - function getAdditionalHeader() { + if($sort_URL_base !== "") + { + $this->xTemplate->assign("ORDER_BY", $sort_URL_base); + return $sort_URL_base; + } else { + return ''; + } + } - } + function getAdditionalHeader() { - /** - * @return void - * @param unknown $data - * @param unknown $xTemplateSection - * @param unknown $html_varName - * @desc INTERNAL FUNCTION handles the rows - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - */ - function processListRows($data, $xtemplateSection, $html_varName) - { - global $odd_bg; - global $even_bg; - global $hilite_bg; - global $app_strings, $sugar_version, $sugar_config; - global $currentModule; - - static $overlib_included; - if(!$overlib_included) { - echo ' - '; - $overlib_included = true; - } + } - $this->xTemplate->assign('BG_HILITE', $hilite_bg); - $this->xTemplate->assign('CHECKALL', "\"\""); - //$this->xTemplate->assign("BG_CLICK", $click_bg); - $oddRow = true; - $count = 0; - reset($data); - - //GETTING OFFSET - $offset = $this->getOffset($html_varName); - $timeStamp = $this->unique_id(); - $_SESSION[$html_varName."_FROM_LIST_VIEW"] = $timeStamp; - - $associated_row_data = array(); - - //mail merge list - $mergeList = array(); - $module = ''; - //todo what is this? It is using an array as a boolean - while(list($aVal, $aItem) = each($data)) - { - if(isset($this->data_array)) { - $fields = $this->data_array; - } else { - $aItem->check_date_relationships_load(); - $fields = $aItem->get_list_view_data(); - } - - if(is_object($aItem)) { // cn: bug 5349 - //add item id to merge list, if the button is clicked - $mergeList[] = $aItem->id; - if(empty($module)) { - $module = $aItem->module_dir; - } - } - //ADD OFFSET TO ARRAY - - $fields['OFFSET'] = ($offset + $count + 1); - - $fields['STAMP'] = $timeStamp; - if($this->shouldProcess) { - - $prerow = ''; - if(!isset($this->data_array)) { - $prerow .= ""; - } - $this->xTemplate->assign('PREROW', $prerow); - - $this->xTemplate->assign('CHECKALL', ""); - } - if(!isset($this->data_array)) { - $tag = $aItem->listviewACLHelper(); - $this->xTemplate->assign('TAG',$tag) ; - } - - if($oddRow) - { - $ROW_COLOR = 'oddListRow'; - $BG_COLOR = $odd_bg; - } - else - { - $ROW_COLOR = 'evenListRow'; - $BG_COLOR = $even_bg; - } - $oddRow = !$oddRow; - - $this->xTemplate->assign('ROW_COLOR', $ROW_COLOR); - $this->xTemplate->assign('BG_COLOR', $BG_COLOR); - - if(isset($this->data_array)) - { - $this->xTemplate->assign('KEY', $aVal); - $this->xTemplate->assign('VALUE', $aItem); - $this->xTemplate->assign('INDEX', $count); - - } - else - { - //AED -- some modules do not have their additionalDetails.php established. Add a check to ensure require_once does not fail - // Bug #2786 - if($this->_additionalDetails && $aItem->ACLAccess('DetailView') && (file_exists('modules/' . $aItem->module_dir . '/metadata/additionalDetails.php') || file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'))) { - - $additionalDetailsFile = 'modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'; - if(file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php')){ - $additionalDetailsFile = 'custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'; - } + /** + * @return void + * @param unknown $data + * @param unknown $xTemplateSection + * @param unknown $html_varName + * @desc INTERNAL FUNCTION handles the rows + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + */ + function processListRows($data, $xtemplateSection, $html_varName) + { + global $odd_bg; + global $even_bg; + global $hilite_bg; + global $app_strings, $sugar_version, $sugar_config; + global $currentModule; + + static $overlib_included; + if(!$overlib_included) { + echo ' + '; + $overlib_included = true; + } - require_once($additionalDetailsFile); - $ad_function = (empty($this->additionalDetailsFunction) ? 'additionalDetails' : $this->additionalDetailsFunction) . $aItem->object_name; - $results = $ad_function($fields); - $results['string'] = str_replace(array("'", "'"), '\'', $results['string']); // no xss! - if(trim($results['string']) == '') $results['string'] = $app_strings['LBL_NONE']; - $fields[$results['fieldToAddTo']] = $fields[$results['fieldToAddTo']].''; - } - //fixes bug for IE where empty list view rows causes IE to not display bottom border - if(isset($fields['DESCRIPTION']) && empty($fields['DESCRIPTION'])) - $fields['DESCRIPTION'] = " "; - if(isset($fields['LIST_ORDER']) && empty($fields['LIST_ORDER'])) - $fields['LIST_ORDER'] = " "; - - $this->xTemplate->assign($html_varName, $fields); - $aItem->setupCustomFields($aItem->module_dir); - $aItem->custom_fields->populateAllXTPL($this->xTemplate, 'detail', $html_varName, $fields); - } - if(!isset($this->data_array) && $aItem->ACLAccess('DetailView')) { - $count++; - } - if(isset($this->data_array)) { - $count++; - } - if(!isset($this->data_array)) { - $aItem->list_view_parse_additional_sections($this->xTemplate, $xtemplateSection); - - if($this->xTemplate->exists($xtemplateSection.'.row.pro')) { - $this->xTemplate->parse($xtemplateSection.'.row.pro'); - } - } - $this->xTemplate->parse($xtemplateSection . '.row'); - - if(isset($fields['ID'])) { - $associated_row_data[$fields['ID']] = $fields; - // Bug 38908: cleanup data for JS to avoid having   shuffled around - foreach($fields as $key => $value) { - if($value == ' ') { - $associated_row_data[$fields['ID']][$key] = ''; - } - } - } - } + $this->xTemplate->assign('BG_HILITE', $hilite_bg); + $this->xTemplate->assign('CHECKALL', "\"\""); + //$this->xTemplate->assign("BG_CLICK", $click_bg); + $oddRow = true; + $count = 0; + reset($data); + + //GETTING OFFSET + $offset = $this->getOffset($html_varName); + $timeStamp = $this->unique_id(); + $_SESSION[$html_varName."_FROM_LIST_VIEW"] = $timeStamp; + + $associated_row_data = array(); + + //mail merge list + $mergeList = array(); + $module = ''; + //todo what is this? It is using an array as a boolean + while(list($aVal, $aItem) = each($data)) + { + if(isset($this->data_array)) { + $fields = $this->data_array; + } else { + $aItem->check_date_relationships_load(); + $fields = $aItem->get_list_view_data(); + } + + if(is_object($aItem)) { // cn: bug 5349 + //add item id to merge list, if the button is clicked + $mergeList[] = $aItem->id; + if(empty($module)) { + $module = $aItem->module_dir; + } + } + //ADD OFFSET TO ARRAY + + $fields['OFFSET'] = ($offset + $count + 1); + + $fields['STAMP'] = $timeStamp; + if($this->shouldProcess) { + + $prerow = ''; + if(!isset($this->data_array)) { + $prerow .= ""; + } + $this->xTemplate->assign('PREROW', $prerow); + + $this->xTemplate->assign('CHECKALL', ""); + } + if(!isset($this->data_array)) { + $tag = $aItem->listviewACLHelper(); + $this->xTemplate->assign('TAG',$tag) ; + } + + if($oddRow) + { + $ROW_COLOR = 'oddListRow'; + $BG_COLOR = $odd_bg; + } + else + { + $ROW_COLOR = 'evenListRow'; + $BG_COLOR = $even_bg; + } + $oddRow = !$oddRow; + + $this->xTemplate->assign('ROW_COLOR', $ROW_COLOR); + $this->xTemplate->assign('BG_COLOR', $BG_COLOR); + + if(isset($this->data_array)) + { + $this->xTemplate->assign('KEY', $aVal); + $this->xTemplate->assign('VALUE', $aItem); + $this->xTemplate->assign('INDEX', $count); + + } + else + { + //AED -- some modules do not have their additionalDetails.php established. Add a check to ensure require_once does not fail + // Bug #2786 + if($this->_additionalDetails && $aItem->ACLAccess('DetailView') && (file_exists('modules/' . $aItem->module_dir . '/metadata/additionalDetails.php') || file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'))) { + + $additionalDetailsFile = 'modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'; + if(file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php')){ + $additionalDetailsFile = 'custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'; + } + + require_once($additionalDetailsFile); + $ad_function = (empty($this->additionalDetailsFunction) ? 'additionalDetails' : $this->additionalDetailsFunction) . $aItem->object_name; + $results = $ad_function($fields); + $results['string'] = str_replace(array("'", "'"), '\'', $results['string']); // no xss! + + if(trim($results['string']) == '') $results['string'] = $app_strings['LBL_NONE']; + $fields[$results['fieldToAddTo']] = $fields[$results['fieldToAddTo']].''; + } + //fixes bug for IE where empty list view rows causes IE to not display bottom border + if(isset($fields['DESCRIPTION']) && empty($fields['DESCRIPTION'])) + $fields['DESCRIPTION'] = " "; + if(isset($fields['LIST_ORDER']) && empty($fields['LIST_ORDER'])) + $fields['LIST_ORDER'] = " "; + + $this->xTemplate->assign($html_varName, $fields); + $aItem->setupCustomFields($aItem->module_dir); + $aItem->custom_fields->populateAllXTPL($this->xTemplate, 'detail', $html_varName, $fields); + } + if(!isset($this->data_array) && $aItem->ACLAccess('DetailView')) { + $count++; + } + if(isset($this->data_array)) { + $count++; + } + if(!isset($this->data_array)) { + $aItem->list_view_parse_additional_sections($this->xTemplate, $xtemplateSection); + + if($this->xTemplate->exists($xtemplateSection.'.row.pro')) { + $this->xTemplate->parse($xtemplateSection.'.row.pro'); + } + } + $this->xTemplate->parse($xtemplateSection . '.row'); + + if(isset($fields['ID'])) { + $associated_row_data[$fields['ID']] = $fields; + } + } - $_SESSION['MAILMERGE_RECORDS'] = $mergeList; - $_SESSION['MAILMERGE_MODULE_FROM_LISTVIEW'] = $module; - if(empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') { - $_SESSION['MAILMERGE_MODULE'] = $module; - } + $_SESSION['MAILMERGE_RECORDS'] = $mergeList; + $_SESSION['MAILMERGE_MODULE_FROM_LISTVIEW'] = $module; + if(empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') { + $_SESSION['MAILMERGE_MODULE'] = $module; + } - if($this->process_for_popups) - { - $json = getJSONobj(); + if($this->process_for_popups) + { + $json = getJSONobj(); $is_show_fullname = showFullName() ? 1 : 0; - $associated_javascript_data = ''; - $this->xTemplate->assign('ASSOCIATED_JAVASCRIPT_DATA', $associated_javascript_data); - } + . ''; + $this->xTemplate->assign('ASSOCIATED_JAVASCRIPT_DATA', $associated_javascript_data); + } - $this->xTemplate->parse($xtemplateSection); - } + $this->xTemplate->parse($xtemplateSection); + } - function getLayoutManager() - { - require_once('include/generic/LayoutManager.php'); - if($this->layout_manager == null) - { - $this->layout_manager = new LayoutManager(); - } - return $this->layout_manager; - } + function getLayoutManager() + { + require_once('include/generic/LayoutManager.php'); + if($this->layout_manager == null) + { + $this->layout_manager = new LayoutManager(); + } + return $this->layout_manager; + } - function process_dynamic_listview_header($source_module, $subpanel_def, $html_var = 'CELL') - { + function process_dynamic_listview_header($source_module, $subpanel_def, $html_var = 'CELL') + { - $layout_manager = $this->getLayoutManager(); - $layout_manager->setAttribute('order_by_link',$this->processOrderBy($html_var)); - $layout_manager->setAttribute('context','HeaderCell'); - $layout_manager->setAttribute('image_path',$this->local_image_path); - $layout_manager->setAttribute('html_varName',$html_var); - $layout_manager->setAttribute('module_name', $source_module); - list($orderBy,$desc) = $this->getOrderByInfo($html_var); + $layout_manager = $this->getLayoutManager(); + $layout_manager->setAttribute('order_by_link',$this->processOrderBy($html_var)); + $layout_manager->setAttribute('context','HeaderCell'); + $layout_manager->setAttribute('image_path',$this->local_image_path); + $layout_manager->setAttribute('html_varName',$html_var); + $layout_manager->setAttribute('module_name', $source_module); + list($orderBy,$desc) = $this->getOrderByInfo($html_var); - if($orderBy == 'amount*1') - { - $orderBy= 'amount'; - } + if($orderBy == 'amount*1') + { + $orderBy= 'amount'; + } - foreach($subpanel_def->get_list_fields() as $column_name=>$widget_args) - { - $usage = empty($widget_args['usage']) ? '' : $widget_args['usage']; - if($usage != 'query_only') - { - $imgArrow = ''; - - if($orderBy == $column_name || (isset($widget_args['sort_by']) && str_replace('.','_',$widget_args['sort_by']) == $orderBy)) - { - $imgArrow = "_down"; - if($this->sort_order == 'desc') { - $imgArrow = "_up"; - } - } - $widget_args['name']=$column_name; - $widget_args['sort'] = $imgArrow; - $widget_args['start_link_wrapper'] = $this->start_link_wrapper; - $widget_args['end_link_wrapper'] = $this->end_link_wrapper; - $widget_args['subpanel_module'] = $this->subpanel_module; - - $widget_contents = $layout_manager->widgetDisplay($widget_args); - $cell_width = empty($widget_args['width']) ? '' : $widget_args['width']; - $this->xTemplate->assign('HEADER_CELL', $widget_contents); - static $count; - if(!isset($count))$count = 0; else $count++; - $this->xTemplate->assign('CELL_COUNT', $count); - $this->xTemplate->assign('CELL_WIDTH', $cell_width); - $this->xTemplate->parse('dyn_list_view.header_cell'); - } - } + foreach($subpanel_def->get_list_fields() as $column_name=>$widget_args) + { + $usage = empty($widget_args['usage']) ? '' : $widget_args['usage']; + if($usage != 'query_only') + { + $imgArrow = ''; + + if($orderBy == $column_name || (isset($widget_args['sort_by']) && str_replace('.','_',$widget_args['sort_by']) == $orderBy)) + { + $imgArrow = "_down"; + if($this->sort_order == 'desc') { + $imgArrow = "_up"; + } + } + $widget_args['name']=$column_name; + $widget_args['sort'] = $imgArrow; + $widget_args['start_link_wrapper'] = $this->start_link_wrapper; + $widget_args['end_link_wrapper'] = $this->end_link_wrapper; + $widget_args['subpanel_module'] = $this->subpanel_module; + + $widget_contents = $layout_manager->widgetDisplay($widget_args); + $cell_width = empty($widget_args['width']) ? '' : $widget_args['width']; + $this->xTemplate->assign('HEADER_CELL', $widget_contents); + static $count; + if(!isset($count))$count = 0; else $count++; + $this->xTemplate->assign('CELL_COUNT', $count); + $this->xTemplate->assign('CELL_WIDTH', $cell_width); + $this->xTemplate->parse('dyn_list_view.header_cell'); + } + } - } + } - /** - * @return void - * @param unknown $seed - * @param unknown $xTemplateSection - * @param unknown $html_varName - * @desc PUBLIC FUNCTION Handles List Views using seeds that extend SugarBean - $XTemplateSection is the section in the XTemplate file that should be parsed usually main - $html_VarName is the variable name used in the XTemplateFile e.g. TASK - $seed is a seed there are two types of seeds one is a subclass of SugarBean, the other is a list usually created from a sugar bean using get_list - if no XTemplate is set it will create a new XTemplate - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - - function processListViewTwo($seed, $xTemplateSection, $html_varName) { - global $current_user; - if(!isset($this->xTemplate)) { - $this->createXTemplate(); - } + /** + * @return void + * @param unknown $seed + * @param unknown $xTemplateSection + * @param unknown $html_varName + * @desc PUBLIC FUNCTION Handles List Views using seeds that extend SugarBean + $XTemplateSection is the section in the XTemplate file that should be parsed usually main + $html_VarName is the variable name used in the XTemplateFile e.g. TASK + $seed is a seed there are two types of seeds one is a subclass of SugarBean, the other is a list usually created from a sugar bean using get_list + if no XTemplate is set it will create a new XTemplate + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + + function processListViewTwo($seed, $xTemplateSection, $html_varName) { + global $current_user; + if(!isset($this->xTemplate)) { + $this->createXTemplate(); + } - $isSugarBean = is_subclass_of($seed, "SugarBean"); - $list = null; + $isSugarBean = is_subclass_of($seed, "SugarBean"); + $list = null; - if($isSugarBean) { - $list = $this->processSugarBean($xTemplateSection, $html_varName, $seed); - } else { - $list = $seed; - } + if($isSugarBean) { + $list = $this->processSugarBean($xTemplateSection, $html_varName, $seed); + } else { + $list = $seed; + } - if (is_object($seed) && isset($seed->object_name) && $seed->object_name == 'WorkFlow') { - $tab=array(); - $access = get_workflow_admin_modules_for_user($current_user); - for ($i = 0; $i < count($list); $i++) { - if(!empty($access[$list[$i]->base_module])){ + if (is_object($seed) && isset($seed->object_name) && $seed->object_name == 'WorkFlow') { + $tab=array(); + $access = get_workflow_admin_modules_for_user($current_user); + for ($i = 0; $i < count($list); $i++) { + if(!empty($access[$list[$i]->base_module])){ $tab[]=$list[$i]; } - } + } $list = $tab; - } + } - if($this->is_dynamic) { - $this->processHeaderDynamic($xTemplateSection,$html_varName); - $this->processListRows($list,$xTemplateSection, $html_varName); - } else { - $this->processSortArrows($html_varName); + if($this->is_dynamic) { + $this->processHeaderDynamic($xTemplateSection,$html_varName); + $this->processListRows($list,$xTemplateSection, $html_varName); + } else { + $this->processSortArrows($html_varName); - if($isSugarBean) { - $seed->parse_additional_headers($this->xTemplate, $xTemplateSection); - } - $this->xTemplateAssign('CHECKALL', ""); + if($isSugarBean) { + $seed->parse_additional_headers($this->xTemplate, $xTemplateSection); + } + $this->xTemplateAssign('CHECKALL', ""); - // Process the order by before processing the pro_nav. The pro_nav requires the order by values to be set - $this->processOrderBy($html_varName); + // Process the order by before processing the pro_nav. The pro_nav requires the order by values to be set + $this->processOrderBy($html_varName); - $this->processListRows($list,$xTemplateSection, $html_varName); - } + $this->processListRows($list,$xTemplateSection, $html_varName); + } - if($this->display_header_and_footer) { - $this->getAdditionalHeader(); - if(!empty($this->header_title)) { - echo get_form_header($this->header_title, $this->header_text, false); - } - } + if($this->display_header_and_footer) { + $this->getAdditionalHeader(); + if(!empty($this->header_title)) { + echo get_form_header($this->header_title, $this->header_text, false); + } + } - $this->xTemplate->out($xTemplateSection); + $this->xTemplate->out($xTemplateSection); - if(isset($_SESSION['validation'])) { - print base64_decode('PGEgaHJlZj0naHR0cDovL3d3dy5zdWdhcmNybS5jb20nPlBPV0VSRUQmbmJzcDtCWSZuYnNwO1NVR0FSQ1JNPC9hPg=='); - } - } + if(isset($_SESSION['validation'])) { + print base64_decode('PGEgaHJlZj0naHR0cDovL3d3dy5zdWdhcmNybS5jb20nPlBPV0VSRUQmbmJzcDtCWSZuYnNwO1NVR0FSQ1JNPC9hPg=='); + } + } - function getArrowStart() { + function getArrowStart() { $imgFileParts = pathinfo(SugarThemeRegistry::current()->getImageURL("arrow.gif")); - return " pngSupport ? "png" : "gif" ); if (!isset($upDown) || empty($upDown)) { - $upDown = ""; + $upDown = ""; } - return " getImageURL("arrow.gif")); + function getArrowEnd() { + $imgFileParts = pathinfo(SugarThemeRegistry::current()->getImageURL("arrow.gif")); list($width,$height) = ListView::getArrowImageSize(); - return '.'.$imgFileParts['extension']."' width='$width' height='$height' align='absmiddle' alt=".translate('LBL_SORT').">"; - } + return '.'.$imgFileParts['extension']."' width='$width' height='$height' align='absmiddle' alt=".translate('LBL_SORT').">"; + } - function getArrowImageSize() { - // just get the non-sort image's size.. the up and down have be the same. - $image = SugarThemeRegistry::current()->getImageURL("arrow.gif",false); + function getArrowImageSize() { + // just get the non-sort image's size.. the up and down have be the same. + $image = SugarThemeRegistry::current()->getImageURL("arrow.gif",false); - $cache_key = 'arrow_size.'.$image; + $cache_key = 'arrow_size.'.$image; - // Check the cache - $result = sugar_cache_retrieve($cache_key); - if(!empty($result)) - return $result; + // Check the cache + $result = sugar_cache_retrieve($cache_key); + if(!empty($result)) + return $result; - // No cache hit. Calculate the value and return. - $result = getimagesize($image); - sugar_cache_put($cache_key, $result); - return $result; - } + // No cache hit. Calculate the value and return. + $result = getimagesize($image); + sugar_cache_put($cache_key, $result); + return $result; + } - function getOrderByInfo($html_varName) - { - $orderBy = $this->getSessionVariable($html_varName, "OBL"); - $desc = $this->getSessionVariable($html_varName, $orderBy.'S'); - $orderBy = str_replace('.', '_', $orderBy); - return array($orderBy,$desc); - } + function getOrderByInfo($html_varName) + { + $orderBy = $this->getSessionVariable($html_varName, "OBL"); + $desc = $this->getSessionVariable($html_varName, $orderBy.'S'); + $orderBy = str_replace('.', '_', $orderBy); + return array($orderBy,$desc); + } - function processSortArrows($html_varName) - { + function processSortArrows($html_varName) + { - $this->xTemplateAssign("arrow_start", $this->getArrowStart()); + $this->xTemplateAssign("arrow_start", $this->getArrowStart()); - list($orderBy,$desc) = $this->getOrderByInfo($html_varName); + list($orderBy,$desc) = $this->getOrderByInfo($html_varName); - $imgArrow = "_down"; - if($desc) { - $imgArrow = "_up"; - } + $imgArrow = "_down"; + if($desc) { + $imgArrow = "_up"; + } - if($orderBy == 'amount*1') - { - $this->xTemplateAssign('amount_arrow', $imgArrow); - } - else if($orderBy == 'amount_usdollar*1') - { - $this->xTemplateAssign('amount_usdollar_arrow', $imgArrow); - } - else - { - $this->xTemplateAssign($orderBy.'_arrow', $imgArrow); - } + if($orderBy == 'amount*1') + { + $this->xTemplateAssign('amount_arrow', $imgArrow); + } + else if($orderBy == 'amount_usdollar*1') + { + $this->xTemplateAssign('amount_usdollar_arrow', $imgArrow); + } + else + { + $this->xTemplateAssign($orderBy.'_arrow', $imgArrow); + } - $this->xTemplateAssign('arrow_end', $this->getArrowEnd()); - } + $this->xTemplateAssign('arrow_end', $this->getArrowEnd()); + } - // this is where translation happens for dynamic list views - function loadListFieldDefs(&$subpanel_fields,&$child_focus) - { - $this->list_field_defs = $subpanel_fields; - - for($i=0;$i < count($this->list_field_defs);$i++) - { - $list_field = $this->list_field_defs[$i]; - $field_def = null; - $key = ''; - if(!empty($list_field['vname'])) - { - $key = $list_field['vname']; - } else if(isset($list_field['name']) && isset($child_focus->field_defs[$list_field['name']])) - { - $field_def = $child_focus->field_defs[$list_field['name']]; - $key = $field_def['vname']; - } - if(!empty($key)) - { - $list_field['label'] = translate($key,$child_focus->module_dir); - $this->list_field_defs[$i]['label'] = preg_replace('/:$/','',$list_field['label']); - } - else - { - $this->list_field_defs[$i]['label'] =' '; - } - } - } + // this is where translation happens for dynamic list views + function loadListFieldDefs(&$subpanel_fields,&$child_focus) + { + $this->list_field_defs = $subpanel_fields; + + for($i=0;$i < count($this->list_field_defs);$i++) + { + $list_field = $this->list_field_defs[$i]; + $field_def = null; + $key = ''; + if(!empty($list_field['vname'])) + { + $key = $list_field['vname']; + } else if(isset($list_field['name']) && isset($child_focus->field_defs[$list_field['name']])) + { + $field_def = $child_focus->field_defs[$list_field['name']]; + $key = $field_def['vname']; + } + if(!empty($key)) + { + $list_field['label'] = translate($key,$child_focus->module_dir); + $this->list_field_defs[$i]['label'] = preg_replace('/:$/','',$list_field['label']); + } + else + { + $this->list_field_defs[$i]['label'] =' '; + } + } + } function unique_id() { - return sugar_microtime(); + return sugar_microtime(); } /**INTERNAL FUNCTION sets a session variable keeping it local to the listview @@ -1739,8 +1728,8 @@ function getUserVariable($localVarName, $varName) { */ function getLocalSessionVariable($localVarName,$varName) { if(isset($_SESSION[$localVarName."_".$varName])) { - return $_SESSION[$localVarName."_".$varName]; - } + return $_SESSION[$localVarName."_".$varName]; + } else{ return ""; } @@ -1749,8 +1738,8 @@ function getUserVariable($localVarName, $varName) { /* Set to true if you want Additional Details to appear in the listview */ function setAdditionalDetails($value = true, $function = '') { - if(!empty($function)) $this->additionalDetailsFunction = $function; - $this->_additionalDetails = $value; + if(!empty($function)) $this->additionalDetailsFunction = $function; + $this->_additionalDetails = $value; } } diff --git a/include/ListView/ListViewDCMenu.tpl b/include/ListView/ListViewDCMenu.tpl deleted file mode 100644 index d28de352..00000000 --- a/include/ListView/ListViewDCMenu.tpl +++ /dev/null @@ -1,189 +0,0 @@ - {* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - - - -*} - - -
"; + if ($subpanel_def != null) { + include_once('include/SubPanel/SubPanelTiles.php'); + $subpanelTiles = new SubPanelTiles($sugarbean); + $html_text .= "\n"; - $html_text .= "\n"; - $this->xTemplate->assign("PAGINATION",$html_text); - } - - //C.L. - Fix for 23461 - if(empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') { - $_SESSION['export_where'] = $this->query_where; - } - $this->xTemplate->parse($xtemplateSection.".list_nav_row"); - } - } // end processListNavigation - - function processOrderBy($html_varName) { - - if(!isset($this->base_URL)) { - $this->base_URL = $_SERVER['PHP_SELF']; - - if(isset($_SERVER['QUERY_STRING'])) { - $this->base_URL = preg_replace("/\&".$this->getSessionVariableName($html_varName,"ORDER_BY")."=[0-9a-zA-Z\_\.]*/","",$this->base_URL .'?'.$_SERVER['QUERY_STRING']); - $this->base_URL = preg_replace("/\&".$this->getSessionVariableName($html_varName,"offset")."=[0-9]*/","",$this->base_URL); - } - if($_SERVER['REQUEST_METHOD'] == 'POST') { - $this->base_URL .= '?'; - if(isset($_REQUEST['action'])) $this->base_URL .= '&action='.$_REQUEST['action']; - if(isset($_REQUEST['record'])) $this->base_URL .= '&record='.$_REQUEST['record']; - if(isset($_REQUEST['module'])) $this->base_URL .= '&module='.$_REQUEST['module']; - } - $this->base_URL .= "&".$this->getSessionVariableName($html_varName,"offset")."="; - } - - if($this->is_dynamic) { - $this->base_URL.='&to_pdf=true&action=SubPanelViewer&subpanel=' . $this->source_module; - } - - $sort_URL_base = $this->base_URL. "&".$this->getSessionVariableName($html_varName,"ORDER_BY")."="; + } + else { + $html_text .= "
"; //attempt to get the query to recreate this subpanel if(!empty($this->response)){ - $response =& $this->response; - }else{ - $response = SugarBean::get_union_related_list($sugarbean,$this->sortby, $this->sort_order, $this->query_where, $current_offset, -1,-1,$this->query_limit,$subpanel_def); - $this->response = $response; - } + $response =& $this->response; + }else{ + $response = SugarBean::get_union_related_list($sugarbean,$this->sortby, $this->sort_order, $this->query_where, $current_offset, -1,-1,$this->query_limit,$subpanel_def); + $this->response = $response; + } //if query is present, then pass it in as parameter if (isset($response['query']) && !empty($response['query'])){ $html_text .= $subpanelTiles->get_buttons($subpanel_def, $response['query']); }else{ $html_text .= $subpanelTiles->get_buttons($subpanel_def); } - } - else { - $html_text .= "\n
$select_link $export_link $delete_link $selected_objects_span"; - } - $html_text .= "".$start_link."  ".$previous_link."  (".$start_record." - ".$end_record." ".$this->local_app_strings['LBL_LIST_OF']." ".$row_count.")  ".$next_link."  ".$end_link."
\n"; - $html_text .= "
\n
$select_link $export_link $delete_link $selected_objects_span"; + } + $html_text .= "".$start_link."  ".$previous_link."  (".$start_record." - ".$end_record." ".$this->local_app_strings['LBL_LIST_OF']." ".$row_count.")  ".$next_link."  ".$end_link."
\n"; + $html_text .= "
- - - - -
- - - -
- - - - {if $prerow} - - {/if} - {if $favorites} - - {/if} - {if !empty($quickViewLinks)} - - {/if} - {counter start=0 name="colCounter" print=false assign="colCounter"} - {foreach from=$displayColumns key=colHeader item=params} - - {counter name="colCounter"} - {/foreach} - - - - {counter start=$pageData.offsets.current print=false assign="offset" name="offset"} - {foreach name=rowIteration from=$data key=id item=rowData} - {counter name="offset" print=false} - - {if $smarty.foreach.rowIteration.iteration is odd} - {assign var='_rowColor' value=$rowColor[0]} - {else} - {assign var='_rowColor' value=$rowColor[1]} - {/if} - - {if $prerow} - - {/if} - {if $favorites} - - {/if} - {if !empty($quickViewLinks)} - - {/if} - {counter start=0 name="colCounter" print=false assign="colCounter"} - {foreach from=$displayColumns key=col item=params} - {strip} - - {/strip} - {counter name="colCounter"} - {/foreach} - - {foreachelse} - - - - {/foreach} -
-
- - {$selectLink} -
-
-   -   -
- {if false} - {if $params.url_sort} - - {else} - {if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy} - - {else} - - {/if} - {/if} - {sugar_translate label=$params.label module=$pageData.bean.moduleDir} -    - {if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy} - {if $pageData.ordering.sortOrder == 'ASC'} - {capture assign="imageName"}arrow_down.{$arrowExt}{/capture} - {$arrowAlt} - {else} - {capture assign="imageName"}arrow_up.{$arrowExt}{/capture} - {$arrowAlt} - {/if} - {else} - {capture assign="imageName"}arrow.{$arrowExt}{/capture} - {$arrowAlt} - {/if} - {else} - {if !isset($params.noHeader) || $params.noHeader == false} - {sugar_translate label=$params.label module=$pageData.bean.moduleDir} - {/if} - {/if} -
-
- {if !$is_admin && is_admin_for_user && $rowData.IS_ADMIN==1} - - {else} - - {/if} - {$rowData.star}{if $pageData.access.edit}{/if} - {if $col == 'NAME' || $params.bold}{/if} - {if $params.link && !$params.customCode} - <{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN} href='index.php?action={$params.action|default:'DetailView'}&module={if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}&record={$rowData[$params.id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}'> - {/if} - {if $params.customCode} - {sugar_evalcolumn_old var=$params.customCode rowData=$rowData} - {else} - {sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col} - {/if} - {if empty($rowData.$col) && empty($params.customCode)} {/if} - {if $params.link && !$params.customCode} - - {/if} - {if $col == 'NAME' || $params.bold}{/if} -
- {$APP.LBL_NO_DATA} -
\ No newline at end of file diff --git a/include/ListView/ListViewData.php b/include/ListView/ListViewData.php index f3452178..553bb1f3 100644 --- a/include/ListView/ListViewData.php +++ b/include/ListView/ListViewData.php @@ -79,7 +79,7 @@ class ListViewData { $monitor->setValue('item_summary', "lvso=".$direction."&".$this->var_order_by."=".$_REQUEST[$this->var_order_by]); $monitor->setValue('action', 'listview'); $monitor->setValue('user_id', $GLOBALS['current_user']->id); - $monitor->setValue('date_modified', TimeDate::getInstance()->nowDb()); + $monitor->setValue('date_modified', gmdate($GLOBALS['timedate']->get_db_date_time_format())); $monitor->save(); } } @@ -143,7 +143,7 @@ class ListViewData { $blockVariables[] = 'Home2_'.strtoupper($bean).'_ORDER_BY'; } $blockVariables[] = 'Home2_CASE_ORDER_BY'; - // Added mostly for the unit test runners, which may not have these superglobals defined + $params = array(); if ( isset($_POST) && is_array($_POST) ) { $params = array_merge($params,$_POST); @@ -152,7 +152,7 @@ class ListViewData { $params = array_merge($params,$_GET); } foreach($params as $name=>$value) { - if(!in_array($name, $blockVariables)){ + if(!in_array($name, $blockVariables)){ if(is_array($value)) { foreach($value as $v) { $base_url .= $name.urlencode('[]').'='.urlencode($v) . '&'; @@ -275,35 +275,28 @@ class ListViewData { // Bug 22740 - Tweak this check to strip off the table name off the order by parameter. // Samir Gandhi : Do not remove the report_cache.date_modified condition as the report list view is broken $orderby = $order['orderBy']; - if (strpos($order['orderBy'],'.') && ($order['orderBy'] != "report_cache.date_modified")) { + if (strpos($order['orderBy'],'.') && ($order['orderBy'] != "report_cache.date_modified")) $orderby = substr($order['orderBy'],strpos($order['orderBy'],'.')+1); - } - if ($orderby != 'date_entered' && !in_array($orderby, array_keys($filter_fields))) { + if($orderby != 'date_entered' && !in_array($orderby, array_keys($filter_fields))){ $order['orderBy'] = ''; $order['sortOrder'] = ''; } - if (empty($order['orderBy'])) { + if(empty($order['orderBy'])) { $orderBy = ''; - } else { + } + else { $orderBy = $order['orderBy'] . ' ' . $order['sortOrder']; //wdong, Bug 25476, fix the sorting problem of Oracle. if (isset($params['custom_order_by_override']['ori_code']) && $order['orderBy'] == $params['custom_order_by_override']['ori_code']) $orderBy = $params['custom_order_by_override']['custom_code'] . ' ' . $order['sortOrder']; } - - if (empty($params['skipOrderSave'])) { // don't save preferences if told so - $current_user->setPreference('listviewOrder', $order, 0, $this->var_name); // save preference - } - - // If $params tells us to override for the special last_name, first_name sorting - if (!empty($params['overrideLastNameOrder']) && $order['orderBy'] == 'last_name') { - $orderBy = 'last_name '.$order['sortOrder'].', first_name '.$order['sortOrder']; - } + if(empty($params['skipOrderSave'])) // don't save preferences if told so + $current_user->setPreference('listviewOrder', $order, 0, $this->var_name); // save preference $ret_array = $seed->create_new_list_query($orderBy, $where, $filter_fields, $params, 0, '', true, $seed, true); $ret_array['inner_join'] = ''; - if (!empty($this->seed->listview_inner_join)) { + if(!empty($this->seed->listview_inner_join)) { $ret_array['inner_join'] = ' ' . implode(' ', $this->seed->listview_inner_join) . ' '; } @@ -402,7 +395,10 @@ class ListViewData { $pageData = array(); - reset($rows); + $additionalDetailsAllow = $this->additionalDetails && $this->seed->ACLAccess('DetailView') && (file_exists('modules/' . $this->seed->module_dir . '/metadata/additionalDetails.php') || file_exists('custom/modules/' . $this->seed->module_dir . '/metadata/additionalDetails.php')); + if($additionalDetailsAllow) $pageData['additionalDetails'] = array(); + $additionalDetailsEdit = $this->seed->ACLAccess('EditView'); + reset($rows); while($row = current($rows)){ $temp = clone $seed; $dataIndex = count($data); @@ -415,11 +411,7 @@ class ListViewData { $pageData['tag'][$dataIndex] = $pageData['tag'][$idIndex[$row[$id_field]][0]]; } $data[$dataIndex] = $temp->get_list_view_data($filter_fields); - $pageData['rowAccess'][$dataIndex] = array('view' => $temp->ACLAccess('DetailView'), 'edit' => $temp->ACLAccess('EditView')); - $additionalDetailsAllow = $this->additionalDetails && $temp->ACLAccess('DetailView') && (file_exists('modules/' . $temp->module_dir . '/metadata/additionalDetails.php') || file_exists('custom/modules/' . $temp->module_dir . '/metadata/additionalDetails.php')); - //if($additionalDetailsAllow) $pageData['additionalDetails'] = array(); - $additionalDetailsEdit = $temp->ACLAccess('EditView'); - if($additionalDetailsAllow) { + if($additionalDetailsAllow) { if($this->additionalDetailsAjax) { $ar = $this->getAdditionalDetailsAjax($data[$dataIndex]['ID']); } diff --git a/include/ListView/ListViewDisplay.php b/include/ListView/ListViewDisplay.php index 81102e6b..a9204d74 100644 --- a/include/ListView/ListViewDisplay.php +++ b/include/ListView/ListViewDisplay.php @@ -72,11 +72,7 @@ class ListViewDisplay { } function shouldProcess($moduleDir){ if(!empty($GLOBALS['sugar_config']['save_query']) && $GLOBALS['sugar_config']['save_query'] == 'populate_only'){ - if(empty($GLOBALS['displayListView']) - && (!empty($_REQUEST['clear_query']) - || $_REQUEST['module'] == $moduleDir - && ((empty($_REQUEST['query']) || $_REQUEST['query'] == 'MSI' ) - && (empty($_SESSION['last_search_mod']) || $_SESSION['last_search_mod'] != $moduleDir ) ))){ + if(empty($GLOBALS['displayListView']) && (!empty($_REQUEST['clear_query']) || $_REQUEST['module'] == $moduleDir && ((empty($_REQUEST['query']) || $_REQUEST['query'] == 'MSI' )&& (empty($_SESSION['last_search_mod']) || $_SESSION['last_search_mod'] != $moduleDir ) ))){ $_SESSION['last_search_mod'] = $_REQUEST['module'] ; $this->should_process = false; return false; @@ -123,17 +119,52 @@ class ListViewDisplay { } $this->seed = $seed; - $filter_fields = $this->setupFilterFields($filter_fields); + // create filter fields based off of display columns + if(empty($filter_fields) || $this->mergeDisplayColumns) { + foreach($this->displayColumns as $columnName => $def) { + + $filter_fields[strtolower($columnName)] = true; + + if(isset($this->seed->field_defs[strtolower($columnName)]['type']) && + strtolower($this->seed->field_defs[strtolower($columnName)]['type']) == 'currency' && + isset($this->seed->field_defs['currency_id'])) { + $filter_fields['currency_id'] = true; + } + + if(!empty($def['related_fields'])) { + foreach($def['related_fields'] as $field) { + //id column is added by query construction function. This addition creates duplicates + //and causes issues in oracle. #10165 + if ($field != 'id') { + $filter_fields[$field] = true; + } + } + } + if (!empty($this->seed->field_defs[strtolower($columnName)]['db_concat_fields'])) { + foreach($this->seed->field_defs[strtolower($columnName)]['db_concat_fields'] as $index=>$field){ + if(!isset($filter_fields[strtolower($field)]) || !$filter_fields[strtolower($field)]) + { + $filter_fields[strtolower($field)] = true; + } + } + } + } + foreach ($this->searchColumns as $columnName => $def ) + { + $filter_fields[strtolower($columnName)] = true; + } + } - $data = $this->lvd->getListViewData($seed, $where, $offset, $limit, $filter_fields, $params, $id_field); + $data = $this->lvd->getListViewData($seed, $where, $offset, $limit, $filter_fields, $params, $id_field); + foreach($this->displayColumns as $columnName => $def) { $seedName = strtolower($columnName); if(!empty($this->lvd->seed->field_defs[$seedName])){ $seedDef = $this->lvd->seed->field_defs[$seedName]; } - + if(empty($this->displayColumns[$columnName]['type'])){ if(!empty($seedDef['type'])){ $this->displayColumns[$columnName]['type'] = (!empty($seedDef['custom_type']))?$seedDef['custom_type']:$seedDef['type']; @@ -141,7 +172,7 @@ class ListViewDisplay { $this->displayColumns[$columnName]['type'] = ''; } }//fi empty(...) - + if(!empty($seedDef['options'])){ $this->displayColumns[$columnName]['options'] = $seedDef['options']; } @@ -178,60 +209,17 @@ class ListViewDisplay { // Merge the two arrays together, making sure the seedDef doesn't override anything explicitly set in the displayColumns array. $this->displayColumns[$columnName] = $this->displayColumns[$columnName] + $seedDef; } - + //C.L. Bug 38388 - ensure that ['id'] is set for related fields if(!isset($this->displayColumns[$columnName]['id']) && isset($this->displayColumns[$columnName]['id_name'])) { $this->displayColumns[$columnName]['id'] = strtoupper($this->displayColumns[$columnName]['id_name']); - } + } } $this->process($file, $data, $seed->object_name); return true; } - function setupFilterFields($filter_fields = array()) - { - // create filter fields based off of display columns - if(empty($filter_fields) || $this->mergeDisplayColumns) { - foreach($this->displayColumns as $columnName => $def) { - - $filter_fields[strtolower($columnName)] = true; - - if(isset($this->seed->field_defs[strtolower($columnName)]['type']) && - strtolower($this->seed->field_defs[strtolower($columnName)]['type']) == 'currency' && - isset($this->seed->field_defs['currency_id'])) { - $filter_fields['currency_id'] = true; - } - - if(!empty($def['related_fields'])) { - foreach($def['related_fields'] as $field) { - //id column is added by query construction function. This addition creates duplicates - //and causes issues in oracle. #10165 - if ($field != 'id') { - $filter_fields[$field] = true; - } - } - } - if (!empty($this->seed->field_defs[strtolower($columnName)]['db_concat_fields'])) { - foreach($this->seed->field_defs[strtolower($columnName)]['db_concat_fields'] as $index=>$field){ - if(!isset($filter_fields[strtolower($field)]) || !$filter_fields[strtolower($field)]) - { - $filter_fields[strtolower($field)] = true; - } - } - } - } - foreach ($this->searchColumns as $columnName => $def ) - { - $filter_fields[strtolower($columnName)] = true; - } - } - - - return $filter_fields; - } - - /** * Any additional processing * @param file File template file to use @@ -247,18 +235,13 @@ class ListViewDisplay { * Display the listview * @return string ListView contents */ - public function display() - { - if (!$this->should_process) { - return ''; - } - + function display() { + if(!$this->should_process) return ''; $str = ''; - if ($this->multiSelect == true && $this->show_mass_update_form) { + if($this->multiSelect == true && $this->show_mass_update_form) $str = $this->mass->getDisplayMassUpdateForm(true, $this->multi_select_popup).$this->mass->getMassUpdateFormHeader($this->multi_select_popup); - } - - return $str; + + return $str; } /** * Display the select link @@ -271,9 +254,9 @@ class ListViewDisplay { $pageTotal = $total; $script = "\n"; $massUpdateRun = isset($_REQUEST['massupdate']) && $_REQUEST['massupdate'] == 'true'; @@ -607,8 +588,7 @@ EOF; $str .= "\n" . "\n". "\n"; - - return $str; + return $str; } } diff --git a/include/ListView/ListViewGeneric.tpl b/include/ListView/ListViewGeneric.tpl index 17b15803..6c58a8ad 100644 --- a/include/ListView/ListViewGeneric.tpl +++ b/include/ListView/ListViewGeneric.tpl @@ -92,9 +92,7 @@ {$arrowAlt} {/if} {else} - {if !isset($params.noHeader) || $params.noHeader == false} - {sugar_translate label=$params.label module=$pageData.bean.moduleDir} - {/if} + {sugar_translate label=$params.label module=$pageData.bean.moduleDir} {/if} @@ -123,12 +121,12 @@
{if $pageData.rowAccess[$id].edit}{/if}{if $pageData.access.edit}{/if} + {if $col == 'NAME' || $params.bold}{/if} {if $params.link && !$params.customCode} <{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN} href="#" onMouseOver="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}', '{$rowData[$params.id]|default:$rowData.ID}', 'd', {$offset}, this)" onFocus="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}', '{$rowData[$params.id]|default:$rowData.ID}', 'd', {$offset}, this)"> @@ -137,7 +135,6 @@ {sugar_evalcolumn_old var=$params.customCode rowData=$rowData} {else} {sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col} - {/if} {if empty($rowData.$col) && empty($params.customCode)} {/if} {if $params.link && !$params.customCode} diff --git a/include/ListView/ListViewSmarty.php b/include/ListView/ListViewSmarty.php index 7ce96d03..7f3b74b7 100644 --- a/include/ListView/ListViewSmarty.php +++ b/include/ListView/ListViewSmarty.php @@ -53,8 +53,6 @@ class ListViewSmarty extends ListViewDisplay{ var $delete = true; var $select = true; var $mailMerge = true; - var $email = true; - var $targetList = false; var $multiSelect = true; var $overlib = true; var $quickViewLinks = true; @@ -115,10 +113,9 @@ class ListViewSmarty extends ListViewDisplay{ $this->ss->assign('recordsLinkString',$app_strings['LBL_LINK_RECORDS']); $this->ss->assign('selectLinkString',$app_strings['LBL_LINK_SELECT']); if($this->overlib) $this->ss->assign('overlib', true); - - // Bug 24677 - Correct the page total amount on the last page of listviews - $pageTotal = $this->data['pageData']['offsets']['next']-$this->data['pageData']['offsets']['current']; - if ( $this->data['pageData']['offsets']['next'] < 0 ) { + + $pageTotal = $this->data['pageData']['offsets']['next'] - $this->data['pageData']['offsets']['current']; + if($this->data['pageData']['offsets']['next'] < 0){ // If we are on the last page, 'next' is -1, which means we have to have a custom calculation $pageTotal = $this->data['pageData']['offsets']['total'] - $this->data['pageData']['offsets']['current']; } if($this->select)$this->ss->assign('selectLink', $this->buildSelectLink('select_link', $this->data['pageData']['offsets']['total'], $pageTotal)); @@ -129,7 +126,7 @@ class ListViewSmarty extends ListViewDisplay{ } $this->ss->assign('quickViewLinks', $this->quickViewLinks); - + // handle save checks and stuff if($this->multiSelect) { @@ -143,10 +140,8 @@ class ListViewSmarty extends ListViewDisplay{ $this->ss->assign('multiSelectData', $this->getMultiSelectData()); } // include button for Adding to Target List if in one of four applicable modules - if ( isset ( $_REQUEST['module']) && in_array ( $_REQUEST['module'] , array ( 'Contacts','Prospects','Leads','Accounts' )) - && ACLController::checkAccess('ProspectLists','edit',true)) { + if ( isset ( $_REQUEST['module']) && in_array ( $_REQUEST['module'] , array ( 'Contacts','Prospects','Leads','Accounts' ))) $this->ss->assign( 'targetLink', $this->buildTargetList() ) ; - } $this->processArrows($data['pageData']['ordering']); $this->ss->assign('prerow', $this->multiSelect); $this->ss->assign('clearAll', $app_strings['LBL_CLEARALL']); @@ -202,7 +197,7 @@ class ListViewSmarty extends ListViewDisplay{ $this->ss->assign('data', $this->data['data']); $this->data['pageData']['offsets']['lastOffsetOnPage'] = $this->data['pageData']['offsets']['current'] + count($this->data['data']); $this->ss->assign('pageData', $this->data['pageData']); - + $navStrings = array('next' => $app_strings['LNK_LIST_NEXT'], 'previous' => $app_strings['LNK_LIST_PREVIOUS'], 'end' => $app_strings['LNK_LIST_END'], diff --git a/include/Localization/Localization.php b/include/Localization/Localization.php index 98f8610d..2e163d82 100644 --- a/include/Localization/Localization.php +++ b/include/Localization/Localization.php @@ -76,8 +76,8 @@ class Localization { ); var $localeNameFormat; var $localeNameFormatDefault; - var $default_export_charset = 'UTF-8'; - var $default_email_charset = 'UTF-8'; + var $default_export_charset = 'CP1252'; // not camel hump to match sugar_config's + var $default_email_charset = 'ISO-8859-1'; var $currencies = array(); // array loaded with current currencies @@ -175,13 +175,13 @@ class Localization { if ( !is_array($load) ) { $q = "SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0"; $r = $db->query($q); - + while($a = $db->fetchByAssoc($r)) { $load = array(); $load['name'] = $a['name']; $load['symbol'] = $a['symbol']; $load['conversion_rate'] = $a['conversion_rate']; - + $this->currencies[$a['id']] = $load; } sugar_cache_put('currency_list',$this->currencies); @@ -405,11 +405,6 @@ class Localization { return $precision; } - function getCurrencySymbol($user=null) { - $dec = $this->getPrecedentPreference('default_currency_symbol', $user); - return $dec; - } - /** * returns a number formatted by user preference or system default * @param string number Number to be formatted and returned @@ -424,12 +419,12 @@ class Localization { $dec = $this->getDecimalSeparator($user); $thou = $this->getNumberGroupingSeparator($user); $precision = $this->getPrecision($user); - $symbol = empty($currencySymbol) ? $this->getCurrencySymbol($user) : $currencySymbol; + $symbol = empty($currencySymbol) ? $this->getCurrencySymbol() : $currencySymbol; $exNum = explode($dec, $number); // handle grouping if(is_array($exNum) && count($exNum) > 0) { - if(strlen($exNum[0]) > 3) { + if(strlen($exNum) > 3) { $offset = strlen($exNum[0]) % 3; if($offset > 0) { for($i=0; $i<$offset; $i++) { @@ -567,13 +562,13 @@ eoq; * sfl is "Salutation FirstName LastName", "l, f s" is "LastName[comma][space]FirstName[space]Salutation" * @param object user object * @param bool returnEmptyStringIfEmpty true if we should return back an empty string rather than a single space - * when the formatted name would be blank + * when the formatted name would be blank * @return string formattedName */ function getLocaleFormattedName($firstName, $lastName, $salutationKey='', $title='', $format="", $user=null, $returnEmptyStringIfEmpty = false) { global $current_user; global $app_list_strings; - + if ( $user == null ) { $user = $current_user; } @@ -591,19 +586,6 @@ eoq; $names['s'] = (empty($salutation) && $salutation != 0) ? '' : $salutation; $names['t'] = (empty($title) && $title != 0) ? '' : $title; - //Bug: 39936 - if all of the inputs are empty, then don't try to format the name. - $allEmpty = true; - foreach($names as $key => $val){ - if(!empty($val)){ - $allEmpty = false; - break; - } - } - if($allEmpty){ - return $returnEmptyStringIfEmpty ? '' : ' '; - } - //end Bug: 39936 - if(empty($format)) { $this->localeNameFormat = $this->getLocaleFormatMacro($user); } else { @@ -673,8 +655,8 @@ eoq; } //// END NAME DISPLAY FORMATTING CODE /////////////////////////////////////////////////////////////////////////// - - /** + + /** * Attempts to detect the charset used in the string * * @param $str string @@ -686,7 +668,7 @@ eoq; { if ( function_exists('mb_convert_encoding') ) return mb_detect_encoding($str,'ASCII,JIS,UTF-8,EUC-JP,SJIS,ISO-8859-1'); - + return false; } } // end class def diff --git a/include/MVC/Controller/SugarController.php b/include/MVC/Controller/SugarController.php index c6ddcdf3..25aaf710 100644 --- a/include/MVC/Controller/SugarController.php +++ b/include/MVC/Controller/SugarController.php @@ -220,8 +220,7 @@ class SugarController{ /** * Given a record id load the bean. This bean is accessible from any sub controllers. */ - public function loadBean() - { + public function loadBean(){ if(!empty($GLOBALS['beanList'][$this->module])){ $class = $GLOBALS['beanList'][$this->module]; if(!empty($GLOBALS['beanFiles'][$class])){ @@ -458,6 +457,9 @@ class SugarController{ foreach($this->bean->field_defs as $field => $properties) { $type = !empty($properties['custom_type']) ? $properties['custom_type'] : $properties['type']; $sf = $sfh->getSugarField(ucfirst($type), true); + if($sf != null){ + $sf->save($this->bean, $_POST, $field, $properties); + } if(isset($_POST[$field])) { if(is_array($_POST[$field]) && !empty($properties['isMultiSelect'])) { if(empty($_POST[$field][0])) { @@ -469,9 +471,6 @@ class SugarController{ } else if(!empty($properties['isMultiSelect']) && !isset($_POST[$field]) && isset($_POST[$field . '_multiselect'])) { $this->bean->$field = ''; } - if($sf != null){ - $sf->save($this->bean, $_POST, $field, $properties); - } } foreach($this->bean->relationship_fields as $field=>$link){ diff --git a/include/MVC/Controller/entry_point_registry.php b/include/MVC/Controller/entry_point_registry.php index 71d32d02..d8ea3e78 100644 --- a/include/MVC/Controller/entry_point_registry.php +++ b/include/MVC/Controller/entry_point_registry.php @@ -55,6 +55,16 @@ $entry_point_registry = array( 'json_server' => array('file' => 'json_server.php', 'auth' => true), 'HandleAjaxCall' => array('file' => 'HandleAjaxCall.php', 'auth' => true), 'TreeData' => array('file' => 'TreeData.php', 'auth' => true), + 'oc_convert' => array('file' => 'oc_convert.php', 'auth' => false), + 'ExampleLeadCapture' => array('file' => 'examples/ExampleLeadCapture.php', 'auth' => false), + 'FormValidationTest' => array('file' => 'examples/FormValidationTest.php', 'auth' => false), + 'ProgressBarTest' => array('file' => 'examples/ProgressBarTest.php', 'auth' => false), + 'SoapFullTest' => array('file' => 'examples/SoapFullTest.php', 'auth' => false), + 'SoapFullTest_Version2.php' => array('file' => 'examples/SoapFullTest.php', 'auth' => false), + 'SoapPortalFullTest' => array('file' => 'examples/SoapPortalFullTest.php', 'auth' => false), + 'SoapTest' => array('file' => 'examples/SoapTest.php', 'auth' => false), + 'SoapTestPortal' => array('file' => 'examples/SoapTestPortal.php', 'auth' => false), + 'SoapTestPortal2' => array('file' => 'examples/SoapTestPortal2.php', 'auth' => false), 'image' => array('file' => 'modules/Campaigns/image.php', 'auth' => false), 'campaign_trackerv2' => array('file' => 'modules/Campaigns/Tracker.php', 'auth' => false), 'WebToLeadCapture' => array('file' => 'modules/Campaigns/WebToLeadCapture.php', 'auth' => false), @@ -65,10 +75,11 @@ $entry_point_registry = array( 'zipatcher' => array('file' => 'zipatcher.php', 'auth' => true), 'mm_get_doc' => array('file' => 'modules/MailMerge/get_doc.php', 'auth' => true), 'getImage' => array('file' => 'include/SugarTheme/getImage.php', 'auth' => false), + 'getCSS' => array('file' => 'include/SugarTheme/getCSS.php', 'auth' => false), 'GenerateQuickComposeFrame' => array('file' => 'modules/Emails/GenerateQuickComposeFrame.php', 'auth' => true), 'DetailUserRole' => array('file' => 'modules/ACLRoles/DetailUserRole.php', 'auth' => true), 'getYUIComboFile' => array('file' => 'include/javascript/getYUIComboFile.php', 'auth' => false), - 'UploadFileCheck' => array('file' => 'modules/Configurator/UploadFileCheck.php', 'auth' => true), + 'UploadFileCheck' => array('file' => 'modules/Configurator/UploadFileCheck.php', 'auth' => false), 'SAML'=> array('file' => 'modules/Users/authentication/SAMLAuthenticate/index.php', 'auth' => false), ); ?> diff --git a/include/MVC/SugarApplication.php b/include/MVC/SugarApplication.php index 16741469..8140b1b5 100644 --- a/include/MVC/SugarApplication.php +++ b/include/MVC/SugarApplication.php @@ -42,17 +42,17 @@ */ require_once('include/MVC/Controller/ControllerFactory.php'); require_once('include/MVC/View/ViewFactory.php'); - + class SugarApplication -{ +{ var $controller = null; var $headerDisplayed = false; var $default_module = 'Home'; var $default_action = 'index'; - + function SugarApplication() {} - + /** * Perform execution of the application. This method is called from index2.php */ @@ -66,14 +66,14 @@ class SugarApplication $this->setupPrint(); $this->controller = ControllerFactory::getController($module); // if the entry point is defined to not need auth, then don't authenicate - if( empty($_REQUEST['entryPoint']) + if( empty($_REQUEST['entryPoint']) || $this->controller->checkEntryPointRequiresAuth($_REQUEST['entryPoint']) ){ $this->loadUser(); $this->ACLFilter(); $this->preProcess(); $this->controller->preProcess(); } - + SugarThemeRegistry::buildRegistry(); $this->loadLanguages(); $this->checkDatabaseVersion(); @@ -81,11 +81,11 @@ class SugarApplication $this->loadLicense(); $this->loadGlobals(); $this->setupResourceManagement($module); - $this->checkHTTPReferer(); + $this->checkHTTPReferer(); $this->controller->execute(); sugar_cleanup(); } - + /** * Load the authenticated user. If there is not an authenticated user then redirect to login screen. */ @@ -95,13 +95,13 @@ class SugarApplication $user_unique_key = (isset($_SESSION['unique_key'])) ? $_SESSION['unique_key'] : ''; $server_unique_key = (isset($sugar_config['unique_key'])) ? $sugar_config['unique_key'] : ''; $allowed_actions = (!empty($this->controller->allowed_actions)) ? $this->controller->allowed_actions : $allowed_actions = array('Authenticate', 'Login',); - - if(($user_unique_key != $server_unique_key) && (!in_array($this->controller->action, $allowed_actions)) && - (!isset($_SESSION['login_error']))) + + if(($user_unique_key != $server_unique_key) && (!in_array($this->controller->action, $allowed_actions)) && + (!isset($_SESSION['login_error']))) { session_destroy(); $post_login_nav = ''; - + if(!empty($this->controller->module)){ $post_login_nav .= '&login_module='.$this->controller->module; } @@ -118,14 +118,14 @@ class SugarApplication if(!empty($this->controller->record)){ $post_login_nav .= '&login_record='.$this->controller->record; } - + header('Location: index.php?action=Login&module=Users'.$post_login_nav); exit (); } - + $authController = new AuthenticationController((!empty($GLOBALS['sugar_config']['authenticationClass'])? $GLOBALS['sugar_config']['authenticationClass'] : 'SugarAuthenticate')); $GLOBALS['current_user'] = new User(); - if(isset($_SESSION['authenticated_user_id'])){ + if(isset($_SESSION['authenticated_user_id'])){ // set in modules/Users/Authenticate.php if(!$authController->sessionAuthenticate()){ // if the object we get back is null for some reason, this will break - like user prefs are corrupted @@ -140,7 +140,7 @@ class SugarApplication die(); } $GLOBALS['log']->debug('Current user is: '.$GLOBALS['current_user']->user_name); - + //set cookies if(isset($_SESSION['authenticated_user_id'])){ $GLOBALS['log']->debug("setting cookie ck_login_id_20 to ".$_SESSION['authenticated_user_id']); @@ -163,25 +163,26 @@ class SugarApplication self::setCookie('ck_login_language_20', $_SESSION['authenticated_user_language'], time() + 86400 * 90); } //check if user can access - + } - + function ACLFilter(){ ACLController :: filterModuleList($GLOBALS['moduleList']); + ACLController :: filterModuleList($GLOBALS['modInvisListActivities']); } - + /** * setupResourceManagement * This function initialize the ResourceManager and calls the setup method * on the ResourceManager instance. - * + * */ function setupResourceManagement($module) { require_once('include/resource/ResourceManager.php'); $resourceManager = ResourceManager::getInstance(); - $resourceManager->setup($module); + $resourceManager->setup($module); } - + function setupPrint() { $GLOBALS['request_string'] = ''; @@ -189,31 +190,27 @@ class SugarApplication // this handles the issues where values come in one way or the other // without affecting the main super globals $merged = array_merge($_GET, $_POST); - foreach ($merged as $key => $val) + foreach ($merged as $key => $val) { - if(is_array($val)) + if(is_array($val)) { - foreach ($val as $k => $v) + foreach ($val as $k => $v) { - //If an array, then skip the urlencoding. This should be handled with stringify instead. - if(is_array($v)) - continue; - - $GLOBALS['request_string'] .= urlencode($key).'['.$k.']='.urlencode($v).'&'; + $GLOBALS['request_string'] .= urlencode($key).'[]='.urlencode($v).'&'; } - } - else + } + else { $GLOBALS['request_string'] .= urlencode($key).'='.urlencode($val).'&'; } } $GLOBALS['request_string'] .= 'print=true'; } - + function preProcess(){ $config = new Administration; $config->retrieveSettings(); - if(!empty($_SESSION['authenticated_user_id'])){ + if(!empty($_SESSION['authenticated_user_id'])){ if(isset($_SESSION['hasExpiredPassword']) && $_SESSION['hasExpiredPassword'] == '1'){ if( $this->controller->action!= 'Save' && $this->controller->action != 'Logout') { $this->controller->module = 'Users'; @@ -224,22 +221,22 @@ class SugarApplication } }else{ $ut = $GLOBALS['current_user']->getPreference('ut'); - if(empty($ut) - && $this->controller->action != 'AdminWizard' - && $this->controller->action != 'EmailUIAjax' - && $this->controller->action != 'Wizard' - && $this->controller->action != 'SaveAdminWizard' - && $this->controller->action != 'SaveUserWizard' - && $this->controller->action != 'SaveTimezone' + if(empty($ut) + && $this->controller->action != 'AdminWizard' + && $this->controller->action != 'EmailUIAjax' + && $this->controller->action != 'Wizard' + && $this->controller->action != 'SaveAdminWizard' + && $this->controller->action != 'SaveUserWizard' + && $this->controller->action != 'SaveTimezone' && $this->controller->action != 'Logout') { $this->controller->module = 'Users'; $this->controller->action = 'SetTimezone'; $record = $GLOBALS['current_user']->id; }else{ - if($this->controller->action != 'AdminWizard' - && $this->controller->action != 'EmailUIAjax' - && $this->controller->action != 'Wizard' - && $this->controller->action != 'SaveAdminWizard' + if($this->controller->action != 'AdminWizard' + && $this->controller->action != 'EmailUIAjax' + && $this->controller->action != 'Wizard' + && $this->controller->action != 'SaveAdminWizard' && $this->controller->action != 'SaveUserWizard'){ $this->handleOfflineClient(); } @@ -247,23 +244,23 @@ class SugarApplication } } $this->handleAccessControl(); - } - + } + function handleOfflineClient(){ if(isset($GLOBALS['sugar_config']['disc_client']) && $GLOBALS['sugar_config']['disc_client']){ if(isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveTimezone'){ if (!file_exists('modules/Sync/file_config.php')){ - if($_REQUEST['action'] != 'InitialSync' && $_REQUEST['action'] != 'Logout' && + if($_REQUEST['action'] != 'InitialSync' && $_REQUEST['action'] != 'Logout' && ($_REQUEST['action'] != 'Popup' && $_REQUEST['module'] != 'Sync')){ //echo $_REQUEST['action']; - //die(); + //die(); $this->controller->module = 'Sync'; $this->controller->action = 'InitialSync'; } }else{ require_once ('modules/Sync/file_config.php'); if(isset($file_sync_info['is_first_sync']) && $file_sync_info['is_first_sync']){ - if($_REQUEST['action'] != 'InitialSync' && $_REQUEST['action'] != 'Logout' && + if($_REQUEST['action'] != 'InitialSync' && $_REQUEST['action'] != 'Logout' && ( $_REQUEST['action'] != 'Popup' && $_REQUEST['module'] != 'Sync')){ $this->controller->module = 'Sync'; $this->controller->action = 'InitialSync'; @@ -276,7 +273,7 @@ class SugarApplication $GLOBALS['current_user']->is_admin = '0'; //No admins for disc client } } - + /** * Handles everything related to authorization. */ @@ -290,21 +287,21 @@ class SugarApplication && (empty($GLOBALS['adminOnlyList'][$this->controller->module][$this->controller->action]) || $GLOBALS['adminOnlyList'][$this->controller->module][$this->controller->action] != 'allow')) { $this->controller->hasAccess = false; return; - } - - // Bug 20916 - Special case for check ACL access rights for Subpanel QuickCreates - if(isset($_POST['action']) && $_POST['action'] == 'SubpanelCreates') { - $actual_module = $_POST['target_module']; - if(!empty($GLOBALS['modListHeader']) && !in_array($actual_module,$GLOBALS['modListHeader'])) { - $this->controller->hasAccess = false; - } - return; - } + } if(!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']); + + if(in_array($this->controller->module, $GLOBALS['modInvisList']) && + ((in_array('Activities', $GLOBALS['moduleList']) && + in_array('Calendar',$GLOBALS['moduleList'])) && + in_array($this->controller->module, $GLOBALS['modInvisListActivities'])) + ){ + $this->controller->hasAccess = false; + return; + } } - + /** * Load only bare minimum of language that can be done before user init and MVC stuff */ @@ -351,7 +348,7 @@ class SugarApplication if ( empty($row_count) ) { global $sugar_db_version; $version_query = 'SELECT count(*) as the_count FROM config WHERE category=\'info\' AND name=\'sugar_version\''; - + if($GLOBALS['db']->dbType == 'oci8'){ } else if ($GLOBALS['db']->dbType == 'mssql'){ @@ -360,13 +357,13 @@ class SugarApplication else { $version_query .= " AND value = '$sugar_db_version'"; } - + $result = $GLOBALS['db']->query($version_query); $row = $GLOBALS['db']->fetchByAssoc($result, -1, true); $row_count = $row['the_count']; sugar_cache_put('checkDatabaseVersion_row_count', $row_count); } - + if($row_count == 0 && empty($GLOBALS['sugar_config']['disc_client'])){ $sugar_version = $GLOBALS['sugar_version']; if ( $dieOnFailure ) @@ -374,20 +371,20 @@ class SugarApplication else return false; } - + return true; } - + /** * Load the themes/images. */ function loadDisplaySettings() { global $theme; - + // load the user's default theme $theme = $GLOBALS['current_user']->getPreference('user_theme'); - + if (is_null($theme)) { $theme = $GLOBALS['sugar_config']['default_theme']; if(!empty($_SESSION['authenticated_user_theme'])){ @@ -410,22 +407,22 @@ class SugarApplication SugarThemeRegistry::set($theme); require_once('include/utils/layout_utils.php'); $GLOBALS['image_path'] = SugarThemeRegistry::current()->getImagePath().'/'; - if ( defined('TEMPLATE_URL') ) + if ( defined('TEMPLATE_URL') ) $GLOBALS['image_path'] = TEMPLATE_URL . '/'. $GLOBALS['image_path']; - + if ( isset($GLOBALS['current_user']) ) { $GLOBALS['gridline'] = (int) ($GLOBALS['current_user']->getPreference('gridline') == 'on'); $GLOBALS['current_user']->setPreference('user_theme', $theme, 0, 'global'); } } - + function loadLicense(){ loadLicense(); global $user_unique_key, $server_unique_key; $user_unique_key = (isset($_SESSION['unique_key'])) ? $_SESSION['unique_key'] : ''; $server_unique_key = (isset($sugar_config['unique_key'])) ? $sugar_config['unique_key'] : ''; } - + function loadGlobals(){ global $currentModule; $currentModule = $this->controller->module; @@ -436,13 +433,12 @@ class SugarApplication } } /** - * + * * Checks a request to ensure the request is coming from a valid source or it is for one of the white listed actions */ - protected function checkHTTPReferer($dieIfInvalid = true) - { + function checkHTTPReferer(){ global $sugar_config; - $whiteListActions = (!empty($sugar_config['http_referer']['actions']))?$sugar_config['http_referer']['actions']:array('index', 'ListView', 'DetailView', 'EditView','oauth'); + $whiteListActions = (!empty($sugar_config['http_referer']['actions']))?$sugar_config['http_referer']['actions']:array('index', 'ListView', 'DetailView', 'EditView'); // Bug 39691 - Make sure localhost and 127.0.0.1 are always valid HTTP referers $whiteListReferers = array('127.0.0.1','localhost'); if(!empty($_SERVER['SERVER_ADDR']))$whiteListReferers[] = $_SERVER['SERVER_ADDR']; @@ -451,27 +447,41 @@ class SugarApplication } if(!empty($_SERVER['HTTP_REFERER']) && !empty($_SERVER['SERVER_NAME'])){ $http_ref = parse_url($_SERVER['HTTP_REFERER']); - if($http_ref['host'] !== $_SERVER['SERVER_NAME'] && !in_array($this->controller->action, $whiteListActions) && - (empty($whiteListReferers) || !in_array($http_ref['host'], $whiteListReferers))){ - if ( $dieIfInvalid ) { - header("Cache-Control: no-cache, must-revalidate"); - $whiteListActions[] = $this->controller->action; - $whiteListString = "'" . implode("', '", $whiteListActions) . "'"; - $ss = new Sugar_Smarty; - $ss->assign('host',$http_ref['host']); - $ss->assign('action',$this->controller->action); - $ss->assign('whiteListString',$whiteListString); - $ss->display('include/MVC/View/tpls/xsrf.tpl'); - sugar_cleanup(true); - } - return false; + if($http_ref['host'] !== $_SERVER['SERVER_NAME'] && !in_array($this->controller->action, $whiteListActions) && + (empty($whiteListReferers) || !in_array($http_ref['host'], $whiteListReferers))){ + header("Cache-Control: no-cache, must-revalidate"); + $whiteListActions[] = $this->controller->action; + $whiteListString = "'" . implode("', '", $whiteListActions) . "'"; + + echo << +

Possible Cross Site Request Forgery (XSRF) Attack Detected

+

If you think this is a mistake please ask your administrator to add the following site to the acceptable referer list

+

{$http_ref['host']}

+

Click here for directions to add this site to the acceptable referer list

+ + + + +EOQ; + sugar_cleanup(true); } } - - return true; - } + } function startSession() - { + { $sessionIdCookie = isset($_COOKIE['PHPSESSID']) ? $_COOKIE['PHPSESSID'] : null; if(isset($_REQUEST['MSID'])) { session_id($_REQUEST['MSID']); @@ -491,16 +501,16 @@ class SugarApplication session_start(); } } - - if ( isset($_REQUEST['login_module']) && isset($_REQUEST['login_action']) + + if ( isset($_REQUEST['login_module']) && isset($_REQUEST['login_action']) && !($_REQUEST['login_module'] == 'Home' && $_REQUEST['login_action'] == 'index') ) { if ( !is_null($sessionIdCookie) && empty($_SESSION) ) { self::setCookie('loginErrorMessage', 'LBL_SESSION_EXPIRED', time()+30, '/'); } } - + } - + function endSession(){ session_destroy(); } @@ -528,32 +538,7 @@ class SugarApplication } exit(); } - - /** - * Redirect to another URL - * - * @access public - * @param string $url The URL to redirect to - */ - public static function appendErrorMessage($error_message) - { - if (empty($_SESSION['user_error_message']) || !is_array($_SESSION['user_error_message'])){ - $_SESSION['user_error_message'] = array(); - } - $_SESSION['user_error_message'][] = $error_message; - } - - public static function getErrorMessages() - { - if (isset($_SESSION['user_error_message']) && is_array($_SESSION['user_error_message']) ) { - $msgs = $_SESSION['user_error_message']; - unset($_SESSION['user_error_message']); - return $msgs; - }else{ - return array(); - } - } - + /** * Wrapper for the PHP setcookie() function, to handle cases where headers have * already been sent @@ -573,10 +558,10 @@ class SugarApplication $domain = $_SERVER["HTTP_HOST"]; else $domain = 'localhost'; - + if (!headers_sent()) setcookie($name,$value,$expire,$path,$domain,$secure,$httponly); - + $_COOKIE[$name] = $value; } } diff --git a/include/MVC/SugarModule.php b/include/MVC/SugarModule.php index 9b9a9a35..5da7c0d8 100644 --- a/include/MVC/SugarModule.php +++ b/include/MVC/SugarModule.php @@ -82,38 +82,24 @@ class SugarModule * * @return object */ - public function loadBean($beanList = null, $beanFiles = null, $returnObject = true) + public function loadBean() { - // Populate these reference arrays - if ( empty($beanList) ) { - global $beanList; - } - if ( empty($beanFiles) ) { - global $beanFiles; - } - if ( !isset($beanList) || !isset($beanFiles) ) { - require('include/modules.php'); - } + global $beanList, $beanFiles; + if ( !isset($beanList) || !isset($beanFiles) ) + require('include/modules.php'); + if ( isset($beanList[$this->_moduleName]) ) { $bean = $beanList[$this->_moduleName]; if (isset($beanFiles[$bean])) { - if ( !$returnObject ) { - return true; - } - if ( !sugar_is_file($beanFiles[$bean]) ) { - return false; - } require_once($beanFiles[$bean]); $focus = new $bean; } - else { + else return false; - } } - else { + else return false; - } return $focus; } diff --git a/include/MVC/View/SugarView.php b/include/MVC/View/SugarView.php index 7f595d85..564cba6b 100644 --- a/include/MVC/View/SugarView.php +++ b/include/MVC/View/SugarView.php @@ -45,7 +45,7 @@ class SugarView /** * The name of the current module. */ - var $module = ''; + var $module = ''; /** * The name of the current action. */ @@ -62,11 +62,6 @@ class SugarView * Any errors that occured this can either be set by the view or the controller or the model */ var $errors = array(); - /** - * Set to true if you do not want to display errors from SugarView::displayErrors(); instead they will be returned - */ - var $suppressDisplayErrors = false; - /** * Options for what UI elements to hide/show/ */ @@ -74,29 +69,29 @@ class SugarView var $type = null; var $responseTime; var $fileResources; - + /** * Constructor which will peform the setup. */ public function SugarView( - $bean = null, + $bean = null, $view_object_map = array() ) { } public function init( - $bean = null, + $bean = null, $view_object_map = array() ) { - $this->bean = $bean; + $this->bean = &$bean; $this->view_object_map = $view_object_map; $this->action = $GLOBALS['action']; $this->module = $GLOBALS['module']; $this->_initSmarty(); } - + protected function _initSmarty() { $this->ss = new Sugar_Smarty(); @@ -110,17 +105,17 @@ class SugarView public function process() { LogicHook::initialize(); - $this->_checkModule(); - + $this->_checkModule(); + //trackView has to be here in order to track for breadcrumbs $this->_trackView(); - + if ($this->_getOption('show_header')) { $this->displayHeader(); } else { - $this->renderJavascript(); + $this->renderJavascript(); } - + $this->_buildModuleList(); $this->preDisplay(); $this->displayErrors(); @@ -129,7 +124,7 @@ class SugarView if ($this->_getOption('show_subpanels')) $this->_displaySubPanels(); if ($this->action === 'Login') { //this is needed for a faster loading login page ie won't render unless the tables are closed - ob_flush(); + ob_flush(); } if ($this->_getOption('show_footer')) $this->displayFooter(); $GLOBALS['logic_hook']->call_custom_logic('', 'after_ui_footer'); @@ -142,17 +137,8 @@ class SugarView */ public function displayErrors() { - $errors = ''; - foreach($this->errors as $error) { - $errors .= '' . $error . '
'; - } - - if ( !$this->suppressDisplayErrors ) { - echo $errors; - } - else { - return $errors; + echo '' . $error . '
'; } } @@ -181,38 +167,38 @@ class SugarView /** * trackView */ - protected function _trackView() + protected function _trackView() { - $action = strtolower($this->action); - //Skip save, tracked in SugarBean instead - if($action == 'save') { - return; - } - + $action = strtolower($this->action); + //Skip save, tracked in SugarBean instead + if($action == 'save') { + return; + } + $trackerManager = TrackerManager::getInstance(); - $timeStamp = TimeDate::getInstance()->nowDb(); - if($monitor = $trackerManager->getMonitor('tracker')){ - $monitor->setValue('action', $action); - $monitor->setValue('user_id', $GLOBALS['current_user']->id); - $monitor->setValue('module_name', $this->module); - $monitor->setValue('date_modified', $timeStamp); - $monitor->setValue('visible', (($monitor->action == 'detailview') || ($monitor->action == 'editview') - ) ? 1 : 0); - - if (!empty($this->bean->id)) { - $monitor->setValue('item_id', $this->bean->id); - $monitor->setValue('item_summary', $this->bean->get_summary_text()); - } - - //If visible is true, but there is no bean, do not track (invalid/unauthorized reference) - //Also, do not track save actions where there is no bean id - if($monitor->visible && empty($this->bean->id)) { - $trackerManager->unsetMonitor($monitor); - return; - } - $trackerManager->saveMonitor($monitor, true, true); - } + $timeStamp = gmdate($GLOBALS['timedate']->get_db_date_time_format()); + if($monitor = $trackerManager->getMonitor('tracker')){ + $monitor->setValue('action', $action); + $monitor->setValue('user_id', $GLOBALS['current_user']->id); + $monitor->setValue('module_name', $this->module); + $monitor->setValue('date_modified', $timeStamp); + $monitor->setValue('visible', (($monitor->action == 'detailview') || ($monitor->action == 'editview') + ) ? 1 : 0); + + if (!empty($this->bean->id)) { + $monitor->setValue('item_id', $this->bean->id); + $monitor->setValue('item_summary', $this->bean->get_summary_text()); + } + + //If visible is true, but there is no bean, do not track (invalid/unauthorized reference) + //Also, do not track save actions where there is no bean id + if($monitor->visible && empty($this->bean->id)) { + $trackerManager->unsetMonitor($monitor); + return; + } + $trackerManager->saveMonitor($monitor, true, true); + } } @@ -229,48 +215,48 @@ class SugarView global $app_list_strings; global $mod_strings; global $current_language; - + $GLOBALS['app']->headerDisplayed = true; - + $themeObject = SugarThemeRegistry::current(); $theme = $themeObject->__toString(); - + $ss = new Sugar_Smarty(); $ss->assign("APP", $app_strings); $ss->assign("THEME", $theme); $ss->assign("THEME_IE6COMPAT", $themeObject->ie6compat ? 'true':'false'); $ss->assign("MODULE_NAME", $this->module); - + // get browser title $ss->assign("SYSTEM_NAME", $this->getBrowserTitle()); - + // get css $css = $themeObject->getCSS(); if ($this->_getOption('view_print')) { $css .= ''; } $ss->assign("SUGAR_CSS",$css); - + // get javascript ob_start(); $this->renderJavascript(); $ss->assign("SUGAR_JS",ob_get_contents().$themeObject->getJS()); ob_end_clean(); - + // get favicon - if(isset($GLOBALS['sugar_config']['default_module_favicon'])) + if(isset($GLOBALS['sugar_config']['default_module_favicon'])) $module_favicon = $GLOBALS['sugar_config']['default_module_favicon']; else $module_favicon = false; - + $favicon = ''; - if ( $module_favicon ) + if ( $module_favicon ) $favicon = $themeObject->getImageURL($this->module.'.gif',false); if ( !sugar_is_file($favicon) || !$module_favicon ) $favicon = $themeObject->getImageURL('sugar_icon.ico',false); $ss->assign('FAVICON_URL',getJSPath($favicon)); - + // build the shortcut menu $shortcut_menu = array(); foreach ( $this->getMenu() as $key => $menu_item ) @@ -282,7 +268,7 @@ class SugarView ->getImage($menu_item[2],"alt='".$menu_item[1]."' border='0' align='absmiddle'"), ); $ss->assign("SHORTCUT_MENU",$shortcut_menu); - + // handle rtl text direction if(isset($_REQUEST['RTL']) && $_REQUEST['RTL'] == 'RTL'){ $_SESSION['RTL'] = true; @@ -293,12 +279,12 @@ class SugarView if(isset($_SESSION['RTL']) && $_SESSION['RTL']){ $ss->assign("DIR", 'dir="RTL"'); } - + // handle resizing of the company logo correctly on the fly $companyLogoURL = $themeObject->getImageURL('company_logo.png'); - $companyLogoURL_arr = explode('?', $companyLogoURL); - $companyLogoURL = $companyLogoURL_arr[0]; - + $companyLogoURL_arr = explode('?', $companyLogoURL); + $companyLogoURL = $companyLogoURL_arr[0]; + $company_logo_attributes = sugar_cache_retrieve('company_logo_attributes'); if(!empty($company_logo_attributes)) { $ss->assign("COMPANY_LOGO_MD5", $company_logo_attributes[0]); @@ -335,19 +321,19 @@ class SugarView ); } $ss->assign("COMPANY_LOGO_URL",getJSPath($companyLogoURL)."&logo_md5=".$ss->get_template_vars("COMPANY_LOGO_MD5")); - + // get the global links $gcls = array(); $global_control_links = array(); require("include/globalControlLinks.php"); - + foreach($global_control_links as $key => $value) { if ($key == 'users') { //represents logout link. - $ss->assign("LOGOUT_LINK", $value['linkinfo'][key($value['linkinfo'])]); + $ss->assign("LOGOUT_LINK", $value['linkinfo'][key($value['linkinfo'])]); $ss->assign("LOGOUT_LABEL", key($value['linkinfo']));//key value for first element. continue; } - + foreach ($value as $linkattribute => $attributevalue) { // get the main link info if ( $linkattribute == 'linkinfo' ) { @@ -376,21 +362,21 @@ class SugarView } } $ss->assign("GCLS",$gcls); - + $ss->assign("SEARCH", isset($_REQUEST['query_string']) ? $_REQUEST['query_string'] : ''); - - if ($this->action == "EditView" || $this->action == "Login") + + if ($this->action == "EditView" || $this->action == "Login") $ss->assign("ONLOAD", 'onload="set_focus()"'); $ss->assign("AUTHENTICATED",isset($_SESSION["authenticated_user_id"])); - + // get other things needed for page style popup if (isset($_SESSION["authenticated_user_id"])) { // get the current user name and id $ss->assign("CURRENT_USER", $current_user->full_name == '' || !showFullName() ? $current_user->user_name : $current_user->full_name ); $ss->assign("CURRENT_USER_ID", $current_user->id); - + // get the last viewed records $tracker = new Tracker(); $history = $tracker->get_recently_viewed($current_user->id); @@ -401,22 +387,22 @@ class SugarView } $ss->assign("recentRecords",$history); } - - $bakModStrings = $mod_strings; + + $bakModStrings = $mod_strings; if (isset($_SESSION["authenticated_user_id"]) ) { // get the module list $moduleTopMenu = array(); - + $max_tabs = $current_user->getPreference('max_tabs'); // Attempt to correct if max tabs count is waaay too high. if ( !isset($max_tabs) || $max_tabs <= 0 || $max_tabs > 10 ) { $max_tabs = $GLOBALS['sugar_config']['default_max_tabs']; $current_user->setPreference('max_tabs', $max_tabs, 0, 'global'); } - + $moduleTab = $this->_getModuleTab(); $ss->assign('MODULE_TAB',$moduleTab); - + // See if they are using grouped tabs or not (removed in 6.0, returned in 6.1) $user_navigation_paradigm = $current_user->getPreference('navigation_paradigm'); @@ -438,9 +424,9 @@ class SugarView $iFrame = new iFrame(); $frames = $iFrame->lookup_frames('tab'); foreach($frames as $key => $values){ - $fullModuleList[$key] = $values; + $fullModuleList[$key] = $values; } - } + } elseif (isset($fullModuleList['iFrames'])) { unset($fullModuleList['iFrames']); } @@ -448,23 +434,32 @@ class SugarView if ( $user_navigation_paradigm == 'gm' && isset($themeObject->group_tabs) && $themeObject->group_tabs) { // We are using grouped tabs require_once('include/GroupedTabs/GroupedTabStructure.php'); - $groupedTabsClass = new GroupedTabStructure(); + $groupedTabsClass = new GroupedTabStructure(); $modules = query_module_access_list($current_user); //handle with submoremodules $max_tabs = $current_user->getPreference('max_tabs'); // If the max_tabs isn't set incorrectly, set it within the range, to the default max sub tabs size if ( !isset($max_tabs) || $max_tabs <= 0 || $max_tabs > 10){ // We have a default value. Use it - if(isset($GLOBALS['sugar_config']['default_max_tabs'])){ - $max_tabs = $GLOBALS['sugar_config']['default_max_tabs']; + if(isset($GLOBALS['sugar_config']['default_max_subtabs'])){ + // As of 6.1, we shouldn't have a max subtabs higher than 10. + // If it's larger, bring it down to the max and save it in the config override + if($GLOBALS['sugar_config']['default_max_subtabs'] > 10){ + require_once('modules/Configurator/Configurator.php'); + $configurator = new Configurator(); + $configurator->config['default_max_subtabs'] = '10'; + $configurator->handleOverride(); + $configurator->clearCache(); + } + $max_tabs = $GLOBALS['sugar_config']['default_max_subtabs']; } else{ $max_tabs = 8; } } - - $subMoreModules = false; - $groupTabs = $groupedTabsClass->get_tab_structure(get_val_array($modules)); + + $subMoreModules = false; + $groupTabs = $groupedTabsClass->get_tab_structure(get_val_array($modules)); // We need to put this here, so the "All" group is valid for the user's preference. $groupTabs[$app_strings['LBL_TABGROUP_ALL']]['modules'] = $fullModuleList; @@ -483,7 +478,7 @@ class SugarView $ss->assign('currentGroupTab',$currentGroupTab); $usingGroupTabs = true; - + } else { // Setup the default group tab. $ss->assign('currentGroupTab',$app_strings['LBL_TABGROUP_ALL']); @@ -493,10 +488,10 @@ class SugarView $groupTabs[$app_strings['LBL_TABGROUP_ALL']]['modules'] = $fullModuleList; } - + $topTabList = array(); - + // Now time to go through each of the tab sets and fix them up. foreach ( $groupTabs as $tabIdx => $tabData ) { $topTabs = $tabData['modules']; @@ -504,7 +499,7 @@ class SugarView $topTabs = array(); } $extraTabs = array(); - + // Split it in to the tabs that go across the top, and the ones that are on the extra menu. if ( count($topTabs) > $max_tabs ) { $extraTabs = array_splice($topTabs,$max_tabs); @@ -522,12 +517,10 @@ class SugarView $lastElem = array_splice($topTabs,$max_tabs-1); $extraTabs = $lastElem + $extraTabs; } - if ( !empty($moduleTab) ) { - $topTabs[$moduleTab] = $app_list_strings['moduleList'][$moduleTab]; - } + $topTabs[$moduleTab] = $app_list_strings['moduleList'][$moduleTab]; } - - + + /* // This was removed, but I like the idea, so I left the code in here in case we decide to turn it back on // If we are using group tabs, add all the "hidden" tabs to the end of the extra menu @@ -544,7 +537,7 @@ class SugarView foreach ( $topTabs as $moduleKey => $module ) { $topTabList[$moduleKey] = $module; } - + $groupTabs[$tabIdx]['modules'] = $topTabs; $groupTabs[$tabIdx]['extra'] = $extraTabs; } @@ -576,22 +569,14 @@ class SugarView } - global $mod_strings; - $mod_strings = $bakModStrings; + global $mod_strings; + $mod_strings = $bakModStrings; $headerTpl = $themeObject->getTemplate('header.tpl'); if ( isset($GLOBALS['sugar_config']['developerMode']) && $GLOBALS['sugar_config']['developerMode'] ) $ss->clear_compiled_tpl($headerTpl); $ss->display($headerTpl); - + $this->includeClassicFile('modules/Administration/DisplayWarnings.php'); - - $errorMessages = SugarApplication::getErrorMessages(); - if ( !empty($errorMessages)) { - foreach ( $errorMessages as $error_message ) { - echo('

' . $error_message.'

'); - } - } - } /** * If the view is classic then this method will include the file and @@ -613,77 +598,41 @@ class SugarView protected function _displayLoginJS() { - global $sugar_config, $timedate; - + global $sugar_config; + if(isset($this->bean->module_dir)){ echo ""; } if(isset($_REQUEST['action'])){ echo ""; } - echo ''; + echo ''; if (!is_file("include/javascript/sugar_grp1.js")) { - $_REQUEST['root_directory'] = "."; - require_once("jssource/minify_utils.php"); - ConcatenateFiles("."); + $_REQUEST['root_directory'] = "."; + require_once("jssource/minify_utils.php"); + ConcatenateFiles("."); } echo ''; echo ''; - echo ''; + echo ''; echo << - if ( typeof(SUGAR) == 'undefined' ) {SUGAR = {}}; - if ( typeof(SUGAR.themes) == 'undefined' ) SUGAR.themes = {}; - + EOQ; if(isset( $sugar_config['disc_client']) && $sugar_config['disc_client']) echo ''; } - /** - * Get JS validation code for views - */ - public static function getJavascriptValidation() - { - global $timedate; - $cal_date_format = $timedate->get_cal_date_format(); - $timereg = $timedate->get_regular_expression($timedate->get_time_format()); - $datereg = $timedate->get_regular_expression($timedate->get_date_format()); - $date_pos = ''; - foreach ($datereg['positions'] as $type => $pos) { - if (empty($date_pos)) { - $date_pos .= "'$type': $pos"; - } else { - $date_pos .= ",'$type': $pos"; - } - } - - $time_separator = $timedate->timeSeparator(); - $hour_offset = $timedate->getUserUTCOffset() * 60; - - // Add in the number formatting styles here as well, we have been handling this with individual modules. - require_once ('modules/Currencies/Currency.php'); - list ($num_grp_sep, $dec_sep) = get_number_seperators(); - - $the_script = ""; - - return $the_script; - } - /** * Called from process(). This method will display the correct javascript. */ protected function _displayJavascript() { - global $locale, $sugar_config, $timedate; - - + global $locale, $sugar_config; + + if ($this->_getOption('show_javascript')) { if (!$this->_getOption('show_header')) echo << EOHTML; - + echo ""; echo ""; - - if(isset($this->bean->module_dir)){ + + if(isset($this->bean->module_dir)){ echo ""; } if(isset($_REQUEST['action'])){ echo ""; } - echo ''; - if (!is_file("include/javascript/sugar_grp1.js") || !is_file("include/javascript/sugar_grp1_yui.js")) { - $_REQUEST['root_directory'] = "."; - require_once("jssource/minify_utils.php"); - ConcatenateFiles("."); - } + echo ''; + if (!is_file("include/javascript/sugar_grp1.js") || !is_file("include/javascript/sugar_grp1_yui.js")) { + $_REQUEST['root_directory'] = "."; + require_once("jssource/minify_utils.php"); + ConcatenateFiles("."); + } echo ''; echo ''; - echo ''; + echo ''; if ( isset($sugar_config['quicksearch_querydelay']) ) { echo ""; @@ -721,7 +670,7 @@ EOHTML; $image_server = (defined('TEMPLATE_URL'))?TEMPLATE_URL . '/':''; echo ''; // cn: bug 12274 - create session-stored key to defend against CSRF echo ''; - echo self::getJavascriptValidation(); + echo $GLOBALS['timedate']->get_javascript_validation(); if (!is_file($GLOBALS['sugar_config']['cache_dir'] . 'jsLanguage/' . $GLOBALS['current_language'] . '.js')) { require_once ('include/language/jsLanguage.php'); jsLanguage::createAppStringsCache($GLOBALS['current_language']); @@ -736,7 +685,7 @@ EOHTML; echo ''; echo ''; } - + if (isset($_REQUEST['popup']) && !empty($_REQUEST['popup'])) { // cn: bug 12274 - add security metadata envelope for async calls in popups echo ''; // cn: bug 12274 - create session-stored key to defend against CSRF @@ -753,69 +702,41 @@ EOHTML; } global $sugar_config; global $app_strings; - + //decide whether or not to show themepicker, default is to show $showThemePicker = true; if (isset($sugar_config['showThemePicker'])) { $showThemePicker = $sugar_config['showThemePicker']; } - + echo ""; $jsalerts = new jsAlerts(); if ( !isset($_SESSION['isMobile']) ) echo $jsalerts->getScript(); - + $ss = new Sugar_Smarty(); $ss->assign("AUTHENTICATED",isset($_SESSION["authenticated_user_id"])); $ss->assign('MOD',return_module_language($GLOBALS['current_language'], 'Users')); - - $bottomLinkList = array(); - if (isset($this->action) && $this->action != "EditView") { - $bottomLinkList['print'] = - array($app_strings['LNK_PRINT'] => 'javascript:void window.open(\'index.php?'.$GLOBALS['request_string'].'\',\'printwin\',\'menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1\')'); - - } - $bottomLinkList['backtotop'] = array($app_strings['LNK_BACKTOTOP'] => '#top'); - - $bottomLinksStr = ""; - foreach($bottomLinkList as $key => $value) { - foreach($value as $text => $link) { - $href = $link; - if(substr($link, 0, 11) == "javascript:") { - $onclick = " onclick=\"".substr($link,11)."\""; - $href = "#"; - } else { - $onclick = ""; - } - $imageURL = SugarThemeRegistry::current()->getImageURL($key.'.gif'); - $bottomLinksStr .= ""; - } - } - $ss->assign("BOTTOMLINKS",$bottomLinksStr); + if (SugarConfig::getInstance()->get('calculate_response_time', false)) $ss->assign('STATISTICS',$this->_getStatistics()); - + // Under the License referenced above, you are required to leave in all copyright statements in both // the code and end-user application. - + $copyright = '© 2004-2011 SugarCRM Inc. The Program is provided AS IS, without warranty. Licensed under AGPLv3.
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU Affero General Public License version 3 as published by the Free Software Foundation, including the additional permission set forth in the source code header.
'; + + - - - + // The interactive user interfaces in modified source and object code // versions of this program must display Appropriate Legal Notices, as // required under Section 5 of the GNU General Public License version @@ -827,15 +748,15 @@ EOHTML; $attribLinkImg = "Powered By SugarCRM\n"; - + // Bug 38594 - Add in Trademark wording $copyright .= 'SugarCRM is a trademark of SugarCRM, Inc. All other company and product names may be trademarks of the respective companies with which they are associated.
'; //rrs bug: 20923 - if this image does not exist as per the license, then the proper image will be displaye regardless, so no need - //to display an empty image here. - if(file_exists('include/images/poweredby_sugarcrm.png')){ - $copyright .= $attribLinkImg; - } + //to display an empty image here. + if(file_exists('include/images/poweredby_sugarcrm.png')){ + $copyright .= $attribLinkImg; + } // End Required Image $ss->assign('COPYRIGHT',$copyright); $ss->display(SugarThemeRegistry::current()->getTemplate('footer.tpl')); @@ -853,10 +774,10 @@ EOHTML; echo $subpanel->display(); } } - + protected function _buildModuleList() { - if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) + if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']); } @@ -869,7 +790,7 @@ EOHTML; * @return bool - the value of the option */ protected function _getOption( - $option, + $option, $default = false ) { @@ -879,7 +800,7 @@ EOHTML; return $this->options[$option]; } else return $default; } - + /** * track * Private function to track information about the view request @@ -893,10 +814,10 @@ EOHTML; return; } - + $trackerManager = TrackerManager::getInstance(); $trackerManager->save(); - + } /** @@ -904,31 +825,40 @@ EOHTML; */ protected function _checkModule() { - if(!empty($this->module) && !file_exists('modules/'.$this->module)){ - $error = str_replace("[module]", "$this->module", $GLOBALS['app_strings']['ERR_CANNOT_FIND_MODULE']); - $GLOBALS['log']->fatal($error); - echo $error; - die(); - } + if(!empty($this->module) && !file_exists('modules/'.$this->module)){ + $error = str_replace("[module]", "$this->module", $GLOBALS['app_strings']['ERR_CANNOT_FIND_MODULE']); + $GLOBALS['log']->fatal($error); + echo $error; + die(); + } } - public function renderJavascript() + public function renderJavascript() { if ($this->action !== 'Login') $this->_displayJavascript(); else - $this->_displayLoginJS(); - } - + $this->_displayLoginJS(); + } + private function _calculateFooterMetrics() { $endTime = microtime(true); $deltaTime = $endTime - $GLOBALS['startTime']; $this->responseTime = number_format(round($deltaTime, 2), 2); // Print out the resources used in constructing the page. - $this->fileResources = count(get_included_files()); + $included_files = get_included_files(); + // take all of the included files and make a list that does not allow for duplicates based on case + // I believe the full get_include_files result set appears to have one entry for each file in real + // case, and one entry in all lower case. + $list_of_files_case_insensitive = array(); + foreach($included_files as $key => $name) { + // preserve the first capitalization encountered. + $list_of_files_case_insensitive[mb_strtolower($name) ] = $name; + } + $this->fileResources = sizeof($list_of_files_case_insensitive); } - + private function _getStatistics() { $endTime = microtime(true); @@ -950,15 +880,16 @@ EOHTML; } $return .= $GLOBALS['app_strings']['LBL_SERVER_RESPONSE_RESOURCES'] . '(' . DBManager::getQueryCount() . ',' . sizeof($list_of_files_case_insensitive) . ')
'; // Display performance of the internal and external caches.... - $cacheStats = SugarCache::instance()->getCacheStats(); - $return .= "External cache (hits/total=ratio) local ({$cacheStats['localHits']}/{$cacheStats['requests']}=" . round($cacheStats['localHits']*100/$cacheStats['requests'], 0) . "%)"; - $return .= " external ({$cacheStats['externalHits']}/{$cacheStats['requests']}=" . round($cacheStats['externalHits']*100/$cacheStats['requests'], 0) . "%)
"; - $return .= " misses ({$cacheStats['misses']}/{$cacheStats['requests']}=" . round($cacheStats['misses']*100/$cacheStats['requests'], 0) . "%)
"; + $return .= "External cache (hits/total=ratio) local ({$GLOBALS['external_cache_request_local_hits']}/{$GLOBALS['external_cache_request_local_total']}=" . round($GLOBALS['external_cache_request_local_hits']*100/$GLOBALS['external_cache_request_local_total'], 0) . "%)"; + if ($GLOBALS['external_cache_request_external_total']) { + // Only display out of process cache results if there was at least one attempt to retrieve from the out of process cache (this signifies that it was enabled). + $return .= " external ({$GLOBALS['external_cache_request_external_hits']}/{$GLOBALS['external_cache_request_external_total']}=" . round($GLOBALS['external_cache_request_external_hits']*100/$GLOBALS['external_cache_request_external_total'], 0) . "%)
"; + } } - + return $return; } - + /** * Loads the module shortcuts menu * @@ -970,54 +901,58 @@ EOHTML; ) { global $current_language, $current_user, $mod_strings, $app_strings; - + if ( empty($module) ) $module = $this->module; - - $final_module_menu = array(); - - if (file_exists('modules/' . $module . '/Menu.php')) { - $GLOBALS['module_menu'] = $module_menu = array(); - require('modules/' . $module . '/Menu.php'); - $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); - } - if (file_exists('custom/modules/' . $module . '/Ext/Menus/menu.ext.php')) { - $GLOBALS['module_menu'] = $module_menu = array(); - require('custom/modules/' . $module . '/Ext/Menus/menu.ext.php'); - $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); - } - if (!file_exists('modules/' . $module . '/Menu.php') - && !file_exists('custom/modules/' . $module . '/Ext/Menus/menu.ext.php') - && !empty($GLOBALS['mod_strings']['LNK_NEW_RECORD'])) { - $final_module_menu[] = array("index.php?module=$module&action=EditView&return_module=$module&return_action=DetailView", - $GLOBALS['mod_strings']['LNK_NEW_RECORD'],"{$GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']}$module" ,$module ); - $final_module_menu[] = array("index.php?module=$module&action=index", $GLOBALS['mod_strings']['LNK_LIST'], - $module, $module); - if ( ($this->bean instanceOf SugarBean) && !empty($this->bean->importable) ) - if ( !empty($mod_strings['LNK_IMPORT_'.strtoupper($module)]) ) - $final_module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", - $mod_strings['LNK_IMPORT_'.strtoupper($module)], "Import", $module); - else - $final_module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", - $app_strings['LBL_IMPORT'], "Import", $module); - } - if (file_exists('custom/application/Ext/Menus/menu.ext.php')) { - $GLOBALS['module_menu'] = $module_menu = array(); - require('custom/application/Ext/Menus/menu.ext.php'); - $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); + + $module_menu = sugar_cache_retrieve("{$current_user->id}_{$module}_module_menu_{$current_language}"); + if ( !is_array($module_menu) ) { + $final_module_menu = array(); + + if (file_exists('modules/' . $module . '/Menu.php')) { + $GLOBALS['module_menu'] = $module_menu = array(); + require('modules/' . $module . '/Menu.php'); + $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); + } + if (file_exists('custom/modules/' . $module . '/Ext/Menus/menu.ext.php')) { + $GLOBALS['module_menu'] = $module_menu = array(); + require('custom/modules/' . $module . '/Ext/Menus/menu.ext.php'); + $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); + } + if (!file_exists('modules/' . $module . '/Menu.php') + && !file_exists('custom/modules/' . $module . '/Ext/Menus/menu.ext.php') + && !empty($GLOBALS['mod_strings']['LNK_NEW_RECORD'])) { + $final_module_menu[] = array("index.php?module=$module&action=EditView&return_module=$module&return_action=DetailView", + $GLOBALS['mod_strings']['LNK_NEW_RECORD'],"{$GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']}$module" ,$module ); + $final_module_menu[] = array("index.php?module=$module&action=index", $GLOBALS['mod_strings']['LNK_LIST'], + $module, $module); + if ( ($this->bean instanceOf SugarBean) && !empty($this->bean->importable) ) + if ( !empty($mod_strings['LNK_IMPORT_'.strtoupper($module)]) ) + $final_module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", + $mod_strings['LNK_IMPORT_'.strtoupper($module)], "Import", $module); + else + $final_module_menu[] = array("index.php?module=Import&action=Step1&import_module=$module&return_module=$module&return_action=index", + $app_strings['LBL_IMPORT'], "Import", $module); + } + if (file_exists('custom/application/Ext/Menus/menu.ext.php')) { + $GLOBALS['module_menu'] = $module_menu = array(); + require('custom/application/Ext/Menus/menu.ext.php'); + $final_module_menu = array_merge($final_module_menu,$GLOBALS['module_menu'],$module_menu); + } + $module_menu = $final_module_menu; + sugar_cache_put("{$current_user->id}_{$module}_module_menu_{$current_language}",$module_menu); } - $module_menu = $final_module_menu; - + return $module_menu; - } - - /** - * Returns the module name which should be highlighted in the module menu + } + + /** + * Returns the module name which should be highlighted in the module menu */ protected function _getModuleTab() { global $app_list_strings, $moduleTabMap; - + // Need to figure out what tab this module belongs to, most modules have their own tabs, but there are exceptions. if ( !empty($_REQUEST['module_tab']) ) return $_REQUEST['module_tab']; @@ -1025,7 +960,7 @@ EOHTML; return $moduleTabMap[$this->module]; // Special cases elseif ( $this->module == 'MergeRecords' ) - return !empty($_REQUEST['merge_module']) ? $_REQUEST['merge_module'] : $_REQUEST['return_module']; + return $_REQUEST['return_module']; elseif ( $this->module == 'Users' && $this->action == 'SetTimezone' ) return 'Home'; // Default anonymous pages to be under Home @@ -1034,7 +969,7 @@ EOHTML; else return $this->module; } - + /** * Return the "breadcrumbs" to display at the top of the page * @@ -1045,45 +980,50 @@ EOHTML; $show_help = true ) { - global $sugar_version, $sugar_flavor, $server_unique_key, $current_language, $action; - - $theTitle = "
\n

"; - - $module = preg_replace("/ /","",$this->module); - + global $sugar_version, $sugar_flavor, $server_unique_key, $current_language, $action; + + $theTitle = "
\n

"; + + $module = preg_replace("/ /","",$this->module); + $params = $this->_getModuleTitleParams(); $count = count($params); $index = 0; - - if(SugarThemeRegistry::current()->directionality == "rtl") { - $params = array_reverse($params); - } - + foreach($params as $parm){ $index++; $theTitle .= $parm; if($index < $count){ - $theTitle .= $this->getBreadCrumbSymbol(); + $theTitle .= "»"; } } $theTitle .= "

\n"; - - if ($show_help) { + + if ($show_help) { $theTitle .= ""; - - $createImageURL = SugarThemeRegistry::current()->getImageURL('create-record.gif'); + if (isset($this->action) && $this->action != "EditView") { + $printImageURL = SugarThemeRegistry::current()->getImageURL('print.gif'); + $theTitle .= << +{$GLOBALS['app_strings']['LNK_PRINT']} + +{$GLOBALS['app_strings']['LNK_PRINT']} + +EOHTML; + } + $helpImageURL = SugarThemeRegistry::current()->getImageURL('help.gif'); $theTitle .= << -{$GLOBALS[ - -{$GLOBALS['app_strings']['LNK_CREATE']} + +{$GLOBALS[ + +{$GLOBALS['app_strings']['LNK_HELP']} EOHTML; } - + $theTitle .= "
\n"; - return $theTitle; + return $theTitle; } /** @@ -1091,54 +1031,52 @@ EOHTML; * * @return string File location of the metadata file. */ - public function getMetaDataFile() - { + public function getMetaDataFile(){ + $metadataFile = null; - $foundViewDefs = false; - $viewDef = strtolower($this->type) . 'viewdefs'; - $coreMetaPath = 'modules/'.$this->module.'/metadata/' . $viewDef . '.php'; - if(file_exists('custom/' .$coreMetaPath )){ - $metadataFile = 'custom/' . $coreMetaPath; - $foundViewDefs = true; - }else{ - if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){ - require_once('custom/modules/'.$this->module.'/metadata/metafiles.php'); - if(!empty($metafiles[$this->module][$viewDef])){ - $metadataFile = $metafiles[$this->module][$viewDef]; - $foundViewDefs = true; - } - }elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){ - require_once('modules/'.$this->module.'/metadata/metafiles.php'); - if(!empty($metafiles[$this->module][$viewDef])){ - $metadataFile = $metafiles[$this->module][$viewDef]; - $foundViewDefs = true; - } - } - } - - if(!$foundViewDefs && file_exists($coreMetaPath)){ - $metadataFile = $coreMetaPath; - } - $GLOBALS['log']->debug("metadatafile=". $metadataFile); - - return $metadataFile; + $foundViewDefs = false; + $viewDef = strtolower($this->type) . 'viewdefs'; + $coreMetaPath = 'modules/'.$this->module.'/metadata/' . $viewDef . '.php'; + if(file_exists('custom/' .$coreMetaPath )){ + $metadataFile = 'custom/' . $coreMetaPath; + $foundViewDefs = true; + }else{ + if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){ + require_once('custom/modules/'.$this->module.'/metadata/metafiles.php'); + if(!empty($metafiles[$this->module][$viewDef])){ + $metadataFile = $metafiles[$this->module][$viewDef]; + $foundViewDefs = true; + } + }elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){ + require_once('modules/'.$this->module.'/metadata/metafiles.php'); + if(!empty($metafiles[$this->module][$viewDef])){ + $metadataFile = $metafiles[$this->module][$viewDef]; + $foundViewDefs = true; + } + } + } + + if(!$foundViewDefs && file_exists($coreMetaPath)){ + $metadataFile = $coreMetaPath; + } + $GLOBALS['log']->debug("metadatafile=". $metadataFile); + + return $metadataFile; } - + /** * Returns an array composing of the breadcrumbs to use for the module title * - * @param bool $browserTitle true if the returned string is being used for the browser title, meaning - * there should be no HTML in the string * @return array */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams($bTitle=false) { - $params = array($this->_getModuleTitleListParam($browserTitle)); - - if (isset($this->action)){ - switch ($this->action) { - case 'EditView': + $params = array($this->_getModuleTitleListParam($bTitle)); + + if (isset($this->action)){ + switch ($this->action) { + case 'EditView': if(!empty($this->bean->id)) { $params[] = "".$this->bean->get_summary_text().""; $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL']; @@ -1150,67 +1088,60 @@ EOHTML; $beanName = $this->bean->get_summary_text(); $params[] = $beanName; break; - } - } - - return $params; + } + } + + return $params; } - + /** * Returns the portion of the array that will represent the listview in the breadcrumb * - * @param bool $browserTitle true if the returned string is being used for the browser title, meaning - * there should be no HTML in the string * @return string */ - protected function _getModuleTitleListParam( $browserTitle = false ) + protected function _getModuleTitleListParam($bTitle=false) { global $current_user; global $app_strings; - + if(!empty($GLOBALS['app_list_strings']['moduleList'][$this->module])) $firstParam = $GLOBALS['app_list_strings']['moduleList'][$this->module]; else $firstParam = $this->module; - + $iconPath = $this->getModuleTitleIconPath($this->module); - if($this->action == "ListView" || $this->action == "index") { - if (!empty($iconPath) && !$browserTitle) { - if (SugarThemeRegistry::current()->directionality == "ltr") { - return "" - . "".$this->module."" - . $this->getBreadCrumbSymbol().$app_strings['LBL_SEARCH']; - } else { - return $app_strings['LBL_SEARCH'].$this->getBreadCrumbSymbol() - . "" - . "".$this->module.""; - } + if($this->action == "ListView" || $this->action == "index") + { + if (!empty($iconPath) && !$bTitle) { + return "" + . "".$this->module."" + . "»".$app_strings['LBL_SEARCH']; } else { return $firstParam; } - } - else { - if (!empty($iconPath) && !$browserTitle) { - return "" + } else + { + if (!empty($iconPath) && !$bTitle) { + return "" . "".$this->module.""; } else { - return "{$firstParam}"; + return "{$firstParam}"; } } } - - protected function getModuleTitleIconPath($module) - { + + protected function getModuleTitleIconPath($module) { $iconPath = ""; - if(is_file(SugarThemeRegistry::current()->getImageURL('icon_'.$module.'_32.png',false))) { + if(is_file(SugarThemeRegistry::current()->getImageURL('icon_'.$module.'_32.png',false))) + { $iconPath = SugarThemeRegistry::current()->getImageURL('icon_'.$module.'_32.png'); - } - else if (is_file(SugarThemeRegistry::current()->getImageURL('icon_'.ucfirst($module).'_32.png',false))) { + } else if (is_file(SugarThemeRegistry::current()->getImageURL('icon_'.ucfirst($module).'_32.png',false))) + { $iconPath = SugarThemeRegistry::current()->getImageURL('icon_'.ucfirst($module).'_32.png'); } return $iconPath; } - + /** * Returns the string which will be shown in the browser's title; defaults to using the same breadcrumb * as in the module title @@ -1220,29 +1151,14 @@ EOHTML; public function getBrowserTitle() { global $app_strings; - + $browserTitle = $app_strings['LBL_BROWSER_TITLE']; if ( $this->module == 'Users' && ($this->action == 'SetTimezone' || $this->action == 'Login') ) return $browserTitle; $params = $this->_getModuleTitleParams(true); - foreach ($params as $value ) + foreach ($params as $value ) $browserTitle = strip_tags($value) . ' » ' . $browserTitle; - + return $browserTitle; } - - /** - * Returns the correct breadcrumb symbol according to theme's directionality setting - * - * @return string - */ - public function getBreadCrumbSymbol() - { - if(SugarThemeRegistry::current()->directionality == "ltr") { - return "»"; - } - else { - return "«"; - } - } } diff --git a/include/MVC/View/tpls/Importvcard.tpl b/include/MVC/View/tpls/Importvcard.tpl index 9be7a316..8344bba9 100644 --- a/include/MVC/View/tpls/Importvcard.tpl +++ b/include/MVC/View/tpls/Importvcard.tpl @@ -41,8 +41,8 @@ *} {$MOD.LBL_IMPORT_VCARDTEXT} - {literal} + diff --git a/include/MySugar/tpls/chartDashletsSearchResults.tpl b/include/MySugar/tpls/chartDashletsSearchResults.tpl index edb16701..3cd9167d 100644 --- a/include/MySugar/tpls/chartDashletsSearchResults.tpl +++ b/include/MySugar/tpls/chartDashletsSearchResults.tpl @@ -42,7 +42,7 @@ {foreach from=$charts item=chart} - + {/foreach}
{$chart.icon} {$chart.title}
{$chart.icon} {$chart.title}
diff --git a/include/MySugar/tpls/dashletsSearchResults.tpl b/include/MySugar/tpls/dashletsSearchResults.tpl index ee5e3ea5..a9a1ccb1 100644 --- a/include/MySugar/tpls/dashletsSearchResults.tpl +++ b/include/MySugar/tpls/dashletsSearchResults.tpl @@ -45,7 +45,7 @@ {if $rowCounter % 2 == 0}

{$module.icon} {$module.title}
{$module.icon} {$module.title}
{foreach from=$reportCharts item=chart} - + {/foreach}
{$chart.title}
{$chart.title}
\ No newline at end of file diff --git a/include/OutboundEmail/OutboundEmail.php b/include/OutboundEmail/OutboundEmail.php index 65a4c8ff..73a8f140 100644 --- a/include/OutboundEmail/OutboundEmail.php +++ b/include/OutboundEmail/OutboundEmail.php @@ -79,7 +79,7 @@ class OutboundEmail { var $mail_smtpssl; // bool var $mail_smtpdisplay; // calculated value, not in DB var $new_with_id = FALSE; - + /** * Sole constructor */ @@ -102,12 +102,12 @@ class OutboundEmail { { $oe = new OutboundEmail(); $oe->retrieve($row['id']); - return $oe; + return $oe; } - else + else return null; } - + /** * Duplicate the system account for a user, setting new parameters specific to the user. * @@ -125,10 +125,10 @@ class OutboundEmail { $ob->mail_smtpuser = $user_name; $ob->mail_smtppass = $user_pass; $ob->save(); - + return $ob; } - + /** * Determines if a user needs to set their user name/password for their system * override account. @@ -141,19 +141,19 @@ class OutboundEmail { $userCredentialsReq = FALSE; $sys = new OutboundEmail(); $ob = $sys->getSystemMailerSettings(); //Dirties '$this' - + //If auth for system account is disabled or user can use system outbound account return false. if($ob->mail_smtpauth_req == 0 || $this->isAllowUserAccessToSystemDefaultOutbound() || $this->mail_sendtype == 'sendmail') - return $userCredentialsReq; - + return $userCredentialsReq; + $userOverideAccount = $this->getUsersMailerForSystemOverride($user_id); if( $userOverideAccount == null || empty($userOverideAccount->mail_smtpuser) || empty($userOverideAccount->mail_smtpuser) ) $userCredentialsReq = TRUE; - - return $userCredentialsReq; - + + return $userCredentialsReq; + } - + /** * Retrieves name value pairs for opts lists */ @@ -166,15 +166,15 @@ class OutboundEmail { $ret = array(); $system = $this->getSystemMailerSettings(); - + //Now add the system default or user override default to the response. - if(!empty($system->id) ) + if(!empty($system->id) ) { - if ($system->mail_sendtype == 'SMTP') + if ($system->mail_sendtype == 'SMTP') { $systemErrors = ""; $userSystemOverride = $this->getUsersMailerForSystemOverride($user->id); - + //If the user is required to to provide a username and password but they have not done so yet, //create the account for them. $autoCreateUserSystemOverride = FALSE; @@ -183,15 +183,15 @@ class OutboundEmail { $systemErrors = $app_strings['LBL_EMAIL_WARNING_MISSING_USER_CREDS']; $autoCreateUserSystemOverride = TRUE; } - + //Substitute in the users system override if its available. if($userSystemOverride != null) $system = $userSystemOverride; else if ($autoCreateUserSystemOverride) $system = $this->createUserSystemOverrideAccount($user->id,"",""); - + $isEditable = ($system->type == 'system') ? FALSE : TRUE; //User overrides can be edited. - + if( !empty($system->mail_smtpserver) ) $ret[] = array('id' =>$system->id, 'name' => "$system->name", 'mail_smtpserver' => $system->mail_smtpdisplay, 'is_editable' => $isEditable, 'type' => $system->type, 'errors' => $systemErrors); @@ -203,7 +203,7 @@ class OutboundEmail { } } - while($a = $this->db->fetchByAssoc($r)) + while($a = $this->db->fetchByAssoc($r)) { $oe = array(); if($a['mail_sendtype'] != 'SMTP') @@ -218,7 +218,7 @@ class OutboundEmail { $oe['mail_smtpserver'] = $this->_getOutboundServerDisplay($a['mail_smtptype'],$a['mail_smtpserver']); else $oe['mail_smtpserver'] = $a['mail_smtpserver']; - + $ret[] = $oe; } @@ -274,17 +274,17 @@ class OutboundEmail { { $query = "SELECT id,stored_options FROM inbound_email WHERE is_personal='1' AND deleted='0' AND created_by = '{$user->id}'"; $rs = $this->db->query($query); - + $results = array(); while($row = $this->db->fetchByAssoc($rs) ) { $opts = unserialize(base64_decode($row['stored_options'])); - if( isset($opts['outbound_email']) && $opts['outbound_email'] == $this->id) + if( isset($opts['outbound_email']) && $opts['outbound_email'] == $this->id) { $results[] = $row['id']; - } + } } - + return $results; } /** @@ -293,7 +293,7 @@ class OutboundEmail { * @param string mailer_id * @return object */ - function getInboundMailerSettings($user, $mailer_id='', $ieId='') { + function getInboundMailerSettings(&$user, $mailer_id='', $ieId='') { $mailer = ''; if(!empty($mailer_id)) { @@ -320,7 +320,7 @@ class OutboundEmail { if (empty($mailer)) { $mailer = "type = 'system'"; } // if - + $q = "SELECT id FROM outbound_email WHERE {$mailer}"; $r = $this->db->query($q); $a = $this->db->fetchByAssoc($r); @@ -339,7 +339,7 @@ class OutboundEmail { function isAllowUserAccessToSystemDefaultOutbound() { $allowAccess = FALSE; - + // first check that a system default exists $q = "SELECT id FROM outbound_email WHERE type = 'system'"; $r = $this->db->query($q); @@ -352,10 +352,10 @@ class OutboundEmail { && $admin->settings['notify_allow_default_outbound'] == 2 ) $allowAccess = TRUE; } - + return $allowAccess; } - + /** * Retrieves the system's Outbound options */ @@ -431,7 +431,7 @@ class OutboundEmail { function save() { require_once('include/utils/encryption_utils.php'); if(empty($this->id) || $this->new_with_id) { - + if( empty($this->id) ) $this->id = create_guid(); @@ -439,21 +439,21 @@ class OutboundEmail { $values = ''; foreach($this->field_defs as $def) { - if(!empty($cols)) { + if(!empty($cols)) { $cols .= ", "; } if(!empty($values)) { $values .= ", "; } $cols .= $def; - if ($def == 'mail_smtppass' && !empty($this->$def)) { - $this->$def = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->$def); + if ($def == 'mail_smtppass' && !empty($this->mail_smtppass)) { + $this->mail_smtppass = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass); } // if if($def == 'mail_smtpauth_req' || $def == 'mail_smtpssl'){ if(empty($this->$def)){ - $this->$def = 0; + $this->$def = 0; } - $values .= $this->$def; + $values .= "{$this->$def}"; }else{ $values .= "'{$this->$def}'"; } @@ -463,23 +463,16 @@ class OutboundEmail { } else { $values = ""; foreach($this->field_defs as $def) { - if ($def == 'mail_smtppass') { - if(!empty($this->mail_smtppass)) { - $this->mail_smtppass = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass); - } else { - // ignore empty password unless username is empty too - if(!empty($this->mail_smtpuser)) { - continue; - } - } - } - if(!empty($values)) { + if(!empty($values)) { $values .= ", "; } + if ($def == 'mail_smtppass' && !empty($this->$def)) { + $this->$def = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->$def); + } // if if($def == 'mail_smtpauth_req' || $def == 'mail_smtpssl'){ if(empty($this->$def)){ - $this->$def = 0; + $this->$def = 0; } $values .= "{$def} = {$this->$def}"; }else{ @@ -511,52 +504,52 @@ class OutboundEmail { $this->type = 'system'; $this->user_id = '1'; $this->save(); - + $this->updateUserSystemOverrideAccounts(); - + } /** * Update the user system override accounts with the system information if anything has changed. - * + * */ function updateUserSystemOverrideAccounts() { $updateFields = array('mail_smtptype','mail_sendtype','mail_smtpserver', 'mail_smtpport','mail_smtpauth_req','mail_smtpssl'); - + //Update the username ans password for the override accounts if alloweed access. if( $this->isAllowUserAccessToSystemDefaultOutbound() ) { $updateFields[] = 'mail_smtpuser'; $updateFields[] = 'mail_smtppass'; } - + $values = ""; foreach ($updateFields as $singleField) { - if(!empty($values)) + if(!empty($values)) $values .= ", "; if($singleField == 'mail_smtpauth_req' || $singleField == 'mail_smtpssl') { if(empty($this->$singleField)) - $this->$singleField = 0; - + $this->$singleField = 0; + $values .= "{$singleField} = {$this->$singleField} "; - } + } else $values .= "{$singleField} = '{$this->$singleField}' "; } - + $query = "UPDATE outbound_email set {$values} WHERE type='system-override' "; - + $this->db->query($query); } /** - * Remove all of the user override accounts. - * + * Remove all of the user override accounts. + * */ function removeUserOverrideAccounts() - { + { $query = "DELETE FROM outbound_email WHERE type = 'system-override'"; return $this->db->query($query); } @@ -571,14 +564,14 @@ class OutboundEmail { $q = "DELETE FROM outbound_email WHERE id = '{$this->id}'"; return $this->db->query($q); } - + private function _getOutboundServerDisplay( $smtptype, $smtpserver ) { global $app_strings; - + switch ($smtptype) { case "yahoomail": return $app_strings['LBL_SMTPTYPE_YAHOO']; break; @@ -590,26 +583,4 @@ class OutboundEmail { return $smtpserver; break; } } - - /** - * Get mailer for current user by name - * @param User $user - * @param string $name - * @return OutboundEmail|false - */ - public function getMailerByName($user, $name) - { - if($name == "system" && !$this->isAllowUserAccessToSystemDefaultOutbound()) { - $oe = $this->getUsersMailerForSystemOverride($user->id); - if(!empty($oe) && !empty($oe->id)) { - return $oe; - } - } - $res = $this->db->query("SELECT id FROM outbound_email WHERE user_id = '{$user->id}' AND name='".$this->db->quote($name)."'"); - $a = $this->db->fetchByAssoc($res); - if(!isset($a['id'])) { - return false; - } - return $this->retrieve($a['id']); - } } diff --git a/include/Popups/PopupSmarty.php b/include/Popups/PopupSmarty.php index cb4a74a1..92234936 100644 --- a/include/Popups/PopupSmarty.php +++ b/include/Popups/PopupSmarty.php @@ -246,9 +246,7 @@ class PopupSmarty extends ListViewSmarty{ $formBase = new $this->_popupMeta['create']['formBaseClass'](); if(isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save') { - //If it's a new record, set useRequired to false - $useRequired = empty($_REQUEST['id']) ? false : true; - $formBase->handleSave('', false, $useRequired); + $formBase->handleSave('', false, true); } } @@ -300,7 +298,6 @@ class PopupSmarty extends ListViewSmarty{ $this->searchForm->lv = $lv; $this->searchForm->displaySavedSearch = false; - $this->searchForm->populateFromRequest('advanced_search'); $searchWhere = $this->_get_where_clause(); $this->searchColumns = $this->searchForm->searchColumns; diff --git a/include/Popups/tpls/PopupGeneric.tpl b/include/Popups/tpls/PopupGeneric.tpl index 57fb24b6..1dd977b5 100644 --- a/include/Popups/tpls/PopupGeneric.tpl +++ b/include/Popups/tpls/PopupGeneric.tpl @@ -151,7 +151,7 @@
- + {$pageData.additionalDetails.$id} diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index 325b499b..f93402cb 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -403,7 +403,7 @@ require_once('include/EditView/EditView2.php'); * @param bool $addAllBeanFields true to process at all bean fields */ function populateFromArray(&$array, $switchVar = null, $addAllBeanFields = true) { - + if((!empty($array['searchFormTab']) || !empty($switchVar)) && !empty($this->searchFields)) { $arrayKeys = array_keys($array); $searchFieldsKeys = array_keys($this->searchFields); @@ -430,16 +430,17 @@ require_once('include/EditView/EditView2.php'); } } } - } + } }else{ $fromMergeRecords = isset($array['merge_module']); foreach($this->searchFields as $name => $params) { - $long_name = $name.'_'.$SearchName; - /*nsingh 21648: Add additional check for bool values=0. empty() considers 0 to be empty Only repopulates if value is 0 or 1:( */ - if(isset($array[$long_name]) && ( $array[$long_name] !== '' || (isset($this->fieldDefs[$long_name]['type']) && $this->fieldDefs[$long_name]['type'] == 'bool'&& ($array[$long_name]=='0' || $array[$long_name]=='1')))) + $long_name = $name.'_'.$SearchName; /*nsingh 21648: Add additional check for bool values=0. empty() considers 0 to be empty Only repopulates if value is 0 or 1:( */ + if(isset($array[$long_name]) && ( $array[$long_name] !== '' + || (isset($this->fieldDefs[$long_name]) && $this->fieldDefs[$long_name]['type'] == 'bool' + && ($array[$long_name]=='0' || $array[$long_name]=='1'))) ) { //advanced*/ $this->searchFields[$name]['value'] = $array[$long_name]; if(empty($this->fieldDefs[$long_name]['value'])) { @@ -449,23 +450,8 @@ require_once('include/EditView/EditView2.php'); $this->searchFields[$name]['value'] = $array[$name]; if(empty($this->fieldDefs[$long_name]['value'])) $this->fieldDefs[$long_name]['value'] = $array[$name]; } - - if(!empty($params['enable_range_search']) && isset($this->searchFields[$name]['value'])) - { - if(preg_match('/^range_(.*?)$/', $long_name, $match) && isset($array[$match[1].'_range_choice'])) - { - $this->searchFields[$name]['operator'] = $array[$match[1].'_range_choice']; - } - } - - if(!empty($params['is_date_field']) && isset($this->searchFields[$name]['value'])) - { - global $timedate; - $date_value = $timedate->to_db_date($this->searchFields[$name]['value']); - $this->searchFields[$name]['value'] = $date_value == '' ? $this->searchFields[$name]['value'] : $date_value; - } } - + if((empty($array['massupdate']) || $array['massupdate'] == 'false') && $addAllBeanFields) { foreach($this->seed->field_name_map as $key => $params) { if($key != 'assigned_user_name' && $key != 'modified_by_name') @@ -485,20 +471,19 @@ require_once('include/EditView/EditView2.php'); } } } - } + + } } } - if ( is_array($this->searchFields) ) { foreach ( $this->searchFields as $fieldName => $field ) { if ( !empty($field['value']) && is_string($field['value']) ) { $this->searchFields[$fieldName]['value'] = trim($field['value']); } } - } - + } } /** @@ -515,6 +500,7 @@ require_once('include/EditView/EditView2.php'); global $timedate; $this->searchColumns = array () ; + $values = $this->searchFields; $where_clauses = array(); @@ -523,7 +509,6 @@ require_once('include/EditView/EditView2.php'); $this->seed->fill_in_additional_detail_fields(); //rrs check for team_id - foreach($this->searchFields as $field=>$parms) { $customField = false; // Jenny - Bug 7462: We need a type check here to avoid database errors @@ -531,48 +516,6 @@ require_once('include/EditView/EditView2.php'); // a generic search form validation mechanism. $type = (!empty($this->seed->field_name_map[$field]['type']))?$this->seed->field_name_map[$field]['type']:''; - if(!empty($parms['enable_range_search']) && empty($type)) - { - if(preg_match('/^start_range_(.*?)$/', $field, $match)) - { - $real_field = $match[1]; - $start_field = 'start_range_' . $real_field; - $end_field = 'end_range_' . $real_field; - - if(isset($this->searchFields[$start_field]['value']) && isset($this->searchFields[$end_field]['value'])) - { - $this->searchFields[$real_field]['value'] = $this->searchFields[$start_field]['value'] . '<>' . $this->searchFields[$end_field]['value']; - $this->searchFields[$real_field]['operator'] = 'between'; - $parms['value'] = $this->searchFields[$real_field]['value']; - $parms['operator'] = 'between'; - $field = $real_field; - unset($this->searchFields[$end_field]['value']); - } - } else if (preg_match('/^range_(.*?)$/', $field, $match) && isset($this->searchFields[$field]['value'])) { - $real_field = $match[1]; - - //Special case for datetime and datetimecombo fields. By setting the type here we allow an actual between search - if($parms['operator'] == '=') - { - $field_type = isset($this->seed->field_name_map[$real_field]['type']) ? $this->seed->field_name_map[$real_field]['type'] : ''; - if($field_type == 'datetimecombo' || $field_type == 'datetime') - { - $type = $field_type; - } - } - - $this->searchFields[$real_field]['value'] = $this->searchFields[$field]['value']; - $this->searchFields[$real_field]['operator'] = $this->searchFields[$field]['operator']; - $params['value'] = $this->searchFields[$field]['value']; - $params['operator'] = $this->searchFields[$field]['operator']; - unset($this->searchFields[$field]['value']); - $field = $real_field; - } else { - //Skip this range search field, it is the end field THIS IS NEEDED or the end range date will break the query - continue; - } - } - if(!empty($this->seed->field_name_map[$field]['source']) && ($this->seed->field_name_map[$field]['source'] == 'custom_fields' || //Non-db custom fields, such as custom relates @@ -607,10 +550,9 @@ require_once('include/EditView/EditView2.php'); elseif($type == 'html' && $customField) { continue; } - - if(isset($parms['value']) && $parms['value'] != "") { - + if(isset($parms['value']) && $parms['value'] != "") { + $operator = 'like'; if(!empty($parms['operator'])) { $operator = $parms['operator']; @@ -636,8 +578,6 @@ require_once('include/EditView/EditView2.php'); $field_value .= ' or '; } $field_value .= "$db_field like '%^$qVal^%'"; - } else { - $field_value .= '('.$db_field . ' IS NULL or '.$db_field."='^^' or ".$db_field."='')"; } } @@ -661,7 +601,8 @@ require_once('include/EditView/EditView2.php'); } } - } else { + } + else { $field_value = $GLOBALS['db']->quote($parms['value']); } @@ -670,32 +611,22 @@ require_once('include/EditView/EditView2.php'); $parms['db_field'] = array($field); } - //This if-else block handles the shortcut checkbox selections for "My Items" and "Closed Only" - if(!empty($parms['my_items'])) { - if( $parms['value'] == false ) { + if(isset($parms['my_items']) and $parms['my_items'] == true) { + if( $parms['value'] == false ) { //do not include where clause for custom fields with checkboxes that are unchecked + continue; - } else { - //my items is checked. + } + else{ //my items is checked. global $current_user; $field_value = $GLOBALS['db']->quote($current_user->id); $operator = '=' ; } - } else if(!empty($parms['closed_values']) && is_array($parms['closed_values'])) { - if( $parms['value'] == false ) { - continue; - } else { - $field_value = ''; - foreach($parms['closed_values'] as $closed_value) - { - $field_value .= ",'" . $GLOBALS['db']->quote($closed_value) . "'"; - } - $field_value = substr($field_value, 1); - } - } - +// $operator = ($parms['value'] == '1') ? '=' : '!='; + } + $where = ''; $itr = 0; - + if($field_value != '' || $operator=='isnull') { $this->searchColumns [ strtoupper($field) ] = $field ; @@ -714,8 +645,6 @@ require_once('include/EditView/EditView2.php'); //Best Guess for table name $db_field = strtolower($link['module']) . '.' . $db_field; } - - } else if ($type == 'parent') { if (!empty($this->searchFields['parent_type'])) { @@ -769,73 +698,42 @@ require_once('include/EditView/EditView2.php'); } if($type == 'datetime' || $type == 'datetimecombo') { - try { - $dates = $timedate->getDayStartEndGMT($field_value); - $field_value = $dates["start"] . "<>" . $dates["end"]; - $operator = 'between'; - } catch(Exception $timeException) { - //In the event that a date value is given that cannot be correctly processed by getDayStartEndGMT method, - //just skip searching on this field and continue. This may occur if user switches locale date formats - //in another browser screen, but re-runs a search with the previous format on another screen - $GLOBALS['log']->error($timeException->getMessage()); - continue; - } + $dates = $timedate->getDayStartEndGMT($field_value); + $field_value = $dates["start"] . "<>" . $dates["end"]; + $operator = 'between'; } - - if($type == 'decimal' || $type == 'float' || $type == 'currency' || (!empty($parms['enable_range_search']) && empty($parms['is_date_field']))) { - require_once('modules/Currencies/Currency.php'); - - //we need to handle formatting either a single value or 2 values in case the 'between' search option is set - //start by splitting the string if the between operator exists - $fieldARR = explode('<>', $field_value); - //set the first pass through boolean - $first_between = true; - - foreach($fieldARR as $fk => $fv){ - //reset the field value, it will be rebuild in the foreach loop below - $tmpfield_value = unformat_number($fv); - - if ( $type == 'currency' && stripos($field,'_usdollar')!==FALSE ) { - // It's a US Dollar field, we need to do some conversions from the user's local currency - $currency_id = $GLOBALS['current_user']->getPreference('currency'); - if ( empty($currency_id) ) { - $currency_id = -99; - } - if ( $currency_id != -99 ) { - $currency = new Currency(); - $currency->retrieve($currency_id); - $field_value = $currency->convertToDollar($tmpfield_value); - } - } - - //recreate the field value - if($first_between){ - //set the field value with the new formatted temp value - $field_value = $tmpfield_value; - }else{ - //this is a between query, so append the between operator and add the second formatted temp value - $field_value .= '<>'.$tmpfield_value; - } - //set the first pass through variable to false - $first_between = false; - } - - if(!empty($parms['enable_range_search']) && $parms['operator'] == '=') - { - // Databases can't really search for floating point numbers, because they can't be accurately described in binary, - // So we have to fuzz out the math a little bit - $field_value = ($field_value - 0.01) . "<>" . ($field_value + 0.01); - $operator = 'between'; - } - } + if($type == 'decimal' || $type == 'float' || $type == 'currency') { + require_once('modules/Currencies/Currency.php'); + + $field_value = unformat_number($field_value); + if ( $type == 'currency' && stripos($field,'_usdollar')!==FALSE ) { + // It's a US Dollar field, we need to do some conversions from the user's local currency + $currency_id = $GLOBALS['current_user']->getPreference('currency'); + if ( empty($currency_id) ) { + $currency_id = -99; + } + if ( $currency_id != -99 ) { + $currency = new Currency(); + $currency->retrieve($currency_id); + $field_value = $currency->convertToDollar($field_value); + } + } + // Databases can't really search for floating point numbers, because they can't be accurately described in binary, + // So we have to fuzz out the match a little bit + $top = $field_value + 0.01; + $bottom = $field_value - 0.01; + $field_value = $bottom . "<>" . $top; + $operator = 'between'; + } + $itr++; if(!empty($where)) { $where .= " OR "; } - + switch(strtolower($operator)) { case 'subquery': $in = 'IN'; @@ -881,15 +779,15 @@ require_once('include/EditView/EditView2.php'); if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'UnifiedSearch'){ $UnifiedSearch = true; } - //check to see if this is a universal search, AND the field name is "last_name" if($UnifiedSearch && strpos($db_field, 'last_name') !== false){ //split the string value, and the db field name $string = explode(' ', $field_value); $column_name = explode('.', $db_field); + //when a search is done with a space, we concatenate and search against the full name. if(count($string)>1){ - //add where clause against concatenated fields + //add where clause agains concatenated fields $where .= $GLOBALS['db']->concat($column_name[0],array('first_name','last_name')) . " LIKE '{$field_value}%'"; $where .= ' OR ' . $GLOBALS['db']->concat($column_name[0],array('last_name','first_name')) . " LIKE '{$field_value}%'"; }else{ @@ -897,38 +795,14 @@ require_once('include/EditView/EditView2.php'); $where .= $db_field . " like '".$field_value.$like_char."'"; } - }else { - - //Check if this is a first_name, last_name search - if(isset($this->seed->field_name_map) && isset($this->seed->field_name_map[$db_field])) - { - $vardefEntry = $this->seed->field_name_map[$db_field]; - if(!empty($vardefEntry['db_concat_fields']) && in_array('first_name', $vardefEntry['db_concat_fields']) && in_array('last_name', $vardefEntry['db_concat_fields'])) - { - if(!empty($GLOBALS['app_list_strings']['salutation_dom']) && is_array($GLOBALS['app_list_strings']['salutation_dom'])) - { - foreach($GLOBALS['app_list_strings']['salutation_dom'] as $salutation) - { - if(!empty($salutation) && strpos($field_value, $salutation) == 0) - { - $field_value = trim(substr($field_value, strlen($salutation))); - break; - } - } - } - } - } - + }else{ //field is not last name or this is not from global unified search, so do normal where clause $where .= $db_field . " like '".$field_value.$like_char."'"; } } break; - case 'not in': - $where .= $db_field . ' not in ('.$field_value.')'; - break; case 'in': - $where .= $db_field . ' in ('.$field_value.')'; + $where .= $db_field . " in (".$field_value.')'; break; case '=': if($type == 'bool' && $field_value == 0) { @@ -961,105 +835,9 @@ require_once('include/EditView/EditView2.php'); case 'innerjoin': $this->seed->listview_inner_join[] = $parms['innerjoin'] . " '" . $parms['value'] . "%')"; break; - case 'not_equal': - $where .= $db_field . " != '". $field_value . "'"; - break; - case 'greater_than': - $where .= $db_field . " > '". $field_value . "'"; - break; - case 'greater_than_equals': - $where .= $db_field . " >= '". $field_value . "'"; - break; - case 'less_than': - $where .= $db_field . " < '". $field_value . "'"; - break; - case 'less_than_equals': - $where .= $db_field . " <= '". $field_value . "'"; - break; - case 'last_7_days': - if($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",10) BETWEEN LEFT((current_date - interval '7' day),10) AND LEFT(current_date,10)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , " . $db_field . " , GETDATE() ) <= 7 and DATEDIFF ( d , " . $db_field . " , GETDATE() ) >= 0"; - } - break; - case 'next_7_days': - if($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",10) BETWEEN LEFT(current_date,10) AND LEFT((current_date + interval '7' day),10)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , GETDATE() , " . $db_field . " ) <= 7 and DATEDIFF ( d , GETDATE() , " . $db_field . " ) >= 0"; - } - break; - case 'next_month': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",7) = LEFT( (current_date + interval '1' month),7)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "(LEFT( ".$db_field.",4) = LEFT( (DATEADD(mm,1,GETDATE())),4)) and (DATEPART(yy, DATEADD(mm,1,GETDATE())) = DATEPART(yy, DATEADD(mm,1,".$db_field.")))"; - } - break; - case 'last_month': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",7) = LEFT( (current_date - interval '1' month),7)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "LEFT(" . $db_field . ",4) = LEFT((DATEADD(mm,-1,GETDATE())),4) and DATEPART(yy," . $db_field . ") = DATEPART(yy, GETDATE())"; - } - break; - case 'this_month': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",7) = LEFT( current_date,7)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "LEFT (" . $db_field . ",4) = LEFT( GETDATE(),4) and DATEPART(yy," . $db_field . ") = DATEPART(yy, GETDATE())"; - } - break; - case 'last_30_days': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",10) BETWEEN LEFT((current_date - interval '30' day),10) AND LEFT(current_date,10)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , " . $db_field . " , GETDATE() ) <= 30 and DATEDIFF ( d , " . $db_field . " , GETDATE() ) >= 0"; - } - break; - case 'next_30_days': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= $db_field . " BETWEEN (current_date) AND (current_date + interval '1' month)"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEDIFF ( d , GETDATE() , " . $db_field . " ) <= 30 and DATEDIFF ( d , GETDATE() , " . $db_field . " ) >= 0"; - } - break; - case 'this_year': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",4) = EXTRACT(YEAR FROM ( current_date ))"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEPART(yy," . $db_field . ") = DATEPART(yy, GETDATE())"; - } - break; - case 'last_year': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",4) = EXTRACT(YEAR FROM ( current_date - interval '1' year))"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEPART(yy," . $db_field . ") = DATEPART(yy,( dateadd(yy,-1,GETDATE())))"; - } - break; - case 'next_year': - if ($GLOBALS['db']->dbType == 'mysql') { - $where .= "LEFT(" . $db_field . ",4) = EXTRACT(YEAR FROM ( current_date + interval '1' year))"; - } - elseif ($GLOBALS['db']->dbType == 'mssql') { - $where .= "DATEPART(yy," . $db_field . ") = DATEPART(yy,( dateadd(yy, 1,GETDATE())))"; - } - break; case 'isnull': - // OOTB fields are NULL, custom fields are blank - $where .= '('.$db_field . ' IS NULL or ' . $db_field . "='')"; - if ($field_value != '') + $where .= $db_field . ' IS NULL'; + if ($field_value != '') $where .= ' OR ' . $db_field . " in (".$field_value.')'; break; } @@ -1076,8 +854,9 @@ require_once('include/EditView/EditView2.php'); } } } - + return $where_clauses; } } -?> \ No newline at end of file + +?> diff --git a/include/SearchForm/SugarSpot.php b/include/SearchForm/SugarSpot.php index 56cb06d8..437db9f3 100644 --- a/include/SearchForm/SugarSpot.php +++ b/include/SearchForm/SugarSpot.php @@ -36,8 +36,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -class SugarSpot -{ +class SugarSpot +{ /** * Performs the search and returns the HTML widget containing the results * @@ -47,133 +47,83 @@ class SugarSpot * @return string HTML widget */ public function searchAndDisplay( - $query, - $modules, + $query, + $modules, $offset = -1 ) { $query_encoded = urlencode($query); $results = $this->_performSearch($query, $modules, $offset); - $str = '
'; - $actions=0; $foundData = false; - foreach($results as $m=>$data){ + foreach($results as $m=>$data){ if(empty($data['data'])){ continue; } - $foundData = true; - + $countRemaining = $data['pageData']['offsets']['total'] - count($data['data']); if($offset > 0) $countRemaining -= $offset; $more = ''; $data['pageData']['offsets']['next']++; if($countRemaining > 0){ $more = <<($countRemaining {$GLOBALS['app_strings']['LBL_SEARCH_MORE']}) +($countRemaining more) EOHTML; } - + $modDisplayString = $m; if(isset($GLOBALS['app_list_strings']['moduleList'][$m])) $modDisplayString = $GLOBALS['app_list_strings']['moduleList'][$m]; - + $str.= "
{$modDisplayString} $more
"; $str.= '
    '; foreach($data['data'] as $row){ $name = ''; - if(!empty($row['NAME'])){ $name = $row['NAME']; - } else if(!empty($row['DOCUMENT_NAME'])) { - $name = $row['DOCUMENT_NAME']; - } else { + }else{ foreach($row as $k=>$v){ - if(strpos($k, 'NAME') !== false && !empty($row[$k])){ + if(strpos($k, 'NAME') !== false){ $name = $v; break; } } - - if(empty($name)) - { - foreach($row as $k=>$v){ - if(strpos($k, 'NAME') !== false){ - $name = $v; - break; - } - } - } } - + $str .= <<$name EOHTML; } $str.= '
'; } - - if($foundData) - { - $str = <<{$GLOBALS['app_strings']['LBL_EMAIL_SHOW_READ']} -

- {$str} -
-

- + $str .= <<{$GLOBALS['app_strings']['LBL_EMAIL_SHOW_READ']} + EOHTML; - } else { - $str .= $GLOBALS['app_strings']['LBL_EMAIL_SEARCH_NO_RESULTS']; - $str .= << -

- -EOHTML; - - } - return $str; } - + /** * Returns the array containing the $searchFields for a module * * @param $moduleName string * @return array */ - protected static function getSearchFields( + protected function getSearchFields( $moduleName ) { - if(file_exists("custom/modules/{$moduleName}/metadata/SearchFields.php")) { - $searchFields = array(); - require "custom/modules/{$moduleName}/metadata/SearchFields.php" ; - return $searchFields; - } else if(file_exists("modules/{$moduleName}/metadata/SearchFields.php")) { + if(file_exists("modules/{$moduleName}/metadata/SearchFields.php")) { $searchFields = array(); require "modules/{$moduleName}/metadata/SearchFields.php" ; return $searchFields; - } else { + } + else { return array(); } } - - /** - * Get count from query - * @param SugarBean $seed - * @param string $main_query - */ - protected function _getCount($seed, $main_query) - { -// $count_query = $seed->create_list_count_query($main_query); - $result = $seed->db->query("SELECT COUNT(*) as c FROM ($main_query) main"); - $row = $seed->db->fetchByAssoc($result); - return isset($row['c'])?$row['c']:0; - } - /** * Performs the search * @@ -183,243 +133,118 @@ EOHTML; * @return array */ protected function _performSearch( - $query, - $modules, + $query, + $modules, $offset = -1 ) { - if(empty($query)) return array(); $primary_module=''; $results = array(); require_once 'include/SearchForm/SearchForm2.php' ; $where = ''; - $searchEmail = preg_match('/^([^%]|%)*@([^%]|%)*$/', $query); - - $limit = ( !empty($GLOBALS['sugar_config']['max_spotresults_initial']) ? $GLOBALS['sugar_config']['max_spotresults_initial'] : 5 ); - if($offset !== -1){ - $limit = ( !empty($GLOBALS['sugar_config']['max_spotresults_more']) ? $GLOBALS['sugar_config']['max_spotresults_more'] : 20 ); - } - $totalCounted = empty($GLOBALS['sugar_config']['disable_count_query']); - - foreach($modules as $moduleName){ - if (empty($primary_module)) $primary_module=$moduleName; - + + $searchEmail = preg_match('/^([^\%]|\%)*@([^\%]|\%)*$/', $query); + + foreach($modules as $moduleName){ + if (empty($primary_module)) $primary_module=$moduleName; + $searchFields = SugarSpot::getSearchFields($moduleName); - - if (empty($searchFields[$moduleName])) continue; - $class = $GLOBALS['beanList'][$moduleName]; $return_fields = array(); $seed = new $class(); - if(!$seed->ACLAccess('ListView')) continue; - - if ($class == 'aCase') { - $class = 'Case'; - } - - foreach($searchFields[$moduleName] as $k=>$v){ - $keep = false; - $searchFields[$moduleName][$k]['value'] = $query; - - if(!empty($GLOBALS['dictionary'][$class]['unified_search'])){ - if(empty($GLOBALS['dictionary'][$class]['fields'][$k]['unified_search'])){ - - if(isset($searchFields[$moduleName][$k]['db_field'])){ - foreach($searchFields[$moduleName][$k]['db_field'] as $field){ - if(!empty($GLOBALS['dictionary'][$class]['fields'][$field]['unified_search'])){ - $keep = true; + if (empty($searchFields[$moduleName])) + continue; + + if ($class == 'aCase') { + $class = 'Case'; + } + foreach($searchFields[$moduleName] as $k=>$v){ + $keep = false; + $searchFields[$moduleName][$k]['value'] = $query; + + if(!empty($GLOBALS['dictionary'][$class]['unified_search'])){ + if(empty($GLOBALS['dictionary'][$class]['fields'][$k]['unified_search'])){ + + if(isset($searchFields[$moduleName][$k]['db_field'])){ + foreach($searchFields[$moduleName][$k]['db_field'] as $field){ + if(!empty($GLOBALS['dictionary'][$class]['fields'][$field]['unified_search'])){ + $return_fields[] = $field; + $keep = true; + } } } - } - if(!$keep){ - if(strpos($k,'email') === false || !$searchEmail) { - unset($searchFields[$moduleName][$k]); + if(!$keep){ + if(strpos($k,'email') === false || !$searchEmail) { + unset($searchFields[$moduleName][$k]); + } } + }else{ + $return_fields[] = $k; } + }else if(empty($GLOBALS['dictionary'][$class]['fields'][$k]) ){; + unset($searchFields[$moduleName][$k]); }else{ - if($GLOBALS['dictionary'][$class]['fields'][$k]['type'] == 'int' && !is_numeric($query)) { - unset($searchFields[$moduleName][$k]); - } - } - }else if(empty($GLOBALS['dictionary'][$class]['fields'][$k]) ){ - unset($searchFields[$moduleName][$k]); - }else{ - switch($GLOBALS['dictionary'][$class]['fields'][$k]['type']){ - case 'id': - case 'date': - case 'datetime': - case 'bool': - unset($searchFields[$moduleName][$k]); - break; - case 'int': - if(!is_numeric($query)) { - unset($searchFields[$moduleName][$k]); - break; - } + switch($GLOBALS['dictionary'][$class]['fields'][$k]['type']){ + case 'id': + case 'date': + case 'datetime': + case 'bool': + unset($searchFields[$moduleName][$k]); + default: + $return_fields[] = $k; + + } + } + } - } - - if (empty($searchFields[$moduleName])) continue; - - if(isset($seed->field_defs['name'])) { - $return_fields['name'] = $seed->field_defs['name']; - } - - foreach($seed->field_defs as $k => $v) { - if(isset($seed->field_defs[$k]['type']) && ($seed->field_defs[$k]['type'] == 'name') && !isset($return_fields[$k])) { - $return_fields[$k] = $seed->field_defs[$k]; - } - } - - if(!isset($return_fields['name'])) { - // if we couldn't find any name fields, try search fields that have name in it - foreach($searchFields[$moduleName] as $k => $v) { - if(strpos($k, 'name') != -1 && isset($seed->field_defs[$k]) - && !isset($seed->field_defs[$k]['source'])) { - $return_fields[$k] = $seed->field_defs[$k]; - break; - } - } - } - - if(!isset($return_fields['name'])) { - // last resort - any fields that have 'name' in their name - foreach($seed->field_defs as $k => $v) { - if(strpos($k, 'name') != -1 && isset($seed->field_defs[$k]) - && !isset($seed->field_defs[$k]['source'])) { - $return_fields[$k] = $seed->field_defs[$k]; - break; - } - } - } - - if(!isset($return_fields['name'])) { - // FAIL: couldn't find id & name for the module - $GLOBALS['log']->error("Unable to find name for module $moduleName"); - continue; - } - - if(isset($return_fields['name']['fields'])) { - // some names are composite - foreach($return_fields['name']['fields'] as $field) { - $return_fields[$field] = $seed->field_defs[$field]; - } - } - + $searchForm = new SearchForm ( $seed, $moduleName ) ; $searchForm->setup (array ( $moduleName => array() ) , $searchFields , '' , 'saved_views' /* hack to avoid setup doing further unwanted processing */ ) ; $where_clauses = $searchForm->generateSearchWhere() ; + $where = ""; + if (count($where_clauses) > 0){ + $where = '(('. implode(' ) OR ( ', $where_clauses) . '))'; + } - if(empty($where_clauses)) { - continue; + $lvd = new ListViewData(); + $lvd->additionalDetails = false; + $max = ( !empty($sugar_config['max_spotresults_initial']) ? $sugar_config['max_spotresults_initial'] : 5 ); + if($offset !== -1){ + $max = ( !empty($sugar_config['max_spotresults_more']) ? $sugar_config['max_spotresults_more'] : 20 ); } - if(count($where_clauses) > 1) { - $query_parts = array(); - - $ret_array_start = $seed->create_new_list_query('', '', $return_fields, array(), 0, '', true, $seed, true); - $search_keys = array_keys($searchFields[$moduleName]); - - foreach($where_clauses as $n => $clause) { - $allfields = $return_fields; - $skey = $search_keys[$n]; - if(isset($seed->field_defs[$skey])) { - // Joins for foreign fields aren't produced unless the field is in result, hence the merge - $allfields[$skey] = $seed->field_defs[$skey]; - } - $ret_array = $seed->create_new_list_query('', $clause, $allfields, array(), 0, '', true, $seed, true); - $query_parts[] = $ret_array_start['select'] . $ret_array['from'] . $ret_array['where'] . $ret_array['order_by']; - } - $main_query = "(".join(") UNION (", $query_parts).")"; - } else { - foreach($searchFields[$moduleName] as $k=>$v){ - if(isset($seed->field_defs[$k])) { - $return_fields[$k] = $seed->field_defs[$k]; - } - } - $ret_array = $seed->create_new_list_query('', $where_clauses[0], $return_fields, array(), 0, '', true, $seed, true); - $main_query = $ret_array['select'] . $ret_array['from'] . $ret_array['where'] . $ret_array['order_by']; + $params = array(); + if ( $moduleName == 'Reports') { + $params['overrideOrder'] = true; + $params['orderBy'] = 'name'; } - - $totalCount = null; - if($limit < -1) { - $result = $seed->db->query($main_query); - } else { - if($limit == -1) { - $limit = $GLOBALS['sugar_config']['list_max_entries_per_page']; - } - - if($offset == 'end') { - $totalCount = $this->_getCount($seed, $main_query); - if($totalCount) { - $offset = (floor(($totalCount -1) / $limit)) * $limit; - } else { - $offset = 0; - } - } - $result = $seed->db->limitQuery($main_query, $offset, $limit + 1); - } - - $data = array(); - $count = 0; - while($count < $limit && ($row = $seed->db->fetchByAssoc($result))) { - $temp = clone $seed; - $temp->setupCustomFields($temp->module_dir); - $temp->loadFromRow($row); - $data[] = $temp->get_list_view_data($return_fields); - $count++; - } - - $nextOffset = -1; - $prevOffset = -1; - $endOffset = -1; - - if($count >= $limit) { - $nextOffset = $offset + $limit; - } - - if($offset > 0) { - $prevOffset = $offset - $limit; - if($prevOffset < 0) $prevOffset = 0; - } - - if( $count >= $limit && $totalCounted){ - if(!isset($totalCount)) { - $totalCount = $this->_getCount($seed, $main_query); - } - } else { - $totalCount = $count + $offset; - } - - $pageData['offsets'] = array( 'current'=>$offset, 'next'=>$nextOffset, 'prev'=>$prevOffset, 'end'=>$endOffset, 'total'=>$totalCount, 'totalCounted'=>$totalCounted); - $pageData['bean'] = array('objectName' => $seed->object_name, 'moduleDir' => $seed->module_dir); - - $results[$moduleName] = array("data" => $data, "pageData" => $pageData); + $results[$moduleName]= $lvd->getListViewData($seed, $where, $offset, $max, $return_fields,$params,'id') ; + } return $results; - } - + } + /** * Function used to walk the array and find keys that map the queried string. * if both the pattern and module name is found the promote the string to thet top. */ protected function _searchKeys( - $item1, - $key, + $item1, + $key, $patterns - ) + ) { //make the module name singular.... if ($patterns[1][strlen($patterns[1])-1] == 's') { $patterns[1]=substr($patterns[1],0,(strlen($patterns[1])-1)); } - + $module_exists = stripos($key,$patterns[1]); //primary module name. $pattern_exists = stripos($key,$patterns[0]); //pattern provided by the user. if ($module_exists !== false and $pattern_exists !== false) { $GLOBALS['matching_keys']= array_merge(array(array('NAME'=>$key, 'ID'=>$key, 'VALUE'=>$item1)),$GLOBALS['matching_keys']); - } + } else { if ($pattern_exists !== false) { $GLOBALS['matching_keys'][]=array('NAME'=>$key, 'ID'=>$key, 'VALUE'=>$item1); diff --git a/include/SearchForm/tpls/SearchFormGeneric.tpl b/include/SearchForm/tpls/SearchFormGeneric.tpl index ff20a49a..0d08e36a 100644 --- a/include/SearchForm/tpls/SearchFormGeneric.tpl +++ b/include/SearchForm/tpls/SearchFormGeneric.tpl @@ -70,14 +70,14 @@

{else} - + {/if}   {if $HAS_ADVANCED_SEARCH} -   {$APP.LNK_ADVANCED_SEARCH} +   {$APP.LNK_ADVANCED_SEARCH} {/if}
diff --git a/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl b/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl index 9d916a70..d6a02115 100644 --- a/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl +++ b/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl @@ -82,7 +82,7 @@ - + {if $DISPLAY_SEARCH_HELP} {/if} diff --git a/include/Smarty/Config_File.class.php b/include/Smarty/Config_File.class.php index ef283b0b..7c5e7cbd 100644 --- a/include/Smarty/Config_File.class.php +++ b/include/Smarty/Config_File.class.php @@ -261,12 +261,15 @@ class Config_File { $config_file = $file_name; ini_set('track_errors', true); - $contents = @sugar_file_get_contents($config_file); - if ($contents === false) { + $fp = @fopen($config_file, "r"); + if (!is_resource($fp)) { $this->_trigger_error_msg("Could not open config file '$config_file'"); return false; } + $contents = ($size = filesize($config_file)) ? fread($fp, $size) : ''; + fclose($fp); + $this->_config_data[$config_file] = $this->parse_contents($contents); return true; } @@ -321,7 +324,7 @@ class Config_File { $vars = array(); continue; } - } else { + } else { $section_name = $match[1]; } if (!isset($config_data['sections'][$section_name])) diff --git a/include/Smarty/plugins/function.html_select_date.php b/include/Smarty/plugins/function.html_select_date.php index eae959ec..c230d29d 100644 --- a/include/Smarty/plugins/function.html_select_date.php +++ b/include/Smarty/plugins/function.html_select_date.php @@ -60,7 +60,7 @@ r8230 - 2005-10-03 17:47:19 -0700 (Mon, 03 Oct 2005) - majed - Added Sugar_Smart * @param Smarty * @return string */ -function smarty_function_html_select_date($params, $smarty) +function smarty_function_html_select_date($params, &$smarty) { require_once $smarty->_get_plugin_filepath('shared','escape_special_chars'); require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); @@ -170,7 +170,7 @@ function smarty_function_html_select_date($params, $smarty) } // Now split this in pieces, which later can be used to set the select $time = explode("-", $time); - + // make syntax "+N" or "-N" work with start_year and end_year if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) { if ($match[1] == '+') { @@ -186,7 +186,7 @@ function smarty_function_html_select_date($params, $smarty) $start_year = strftime('%Y') - $match[2]; } } - if (strlen($time[0]) > 0) { + if (strlen($time[0]) > 0) { if ($start_year > $time[0] && !isset($params['start_year'])) { // force start year to include given date if not explicitly set $start_year = $time[0]; diff --git a/include/Smarty/plugins/function.sugar_button.php b/include/Smarty/plugins/function.sugar_button.php index 9ef9b4e0..5409d1be 100644 --- a/include/Smarty/plugins/function.sugar_button.php +++ b/include/Smarty/plugins/function.sugar_button.php @@ -287,21 +287,19 @@ function smarty_function_sugar_button($params, &$smarty) } $type = $params['id']; - $location = (empty($params['location'])) ? "" : "_".$params['location']; - if(!is_array($type)) { $module = $params['module']; $view = $params['view']; switch(strtoupper($type)) { case "CANCEL": $cancelButton = '{if !empty($smarty.request.return_action) && ($smarty.request.return_action == "DetailView" && !empty($smarty.request.return_id))}'; - $cancelButton .= ' '; + $cancelButton .= ' '; $cancelButton .= '{elseif !empty($smarty.request.return_action) && ($smarty.request.return_action == "DetailView" && !empty($fields.id.value))}'; - $cancelButton .= ' '; + $cancelButton .= ' '; $cancelButton .= '{elseif empty($smarty.request.return_action) || empty($smarty.request.return_id) && !empty($fields.id.value)}'; - $cancelButton .= ' '; + $cancelButton .= ' '; $cancelButton .= '{else}'; - $cancelButton .= ' '; + $cancelButton .= ' '; $cancelButton .= '{/if}'; return $cancelButton; break; @@ -319,12 +317,12 @@ function smarty_function_sugar_button($params, &$smarty) break; case "FIND_DUPLICATES": - return '{if $bean->aclAccess("edit") && $bean->aclAccess("delete")}{/if} '; + return '{if $bean->aclAccess("edit")}{/if} '; break; case "SAVE": $view = ($_REQUEST['action'] == 'EditView') ? 'EditView' : (($view == 'EditView') ? 'EditView' : $view); - return '{if $bean->aclAccess("save")}{/if} '; + return '{if $bean->aclAccess("save")}{/if} '; break; case "SUBPANELSAVE": diff --git a/include/Smarty/plugins/function.sugarvar.php b/include/Smarty/plugins/function.sugarvar.php index 0ba1aec3..fbbd8e28 100644 --- a/include/Smarty/plugins/function.sugarvar.php +++ b/include/Smarty/plugins/function.sugarvar.php @@ -60,7 +60,7 @@ r22124 - 2007-04-20 16:54:53 -0700 (Fri, 20 Apr 2007) - clee - * Type: function
* Name: sugarvar
* Purpose: creates a smarty variable from the parameters - * + * * @author Wayne Pan {wayne at sugarcrm.com} * @param array * @param Smarty @@ -71,12 +71,12 @@ function smarty_function_sugarvar($params, &$smarty) if(empty($params['key'])) { $smarty->trigger_error("sugarvar: missing 'key' parameter"); return; - } + } $object = (empty($params['objectName']))?$smarty->get_template_vars('parentFieldArray'): $params['objectName']; $displayParams = $smarty->get_template_vars('displayParams'); - - + + if(empty($params['memberName'])){ $member = $smarty->get_template_vars('vardef'); $member = $member['name']; @@ -84,15 +84,15 @@ function smarty_function_sugarvar($params, &$smarty) $members = explode('.', $params['memberName']); $member = $smarty->get_template_vars($members[0]); for($i = 1; $i < count($members); $i++){ - $member = $member[$members[$i]]; + $member = $member[$members[$i]]; } - } - + } + $_contents = '$'. $object . '.' . $member . '.' . $params['key']; if(empty($params['stringFormat']) && empty($params['string'])) { $_contents = '{' . $_contents; if(!empty($params['htmlentitydecode'])){ - $_contents .= '|escape:\'htmlentitydecode\''; + $_contents .= '|escape:\'htmlentitydecode\''; } if(!empty($displayParams['htmlescape'])){ $_contents .= '|escape:\'html\''; @@ -102,11 +102,11 @@ function smarty_function_sugarvar($params, &$smarty) } if(!empty($displayParams['url2html'])){ $_contents .= '|url2html'; - } + } if(!empty($displayParams['nl2br'])){ $_contents .= '|nl2br'; - } - + } + $_contents .= '}'; } return $_contents; diff --git a/include/Smarty/plugins/modifier.default_date_value.php b/include/Smarty/plugins/modifier.default_date_value.php index 83ae8463..747c27ab 100644 --- a/include/Smarty/plugins/modifier.default_date_value.php +++ b/include/Smarty/plugins/modifier.default_date_value.php @@ -207,5 +207,6 @@ function smarty_modifier_default_date_value($defaultValue) { global $timedate; require_once('modules/DynamicFields/templates/Fields/TemplateDate.php'); $td = new TemplateDate(); - return $timedate->asUser(new SugarDateTime($td->dateStrings[$defaultValue])); + return $timedate->to_display_date(date($GLOBALS['timedate']->dbDayFormat,strtotime($td->dateStrings[$defaultValue])), false); } +?> diff --git a/include/SubPanel/SubPanel.php b/include/SubPanel/SubPanel.php index 4289569c..74014cd1 100644 --- a/include/SubPanel/SubPanel.php +++ b/include/SubPanel/SubPanel.php @@ -203,7 +203,6 @@ class SubPanel $ListView->show_export_button = false; //function returns the query that was used to populate sub-panel data. - $query=$ListView->process_dynamic_listview($this->parent_module, $this->parent_bean,$this->subpanel_defs); $this->subpanel_query=$query; $ob_contents = ob_get_contents(); diff --git a/include/SubPanel/SubPanelTiles.js b/include/SubPanel/SubPanelTiles.js index 05bdeb48..102fb5f8 100644 --- a/include/SubPanel/SubPanelTiles.js +++ b/include/SubPanel/SubPanelTiles.js @@ -108,8 +108,7 @@ return false;if(confirmMsg!=null){if(!confirm(confirmMsg)){return false;}else{di subpanelContents[theDiv]['newDiv'].parentNode.removeChild(subpanelContents[theDiv]['newDiv']);subpanelContents[theDiv]['list'].style.display='';return false;},loadSubpanelGroupFromMore:function(group){SUGAR.subpanelUtils.updateSubpanelMoreTab(group);SUGAR.subpanelUtils.loadSubpanelGroup(group);},updateSubpanelMoreTab:function(group){var moreTab=document.getElementById(SUGAR.subpanelUtils.subpanelMoreTab+'_sp_tab');moreTab.id=group+'_sp_tab';moreTab.getElementsByTagName('a')[0].innerHTML=group;moreTab.getElementsByTagName('a')[0].href="javascript:SUGAR.subpanelUtils.loadSubpanelGroup('"+group+"');";var menuLink=document.getElementById(group+'_sp_mm');menuLink.id=SUGAR.subpanelUtils.subpanelMoreTab+'_sp_mm';menuLink.href="javascript:SUGAR.subpanelUtils.loadSubpanelGroupFromMore('"+SUGAR.subpanelUtils.subpanelMoreTab+"');";menuLink.innerHTML=SUGAR.subpanelUtils.subpanelMoreTab;SUGAR.subpanelUtils.subpanelMoreTab=group;},loadSubpanelGroup:function(group){if(group==SUGAR.subpanelUtils.currentSubpanelGroup)return;if(SUGAR.subpanelUtils.loadedGroups[group]){SUGAR.subpanelUtils.updateSubpanel(group);}else{SUGAR.subpanelUtils.loadedGroups.push(group);var needed=Array();for(group_sp in SUGAR.subpanelUtils.subpanelGroups[group]){if(typeof(SUGAR.subpanelUtils.subpanelGroups[group][group_sp])=='string'&&!document.getElementById('whole_subpanel_'+SUGAR.subpanelUtils.subpanelGroups[group][group_sp])){needed.push(SUGAR.subpanelUtils.subpanelGroups[group][group_sp]);}} var success=function(){SUGAR.subpanelUtils.updateSubpanelEventHandlers(needed);SUGAR.subpanelUtils.updateSubpanels(group);};if(needed.length){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));SUGAR.util.retrieveAndFill(SUGAR.subpanelUtils.requestUrl+needed.join(','),'subpanel_list',null,success,null,true);}else{SUGAR.subpanelUtils.updateSubpanels(group);}} SUGAR.subpanelUtils.setGroupCookie(group);},updateSubpanels:function(group){var sp_list=document.getElementById('subpanel_list');for(sp in sp_list.childNodes){if(sp_list.childNodes[sp].id){sp_list.childNodes[sp].style.display='none';}} -for(group_sp in SUGAR.subpanelUtils.subpanelGroups[group]){if(typeof(SUGAR.subpanelUtils.subpanelGroups[group][group_sp])!='string')continue;var cur=document.getElementById('whole_subpanel_'+SUGAR.subpanelUtils.subpanelGroups[group][group_sp]);if(cur!=null) -cur.style.display='block';try{YAHOO.util.DDM.swapNode(cur,sp_list.getElementsByTagName('LI')[group_sp]);}catch(e){}} +for(group_sp in SUGAR.subpanelUtils.subpanelGroups[group]){if(typeof(SUGAR.subpanelUtils.subpanelGroups[group][group_sp])!='string')continue;var cur=document.getElementById('whole_subpanel_'+SUGAR.subpanelUtils.subpanelGroups[group][group_sp]);cur.style.display='block';try{YAHOO.util.DDM.swapNode(cur,sp_list.getElementsByTagName('LI')[group_sp]);}catch(e){}} SUGAR.subpanelUtils.updateSubpanelTabs(group);},updateSubpanelTabs:function(group){if(SUGAR.subpanelUtils.showLinks){SUGAR.subpanelUtils.updateSubpanelSubtabs(group);document.getElementById('subpanelSubTabs').innerHTML=SUGAR.subpanelUtils.subpanelSubTabs[group];} oldTab=document.getElementById(SUGAR.subpanelUtils.currentSubpanelGroup+'_sp_tab');if(oldTab){oldTab.className='';oldTab.getElementsByTagName('a')[0].className='';} mainTab=document.getElementById(group+'_sp_tab');mainTab.className='active';mainTab.getElementsByTagName('a')[0].className='current';SUGAR.subpanelUtils.currentSubpanelGroup=group;ajaxStatus.hideStatus();},updateSubpanelEventHandlers:function(){if(SubpanelInitTabNames){SubpanelInitTabNames(SUGAR.subpanelUtils.getLayout(false));}},reorderSubpanelSubtabs:function(group,order){SUGAR.subpanelUtils.subpanelGroups[group]=order;if(SUGAR.subpanelUtils.showLinks==1){SUGAR.subpanelUtils.updateSubpanelSubtabs(group);if(SUGAR.subpanelUtils.currentSubpanelGroup==group){document.getElementById('subpanelSubTabs').innerHTML=SUGAR.subpanelUtils.subpanelSubTabs[group];}}},updateSubpanelSubtabs:function(group){var notFirst=0;var preMore=SUGAR.subpanelUtils.subpanelGroups[group].slice(0,SUGAR.subpanelUtils.subpanelMaxSubtabs);SUGAR.subpanelUtils.subpanelSubTabs[group]='';for(var sp_key=0;sp_key | ';}else{notFirst=1;} diff --git a/include/SubPanel/SugarTab.php b/include/SubPanel/SugarTab.php index 9b896eb3..7fe877fb 100644 --- a/include/SubPanel/SugarTab.php +++ b/include/SubPanel/SugarTab.php @@ -38,16 +38,15 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -class SugarTab -{ - function SugarTab($type='singletabmenu') - { +if(empty($GLOBALS['sugar_smarty']))$GLOBALS['sugar_smarty'] = new Sugar_Smarty(); +class SugarTab{ + + function SugarTab($type='singletabmenu'){ $this->type = $type; - $this->ss = new Sugar_Smarty(); + } - function setup($mainTabs, $otherTabs=array(), $subTabs=array(), $selected_group='All') - { + function setup($mainTabs, $otherTabs=array(), $subTabs=array(), $selected_group='All'){ global $sugar_version, $sugar_config, $current_user; $max_tabs = $current_user->getPreference('max_tabs'); @@ -62,28 +61,27 @@ class SugarTab array_splice($mainTabs, $max_tabs-1, 0, $temp); } - $this->ss->assign('showLinks', 'false'); - $this->ss->assign('sugartabs', array_slice($mainTabs, 0, $max_tabs)); - $this->ss->assign('moreMenu', array_slice($mainTabs, $max_tabs)); - $this->ss->assign('othertabs', $otherTabs); - $this->ss->assign('startSubPanel', $selected_group); - $this->ss->assign('sugarVersionJsStr', "?s=$sugar_version&c={$sugar_config['js_custom_version']}"); + $GLOBALS['sugar_smarty']->assign('showLinks', 'false'); + $GLOBALS['sugar_smarty']->assign('sugartabs', array_slice($mainTabs, 0, $max_tabs)); + $GLOBALS['sugar_smarty']->assign('moreMenu', array_slice($mainTabs, $max_tabs)); + $GLOBALS['sugar_smarty']->assign('othertabs', $otherTabs); + $GLOBALS['sugar_smarty']->assign('startSubPanel', $selected_group); + $GLOBALS['sugar_smarty']->assign('sugarVersionJsStr', "?s=$sugar_version&c={$sugar_config['js_custom_version']}"); if(!empty($mainTabs)) { $mtak = array_keys($mainTabs); - $this->ss->assign('moreTab', $mainTabs[$mtak[min(count($mtak)-1, $max_tabs-1)]]['label']); + $GLOBALS['sugar_smarty']->assign('moreTab', $mainTabs[$mtak[min(count($mtak)-1, $max_tabs-1)]]['label']); } } - function fetch() - { - return $this->ss->fetch('include/SubPanel/tpls/' . $this->type . '.tpl'); + function fetch(){ + return $GLOBALS['sugar_smarty']->fetch('include/SubPanel/tpls/' . $this->type . '.tpl'); } + function display(){ + $GLOBALS['sugar_smarty']->display('include/SubPanel/tpls/' . $this->type . '.tpl'); + } + - function display() - { - $this->ss->display('include/SubPanel/tpls/' . $this->type . '.tpl'); - } } diff --git a/include/SugarCache/SugarCache.php b/include/SugarCache/SugarCache.php deleted file mode 100644 index 7702a650..00000000 --- a/include/SugarCache/SugarCache.php +++ /dev/null @@ -1,181 +0,0 @@ -debug("Found cache backend $cacheClass"); - $cacheInstance = new $cacheClass(); - if ( $cacheInstance->useBackend() - && $cacheInstance->getPriority() < $lastPriority ) { - $GLOBALS['log']->debug("Using cache backend $cacheClass, since ".$cacheInstance->getPriority()." is less than ".$lastPriority); - self::$_cacheInstance = $cacheInstance; - $lastPriority = $cacheInstance->getPriority(); - } - } - } - } - } - } - - /** - * Returns the instance of the SugarCacheAbstract object, cooresponding to the external - * cache being used. - */ - public static function instance() - { - if ( !is_subclass_of(self::$_cacheInstance,'SugarCacheAbstract') ) - self::_init(); - - return self::$_cacheInstance; - } -} - -/** - * Procedural API for external cache - */ - -/** - * Retrieve a key from cache. For the Zend Platform, a maximum age of 5 minutes is assumed. - * - * @param String $key -- The item to retrieve. - * @return The item unserialized - */ -function sugar_cache_retrieve($key) -{ - return SugarCache::instance()->$key; -} - -/** - * Put a value in the cache under a key - * - * @param String $key -- Global namespace cache. Key for the data. - * @param Serializable $value -- The value to store in the cache. - */ -function sugar_cache_put($key, $value) -{ - SugarCache::instance()->$key = $value; -} - -/** - * Clear a key from the cache. This is used to invalidate a single key. - * - * @param String $key -- Key from global namespace - */ -function sugar_cache_clear($key) -{ - unset(SugarCache::instance()->$key); -} - -/** - * Turn off external caching for the rest of this round trip and for all round - * trips for the next cache timeout. This function should be called when global arrays - * are affected (studio, module loader, upgrade wizard, ... ) and it is not ok to - * wait for the cache to expire in order to see the change. - */ -function sugar_cache_reset() -{ - SugarCache::instance()->reset(); -} - -/** - * Internal -- Determine if there is an external cache available for use. - * - * @deprecated - */ -function check_cache() -{ - SugarCache::instance(); -} - -/** - * This function is called once an external cache has been identified to ensure that it is correctly - * working. - * - * @deprecated - * - * @return true for success, false for failure. - */ -function sugar_cache_validate() -{ - $instance = SugarCache::instance(); - - return is_object($instance); -} - -/** - * Internal -- This function actually retrieves information from the caches. - * It is a helper function that provides that actual cache API abstraction. - * - * @param unknown_type $key - * @return unknown - * @deprecated - * @see sugar_cache_retrieve - */ -function external_cache_retrieve_helper($key) -{ - return SugarCache::instance()->$key; -} diff --git a/include/SugarCache/SugarCacheAbstract.php b/include/SugarCache/SugarCacheAbstract.php deleted file mode 100644 index a41deab7..00000000 --- a/include/SugarCache/SugarCacheAbstract.php +++ /dev/null @@ -1,315 +0,0 @@ -_expireTimeout = $GLOBALS['sugar_config']['cache_expire_timeout']; - if ( isset($GLOBALS['sugar_config']['unique_key']) ) - $this->_keyPrefix = $GLOBALS['sugar_config']['unique_key']; - } - - /** - * Destructor - */ - public function __destruct() - { - } - - /** - * PHP's magic __get() method, used here for getting the current value from the cache. - * - * @param string $key - * @return mixed - */ - public function __get( - $key - ) - { - if ( SugarCache::$isCacheReset ) - return; - - $this->_cacheRequests++; - if ( !$this->useLocalStore || !isset($this->_localStore[$key]) ) { - $this->_localStore[$key] = $this->_getExternal($this->_keyPrefix.$key); - if ( isset($this->_localStore[$key]) ) { - $this->_cacheExternalHits++; - } - else { - $this->_cacheMisses++; - } - } - elseif ( isset($this->_localStore[$key]) ) { - $this->_cacheLocalHits++; - } - - if ( isset($this->_localStore[$key]) ) { - return $this->_localStore[$key]; - } - - return null; - } - - /** - * PHP's magic __set() method, used here for setting a value for a key in the cache. - * - * @param string $key - * @return mixed - */ - public function __set( - $key, - $value - ) - { - if ( is_null($value) ) { - $value = SugarCache::EXTERNAL_CACHE_NULL_VALUE; - } - - if ( $this->useLocalStore ) { - $this->_localStore[$key] = $value; - } - $this->_setExternal($this->_keyPrefix.$key,$value); - } - - /** - * PHP's magic __isset() method, used here for checking for a key in the cache. - * - * @param string $key - * @return mixed - */ - public function __isset( - $key - ) - { - return !is_null($this->__get($key)); - } - - /** - * PHP's magic __unset() method, used here for clearing a key in the cache. - * - * @param string $key - * @return mixed - */ - public function __unset( - $key - ) - { - unset($this->_localStore[$key]); - $this->_clearExternal($this->_keyPrefix.$key); - } - - /** - * Reset the cache for this request - */ - public function reset() - { - $this->_localStore = array(); - SugarCache::$isCacheReset = true; - } - - /** - * Reset the cache fully - */ - public function resetFull() - { - $this->reset(); - $this->_resetExternal(); - } - - /** - * Flush the contents of the cache - */ - public function flush() - { - $this->_localStore = array(); - $this->_resetExternal(); - } - - /** - * Returns the number of cache hits made - * - * @return array assocative array with each key have the value - */ - public function getCacheStats() - { - return array( - 'requests' => $this->_cacheRequests, - 'externalHits' => $this->_cacheExternalHits, - 'localHits' => $this->_cacheLocalHits, - 'misses' => $this->_cacheMisses, - ); - } - - /** - * Returns what backend is used for caching, uses normalized class name for lookup - * - * @return string - */ - public function __toString() - { - return strtolower(str_replace('SugarCache','',get_class($this))); - } - - /** - * Hook for the child implementations of the individual backends to provide thier own logic for - * setting a value from cache - * - * @param string $key - * @param mixed $value - */ - abstract protected function _setExternal( - $key, - $value - ); - - /** - * Hook for the child implementations of the individual backends to provide thier own logic for - * getting a value from cache - * - * @param string $key - * @return mixed $value, returns null if the key is not in the cache - */ - abstract protected function _getExternal( - $key - ); - - /** - * Hook for the child implementations of the individual backends to provide thier own logic for - * clearing a value out of thier cache - * - * @param string $key - */ - abstract protected function _clearExternal( - $key - ); - - /** - * Hook for the child implementations of the individual backends to provide thier own logic for - * clearing thier cache out fully - */ - abstract protected function _resetExternal(); - - /** - * Hook for testing if the backend should be used or not. Typically we'll extend this for backend specific - * checks as well. - * - * @return boolean true if we can use the backend, false if not - */ - public function useBackend() - { - if ( !empty($GLOBALS['sugar_config']['external_cache_disabled']) - && $GLOBALS['sugar_config']['external_cache_disabled'] == true ) { - return false; - } - - if (defined('SUGARCRM_IS_INSTALLING')) { - return false; - } - - if ( isset($GLOBALS['sugar_config']['external_cache_force_backend']) - && ( $GLOBALS['sugar_config']['external_cache_force_backend'] != (string) $this ) ) { - return false; - } - - return true; - } - - /** - * Returns the priority level for this backend - * - * @see self::$_priority - * - * @return int - */ - public function getPriority() - { - return $this->_priority; - } -} diff --git a/include/SugarCache/SugarCacheFile.php b/include/SugarCache/SugarCacheFile.php deleted file mode 100644 index c7716633..00000000 --- a/include/SugarCache/SugarCacheFile.php +++ /dev/null @@ -1,149 +0,0 @@ -_cacheFileName = $GLOBALS['sugar_config']['external_cache_filename']; - } - - /** - * @see SugarCacheAbstract::__destruct() - * - * For this backend, we'll write the SugarCacheFile::$localCache array serialized out to a file - */ - public function __destruct() - { - parent::__destruct(); - - if ( $this->_cacheChanged ) - sugar_file_put_contents($GLOBALS['sugar_config']['cache_dir'].'/'.$this->_cacheFileName, - serialize($this->_localStore)); - } - - /** - * @see SugarCacheAbstract::_setExternal() - * - * Does nothing; we write to cache on destroy - */ - protected function _setExternal( - $key, - $value - ) - { - $this->_cacheChanged = true; - } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) - { - // load up the external cache file - if ( sugar_is_file($GLOBALS['sugar_config']['cache_dir'].'/'.$this->_cacheFileName) ) - $this->localCache = unserialize( - file_get_contents($GLOBALS['sugar_config']['cache_dir'].'/'.$this->_cacheFileName)); - - if ( isset($this->_localStore[$key]) ) - return $this->_localStore[$key]; - } - - /** - * @see SugarCacheAbstract::_clearExternal() - * - * Does nothing; we write to cache on destroy - */ - protected function _clearExternal( - $key - ) - { - $this->_cacheChanged = true; - } - - /** - * @see SugarCacheAbstract::_resetExternal() - * - * Does nothing; we write to cache on destroy - */ - protected function _resetExternal() - { - $this->_cacheChanged = true; - } -} diff --git a/include/SugarCache/SugarCacheMemcache.php b/include/SugarCache/SugarCacheMemcache.php deleted file mode 100644 index 277bd0a6..00000000 --- a/include/SugarCache/SugarCacheMemcache.php +++ /dev/null @@ -1,143 +0,0 @@ -_getMemcacheObject() ) - return true; - - return false; - } - - /** - * @see SugarCacheAbstract::__construct() - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Get the memcache object; initialize if needed - */ - protected function _getMemcacheObject() - { - if ( !($this->_memcache instanceOf Memcache) ) { - $this->_memcache = new Memcache(); - $this->_host = SugarConfig::getInstance()->get('external_cache.memcache.host', $this->_host); - $this->_port = SugarConfig::getInstance()->get('external_cache.memcache.port', $this->_port); - if ( !@$this->_memcache->connect($this->_host,$this->_port) ) { - return false; - } - } - - return $this->_memcache; - } - - /** - * @see SugarCacheAbstract::_setExternal() - */ - protected function _setExternal( - $key, - $value - ) - { - $this->_getMemcacheObject()->set($key, $value, $this->expireTimeout); - } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) - { - $returnValue = $this->_getMemcacheObject()->get($key); - if ( $returnValue === false ) { - return null; - } - - return $returnValue; - } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) - { - $this->_getMemcacheObject()->delete($key); - } - - /** - * @see SugarCacheAbstract::_resetExternal() - */ - protected function _resetExternal() - { - $this->_getMemcacheObject()->flush(); - } -} diff --git a/include/SugarCache/SugarCacheMemcached.php b/include/SugarCache/SugarCacheMemcached.php deleted file mode 100644 index ac748442..00000000 --- a/include/SugarCache/SugarCacheMemcached.php +++ /dev/null @@ -1,143 +0,0 @@ -_getMemcachedObject() ) - return true; - - return false; - } - - /** - * @see SugarCacheAbstract::__construct() - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Get the memcached object; initialize if needed - */ - protected function _getMemcachedObject() - { - if ( !($this->_memcached instanceOf Memcached) ) { - $this->_memcached = new Memcached(); - $this->_host = SugarConfig::getInstance()->get('external_cache.memcache.host', $this->_host); - $this->_port = SugarConfig::getInstance()->get('external_cache.memcache.port', $this->_port); - if ( !@$this->_memcached->addServer($this->_host,$this->_port) ) { - return false; - } - } - - return $this->_memcached; - } - - /** - * @see SugarCacheAbstract::_setExternal() - */ - protected function _setExternal( - $key, - $value - ) - { - $this->_getMemcachedObject()->set($key, $value, $this->expireTimeout); - } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) - { - $returnValue = $this->_getMemcachedObject()->get($key); - if ( $this->_getMemcachedObject()->getResultCode() == Memcached::RES_NOTFOUND ) { - return null; - } - - return $returnValue; - } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) - { - $this->_getMemcachedObject()->delete($key); - } - - /** - * @see SugarCacheAbstract::_resetExternal() - */ - protected function _resetExternal() - { - $this->_getMemcachedObject()->flush(); - } -} diff --git a/include/SugarCache/SugarCacheMemory.php b/include/SugarCache/SugarCacheMemory.php deleted file mode 100644 index a13de319..00000000 --- a/include/SugarCache/SugarCacheMemory.php +++ /dev/null @@ -1,98 +0,0 @@ -_getRedisObject() ) - return true; - - return false; - } - - /** - * @see SugarCacheAbstract::__construct() - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Get the memcache object; initialize if needed - */ - protected function _getRedisObject() - { - try { - if ( !($this->_redis instanceOf Redis) ) { - $this->_redis = new Redis(); - $this->_host = SugarConfig::getInstance()->get('external_cache.redis.host', $this->_host); - $this->_port = SugarConfig::getInstance()->get('external_cache.redis.port', $this->_port); - if ( !$this->_redis->connect($this->_host,$this->_port) ) { - return false; - } - } - } - catch (RedisException $e) - { - return false; - } - - return $this->_redis; - } - - /** - * @see SugarCacheAbstract::_setExternal() - */ - protected function _setExternal( - $key, - $value - ) - { - $value = serialize($value); - $key = $this->_fixKeyName($key); - - $this->_getRedisObject()->set($key,$value); - $this->_getRedisObject()->expire($key, $this->expireTimeout); - } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) - { - $key = $this->_fixKeyName($key); - $returnValue = $this->_getRedisObject()->get($key); - // return null if we don't get a cache hit - if ( $returnValue === false ) { - return null; - } - - return is_string($returnValue) ? - unserialize($returnValue) : - $returnValue; - } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) - { - $key = $this->_fixKeyName($key); - $this->_getRedisObject()->delete($key); - } - - /** - * @see SugarCacheAbstract::_resetExternal() - */ - protected function _resetExternal() - { - $this->_getRedisObject()->flushAll(); - } - - /** - * Fixed the key naming used so we don't have any spaces - * - * @param string $key - * @return string fixed key name - */ - protected function _fixKeyName($key) - { - return str_replace(' ','_',$key); - } -} diff --git a/include/SugarCache/SugarCachesMash.php b/include/SugarCache/SugarCachesMash.php deleted file mode 100644 index 9781785a..00000000 --- a/include/SugarCache/SugarCachesMash.php +++ /dev/null @@ -1,100 +0,0 @@ -_keyPrefix.'/'.$key, $value, $this->expireTimeout); - } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) - { - return zget('/tmp/'.$this->_keyPrefix.'/'.$key,null); - } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) - { - zdelete('/tmp/'.$this->_keyPrefix.'/'.$key); - } - - /** - * @see SugarCacheAbstract::_resetExternal() - */ - protected function _resetExternal() - { - zdelete('/tmp/'.$this->_keyPrefix.'/'); - } -} diff --git a/include/SugarCharts/Jit/FlashCanvas/canvas2png.js b/include/SugarCharts/Jit/FlashCanvas/canvas2png.js deleted file mode 100644 index f4cb2507..00000000 --- a/include/SugarCharts/Jit/FlashCanvas/canvas2png.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * canvas2png.js - * - * Copyright (c) 2010-2011 Shinya Muramatsu - * Released under the MIT License - * http://flashcanvas.net/ - */ -(function(doc){var scripts=doc.getElementsByTagName("script");var script=scripts[scripts.length-1];var url=script.getAttribute("src").replace(/[^\/]+$/,"save.php");window.canvas2png=function(canvas){var tagName=canvas.tagName.toLowerCase();if(tagName!=="canvas"){return;} -if(typeof FlashCanvas!=="undefined"){FlashCanvas.saveImage(canvas);}else{var form=doc.createElement("form");var input=doc.createElement("input");form.setAttribute("action",url);form.setAttribute("method","post");input.setAttribute("type","hidden");input.setAttribute("name","dataurl");input.setAttribute("value",canvas.toDataURL());doc.body.appendChild(form);form.appendChild(input);form.submit();form.removeChild(input);doc.body.removeChild(form);}}})(document); \ No newline at end of file diff --git a/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js b/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js deleted file mode 100644 index 2ecd5479..00000000 --- a/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * FlashCanvas - * - * Copyright (c) 2009 Tim Cameron Ryan - * Copyright (c) 2009-2011 FlashCanvas Project - * Released under the MIT/X License - */ -window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(h,j){function D(a){this.code=a;this.message=T[a]}function U(a){this.width=a}function E(a){this.id=a.C++}function t(a){this.G=a;this.id=a.C++}function u(a,b){this.canvas=a;this.B=b;this.d=a.uniqueID;this.D();this.C=0;this.t="";var c=this;setInterval(function(){n[c.d]===0&&c.e()},30)}function A(){if(j.readyState==="complete"){j.detachEvent(F,A);for(var a=j.getElementsByTagName(r),b=0,c=a.length;b=8?a.src:a.getAttribute("src",4)}function v(a){return(""+a).replace(/&/g,"&").replace(/0)return eval(this.B.CallFunction(''+a.join("�")+""))},I:function(a,b){this.e();this.D();if(a>0)this.B.width=a;if(b>0)this.B.height=b;this.a.push(e.resize,a,b)}};t.prototype={addColorStop:function(a,b){if(isNaN(a)||a<0||a>1)i(1);this.G.a.push(e.addColorStop,this.id,a,b)}};D.prototype=Error();var T={1:"INDEX_SIZE_ERR",9:"NOT_SUPPORTED_ERR",11:"INVALID_STATE_ERR",12:"SYNTAX_ERR",17:"TYPE_MISMATCH_ERR",18:"SECURITY_ERR"},B={initElement:function(a){if(a.getContext)return a;var b=a.uniqueID,c="external"+b;x[b]=false;n[b]=1;Q(a);a.innerHTML='';s[b]=a;var d=a.firstChild;y[b]=a.lastChild;var f=j.body.contains;if(f(a))d.movie=w;else var g=setInterval(function(){if(f(a)){clearInterval(g);d.movie=w}},0);if(j.compatMode==="BackCompat"||!h.XMLHttpRequest)y[b].style.overflow="hidden";var o=new u(a,d);a.getContext=function(l){return l==="2d"?o:k};a.toDataURL=function(l,z){(""+l).replace(/[A-Z]+/g,W)==="image/jpeg"?o.a.push(e.toDataURL,l,typeof z==="number"?z:""):o.a.push(e.toDataURL,l);return o.e()};d.attachEvent(K,G);return a},saveImage:function(a){a.firstChild.saveImage()},setOptions:function(){},trigger:function(a,b){s[a].fireEvent("on"+b)},unlock:function(a,b){n[a]&&--n[a];if(b){var c=s[a],d=c.firstChild,f,g;Q(c);f=c.width;g=c.height;c.style.width=f+"px";c.style.height=g+"px";if(f>0)d.width=f;if(g>0)d.height=g;d.resize(f,g);c.attachEvent(L,H);x[a]=true}}};j.createElement(r);j.createStyleSheet().cssText=r+"{display:inline-block;overflow:hidden;width:300px;height:150px}";j.readyState==="complete"?A():j.attachEvent(F,A);h.attachEvent(J,I);if(w.indexOf(location.protocol+"//"+location.host+"/")===0){var S=new ActiveXObject("Microsoft.XMLHTTP");S.open("GET",w,false);S.send(k)}h[M]=u;h[N]=t;h[O]=E;h[C]=B;h[P]={init:function(){},init_:function(){},initElement:B.initElement};keep=u.measureText}(window,document); \ No newline at end of file diff --git a/include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf b/include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf deleted file mode 100644 index 66ff213fb9b86811d17f032be3c73df61547e597..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21235 zcmV)3K+C^FS5pbJn*acK+RVKNe3M7gKmN>9^hmO7%f>biJ}yp>fH;q^A>~Me&>Zjq zPH3q%DweQ=Z8?%m$=$tYNJt?KLK4zrAS5BATzYS$cVq`Uz4zXe;}Z1$&OVPM+i>LW z-ur$2uaDhlW_EXWc6N4mW}ip7C6fBCB;{QrNu?xBF4#koq`wY&nk4DaSVQFCS(B^F zm$Wpu#t#N|*oekNqV3?y%EgNpk6OInsAz0K<>-SBI;gU0Oy!s{KGg8Vm$oJXOMI>I zVI#%~29v|_P^_sf(G+bhXFL#$wkHl7F~Z{75XvxZYmYSxmJOlGaC5jN+?t42jvh4{ zj2c1*N20NoKw?~=t*yB!6kv9hOMLOhXlUW$z@o4((j1649$J~L$ZZl$iRSRQ2@TO; zxV*YKyrg`;@(J1YqPAIuD>q~X9oJ`=0d74i6m6+&i$xpSLy#!~R-$p=Cd{I(J=ok7 zZw$xAwYM&8jV?C3$WpmZC>9PRqWx>6XEedDCb?vIs2rAcxsl{(I;V18{#igwm$N&F4^{GjK2nD6JD z)vUxxf!0NVxb#rb(n}->WGNC0w1h`XZfTTsDcvAnL}Mg9MKUQXZ@;dwqvPVkyUtkm zj0)!ZOUqY3qds=|g}}afRPXKmOi!hhmylAaNA=e~>(w87I;B6~o6_Iyy-vOUr3yBUbFE*dAy#7r}zyG?gZD*~O&pP{EZBzF(+Gk(>sGYU! z2KDBiZF0xOJM`y1cwg=4xIx{1!!`POe}7Ot>mQx+i&s8C$t#rZWn0xXn|?v(@+Vyz zmDIYE*FW}@_Vo`bef>o%DYfhu{q=jkv!%XyPw%)XrFTB_sjXw#axjx`-f@@qHAKC= z`&a$-yYH|qUv`81HO6)J^N;G=pTA81;hmJ;@$+}e^I-MiEq7@h%eJ7CQ}nJMKGVCe zebKh+jYri-zSyB}e|U#}{Rhiw`xRHIm#ltMdGpLiwYR~iV~292a_JAsa~n3uD>h$l`})>~?Wtb<9q8;1q#GYVr=R_V zmdn)*m*1pxJhMaZSoy2o^Uf!>>y!8C7ytC0`sEuBX=~p3!nW_~-A~q^w%DMcIx4r*i4(R zDt~$W!Dm;!d+yRH<51}-N5wl_ufcuS7kEOisjntP#GiWjSAnUw969>O@y|qOtiI`^ z@5f(X(EL?!>$l?%dFa}Qn>?S4zpwnsKb?HkJLBs%$KITKU2^=mi^GvCJ3kzMP-We< z@BZcG@n=r(f3S7$?(sqQF$dlL)Vt%KUi9EqLno_SJ{l7WcH?xApdiHffT&DB9HE68q4o@FL#4oO7C5!m%j~+h!+XO|1)*rq+Ze z2+kSN_IOx;L$JAwS`dvcXby*>4dGFOMM$i|QgboR3b!_dx&5SQYa+ZPF=nzhtp$66 zb4n~0wK|yD-VzMQ98FBGY-?R$Gn?j3Z)yz(Vn@UR4Na()Hw(`|a~jPxD;*g~B*L*) zePT4)91gTP%|UQa&N;}c#g6I_T}}=p0#^BgaI{4`GKwMPnuLa?cw2K|sU6(g8k<6K z=ftK&OQ4OLXcJ9O^L9U;F-|GeCS}?5@>DECz(%|D4PnX z8TyOkFcAYS5eL<@M7U)(4x>=Qs({vF3T&}(yy@g{K}%*DtqL}C=IrKUT0>rVNjTJ= z2wT0Wk*4P6oaSht!K&|!Ct}fsVb-&q%Vwc3yCq^gUz`l#jOL3>y#FNX5Cx}4*w&1x zo)fj|^q+V4N$r7#7>>Qrr1sb%)XHs&i>aH|$|`g5kR}G=VP@e9^AuR(<-{8?1&b#| zo1-x$lvq-_pg9^0G-EVv(Ks|)+ZK+A(=?|g9Ei8a#6WB7A9&^RRi8--A zYn)GK2lsMxQ$wOrYYW8UVP^{%#ilpmVKcR1DTQ_62sKCJVHVQP&1xXD&cLKVo7U9Y z)}C-#niU2xxT&=%0o`C~Cc_#7iBRL5K(INiMlfw^sJW?4i-!WuVI>d?JUClspEP^6u#;iC)2dZRZ)^{bi7g1)FgrlC z0NaTU!kEVJ61_3r%uh{}*%MJ~E1oZE!C0~UY|Y`;1(U^<(rq^pYR=yii&2ul9IaridxG{#7w&rjmoZi|q z1bZ6DnV)6ktU2oZ$sk2EBL&GYBZ%j2D9YI`Jty=P9ad5?IaVSXSqKhzkDwluW{ zT0`OaivrE<;kZ8Qh>2s4ojcF5m`@@sp17#nu&cVZ zG%^P;ci!a8KwvNVEcsFGf!2iJ8FyGLs;iWFljj!j)ZsMED!z0lc`d01TLKRpi0xRx zxOAuD^k`rc3^*c_C(RLp;4C*4Y2zdE!2Nf(^_ew1zh%L~Cz_AYEueBX@;A3UYj3yB z7Z&M^h1tDY>$B z-jCW%54)(oyV3Xem3CLNzvpF#=?DcCEU+lEd9$y^3ehm21>rq+!-{2dX5AH)&*~vN z?K~NmSAq2^*k1SjZBxm(!}@%4KXzn11uDqIu|Yj(*}r&xcJ8rxeJxj zPoFjulv;g8?L2JZl#v)JOyxFfza4yWEe8(uj^wv;Mz0?p0Q#gn5gfu`0xD}GzTi!IPx zFvS9Jn1y4JKqy?;0`H&^Ev769g~d%vJcnH|P=Yv}Fg9!BHZ^J0ZtVjofdCy3Wb&SShHv0G(8r9a=hVveMK!**{cD5okSU9DX4WvPvG=18nKf0kh(cAQ< zIG<`U*W}u{u#)+r)NaL%O*xj^HzVBIp5F)NV9h-nUTwM9W6LMRM~xa)FoEN^@;))4 zyH67{(3~-4=G^(y=1iF}fA*B=Qzp%EH#RkdC-MwTYh|YKoKQPLtQG;QZSC>KoKTiW zVISV3+FP5Wp@k~!vRRumZN`*Yn(+TL;hJc|Nwtd@lWov4kOoI4)*KWIbL`Yl38Fsh z&tWQ{HJorFY?u{338z`2wC{~*G?WM@d^Zg; z0q3>`7Bwxv0+|y@ZYJghX=R`7q|!D& z*c@nGnA^{?3U;!?l3kmxy}G?s#3i})VkbPI^2E0A0uME*2@Jw6e01>An&LA9GxcFr z;!ov;rcIeOt9F(RT8DR^D>lQ~tpRb=*d|Ordcv`@2P`V{z;tkAhdmo19iPYt8@5*A zHsP3STPnE3o#y2V3!-yl#HE_3Yd<6?j(tOIfhVuDMceEPtP@BRQKK1>arB_W{pY8> zDPGOHWY`Ws1Ho@x1P1EN z+L=?-V0$8=&8nR{bFvnTwzoFe;t2O+VcYDZ=1!P3#mO;q!VFs`PMJ4lx)#LBZq`K9 zt<8Yl&$9F3BcknzI58S{M}-0*fJ8hb0k5p#JcM^2bLXj*32Fhh$DU%r5w9FaNi z(KJt-oS8tfKumVJ22XZgs9%MAQNc7jF1D`E5a{!{;5-7SQMG`z`V-<69*4MtYYI0v z6l9iJmG7W{FH-lX{r=)%+JSv(2ZDxBbo2rB$WIsv%^bh4 zuWtMa4f_H#c8i{{k7zn(LjR`6pU^O>ZeMTT`nx58jRppR(NmdE;NO#B0KY!$#>^SO z?%$Pbm#h_p>xb7P8_4(H8Lo=tnJ_0OXN#Jmi0rjsEV{VW z5rj9gba6D=;0VD1ONdILMjXenaCEH80dd zv8I-Iv{el)4Yb-D0+jMKoqr|0u|AN1%}{_=nTff4T2OGgLVlp91yL95aRNZWy@kLNnb2%Vu|+H zN$t_5xY>oNGkZfg%%|kS90uYGmog`ub1lrne1?}g8=?&hO#L__O|ftg8^*#MC=L1( zGnj)74hOUlN{_UM8skj?#{wMb@nAF-buMU(#uMgLv&tM9y{X)b%3WxpZH~y7hS@c@ zHzF8Z+7Mo>H%1dIp`)o4VOT5lVPj}PRBKv<@LUtRwKv0E;ybq7GyrMijgIEP;#R@b z)eIjC#?usuL|btHU7T9S);F>04ngt{@DIjyYa!uHp zFPDj#O3pKp^nCS0!)Y`T4mWdUlcy<&+T7H_QF4oEIvSr$t-57b2-;)OXsf#=+|bnC zl3i0ylOWcf37RHmA#LrkHXLatk`_1LLemCTVBu{Xnf9%bF)Rx=O$!s{!hznJR<#3h zbAs=zTL8rqOJne)>@CqyC;+D-2kvO##HeW`fS2mfK8FpOSR@XS!(R#7%vItrA8ZWf zKyuq~#%HF?AuzE<7|IAJu#9+cS=s_i1L(BP(H0Jb8r#|<5w$HGYgc(9)wbsL7H3;@ zv1v_Vo2exQEgcYkskz<6qDuqj9K{3dy$Gt!oPK9K(Ar?uv!}JnK)ew%X^X>CXbs@e z3{OS3%)*gTw4;VcCbQAcL*Hfx() z+!zjU4plov9&d>*4BJfW$}u12a!f?0^Ts#{ey+-1iOQadjW^Q?3At*CE#4kP*g*z) zbu7v7lG=!dT>&oZFip7TO4X<;aoUZPjdI$DB&xDa7h!RM6{k$k1j+VEwKI;KK4s1n z`?T8m!kf<#Zno)uJJ`t=euS%@1CjXngHNbDp;8-<&HgZFmWyuj&26wkSMxoo8H?LE zP75>~K4Idd$y2J2m^!WIkJD$&tUdCmS+nQNopr@sgz{SB)OC-~I<2_=m9v?OREQxsR`(;5#nhI~jh;3Hu`A%@w1pGQ|J($%#kX zW1+AQL0v3=bXD7uau`C~7Z1mpBCfQL$RV1IuRtcuDllK=q)R47m)K@am^^L5bUkFg zA3C~(N|X{uNm0q*l08a(U$S@U2u&(AklITZBkv$&7g6cO{G5ZdiGkZVdy7in=I48y zeL|(*Qt8iB`gbbb&V(IQx=b!TRR(xEGEFMEQZ88!XfWAtkcW&Ia-%%tCV9xs@{qsD zLvE3WcuF3WOI||x5OhA+F=X+OuNmo}lE)Mf_8xK(xDH`4hCqxVEWwbsh#3$0gyHQb zyo21iPO7XL?Xa|JchMnLqjL@&OXSKY<*;$1^Tr-5qrK%Uu0jdjcc*SX_{&l|f|)k)T6#qHE*96@)QFl$!U6Xa!6x~&=yN=LZQ+3xg-BqKz{;1P*-8EWw&Cp#lbyuzK zI#PEXrMqV7uGu=x(Oq+O*F4>IwC*}acO9#{j?-Po>#h@YSDo&v*In~+Yg?h5O!i0)dTyBc*@lkPfEcP-Ri&AO{aceU!SsP1ahT_@?TnC^<}N&Vmgi0sa2{>j1Au+JJO5(nh3fkgg?Nz7Egpkv5ZFdIQppNH-zf4BFrDyaoN- zO8Su7k?ugc6X`CbyOHiex)My7lW+NVgLk*j^`ancLKf#&wG*XL%JX70a-ujA*6?~D?JMQ zF{H=J@dJ$e@GQ8TQHVLHJR2`v>fRaq*E2gRoGx@1>n;Zecb8beFoq&k0ZV0HE5q9{ebih(pN}daGm>5em^97 z0M7>%$EQ4!hZJ3V82BTK<9f!o0De@_Cq1s{>XS%M0e>3l8Kh^Co=18C=|!ZiNJ*qF z#o>e^Ujn#|yMU4O;Mt4xGSVwbnT}}#^qS(hknH;ClzW z+n~LR^ghyuilfZo_!!WqTzWeApA8OYX!_`@$g!5RGN)q>#$8tHxaSGC{WG{0$-XzUYqB#n+vRua*axT=F3w7o?J_h|K z9HzFb(R3ryHJZbX$F*8n9xCQJ3LwWar7R!ILvsw*9K-AmujV*S)>g{aCx9}M%%7nu z45}(XxD9r4xrl5glKGP*oj-0RtGZ+%|L2nQ8+2*cb;zz*1154vyZnmkbkLMfyul8f@l)Md7(oV0owO7|#}Gu_w(ZOHkrFO=;_h^JT_xp@XqT~@2ybSpVe zOwZ13Gr&&r?*gzY%PN^%2R{1`#LUxW*%4^u?BC2P%7>i+?K1_kB)Cdx8Qp!6G@z2g zT4_M`?Bj3sAYh>{6$KjA{zAInf|1=S>Yfn+c*fM`*Y{!Fn#L9pLP->;$4O|xk)(%;M4`>eyVM=kI)c3Ds z*Q-vIER|Y+HYqceS$=*0hNks0Nczn`m|R-OlHc#?a7dI>E=hYydrQ(V$wQLtB}p4j zl0E`PB#k6VMQm-W;B~w&kI%rQ4l8ryNY3#-lB!0LG_jJTu~j5_N3&#ONIGOcl7{S0 zQvLxXRUAmt9)BQd-?7~IAd>bwn4|*_A!*W~Bn>-^`xr-3$#{|uI-I0^CXlrEM3Rao zk@UOCB)O)Lba*vMdmcg3=&2+PpGMNi8j^nhN0Nq4m!uieOl&o^B<+7BNn?&8$vumt z%Go4Mm_t(GT#^o(N75gTCdqRQNrR6iso*%04mh6WJb|Q9btIM7leE`-l5+hd83B?8 z1xfOSNGfe0>CiAq<02%LEg)$`BS{B0v8kL$Qt?8P@|sB+-%{qtm8zwjR!5#REeFav zGP<`^(~o0h5*Z-qQ30E4>|h_#awC(#-fUX@*|ra7(l2EGFp!T0+t# zv{aE6o=nobKasSG{!G%J{zB5y{~_r@`YTDNQU|ub$TH#qEC+b>DaiikRAi^q3Sxsg z4e(!2M|LrtfqW&M334HxvUCoe1DJ0bGtCMV6XZqq_fU;O8S)QKa})$QEB?3Um%CoPpSdFskd2AF~PB zDF|W+qHRWg+zrUq(v8T^qnl8B?#*a^(%*m|dkdh33y`&6j)Jr3RuC_RM2ggOGYD-P zk;N`W7Pt*1OKwNjfw)SMqIUpXMt35=i0(pu{N2bF+=8m1dr)3~uTcLz!0R>uZ@G_n zaokU3jzVbzNe=)RBwa)H2hnU3J%rLyRe2cIH`5~^U5iMGr0eKWP_C!P0N+55qmom$ z%_wseONhsw5IsD}Ev2VW;Z}NDz|R2w8$FBs7J3f(ZDfC*9D~uf;{|ZLk6uK64{ar0 zYe`hN8x%#llez%kMctt1JDo3~(!I2ec*p92uzN@^P(`ok@@3R}gkBNwtAL-U*N{I- zuM5f>B7YN<$LTHPkI~!6pP_dI{aum2hg?;a_XY9+ieID;k#C`o1m$DEPtzv?{#4|j ziTrbse}U2`5tA|emB_ya`48Ngru>NFhv+BdPtnh!;O~GR zrtJd$hsb{s`L811A@UUJJb_4#;bn4}qfCNI3d$V6lU^g+a+&pgipWoudH-J_%TP&F zhK}O0^a|ybIerga*iVy5dYev19lLY};I|M2%1{G4oQlNL@-CeP`a5*C%o;xjU6o58 zlKotuPE|P%k5#hEwHkFkLU1TUFKdKQ7XbbkA)+jOf*_H(m6SR5f|3R;Wn`_)YxH8# z97}~sD@A^}$S)<{tS$l9FX<}44-hPi58{m?zd+=xMb%qG)k|3(tar}u5&2~z-yrH- z2C?^+zQLA!j_er5`p*U6k>HK5miLl=Mz|`5bA>GC|4PPe%K7r%n2Vuhj^UU9?J5Yf zgF40FR)~BZC@Eqgf2AR1juFywSzd2)*kC?>SLPUr%7}bXylDIxFAeNN#K2e@3xjrL02h`lJh)Pt-`(NQ{|-5FryRITX83M7a*rIimtoJLf%|0t{j$+1*FGSV|3P_p;2{|g;{d-=`>-s) z(f*NXaFpN6V0}ehPEC%~SW!R1UtwG$S1+Q*5p|Eq{)*a1WC}B%$QF4;3&3V7FWOU* zKzme-q{!{o-j{Vm+` zY1#jbY}_SJB;#(m`dL{HT+6M82c8o{vPGVk{rl9uAY0gr78a(ut#Zv)S?bs-w=kBJ zjYs5~q)Z)2xkWJvTQUR{QYii|Inpg-prU=VYT?5zT&{gdmiQUj#;C$oYI|gPE7KZ# zg_qSfprHQ=(@jGXM(qHA>Lgg!Z>fV*R zYTkve-j#d1jUGAhp4{z!Uyghr2R;OJKlv*nFHkj(jKB)H?jyO|cwMgjNM_D96@7VF zkc+^mOUzLboO$C7xrc>*6GC@cLhCHW@3&SNZ^`|-6dd19b3{l>_7PjF!jiwN%Kto7 z`9GGc{GT9winJ&G9U~1De~rIKbq8V<)m$J>Sy8n;w^r33KTm2rzP@R$)Yyb|vNhRw z*w(Jbv2`d|1tiM|3LqK{)m5) z|BwC}f3?5PU+0$3H#tG$DJEieFEqx-h-D3Wj;u)~b;xt9}l?+%}%j z4`ky*d7_-G{z9fg#2P4jmZbI`|6!4vDA`qgl04M}t4|^@$wPRi*{I2iWG(zVloal+@n+F@kgluRlwDLYpS{*I zq^1Ea4cM4VcTf##L0j!zWCOFJ{|>VY1+!v=s#+ea!mJdyhlfac;mUBy(7hMB1RSCnZguJ$%k(ag)uM*SPj{=%(>|GS-a ziq1x47yO@jeUHp8_;q5z@3Xr#yH>2(irrN?MO4}M-<9q(A)WExS-`i81?;ogRPEq@ zi&>gS?H#0n!>E6E6laT3RQ@NUc!s1!{YSA$jG`(#VSnZM8J(T5E5wA2$r7#=g#DOc z9)L0QyNU!GItKdeVg0Wef{@0rQiCZ0%mHc3*OV!Sk zalD1pks)nl$Tl*hj||yIh8!b9&XJ)U^Nfu5*+=+IqNP6N&~kkeh5pJ^U+26Mndb1!5Tj-rMvi(Q$f1?c};H-pV? zgb@VwKHWK>mqW5DIy4I&mIcSLcQHa}KCPd$=2=g@{^OH4I=Z@RzZP!Rc%F4P&pMm} zYvS8MKb+V2kbZ3VX|8eMOith$N3a`X?@9WbZZFJ*+)d0J1b2lb)!A$865uZ5Guc0i zo!~CNBl3;xKSaREz>9?XT>(e~Ph=vqt7H%ITiI_vJ=^Y`KJBtD@K`vLEX5>lHneXu ze^XcFMJfl|x>3p6QEbGM;Y%tQWZic%JCkL{(9p(Vpijv| z*)j6a#ukvL64`XK{xn6=?M0|x?*Cqn{2))0>qe$EQ-he%u0eNg7}p;aS-0n)?~zG= z+$^7-E{~ynMyA{!O`7F1ndHNm5PKEv1+69uiX^E%QKxUM(Wx=vPxzzY^&^y#nCeD= z&E9^k?$GVLV9GlN_wKbkq?UISg|zaHpX89OyrVFrmv{6KEU(QYZLTP=VWaoQ02Z>7 z{wBz1YD$j|cfijaDt@twT+qKX16pnc$zz=eQQvdCl;R6Wv-8IW!+)UX38 z5TLGz#T;I#))c8Mi~j|RoJ~TYxq|Fy3$Zj{R>oAlX-3z8Ns~j@1tbneN=xQ)vcnMRU|c@NA=fa zkZZ_)9{I1Kz%O$B`BXQwW~kJ7KGk1Bb%iyBQsX65f2IYVN%bqJuB4_!YFxoW&Ovym z9RjmL2W*L%zO%LJ{)|(p6U~l$(j6C$8qiVCP91S%V}f1W4>%pi8}97i z8bam2Foezhh5**b+wH1$H<`Rc`p(R|Ei}hOu|{^$ceYp^fZI&j<_wSx2Ng_Zm7H-! zYF5d%z{QquL48*W4yxi6yGNGi0ZW0^E3QC%x;QT&3Rx=Mj^Kc46(u@lOyn^;Nt6WO{2k188 zg9xnp3`Lr1f@m9rIXXjpsn=5#rlfhd=2vbj+{YZ@1A@S@5r>d&zIW>4d#7G;?=;k| zxQFpI9NL^C-&Rpzhr|NQyG_K7D@1b+H>qUAzGo^c6*^1d7m}eq65i5J!dtQu-og?# z{Oc0l@}En1%T5x8*_A}NSLYIQT;oz9OoUx*Y)y5!*@@4!p0Fa^wldW?M*;JN z%zQGR-7A%%e8J6Z8Cc3bQ4%%#kk4iEASQ!#PKJD*B4XNR?thfo{|54}QX;F(-d39e zn6y3;oX--pumnf21gPycd5We8iQR@JLY986pcgUye5J^hp`WjqA#`gW^p}okuA=J4NJ6#6 zYzL$JnCk!=y=s>>dIaVCt~_IWinK&S47se&1_mdn?+%qkyDhZehILUPpNu%r#bH6EkXmWlf>lOwl?D>TMe$o@+Rj5!DA9s~$yl1U1HYQk%kz*@eB|BH%!_0RuY zvjbJvo9*$|K0S7Wd3USoXacux@`|a^TmduJtFPDD9bO00A!zSwV7xINhrLFp6MFE}z z+!=Iaa97Z2E}M&#bsqPI_E0VeYt40J67tZ(9@Hy!t3^I=S1>1oyMgBfT^YOpxFhJy z;DteV(9M11u4DUT1pM>Xu~ilX3q(mLmoUO5ohSj1{Ghv1v3Lx!`bgtNzzc$f8N9gf z-0qx<`7~!cpZm+_eg-i#h#?`JkgABGB8G%qLY`uViWw?osE{F{GpA`OZZ;2R)>51q zOIb#aG8|A7phH^)S@)J!QF#IGSdr)P9qni;YTzlA(b3NaWncjVS zMJT7zp1z8}QF{YlN!6V~=B>0_Aqg#XZed^F*$!)SpeYQ{$yhGR99$-_yr9M%xI`=y z%z@?Qo0Qxv#SN>-TOV`*EPy2e%mv7{0;$|)AA^877}FUm0(*C`pmTkDs2JT@UXOVn4Cdd;l2nm zu@$b$#nKBpQSL65BsUNTlet0A;gL$eN~PSx&8qpktl4SREJ4kn+Kx?J#MwayuR*I% zb;E}0E3hKP8goGe-pjkq^@D-(M(&Y9`R;YhGY4BP*d)0)hl{b4KyY`Ngv-)|0zOQz zW-Jpb+__=5SaR8R0x#lbgMvj?v*Lep@@Dtb%pS`-^_F}rNLTUE7%RqJREaoAj6+LL zSV@l>~R z4Tkk?a4YKEnr)D+dzz>_M#MxY<%^xbT6x#Ea(#P4)6@AD(|Vb32K9-)&f)0mOzInc ziPuRhNrM-68T(M~8n@Kp-e%S|u2QP6RH&o4C&@R-S1HCiWpkiYN!G1Xx;!!n)$0@r ztXEL1@TWoCU;_ktMm9Do#x=@B*&y*T&^c81rQGEqZt|r}?Y+smujFpNgTAPvtfG*w z61u&sl$(JRV9VdftZH1VZ0;xvT&*M__gQ^MaygIWY~m|Gj_usJ{M7}I=W=qmTQJ2v z#&dGl5S$|($vqjt^>vDgk^4Ykn=DLrj|6tTg(>bKz&2Z$>P9H-W=P{3dXHw8%QmJ` z+7+o(-+v%MgXi=WZY2wMt`P40e!{JUaQ`EOyFp0{Hw#_fm=TUey(uFci+XcLI2QG9 z8R1yeTP#e=h-wp}+92xMRLXWV>yaMJRp~3KRNeL1#I6@#9$iS* zYxBB-ngYHKx`?n#^(Cz3Pd6>2g#Dt|B6Iy+EY}q#yJ`yM>gyF=ikA?7(6V>BFnxdD zUAtM4y8BnXlpHy#wpqM{E9N(DtK^U!2OUmJc3AnUx1+4byofY!&)2v2dZa{1t<>5> z+VGIAOWeQ?lccW54GQR8ksB5BjvA-9*6ksejx$;7W-Mu4eEM%vA~!4Mjih-iD6Z;i z|EAcx_^!2Z6|=hqvrrMz`&=Lhw%}OBJ4uMIEU+L$PIoCE%6d>FDBbElaFwz}od3md zr&3*!Tb1hD6jnq9Tom(F#;FRHedKnfD{=??vaZOT@X7plDUrJs|2<0NUeNDTYVTL< zZtT}xeC;bqeBN9pl=dl<22J#iWa}&D7njhT4RYy7c7B)XDDQYc2|1G(mvui4U7GqT zxAfK9PhBc22qzpIC6Y`{T$0saaQ_K6zay3s&`8}D z#OWUL$Q2&DhlUTY*`nBmk|0XKJPJIo)D`i1G2bKejOL=m1x3s5qj*n)>f4QOr3fc) zSJ1Jpy~llPAM&6q`7)5*7a_CovrNzvPoJ&@UW@tW+6v|dUBP_*wqc!Y3+D1i2UuNKl3t){&ny4@`=;)Wl8ORs_WNv& zte}pPj*?z>m^}8PCFX}2S1H)xOos$#f$4>`;{Xw^2gi}Z-#`FqIvEJsOwR(rpy^H^ zatdODbzzsmIbuWTf_xQN1a*sw%??!Lpz7|KJWr^^8JvSCY9=Fb(UX+!iPAj@X(|d- zzKOB5i$0Y;B)y$`cUt|}MNo-+6-TN$78QY^2sLv+&B0QFT@MLT~_)|aDEVB@CHPU`Ud`50C63E2*y*M-)&8}m{NDQxycq~ zCbhfI7VEaA)x~#$>1lOY(|Q%9zchM5F~1yAhc@ac=;Z(JBo$#({U&)tU=#1b>qxUJ z>iOomXC8HRgKGv$9fNziDjl^iD%9n3^24I`c0=j4TM^Yl?c(Xn;o@$DaY@v=PVVx# zx@)h)pv?w6RUyrNI-gytSt%LmQVI?+4>ykT9Z5dZs=E~#5(L${(xAY8ehS+cN-?gSY;h8&;M0^0+PQNW z*#_$OUE9^dKKZ@*E0%p~LmThsiW})#w$KkywSKc~ysq#u`UZ}A<4pm+#o*fle22kz z1^6C=?+fq)20s+wM+|-}z)u+bRDhoWoNEtkmg{ejjn5UI+xSB96&PPCzCzgI7{{IW1Ow}DvWbf-@eAVs?RXaQ++;TmFgR1tmf=| z)mLe(QGHd$1*&hfaiQuPV_c;A_A}OUcCqT)-?&8e9bjCl`VKTMQ+1-bSmO~Ee2eNk&UjSy9dA6QdY>oban*N%@r3HDGoDm^^~O`GZ@%%g>hl}VsJ?*l ztm+FI&#AtU@x1D5FkVo7VdF*B7csV~z6C}S>L;U1^)(vZs;|j-N%fs*Y*T#;jULt4 zZ1k$W7UN~r*J`|?`l80Gs;|v>P4%5*ysr9U#v7_HZoH}b62@DquibcC^(`{qQGJVz zcU9jK<2}{4)OcU@oosxd`u=2msQUhFe5CsRVtlOn{>S)4_5IcORP~|v&r~0x<N}T=?W*rQGXA0Za*bb9-zqYGReh_;*rEE)r@3n=a0BoD*O1Mj zY8zFAiYt1`SM-*z$OJyc{K2LOAB#hFtlMPutB828f;u!TCUGOi*s=_^Vw-=n9C=Mi zR==)L;W&;OsQL|sR`eu2vHg?+5#{YsU|KoeL#)rtgnj~iS zro{|fXQlzTdTiBiDRQQAgIW1)v+^SI@{K9)Sd_vMER5<&RX-)m#tO~64-9F{^AW=F z@dyb3FaSIL)x`S zI&<1WLA`p5Dbg8cs}HSKyYAm^wX$2Stp4r&`sWGp-yq*!SRj-MFo{y`!^2bMdHiiYl+|1uOVSBBYSahsP2F`gjMib(bHv|rd5BWkSA3H z--&Na&5Kh0u*bhbsdVw3D+{!~`eTJJP=hM`2EI)2NXy-DU%Roz=AlnKmb2g7y*%)~ zvPFgCAeXF7r4WarACG$@jDP|A#!av-K$~z{Uq?2ls-4O2lh!F_P43G3vAm(ZN07)O zc^Wpf_X>*KhXOwqGImveq7VX_j9l&ffljxF_-BnCY8O(qxA(Fylde$6zH7FI!f1PY zMM$kwa$Ss|dFT3ew^P8d^X~QQ+S#SWu-4-cg%4ZzAb)%e2bw&}hR*5-i4PmN_jpiyhol}`8Z*XC#U4UhD<0>#K2&8+RS&eVBuTLNC{)hPPX>$gBoY5Od(N*md zVKCcZGagA84SR&xYHXYGV1Uz6~s(@#*+I8Q9T#wV!$N%B9zw}g#PQvK7se4ggU ze-oE^{F>wms(YF$w!!UcuUOra?1E=xm+ch!TrpN@n=gV0w-A3b?G=W*o9b++sC{du z_LuVRYGdW0_H9Cr-|toqRJ%PBGJIiaK_A*U1LL@(&#n2Lq}Vju<6<^@%h|Or?|4^+ zlj+||=Ev7tDcQJ{>bq$~V>i`rqw>aW*tV6LFBPfdOQokP@|EJ(B3~>1E^!Ae@I4~m zDE_2*C+v|tIbv_SP%GL87MJ8rjyDwQ0)8&wif6Jgy2)o@bC}i05F>p`Jeg&b0~; z@=WoJ1zzAO@eD=PqdiA@#(4^Xc|o7-Y4I%Z%s|ayXmz;fC{Ls3B+m(+(ST>7?gGzJ z&k|4AGZnP?o}j1A(*Rm%-r;;-4{7*)l0&?W?uu+zlIuNVIQ#^hSZ zhbE4X_Fn%lO?P0svPJIl9A10}BBlaJR_dwrgeodLA;85L(L@U?1w7V-D^SHE z|657Ot@V{#`#0tOeAjYQWo~6&Wj>zn%7V(md3N?Z(2oe;n$Z_en)_Jp^nHFSksUw& ziHpna%6dHQ{Pft@Zvc0Huc-O?Z`a%+Z?W^yQhXI+XheU2&KB=V9wx;uzTh)&$;JL& zS6ovp2{lm2=AO;65rjNY++Snaf^XfBnjsSSrg1UcfAmEWL;ixZe~Y-?Mnnlx$%CmB z&ZG75-Yqt`SMHLHh~hOE{v)Jfm#Rh7_zu!EEPxd$Ur#XVy(-s_&k+U}6O zsTA?K&Kli8CYByxhQLEoF{Hi(9`Y8YyQ}!FRH|#uDsZg+UvlhP)7@z@O|B}rja??% zxD9i>u}8R3`6W}ttUXHnN%57$Thn?u-jj@Mkk_F5Q}|N1uGB-_8#(qbEQU|`9{JxR zruly$rfzC{kGdb}t^0xC;zWL+N7$1IYJnffuGv*og0lff6^&reMT6l8zQs`OTSS07 z5(DfD0YM$c>d{7T{DIIF&d>MwGO2Wtkn=I|qCW>4+_#kEyCcvZ7iTg54(csRTE2kA zJeh`3?Fq7#s#>qUwQ6MVKfB)C{YPjpU&J3jT7cY#+X{u(`)pn-x*Jq3-hEs3*I79TPG!C+Mldg!pRQ&Tn5d=)?c4)jVOpQEImJh8Ild9$afRek5JKQ%pX?lg5| z-+Aj#P0w3tnp)m>-uhGjlX)xuXY=OnH*Zz{Z|7}fzj-U|H*fZS^ENg!Z(GtccAS{8 z68BIMO_qpXOqK9w>_dRlCgC-Tv?jfJ`}EtL1v{^LNoyMV8M-(sI334Jql3-;E-i$6}K zGCcd%`+Vnm=<*p-(dA=urq7EqeXdt_>a)n=^(#1tO)<^RUHk#xY-fA>N59^3N-U|| z137K~O-`To<>XyQB_9nKV4Bruzsc(LT?2lXCrY z%h`>=DF58L#t$^+=Sa_2wFea8)A8#87g8=#9)HgaQ9Fk48*}g1WWst~ia)|lkqn>D zbVK=51^*}PRthgt{PbkI!b_OF$iw+l1r!Tr-Rt5ZXBuhm<@a$#{3i1?{sA`AYF~rD z;Ik-}Z-o8I^b)xc1(pkBl9}ciAIjnPua02OBiQJ2Jkre-{EB}c^c2iNC6BbZ08(%X z|K^RE+qhx(RCsuH_XhFaCLVI}WrAaiotxRsW)+3v({6h(=ca=9z`>5aH(mh+x$_P7 z=|g$^^4Gx}b>_Gw5Bn}kHa92Dx6o26cT-WpY$z^`&u(_u(>bbowo}oPdAPm^M#sT=j1CT z;b2ueiLaiRV9yd9OvqqP|CgAd%Hp7XePv0|vA(l%Fn`DH?I7Ok{a35P{}<$~?dG z$R5?Bi|BL+;?W9^;<0;Ni2L^N{NA&VXJ3y4fi1^?dm?rKWnjdG_}l z=qWVM^*zzg9Cu_Grbo#quZ{z~=#Fb5}N2&xz& zv=8x}o}78E#(z-#cELdAo4^V&Y{jEhc+?7$?O(uTJJo+m77Ga#3c#iiqZ{p+0Cs~A zjR(MVZ$#upo-y8K4VYOq}`yoJ&d6$zAq6Atig;s|^ zJHw&9kyhv*`7I`xt@85`;YM)>p2cFcLQSo z2qOMQPm||FPu!F6w0jnL7JHU>mU>S1p2EkKcLjM*Bk$?tJ%hYwl6NI}&nNF1@?JpR z3(0#CdDoKnV)9->-b-=Rkaq)luO{zC@?JyUYsq^Zc{h>wdh*^%-rLA~J9+OQ@15km zi@bM}_a5@zOWrNyeU!Y9k@s=(K0)3m$@>&}pC<1!6%Gkhhn-FO&Bb z^1e#mcgXuLc@gQnPu>s6`yqKhBJaoK{e--qlJ^_(eoNl($ooBce<1IVGrBRR5WnLM3AXSu4QoeMa@K@6H5Xr}~dFCLr^~E5i0QVFQA;7;HYG`d6}S z3IroI0UJzV0!%=M5u5~L*jtzY_!nXFg&|lb;D9;o2Q&DZt${5dNn-vzp8cT$j~64& z*h1D4{+o8Noc^zy!fxzf_eSsv)$hQr;49=^VF%TB$Z4cQuKy&nUwlIKUuKXmss5`B z@)gzpoI!r(|GEeN2SrqIzqBpsY2dqlPec1QkJOX&jB)WNyQ=q$5y=gF3iY`21^yH~ z6M6kQL8^P1YF{R)?nA2m5RV_>wf-nPgBQtWSGD_P^GGS@v%mgZ^V5*VZ!_V0I-F;} z|IVcLGWBPs!lB5L z`O_m2N8;4s&qc1}+a*D;J{ma{UJHwnzb{nAw=o?<_~XDI__n9Yk6!-84ui`tBr1*kFb9XX}?)Hk+iC!?_*KJvZU%6$lO<>U#R2dDatcjas zXt3}a6miel61!RAy2dm9x}6FgW}$7Dg-)|DU1E3I9d^4NA+lC{Y$_$<#V&r2w$8Xp zLpdXBEYLlkzaH}_SBEe!LEZYqZwP3JF>B)Az?3q+bzBQG4D3t=#g&Ei& z-nzU*noUt3F`X$*eBRlq_4#$kif!r7rdXY(CRKMUyTLchmd5zqH|wx)EO-uH~0L8?Q}WWc)DD_QtoP8DU073u#0|{Tzi%*acm)eM{tJR=XV6B$<_}E-V%I_ zo&FPEsGa@gz-a=p82*2aT}x~mRTTBTnQ`O%NJtt)%dkL2LXZUu7Hp6ZNJU}+tPq<# z%}gchAt8ih2`Rgf;Fg*=!Neqy?K(~@^HCO28VM%GjjY7AU3s|DW=yx%bZV z#Ezq15QSyXy6Tza2J(F{kgM5XtNDZM^N50KgyZKZb= z3~!#A$7f@D9>bFVQot}T$@aB7k8+RP8hngfY0i?ci4Cx^(18{;($>QB}XpMI~4O}Zv0&*Y%k!|=dkzP`tY z<+RSAXq~fv)$*pS50M+cTYOsHQoa%@e-rhA)2593 z9i8R6{Mc-ZmSs?e z(?w6Hs-Zm5RZvBmVCf>LbshrOLDg8+K;>EHK`l$JE4Jji3@Qg>tG3R8%EDOH)>%*` z82boy2~-Bg*1L2DRDouRT8M|fmu+>SL}E^^$G*G?3EiheA;BGJ{ zPT+2Vw?(21UYW#%Hxam1@TwFpf>$K54&FM68hAAldGPWimYL@yaC6}0NMymwk|=>! zB9Q?vL!y9Q0l6lAfCHp=1CAc0U;Lw7T|G_>{5)H69@Pe(K)r!#ljgK~ldbxx)9w5m zRq7d2skb@0$O(UGJJkLa;{A5KXexDq`n;7qYv~1YyK5n*3=Ju30vr&?w;kfY<3Xcx z0;_!S*tfz^w;cBQHXohES1SzBmP;AtjyzxYZv`2x%JY^GJl&_}qP8@L?i}CsO!$4m zx0taQyY^djlKZ-tl12V|ZqRXbAHDv)&7MERo_B<^vg52{-@F+y&$lA`Y!hnuabu|; zA9#jujIIb4m^ZK+0^v>gmf+rfn+u^=m1uBoRJlj#5~^9|;Swmj-|P2=MZmk*RXvM5 zU*j9z0;ab`cGJKvnFazC?y1WLH)l#px6G72Dw(Qt+!)TGDkCL#OSq!TlDyaNxpmnx zTsbV;Kjo1API9-DS!_h+1!UvyPEda;C;t9AxfVPA@J(FHv3=K)wUV=zTgFxT6%{WV zx|hqLd-*G>zPa}58=~s#r~LnJ^D+N`p%J3$8ec|3zw)p2*Lx@f_A-+Wb=L}>e8Y-) z73!nuFqoDObVEjhVd^Lq9tkR_(k#<#NK9Q9B&e7;^l{A=5G=!n+64Uh0VL{ZBrIEB8&y z8dMDJ;C7avd82^({T?&zdoUIY;r!+a4Bj0+*=#+*XfoI(lR=tm9^Y&>yM~(0N1Dy& zn@x)Few5#R^y&@Xg_^|Hz&vmK%k7SKnB)TY>vIY_eA0BJlQ%lUjy}dX>^7Zrr_Sj} z=Pjc%;^?~=Bi*L+8Z{7MT;+Ci0qQ(1OkRM!oj|{hJB{Q;&=-N^Ht20$X`IEDb6hZ) i9(8n$8_D1>|BtGZFL){axcB1AUMlt|#s33=Ra;d7rU|P6 diff --git a/include/SugarCharts/Jit/FlashCanvas/proxy.php b/include/SugarCharts/Jit/FlashCanvas/proxy.php deleted file mode 100644 index fe4c0bee..00000000 --- a/include/SugarCharts/Jit/FlashCanvas/proxy.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @copyright 2010-2011 Shinya Muramatsu - * @license http://www.opensource.org/licenses/mit-license.php MIT License - * @link http://flashcanvas.net/ - * @link http://code.google.com/p/flashcanvas/ - */ - -// Whether we check referrer or not -define('CHECK_REFERRER', true); - -// Check that the request is from FlashCanvas -if (CHECK_REFERRER) { - if (empty($_SERVER['HTTP_REFERER'])) { - exit; - } - if (!preg_match('#/flash\d*canvas\.swf$#', $_SERVER['HTTP_REFERER'])) { - exit; - } -} - -// Check that the request has a valid URL parameter -if (empty($_GET['url'])) { - exit; -} -if (!preg_match('#^https?://#', $_GET['url'])) { - exit; -} - -// Percent-encode special characters in the URL -$search = array( '%', '#', ' '); -$replace = array('%25', '%23', '%20'); -$url = str_replace($search, $replace, $_GET['url']); - -// Disable compression -header('Content-Encoding: none'); - -// Load and output the file -if (extension_loaded('curl')) { - // Use cURL extension - $ch = curl_init($url); - curl_exec($ch); - curl_close($ch); -} else { - // Use the http:// wrapper - readfile($url); -} diff --git a/include/SugarCharts/Jit/FlashCanvas/save.php b/include/SugarCharts/Jit/FlashCanvas/save.php deleted file mode 100644 index 31282f9d..00000000 --- a/include/SugarCharts/Jit/FlashCanvas/save.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright 2010-2011 Shinya Muramatsu - * @license http://www.opensource.org/licenses/mit-license.php MIT License - * @link http://flashcanvas.net/ - * @link http://code.google.com/p/flashcanvas/ - */ - -if ($_SERVER['REQUEST_METHOD'] === 'POST') { - // Force download - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="canvas.png"'); - - if (isset($_POST['dataurl'])) { - // Decode the base64-encoded data - $data = $_POST['dataurl']; - $data = substr($data, strpos($data, ',') + 1); - echo base64_decode($data); - } else { - // Output the raw data - readfile('php://input'); - } -} diff --git a/include/SugarCharts/Jit/Jit.php b/include/SugarCharts/Jit/Jit.php deleted file mode 100644 index 8b2bcfe8..00000000 --- a/include/SugarCharts/Jit/Jit.php +++ /dev/null @@ -1,88 +0,0 @@ - - - - - '; - } - - function getMySugarChartResources() { - return ' - - '; - } - - - function display($name, $xmlFile, $width='320', $height='480', $resize=false) { - - parent::display($name, $xmlFile, $width, $height, $resize); - - return $this->ss->fetch('include/SugarCharts/Jit/tpls/chart.tpl'); - } - - - function getDashletScript($id,$xmlFile="") { - - parent::getDashletScript($id,$xmlFile); - return $this->ss->fetch('include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl'); - } - - - - -} - -?> \ No newline at end of file diff --git a/include/SugarCharts/Jit/JitReports.php b/include/SugarCharts/Jit/JitReports.php deleted file mode 100644 index 8b06c8ca..00000000 --- a/include/SugarCharts/Jit/JitReports.php +++ /dev/null @@ -1,215 +0,0 @@ -super_set as $key){ - $temp_dataset[$key] = (isset($dataset[$key])) ? $dataset[$key] : array(); - } - $dataset = $temp_dataset; - } - - foreach ($dataset as $key=>$value){ - if ($first && empty($value)){ - $data .= $this->processDataGroup(4, $key, 'NULL', '', ''); - } - else if (array_key_exists('numerical_value', $dataset)){ - $link = (isset($dataset['link'])) ? '#'.$dataset['link'] : ''; - $data .= $this->processDataGroup($level, $dataset['group_base_text'], $dataset['numerical_value'], $dataset['numerical_value'], $link); - array_push($this->processed_report_keys, $dataset['group_base_text']); - return $data; - } - else{ - $data .= $this->processReportData($value, $level+1); - } - } - - return $data; - } - - function processReportGroup($dataset){ - $super_set = array(); - - foreach($dataset as $groupBy => $groups){ - $prev_super_set = $super_set; - if (count($groups) > count($super_set)){ - $super_set = array_keys($groups); - foreach($prev_super_set as $prev_group){ - if (!in_array($prev_group, $groups)){ - array_push($super_set, $prev_group); - } - } - } - else{ - foreach($groups as $group => $groupData){ - if (!in_array($group, $super_set)){ - array_push($super_set, $group); - } - } - } - } - $super_set = array_unique($super_set); - - return $super_set; - } - - function xmlDataReportSingleValue(){ - $data = ''; - foreach ($this->data_set as $key => $dataset){ - $total = $this->calculateReportGroupTotal($dataset); - $this->checkYAxis($total); - - $data .= $this->tab('', 2); - $data .= $this->tab('' . $key . '', 3); - $data .= $this->tab('', 3); - $data .= $this->tab('',4); - $data .= $this->tab('' . $total . '',5); - $data .= $this->tab('' . $total . '',5); - $data .= $this->tab('',5); - $data .= $this->tab('',5); - $data .= $this->tab('',4); - $data .= $this->tab('', 3); - $data .= $this->tab('', 2); - } - return $data; - } - - function xmlDataReportChart(){ - $data = ''; - // correctly process the first row - $first = true; - foreach ($this->data_set as $key => $dataset){ - - $total = $this->calculateReportGroupTotal($dataset); - $this->checkYAxis($total); - - $data .= $this->tab('', 2); - $data .= $this->tab('' . $key . '', 3); - $data .= $this->tab('' . $total . '', 3); - $data .= $this->tab('', 3); - $data .= $this->tab('', 3); - - if ((isset($dataset[$total]) && $total != $dataset[$total]['numerical_value']) || !array_key_exists($key, $dataset)){ - $data .= $this->processReportData($dataset, 4, $first); - } - - if (!$first){ - $not_processed = array_diff($this->super_set, $this->processed_report_keys); - $processed_diff_count = count($this->super_set) - count($not_processed); - - if ($processed_diff_count != 0){ - foreach ($not_processed as $title){ - $data .= $this->processDataGroup(4, $title, 'NULL', '', ''); - } - } - } - $data .= $this->tab('', 3); - $data .= $this->tab('', 2); - $this->processed_report_keys = array(); - // we're done with the first row! - //$first = false; - } - return $data; - } - - public function processXmlData(){ - $data = ''; - - $this->super_set = $this->processReportGroup($this->data_set); - $single_value = false; - - foreach ($this->data_set as $key => $dataset){ - if ((isset($dataset[$key]) && count($this->data_set[$key]) == 1)){ - $single_value = true; - } - else{ - $single_value = false; - } - } - if ($this->chart_properties['type'] == 'line chart' && $single_value){ - $data .= $this->xmlDataReportSingleValue(); - } - else{ - $data .= $this->xmlDataReportChart(); - } - - return $data; - } - - /** - * wrapper function to return the html code containing the chart in a div - * - * @param string $name name of the div - * string $xmlFile location of the XML file - * string $style optional additional styles for the div - * @return string returns the html code through smarty - */ - function display($name, $xmlFile, $width='320', $height='480', $reportChartDivStyle, $resize=false){ - - - parent::display($name, $xmlFile, $width, $height, $resize=false); - - return $this->ss->fetch('include/SugarCharts/Jit/tpls/chart.tpl'); - } -} - -?> \ No newline at end of file diff --git a/include/SugarCharts/Jit/js/Jit/jit.js b/include/SugarCharts/Jit/js/Jit/jit.js deleted file mode 100644 index 3d7de07c..00000000 --- a/include/SugarCharts/Jit/js/Jit/jit.js +++ /dev/null @@ -1,496 +0,0 @@ -/* - Copyright (c) 2010, Nicolas Garcia Belmonte - All rights reserved - - > Redistribution and use in source and binary forms, with or without - > modification, are permitted provided that the following conditions are met: - > * Redistributions of source code must retain the above copyright - > notice, this list of conditions and the following disclaimer. - > * Redistributions in binary form must reproduce the above copyright - > notice, this list of conditions and the following disclaimer in the - > documentation and/or other materials provided with the distribution. - > * Neither the name of the organization nor the - > names of its contributors may be used to endorse or promote products - > derived from this software without specific prior written permission. - > - > THIS SOFTWARE IS PROVIDED BY NICOLAS GARCIA BELMONTE ``AS IS'' AND ANY - > EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - > DISCLAIMED. IN NO EVENT SHALL NICOLAS GARCIA BELMONTE BE LIABLE FOR ANY - > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - > (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - > LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - > ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - > (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - > SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -(function(){window.$jit=function(w){w=w||window;for(var k in $jit){if($jit[k].$extend){w[k]=$jit[k];}}};$jit.version='2.0.0b';var $=function(d){return document.getElementById(d);};$.empty=function(){};function pad(number,length){var str=''+number;while(str.length127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);} -else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}} -return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;} -else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}} -return string;}};Array.prototype.sum=function(){return(!this.length)?0:this.slice(1).sum()+ -((typeof this[0]=='number')?this[0]:0);};function array_match(needle,haystack){var length=haystack.length;var indexValue=new Array();for(var i=0,count=0;i>16,hex>>8&0xff,hex&0xff];}};$.destroy=function(elem){$.clean(elem);if(elem.parentNode) -elem.parentNode.removeChild(elem);if(elem.clearAttributes) -elem.clearAttributes();};$.clean=function(elem){for(var ch=elem.childNodes,i=0,l=ch.length;i-1;};$.addClass=function(obj,klass){if(!$.hasClass(obj,klass)) -obj.className=(obj.className+" "+klass);};$.removeClass=function(obj,klass){obj.className=obj.className.replace(new RegExp('(^|\\s)'+klass+'(?:\\s|$)'),'$1');};$.getPos=function(elem){var offset=getOffsets(elem);var scroll=getScrolls(elem);return{x:offset.x-scroll.x,y:offset.y-scroll.y};function getOffsets(elem){var position={x:0,y:0};while(elem&&!isBody(elem)){position.x+=elem.offsetLeft;position.y+=elem.offsetTop;elem=elem.offsetParent;} -return position;} -function getScrolls(elem){var position={x:0,y:0};while(elem&&!isBody(elem)){position.x+=elem.scrollLeft;position.y+=elem.scrollTop;elem=elem.parentNode;} -return position;} -function isBody(element){return(/^(?:body|html)$/i).test(element.tagName);}};$.event={get:function(e,win){win=win||window;return e||win.event;},getWheel:function(e){return e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;},isRightClick:function(e){return(e.which==3||e.button==2);},getPos:function(e,win){win=win||window;e=e||win.event;var doc=win.document;doc=doc.documentElement||doc.body;if(e.touches&&e.touches.length){e=e.touches[0];} -var page={x:e.pageX||(e.clientX+doc.scrollLeft),y:e.pageY||(e.clientY+doc.scrollTop)};return page;},stop:function(e){if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true;if(e.preventDefault)e.preventDefault();else e.returnValue=false;}};$jit.util=$jit.id=$;var Class=function(properties){properties=properties||{};var klass=function(){for(var key in this){if(typeof this[key]!='function') -this[key]=$.unlink(this[key]);} -this.constructor=klass;if(Class.prototyping) -return this;var instance=this.initialize?this.initialize.apply(this,arguments):this;this.$$family='class';return instance;};for(var mutator in Class.Mutators){if(!properties[mutator]) -continue;properties=Class.Mutators[mutator](properties,properties[mutator]);delete properties[mutator];} -$.extend(klass,this);klass.constructor=Class;klass.prototype=properties;return klass;};Class.Mutators={Implements:function(self,klasses){$.each($.splat(klasses),function(klass){Class.prototyping=klass;var instance=(typeof klass=='function')?new klass:klass;for(var prop in instance){if(!(prop in self)){self[prop]=instance[prop];}} -delete Class.prototyping;});return self;}};$.extend(Class,{inherit:function(object,properties){for(var key in properties){var override=properties[key];var previous=object[key];var type=$.type(override);if(previous&&type=='function'){if(override!=previous){Class.override(object,key,override);}}else if(type=='object'){object[key]=$.merge(previous,override);}else{object[key]=override;}} -return object;},override:function(object,name,method){var parent=Class.prototyping;if(parent&&object[name]!=parent[name]) -parent=null;var override=function(){var previous=this.parent;this.parent=parent?parent[name]:object[name];var value=method.apply(this,arguments);this.parent=previous;return value;};object[name]=override;}});Class.prototype.implement=function(){var proto=this.prototype;$.each(Array.prototype.slice.call(arguments||[]),function(properties){Class.inherit(proto,properties);});return this;};$jit.Class=Class;$jit.json={prune:function(tree,maxLevel){this.each(tree,function(elem,i){if(i==maxLevel&&elem.children){delete elem.children;elem.children=[];}});},getParent:function(tree,id){if(tree.id==id) -return false;var ch=tree.children;if(ch&&ch.length>0){for(var i=0;i=(7-4*a)/11){value=b*b-Math.pow((11-6*a-11*p)/4,2);break;}} -return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}};$.each(transitions,function(val,key){Trans[key]=makeTrans(val);});$.each(['Quad','Cubic','Quart','Quint'],function(elem,i){Trans[elem]=makeTrans(function(p){return Math.pow(p,[i+2]);});});})();var Animation=new Class({initialize:function(options){this.setOptions(options);},setOptions:function(options){var opt={duration:2500,fps:40,transition:Trans.Quart.easeInOut,compute:$.empty,complete:$.empty,link:'ignore'};this.opt=$.merge(opt,options||{});return this;},step:function(){var time=$.time(),opt=this.opt;if(timewin.height)?(pos.y-obj.height-y):pos.y+y)+'px';style.left=((pos.x+obj.width+x>win.width)?(pos.x-obj.width-x):pos.x+x)+'px';},hide:function(triggerCallback){if(!SUGAR.util.isTouchScreen()){this.tip.style.display='none';} -triggerCallback&&this.config.onHide();}});Extras.Classes.NodeStyles=new Class({Implements:[ExtrasInitializer,EventsInterface],initializePost:function(){this.fx=this.viz.fx;this.types=this.viz.fx.nodeTypes;this.nStyles=this.config;this.nodeStylesOnHover=this.nStyles.stylesHover;this.nodeStylesOnClick=this.nStyles.stylesClick;this.hoveredNode=false;this.fx.nodeFxAnimation=new Animation();this.down=false;this.move=false;},onMouseOut:function(e,win){this.down=this.move=false;if(!this.hoveredNode)return;if(this.dom&&this.isLabel(e,win)){this.toggleStylesOnHover(this.hoveredNode,false);} -var rt=e.relatedTarget,canvasWidget=this.canvas.getElement();while(rt&&rt.parentNode){if(canvasWidget==rt.parentNode)return;rt=rt.parentNode;} -this.toggleStylesOnHover(this.hoveredNode,false);this.hoveredNode=false;},onMouseOver:function(e,win){var label;if(this.dom&&(label=this.isLabel(e,win))){var node=this.viz.graph.getNode(label.id);if(node.selected)return;this.hoveredNode=node;this.toggleStylesOnHover(this.hoveredNode,true);}},onMouseDown:function(e,win,event,isRightClick){if(isRightClick)return;var label;if(this.dom&&(label=this.isLabel(e,win))){this.down=this.viz.graph.getNode(label.id);}else if(!this.dom){this.down=event.getNode();} -this.move=false;},onMouseUp:function(e,win,event,isRightClick){if(isRightClick)return;if(!this.move){this.onClick(event.getNode());} -this.down=this.move=false;},getRestoredStyles:function(node,type){var restoredStyles={},nStyles=this['nodeStylesOn'+type];for(var prop in nStyles){restoredStyles[prop]=node.styles['$'+prop];} -return restoredStyles;},toggleStylesOnHover:function(node,set){if(this.nodeStylesOnHover){this.toggleStylesOn('Hover',node,set);}},toggleStylesOnClick:function(node,set){if(this.nodeStylesOnClick){this.toggleStylesOn('Click',node,set);}},toggleStylesOn:function(type,node,set){var viz=this.viz;var nStyles=this.nStyles;if(set){var that=this;if(!node.styles){node.styles=$.merge(node.data,{});} -for(var s in this['nodeStylesOn'+type]){var $s='$'+s;if(!($s in node.styles)){node.styles[$s]=node.getData(s);}} -viz.fx.nodeFx($.extend({'elements':{'id':node.id,'properties':that['nodeStylesOn'+type]},transition:Trans.Quart.easeOut,duration:300,fps:40},this.config));}else{var restoredStyles=this.getRestoredStyles(node,type);viz.fx.nodeFx($.extend({'elements':{'id':node.id,'properties':restoredStyles},transition:Trans.Quart.easeOut,duration:300,fps:40},this.config));}},onClick:function(node){if(!node)return;var nStyles=this.nodeStylesOnClick;if(!nStyles)return;if(node.selected){this.toggleStylesOnClick(node,false);delete node.selected;}else{this.viz.graph.eachNode(function(n){if(n.selected){for(var s in nStyles){n.setData(s,n.styles['$'+s],'end');} -delete n.selected;}});this.toggleStylesOnClick(node,true);node.selected=true;delete node.hovered;this.hoveredNode=false;}},onMouseMove:function(e,win,event){if(this.down)this.move=true;if(this.dom&&this.isLabel(e,win))return;var nStyles=this.nodeStylesOnHover;if(!nStyles)return;if(!this.dom){if(this.hoveredNode){var geom=this.types[this.hoveredNode.getData('type')];var contains=geom&&geom.contains&&geom.contains.call(this.fx,this.hoveredNode,event.getPos());if(contains)return;} -var node=event.getNode();if(!this.hoveredNode&&!node)return;if(node.hovered)return;if(node&&!node.selected){this.fx.nodeFxAnimation.stopTimer();this.viz.graph.eachNode(function(n){if(n.hovered&&!n.selected){for(var s in nStyles){n.setData(s,n.styles['$'+s],'end');} -delete n.hovered;}});node.hovered=true;this.hoveredNode=node;this.toggleStylesOnHover(node,true);}else if(this.hoveredNode&&!this.hoveredNode.selected){this.fx.nodeFxAnimation.stopTimer();this.toggleStylesOnHover(this.hoveredNode,false);delete this.hoveredNode.hovered;this.hoveredNode=false;}}}});Extras.Classes.Navigation=new Class({Implements:[ExtrasInitializer,EventsInterface],initializePost:function(){this.pos=false;this.pressed=false;},onMouseWheel:function(e,win,scroll){if(!this.config.zooming)return;$.event.stop($.event.get(e,win));var val=this.config.zooming/1000,ans=1+scroll*val;this.canvas.scale(ans,ans);},onMouseDown:function(e,win,eventInfo){if(!this.config.panning)return;if(this.config.panning=='avoid nodes'&&eventInfo.getNode())return;this.pressed=true;this.pos=eventInfo.getPos();var canvas=this.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY;this.pos.x*=sx;this.pos.x+=ox;this.pos.y*=sy;this.pos.y+=oy;},onMouseMove:function(e,win,eventInfo){if(!this.config.panning)return;if(!this.pressed)return;if(this.config.panning=='avoid nodes'&&eventInfo.getNode())return;var thispos=this.pos,currentPos=eventInfo.getPos(),canvas=this.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY;currentPos.x*=sx;currentPos.y*=sy;currentPos.x+=ox;currentPos.y+=oy;var x=currentPos.x-thispos.x,y=currentPos.y-thispos.y;this.pos=currentPos;this.canvas.translate(x*1/sx,y*1/sy);},onMouseUp:function(e,win,eventInfo,isRightClick){if(!this.config.panning)return;this.pressed=false;}});var Canvas;(function(){var canvasType=typeof HTMLCanvasElement,supportsCanvas=(canvasType=='object'||canvasType=='function');function $E(tag,props){var elem=document.createElement(tag);for(var p in props){if(typeof props[p]=="object"){$.extend(elem[p],props[p]);}else{elem[p]=props[p];}} -if(tag=="canvas"&&!supportsCanvas&&G_vmlCanvasManager){elem=G_vmlCanvasManager.initElement(elem);} -return elem;} -$jit.Canvas=Canvas=new Class({canvases:[],pos:false,element:false,labelContainer:false,translateOffsetX:0,translateOffsetY:0,scaleOffsetX:1,scaleOffsetY:1,initialize:function(viz,opt){this.viz=viz;this.opt=opt;var id=$.type(opt.injectInto)=='string'?opt.injectInto:opt.injectInto.id,idLabel=id+"-label",wrapper=$(id),width=opt.width||wrapper.offsetWidth,height=opt.height||wrapper.offsetHeight;this.id=id;var canvasOptions={injectInto:id,width:width,height:height};this.element=$E('div',{'id':id+'-canvaswidget','style':{'position':'relative','width':width+'px','height':height+'px'}});this.labelContainer=this.createLabelContainer(opt.Label.type,idLabel,canvasOptions);this.canvases.push(new Canvas.Base({config:$.extend({idSuffix:'-canvas'},canvasOptions),plot:function(base){viz.fx.plot();},resize:function(){viz.refresh();}}));var back=opt.background;if(back){var backCanvas=new Canvas.Background[back.type](viz,$.extend(back,canvasOptions));this.canvases.push(new Canvas.Base(backCanvas));} -var len=this.canvases.length;while(len--){this.element.appendChild(this.canvases[len].canvas);if(len>0){this.canvases[len].plot();}} -this.element.appendChild(this.labelContainer);wrapper.appendChild(this.element);var timer=null,that=this;$.addEvent(window,'scroll',function(){clearTimeout(timer);timer=setTimeout(function(){that.getPos(true);},500);});$.addEvent(window,'click',function(){clearTimeout(timer);timer=setTimeout(function(){that.getPos(true);},500);});sb=document.getElementById('sb'+id);$.addEvent(sb,'scroll',function(){clearTimeout(timer);timer=setTimeout(function(){that.getPos(true);},500);});},getCtx:function(i){return this.canvases[i||0].getCtx();},getConfig:function(){return this.opt;},getElement:function(){return this.element;},getSize:function(i){return this.canvases[i||0].getSize();},resize:function(width,height){this.getPos(true);this.translateOffsetX=this.translateOffsetY=0;this.scaleOffsetX=this.scaleOffsetY=1;for(var i=0,l=this.canvases.length;iet){sum=ch((et+((tt-pi2)-et)*delta));}else{sum=ch((et-pi2+(tt-(et))*delta));}}else if(diff>=pi){if(tt>et){sum=ch((et+((tt-pi2)-et)*delta));}else{sum=ch((et-pi2+(tt-(et-pi2))*delta));}}else{sum=ch((et+(tt-et)*delta));} -var r=(this.rho-elem.rho)*delta+elem.rho;return{'theta':sum,'rho':r};}};var $P=function(a,b){return new Polar(a,b);};Polar.KER=$P(0,0);var Complex=function(x,y){this.x=x;this.y=y;};$jit.Complex=Complex;Complex.prototype={getc:function(){return this;},getp:function(simple){return this.toPolar(simple);},set:function(c){c=c.getc(true);this.x=c.x;this.y=c.y;},setc:function(x,y){this.x=x;this.y=y;},setp:function(theta,rho){this.x=Math.cos(theta)*rho;this.y=Math.sin(theta)*rho;},clone:function(){return new Complex(this.x,this.y);},toPolar:function(simple){var rho=this.norm();var atan=Math.atan2(this.y,this.x);if(atan<0)atan+=Math.PI*2;if(simple)return{'theta':atan,'rho':rho};return new Polar(atan,rho);},norm:function(){return Math.sqrt(this.squaredNorm());},squaredNorm:function(){return this.x*this.x+this.y*this.y;},add:function(pos){return new Complex(this.x+pos.x,this.y+pos.y);},prod:function(pos){return new Complex(this.x*pos.x-this.y*pos.y,this.y*pos.x+this.x*pos.y);},conjugate:function(){return new Complex(this.x,-this.y);},scale:function(factor){return new Complex(this.x*factor,this.y*factor);},equals:function(c){return this.x==c.x&&this.y==c.y;},$add:function(pos){this.x+=pos.x;this.y+=pos.y;return this;},$prod:function(pos){var x=this.x,y=this.y;this.x=x*pos.x-y*pos.y;this.y=y*pos.x+x*pos.y;return this;},$conjugate:function(){this.y=-this.y;return this;},$scale:function(factor){this.x*=factor;this.y*=factor;return this;},$div:function(pos){var x=this.x,y=this.y;var sq=pos.squaredNorm();this.x=x*pos.x+y*pos.y;this.y=y*pos.x-x*pos.y;return this.$scale(1/sq);}};var $C=function(a,b){return new Complex(a,b);};Complex.KER=$C(0,0);$jit.Graph=new Class({initialize:function(opt,Node,Edge,Label){var innerOptions={'complex':false,'Node':{}};this.Node=Node;this.Edge=Edge;this.Label=Label;this.opt=$.merge(innerOptions,opt||{});this.nodes={};this.edges={};var that=this;this.nodeList={};for(var p in Accessors){that.nodeList[p]=(function(p){return function(){var args=Array.prototype.slice.call(arguments);that.eachNode(function(n){n[p].apply(n,args);});};})(p);}},getNode:function(id){if(this.hasNode(id))return this.nodes[id];return false;},getByName:function(name){for(var id in this.nodes){var n=this.nodes[id];if(n.name==name)return n;} -return false;},getAdjacence:function(id,id2){if(id in this.edges){return this.edges[id][id2];} -return false;},addNode:function(obj){if(!this.nodes[obj.id]){var edges=this.edges[obj.id]={};this.nodes[obj.id]=new Graph.Node($.extend({'id':obj.id,'name':obj.name,'data':$.merge(obj.data||{},{}),'adjacencies':edges},this.opt.Node),this.opt.complex,this.Node,this.Edge,this.Label);} -return this.nodes[obj.id];},addAdjacence:function(obj,obj2,data){if(!this.hasNode(obj.id)){this.addNode(obj);} -if(!this.hasNode(obj2.id)){this.addNode(obj2);} -obj=this.nodes[obj.id];obj2=this.nodes[obj2.id];if(!obj.adjacentTo(obj2)){var adjsObj=this.edges[obj.id]=this.edges[obj.id]||{};var adjsObj2=this.edges[obj2.id]=this.edges[obj2.id]||{};adjsObj[obj2.id]=adjsObj2[obj.id]=new Graph.Adjacence(obj,obj2,data,this.Edge,this.Label);return adjsObj[obj2.id];} -return this.edges[obj.id][obj2.id];},removeNode:function(id){if(this.hasNode(id)){delete this.nodes[id];var adjs=this.edges[id];for(var to in adjs){delete this.edges[to][id];} -delete this.edges[id];}},removeAdjacence:function(id1,id2){delete this.edges[id1][id2];delete this.edges[id2][id1];},hasNode:function(id){return id in this.nodes;},empty:function(){this.nodes={};this.edges={};}});var Graph=$jit.Graph;var Accessors;(function(){var getDataInternal=function(prefix,prop,type,force,prefixConfig){var data;type=type||'current';prefix="$"+(prefix?prefix+"-":"");if(type=='current'){data=this.data;}else if(type=='start'){data=this.startData;}else if(type=='end'){data=this.endData;} -var dollar=prefix+prop;if(force){return data[dollar];} -if(!this.Config.overridable) -return prefixConfig[prop]||0;return(dollar in data)?data[dollar]:((dollar in this.data)?this.data[dollar]:(prefixConfig[prop]||0));} -var setDataInternal=function(prefix,prop,value,type){type=type||'current';prefix='$'+(prefix?prefix+'-':'');var data;if(type=='current'){data=this.data;}else if(type=='start'){data=this.startData;}else if(type=='end'){data=this.endData;} -data[prefix+prop]=value;} -var removeDataInternal=function(prefix,properties){prefix='$'+(prefix?prefix+'-':'');var that=this;$.each(properties,function(prop){var pref=prefix+prop;delete that.data[pref];delete that.endData[pref];delete that.startData[pref];});} -Accessors={getData:function(prop,type,force){return getDataInternal.call(this,"",prop,type,force,this.Config);},setData:function(prop,value,type){setDataInternal.call(this,"",prop,value,type);},setDataset:function(types,obj){types=$.splat(types);for(var attr in obj){for(var i=0,val=$.splat(obj[attr]),l=types.length;i=levelBegin&&d<=levelEnd&&filter(node))action(node,d);if(dd)loopLevel(n,levelBegin,levelEnd);});}})(node,levelBegin+d,levelEnd+d);},eachSubgraph:function(node,action,flags){this.eachLevel(node,0,false,action,flags);},eachSubnode:function(node,action,flags){this.eachLevel(node,1,1,action,flags);},anySubnode:function(node,cond,flags){var flag=false;cond=cond||$.lambda(true);var c=$.type(cond)=='string'?function(n){return n[cond];}:cond;this.eachSubnode(node,function(elem){if(c(elem))flag=true;},flags);return flag;},getSubnodes:function(node,level,flags){var ans=[],that=this;level=level||0;var levelStart,levelEnd;if($.type(level)=='array'){levelStart=level[0];levelEnd=level[1];}else{levelStart=level;levelEnd=Number.MAX_VALUE-node._depth;} -this.eachLevel(node,levelStart,levelEnd,function(n){ans.push(n);},flags);return ans;},getParents:function(node){var ans=[];this.eachAdjacency(node,function(adj){var n=adj.nodeTo;if(n._depth-1)){elem.endData[prop]=graphNodeData[prop];}else{elem.data[prop]=graphNodeData[prop];}}}});viz.graph.eachNode(function(elem){if(elem.ignore)return;elem.eachAdjacency(function(adj){if(adj.nodeFrom.ignore||adj.nodeTo.ignore)return;var nodeFrom=graph.getNode(adj.nodeFrom.id);var nodeTo=graph.getNode(adj.nodeTo.id);if(!nodeFrom.adjacentTo(nodeTo)){var adj=viz.graph.getAdjacence(nodeFrom.id,nodeTo.id);fadeEdges=true;adj.setData('alpha',1);adj.setData('alpha',1,'start');adj.setData('alpha',0,'end');}});});var fadeEdges=this.preprocessSum(graph);var modes=!fadeEdges?['node-property:alpha']:['node-property:alpha','edge-property:alpha'];modes[0]=modes[0]+((extraModes&&('node-property'in extraModes))?(':'+$.splat(extraModes['node-property']).join(':')):'');modes[1]=(modes[1]||'edge-property:alpha')+((extraModes&&('edge-property'in extraModes))?(':'+$.splat(extraModes['edge-property']).join(':')):'');if(extraModes&&('label-property'in extraModes)){modes.push('label-property:'+$.splat(extraModes['label-property']).join(':'))} -viz.reposition();viz.graph.eachNode(function(elem){if(elem.id!=root&&elem.pos.getp().equals(Polar.KER)){elem.pos.set(elem.endPos);elem.startPos.set(elem.endPos);}});viz.fx.animate($.merge(options,{modes:['polar'].concat(modes),onComplete:function(){viz.graph.eachNode(function(elem){if(elem.ignore)viz.graph.removeNode(elem.id);});viz.graph.eachNode(function(elem){elem.eachAdjacency(function(adj){if(adj.ignore)viz.graph.removeAdjacence(adj.nodeFrom.id,adj.nodeTo.id);});});options.onComplete();}}));break;default:;}},contract:function(node,opt){var viz=this.viz;if(node.collapsed||!node.anySubnode($.lambda(true)))return;opt=$.merge(this.options,viz.config,opt||{},{'modes':['node-property:alpha:span','linear']});node.collapsed=true;(function subn(n){n.eachSubnode(function(ch){ch.ignore=true;ch.setData('alpha',0,opt.type=='animate'?'end':'current');subn(ch);});})(node);if(opt.type=='animate'){viz.compute('end');if(viz.rotated){viz.rotate(viz.rotated,'none',{'property':'end'});} -(function subn(n){n.eachSubnode(function(ch){ch.setPos(node.getPos('end'),'end');subn(ch);});})(node);viz.fx.animate(opt);}else if(opt.type=='replot'){viz.refresh();}},expand:function(node,opt){if(!('collapsed'in node))return;var viz=this.viz;opt=$.merge(this.options,viz.config,opt||{},{'modes':['node-property:alpha:span','linear']});delete node.collapsed;(function subn(n){n.eachSubnode(function(ch){delete ch.ignore;ch.setData('alpha',1,opt.type=='animate'?'end':'current');subn(ch);});})(node);if(opt.type=='animate'){viz.compute('end');if(viz.rotated){viz.rotate(viz.rotated,'none',{'property':'end'});} -viz.fx.animate(opt);}else if(opt.type=='replot'){viz.refresh();}},preprocessSum:function(graph){var viz=this.viz;graph.eachNode(function(elem){if(!viz.graph.hasNode(elem.id)){viz.graph.addNode(elem);var n=viz.graph.getNode(elem.id);n.setData('alpha',0);n.setData('alpha',0,'start');n.setData('alpha',1,'end');}});var fadeEdges=false;graph.eachNode(function(elem){elem.eachAdjacency(function(adj){var nodeFrom=viz.graph.getNode(adj.nodeFrom.id);var nodeTo=viz.graph.getNode(adj.nodeTo.id);if(!nodeFrom.adjacentTo(nodeTo)){var adj=viz.graph.addAdjacence(nodeFrom,nodeTo,adj.data);if(nodeFrom.startAlpha==nodeFrom.endAlpha&&nodeTo.startAlpha==nodeTo.endAlpha){fadeEdges=true;adj.setData('alpha',0);adj.setData('alpha',0,'start');adj.setData('alpha',1,'end');}}});});return fadeEdges;}};var NodeHelper={'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(type,pos,radius,canvas){var ctx=canvas.getCtx();ctx.beginPath();ctx.arc(pos.x,pos.y,radius,0,Math.PI*2,true);ctx.closePath();ctx[type]();},'contains':function(npos,pos,radius){var diffx=npos.x-pos.x,diffy=npos.y-pos.y,diff=diffx*diffx+diffy*diffy;return diff<=radius*radius;}},'ellipse':{'render':function(type,pos,width,height,canvas){var ctx=canvas.getCtx();height/=2;width/=2;ctx.save();ctx.scale(width/height,height/width);ctx.beginPath();ctx.arc(pos.x*(height/width),pos.y*(width/height),height,0,Math.PI*2,true);ctx.closePath();ctx[type]();ctx.restore();},'contains':function(npos,pos,width,height){width/=2;height/=2;var dist=(width+height)/2,diffx=npos.x-pos.x,diffy=npos.y-pos.y,diff=diffx*diffx+diffy*diffy;return diff<=dist*dist;}},'square':{'render':function(type,pos,dim,canvas){canvas.getCtx()[type+"Rect"](pos.x-dim,pos.y-dim,2*dim,2*dim);},'contains':function(npos,pos,dim){return Math.abs(pos.x-npos.x)<=dim&&Math.abs(pos.y-npos.y)<=dim;}},'rectangle':{'render':function(type,pos,width,height,canvas){canvas.getCtx()[type+"Rect"](pos.x-width/2,pos.y-height/2,width,height);},'contains':function(npos,pos,width,height){return Math.abs(pos.x-npos.x)<=width/2&&Math.abs(pos.y-npos.y)<=height/2;}},'triangle':{'render':function(type,pos,dim,canvas){var ctx=canvas.getCtx(),c1x=pos.x,c1y=pos.y-dim,c2x=c1x-dim,c2y=pos.y+dim,c3x=c1x+dim,c3y=c2y;ctx.beginPath();ctx.moveTo(c1x,c1y);ctx.lineTo(c2x,c2y);ctx.lineTo(c3x,c3y);ctx.closePath();ctx[type]();},'contains':function(npos,pos,dim){return NodeHelper.circle.contains(npos,pos,dim);}},'star':{'render':function(type,pos,dim,canvas){var ctx=canvas.getCtx(),pi5=Math.PI/5;ctx.save();ctx.translate(pos.x,pos.y);ctx.beginPath();ctx.moveTo(dim,0);for(var i=0;i<9;i++){ctx.rotate(pi5);if(i%2==0){ctx.lineTo((dim/0.525731)*0.200811,0);}else{ctx.lineTo(dim,0);}} -ctx.closePath();ctx[type]();ctx.restore();},'contains':function(npos,pos,dim){return NodeHelper.circle.contains(npos,pos,dim);}}};var EdgeHelper={'line':{'render':function(from,to,canvas){var ctx=canvas.getCtx();ctx.beginPath();ctx.moveTo(from.x,from.y);ctx.lineTo(to.x,to.y);ctx.stroke();},'contains':function(posFrom,posTo,pos,epsilon){var min=Math.min,max=Math.max,minPosX=min(posFrom.x,posTo.x),maxPosX=max(posFrom.x,posTo.x),minPosY=min(posFrom.y,posTo.y),maxPosY=max(posFrom.y,posTo.y);if(pos.x>=minPosX&&pos.x<=maxPosX&&pos.y>=minPosY&&pos.y<=maxPosY){if(Math.abs(posTo.x-posFrom.x)<=epsilon){return true;} -var dist=(posTo.y-posFrom.y)/(posTo.x-posFrom.x)*(pos.x-posFrom.x)+posFrom.y;return Math.abs(dist-pos.y)<=epsilon;} -return false;}},'arrow':{'render':function(from,to,dim,swap,canvas){var ctx=canvas.getCtx();if(swap){var tmp=from;from=to;to=tmp;} -var vect=new Complex(to.x-from.x,to.y-from.y);vect.$scale(dim/vect.norm());var intermediatePoint=new Complex(to.x-vect.x,to.y-vect.y),normal=new Complex(-vect.y/2,vect.x/2),v1=intermediatePoint.add(normal),v2=intermediatePoint.$add(normal.$scale(-1));ctx.beginPath();ctx.moveTo(from.x,from.y);ctx.lineTo(to.x,to.y);ctx.stroke();ctx.beginPath();ctx.moveTo(v1.x,v1.y);ctx.lineTo(v2.x,v2.y);ctx.lineTo(to.x,to.y);ctx.closePath();ctx.fill();},'contains':function(posFrom,posTo,pos,epsilon){return EdgeHelper.line.contains(posFrom,posTo,pos,epsilon);}},'hyperline':{'render':function(from,to,r,canvas){var ctx=canvas.getCtx();var centerOfCircle=computeArcThroughTwoPoints(from,to);if(centerOfCircle.a>1000||centerOfCircle.b>1000||centerOfCircle.ratio<0){ctx.beginPath();ctx.moveTo(from.x*r,from.y*r);ctx.lineTo(to.x*r,to.y*r);ctx.stroke();}else{var angleBegin=Math.atan2(to.y-centerOfCircle.y,to.x --centerOfCircle.x);var angleEnd=Math.atan2(from.y-centerOfCircle.y,from.x --centerOfCircle.x);var sense=sense(angleBegin,angleEnd);ctx.beginPath();ctx.arc(centerOfCircle.x*r,centerOfCircle.y*r,centerOfCircle.ratio*r,angleBegin,angleEnd,sense);ctx.stroke();} -function computeArcThroughTwoPoints(p1,p2){var aDen=(p1.x*p2.y-p1.y*p2.x),bDen=aDen;var sq1=p1.squaredNorm(),sq2=p2.squaredNorm();if(aDen==0) -return{x:0,y:0,ratio:-1};var a=(p1.y*sq2-p2.y*sq1+p1.y-p2.y)/aDen;var b=(p2.x*sq1-p1.x*sq2+p2.x-p1.x)/bDen;var x=-a/2;var y=-b/2;var squaredRatio=(a*a+b*b)/4-1;if(squaredRatio<0) -return{x:0,y:0,ratio:-1};var ratio=Math.sqrt(squaredRatio);var out={x:x,y:y,ratio:ratio>1000?-1:ratio,a:a,b:b};return out;} -function sense(angleBegin,angleEnd){return(angleBeginangleEnd)?false:true):((angleEnd+Math.PI>angleBegin)?true:false);}},'contains':$.lambda(false)}};Graph.Plot={initialize:function(viz,klass){this.viz=viz;this.config=viz.config;this.node=viz.config.Node;this.edge=viz.config.Edge;this.animation=new Animation;this.nodeTypes=new klass.Plot.NodeTypes;this.edgeTypes=new klass.Plot.EdgeTypes;this.labels=viz.labels;},nodeHelper:NodeHelper,edgeHelper:EdgeHelper,Interpolator:{'map':{'border':'color','color':'color','width':'number','height':'number','dim':'number','alpha':'number','lineWidth':'number','angularWidth':'number','span':'number','valueArray':'array-number','dimArray':'array-number'},'canvas':{'globalAlpha':'number','fillStyle':'color','strokeStyle':'color','lineWidth':'number','shadowBlur':'number','shadowColor':'color','shadowOffsetX':'number','shadowOffsetY':'number','miterLimit':'number'},'label':{'size':'number','color':'color'},'compute':function(from,to,delta){return from+(to-from)*delta;},'moebius':function(elem,props,delta,vector){var v=vector.scale(-delta);if(v.norm()<1){var x=v.x,y=v.y;var ans=elem.startPos.getc().moebiusTransformation(v);elem.pos.setc(ans.x,ans.y);v.x=x;v.y=y;}},'linear':function(elem,props,delta){var from=elem.startPos.getc(true);var to=elem.endPos.getc(true);elem.pos.setc(this.compute(from.x,to.x,delta),this.compute(from.y,to.y,delta));},'polar':function(elem,props,delta){var from=elem.startPos.getp(true);var to=elem.endPos.getp();var ans=to.interpolate(from,delta);elem.pos.setp(ans.theta,ans.rho);},'number':function(elem,prop,delta,getter,setter){var from=elem[getter](prop,'start');var to=elem[getter](prop,'end');elem[setter](prop,this.compute(from,to,delta));},'color':function(elem,prop,delta,getter,setter){var from=$.hexToRgb(elem[getter](prop,'start'));var to=$.hexToRgb(elem[getter](prop,'end'));var comp=this.compute;var val=$.rgbToHex([parseInt(comp(from[0],to[0],delta)),parseInt(comp(from[1],to[1],delta)),parseInt(comp(from[2],to[2],delta))]);elem[setter](prop,val);},'array-number':function(elem,prop,delta,getter,setter){var from=elem[getter](prop,'start'),to=elem[getter](prop,'end'),cur=[];for(var i=0,l=from.length;i=0.95){that.labels.plotLabel(canvas,node,opt);}else{that.labels.hideLabel(node,false);}} -ctx.restore();node.visited=!T;});},plotTree:function(node,opt,animating){var that=this,viz=this.viz,canvas=viz.canvas,config=this.config,ctx=canvas.getCtx();var nodeAlpha=node.getData('alpha');node.eachSubnode(function(elem){if(opt.plotSubtree(node,elem)&&elem.exist&&elem.drawn){var adj=node.getAdjacency(elem.id);!animating&&opt.onBeforePlotLine(adj);ctx.globalAlpha=Math.min(nodeAlpha,elem.getData('alpha'));that.plotLine(adj,canvas,animating);!animating&&opt.onAfterPlotLine(adj);that.plotTree(elem,opt,animating);}});if(node.drawn){!animating&&opt.onBeforePlotNode(node);this.plotNode(node,canvas,animating);!animating&&opt.onAfterPlotNode(node);if(!opt.hideLabels&&opt.withLabels&&nodeAlpha>=0.95) -this.labels.plotLabel(canvas,node,opt);else -this.labels.hideLabel(node,false);}else{this.labels.hideLabel(node,true);}},plotNode:function(node,canvas,animating){var f=node.getData('type'),ctxObj=this.node.CanvasStyles;if(f!='none'){var width=node.getData('lineWidth'),color=node.getData('color'),alpha=node.getData('alpha'),ctx=canvas.getCtx();ctx.lineWidth=width;ctx.fillStyle=ctx.strokeStyle=color;ctx.globalAlpha=alpha;for(var s in ctxObj){ctx[s]=node.getCanvasStyle(s);} -this.nodeTypes[f].render.call(this,node,canvas,animating);}},plotLine:function(adj,canvas,animating){var f=adj.getData('type'),ctxObj=this.edge.CanvasStyles;if(f!='none'){var width=adj.getData('lineWidth'),color=adj.getData('color'),ctx=canvas.getCtx();ctx.lineWidth=width;ctx.fillStyle=ctx.strokeStyle=color;for(var s in ctxObj){ctx[s]=adj.getCanvasStyle(s);} -this.edgeTypes[f].render.call(this,adj,canvas,animating);}}};Graph.Label={};Graph.Label.Native=new Class({plotLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var pos=node.pos.getc(true);ctx.font=node.getLabelData('style')+' '+node.getLabelData('size')+'px '+node.getLabelData('family');ctx.textAlign=node.getLabelData('textAlign');ctx.fillStyle=ctx.strokeStyle=node.getLabelData('color');ctx.textBaseline=node.getLabelData('textBaseline');this.renderLabel(canvas,node,controller);},renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var pos=node.pos.getc(true);ctx.fillText(node.name,pos.x,pos.y+node.getData("height")/2);},hideLabel:$.empty,hideLabels:$.empty});Graph.Label.DOM=new Class({labelsHidden:false,labelContainer:false,labels:{},getLabelContainer:function(){return this.labelContainer?this.labelContainer:this.labelContainer=document.getElementById(this.viz.config.labelContainer);},getLabel:function(id){return(id in this.labels&&this.labels[id]!=null)?this.labels[id]:this.labels[id]=document.getElementById(id);},hideLabels:function(hide){var container=this.getLabelContainer();if(hide) -container.style.display='none';else -container.style.display='';this.labelsHidden=hide;},clearLabels:function(force){for(var id in this.labels){if(force||!this.viz.graph.hasNode(id)){this.disposeLabel(id);delete this.labels[id];}}},disposeLabel:function(id){var elem=this.getLabel(id);if(elem&&elem.parentNode){elem.parentNode.removeChild(elem);}},hideLabel:function(node,show){node=$.splat(node);var st=show?"":"none",lab,that=this;$.each(node,function(n){var lab=that.getLabel(n.id);if(lab){lab.style.display=st;}});},fitsInCanvas:function(pos,canvas){var size=canvas.getSize();if(pos.x>=size.width||pos.x<0||pos.y>=size.height||pos.y<0)return false;return true;}});Graph.Label.HTML=new Class({Implements:Graph.Label.DOM,plotLabel:function(canvas,node,controller){var id=node.id,tag=this.getLabel(id);if(!tag&&!(tag=document.getElementById(id))){tag=document.createElement('div');var container=this.getLabelContainer();tag.id=id;tag.className='node';tag.style.position='absolute';controller.onCreateLabel(tag,node);container.appendChild(tag);this.labels[node.id]=tag;} -this.placeLabel(tag,node,controller);}});Graph.Label.SVG=new Class({Implements:Graph.Label.DOM,plotLabel:function(canvas,node,controller){var id=node.id,tag=this.getLabel(id);if(!tag&&!(tag=document.getElementById(id))){var ns='http://www.w3.org/2000/svg';tag=document.createElementNS(ns,'svg:text');var tspan=document.createElementNS(ns,'svg:tspan');tag.appendChild(tspan);var container=this.getLabelContainer();tag.setAttribute('id',id);tag.setAttribute('class','node');container.appendChild(tag);controller.onCreateLabel(tag,node);this.labels[node.id]=tag;} -this.placeLabel(tag,node,controller);}});Graph.Geom=new Class({initialize:function(viz){this.viz=viz;this.config=viz.config;this.node=viz.config.Node;this.edge=viz.config.Edge;},translate:function(pos,prop){prop=$.splat(prop);this.viz.graph.eachNode(function(elem){$.each(prop,function(p){elem.getPos(p).$add(pos);});});},setRightLevelToShow:function(node,canvas,callback){var level=this.getRightLevelToShow(node,canvas),fx=this.viz.labels,opt=$.merge({execShow:true,execHide:true,onHide:$.empty,onShow:$.empty},callback||{});node.eachLevel(0,this.config.levelsToShow,function(n){var d=n._depth-node._depth;if(d>level){opt.onHide(n);if(opt.execHide){n.drawn=false;n.exist=false;fx.hideLabel(n,false);}}else{opt.onShow(n);if(opt.execShow){n.exist=true;}}});node.drawn=true;},getRightLevelToShow:function(node,canvas){var config=this.config;var level=config.levelsToShow;var constrained=config.constrained;if(!constrained)return level;while(!this.treeFitsInCanvas(node,canvas,level)&&level>1){level--;} -return level;}});var Loader={construct:function(json){var isGraph=($.type(json)=='array');var ans=new Graph(this.graphOptions,this.config.Node,this.config.Edge,this.config.Label);if(!isGraph) -(function(ans,json){ans.addNode(json);if(json.children){for(var i=0,ch=json.children;ioffsetHeight?offsetWidth:offsetHeight;n.setData('width',dim);n.setData('height',dim);n.setData('dim',dim);}}});},initializeLabel:function(opt){if(!this.label){this.label=document.createElement('div');document.body.appendChild(this.label);} -this.setLabelStyles(opt);},setLabelStyles:function(opt){$.extend(this.label.style,{'visibility':'hidden','position':'absolute','width':'auto','height':'auto'});this.label.className='jit-autoadjust-label';}};Layouts.Tree=(function(){var slice=Array.prototype.slice;function getBoundaries(graph,config,level,orn,prop){var dim=config.Node;var multitree=config.multitree;if(dim.overridable){var w=-1,h=-1;graph.eachNode(function(n){if(n._depth==level&&(!multitree||('$orn'in n.data)&&n.data.$orn==orn)){var dw=n.getData('width',prop);var dh=n.getData('height',prop);w=(w0)?parents[0]:null;path(parents);};for(var i=0,ns=[node.id].concat(nodesInPath);i=b._depth);});for(var i=0;i0&&n.drawn){n.drawn=false;nds[node.id].push(n);}else if((!root||!orns)&&n.drawn){n.drawn=false;nds[node.id].push(n);}});node.drawn=true;} -if(nodes.length>0)viz.fx.plot();for(i in nds){$.each(nds[i],function(n){n.drawn=true;});} -for(i=0;ibaseHeight?size:baseHeight)+this.config.subtreeOffset;},getEdge:function(node,type,s){var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b));};};var dim=this.node;var w=node.getData('width');var h=node.getData('height');if(type=='begin'){if(dim.align=="center"){return this.dispatch(s,$C(0,h/2),$C(-w/2,0),$C(0,-h/2),$C(w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";}else if(type=='end'){if(dim.align=="center"){return this.dispatch(s,$C(0,-h/2),$C(w/2,0),$C(0,h/2),$C(-w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,0),$C(w,0),$C(0,h),$C(0,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,-h),$C(0,0),$C(0,0),$C(-w,0));}else throw"align: not implemented";}},getScaledTreePosition:function(node,scale){var dim=this.node;var w=node.getData('width');var h=node.getData('height');var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b)).$scale(1-scale);};};if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="center"){return this.dispatch(s,$C(0,h/2),$C(-w/2,0),$C(0,-h/2),$C(w/2,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";},treeFitsInCanvas:function(node,canvas,level){var csize=canvas.getSize();var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var size=this.dispatch(s,csize.width,csize.height);var baseSize=this.getTreeBaseSize(node,level,function(level,node){return level===0||!node.anySubnode();});return(baseSize=0){node.drawn=false;var ctx=canvas.getCtx();var diff=viz.geom.getScaledTreePosition(node,scale);ctx.translate(diff.x,diff.y);ctx.scale(scale,scale);} -this.plotTree(node,$.merge(opt,{'withLabels':true,'hideLabels':!!scale,'plotSubtree':function(n,ch){var root=config.multitree&&!('$orn'in node.data);var orns=root&&node.getData('orns');return!root||orns.indexOf(elem.getData('orn'))>-1;}}),animating);if(scale>=0)node.drawn=true;},getAlignedPos:function(pos,width,height){var nconfig=this.node;var square,orn;if(nconfig.align=="center"){square={x:pos.x-width/2,y:pos.y-height/2};}else if(nconfig.align=="left"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width/2,y:pos.y};}else{square={x:pos.x,y:pos.y-height/2};}}else if(nconfig.align=="right"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width/2,y:pos.y-height};}else{square={x:pos.x-width,y:pos.y-height/2};}}else throw"align: not implemented";return square;},getOrientation:function(adj){var config=this.config;var orn=config.orientation;if(config.multitree){var nodeFrom=adj.nodeFrom;var nodeTo=adj.nodeTo;orn=(('$orn'in nodeFrom.data)&&nodeFrom.data.$orn)||(('$orn'in nodeTo.data)&&nodeTo.data.$orn);} -return orn;}});$jit.ST.Label={};$jit.ST.Label.Native=new Class({Implements:Graph.Label.Native,renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);ctx.fillText(node.name,coord.x,coord.y);}});$jit.ST.Label.DOM=new Class({Implements:Graph.Label.DOM,placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),config=this.viz.config,dim=config.Node,canvas=this.viz.canvas,w=node.getData('width'),h=node.getData('height'),radius=canvas.getSize(),labelPos,orn;var ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,posx=pos.x*sx+ox,posy=pos.y*sy+oy;if(dim.align=="center"){labelPos={x:Math.round(posx-w/2+radius.width/2),y:Math.round(posy-h/2+radius.height/2)};}else if(dim.align=="left"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w/2+radius.width/2),y:Math.round(posy+radius.height/2)};}else{labelPos={x:Math.round(posx+radius.width/2),y:Math.round(posy-h/2+radius.height/2)};}}else if(dim.align=="right"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w/2+radius.width/2),y:Math.round(posy-h+radius.height/2)};}else{labelPos={x:Math.round(posx-w+radius.width/2),y:Math.round(posy-h/2+radius.height/2)};}}else throw"align: not implemented";var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});$jit.ST.Label.SVG=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.SVG],initialize:function(viz){this.viz=viz;}});$jit.ST.Label.HTML=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.HTML],initialize:function(viz){this.viz=viz;}});$jit.ST.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var dim=node.getData('dim'),pos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'square':{'render':function(node,canvas){var dim=node.getData('dim'),dim2=dim/2,pos=this.getAlignedPos(node.pos.getc(true),dim,dim);this.nodeHelper.square.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.square.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'ellipse':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}},'rectangle':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}}});$jit.ST.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depth1&&direction[0]!=node.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depthx+dataPointMidPoint){return false;} -for(var i=0,l=dimArray.length;i=x-dataPointMidPoint&&mpos.x<=x+dataPointMidPoint&&mpos.y>=y-dimi[0]-dataPointMidPoint&&mpos.y<=y-dimi[0]+dataPointMidPoint){var valArrayCur=node.getData('valArrayCur');var results=array_match(valArrayCur[i],valArrayCur);var matches=results[0];var indexValues=results[1];if(matches>1){var names=new Array(),values=new Array(),percentages=new Array(),linksArr=new Array();for(var j=0,il=indexValues.length;j0){acum+=valArray[i][0];leftAcum+=dimArray[i][0];}} -aggregateStyle.top=(-font-config.labelOffset)+'px';labelStyle.top=(config.labelOffset+leftAcum)+'px';domElement.style.top=parseInt(domElement.style.top,10)-leftAcum+'px';domElement.style.height=wrapperStyle.height=leftAcum+'px';labels.aggregate.innerHTML=acum;}}});var size=st.canvas.getSize(),margin=config.Margin;st.config.offsetY=-size.height/2+margin.bottom -+(config.showLabels&&(config.labelOffset+config.Label.size));st.config.offsetX=(margin.right-margin.left-config.labelOffset-config.Label.size)/2;this.st=st;this.canvas=this.st.canvas;},renderTitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,title=config.Title;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.textBaseline='top';ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}},renderTicks:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,label=config.Label,maxValue=this.maxValue,maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} -labelValue=0,labelIncrement=maxTickValue/ticks.segments,ctx=canvas.getCtx();ctx.strokeStyle=ticks.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';idLabel=canvas.id+"-label";labelDim=100;container=document.getElementById(idLabel);var axis=(size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),htmlOrigin=size.height-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),grid=-size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1,-(size.height/2)+margin.top+(title.text?title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0));while(axis>=grid){ctx.save();ctx.translate(-(size.width/2)+margin.left,Math.round(axis));ctx.rotate(Math.PI/2);ctx.fillStyle=label.color;if(config.showLabels){if(label.type=='Native'){ctx.fillText(labelValue,0,0);}else{labelDiv=document.createElement('div');labelDiv.innerHTML=labelValue;labelDiv.className="rotatedLabel";labelDiv.style.top=(htmlOrigin-(labelDim/2))+"px";labelDiv.style.left=margin.left+"px";labelDiv.style.width=labelDim+"px";labelDiv.style.height=labelDim+"px";labelDiv.style.textAlign="center";labelDiv.style.verticalAlign="middle";labelDiv.style.position="absolute";container.appendChild(labelDiv);}} -ctx.restore();ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size,Math.round(axis),size.width-margin.right-margin.left-config.labelOffset-label.size,1);htmlOrigin+=segmentLength;axis+=segmentLength;labelValue+=labelIncrement;}},renderBackground:function(){var canvas=this.canvas,config=this.config,backgroundColor=config.backgroundColor,size=canvas.getSize(),ctx=canvas.getCtx();ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);},loadJSON:function(json){var prefix=$.time(),ch=[],st=this.st,name=$.splat(json.label),color=$.splat(json.color||this.colors),config=this.config,ticks=config.Ticks,renderBackground=config.renderBackground,gradient=!!config.type.split(":")[1],animate=config.animate,title=config.Title,groupTotalValue=0;var valArrayAll=new Array();for(var i=0,values=json.values,l=values.length;i-1)?d:[0,0];}),'end');});this.st.fx.animate({modes:['node-property:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},restore:function(){if(this.busy)return;this.busy=true;if(this.config.Tips.enable)this.st.tips.hide();this.select(false,false,false);this.normalizeDims();var that=this;this.st.fx.animate({modes:['node-property:height:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},select:function(id,name,index){if(!this.config.selectOnHover)return;var s=this.selected;if(s.id!=id||s.name!=name||s.index!=index){s.id=id;s.name=name;s.index=index;this.st.graph.eachNode(function(n){n.setData('border',false);});if(id){var n=this.st.graph.getNode(id);n.setData('border',s);var link=index===0?'prev':'next';link=n.getData(link);if(link){n=this.st.graph.getByName(link);if(n){n.setData('border',{name:name,index:1-index});}}} -this.st.plot();}},getLegend:function(){var legend=new Array();var name=new Array();var color=new Array();var n;this.st.graph.getNode(this.st.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){color[i]=colors[i%len];name[i]=s;});legend['name']=name;legend['color']=color;return legend;},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.maxValue||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,labelOffset=config.labelOffset+config.Label.size,fixedDim=(size.width-(margin.left+margin.right+labelOffset))/(l-1),animate=config.animate,ticks=config.Ticks,height=size.height-(margin.top+margin.bottom)-(config.showAggregates&&labelOffset) --(config.showLabels&&labelOffset);var maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} -this.st.graph.eachNode(function(n){var acumLeft=0,acumRight=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acumLeft+=+v[0];acumRight+=+v[1];animateValue.push([0,0]);});var acum=acumRight>acumLeft?acumRight:acumLeft;n.setData('width',fixedDim);if(animate){n.setData('height',acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{if(ticks.enable){n.setData('height',acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxTickValue,n[1]*height/maxTickValue];}));}else{n.setData('height',acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}));}}});}});$jit.ST.Plot.NodeTypes.implement({'areachart-stacked':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,stringArray=node.getData('stringArray'),dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),valLeft=$.reduce(valArray,function(x,y){return x+y[0];},0),valRight=$.reduce(valArray,function(x,y){return x+y[1];},0),colorArray=node.getData('colorArray'),colorLength=colorArray.length,config=node.getData('config'),gradient=node.getData('gradient'),showLabels=config.showLabels,aggregates=config.showAggregates,label=config.Label,prev=node.getData('prev');var ctx=canvas.getCtx(),border=node.getData('border');if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acumLeft=0,acumRight=0,valAcum=0;i0||dimArray[i][1]>0)){var h1=acumLeft+dimArray[i][0],h2=acumRight+dimArray[i][1],alpha=Math.atan((h2-h1)/width),delta=55;var linear=ctx.createLinearGradient(x+width/2,y-(h1+h2)/2,x+width/2+delta*Math.sin(alpha),y-(h1+h2)/2+delta*Math.cos(alpha));var color=$.rgbToHex($.map($.hexToRgb(colorArray[i%colorLength].slice(1)),function(v){return(v*0.85)>>0;}));linear.addColorStop(0,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} -ctx.beginPath();ctx.moveTo(x,y-acumLeft);ctx.lineTo(x+width,y-acumRight);ctx.lineTo(x+width,y-acumRight-dimArray[i][1]);ctx.lineTo(x,y-acumLeft-dimArray[i][0]);ctx.lineTo(x,y-acumLeft);ctx.fill();ctx.restore();if(border){var strong=border.name==stringArray[i];var perc=strong?0.7:0.8;var color=$.rgbToHex($.map($.hexToRgb(colorArray[i%colorLength].slice(1)),function(v){return(v*perc)>>0;}));ctx.strokeStyle=color;ctx.lineWidth=strong?4:1;ctx.save();ctx.beginPath();if(border.index===0){ctx.moveTo(x,y-acumLeft);ctx.lineTo(x,y-acumLeft-dimArray[i][0]);}else{ctx.moveTo(x+width,y-acumRight);ctx.lineTo(x+width,y-acumRight-dimArray[i][1]);} -ctx.stroke();ctx.restore();} -acumLeft+=(dimArray[i][0]||0);acumRight+=(dimArray[i][1]||0);if(dimArray[i][0]>0) -valAcum+=(valArray[i][0]||0);} -if(prev&&label.type=='Native'){ctx.save();ctx.beginPath();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';if(aggregates(node.name,valLeft,valRight,node)){ctx.fillText(valAcum,x,y-acumLeft-config.labelOffset-label.size/2,width);} -if(showLabels(node.name,valLeft,valRight,node)){ctx.fillText(node.name,x,y+label.size/2+config.labelOffset);} -ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),rx=mpos.x-x;if(mpos.xx+width||mpos.y>y||mpos.y=intersec){var index=+(rx>width/2);return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i][index],'index':index};}} -return false;}}});$jit.AreaChart=new Class({st:null,colors:["#416D9C","#70A35E","#EBB056","#C74243","#83548B","#909291","#557EAA"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","Margin","Label","AreaChart"),{Label:{type:'Native'}},opt);var showLabels=this.config.showLabels,typeLabels=$.type(showLabels),showAggregates=this.config.showAggregates,typeAggregates=$.type(showAggregates);this.config.showLabels=typeLabels=='function'?showLabels:$.lambda(showLabels);this.config.showAggregates=typeAggregates=='function'?showAggregates:$.lambda(showAggregates);this.initializeViz();},initializeViz:function(){var config=this.config,that=this,nodeType=config.type.split(":")[0],nodeLabels={};var st=new $jit.ST({injectInto:config.injectInto,orientation:"bottom",levelDistance:0,siblingOffset:0,subtreeOffset:0,withLabels:config.Label.type!='Native',useCanvas:config.useCanvas,Label:{type:config.Label.type},Node:{overridable:true,type:'areachart-'+nodeType,align:'left',width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.filterOnClick&&!config.Events.enable)return;var elem=eventInfo.getContains();if(elem)config.filterOnClick&&that.filter(elem.name);config.Events.enable&&config.Events.onClick(elem,eventInfo,evt);},onRightClick:function(node,eventInfo,evt){if(!config.restoreOnRightClick)return;that.restore();},onMouseMove:function(node,eventInfo,evt){if(!config.selectOnHover)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label,valueArray=node.getData('valueArray'),acumLeft=$.reduce(valueArray,function(x,y){return x+y[0];},0),acumRight=$.reduce(valueArray,function(x,y){return x+y[1];},0);if(node.getData('prev')){var nlbs={wrapper:document.createElement('div'),aggregate:document.createElement('div'),label:document.createElement('div')};var wrapper=nlbs.wrapper,label=nlbs.label,aggregate=nlbs.aggregate,wrapperStyle=wrapper.style,labelStyle=label.style,aggregateStyle=aggregate.style;nodeLabels[node.id]=nlbs;wrapper.appendChild(label);wrapper.appendChild(aggregate);if(!config.showLabels(node.name,acumLeft,acumRight,node)){label.style.display='none';} -if(!config.showAggregates(node.name,acumLeft,acumRight,node)){aggregate.style.display='none';} -wrapperStyle.position='relative';wrapperStyle.overflow='visible';wrapperStyle.fontSize=labelConf.size+'px';wrapperStyle.fontFamily=labelConf.family;wrapperStyle.color=labelConf.color;wrapperStyle.textAlign='center';aggregateStyle.position=labelStyle.position='absolute';domElement.style.width=node.getData('width')+'px';domElement.style.height=node.getData('height')+'px';label.innerHTML=node.name;domElement.appendChild(wrapper);}},onPlaceLabel:function(domElement,node){if(!node.getData('prev'))return;var labels=nodeLabels[node.id],wrapperStyle=labels.wrapper.style,labelStyle=labels.label.style,aggregateStyle=labels.aggregate.style,width=node.getData('width'),height=node.getData('height'),dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),acumLeft=$.reduce(valArray,function(x,y){return x+y[0];},0),acumRight=$.reduce(valArray,function(x,y){return x+y[1];},0),font=parseInt(wrapperStyle.fontSize,10),domStyle=domElement.style;if(dimArray&&valArray){if(config.showLabels(node.name,acumLeft,acumRight,node)){labelStyle.display='';}else{labelStyle.display='none';} -if(config.showAggregates(node.name,acumLeft,acumRight,node)){aggregateStyle.display='';}else{aggregateStyle.display='none';} -wrapperStyle.width=aggregateStyle.width=labelStyle.width=domElement.style.width=width+'px';aggregateStyle.left=labelStyle.left=-width/2+'px';for(var i=0,l=valArray.length,acum=0,leftAcum=0;i0){acum+=valArray[i][0];leftAcum+=dimArray[i][0];}} -aggregateStyle.top=(-font-config.labelOffset)+'px';labelStyle.top=(config.labelOffset+leftAcum)+'px';domElement.style.top=parseInt(domElement.style.top,10)-leftAcum+'px';domElement.style.height=wrapperStyle.height=leftAcum+'px';labels.aggregate.innerHTML=acum;}}});var size=st.canvas.getSize(),margin=config.Margin;st.config.offsetY=-size.height/2+margin.bottom -+(config.showLabels&&(config.labelOffset+config.Label.size));st.config.offsetX=(margin.right-margin.left)/2;this.st=st;this.canvas=this.st.canvas;},loadJSON:function(json){var prefix=$.time(),ch=[],st=this.st,name=$.splat(json.label),color=$.splat(json.color||this.colors),config=this.config,gradient=!!config.type.split(":")[1],animate=config.animate;for(var i=0,values=json.values,l=values.length;i-1)?d:[0,0];}),'end');});this.st.fx.animate({modes:['node-property:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},restore:function(){if(this.busy)return;this.busy=true;if(this.config.Tips.enable)this.st.tips.hide();this.select(false,false,false);this.normalizeDims();var that=this;this.st.fx.animate({modes:['node-property:height:dimArray'],duration:1500,onComplete:function(){that.busy=false;}});},select:function(id,name,index){if(!this.config.selectOnHover)return;var s=this.selected;if(s.id!=id||s.name!=name||s.index!=index){s.id=id;s.name=name;s.index=index;this.st.graph.eachNode(function(n){n.setData('border',false);});if(id){var n=this.st.graph.getNode(id);n.setData('border',s);var link=index===0?'prev':'next';link=n.getData(link);if(link){n=this.st.graph.getByName(link);if(n){n.setData('border',{name:name,index:1-index});}}} -this.st.plot();}},getLegend:function(){var legend={};var n;this.st.graph.getNode(this.st.root).eachAdjacency(function(adj){n=adj.nodeTo;});var colors=n.getData('colorArray'),len=colors.length;$.each(n.getData('stringArray'),function(s,i){legend[s]=colors[i%len];});return legend;},getMaxValue:function(){var maxValue=0;this.st.graph.eachNode(function(n){var valArray=n.getData('valueArray'),acumLeft=0,acumRight=0;$.each(valArray,function(v){acumLeft+=+v[0];acumRight+=+v[1];});var acum=acumRight>acumLeft?acumRight:acumLeft;maxValue=maxValue>acum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,labelOffset=config.labelOffset+config.Label.size,fixedDim=(size.width-(margin.left+margin.right))/l,animate=config.animate,height=size.height-(margin.top+margin.bottom)-(config.showAggregates&&labelOffset) --(config.showLabels&&labelOffset);this.st.graph.eachNode(function(n){var acumLeft=0,acumRight=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acumLeft+=+v[0];acumRight+=+v[1];animateValue.push([0,0]);});var acum=acumRight>acumLeft?acumRight:acumLeft;n.setData('width',fixedDim);if(animate){n.setData('height',acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('height',acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return[n[0]*height/maxValue,n[1]*height/maxValue];}));}});}});Options.BarChart={$extend:true,animate:true,type:'stacked',labelOffset:3,barsOffset:0,nodeCount:0,hoveredColor:'#9fd4ff',background:false,renderBackground:false,orientation:'horizontal',showAggregates:true,showLabels:true,Ticks:{enable:false,segments:4,color:'#000000'},Tips:{enable:false,onShow:$.empty,onHide:$.empty},Events:{enable:false,onClick:$.empty}};$jit.ST.Plot.NodeTypes.implement({'barchart-stacked':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),stringArray=node.getData('stringArray'),linkArray=node.getData('linkArray'),gvl=node.getData('gvl'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,nodeCount=node.getData('nodeCount');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,margin=config.Margin;if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}));linear.addColorStop(0,color);linear.addColorStop(0.3,colorArray[i%colorLength]);linear.addColorStop(0.7,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} -if(horz){ctx.fillRect(x+acum,y,dimArray[i],height);}else{ctx.fillRect(x,y-acum-dimArray[i],width,dimArray[i]);} -if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];} -acum+=(dimArray[i]||0);valAcum+=(valueArray[i]||0);} -if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;if(horz){ctx.strokeRect(x+opt.acum+1,y+1,opt.dimValue-2,height-2);}else{ctx.strokeRect(x+1,y-opt.acum-opt.dimValue+1,width-2,opt.dimValue-2);} -ctx.restore();} -if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';if(gvl){acumValueLabel=gvl;}else{acumValueLabel=valAcum;} -if(aggregates(node.name,valAcum)){if(!horz){ctx.textAlign='center';ctx.font=label.style+' '+label.size+'px '+label.family;ctx.save();gridHeight=canvasSize.height-(margin.top+margin.bottom+(config.Title.text?config.Title.size+config.Title.offset:0)+ -(config.Subtitle.text?config.Subtitle.size+config.Subtitle.offset:0)+ -(label?label.size+config.labelOffset:0));mtxt=ctx.measureText(acumValueLabel);boxWidth=mtxt.width+10;inset=10;boxHeight=label.size+6;if(boxHeight+acum+config.labelOffset>gridHeight){bottomPadding=acum-config.labelOffset-boxHeight;}else{bottomPadding=acum+config.labelOffset+inset;} -ctx.translate(x+width/2-(mtxt.width/2),y-bottomPadding);cornerRadius=4;boxX=-inset/2;boxY=-boxHeight/2;ctx.rotate(0*Math.PI/180);ctx.fillStyle="rgba(255,255,255,.8)";if(boxHeight+acum+config.labelOffset>gridHeight){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=ctx.strokeStyle=label.color;ctx.fillText(acumValueLabel,mtxt.width/2,0);ctx.restore();}} -if(showLabels(node.name,valAcum,node)){if(horz){ctx.font=label.style+' '+label.size+'px '+label.family;inset=10;gridWidth=canvasSize.width-(config.Margin.left+config.Margin.right);mtxt=ctx.measureText(node.name+": "+acumValueLabel);boxWidth=mtxt.width+10;inset=10;if(acum+boxWidth+config.labelOffset+inset>gridWidth){leftPadding=acum-config.labelOffset-boxWidth-inset;}else{leftPadding=acum+config.labelOffset;} -ctx.textAlign='left';ctx.translate(x+inset+leftPadding,y+height/2);boxHeight=label.size+6;boxX=-inset/2;boxY=-boxHeight/2;ctx.fillStyle="rgba(255,255,255,.8)";cornerRadius=4;if(acum+boxWidth+config.labelOffset+inset>gridWidth){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=label.color;ctx.rotate(0*Math.PI/180);ctx.fillText(node.name+": "+acumValueLabel,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}} -ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),config=node.getData('config'),rx=mpos.x-x,horz=config.orientation=='horizontal';if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y=intersec){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('barTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}} -return false;}},'barchart-grouped':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),valueLength=valueArray.length,colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,shadow=config.shadow,margin=config.Margin,fixedDim=(horz?height:width)/valueLength;maxValue=Math.max.apply(null,dimArray);ctx.fillStyle="rgba(0,0,0,.2)";if(colorArray&&dimArray&&stringArray&&shadow.enable){shadowThickness=shadow.size;for(var i=0,l=valueLength,acum=0,valAcum=0;idimArray[i]){ctx.fillRect((x-shadowThickness)+fixedDim*i,y-dimArray[i]-shadowThickness,fixedDim,dimArray[i]+shadowThickness);}else if(nextBar&&nextBar0&&idimArray[i]){ctx.fillRect((x-((prevBar>0;}));linear.addColorStop(0,color);linear.addColorStop(0.3,colorArray[i%colorLength]);linear.addColorStop(0.7,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} -if(horz){ctx.fillRect(x,y+fixedDim*i,dimArray[i],fixedDim);}else{ctx.fillRect(x+fixedDim*i,y-dimArray[i],fixedDim,dimArray[i]);} -if(border&&border.name==stringArray[i]){opt.acum=fixedDim*i;opt.dimValue=dimArray[i];} -acum+=(dimArray[i]||0);valAcum+=(valueArray[i]||0);ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;inset=10;if(aggregates(node.name,valAcum)&&label.type=='Native'){if(valuelabelArray[i]){acumValueLabel=valuelabelArray[i];}else{acumValueLabel=valueArray[i];} -if(horz){ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='left';ctx.textBaseline='top';ctx.fillStyle="rgba(255,255,255,.8)";gridWidth=canvasSize.width-(margin.left+margin.right+config.labeloffset+label.size);mtxt=ctx.measureText(acumValueLabel);boxWidth=mtxt.width+10;if(boxWidth+dimArray[i]+config.labelOffset>gridWidth){leftPadding=dimArray[i]-config.labelOffset-boxWidth-inset;}else{leftPadding=dimArray[i]+config.labelOffset+inset;} -boxHeight=label.size+6;boxX=x+leftPadding;boxY=y+i*fixedDim+(fixedDim/2)-boxHeight/2;cornerRadius=4;if(boxWidth+dimArray[i]+config.labelOffset>gridWidth){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=ctx.strokeStyle=label.color;ctx.fillText(acumValueLabel,x+inset/2+leftPadding,y+i*fixedDim+(fixedDim/2)-(label.size/2));}else{ctx.font=label.style+' '+label.size+'px '+label.family;ctx.save();ctx.textAlign='center';gridHeight=canvasSize.height-(margin.top+margin.bottom+(config.Title.text?config.Title.size+config.Title.offset:0)+ -(config.Subtitle.text?config.Subtitle.size+config.Subtitle.offset:0)+ -(label?label.size+config.labelOffset:0));mtxt=ctx.measureText(acumValueLabel);boxWidth=mtxt.width+10;boxHeight=label.size+6;if(boxHeight+dimArray[i]+config.labelOffset>gridHeight){bottomPadding=dimArray[i]-config.labelOffset-boxHeight-inset;}else{bottomPadding=dimArray[i]+config.labelOffset+inset;} -ctx.translate(x+(i*fixedDim)+(fixedDim/2),y-bottomPadding);boxX=-boxWidth/2;boxY=-boxHeight/2;ctx.fillStyle="rgba(255,255,255,.8)";cornerRadius=4;if(boxHeight+dimArray[i]+config.labelOffset>gridHeight){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=ctx.strokeStyle=label.color;ctx.fillText(acumValueLabel,0,0);ctx.restore();}}} -if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;if(horz){ctx.strokeRect(x+1,y+opt.acum+1,opt.dimValue-2,fixedDim-2);}else{ctx.strokeRect(x+opt.acum+1,y-opt.dimValue+1,fixedDim-2,opt.dimValue-2);} -ctx.restore();} -if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';if(showLabels(node.name,valAcum,node)){if(horz){ctx.textAlign='center';ctx.translate(x-config.labelOffset-label.size/2,y+height/2);ctx.rotate(Math.PI/2);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}} -ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),len=dimArray.length,config=node.getData('config'),rx=mpos.x-x,horz=config.orientation=='horizontal',fixedDim=(horz?height:width)/len;if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y=limit&&mpos.y<=limit+fixedDim){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'title':node.getData('titleArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('barTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}else{var limit=x+fixedDim*i;if(mpos.x>=limit&&mpos.x<=limit+fixedDim&&mpos.y>=y-dimi){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'title':node.getData('titleArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('barTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}} -return false;}},'barchart-basic':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),valueLength=valueArray.length,colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),canvasSize=canvas.getSize(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,fixedDim=(horz?height:width)/valueLength,margin=config.Margin;if(colorArray&&dimArray&&stringArray){for(var i=0,l=valueLength,acum=0,valAcum=0;i>0;}));linear.addColorStop(0,color);linear.addColorStop(0.3,colorArray[i%colorLength]);linear.addColorStop(0.7,colorArray[i%colorLength]);linear.addColorStop(1,color);ctx.fillStyle=linear;} -if(horz){ctx.fillRect(x,y+fixedDim*i,dimArray[i],fixedDim);}else{ctx.fillRect(x+fixedDim*i,y-dimArray[i],fixedDim,dimArray[i]);} -if(border&&border.name==stringArray[i]){opt.acum=fixedDim*i;opt.dimValue=dimArray[i];} -acum+=(dimArray[i]||0);valAcum+=(valueArray[i]||0);if(label.type=='Native'){ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;if(aggregates(node.name,valAcum)){if(valuelabelArray[i]){acumValueLabel=valuelabelArray[i];}else{acumValueLabel=valueArray[i];} -if(!horz){ctx.textAlign='center';ctx.font=label.style+' '+label.size+'px '+label.family;ctx.save();gridHeight=canvasSize.height-(margin.top+margin.bottom+(config.Title.text?config.Title.size+config.Title.offset:0)+ -(config.Subtitle.text?config.Subtitle.size+config.Subtitle.offset:0)+ -(label?label.size+config.labelOffset:0));mtxt=ctx.measureText(acumValueLabel);boxWidth=mtxt.width+10;inset=10;boxHeight=label.size+6;if(boxHeight+dimArray[i]+config.labelOffset>gridHeight){bottomPadding=dimArray[i]-config.labelOffset-inset;}else{bottomPadding=dimArray[i]+config.labelOffset+inset;} -ctx.translate(x+width/2-(mtxt.width/2),y-bottomPadding);cornerRadius=4;boxX=-inset/2;boxY=-boxHeight/2;ctx.fillStyle="rgba(255,255,255,.6)";if(boxHeight+dimArray[i]+config.labelOffset>gridHeight){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=ctx.strokeStyle=label.color;ctx.fillText(acumValueLabel,mtxt.width/2,0);ctx.restore();}}}} -if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;if(horz){ctx.strokeRect(x+1,y+opt.acum+1,opt.dimValue-2,fixedDim-2);}else{ctx.strokeRect(x+opt.acum+1,y-opt.dimValue+1,fixedDim-2,opt.dimValue-2);} -ctx.restore();} -if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';if(showLabels(node.name,valAcum,node)){if(horz){gridWidth=canvasSize.width-(config.Margin.left+config.Margin.right);mtxt=ctx.measureText(node.name+": "+valAcum);boxWidth=mtxt.width+10;inset=10;if(acum+boxWidth+config.labelOffset+inset>gridWidth){leftPadding=acum-config.labelOffset-boxWidth-inset;}else{leftPadding=acum+config.labelOffset;} -ctx.textAlign='left';ctx.translate(x+inset+leftPadding,y+height/2);boxHeight=label.size+6;boxX=-inset/2;boxY=-boxHeight/2;ctx.fillStyle="rgba(255,255,255,.8)";cornerRadius=4;if(acum+boxWidth+config.labelOffset+inset>gridWidth){$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill");} -ctx.fillStyle=label.color;ctx.fillText(node.name+": "+valAcum,0,0);}else{if(stringArray.length>8){ctx.textAlign='left';ctx.translate(x+width/2,y+label.size/2+config.labelOffset);ctx.rotate(45*Math.PI/180);ctx.fillText(node.name,0,0);}else{ctx.textAlign='center';ctx.fillText(node.name,x+width/2,y+label.size/2+config.labelOffset);}}} -ctx.restore();}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),config=node.getData('config'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),len=dimArray.length,rx=mpos.x-x,horz=config.orientation=='horizontal',fixedDim=(horz?height:width)/len;if(horz){if(mpos.xx+width||mpos.y>y+height||mpos.yx+width||mpos.y>y||mpos.y=limit&&mpos.y<=limit+fixedDim){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('groupTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}else{var limit=x+fixedDim*i;if(mpos.x>=limit&&mpos.x<=limit+fixedDim&&mpos.y>=y-dimi){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'percentage':((node.getData('valueArray')[i]/node.getData('groupTotalValue'))*100).toFixed(1),'link':url,'label':node.name};}}} -return false;}}});$jit.BarChart=new Class({st:null,colors:["#004b9c","#9c0079","#9c0033","#28009c","#9c0000","#7d009c","#001a9c","#00809c","#009c80","#009c42","#009c07","#469c00","#799c00","#9c9600","#9c5c00"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","Margin","Label","BarChart"),{Label:{type:'Native'}},opt);var showLabels=this.config.showLabels,typeLabels=$.type(showLabels),showAggregates=this.config.showAggregates,typeAggregates=$.type(showAggregates);this.config.showLabels=typeLabels=='function'?showLabels:$.lambda(showLabels);this.config.showAggregates=typeAggregates=='function'?showAggregates:$.lambda(showAggregates);Options.Fx.clearCanvas=false;this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0],horz=config.orientation=='horizontal',nodeLabels={};var st=new $jit.ST({injectInto:config.injectInto,orientation:horz?'left':'bottom',background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,levelDistance:0,nodeCount:config.nodeCount,siblingOffset:config.barsOffset,subtreeOffset:0,withLabels:config.Label.type!='Native',useCanvas:config.useCanvas,Label:{type:config.Label.type},Node:{overridable:true,type:'barchart-'+nodeType,align:'left',width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(call){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);},onMouseMove:function(node,eventInfo,evt){if(!config.hoveredColor)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label,valueArray=node.getData('valueArray'),acum=$.reduce(valueArray,function(x,y){return x+y;},0),grouped=config.type.split(':')[0]=='grouped',horz=config.orientation=='horizontal';var nlbs={wrapper:document.createElement('div'),aggregate:document.createElement('div'),label:document.createElement('div')};var wrapper=nlbs.wrapper,label=nlbs.label,aggregate=nlbs.aggregate,wrapperStyle=wrapper.style,labelStyle=label.style,aggregateStyle=aggregate.style;nodeLabels[node.id]=nlbs;wrapper.appendChild(label);wrapper.appendChild(aggregate);if(!config.showLabels(node.name,acum,node)){labelStyle.display='none';} -if(!config.showAggregates(node.name,acum,node)){aggregateStyle.display='none';} -wrapperStyle.position='relative';wrapperStyle.overflow='visible';wrapperStyle.fontSize=labelConf.size+'px';wrapperStyle.fontFamily=labelConf.family;wrapperStyle.color=labelConf.color;wrapperStyle.textAlign='center';aggregateStyle.position=labelStyle.position='absolute';domElement.style.width=node.getData('width')+'px';domElement.style.height=node.getData('height')+'px';aggregateStyle.left="0px";labelStyle.left=config.labelOffset+'px';labelStyle.whiteSpace="nowrap";label.innerHTML=node.name;domElement.appendChild(wrapper);},onPlaceLabel:function(domElement,node){if(!nodeLabels[node.id])return;var labels=nodeLabels[node.id],wrapperStyle=labels.wrapper.style,labelStyle=labels.label.style,aggregateStyle=labels.aggregate.style,grouped=config.type.split(':')[0]=='grouped',horz=config.orientation=='horizontal',dimArray=node.getData('dimArray'),valArray=node.getData('valueArray'),nodeCount=node.getData('nodeCount'),valueLength=valArray.length;valuelabelArray=node.getData('valuelabelArray'),stringArray=node.getData('stringArray'),width=(grouped&&horz)?Math.max.apply(null,dimArray):node.getData('width'),height=(grouped&&!horz)?Math.max.apply(null,dimArray):node.getData('height'),font=parseInt(wrapperStyle.fontSize,10),domStyle=domElement.style,fixedDim=(horz?height:width)/valueLength;if(dimArray&&valArray){wrapperStyle.width=aggregateStyle.width=labelStyle.width=domElement.style.width=width+'px';aggregateStyle.width=width-config.labelOffset+"px";for(var i=0,l=valArray.length,acum=0;i0){acum+=valArray[i];}} -if(config.showLabels(node.name,acum,node)){labelStyle.display='';}else{labelStyle.display='none';} -if(config.showAggregates(node.name,acum,node)){aggregateStyle.display='';}else{aggregateStyle.display='none';} -if(config.orientation=='horizontal'){aggregateStyle.textAlign='right';labelStyle.textAlign='left';labelStyle.textIndex=aggregateStyle.textIndent=config.labelOffset+'px';aggregateStyle.top=labelStyle.top=(height-font)/2+'px';domElement.style.height=wrapperStyle.height=height+'px';}else{aggregateStyle.top=(-font-config.labelOffset)+'px';labelStyle.top=(config.labelOffset+height)+'px';domElement.style.top=parseInt(domElement.style.top,10)-height+'px';domElement.style.height=wrapperStyle.height=height+'px';if(stringArray.length>8){labels.label.className="rotatedLabelReverse";labelStyle.textAlign="left";labelStyle.top=config.labelOffset+height+width/2+"px";}} -if(horz){labels.label.innerHTML=labels.label.innerHTML+": "+acum;labels.aggregate.innerHTML="";}else{if(grouped){maxValue=Math.max.apply(null,dimArray);for(var i=0,l=valArray.length,acum=0,valAcum=0;i40)?40:fixedDim;whiteSpace=size.width-(marginWidth+(fixedDim*l));if(!grouped&&!horz){st.config.siblingOffset=whiteSpace/(l+1);} -if(horz){st.config.offsetX=size.width/2-margin.left-(grouped&&config.Label?config.labelOffset+config.Label.size:0);if(config.Ticks.enable){st.config.offsetY=((margin.bottom+config.Label.size+config.labelOffset+(subtitle.text?subtitle.size+subtitle.offset:0))-(margin.top+(title.text?title.size+title.offset:0)))/2;}else{st.config.offsetY=(margin.bottom-margin.top-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0))/2;}}else{st.config.offsetY=-size.height/2+margin.bottom -+(config.showLabels&&(config.labelOffset+config.Label.size))+(subtitle.text?subtitle.size+subtitle.offset:0);if(config.Ticks.enable){st.config.offsetX=((margin.right-config.Label.size-config.labelOffset)-margin.left)/2;}else{st.config.offsetX=(margin.right-margin.left)/2;}} -this.st=st;this.canvas=this.st.canvas;},renderTitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,title=config.Title;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.font=label.style+' bold '+' '+title.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(title.text,-size.width/2+margin.left,-size.height/2+margin.top);}},renderSubtitle:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,subtitle=config.Subtitle;ctx=canvas.getCtx();ctx.fillStyle=title.color;ctx.textAlign='left';ctx.font=label.style+' '+subtitle.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(subtitle.text,-size.width/2+margin.left,size.height/2-margin.bottom-subtitle.size);}},renderScrollNote:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,label=config.Label,note=config.ScrollNote;ctx=canvas.getCtx();ctx.fillStyle=title.color;title=config.Title;ctx.textAlign='center';ctx.font=label.style+' bold '+' '+note.size+'px '+label.family;if(label.type=='Native'){ctx.fillText(note.text,0,-size.height/2+margin.top+title.size);}},renderTicks:function(){var canvas=this.canvas,size=canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,label=config.Label,shadow=config.shadow;horz=config.orientation=='horizontal',maxValue=this.getMaxValue(),maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} -grouped=config.type.split(':')[0]=='grouped',labelValue=0,labelIncrement=maxTickValue/ticks.segments,ctx=canvas.getCtx();ctx.strokeStyle=ticks.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textAlign='center';ctx.textBaseline='middle';idLabel=canvas.id+"-label";labelDim=100;container=document.getElementById(idLabel);if(horz){var axis=-(size.width/2)+margin.left+(grouped&&config.Label?config.labelOffset+label.size:0),grid=size.width-(margin.left+margin.right+(grouped&&config.Label?config.labelOffset+label.size:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(axis,(size.height/2)-margin.bottom-config.labelOffset-label.size-(subtitle.text?subtitle.size+subtitle.offset:0)+(shadow.enable?shadow.size:0),size.width-margin.left-margin.right-(grouped&&config.Label?config.labelOffset+label.size:0),1);while(axis<=grid){ctx.fillStyle=ticks.color;lineHeight=size.height-margin.bottom-margin.top-config.labelOffset-label.size-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0);ctx.fillRect(Math.round(axis),-(size.height/2)+margin.top+(title.text?title.size+title.offset:0)-(shadow.enable?shadow.size:0),1,lineHeight+(shadow.enable?shadow.size*2:0));ctx.fillStyle=label.color;if(label.type=='Native'&&config.showLabels){ctx.fillText(labelValue,Math.round(axis),-(size.height/2)+margin.top+(title.text?title.size+title.offset:0)+config.labelOffset+lineHeight+label.size);} -axis+=segmentLength;labelValue+=labelIncrement;}}else{var axis=(size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),htmlOrigin=size.height-(margin.bottom+config.labelOffset+label.size+(subtitle.text?subtitle.size+subtitle.offset:0)),grid=-size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)),segmentLength=grid/ticks.segments;ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1,-(size.height/2)+margin.top+(title.text?title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text?title.size+title.offset:0)-(subtitle.text?subtitle.size+subtitle.offset:0));while(axis>=grid){ctx.save();ctx.translate(-(size.width/2)+margin.left,Math.round(axis));ctx.rotate(0*Math.PI/180);ctx.fillStyle=label.color;if(config.showLabels){if(label.type=='Native'){ctx.fillText(labelValue,0,0);}else{labelDiv=document.createElement('div');labelDiv.innerHTML=labelValue;labelDiv.className="rotatedLabel";labelDiv.style.top=(htmlOrigin-(labelDim/2))+"px";labelDiv.style.left=margin.left+"px";labelDiv.style.width=labelDim+"px";labelDiv.style.height=labelDim+"px";labelDiv.style.textAlign="center";labelDiv.style.verticalAlign="middle";labelDiv.style.position="absolute";container.appendChild(labelDiv);}} -ctx.restore();ctx.fillStyle=ticks.color;ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size,Math.round(axis),size.width-margin.right-margin.left-config.labelOffset-label.size,1);htmlOrigin+=segmentLength;axis+=segmentLength;labelValue+=labelIncrement;}}},renderBackground:function(){var canvas=this.canvas,config=this.config,backgroundColor=config.backgroundColor,size=canvas.getSize(),ctx=canvas.getCtx();ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);},loadJSON:function(json){if(this.busy)return;this.busy=true;var prefix=$.time(),ch=[],st=this.st,name=$.splat(json.label),color=$.splat(json.color||this.colors),config=this.config,gradient=!!config.type.split(":")[1],renderBackground=config.renderBackground,animate=config.animate,ticks=config.Ticks,title=config.Title,note=config.ScrollNote,subtitle=config.Subtitle,horz=config.orientation=='horizontal',that=this,colorLength=color.length,nameLength=name.length;groupTotalValue=0;for(var i=0,values=json.values,l=values.length;iacum?maxValue:acum;});return maxValue;},setBarType:function(type){this.config.type=type;this.st.config.Node.type='barchart-'+type.split(':')[0];},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,ticks=config.Ticks,title=config.Title,subtitle=config.Subtitle,grouped=config.type.split(':')[0]=='grouped',marginWidth=margin.left+margin.right+(config.Label&&grouped?config.Label.size+config.labelOffset:0),marginHeight=(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)+margin.top+margin.bottom,horz=config.orientation=='horizontal',fixedDim=(size[horz?'height':'width']-(horz?marginHeight:marginWidth)-(ticks.enable?config.Label.size+config.labelOffset:0)-(l-1)*config.barsOffset)/l,animate=config.animate,height=size[horz?'width':'height']-(horz?marginWidth:marginHeight) --((config.showLabels&&!horz)?(config.Label.size+config.labelOffset):0),dim1=horz?'height':'width',dim2=horz?'width':'height',basic=config.type.split(':')[0]=='basic';var maxTickValue=Math.ceil(maxValue*.1)*10;if(maxTickValue==maxValue){var length=maxTickValue.toString().length;maxTickValue=maxTickValue+parseInt(pad(1,length));} -fixedDim=fixedDim>40?40:fixedDim;this.st.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(0);});if(grouped){fixedDim=animateValue.length*40;} -n.setData(dim1,fixedDim);if(animate){n.setData(dim2,acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{if(ticks.enable){n.setData(dim2,acum*height/maxTickValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxTickValue;}));}else{n.setData(dim2,acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}));}}});}});Options.FunnelChart={$extend:true,animate:true,type:'stacked',labelOffset:3,barsOffset:0,hoveredColor:'#9fd4ff',orientation:'vertical',showAggregates:true,showLabels:true,Tips:{enable:false,onShow:$.empty,onHide:$.empty},Events:{enable:false,onClick:$.empty}};$jit.ST.Plot.NodeTypes.implement({'funnelchart-basic':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,size=canvas.getSize(),labelOffset=config.labelOffset+10;minWidth=width*.25;ratio=.65;if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var topWidth=minWidth+((acum+dimArray[i])*ratio);var bottomWidth=minWidth+((acum)*ratio);var bottomWidthLabel=minWidth+((acum+labelOffsetHeight)*ratio);var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]>0;});linear.addColorStop(0,'rgba('+color+',1)');linear.addColorStop(0.5,'rgba('+colorRgb+',1)');linear.addColorStop(1,'rgba('+color+',1)');ctx.fillStyle=linear;} -ctx.beginPath();ctx.moveTo(-topWidth/2,y-acum-dimArray[i]);ctx.lineTo(topWidth/2,y-acum-dimArray[i]);ctx.lineTo(bottomWidth/2,y-acum);ctx.lineTo(-bottomWidth/2,y-acum);ctx.closePath();ctx.fill();if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];} -if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;ctx.restore();} -if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';acumValueLabel=valAcum;if(showLabels(node.name,valAcum,node)){ctx.textAlign='left';ctx.fillText(stringArray[i],(bottomWidthLabel/2)+labelOffset+labelOffsetRight,y-acum-labelOffsetHeight-label.size/2);ctx.textAlign='right';ctx.fillText(valuelabelArray[i],(-bottomWidthLabel/2)-labelOffset-labelOffsetLeft,y-acum-labelOffsetHeight-label.size/2);} -ctx.restore();} -acum+=(dimArray[i]||0);valAcum+=(valueArray[i]||0);}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),config=node.getData('config'),st=node.getData('st'),rx=mpos.x-x,horz=config.orientation=='horizontal',minWidth=width*.25;ratio=.65,canvas=node.getData('canvas'),size=canvas.getSize(),offsetY=st.config.offsetY;if(mpos.y>y||mpos.yboundRight){return false;} -for(var i=0,l=dimArray.length,acum=(horz?x:y);i=intersec){return{'name':node.getData('stringArray')[i],'color':node.getData('colorArray')[i],'value':node.getData('valueArray')[i],'percentage':node.getData('percentageArray')[i],'valuelabel':node.getData('valuelabelArray')[i],'link':url,'label':node.name};}} -return false;}}});$jit.FunnelChart=new Class({st:null,colors:["#004b9c","#9c0079","#9c0033","#28009c","#9c0000","#7d009c","#001a9c","#00809c","#009c80","#009c42","#009c07","#469c00","#799c00","#9c9600","#9c5c00"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","Margin","Label","BarChart"),{Label:{type:'Native'}},opt);var showLabels=this.config.showLabels,typeLabels=$.type(showLabels),showAggregates=this.config.showAggregates,typeAggregates=$.type(showAggregates);this.config.showLabels=typeLabels=='function'?showLabels:$.lambda(showLabels);this.config.showAggregates=typeAggregates=='function'?showAggregates:$.lambda(showAggregates);Options.Fx.clearCanvas=false;this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0],horz=config.orientation=='horizontal',nodeLabels={};var st=new $jit.ST({injectInto:config.injectInto,orientation:horz?'left':'bottom',levelDistance:0,background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,siblingOffset:config.segmentOffset,subtreeOffset:0,withLabels:config.Label.type!='Native',useCanvas:config.useCanvas,Label:{type:config.Label.type},Node:{overridable:true,type:'funnelchart-'+nodeType,align:'left',width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(call){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);},onMouseMove:function(node,eventInfo,evt){if(!config.hoveredColor)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label,valueArray=node.getData('valueArray'),idArray=node.getData('idArray'),valuelabelArray=node.getData('valuelabelArray'),stringArray=node.getData('stringArray');size=st.canvas.getSize() -prefix=$.time();for(var i=0,l=valueArray.length;iacum?maxValue:acum;});return maxValue;},setBarType:function(type){this.config.type=type;this.st.config.Node.type='funnelchart-'+type.split(':')[0];},normalizeDims:function(){var root=this.st.graph.getNode(this.st.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,size=this.st.canvas.getSize(),config=this.config,margin=config.Margin,title=config.Title,subtitle=config.Subtitle,marginWidth=margin.left+margin.right,marginHeight=(title.text?title.size+title.offset:0)+(subtitle.text?subtitle.size+subtitle.offset:0)+margin.top+margin.bottom,horz=config.orientation=='horizontal',animate=config.animate,height=size[horz?'width':'height']-(horz?marginWidth:marginHeight) --(config.showLabels&&(config.Label.size+config.labelOffset)),dim1=horz?'height':'width',dim2=horz?'width':'height';minWidth=size.width/8;this.st.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(0);});n.setData(dim1,minWidth);if(animate){n.setData(dim2,acum*height/maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData(dim2,acum*height/maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height/maxValue;}));}});}});Options.PieChart={$extend:true,animate:true,offset:25,sliceOffset:0,labelOffset:3,type:'stacked',labelType:'name',hoveredColor:'#9fd4ff',Events:{enable:false,onClick:$.empty},Tips:{enable:false,onShow:$.empty,onHide:$.empty},showLabels:true,resizeLabels:false,updateHeights:false};Layouts.Radial=new Class({compute:function(property){var prop=$.splat(property||['current','start','end']);NodeDim.compute(this.graph,prop,this.config);this.graph.computeLevels(this.root,0,"ignore");var lengthFunc=this.createLevelDistanceFunc();this.computeAngularWidths(prop);this.computePositions(prop,lengthFunc);},computePositions:function(property,getLength){var propArray=property;var graph=this.graph;var root=graph.getNode(this.root);var parent=this.parent;var config=this.config;for(var i=0,l=propArray.length;imaxDim[pi]?dim:maxDim[pi]):dim;} -subnodes.push(sib);},"ignore");if(parent&&parent.id==elem.id&&subnodes.length>0&&subnodes[0].dist){subnodes.sort(function(a,b){return(a.dist>=b.dist)-(a.dist<=b.dist);});} -for(var k=0,ls=subnodes.length;kpi/2&&p.theta<3*pi/2);var thetap=cond?p.theta+pi:p.theta;if(cond){x-=Math.abs(Math.cos(p.theta)*measure.width);y+=Math.sin(p.theta)*measure.width;}else if(node.id==this.viz.root){x-=measure.width/2;}} -ctx.save();ctx.translate(x,y);ctx.rotate(thetap);ctx.fillText(node.name,0,0);ctx.restore();}});Sunburst.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),viz=this.viz,canvas=this.viz.canvas;var radius=canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+radius.height/2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);var bb=tag.getBBox();if(bb){var x=tag.getAttribute('x');var y=tag.getAttribute('y');var p=node.pos.getp(true);var pi=Math.PI;var cond=(p.theta>pi/2&&p.theta<3*pi/2);if(cond){tag.setAttribute('x',x-bb.width);tag.setAttribute('y',y-bb.height);}else if(node.id==viz.root){tag.setAttribute('x',x-bb.width/2);} -var thetap=cond?p.theta+pi:p.theta;if(node._depth) -tag.setAttribute('transform','rotate('+thetap*360/(2*pi)+' '+x -+' '+y+')');} -controller.onPlaceLabel(tag,node);}});Sunburst.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.clone(),canvas=this.viz.canvas,height=node.getData('height'),ldist=((height||node._depth==0)?height:this.viz.config.levelDistance)/2,radius=canvas.getSize();pos.rho+=ldist;pos=pos.getc(true);var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+radius.height/2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});Sunburst.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false),'anglecontains':function(node,pos){var span=node.getData('span')/2,theta=node.pos.theta;var begin=theta-span,end=theta+span;if(begin<0) -begin+=Math.PI*2;var atan=Math.atan2(pos.y,pos.x);if(atan<0) -atan+=Math.PI*2;if(begin>end){return(atan>begin&&atan<=Math.PI*2)||atanbegin&&atanend){return(atan>begin&&atan<=Math.PI*2)||atanbegin&&atan=ld*d)&&(rho<=(ld*d+ldist));} -return false;}},'gradient-multipie':{'render':function(node,canvas){var ctx=canvas.getCtx();var height=node.getData('height');var ldist=height?height:this.config.levelDistance;var radialGradient=ctx.createRadialGradient(0,0,node.getPos().rho,0,0,node.getPos().rho+ldist);var colorArray=$.hexToRgb(node.getData('color')),ans=[];$.each(colorArray,function(i){ans.push(parseInt(i*0.5,10));});var endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,endColor);radialGradient.addColorStop(1,node.getData('color'));ctx.fillStyle=radialGradient;this.nodeTypes['multipie'].render.call(this,node,canvas);},'contains':function(node,pos){return this.nodeTypes['multipie'].contains.call(this,node,pos);}},'gradient-pie':{'render':function(node,canvas){var ctx=canvas.getCtx();var radialGradient=ctx.createRadialGradient(0,0,0,0,0,node.getPos().rho);var colorArray=$.hexToRgb(node.getData('color')),ans=[];$.each(colorArray,function(i){ans.push(parseInt(i*0.5,10));});var endColor=$.rgbToHex(ans);radialGradient.addColorStop(1,endColor);radialGradient.addColorStop(0,node.getData('color'));ctx.fillStyle=radialGradient;this.nodeTypes['pie'].render.call(this,node,canvas);},'contains':function(node,pos){return this.nodeTypes['pie'].contains.call(this,node,pos);}}});Sunburst.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);this.edgeHelper.line.render(from,to,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.line.contains(from,to,pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}},'hyperline':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(),to=adj.nodeTo.pos.getc(),dim=Math.max(from.norm(),to.norm());this.edgeHelper.hyperline.render(from.$scale(1/dim),to.$scale(1/dim),dim,canvas);},'contains':$.lambda(false)}});})($jit.Sunburst);$jit.Sunburst.Plot.NodeTypes.implement({'piechart-stacked':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),span=node.getData('span')/2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=config.sliceOffset*Math.cos((begin+end)/2);var ypos=config.sliceOffset*Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,colori);radialGradient.addColorStop(0.5,colori);radialGradient.addColorStop(1,endColor);ctx.fillStyle=radialGradient;} -polar.rho=acum+config.sliceOffset;polar.theta=begin;var p1coord=polar.getc(true);polar.theta=end;var p2coord=polar.getc(true);polar.rho+=dimi;var p3coord=polar.getc(true);polar.theta=begin;var p4coord=polar.getc(true);ctx.beginPath();ctx.arc(xpos,ypos,acum+.01,begin,end,false);ctx.arc(xpos,ypos,acum+dimi+.01,end,begin,true);ctx.fill();if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];opt.begin=begin;opt.end=end;} -acum+=(dimi||0);valAcum+=(valueArray[i]||0);} -if(border){ctx.save();ctx.globalCompositeOperation="source-over";ctx.lineWidth=2;ctx.strokeStyle=border.color;var s=begin>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;ctx.font=label.style+' '+fontSize+'px '+label.family;ctx.textBaseline='middle';ctx.textAlign='center';polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=node.pos.theta;var cart=polar.getc(true);ctx.fillText(node.name,cart.x,cart.y);ctx.restore();}}},'contains':function(node,pos){if(this.nodeTypes['none'].anglecontains.call(this,node,pos)){var rho=Math.sqrt(pos.x*pos.x+pos.y*pos.y);var ld=this.config.levelDistance,d=node._depth;var config=node.getData('config');if(rho<=ld*d+config.sliceOffset){var dimArray=node.getData('dimArray');for(var i=0,l=dimArray.length,acum=config.sliceOffset;i=acum&&rho<=acum+dimi){return{name:node.getData('stringArray')[i],color:node.getData('colorArray')[i],value:node.getData('valueArray')[i],label:node.name};} -acum+=dimi;}} -return false;} -return false;}},'piechart-basic':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),percentage=node.getData('percentage'),span=node.getData('span')/2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=config.sliceOffset*Math.cos((begin+end)/2);var ypos=config.sliceOffset*Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor2=$.map(colorRgb,function(i){return(i*0.7)>>0;});radialGradient.addColorStop(0,'rgba('+colorRgb+',1)');radialGradient.addColorStop(.7,'rgba('+colorRgb+',1)');radialGradient.addColorStop(.98,'rgba('+endColor+',1)');radialGradient.addColorStop(1,'rgba('+endColor2+',1)');ctx.fillStyle=radialGradient;}} -ctx.beginPath();ctx.arc(xpos,ypos,acum+.01,begin,end,false);ctx.arc(xpos,ypos,acum+dimi+.01,end,begin,true);ctx.fill();if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];opt.begin=begin;opt.end=end;opt.sliceValue=valueArray[i];} -acum+=(dimi||0);valAcum+=(valueArray[i]||0);} -if(border){ctx.save();ctx.globalCompositeOperation="source-over";ctx.lineWidth=2;ctx.strokeStyle=border.color;var s=begin>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;ctx.font=label.style+' '+fontSize+'px '+label.family;ctx.textBaseline='middle';ctx.textAlign='center';pi=Math.PI;angle=theta*360/(2*pi);polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=node.pos.theta;var cart=polar.getc(true);if(((angle>=225&&angle<=315)||(angle<=135&&angle>=45))&&percentage<=5){}else{if(config.labelType=='name'){ctx.fillText(node.name,cart.x,cart.y);}else{ctx.fillText(node.data.valuelabel,cart.x,cart.y);}} -ctx.restore();}}},'contains':function(node,pos){if(this.nodeTypes['none'].anglecontains.call(this,node,pos)){var rho=Math.sqrt(pos.x*pos.x+pos.y*pos.y);var ld=this.config.levelDistance,d=node._depth;var config=node.getData('config');if(rho<=ld*d+config.sliceOffset){var dimArray=node.getData('dimArray');for(var i=0,l=dimArray.length,acum=config.sliceOffset;i=acum&&rho<=acum+dimi){var url=Url.decode(node.getData('linkArray')[i]);return{name:node.getData('stringArray')[i],link:url,color:node.getData('colorArray')[i],value:node.getData('valueArray')[i],percentage:node.getData('percentage'),valuelabel:node.getData('valuelabelsArray')[i],label:node.name};} -acum+=dimi;}} -return false;} -return false;}}});$jit.PieChart=new Class({sb:null,colors:["#416D9C","#70A35E","#EBB056","#C74243","#83548B","#909291","#557EAA"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","PieChart","Label"),{Label:{type:'Native'}},opt);this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0];var sb=new $jit.Sunburst({injectInto:config.injectInto,useCanvas:config.useCanvas,withLabels:config.Label.type!='Native',background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,Label:{type:config.Label.type},Node:{overridable:true,type:'piechart-'+nodeType,width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);},onMouseMove:function(node,eventInfo,evt){if(!config.hoveredColor)return;if(node){var elem=eventInfo.getContains();that.select(node.id,elem.name,elem.index);}else{that.select(false,false,false);}}},onCreateLabel:function(domElement,node){var labelConf=config.Label;if(config.showLabels){var style=domElement.style;style.fontSize=labelConf.size+'px';style.fontFamily=labelConf.family;style.color=labelConf.color;style.textAlign='center';if(config.labelType=='name'){domElement.innerHTML=node.name;}else{domElement.innerHTML=(node.data.valuelabel!=undefined)?node.data.valuelabel:"";} -domElement.style.width='400px';}},onPlaceLabel:function(domElement,node){if(!config.showLabels)return;var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),span=node.getData('span')/2,theta=node.pos.theta,begin=theta-span,end=theta+span,polar=new Polar;var showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;if(dimArray){for(var i=0,l=dimArray.length,acum=0;i>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;domElement.style.fontSize=fontSize+'px';polar.rho=acum+config.labelOffset+config.sliceOffset;polar.theta=(begin+end)/2;var pos=polar.getc(true);var radius=that.canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+radius.height/2)};domElement.style.left=(labelPos.x-200)+'px';domElement.style.top=labelPos.y+'px';}}});var size=sb.canvas.getSize(),min=Math.min;sb.config.levelDistance=min(size.width,size.height)/2 --config.offset-config.sliceOffset;this.sb=sb;this.canvas=this.sb.canvas;this.canvas.getCtx().globalCompositeOperation='lighter';},renderBackground:function(){var canvas=this.canvas,config=this.config,backgroundColor=config.backgroundColor,size=canvas.getSize(),ctx=canvas.getCtx();ctx.globalCompositeOperation="destination-over";ctx.fillStyle=backgroundColor;ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height);},loadJSON:function(json){var prefix=$.time(),ch=[],sb=this.sb,name=$.splat(json.label),nameLength=name.length,color=$.splat(json.color||this.colors),colorLength=color.length,config=this.config,renderBackground=config.renderBackground,gradient=!!config.type.split(":")[1],animate=config.animate,mono=nameLength==1;totalValue=0;for(var i=0,values=json.values,l=values.length;iacum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.sb.graph.getNode(this.sb.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,config=this.config,animate=config.animate,rho=this.sb.config.levelDistance;this.sb.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(1);});var stat=(animateValue.length==1)&&!config.updateHeights;if(animate){n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}));} -n.setData('normalizedDim',acum/maxValue);});}});Options.GaugeChart={$extend:true,animate:true,offset:25,sliceOffset:0,labelOffset:3,type:'stacked',labelType:'name',hoveredColor:'#9fd4ff',Events:{enable:false,onClick:$.empty},Tips:{enable:false,onShow:$.empty,onHide:$.empty},showLabels:true,resizeLabels:false,updateHeights:false};$jit.Sunburst.Plot.NodeTypes.implement({'gaugechart-basic':{'render':function(node,canvas){var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelsArray=node.getData('valuelabelsArray'),gaugeTarget=node.getData('gaugeTarget'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),colorArray=node.getData('colorMono'),colorLength=colorArray.length,stringArray=node.getData('stringArray'),span=node.getData('span')/2,theta=node.pos.theta,begin=((theta-span)/2)+Math.PI,end=((theta+span)/2)+Math.PI,polar=new Polar;var ctx=canvas.getCtx(),opt={},gradient=node.getData('gradient'),border=node.getData('border'),config=node.getData('config'),showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label;var xpos=Math.cos((begin+end)/2);var ypos=Math.sin((begin+end)/2);if(colorArray&&dimArray&&stringArray&&gaugeTarget!=0){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i>0;}),endColor=$.rgbToHex(ans);radialGradient.addColorStop(0,'rgba('+colorRgb+',1)');radialGradient.addColorStop(0.1,'rgba('+colorRgb+',1)');radialGradient.addColorStop(0.85,'rgba('+colorRgb+',1)');radialGradient.addColorStop(1,'rgba('+ans+',1)');ctx.fillStyle=radialGradient;} -polar.rho=acum;polar.theta=begin;var p1coord=polar.getc(true);polar.theta=end;var p2coord=polar.getc(true);polar.rho+=dimi;var p3coord=polar.getc(true);polar.theta=begin;var p4coord=polar.getc(true);ctx.beginPath();ctx.arc(xpos,(ypos+dimi/2),(acum+dimi+.01)*.8,begin,end,false);ctx.arc(xpos,(ypos+dimi/2),(acum+dimi+.01),end,begin,true);ctx.fill();acum+=(dimi||0);valAcum+=(valueArray[i]||0);} -if(showLabels&&label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='bottom';ctx.textAlign='center';polar.rho=acum*.65;polar.theta=begin;var cart=polar.getc(true);if(nodeIteration==1){textY=cart.y-(label.size/2)+acum/2;}else{textY=cart.y+acum/2;} -if(config.labelType=='name'){ctx.fillText(node.name,cart.x,textY);}else{ctx.fillText(valuelabelsArray[0],cart.x,textY);} -if(nodeIteration==nodeLength){polar.theta=end;var cart=polar.getc(true);if(config.labelType=='name'){ctx.fillText(node.name,cart.x,cart.x,cart.y-(label.size/2)+acum/2);}else{ctx.fillText(valuelabelsArray[1],cart.x,cart.y-(label.size/2)+acum/2);}} -ctx.restore();}}},'contains':function(node,pos){if(this.nodeTypes['none'].anglecontainsgauge.call(this,node,pos)){var config=node.getData('config');var ld=this.config.levelDistance,d=node._depth;var yOffset=pos.y-(ld/2);var xOffset=pos.x;var rho=Math.sqrt(xOffset*xOffset+yOffset*yOffset);if(rho<=parseInt(ld*d)){var dimArray=node.getData('dimArray');for(var i=0,l=dimArray.length,acum=config.sliceOffset;i=ld*.8&&rho<=acum+dimi){var url=Url.decode(node.getData('linkArray')[i]);return{name:node.getData('stringArray')[i],link:url,color:node.getData('colorArray')[i],value:node.getData('valueArray')[i],valuelabel:node.getData('valuelabelsArray')[0]+" - "+node.getData('valuelabelsArray')[1],label:node.name};} -acum+=dimi;}} -return false;} -return false;}}});$jit.GaugeChart=new Class({sb:null,colors:["#416D9C","#70A35E","#EBB056","#C74243","#83548B","#909291","#557EAA"],selected:{},busy:false,initialize:function(opt){this.controller=this.config=$.merge(Options("Canvas","GaugeChart","Label"),{Label:{type:'Native'}},opt);this.initializeViz();},initializeViz:function(){var config=this.config,that=this;var nodeType=config.type.split(":")[0];var sb=new $jit.Sunburst({injectInto:config.injectInto,useCanvas:config.useCanvas,withLabels:config.Label.type!='Native',background:config.background,renderBackground:config.renderBackground,backgroundColor:config.backgroundColor,colorStop1:config.colorStop1,colorStop2:config.colorStop2,Label:{type:config.Label.type},Node:{overridable:true,type:'gaugechart-'+nodeType,width:1,height:1},Edge:{type:'none'},Tips:{enable:config.Tips.enable,type:'Native',force:true,onShow:function(tip,node,contains){var elem=contains;config.Tips.onShow(tip,elem,node);if(elem.link!='undefined'&&elem.link!=''){document.body.style.cursor='pointer';}},onHide:function(){document.body.style.cursor='default';}},Events:{enable:true,type:'Native',onClick:function(node,eventInfo,evt){if(!config.Events.enable)return;var elem=eventInfo.getContains();config.Events.onClick(elem,eventInfo,evt);}},onCreateLabel:function(domElement,node){var labelConf=config.Label;if(config.showLabels){var style=domElement.style;style.fontSize=labelConf.size+'px';style.fontFamily=labelConf.family;style.color=labelConf.color;style.textAlign='center';valuelabelsArray=node.getData('valuelabelsArray'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),canvas=sb.canvas,prefix=$.time();if(config.labelType=='name'){domElement.innerHTML=node.name;}else{domElement.innerHTML=(valuelabelsArray[0]!=undefined)?valuelabelsArray[0]:"";} -domElement.style.width='400px';if(nodeIteration==nodeLength&&nodeLength!=0){idLabel=canvas.id+"-label";container=document.getElementById(idLabel);finalLabel=document.createElement('div');finalLabelStyle=finalLabel.style;finalLabel.id=prefix+"finalLabel";finalLabelStyle.position="absolute";finalLabelStyle.width="400px";finalLabelStyle.left="0px";container.appendChild(finalLabel);if(config.labelType=='name'){finalLabel.innerHTML=node.name;}else{finalLabel.innerHTML=(valuelabelsArray[1]!=undefined)?valuelabelsArray[1]:"";}}}},onPlaceLabel:function(domElement,node){if(!config.showLabels)return;var pos=node.pos.getp(true),dimArray=node.getData('dimArray'),nodeIteration=node.getData('nodeIteration'),nodeLength=node.getData('nodeLength'),span=node.getData('span')/2,theta=node.pos.theta,begin=((theta-span)/2)+Math.PI,end=((theta+span)/2)+Math.PI,polar=new Polar;var showLabels=config.showLabels,resizeLabels=config.resizeLabels,label=config.Label,radiusOffset=sb.config.levelDistance;if(dimArray){for(var i=0,l=dimArray.length,acum=0;i>0;fontSize=fontSize<+resizeLabels?+resizeLabels:fontSize;domElement.style.fontSize=fontSize+'px';polar.rho=acum*.65;polar.theta=begin;var pos=polar.getc(true);var radius=that.canvas.getSize();var labelPos={x:Math.round(pos.x+radius.width/2),y:Math.round(pos.y+(radius.height/2)+radiusOffset/2)};domElement.style.left=(labelPos.x-200)+'px';domElement.style.top=labelPos.y+'px';if(nodeIteration==1){domElement.style.top=labelPos.y-label.size+'px';} -if(nodeIteration==nodeLength&&nodeLength!=0){polar.theta=end;var final=polar.getc(true);var finalPos={x:Math.round(final.x+radius.width/2),y:Math.round(final.y+(radius.height/2)+radiusOffset/2)};finalLabel.style.left=(finalPos.x-200)+"px";finalLabel.style.top=finalPos.y-label.size+"px";}}}});this.sb=sb;this.canvas=this.sb.canvas;var size=sb.canvas.getSize(),min=Math.min;sb.config.levelDistance=min(size.width,size.height)/2 --config.offset-config.sliceOffset;},renderBackground:function(){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance,startAngle=(Math.PI/180)*1,endAngle=(Math.PI/180)*179;ctx.fillStyle=style.borderColor;ctx.beginPath();ctx.arc(0,radius/2,radius+4,startAngle,endAngle,true);ctx.fill();var radialGradient=ctx.createRadialGradient(0,radius/2,0,0,radius/2,radius);radialGradient.addColorStop(0,'#ffffff');radialGradient.addColorStop(0.3,style.backgroundColor);radialGradient.addColorStop(0.6,style.backgroundColor);radialGradient.addColorStop(1,'#FFFFFF');ctx.fillStyle=radialGradient;startAngle=(Math.PI/180)*0;endAngle=(Math.PI/180)*180;ctx.beginPath();ctx.arc(0,radius/2,radius,startAngle,endAngle,true);ctx.fill();},renderNeedle:function(gaugePosition,target){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance;gaugeCenter=(radius/2);startAngle=0;endAngle=(Math.PI/180)*180;ctx.fillStyle=style.needleColor;var segments=180/target;needleAngle=gaugePosition*segments;ctx.translate(0,gaugeCenter);ctx.save();ctx.rotate(needleAngle*Math.PI/180);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,-4);ctx.lineTo(-radius*.9,-1);ctx.lineTo(-radius*.9,1);ctx.lineTo(0,4);ctx.lineTo(0,0);ctx.closePath();ctx.fill();ctx.restore();ctx.lineWidth=1;ctx.strokeStyle='#aa0000';ctx.save();ctx.rotate(needleAngle*Math.PI/180);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,-4);ctx.lineTo(-radius*.8,-1);ctx.lineTo(-radius*.8,1);ctx.lineTo(0,4);ctx.lineTo(0,0);ctx.closePath();ctx.stroke();ctx.restore();ctx.fillStyle="#000000";ctx.lineWidth=style.borderSize;ctx.strokeStyle=style.borderColor;var radialGradient=ctx.createRadialGradient(0,style.borderSize,0,0,style.borderSize,radius*.2);radialGradient.addColorStop(0,'#666666');radialGradient.addColorStop(0.8,'#444444');radialGradient.addColorStop(1,'rgba(0,0,0,0)');ctx.fillStyle=radialGradient;ctx.translate(0,5);ctx.save();ctx.beginPath();ctx.arc(0,0,radius*.2,startAngle,endAngle,true);ctx.fill();ctx.restore();},renderTicks:function(values){var canvas=this.sb.canvas,config=this.config,style=config.gaugeStyle,ctx=canvas.getCtx(),size=canvas.getSize(),radius=this.sb.config.levelDistance,gaugeCenter=(radius/2);ctx.strokeStyle=style.borderColor;ctx.lineWidth=5;ctx.lineCap="round";for(var i=0,total=0,l=values.length;iacum?maxValue:acum;});return maxValue;},normalizeDims:function(){var root=this.sb.graph.getNode(this.sb.root),l=0;root.eachAdjacency(function(){l++;});var maxValue=this.getMaxValue()||1,config=this.config,animate=config.animate,rho=this.sb.config.levelDistance;this.sb.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(1);});var stat=(animateValue.length==1)&&!config.updateHeights;if(animate){n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return stat?rho:(n*rho/maxValue);}));} -n.setData('normalizedDim',acum/maxValue);});}});Layouts.TM={};Layouts.TM.SliceAndDice=new Class({compute:function(prop){var root=this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root);this.controller.onBeforeCompute(root);var size=this.canvas.getSize(),config=this.config,width=size.width,height=size.height;this.graph.computeLevels(this.root,0,"ignore");root.getPos(prop).setc(-width/2,-height/2);root.setData('width',width,prop);root.setData('height',height+config.titleHeight,prop);this.computePositions(root,root,this.layout.orientation,prop);this.controller.onAfterCompute(root);},computePositions:function(par,ch,orn,prop){var totalArea=0;par.eachSubnode(function(n){totalArea+=n.getData('area',prop);});var config=this.config,offst=config.offset,width=par.getData('width',prop),height=par.getData('height',prop)-config.titleHeight,fact=par==ch?1:(ch.getData('area',prop)/totalArea);var otherSize,size,dim,pos,pos2,posth,pos2th;var horizontal=(orn=="h");if(horizontal){orn='v';otherSize=height;size=width*fact;dim='height';pos='y';pos2='x';posth=config.titleHeight;pos2th=0;}else{orn='h';otherSize=height*fact;size=width;dim='width';pos='x';pos2='y';posth=0;pos2th=config.titleHeight;} -var cpos=ch.getPos(prop);ch.setData('width',size,prop);ch.setData('height',otherSize,prop);var offsetSize=0,tm=this;ch.eachSubnode(function(n){var p=n.getPos(prop);p[pos]=offsetSize+cpos[pos]+posth;p[pos2]=cpos[pos2]+pos2th;tm.computePositions(ch,n,orn,prop);offsetSize+=n.getData(dim,prop);});}});Layouts.TM.Area={compute:function(prop){prop=prop||"current";var root=this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root);this.controller.onBeforeCompute(root);var config=this.config,size=this.canvas.getSize(),width=size.width,height=size.height,offst=config.offset,offwdth=width-offst,offhght=height-offst;this.graph.computeLevels(this.root,0,"ignore");root.getPos(prop).setc(-width/2,-height/2);root.setData('width',width,prop);root.setData('height',height,prop);var coord={'top':-height/2+config.titleHeight,'left':-width/2,'width':offwdth,'height':offhght-config.titleHeight};this.computePositions(root,coord,prop);this.controller.onAfterCompute(root);},computeDim:function(tail,initElem,w,coord,comp,prop){if(tail.length+initElem.length==1){var l=(tail.length==1)?tail:initElem;this.layoutLast(l,w,coord,prop);return;} -if(tail.length>=2&&initElem.length==0){initElem=[tail.shift()];} -if(tail.length==0){if(initElem.length>0)this.layoutRow(initElem,w,coord,prop);return;} -var c=tail[0];if(comp(initElem,w)>=comp([c].concat(initElem),w)){this.computeDim(tail.slice(1),initElem.concat([c]),w,coord,comp,prop);}else{var newCoords=this.layoutRow(initElem,w,coord,prop);this.computeDim(tail,[],newCoords.dim,newCoords,comp,prop);}},worstAspectRatio:function(ch,w){if(!ch||ch.length==0)return Number.MAX_VALUE;var areaSum=0,maxArea=0,minArea=Number.MAX_VALUE;for(var i=0,l=ch.length;iarea?maxArea:area;} -var sqw=w*w,sqAreaSum=areaSum*areaSum;return Math.max(sqw*maxArea/sqAreaSum,sqAreaSum/(sqw*minArea));},avgAspectRatio:function(ch,w){if(!ch||ch.length==0)return Number.MAX_VALUE;var arSum=0;for(var i=0,l=ch.length;ih?w/h:h/w;} -return arSum/l;},layoutLast:function(ch,w,coord,prop){var child=ch[0];child.getPos(prop).setc(coord.left,coord.top);child.setData('width',coord.width,prop);child.setData('height',coord.height,prop);}};Layouts.TM.Squarified=new Class({Implements:Layouts.TM.Area,computePositions:function(node,coord,prop){var config=this.config;if(coord.width>=coord.height) -this.layout.orientation='h';else -this.layout.orientation='v';var ch=node.getSubnodes([1,1],"ignore");if(ch.length>0){this.processChildrenLayout(node,ch,coord,prop);for(var i=0,l=ch.length;i0){this.processChildrenLayout(node,ch,coord,prop);for(var i=0,l=ch.length;itreeDepth)treeDepth=d;});var startNode=this.graph.getNode(this.clickedNode&&this.clickedNode.id||root.id);var maxDepth=Math.min(treeDepth,levelsToShow-1);var initialDepth=startNode._depth;if(this.layout.horizontal()){this.computeSubtree(startNode,-width/2,-height/2,width/(maxDepth+1),height,initialDepth,maxDepth,posType);}else{this.computeSubtree(startNode,-width/2,-height/2,width,height/(maxDepth+1),initialDepth,maxDepth,posType);}},computeSubtree:function(root,x,y,width,height,initialDepth,maxDepth,posType){root.getPos(posType).setc(x,y);root.setData('width',width,posType);root.setData('height',height,posType);var nodeLength,prevNodeLength=0,totalDim=0;var children=Graph.Util.getSubnodes(root,[1,1]);if(!children.length) -return;$.each(children,function(e){totalDim+=e.getData('dim');});for(var i=0,l=children.length;i>0;}));lg.addColorStop(0,color);lg.addColorStop(1,colorGrad);ctx.fillStyle=lg;} -if(border){ctx.strokeStyle=border;ctx.lineWidth=3;} -ctx.fillRect(posx,posy,Math.max(0,width-offset),Math.max(0,height-offset));border&&ctx.strokeRect(pos.x,pos.y,width,height);},'contains':function(node,pos){if(this.viz.clickedNode&&!$jit.Graph.Util.isDescendantOf(node,this.viz.clickedNode.id))return false;var npos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height');return this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},pos,width,height);}}});$jit.Icicle.Plot.EdgeTypes=new Class({'none':$.empty});Layouts.ForceDirected=new Class({getOptions:function(random){var s=this.canvas.getSize();var w=s.width,h=s.height;var count=0;this.graph.eachNode(function(n){count++;});var k2=w*h/count,k=Math.sqrt(k2);var l=this.config.levelDistance;return{width:w,height:h,tstart:w*0.1,nodef:function(x){return k2/(x||1);},edgef:function(x){return k*(x-l);}};},compute:function(property,incremental){var prop=$.splat(property||['current','start','end']);var opt=this.getOptions();NodeDim.compute(this.graph,prop,this.config);this.graph.computeLevels(this.root,0,"ignore");this.graph.eachNode(function(n){$.each(prop,function(p){var pos=n.getPos(p);if(pos.equals(Complex.KER)){pos.x=opt.width/5*(Math.random()-0.5);pos.y=opt.height/5*(Math.random()-0.5);} -n.disp={};$.each(prop,function(p){n.disp[p]=$C(0,0);});});});this.computePositions(prop,opt,incremental);},computePositions:function(property,opt,incremental){var times=this.config.iterations,i=0,that=this;if(incremental){(function iter(){for(var total=incremental.iter,j=0;j=times){incremental.onComplete();return;}} -incremental.onStep(Math.round(i/(times-1)*100));setTimeout(iter,1);})();}else{for(;i1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}}});})($jit.ForceDirected);$jit.TM={};var TM=$jit.TM;$jit.TM.$extend=true;TM.Base={layout:{orientation:"h",vertical:function(){return this.orientation=="v";},horizontal:function(){return this.orientation=="h";},change:function(){this.orientation=this.vertical()?"h":"v";}},initialize:function(controller){var config={orientation:"h",titleHeight:13,offset:2,levelsToShow:0,constrained:false,animate:false,Node:{type:'rectangle',overridable:true,width:3,height:3,color:'#444'},Label:{textAlign:'center',textBaseline:'top'},Edge:{type:'none'},duration:700,fps:45};this.controller=this.config=$.merge(Options("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),config,controller);this.layout.orientation=this.config.orientation;var canvasConfig=this.config;if(canvasConfig.useCanvas){this.canvas=canvasConfig.useCanvas;this.config.labelContainer=this.canvas.id+'-label';}else{if(canvasConfig.background){canvasConfig.background=$.merge({type:'Circles'},canvasConfig.background);} -this.canvas=new Canvas(this,canvasConfig);this.config.labelContainer=(typeof canvasConfig.injectInto=='string'?canvasConfig.injectInto:canvasConfig.injectInto.id)+'-label';} -this.graphOptions={'complex':true,'Node':{'selected':false,'exist':true,'drawn':true}};this.graph=new Graph(this.graphOptions,this.config.Node,this.config.Edge);this.labels=new TM.Label[canvasConfig.Label.type](this);this.fx=new TM.Plot(this);this.op=new TM.Op(this);this.group=new TM.Group(this);this.geom=new TM.Geom(this);this.clickedNode=null;this.busy=false;this.initializeExtras();},refresh:function(){if(this.busy)return;this.busy=true;var that=this;if(this.config.animate){this.compute('end');this.config.levelsToShow>0&&this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root));this.fx.animate($.merge(this.config,{modes:['linear','node-property:width:height'],onComplete:function(){that.busy=false;}}));}else{var labelType=this.config.Label.type;if(labelType!='Native'){var that=this;this.graph.eachNode(function(n){that.labels.hideLabel(n,false);});} -this.busy=false;this.compute();this.config.levelsToShow>0&&this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode&&this.clickedNode.id||this.root));this.plot();}},plot:function(){this.fx.plot();},leaf:function(n){return n.getSubnodes([1,1],"ignore").length==0;},enter:function(n){if(this.busy)return;this.busy=true;var that=this,config=this.config,graph=this.graph,clickedNode=n,previousClickedNode=this.clickedNode;var callback={onComplete:function(){if(config.levelsToShow>0){that.geom.setRightLevelToShow(n);} -if(config.levelsToShow>0||config.request)that.compute();if(config.animate){graph.nodeList.setData('alpha',0,'end');n.eachSubgraph(function(n){n.setData('alpha',1,'end');},"ignore");that.fx.animate({duration:500,modes:['node-property:alpha'],onComplete:function(){that.clickedNode=clickedNode;that.compute('end');that.clickedNode=previousClickedNode;that.fx.animate({modes:['linear','node-property:width:height'],duration:1000,onComplete:function(){that.busy=false;that.clickedNode=clickedNode;}});}});}else{that.busy=false;that.clickedNode=n;that.refresh();}}};if(config.request){this.requestNodes(clickedNode,callback);}else{callback.onComplete();}},out:function(){if(this.busy)return;this.busy=true;this.events.hoveredNode=false;var that=this,config=this.config,graph=this.graph,parents=graph.getNode(this.clickedNode&&this.clickedNode.id||this.root).getParents(),parent=parents[0],clickedNode=parent,previousClickedNode=this.clickedNode;if(!parent){this.busy=false;return;} -callback={onComplete:function(){that.clickedNode=parent;if(config.request){that.requestNodes(parent,{onComplete:function(){that.compute();that.plot();that.busy=false;}});}else{that.compute();that.plot();that.busy=false;}}};if(config.levelsToShow>0) -this.geom.setRightLevelToShow(parent);if(config.animate){this.clickedNode=clickedNode;this.compute('end');this.clickedNode=previousClickedNode;this.fx.animate({modes:['linear','node-property:width:height'],duration:1000,onComplete:function(){that.clickedNode=clickedNode;graph.eachNode(function(n){n.setDataset(['current','end'],{'alpha':[0,1]});},"ignore");previousClickedNode.eachSubgraph(function(node){node.setData('alpha',1);},"ignore");that.fx.animate({duration:500,modes:['node-property:alpha'],onComplete:function(){callback.onComplete();}});}});}else{callback.onComplete();}},requestNodes:function(node,onComplete){var handler=$.merge(this.controller,onComplete),lev=this.config.levelsToShow;if(handler.request){var leaves=[],d=node._depth;node.eachLevel(0,lev,function(n){var nodeLevel=lev-(n._depth-d);if(n.drawn&&!n.anySubnode()&&nodeLevel>0){leaves.push(n);n._level=nodeLevel;}});this.group.requestNodes(leaves,handler);}else{handler.onComplete();}}};TM.Op=new Class({Implements:Graph.Op,initialize:function(viz){this.viz=viz;}});TM.Geom=new Class({Implements:Graph.Geom,getRightLevelToShow:function(){return this.viz.config.levelsToShow;},setRightLevelToShow:function(node){var level=this.getRightLevelToShow(),fx=this.viz.labels;node.eachLevel(0,level+1,function(n){var d=n._depth-node._depth;if(d>level){n.drawn=false;n.exist=false;n.ignore=true;fx.hideLabel(n,false);}else{n.drawn=true;n.exist=true;delete n.ignore;}});node.drawn=true;delete node.ignore;}});TM.Group=new Class({initialize:function(viz){this.viz=viz;this.canvas=viz.canvas;this.config=viz.config;},requestNodes:function(nodes,controller){var counter=0,len=nodes.length,nodeSelected={};var complete=function(){controller.onComplete();};var viz=this.viz;if(len==0) -complete();for(var i=0;i>0;}));lg.addColorStop(0,color);lg.addColorStop(1,colorGrad);ctx.fillStyle=lg;} -ctx.fillRect(posx,posy,width-offst,height-offst);if(border){ctx.save();ctx.strokeStyle=border;ctx.strokeRect(posx,posy,width-offst,height-offst);ctx.restore();}}else if(titleHeight>0){ctx.fillRect(pos.x+offst/2,pos.y+offst/2,width-offst,titleHeight-offst);if(border){ctx.save();ctx.strokeStyle=border;ctx.strokeRect(pos.x+offst/2,pos.y+offst/2,width-offst,height-offst);ctx.restore();}}},'contains':function(node,pos){if(this.viz.clickedNode&&!node.isDescendantOf(this.viz.clickedNode.id)||node.ignore)return false;var npos=node.pos.getc(true),width=node.getData('width'),leaf=this.viz.leaf(node),height=leaf?node.getData('height'):this.config.titleHeight;return this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},pos,width,height);}}});TM.Plot.EdgeTypes=new Class({'none':$.empty});TM.SliceAndDice=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.SliceAndDice]});TM.Squarified=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.Squarified]});TM.Strip=new Class({Implements:[Loader,Extras,TM.Base,Layouts.TM.Strip]});$jit.RGraph=new Class({Implements:[Loader,Extras,Layouts.Radial],initialize:function(controller){var $RGraph=$jit.RGraph;var config={interpolation:'linear',levelDistance:100};this.controller=this.config=$.merge(Options("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),config,controller);var canvasConfig=this.config;if(canvasConfig.useCanvas){this.canvas=canvasConfig.useCanvas;this.config.labelContainer=this.canvas.id+'-label';}else{if(canvasConfig.background){canvasConfig.background=$.merge({type:'Circles'},canvasConfig.background);} -this.canvas=new Canvas(this,canvasConfig);this.config.labelContainer=(typeof canvasConfig.injectInto=='string'?canvasConfig.injectInto:canvasConfig.injectInto.id)+'-label';} -this.graphOptions={'complex':false,'Node':{'selected':false,'exist':true,'drawn':true}};this.graph=new Graph(this.graphOptions,this.config.Node,this.config.Edge);this.labels=new $RGraph.Label[canvasConfig.Label.type](this);this.fx=new $RGraph.Plot(this,$RGraph);this.op=new $RGraph.Op(this);this.json=null;this.root=null;this.busy=false;this.parent=false;this.initializeExtras();},createLevelDistanceFunc:function(){var ld=this.config.levelDistance;return function(elem){return(elem._depth+1)*ld;};},refresh:function(){this.compute();this.plot();},reposition:function(){this.compute('end');},plot:function(){this.fx.plot();},getNodeAndParentAngle:function(id){var theta=false;var n=this.graph.getNode(id);var ps=n.getParents();var p=(ps.length>0)?ps[0]:false;if(p){var posParent=p.pos.getc(),posChild=n.pos.getc();var newPos=posParent.add(posChild.scale(-1));theta=Math.atan2(newPos.y,newPos.x);if(theta<0) -theta+=2*Math.PI;} -return{parent:p,theta:theta};},tagChildren:function(par,id){if(par.angleSpan){var adjs=[];par.eachAdjacency(function(elem){adjs.push(elem.nodeTo);},"ignore");var len=adjs.length;for(var i=0;i1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true);return this.edgeHelper.arrow.contains(from,to,pos,this.edge.epsilon);}}});})($jit.RGraph);Complex.prototype.moebiusTransformation=function(c){var num=this.add(c);var den=c.$conjugate().$prod(this);den.x++;return num.$div(den);};Graph.Util.moebiusTransformation=function(graph,pos,prop,startPos,flags){this.eachNode(graph,function(elem){for(var i=0;i=2){return genDistFunc(i-0.01);}} -return genDistFunc(0.75);},getRadius:function(){var rad=this.config.radius;if(rad!=="auto"){return rad;} -var s=this.canvas.getSize();return Math.min(s.width,s.height)/2;},refresh:function(reposition){if(reposition){this.reposition();this.graph.eachNode(function(node){node.startPos.rho=node.pos.rho=node.endPos.rho;node.startPos.theta=node.pos.theta=node.endPos.theta;});}else{this.compute();} -this.plot();},reposition:function(){this.compute('end');var vector=this.graph.getNode(this.root).pos.getc().scale(-1);Graph.Util.moebiusTransformation(this.graph,[vector],['end'],'end',"ignore");this.graph.eachNode(function(node){if(node.ignore){node.endPos.rho=node.pos.rho;node.endPos.theta=node.pos.theta;}});},plot:function(){this.fx.plot();},onClick:function(id,opt){var pos=this.graph.getNode(id).pos.getc(true);this.move(pos,opt);},move:function(pos,opt){var versor=$C(pos.x,pos.y);if(this.busy===false&&versor.norm()<1){this.busy=true;var root=this.graph.getClosestNodeToPos(versor),that=this;this.graph.computeLevels(root.id,0);this.controller.onBeforeCompute(root);opt=$.merge({onComplete:$.empty},opt||{});this.fx.animate($.merge({modes:['moebius'],hideLabels:true},opt,{onComplete:function(){that.busy=false;opt.onComplete();}}),versor);}}});$jit.Hypertree.$extend=true;(function(Hypertree){Hypertree.Op=new Class({Implements:Graph.Op});Hypertree.Plot=new Class({Implements:Graph.Plot});Hypertree.Label={};Hypertree.Label.Native=new Class({Implements:Graph.Label.Native,initialize:function(viz){this.viz=viz;},renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);var s=this.viz.getRadius();ctx.fillText(node.name,coord.x*s,coord.y*s);}});Hypertree.Label.SVG=new Class({Implements:Graph.Label.SVG,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize(),r=this.viz.getRadius();var labelPos={x:Math.round((pos.x*sx)*r+ox+radius.width/2),y:Math.round((pos.y*sy)*r+oy+radius.height/2)};tag.setAttribute('x',labelPos.x);tag.setAttribute('y',labelPos.y);controller.onPlaceLabel(tag,node);}});Hypertree.Label.HTML=new Class({Implements:Graph.Label.HTML,initialize:function(viz){this.viz=viz;},placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),canvas=this.viz.canvas,ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,radius=canvas.getSize(),r=this.viz.getRadius();var labelPos={x:Math.round((pos.x*sx)*r+ox+radius.width/2),y:Math.round((pos.y*sy)*r+oy+radius.height/2)};var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});Hypertree.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.circle.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.circle.contains(npos,pos,dim);}},'ellipse':{'render':function(node,canvas){var pos=node.pos.getc().$scale(node.scale),width=node.getData('width'),height=node.getData('height');this.nodeHelper.ellipse.render('fill',pos,width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.circle.contains(npos,pos,width,height);}},'square':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.square.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.square.contains(npos,pos,dim);}},'rectangle':{'render':function(node,canvas){var nconfig=this.node,width=node.getData('width'),height=node.getData('height'),pos=node.pos.getc();width=nconfig.transform?width*(1-pos.squaredNorm()):width;height=nconfig.transform?height*(1-pos.squaredNorm()):height;pos.$scale(node.scale);if(width>0.2&&height>0.2){this.nodeHelper.rectangle.render('fill',pos,width,height,canvas);}},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.square.contains(npos,pos,width,height);}},'triangle':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.triangle.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.triangle.contains(npos,pos,dim);}},'star':{'render':function(node,canvas){var nconfig=this.node,dim=node.getData('dim'),p=node.pos.getc();dim=nconfig.transform?dim*(1-p.squaredNorm()):dim;p.$scale(node.scale);if(dim>0.2){this.nodeHelper.star.render('fill',p,dim,canvas);}},'contains':function(node,pos){var dim=node.getData('dim'),npos=node.pos.getc().$scale(node.scale);return this.nodeHelper.star.contains(npos,pos,dim);}}});Hypertree.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.line.render({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.line.contains({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},pos,this.edge.epsilon);}},'arrow':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale,dim=adj.getData('dim'),direction=adj.data.$direction,inv=(direction&&direction.length>1&&direction[0]!=adj.nodeFrom.id);this.edgeHelper.arrow.render({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},dim,inv,canvas);},'contains':function(adj,pos){var from=adj.nodeFrom.pos.getc(true),to=adj.nodeTo.pos.getc(true),r=adj.nodeFrom.scale;this.edgeHelper.arrow.contains({x:from.x*r,y:from.y*r},{x:to.x*r,y:to.y*r},pos,this.edge.epsilon);}},'hyperline':{'render':function(adj,canvas){var from=adj.nodeFrom.pos.getc(),to=adj.nodeTo.pos.getc(),dim=this.viz.getRadius();this.edgeHelper.hyperline.render(from,to,dim,canvas);},'contains':$.lambda(false)}});})($jit.Hypertree);})(); \ No newline at end of file diff --git a/include/SugarCharts/Jit/js/mySugarCharts.js b/include/SugarCharts/Jit/js/mySugarCharts.js deleted file mode 100644 index d8ac9cbf..00000000 --- a/include/SugarCharts/Jit/js/mySugarCharts.js +++ /dev/null @@ -1,39 +0,0 @@ -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ -SUGAR.mySugar.sugarCharts=function(){var activeTab=activePage,charts=new Object(),windowWidth=0,firstLoad=(SUGAR.isIE)?true:false;return{loadSugarCharts:function(activeTab){var chartFound=false;for(id in charts[activeTab]){if(id!='undefined'){chartFound=true;loadSugarChart(charts[activeTab][id]['chartId'],charts[activeTab][id]['jsonFilename'],charts[activeTab][id]['css'],charts[activeTab][id]['chartConfig']);}} -charts=new Object();},addToChartsArrayJson:function(json,activeTab){for(id in json){if(json[id]['supported']=="true"){SUGAR.mySugar.sugarCharts.addToChartsArray(json[id]['chartId'],json[id]['filename'],json[id]['css'],json[id]['chartConfig'],activeTab);}}},addToChartsArray:function(chartId,jsonFilename,css,chartConfig,activeTab){if(charts[activeTab]==null){charts[activeTab]=new Object();} -charts[activeTab][chartId]=new Object();charts[activeTab][chartId]['chartId']=chartId;charts[activeTab][chartId]['jsonFilename']=jsonFilename;charts[activeTab][chartId]['css']=css;charts[activeTab][chartId]['chartConfig']=chartConfig;},refreshPage:function(){var newWidth=document.body.offsetWidth;if(newWidth!=windowWidth&&!firstLoad){if(SUGAR.isIE){SUGAR.mySugar.loading.show();document.getElementById('loading_c').style.display='inline';setTimeout(function(){location.reload();},500);}else{SUGAR.mySugar.retrievePage(activePage);} -SUGAR.mySugar.sugarCharts.loadSugarCharts(activePage);} -firstLoad=false;windowWidth=newWidth;},refreshGraphs:function(){setTimeout("SUGAR.mySugar.sugarCharts.refreshPage()",1000);}}}();YAHOO.util.Event.addListener(window,'resize',SUGAR.mySugar.sugarCharts.refreshGraphs); \ No newline at end of file diff --git a/include/SugarCharts/Jit/js/sugarCharts.js b/include/SugarCharts/Jit/js/sugarCharts.js deleted file mode 100644 index 13ce7393..00000000 --- a/include/SugarCharts/Jit/js/sugarCharts.js +++ /dev/null @@ -1,76 +0,0 @@ -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ -function loadSugarChart(chartId,jsonFilename,css,chartConfig){var labelType,useGradients,nativeTextSupport,animate;(function(){var ua=navigator.userAgent,typeOfCanvas=typeof HTMLCanvasElement,nativeCanvasSupport=(typeOfCanvas=='object'||typeOfCanvas=='function'),textSupport=nativeCanvasSupport&&(typeof document.createElement('canvas').getContext('2d').fillText=='function');labelType='Native';nativeTextSupport=labelType=='Native';useGradients=nativeCanvasSupport;animate=false;})();switch(chartConfig["chartType"]){case"barChart":var handleFailure=function(o){alert('fail');if(o.responseText!==undefined){alert('failed');}} -var handleSuccess=function(o){if(o.responseText!==undefined&&o.responseText!="No Data"){var json=eval('('+o.responseText+')');var properties=$jit.util.splat(json.properties)[0];var marginBottom=(chartConfig["orientation"]=='vertical'&&json.values.length>8)?20*4:20;var barChart=new $jit.BarChart({injectInto:chartId,animate:false,nodeCount:json.values.length,renderBackground:chartConfig['imageExportType']=="jpg"?true:false,backgroundColor:'rgb(255,255,255)',colorStop1:'rgba(255,255,255,.8)',colorStop2:'rgba(255,255,255,0)',shadow:{enable:true,size:2},orientation:chartConfig["orientation"],hoveredColor:false,Title:{text:properties['title'],size:16,color:'#444444',offset:20},Subtitle:{text:properties['subtitle'],size:11,color:css["color"],offset:20},Ticks:{enable:true,color:css["gridLineColor"]},barsOffset:(chartConfig["orientation"]=="vertical")?30:20,Margin:{top:20,left:30,right:20,bottom:marginBottom},ScrollNote:{text:(chartConfig["scroll"]&&SUGAR.util.isTouchScreen())?"Use two fingers to scroll":"",size:12},Events:{enable:true,onClick:function(node){if(!node||SUGAR.util.isTouchScreen())return;if(node.link=='undefined'||node.link=='')return;window.location.href=node.link;}},labelOffset:5,type:useGradients?chartConfig["barType"]+':gradient':chartConfig["barType"],showAggregates:true,showLabels:true,Label:{type:labelType,size:12,family:css["font-family"],color:css["color"],colorAlt:"#ffffff"},Tips:{enable:true,onShow:function(tip,elem){if(elem.link!='undefined'&&elem.link!=''){drillDown=(SUGAR.util.isTouchScreen())?"
Click to drilldown":"
Click to drilldown";}else{drillDown="";} -if(elem.valuelabel!='undefined'&&elem.valuelabel!=undefined&&elem.valuelabel!=''){value="elem.valuelabel";}else{value="elem.value";} -eval("tip.innerHTML = '' + elem."+chartConfig["tip"]+" + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown");}}});barChart.loadJSON(json);var list=$jit.id('legend'+chartId);var legend=barChart.getLegend(),cols=(typeof SUGAR=='undefined'||typeof SUGAR.mySugar=='undefined')?8:4,rows=Math.ceil(legend["name"].length/cols),table="
";var j=0;for(i=0;i";for(td=0;td';if(legend["name"][j]!=undefined){table+='
 
'+legend["name"][j];} -table+='';j++;} -table+="";} -table+="
";list.innerHTML=table;$jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]);}} -var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;case"lineChart":var handleFailure=function(o){alert('fail');if(o.responseText!==undefined){alert('failed');}} -var handleSuccess=function(o){if(o.responseText!==undefined&&o.responseText!="No Data"){var json=eval('('+o.responseText+')');var properties=$jit.util.splat(json.properties)[0];var lineChart=new $jit.LineChart({injectInto:chartId,animate:false,renderBackground:chartConfig['imageExportType']=="jpg"?true:false,backgroundColor:'rgb(255,255,255)',colorStop1:'rgba(255,255,255,.8)',colorStop2:'rgba(255,255,255,0)',selectOnHover:false,Title:{text:properties['title'],size:16,color:'#444444',offset:20},Subtitle:{text:properties['subtitle'],size:11,color:css["color"],offset:20},Ticks:{enable:true,color:css["gridLineColor"]},Margin:{top:20,left:40,right:40,bottom:20},Events:{enable:true,onClick:function(node){if(!node||SUGAR.util.isTouchScreen())return;if(node.link=='undefined'||node.link=='')return;window.location.href=node.link;}},labelOffset:5,type:useGradients?chartConfig["lineType"]+':gradient':chartConfig["lineType"],showAggregates:true,showLabels:true,Label:{type:labelType,size:12,family:css["font-family"],color:css["color"],colorAlt:"#ffffff"},Tips:{enable:true,onShow:function(tip,elem){if(elem.link!='undefined'&&elem.link!=''){drillDown=(SUGAR.util.isTouchScreen())?"
Click to drilldown":"
Click to drilldown";}else{drillDown="";} -if(elem.valuelabel!='undefined'&&elem.valuelabel!=undefined&&elem.valuelabel!=''){var value="elem.valuelabel";}else{var value="elem.value";} -if(elem.collision){eval("var name = elem."+chartConfig["tip"]+";");var content='';for(var i=0;i';} -content+='
'+name[i]+': '+elem.value[i]+' - '+elem.percentage[i]+'%'+'
';tip.innerHTML=content;}else{eval("tip.innerHTML = '' + elem."+chartConfig["tip"]+" + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown");}}}});lineChart.loadJSON(json);var list=$jit.id('legend'+chartId);var legend=lineChart.getLegend(),cols=(typeof SUGAR=='undefined'||typeof SUGAR.mySugar=='undefined')?8:4,rows=Math.ceil(legend["name"].length/cols),table="";var j=0;for(i=0;i";for(td=0;td';if(legend["name"][j]!=undefined){table+='
 
'+legend["name"][j];} -table+='';j++;} -table+="";} -table+="
";list.innerHTML=table;$jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]);}} -var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;case"pieChart":var handleFailure=function(o){alert('fail');if(o.responseText!==undefined){alert('failed');}} -var handleSuccess=function(o){if(o.responseText!==undefined){var json=eval('('+o.responseText+')');var properties=$jit.util.splat(json.properties)[0];var pieChart=new $jit.PieChart({injectInto:chartId,animate:false,renderBackground:chartConfig['imageExportType']=="jpg"?true:false,backgroundColor:'rgb(255,255,255)',colorStop1:'rgba(255,255,255,.8)',colorStop2:'rgba(255,255,255,0)',labelType:properties['labels'],hoveredColor:false,offset:50,sliceOffset:0,labelOffset:30,type:useGradients?chartConfig["pieType"]+':gradient':chartConfig["pieType"],showLabels:true,Events:{enable:true,onClick:function(node){if(!node||SUGAR.util.isTouchScreen())return;if(node.link=='undefined'||node.link=='')return;window.location.href=node.link;}},Label:{type:labelType,size:12,family:css["font-family"],color:css["color"]},Tips:{enable:true,onShow:function(tip,elem){if(elem.link!='undefined'&&elem.link!=''){drillDown=(SUGAR.util.isTouchScreen())?"
Click to drilldown":"
Click to drilldown";}else{drillDown="";} -if(elem.valuelabel!='undefined'&&elem.valuelabel!=undefined&&elem.valuelabel!=''){value="elem.valuelabel";}else{value="elem.value";} -eval("tip.innerHTML = '' + elem.label + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown");}}});pieChart.loadJSON(json);var list=$jit.id('legend'+chartId);var legend=pieChart.getLegend(),cols=(typeof SUGAR=='undefined'||typeof SUGAR.mySugar=='undefined')?8:4,rows=Math.ceil(legend["name"].length/cols);table="";var j=0;for(i=0;i";for(td=0;td';if(legend["name"][j]!=undefined){table+='
 
'+legend["name"][j];} -table+='';j++;} -table+="";} -table+="
";list.innerHTML=table;$jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]);}} -var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;case"funnelChart":var handleFailure=function(o){alert('fail');if(o.responseText!==undefined){alert('failed');}} -var handleSuccess=function(o){if(o.responseText!==undefined&&o.responseText!="No Data"){var json=eval('('+o.responseText+')');var properties=$jit.util.splat(json.properties)[0];var funnelChart=new $jit.FunnelChart({injectInto:chartId,animate:false,renderBackground:chartConfig['imageExportType']=="jpg"?true:false,backgroundColor:'rgb(255,255,255)',colorStop1:'rgba(255,255,255,.8)',colorStop2:'rgba(255,255,255,0)',orientation:"vertical",hoveredColor:false,Title:{text:properties['title'],size:16,color:'#444444',offset:20},Subtitle:{text:properties['subtitle'],size:11,color:css["color"],offset:20},segmentOffset:20,Margin:{top:20,left:20,right:20,bottom:20},Events:{enable:true,onClick:function(node){if(!node||SUGAR.util.isTouchScreen())return;if(node.link=='undefined'||node.link=='')return;window.location.href=node.link;}},labelOffset:10,type:useGradients?chartConfig["funnelType"]+':gradient':chartConfig["funnelType"],showAggregates:true,showLabels:true,Label:{type:labelType,size:12,family:css["font-family"],color:css["color"],colorAlt:"#ffffff"},Tips:{enable:true,onShow:function(tip,elem){if(elem.link!='undefined'&&elem.link!=''){drillDown=(SUGAR.util.isTouchScreen())?"
Click to drilldown":"
Click to drilldown";}else{drillDown="";} -if(elem.valuelabel!='undefined'&&elem.valuelabel!=undefined&&elem.valuelabel!=''){value="elem.valuelabel";}else{value="elem.value";} -eval("tip.innerHTML = '' + elem."+chartConfig["tip"]+" + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown");}}});funnelChart.loadJSON(json);var list=$jit.id('legend'+chartId);var legend=funnelChart.getLegend(),cols=(typeof SUGAR=='undefined'||typeof SUGAR.mySugar=='undefined')?8:4,rows=Math.ceil(legend["name"].length/cols);table="";var j=0;for(i=0;i";for(td=0;td';if(legend["name"][j]!=undefined){table+='
 
'+legend["name"][j];} -table+='';j++;} -table+="";} -table+="
";list.innerHTML=table;$jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]);}} -var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;case"gaugeChart":var handleFailure=function(o){alert('fail');if(o.responseText!==undefined){alert('failed');}} -var handleSuccess=function(o){if(o.responseText!==undefined){var json=eval('('+o.responseText+')');var properties=$jit.util.splat(json.properties)[0];var gaugeChart=new $jit.GaugeChart({injectInto:chartId,animate:false,renderBackground:chartConfig['imageExportType']=="jpg"?true:false,backgroundColor:'rgb(255,255,255)',colorStop1:'rgba(255,255,255,.8)',colorStop2:'rgba(255,255,255,0)',labelType:properties['labels'],hoveredColor:false,Title:{text:properties['title'],size:16,color:'#444444',offset:20},Subtitle:{text:properties['subtitle'],size:11,color:css["color"],offset:5},offset:20,gaugeStyle:{backgroundColor:'#aaaaaa',borderColor:'#999999',needleColor:'rgba(255,0,0,.8)',borderSize:4,positionFontSize:24,positionOffset:2},type:useGradients?chartConfig["gaugeType"]+':gradient':chartConfig["gaugeType"],showLabels:true,Events:{enable:true,onClick:function(node){if(!node||SUGAR.util.isTouchScreen())return;if(node.link=='undefined'||node.link=='')return;window.location.href=node.link;}},Label:{type:labelType,size:12,family:css["font-family"],color:css["color"]},Tips:{enable:true,onShow:function(tip,elem){if(elem.link!='undefined'&&elem.link!=''){drillDown=(SUGAR.util.isTouchScreen())?"
Click to drilldown":"
Click to drilldown";}else{drillDown="";} -if(elem.valuelabel!='undefined'&&elem.valuelabel!=undefined&&elem.valuelabel!=''){value="elem.valuelabel";}else{value="elem.value";} -eval("tip.innerHTML = '' + elem.label + ': ' + "+value+" + drillDown");}}});gaugeChart.loadJSON(json);var list=$jit.id('legend'+chartId);var legend=gaugeChart.getLegend(),cols=(typeof SUGAR=='undefined'||typeof SUGAR.mySugar=='undefined')?8:4,rows=Math.ceil(legend["name"].length/cols);table="";var j=1;for(i=0;i";for(td=0;td';if(legend["name"][j]!=undefined){table+='
 
'+legend["name"][j];} -table+='';j++;} -table+="";} -table+="
";list.innerHTML=table;$jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]);}} -var callback={success:handleSuccess,failure:handleFailure,argument:{foo:'foo',bar:''}};var request=YAHOO.util.Connect.asyncRequest('GET',jsonFilename+"?r="+new Date().getTime(),callback);break;}} \ No newline at end of file diff --git a/include/SugarCharts/JsChart.php b/include/SugarCharts/JsChart.php deleted file mode 100644 index 618aefa4..00000000 --- a/include/SugarCharts/JsChart.php +++ /dev/null @@ -1,675 +0,0 @@ -chartId = $name; - $this->height = $height; - $this->width = $width; - $this->xmlFile = $xmlFile; - $this->chartType = $this->chart_properties['type']; - - - $style = array(); - $chartConfig = array(); - $xmlStr = $this->processXML($this->xmlFile); - $json = $this->buildJson($xmlStr); - $this->saveJsonFile($json); - $this->ss->assign("chartId", $this->chartId); - $this->ss->assign("filename", $this->jsonFilename); - - - $dimensions = $this->getChartDimensions($xmlStr); - $this->ss->assign("width", $dimensions['width']); - $this->ss->assign("height", $dimensions['height']); - $config = $this->getConfigProperties(); - $style['gridLineColor'] = str_replace("0x","#",$config->gridLines); - $style['font-family'] = $config->labelFontFamily; - $style['color'] = str_replace("0x","#",$config->labelFontColor); - $this->ss->assign("css", $style); - foreach($this->getChartConfigParams($xmlStr) as $key => $value) { - $chartConfig[$key] = $value; - } - $chartConfig['imageExportType'] = $this->image_export_type; - $this->ss->assign("config", $chartConfig); - if($json == "No Data") { - $this->ss->assign("error", "No Data"); - } - - if(!$this->isSupported($this->chartType)) { - $this->ss->assign("error", "Unsupported Chart Type"); - } - - - $file = ""; - - return $this->ss->fetch($file); - } - - - function getDashletScript($id,$xmlFile="") { - - global $sugar_config, $current_user, $current_language; - $this->id = $id; - $this->chartId = $id; - $this->xmlFile = (!$xmlFile) ? $sugar_config['tmp_dir']. $current_user->id . '_' . $this->id . '.xml' : $xmlFile; - - - $style = array(); - $chartConfig = array(); - $this->ss->assign("chartId", $this->chartId); - $this->ss->assign("filename", str_replace(".xml",".js",$this->xmlFile)); - $config = $this->getConfigProperties(); - $style['gridLineColor'] = str_replace("0x","#",$config->gridLines); - $style['font-family'] = $config->labelFontFamily; - $style['color'] = str_replace("0x","#",$config->labelFontColor); - $this->ss->assign("css", $style); - $xmlStr = $this->processXML($this->xmlFile); - foreach($this->getChartConfigParams($xmlStr) as $key => $value) { - $chartConfig[$key] = $value; - } - - $chartConfig['imageExportType'] = $this->image_export_type; - $this->ss->assign("config", $chartConfig); - - $file = ""; - return $this->ss->fetch($file); - } - - function chartArray($chartsArray) { - - $customChartsArray = array(); - $style = array(); - $chartConfig = array(); - foreach($chartsArray as $id => $data) { - $customChartsArray[$id] = array(); - $customChartsArray[$id]['chartId'] = $id; - $customChartsArray[$id]['filename'] = str_replace(".xml",".js",$data['xmlFile']); - $customChartsArray[$id]['width'] = $data['width']; - $customChartsArray[$id]['height'] = $data['height']; - - $config = $this->getConfigProperties(); - $style['gridLineColor'] = str_replace("0x","#",$config->gridLines); - $style['font-family'] = (string)$config->labelFontFamily; - $style['color'] = str_replace("0x","#",$config->labelFontColor); - $customChartsArray[$id]['css'] = $style; - $xmlStr = $this->processXML($data['xmlFile']); - $xml = new SimpleXMLElement($xmlStr); - $params = $this->getChartConfigParams($xmlStr); - $customChartsArray[$id]['supported'] = ($this->isSupported($xml->properties->type)) ? "true" : "false"; - foreach($params as $key => $value) { - $chartConfig[$key] = $value; - } - $chartConfig['imageExportType'] = $this->image_export_type; - $customChartsArray[$id]['chartConfig'] = $chartConfig; - } - - return $customChartsArray; - } - - function getChartConfigParams($xmlStr) { - - $xml = new SimpleXMLElement($xmlStr); - - $chartType = $xml->properties->type; - if($chartType == "pie chart") { - return array ("pieType" => "basic","tip" => "name","chartType" => "pieChart"); - } elseif($chartType == "line chart") { - return array ("lineType" => "basic","tip" => "name","chartType" => "lineChart"); - } elseif($chartType == "funnel chart 3D") { - return array ("funnelType" => "basic","tip" => "name","chartType" => "funnelChart"); - } elseif($chartType == "gauge chart") { - return array ("gaugeType" => "basic","tip" => "name","chartType" => "gaugeChart"); - } elseif($chartType == "stacked group by chart") { - return array ("orientation" => "vertical","barType" => "stacked","tip" => "name","chartType" => "barChart"); - } elseif($chartType == "group by chart") { - return array("orientation" => "vertical", "barType" => "grouped", "tip" => "title","chartType" => "barChart"); - } elseif($chartType == "bar chart") { - return array("orientation" => "vertical", "barType" => "basic", "tip" => "label","chartType" => "barChart"); - } elseif ($chartType == "horizontal group by chart") { - return array("orientation" => "horizontal", "barType" => "stacked", "tip" => "name","chartType" => "barChart"); - } elseif ($chartType == "horizontal bar chart" || "horizontal") { - return array("orientation" => "horizontal","barType" => "basic","tip" => "label","chartType" => "barChart"); - } else { - return array("orientation" => "vertical","barType" => "stacked","tip" => "name","chartType" => "barChart"); - } - } - function getChartDimensions($xmlStr) { - if($this->getNumNodes($xmlStr) > 9 && $this->chartType != "pie chart") { - if($this->chartType == "horizontal group by chart" || $this->chartType == "horizontal bar chart") { - $diff = $this->getNumNodes($xmlStr) - 9; - $height = ($diff * (.20 * $this->height)) + $this->height; - return array("width"=>$this->width, "height"=>($height)); - } else { - return array("width"=>($this->width * 2), "height"=>$this->height); - } - } else { - return array("width"=>"100%", "height"=>$this->height); - } - } - - function checkData($xmlstr) { - $xml = new SimpleXMLElement($xmlstr); - if(sizeof($xml->data->group) > 0) { - return true; - } else { - return false; - } - } - - function getNumNodes($xmlstr) { - $xml = new SimpleXMLElement($xmlstr); - return sizeof($xml->data->group); - } - - function buildProperties($xmlstr) { - $content = $this->tab("'properties': [\n",1); - $properties = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->properties->children() as $property) { - $properties[] = $this->tab("'".$property->getName()."':"."'".$property."'",2); - } - $content .= $this->tab("{\n",1); - $content .= join(",\n",$properties)."\n"; - $content .= $this->tab("}\n",1); - $content .= $this->tab("],\n",1); - return $content; - } - - function buildLabelsBarChartStacked($xmlstr) { - $content = $this->tab("'label': [\n",1); - $labels = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group[0]->subgroups->group as $group) { - $labels[] = $this->tab("'".$group->title."'",2); - } - $content .= join(",\n",$labels)."\n"; - $content .= $this->tab("],\n",1); - return $content; - } - - function buildLabelsBarChart($xmlstr) { - $content = $this->tab("'label': [\n",1); - $labels = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group as $group) { - $labels[] = $this->tab("'".$group->title."'",2); - } - $labelStr = join(",\n",$labels)."\n"; - $content .= $labelStr; - $content .= $this->tab("],\n",1); - return $content; - } - - function buildDataBarChartStacked($xmlstr) { - $content = $this->tab("'values': [\n",1); - $data = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group as $group) { - $groupcontent = $this->tab("{\n",1); - $groupcontent .= $this->tab("'label': '{$group->title}',\n",2); - $groupcontent .= $this->tab("'gvalue': '{$group->value}',\n",2); - $groupcontent .= $this->tab("'gvaluelabel': '{$group->label}',\n",2); - $subgroupValues = array(); - $subgroupValueLabels = array(); - $subgroupLinks = array(); - foreach($group->subgroups->group as $subgroups) { - $subgroupValues[] = $this->tab(($subgroups->value == "NULL") ? 0 : $subgroups->value,3); - $subgroupValueLabels[] = $this->tab("'".$subgroups->label."'",3); - $subgroupLinks[] = $this->tab("'".$subgroups->link."'",3); - } - $subgroupValuesStr = join(",\n",$subgroupValues)."\n"; - $subgroupValueLabelsStr = join(",\n",$subgroupValueLabels)."\n"; - $subgroupLinksStr = join(",\n",$subgroupLinks)."\n"; - - $groupcontent .= $this->tab("'values': [\n".$subgroupValuesStr,2); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'valuelabels': [\n".$subgroupValueLabelsStr,2); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'links': [\n".$subgroupLinksStr,2); - $groupcontent .= $this->tab("]\n",2); - $groupcontent .= $this->tab("}",1); - $data[] = $groupcontent; - } - $content .= join(",\n",$data)."\n"; - $content .= $this->tab("]",1); - return $content; - } - - function buildDataBarChartGrouped($xmlstr) { - $content = $this->tab("'values': [\n",1); - $data = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group as $group) { - $groupcontent = $this->tab("{\n",1); - $groupcontent .= $this->tab("'label': '{$group->title}',\n",2); - $groupcontent .= $this->tab("'gvalue': '{$group->value}',\n",2); - $groupcontent .= $this->tab("'gvaluelabel': '{$group->label}',\n",2); - $subgroupValues = array(); - $subgroupValueLabels = array(); - $subgroupLinks = array(); - $subgroupTitles = array(); - foreach($group->subgroups->group as $subgroups) { - $subgroupValues[] = $this->tab(($subgroups->value == "NULL") ? 0 : $subgroups->value,3); - $subgroupValueLabels[] = $this->tab("'".$subgroups->label."'",3); - $subgroupLinks[] = $this->tab("'".$subgroups->link."'",3); - $subgroupTitles[] = $this->tab("'".$subgroups->title."'",3); - } - $subgroupValuesStr = join(",\n",$subgroupValues)."\n"; - $subgroupValueLabelsStr = join(",\n",$subgroupValueLabels)."\n"; - $subgroupLinksStr = join(",\n",$subgroupLinks)."\n"; - $subgroupTitlesStr = join(",\n",$subgroupTitles)."\n"; - - $groupcontent .= $this->tab("'values': [\n".$subgroupValuesStr,2); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'valuelabels': [\n".$subgroupValueLabelsStr,2); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'links': [\n".$subgroupLinksStr,2); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'titles': [\n".$subgroupTitlesStr,2); - $groupcontent .= $this->tab("]\n",2); - $groupcontent .= $this->tab("}",1); - $data[] = $groupcontent; - } - $content .= join(",\n",$data)."\n"; - $content .= $this->tab("]",1); - return $content; - } - - function buildDataBarChart($xmlstr) { - $content = $this->tab("'values': [\n",1); - $data = array(); - $xml = new SimpleXMLElement($xmlstr); - $groupcontent = ""; - $groupcontentArr = array(); - - foreach($xml->data->group as $group) { - $groupcontent = $this->tab("{\n",1); - $groupcontent .= $this->tab("'label': [\n",2); - $groupcontent .= $this->tab("'{$group->title}'\n",3); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'values': [\n",2); - $groupcontent .= $this->tab(($group->value == "NULL") ? 0 : $group->value."\n",3); - $groupcontent .= $this->tab("],\n",2); - if($group->label) { - $groupcontent .= $this->tab("'valuelabels': [\n",2); - $groupcontent .= $this->tab("'{$group->label}'\n",3); - $groupcontent .= $this->tab("],\n",2); - } - $groupcontent .= $this->tab("'links': [\n",2); - $groupcontent .= $this->tab("'{$group->link}'\n",3); - $groupcontent .= $this->tab("]\n",2); - $groupcontent .= $this->tab("}",1); - $groupcontentArr[] = $groupcontent; - } - $content .= join(",\n",$groupcontentArr)."\n"; - $content .= $this->tab("]",1); - return $content; - } - - function buildLabelsPieChart($xmlstr) { - $content = $this->tab("'label': [\n",1); - $labels = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group as $group) { - $labels[] = $this->tab("'".$group->title."'",2); - } - $labelStr = join(",\n",$labels)."\n"; - $content .= $labelStr; - $content .= $this->tab("],\n",1); - return $content; - } - - - function buildDataPieChart($xmlstr) { - $content = $this->tab("'values': [\n",1); - $data = array(); - $xml = new SimpleXMLElement($xmlstr); - $groupcontent = ""; - $groupcontentArr = array(); - - foreach($xml->data->group as $group) { - $groupcontent = $this->tab("{\n",1); - $groupcontent .= $this->tab("'label': [\n",2); - $groupcontent .= $this->tab("'{$group->title}'\n",3); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'values': [\n",2); - $groupcontent .= $this->tab("{$group->value}\n",3); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'valuelabels': [\n",2); - $groupcontent .= $this->tab("'{$group->label}'\n",3); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'links': [\n",2); - $groupcontent .= $this->tab("'{$group->link}'\n",3); - $groupcontent .= $this->tab("]\n",2); - $groupcontent .= $this->tab("}",1); - $groupcontentArr[] = $groupcontent; - } - - - $content .= join(",\n",$groupcontentArr)."\n"; - $content .= $this->tab("\n]",1); - return $content; - } - - function buildLabelsGaugeChart($xmlstr) { - $content = $this->tab("'label': [\n",1); - $labels = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group as $group) { - $labels[] = $this->tab("'".$group->title."'",2); - } - $labelStr = join(",\n",$labels)."\n"; - $content .= $labelStr; - $content .= $this->tab("],\n",1); - return $content; - } - - function buildDataGaugeChart($xmlstr) { - $content = $this->tab("'values': [\n",1); - $data = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->data->group as $group) { - $groupcontent = $this->tab("{\n",1); - $groupcontent .= $this->tab("'label': '{$group->title}',\n",2); - $groupcontent .= $this->tab("'gvalue': '{$group->value}',\n",2); - $finalComma = ($group->title != "GaugePosition") ? "," : ""; - $groupcontent .= $this->tab("'gvaluelabel': '{$group->label}'{$finalComma}\n",2); - $subgroupTitles = array(); - $subgroupValues = array(); - $subgroupValueLabels = array(); - $subgroupLinks = array(); - - if(is_object($group->subgroups->group)) { - foreach($group->subgroups->group as $subgroups) { - $subgroupTitles[] = $this->tab("'".$subgroups->title."'",3); - //$subgroupValues[] = $this->tab($subgroups->value,3); - $subgroupValues[] = $subgroups->value; - $subgroupValueLabels[] = $this->tab("'".$subgroups->label."'",3); - $subgroupLinks[] = $this->tab("'".$subgroups->link."'",3); - } - $subgroupTitlesStr = join(",\n",$subgroupTitles)."\n"; - $subgroupValuesStr = join(",\n",$subgroupValues)."\n"; - $subgroupValueLabelsStr = join(",\n",$subgroupValueLabels)."\n"; - $subgroupLinksStr = join(",\n",$subgroupLinks)."\n"; - - //$groupcontent .= $this->tab("'labels': [\n".$subgroupTitlesStr,2); - //$groupcontent .= $this->tab("],\n",2); - $val = ((int)$subgroupValues[1] == (int)$subgroupValues[0]) ? $this->tab($subgroupValues[1],3)."\n" : $this->tab($subgroupValues[1] - $subgroupValues[0],3)."\n"; - - $groupcontent .= $this->tab("'values': [\n".$val,2); - $groupcontent .= $this->tab("],\n",2); - $groupcontent .= $this->tab("'valuelabels': [\n".$subgroupValueLabelsStr,2); - $groupcontent .= $this->tab("]\n",2); - //$groupcontent .= $this->tab("'links': [\n".$subgroupLinksStr,2); - //$groupcontent .= $this->tab("]\n",2); - - } - - $groupcontent .= $this->tab("}",1); - $data[] = $groupcontent; - - } - - $content .= join(",\n",$data)."\n"; - - - $content .= $this->tab("]",1); - return $content; - } - - - function getConfigProperties() { - $path = SugarThemeRegistry::current()->getImageURL('sugarColors.xml',false); - - if(!file_exists($path)) { - $GLOBALS['log']->debug("Cannot open file ($path)"); - } - $xmlstr = file_get_contents($path); - $xml = new SimpleXMLElement($xmlstr); - return $xml->charts; - } - - function buildChartColors() { - - $content = $this->tab("'color': [\n",1); - $colorArr = array(); - $xml = $this->getConfigProperties(); - $colors = ($this->chartType == "gauge chart") ? $xml->gaugeChartElementColors->color : $xml->chartElementColors->color; - foreach($colors as $color) { - $colorArr[] = $this->tab("'".str_replace("0x","#",$color)."'",2); - } - $content .= join(",\n",$colorArr)."\n"; - $content .= $this->tab("],\n",1); - - return $content; - - } - - function buildJson($xmlstr){ - if($this->checkData($xmlstr)) { - $content = "{\n"; - if ($this->chartType == "pie chart" || $this->chartType == "funnel chart 3D") { - $content .= $this->buildProperties($xmlstr); - $content .= $this->buildLabelsPieChart($xmlstr); - $content .= $this->buildChartColors(); - $content .= $this->buildDataPieChart($xmlstr); - } - elseif ($this->chartType == "gauge chart") { - $content .= $this->buildProperties($xmlstr); - $content .= $this->buildLabelsGaugeChart($xmlstr); - $content .= $this->buildChartColors(); - $content .= $this->buildDataGaugeChart($xmlstr); - } - elseif ($this->chartType == "horizontal bar chart" || $this->chartType == "bar chart") { - $content .= $this->buildProperties($xmlstr); - $content .= $this->buildLabelsBarChart($xmlstr); - $content .= $this->buildChartColors(); - $content .= $this->buildDataBarChart($xmlstr); - } - elseif ($this->chartType == "group by chart") { - $content .= $this->buildProperties($xmlstr); - $content .= $this->buildLabelsBarChartStacked($xmlstr); - $content .= $this->buildChartColors(); - $content .= $this->buildDataBarChartGrouped($xmlstr); - } else { - $content .= $this->buildProperties($xmlstr); - $content .= $this->buildLabelsBarChartStacked($xmlstr); - $content .= $this->buildChartColors(); - $content .= $this->buildDataBarChartStacked($xmlstr); - } - $content .= "\n}"; - return $content; - } else { - return "No Data"; - } - } - - function buildHTMLLegend($xmlFile) { - $xmlstr = $this->processXML($xmlFile); - $xml = new SimpleXMLElement($xmlstr); - $this->chartType = $xml->properties->type; - $html = ""; - - if ($this->chartType == "group by chart" || $this->chartType == "horizontal group by chart") { - $groups = $xml->data->group[0]->subgroups->group; - $items = (sizeof($xml->data->group[0]->subgroups->group) <= 5) ? 5 : sizeof($xml->data->group[0]->subgroups->group); - } else { - $groups = $xml->data->group; - $items = (sizeof($xml->data->group) <= 5) ? 5 : sizeof($xml->data->group); - } - - $rows = ceil($items/5); - $fullItems = $rows * 5; - $remainder = ($items < $fullItems) ? $fullItems - $items : 0; - $i = 0; - $x = 0; - - - $colorArr = array(); - $xmlColors = $this->getConfigProperties(); - $colors = ($this->chartType == "gauge chart") ? $xmlColors->gaugeChartElementColors->color : $xmlColors->chartElementColors->color; - - foreach($colors as $color) { - $colorArr[] = str_replace("0x","#",$color); - } - - - foreach($groups as $group) { - if($i == 5) {$i = 0;} - $html .= ($i == 0) ? "" : ""; - $html .= ""; - $html .= ""; - $html .= ($x+1 == $items) ? "" : ""; - $html .= ($i == 4) ? "" : ""; - $x++; - $i++; - } - - - $html .= "
"; - $html .= "
     
"; - $html .= "
"; - $html .= $group->title; - $html .= "
"; - return $html; - } - - function saveJsonFile($jsonContents) { - - $this->jsonFilename = str_replace(".xml",".js",$this->xmlFile); - //$jsonContents = mb_convert_encoding($jsonContents, 'UTF-16LE', 'UTF-8'); - - // open file - if (!$fh = sugar_fopen($this->jsonFilename, 'w')) { - $GLOBALS['log']->debug("Cannot open file ($this->jsonFilename)"); - return; - } - - // write the contents to the file - if (fwrite($fh,$jsonContents) === FALSE) { - $GLOBALS['log']->debug("Cannot write to file ($this->jsonFilename)"); - return false; - } - - $GLOBALS['log']->debug("Success, wrote ($jsonContents) to file ($this->jsonFilename)"); - - fclose($fh); - return true; - } - - function get_image_cache_file_name ($xmlFile,$ext = ".png") { - $filename = str_replace("/xml/","/images/",str_replace(".xml",$ext,$xmlFile)); - - return $filename; - } - - - function getXMLChartProperties($xmlStr) { - $props = array(); - $xml = new SimpleXMLElement($xmlstr); - foreach($xml->properties->children() as $properties) { - $props[$properties->getName()] = $properties; - } - return $props; - } - - function processXML($xmlFile) { - - if(!file_exists($xmlFile)) { - $GLOBALS['log']->debug("Cannot open file ($xmlFile)"); - } - - $pattern = array(); - $replacement = array(); - $content = file_get_contents($xmlFile); - $content = mb_convert_encoding($content, 'UTF-8','UTF-16LE' ); - $pattern[] = '/\([a-zA-Z0-9#?&%.;\[\]\/=+_-\s]+)\<\/link\>/e'; - $replacement[] = "''.urlencode(\"$1\").''"; -// $pattern[] = '/NULL/e'; -// $replacement[] = ""; - return preg_replace($pattern,$replacement, $content); - } - - -} - -?> \ No newline at end of file diff --git a/include/SugarCharts/SugarChart.php b/include/SugarCharts/SugarChart.php index 18c05199..348a3c24 100644 --- a/include/SugarCharts/SugarChart.php +++ b/include/SugarCharts/SugarChart.php @@ -35,6 +35,12 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ +/********************************************************************************* + + * Description: + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights + * Reserved. Contributor(s): ______________________________________.. + *********************************************************************************/ class SugarChart { @@ -54,9 +60,6 @@ class SugarChart { var $currency_symbol; var $thousands_symbol; var $is_currency; - var $supports_image_export = false; - var $print_html_legend_pdf = false; - var $image_export_type = ""; public function __construct() { $this->db = &DBManagerFactory::getInstance(); @@ -78,7 +81,6 @@ class SugarChart { $this->div = 1; $this->is_currency = false; } - $this->image_export_type = (extension_loaded('gd') && function_exists('gd_info')) ? "png" : "jpg"; } function getData($query){ @@ -532,8 +534,6 @@ class SugarChart { if($this->is_currency) { $sub_amount = $this->formatNumber($this->convertCurrency($new_data[$groupByKey][$i]['total'])); $sub_amount_formatted = $this->currency_symbol . $sub_amount . 'K'; - //bug: 38877 - do not format the amount for the value as it breaks the chart - $sub_amount = $this->convertCurrency($new_data[$groupByKey][$i]['total']); } else { $sub_amount = $new_data[$groupByKey][$i]['total']; $sub_amount_formatted = $sub_amount; @@ -691,32 +691,28 @@ class SugarChart { // generate strings for chart if it does not exist global $current_language, $theme, $sugar_config,$app_strings; - $this->app_strings = $app_strings; - $this->chartStringsXML = $GLOBALS['sugar_config']['tmp_dir'].'chart_strings.' . $current_language .'.lang.xml'; - if (!file_exists($this->chartStringsXML)){ - $this->generateChartStrings($this->chartStringsXML); + $chartStringsXML = $GLOBALS['sugar_config']['tmp_dir'].'chart_strings.' . $current_language .'.lang.xml'; + if (!file_exists($chartStringsXML)){ + $this->generateChartStrings($chartStringsXML); } - - $templateFile = ""; - return $templateFile; - } - - function getDashletScript($id,$xmlFile="") { + + $this->ss->assign("chartName", $name); + $this->ss->assign("chartXMLFile", $xmlFile); + $this->ss->assign("chartStringsXML", $chartStringsXML); - $xmlFile = (!$xmlFile) ? $sugar_config['tmp_dir']. $current_user->id . '_' . $this->id . '.xml' : $xmlFile; - $chartStringsXML = $GLOBALS['sugar_config']['tmp_dir'].'chart_strings.' . $current_language .'.lang.xml'; - - $this->ss->assign('chartName', $id); - $this->ss->assign('chartXMLFile', $xmlFile); - $this->ss->assign('chartStyleCSS', SugarThemeRegistry::current()->getCSSURL('chart.css')); - $this->ss->assign('chartColorsXML', SugarThemeRegistry::current()->getImageURL('sugarColors.xml')); - $this->ss->assign('chartLangFile', $GLOBALS['sugar_config']['tmp_dir'].'chart_strings.' . $GLOBALS['current_language'] .'.lang.xml'); - - $templateFile = ""; - return $templateFile; + // chart styles and color definitions + $this->ss->assign("chartStyleCSS", SugarThemeRegistry::current()->getCSSURL('chart.css')); + $this->ss->assign("chartColorsXML", SugarThemeRegistry::current()->getImageURL('sugarColors.xml')); + + $this->ss->assign("width", $width); + $this->ss->assign("height", $height); + + $this->ss->assign("resize", $resize); + $this->ss->assign("app_strings", $app_strings); + return $this->ss->fetch('include/SugarCharts/tpls/chart.tpl'); } - - + + /** This function is used for localize all the characters in the Chart. And it can also sort all the dom_values by the sequence defined in the dom, but this may produce a lot of extra empty data in the xml file, when the chart is sorted by two key cols. If the data quantity is large, it maybe a little slow. @@ -814,28 +810,5 @@ class SugarChart { } return $data; } - - function getChartResources() { - - $resources = ""; - return $resources; - } - - function getMySugarChartResources() { - - $mySugarRources = ""; - return $mySugarResources; - } - - /** - * wrapper function to return chart array after any additional processing - * - * @param array $chartsArray array of chart config items that need processing - * @return array $chartArray after it has been process - */ - function chartArray($chartsArray) { - - return $chartsArray; - } } // end class def diff --git a/include/SugarCharts/Jit/tpls/chart.tpl b/include/SugarCharts/tpls/chart.tpl similarity index 57% rename from include/SugarCharts/Jit/tpls/chart.tpl rename to include/SugarCharts/tpls/chart.tpl index 507dccd5..7bc71159 100644 --- a/include/SugarCharts/Jit/tpls/chart.tpl +++ b/include/SugarCharts/tpls/chart.tpl @@ -35,42 +35,38 @@ ********************************************************************************/ *} +
+ + + + + + +

{$app_strings.LBL_NO_FLASH_PLAYER}

+
+
-{if !$error} - -
-
-
-
-
-
-
-{else} - -{$error} -{/if} \ No newline at end of file diff --git a/include/SugarDateTime.php b/include/SugarDateTime.php deleted file mode 100644 index 9b296ba7..00000000 --- a/include/SugarDateTime.php +++ /dev/null @@ -1,584 +0,0 @@ - "s", - "min" => "i", - "hour" => "G", - "zhour" => "H", - "day" => "j", - "zday" => "d", - "days_in_month" => "t", - "day_of_week" => "w", - "day_of_year" => "z", - "week" => "W", - "month" => "n", - "zmonth" => "m", - "year" => "Y", - "am_pm" => "A", - "hour_12" => "g", - ); - - protected $var_gets = array( - "24_hour" => "hour", - "day_of_week" => "day_of_week_long", - "day_of_week_short" => "day_of_week_short", - "month_name" => "month_long", - "hour" => "hour_12", - ); - - /** - * @var DateTimeZone - */ - protected static $_gmt; - - /** - * Calendar strings - * @var array - */ - protected $_strings; - - /** - * Copy of DateTime::createFromFormat - * - * Needed to return right type of the object - * - * @param string $format - * @param string $time - * @param DateTimeZone $timezone - * @return SugarDateTime - * @see DateTime::createFromFormat - */ - public static function createFromFormat($format, $time, DateTimeZone $timezone = null) - { - if(empty($time) || empty($format)) { - return false; - } - if(is_callable(array("DateTime", "createFromFormat"))) { - // 5.3, hurray! - if(!empty($timezone)) { - $d = parent::createFromFormat($format, $time, $timezone); - } else { - $d = parent::createFromFormat($format, $time); - } - } else { - // doh, 5.2, will have to simulate - $d = self::_createFromFormat($format, $time, $timezone); - } - if(!$d) { - return false; - } - $sd = new self("@".$d->getTimestamp()); - $sd->setTimezone($d->getTimezone()); - return $sd; - } - - protected static function _createFromFormat($format, $time, DateTimeZone $timezone = null) - { - $res = new self(); - if(!empty($timezone)) { - $res->setTimezone($timezone); - } - if(function_exists("strptime")) { - $str_format = str_replace(array_keys(TimeDate::$format_to_str), array_values(TimeDate::$format_to_str), $format); - // for a reason unknown to modern science, %P doesn't work in strptime - $str_format = str_replace("%P", "%p", $str_format); - // TODO: better way to not risk locale stuff problems? - $data = strptime($time, $str_format); - if(empty($data)) { - $GLOBALS['log']->error("Cannot parse $time for format $format"); - return null; - } - if($data["tm_year"] == 0) { - unset($data["tm_year"]); - } - if($data["tm_mday"] == 0) { - unset($data["tm_mday"]); - } - if(isset($data["tm_year"])) { - $data["tm_year"] += 1900; - } - if(isset($data["tm_mon"])) { - $data["tm_mon"]++; - } - $data += self::$data_init; // fill in missing parts - } else { - // Windows, etc. might not have strptime - we'd have to work harder here - $data = $res->_strptime($time, $format); - } - if(empty($data)) { - $GLOBALS['log']->error("Cannot parse $time for format $format"); - return null; - } - if(isset($data["tm_year"])) { - $res->setDate($data["tm_year"], $data["tm_mon"], $data["tm_mday"]); - } - $res->setTime($data["tm_hour"], $data["tm_min"], $data["tm_sec"]); - return $res; - } - - /** - * Load language strings - * @param string $name string section to return - * @return array - */ - protected function _getStrings($name) - { - if(empty($this->_strings)) { - $this->_strings = return_mod_list_strings_language($GLOBALS['current_language'],"Calendar"); - } - return $this->_strings[$name]; - } - - /** - * Fetch property of the date by name - * @param string $var Property name - */ - public function __get($var) - { - // simple formats - if(isset($this->formats[$var])) { - return $this->format($this->formats[$var]); - } - // conditional, derived and translated ones - switch($var) { - case "ts": - return $this->getTimestamp(); - case "tz_offset": - return $this->getTimezone()->getOffset($this); - case "days_in_year": - return $this->format("L") == '1'?366:365; - break; - case "day_of_week_short": - $str = $this->_getStrings('dom_cal_weekdays'); - return $str[$this->day_of_week]; - case "day_of_week_long": - $str = $this->_getStrings('dom_cal_weekdays_long'); - return $str[$this->day_of_week]; - case "month_short": - $str = $this->_getStrings('dom_cal_month'); - return $str[$this->month]; - case "month_long": - $str = $this->_getStrings('dom_cal_month_long'); - return $str[$this->month]; - } - - return ''; - } - - /** - * Implement some get_ methods that fetch variables - * - * @param string $name - * @param array $args - */ - public function __call($name, $args) - { - // fill in 5.2.x gaps - if($name == "getTimestamp") { - return (int)$this->format('U'); - } - if($name == "setTimestamp") { - $sec = (int)$args[0]; - $sd = new self("@$sec"); - $sd->setTimezone($this->getTimezone()); - return $sd; - } - - // getters - if(substr($name, 0, 4) == "get_") { - $var = substr($name, 4); - - if(isset($this->var_gets[$var])) { - return $this->__get($this->var_gets[$var]); - } - - if(isset($this->formats[$var])) { - return $this->__get($var); - } - } - $GLOBALS['log']->fatal("SugarDateTime: unknowm method $name called"); - sugar_die("SugarDateTime: unknowm method $name called"); - return false; - } - - /** - * Get specific hour of today - * @param int $hour_index - * @return SugarDateTime - */ - public function get_datetime_by_index_today($hour_index) - { - if ( $hour_index < 0 || $hour_index > 23 ) - { - sugar_die("hour is outside of range"); - } - - $newdate = clone $this; - $newdate->setTime($hour_index, 0, 0); - return $newdate; - } - - function get_hour_end_time() - { - $newdate = clone $this; - $newdate->setTime($this->hour, 59, 59); - return $newdate; - } - - function get_day_end_time() - { - $newdate = clone $this; - return $newdate->setTime(23, 59, 59); - } - - function get_day_by_index_this_week($day_index) - { - $newdate = clone $this; - $newdate->setDate($this->year, $this->month, $this->day + - ($day_index - $this->day_of_week))->setTime(0,0); - return $newdate; - } - - function get_day_by_index_this_year($month_index) - { - $newdate = clone $this; - $newdate->setDate($this->year, $month_index+1, 1); - $newdate->setDate($newdate->year, $newdate->month, $newdate->days_in_month); - $newdate->setTime(0, 0); - return $newdate; - } - - function get_day_by_index_this_month($day_index) - { - $newdate = clone $this; - return $newdate->setDate($this->year, $this->month, $day_index+1)->setTime(0, 0); - } - - /** - * Get new date, modified by date expression - * - * @example $yesterday = $today->get("yesterday"); - * - * @param string $expression - * @return SugarDateTime - */ - function get($expression) - { - $newdate = clone $this; - $newdate->modify($expression); - return $newdate; - } - - /** - * Display as DB date - * @return string - */ - function get_mysql_date() - { - return $this->format(TimeDate::DB_DATE_FORMAT); - } - - /** - * Create from ISO 8601 datetime - * @param string $str - * @return SugarDateTime - */ - static public function parse_utc_date_time($str) - { - return new self($str); - } - - /** - * Create a list of time slots for calendar view - * Times must be in user TZ - * @param string $view Which view we are using - day, week, month - * @param SugarDateTime $start_time Start time - * @param SugarDateTime $end_time End time - */ - static function getHashList($view, $start_time, $end_time) - { - $hash_list = array(); - - if ( $view != 'day') - { - $end_time = $end_time->get_day_end_time(); - } - - $end = $end_time->ts; - if($end <= $start_time->ts) { - $end = $start_time->ts+1; - } - - $new_time = clone $start_time; - $new_time->setTime($new_time->hour, 0, 0); - - while ($new_time->ts < $end) { - if ($view == 'day') { - $hash_list[] = $new_time->get_mysql_date() . ":" . $new_time->hour; - $new_time->modify("next hour"); - } else { - $hash_list[] = $new_time->get_mysql_date(); - $new_time->modify("next day"); - } - } - - return $hash_list; - } - - /** - * Get the beginning of the given day - */ - function get_day_begin($day = null, $month = null, $year = null) - { - $newdate = clone $this; - $newdate->setDate( - $year?$year:$this->year, - $month?$month:$this->month, - $day?$day:$this->day); - $newdate->setTime(0, 0); - return $newdate; - } - - /** - * Get the last timestamp of the given day - */ - function get_day_end($day = null, $month = null, $year = null) - { - $newdate = clone $this; - $newdate->setDate( - $year?$year:$this->year, - $month?$month:$this->month, - $day?$day:$this->day); - $newdate->setTime(23, 59, 59); - return $newdate; - } - - function get_year_begin($year) - { - $newdate = clone $this; - $newdate->setDate($this->year, 1, 1); - $newdate->setTime(0,0); - return $newdate; - } - /* - * Print datetime in standard DB format - * - * Set $tz parameter to false if you are sure if the date is in UTC. - * - * @param bool $tz do conversion to UTC - * @return string - */ - function asDb($tz = true) - { - if($tz) { - if(empty(self::$_gmt)) { - self::$_gmt = new DateTimeZone("UTC"); - } - $this->setTimezone(self::$_gmt); - } - return $this->format(TimeDate::DB_DATETIME_FORMAT); - } - - /** - * Get query string for the date - * @return string - */ - function get_date_str() - { - return sprintf("&year=%d&month=%d&day=%d&hour=%d", $this->year, $this->month, $this->day, $this->hour); - } - - function __toString() - { - return $this->format('r'); - } - - protected static $parts_match = array( - 'Y' => 'tm_year', - 'm' => 'tm_mon', - 'n' => 'tm_mon', - 'd' => 'tm_mday', - 'H' => 'tm_hour', - 'h' => 'tm_hour', - 'i' => 'tm_min', - 's' => 'tm_sec', - ); - - protected static $data_init = array( - "tm_hour" => 0, - "tm_min" => 0, - "tm_sec" => 0, - ); - - protected static $strptime_short_mon, $strptime_long_mon; - /** - * DateTime homebrew parser - * - * Since some OSes and PHP versions (please upgrade to 5.3!) do not support built-in parsing functions, - * we have to restort to this ugliness. - * - * @param string $format - * @param string $time - * @return array Parsed parts - */ - protected function _strptime($time, $format) - { - $data = self::$data_init; - if(empty(self::$strptime_short_mon)) { - self::$strptime_short_mon = array_flip($this->_getStrings('dom_cal_month')); - unset(self::$strptime_short_mon[""]); - } - if(empty(self::$strptime_long_mon)) { - self::$strptime_long_mon = array_flip($this->_getStrings('dom_cal_month_long')); - unset(self::$strptime_long_mon[""]); - } - - $regexp = TimeDate::get_regular_expression($format); - if(!preg_match('@'.$regexp['format'].'@', $time, $dateparts)) { - return false; - } - - foreach(self::$parts_match as $part => $datapart) { - if (isset($regexp['positions'][$part]) && isset($dateparts[$regexp['positions'][$part]])) { - $data[$datapart] = (int)$dateparts[$regexp['positions'][$part]]; - } - } - // now process non-numeric ones - if ( isset($regexp['positions']['F']) && !empty($dateparts[$regexp['positions']['F']])) { - // FIXME: locale? - $mon = $dateparts[$regexp['positions']['F']]; - if(isset(self::$sugar_strptime_long_mon[$mon])) { - $data["tm_mon"] = self::$sugar_strptime_long_mon[$mon]; - } else { - return false; - } - } - if ( isset($regexp['positions']['M']) && !empty($dateparts[$regexp['positions']['M']])) { - // FIXME: locale? - $mon = $dateparts[$regexp['positions']['M']]; - if(isset(self::$sugar_strptime_short_mon[$mon])) { - $data["tm_mon"] = self::$sugar_strptime_short_mon[$mon]; - } else { - return false; - } - } - if ( isset($regexp['positions']['a']) && !empty($dateparts[$regexp['positions']['a']])) { - $ampm = $dateparts[$regexp['positions']['a']]; - if($ampm == 'pm') { - if($data["tm_hour"] != 12) $data["tm_hour"] += 12; - } else if($ampm == 'am') { - if($data["tm_hour"] == 12) { - // 12:00am is 00:00 - $data["tm_hour"] = 0; - } - } else { - return false; - } - } - - if ( isset($regexp['positions']['A']) && !empty($dateparts[$regexp['positions']['A']])) { - $ampm = $dateparts[$regexp['positions']['A']]; - if($ampm == 'PM') { - if($data["tm_hour"] != 12) $data["tm_hour"] += 12; - } else if($ampm == 'AM') { - if($data["tm_hour"] == 12) { - // 12:00am is 00:00 - $data["tm_hour"] = 0; - } - } else { - return false; - } - } - - return $data; - } - - // 5.2 compatibility - 5.2 functions don't return $this, let's help them - - /** - * (non-PHPdoc) - * @see DateTime::setDate() - * @return SugarDateTime - */ - public function setDate ($year, $month, $day) - { - parent::setDate($year, $month, $day); - return $this; - } - - /** - * (non-PHPdoc) - * @see DateTime::setTime() - * @return SugarDateTime - */ - public function setTime($hour, $minute, $sec = 0) - { - parent::setTime($hour, $minute, $sec); - return $this; - } - - /** - * (non-PHPdoc) - * @see DateTime::modify() - * @return SugarDateTime - */ - public function modify($modify) - { - if(PHP_VERSION_ID >= 50300 || $modify != 'first day of next month') { - parent::modify($modify); - } else { - /* PHP 5.2 does not understand 'first day of' and defaults need it */ - $this->setDate($this->year, $this->month+1, 1); - } - return $this; - } - - /** - * (non-PHPdoc) - * @see DateTime::setTimezone() - * @return SugarDateTime - */ - public function setTimezone (DateTimeZone $timezone) - { - parent::setTimezone($timezone); - return $this; - } - -} diff --git a/include/SugarEmailAddress/SugarEmailAddress.php b/include/SugarEmailAddress/SugarEmailAddress.php index ef96d227..200c95d3 100644 --- a/include/SugarEmailAddress/SugarEmailAddress.php +++ b/include/SugarEmailAddress/SugarEmailAddress.php @@ -51,16 +51,17 @@ class SugarEmailAddress extends SugarBean { var $module_name = "EmailAddresses"; var $module_dir = 'EmailAddresses'; var $object_name = 'EmailAddress'; - - //bug 40068, According to rules in page 6 of http://www.apps.ietf.org/rfc/rfc3696.html#sec-3, + + //bug 40068, According to rules in page 6 of http://www.apps.ietf.org/rfc/rfc3696.html#sec-3, //allowed special characters ! # $ % & ' * + - / = ? ^ _ ` . { | } ~ in local part var $regex = "/^(['\.\-\+&'#!\$\*=\?\^_`\{\}~\/\w]+)*@((\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|\w+([\.-]?\w+)*(\.[\w-]{2,})+)\$/"; - var $disable_custom_fields = true; + var $db; var $smarty; + var $addresses = array(); // array of emails var $view = ''; - + static $count = 0; /** @@ -83,7 +84,7 @@ class SugarEmailAddress extends SugarBean { $this->addresses = array(); $optOut = (isset($bean->email_opt_out) && $bean->email_opt_out == "1") ? true : false; $invalid = (isset($bean->invalid_email) && $bean->invalid_email == "1") ? true : false; - + $isPrimary = true; for($i = 1; $i <= 10; $i++){ $email = 'email'.$i; @@ -117,7 +118,7 @@ class SugarEmailAddress extends SugarBean { return; } - + function populateLegacyFields(&$bean){ $primary_found = false; $alternate_found = false; @@ -154,7 +155,7 @@ class SugarEmailAddress extends SugarBean { } } } - + /** * Saves email addresses for a parent bean * @param string $id Parent bean ID @@ -168,7 +169,7 @@ class SugarEmailAddress extends SugarBean { if(empty($this->addresses) || $in_workflow){ $this->populateAddresses($id, $module, $new_addrs,$primary); } - + //find all email addresses.. $current_links=array(); // Need to correct this to handle the Employee/User split @@ -195,8 +196,7 @@ class SugarEmailAddress extends SugarBean { unset($current_links[$emailId]); } else { - $now = TimeDate::getInstance()->nowDb(); - $upd_eabr = "INSERT INTO email_addr_bean_rel (id, email_address_id,bean_id, bean_module,primary_address,reply_to_address,date_created,date_modified,deleted) VALUES('{$guid}', '{$emailId}', '{$id}', '{$module}', {$address['primary_address']}, {$address['reply_to_address']}, '$now', '$now', 0)"; + $upd_eabr = "INSERT INTO email_addr_bean_rel (id, email_address_id,bean_id, bean_module,primary_address,reply_to_address,date_created,date_modified,deleted) VALUES('{$guid}', '{$emailId}', '{$id}', '{$module}', {$address['primary_address']}, {$address['reply_to_address']}, '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."', '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."', 0)"; } if (!empty($upd_eabr)) { @@ -343,14 +343,14 @@ class SugarEmailAddress extends SugarBean { $module = $this->getCorrectedModule($module); //One last check for the ConvertLead action in which case we need to change $module to 'Leads' $module = (isset($_REQUEST) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'ConvertLead') ? 'Leads' : $module; - + $post_from_email_address_widget = (isset($_REQUEST) && isset($_REQUEST['emailAddressWidget'])) ? true : false; $primaryValue = $primary; $widgetCount = 0; $hasEmailValue = false; - + if (isset($_REQUEST) && isset($_REQUEST[$module .'_email_widget_id'])) { - + $fromRequest = false; // determine which array to process foreach($_REQUEST as $k => $v) { @@ -358,48 +358,48 @@ class SugarEmailAddress extends SugarBean { $fromRequest = true; break; } - } - $widget_id = $_REQUEST[$module .'_email_widget_id']; - - + } + + $widget_id = $_REQUEST[$module .'_email_widget_id']; + //Iterate over the widgets for this module, in case there are multiple email widgets for this module while(isset($_REQUEST[$module . $widget_id . "emailAddress" . $widgetCount])) { if (empty($_REQUEST[$module . $widget_id . "emailAddress" . $widgetCount])) { - $widgetCount++; - continue; + $widgetCount++; + continue; } $hasEmailValue = true; - + $eId = $module . $widget_id; if(isset($_REQUEST[$eId . 'emailAddressPrimaryFlag'])) { $primaryValue = $_REQUEST[$eId . 'emailAddressPrimaryFlag']; } else if(isset($_REQUEST[$module . 'emailAddressPrimaryFlag'])) { $primaryValue = $_REQUEST[$module . 'emailAddressPrimaryFlag']; } - + $optOutValues = array(); if(isset($_REQUEST[$eId .'emailAddressOptOutFlag'])) { $optOutValues = $_REQUEST[$eId .'emailAddressOptOutFlag']; } else if(isset($_REQUEST[$module . 'emailAddressOptOutFlag'])) { $optOutValues = $_REQUEST[$module . 'emailAddressOptOutFlag']; } - + $invalidValues = array(); if(isset($_REQUEST[$eId .'emailAddressInvalidFlag'])) { $invalidValues = $_REQUEST[$eId .'emailAddressInvalidFlag']; } else if(isset($_REQUEST[$module . 'emailAddressInvalidFlag'])) { $invalidValues = $_REQUEST[$module . 'emailAddressInvalidFlag']; } - + $deleteValues = array(); if(isset($_REQUEST[$eId .'emailAddressDeleteFlag'])) { $deleteValues = $_REQUEST[$eId .'emailAddressDeleteFlag']; } else if(isset($_REQUEST[$module . 'emailAddressDeleteFlag'])) { $deleteValues = $_REQUEST[$module . 'emailAddressDeleteFlag']; } - + // prep from form save $primaryField = $primary; $replyToField = ''; @@ -408,7 +408,7 @@ class SugarEmailAddress extends SugarBean { if($fromRequest && empty($primary) && isset($primaryValue)) { $primaryField = $primaryValue; } - + if($fromRequest && empty($replyTo)) { if(isset($_REQUEST[$eId .'emailAddressReplyToFlag'])) { $replyToField = $_REQUEST[$eId .'emailAddressReplyToFlag']; @@ -423,7 +423,7 @@ class SugarEmailAddress extends SugarBean { } } } - + if($fromRequest && empty($new_addrs)) { foreach($_REQUEST as $k => $v) { if(preg_match('/'.$eId.'emailAddressVerifiedValue[0-9]+$/i', $k) && !empty($v)) { @@ -433,7 +433,7 @@ class SugarEmailAddress extends SugarBean { } } } - + //empty the addresses array if the post happened from email address widget. if($post_from_email_address_widget) { $this->addresses=array(); //this gets populated during retrieve of the contact bean. @@ -471,15 +471,15 @@ class SugarEmailAddress extends SugarBean { } } //foreach } - + $widgetCount++; }//End of Widget for loop } - + //If no widgets, set addresses array to empty if($post_from_email_address_widget && !$hasEmailValue) { $this->addresses = array(); - } + } } /** @@ -536,7 +536,7 @@ class SugarEmailAddress extends SugarBean { if(!empty($a)) { if(isset($a['invalid_email']) && isset($addressMeta['invalid_email']) && isset($addressMeta['opt_out']) && $a['invalid_email'] != $addressMeta['invalid_email'] || $a['opt_out'] != $addressMeta['opt_out']) { - $qUpdate = "UPDATE email_addresses SET invalid_email = {$addressMeta['invalid_email']}, opt_out = {$addressMeta['opt_out']}, date_modified = '".TimeDate::getInstance()->nowDb()."' WHERE id = '{$a['id']}'"; + $qUpdate = "UPDATE email_addresses SET invalid_email = {$addressMeta['invalid_email']}, opt_out = {$addressMeta['opt_out']}, date_modified = '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."' WHERE id = '{$a['id']}'"; $rUpdate = $this->db->query($qUpdate); } } @@ -545,16 +545,6 @@ class SugarEmailAddress extends SugarBean { } } - public function splitEmailAddress($addr) - { - $email = $this->_cleanAddress($addr); - if(!preg_match($this->regex, $email)) { - $email = ''; // remove bad email addr - } - $name = trim(str_replace(array($email, '<', '>', '"', "'"), '', $addr)); - return array("name" => $name, "email" => strtolower($email)); - } - /** * PRIVATE UTIL * Normalizes an RFC-clean email address, returns a string that is the email address only @@ -565,11 +555,11 @@ class SugarEmailAddress extends SugarBean { $addr = trim(from_html($addr)); if(strpos($addr, "<") !== false && strpos($addr, ">") !== false) { - $address = trim(substr($addr, strrpos($addr, "<") +1, strrpos($addr, ">") - strrpos($addr, "<") -1)); + $address = trim(substr($addr, strpos($addr, "<") +1, strpos($addr, ">") - strpos($addr, "<") -1)); } else { $address = trim($addr); } - + return $address; } @@ -594,9 +584,8 @@ class SugarEmailAddress extends SugarBean { $guid = create_guid(); $address = $GLOBALS['db']->quote($address); $addressCaps = $GLOBALS['db']->quote($addressCaps); - $now = TimeDate::getInstance()->nowDb(); $qa = "INSERT INTO email_addresses (id, email_address, email_address_caps, date_created, date_modified, deleted) - VALUES('{$guid}', '{$address}', '{$addressCaps}', '$now', '$now', 0)"; + VALUES('{$guid}', '{$address}', '{$addressCaps}', '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."', '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."', 0)"; $ra = $this->db->query($qa); } return $guid; @@ -613,9 +602,8 @@ class SugarEmailAddress extends SugarBean { $a = $this->db->fetchByAssoc($r); if(!empty($a) && !empty($a['id'])) { //verify the opt out and invalid flags. - //bug# 39378- did not allow change of case of an email address - if ($a['invalid_email'] != $invalid or $a['opt_out'] != $opt_out or strcasecmp(trim($a['email_address']), trim($address))==0) { - $upd_q="update email_addresses set email_address='{$address}', invalid_email={$invalid}, opt_out={$opt_out},date_modified = '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."' where id='{$a['id']}'"; + if ($a['invalid_email'] != $invalid or $a['opt_out'] != $opt_out) { + $upd_q="update email_addresses set invalid_email={$invalid}, opt_out={$opt_out},date_modified = '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."' where id='{$a['id']}'"; $upd_r= $this->db->query($upd_q); } return $a['id']; @@ -625,9 +613,8 @@ class SugarEmailAddress extends SugarBean { $guid = create_guid(); $address = $GLOBALS['db']->quote($address); $addressCaps = $GLOBALS['db']->quote($addressCaps); - $now = TimeDate::getInstance()->nowDb(); $qa = "INSERT INTO email_addresses (id, email_address, email_address_caps, date_created, date_modified, deleted, invalid_email, opt_out) - VALUES('{$guid}', '{$address}', '{$addressCaps}', '$now', '$now', 0 , $invalid, $opt_out)"; + VALUES('{$guid}', '{$address}', '{$addressCaps}', '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."', '".gmdate($GLOBALS['timedate']->get_db_date_time_format())."', 0 , $invalid, $opt_out)"; $this->db->query($qa); } return $guid; @@ -685,9 +672,8 @@ class SugarEmailAddress extends SugarBean { $return = array(); $module = $this->getCorrectedModule($module); - $q = "SELECT ea.email_address, ea.email_address_caps, ea.invalid_email, ea.opt_out, ea.date_created, ea.date_modified, - ear.id, ear.email_address_id, ear.bean_id, ear.bean_module, ear.primary_address, ear.reply_to_address, ear.deleted - FROM email_addresses ea LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id + $q = "SELECT ea.*, ear.* FROM email_addresses ea + LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id WHERE ear.bean_module = '{$module}' AND ear.bean_id = '{$id}' AND ear.deleted = 0 @@ -708,15 +694,14 @@ class SugarEmailAddress extends SugarBean { * @param bool asMetadata Default false * @return string HTML/JS for widget */ - function getEmailAddressWidgetEditView($id, $module, $asMetadata=false, $tpl='',$tabindex='') + function getEmailAddressWidgetEditView($id, $module, $asMetadata=false, $tpl='',$tabindex='') { if ( !($this->smarty instanceOf Sugar_Smarty ) ) $this->smarty = new Sugar_Smarty(); - + global $app_strings, $dictionary, $beanList; - - $prefill = 'false'; - + + $prefill = 'false'; $prefillData = 'new Object()'; $passedModule = $module; $module = $this->getCorrectedModule($module); @@ -729,10 +714,10 @@ class SugarEmailAddress extends SugarBean { if(!empty($id)) { $prefillDataArr = $this->getAddressesByGUID($id, $module); //When coming from convert leads, sometimes module is Contacts while the id is for a lead. - if (empty($prefillDataArr) && $module == "Contacts") - $prefillDataArr = $this->getAddressesByGUID($id, "Leads"); - } else if(isset($_REQUEST['full_form']) && !empty($_REQUEST['emailAddressWidget'])){ - $widget_id = isset($_REQUEST[$module . '_email_widget_id']) ? $_REQUEST[$module . '_email_widget_id'] : '0'; + if (empty($prefillDataArr) && $module == "Contacts") + $prefillDataArr = $this->getAddressesByGUID($id, "Leads"); + } else if(isset($_REQUEST['full_form']) && !empty($_REQUEST['emailAddressWidget'])){ + $widget_id = isset($_REQUEST[$module . '_email_widget_id']) ? $_REQUEST[$module . '_email_widget_id'] : '0'; $count = 0; $key = $module . $widget_id . 'emailAddress'.$count; while(isset($_REQUEST[$key])) { @@ -746,13 +731,13 @@ class SugarEmailAddress extends SugarBean { $key = $module . $widget_id . 'emailAddress' . ++$count; } //while } - + if(!empty($prefillDataArr)) { $json = new JSON(JSON_LOOSE_TYPE); $prefillData = $json->encode($prefillDataArr); $prefill = !empty($prefillDataArr) ? 'true' : 'false'; } - + $required = false; $vardefs = $dictionary[$beanList[$passedModule]]['fields']; if (!empty($vardefs['email1']) && isset($vardefs['email1']['required']) && $vardefs['email1']['required']) @@ -768,10 +753,10 @@ class SugarEmailAddress extends SugarBean { //Set addDefaultAddress flag (do not add if it's from the Email module) $this->smarty->assign('addDefaultAddress', (isset($_REQUEST['module']) && $_REQUEST['module'] == 'Emails') ? 'false' : 'true'); $form = $this->view; - - if ($this->view == "QuickCreate") - $form = 'form_'.$this->view .'_'.$module; - $this->smarty->assign('emailView', $form); + if ($this->view == "QuickCreate") + $form = 'form_'.$this->view .'_'.$module; + $this->smarty->assign('emailView', $form); + if($module == 'Users') { $this->smarty->assign('useReplyTo', true); @@ -782,8 +767,8 @@ class SugarEmailAddress extends SugarBean { $template = empty($tpl) ? "include/SugarEmailAddress/templates/forEditView.tpl" : $tpl; $newEmail = $this->smarty->fetch($template); - - + + if($asMetadata) { // used by Email 2.0 $ret = array(); @@ -818,7 +803,6 @@ class SugarEmailAddress extends SugarBean { $key = ($addressItem['reply_to_address'] == 1) ? 'reply_to' : $key; $key = ($addressItem['opt_out'] == 1) ? 'opt_out' : $key; $key = ($addressItem['invalid_email'] == 1) ? 'invalid' : $key; - $key = ($addressItem['opt_out'] == 1) && ($addressItem['invalid_email'] == 1) ? 'opt_out_invalid' : $key; $assign[] = array('key' => $key, 'address' => $current_user->getEmailLink2($addressItem['email_address'], $focus).$addressItem['email_address'].""); } @@ -837,7 +821,7 @@ class SugarEmailAddress extends SugarBean { * @param object $focus Bean in focus * @return string HTML that contains hidden input values based off of HTML request */ - function getEmailAddressWidgetDuplicatesView($focus) + function getEmailAddressWidgetDuplicatesView($focus) { if ( !($this->smarty instanceOf Sugar_Smarty ) ) $this->smarty = new Sugar_Smarty(); @@ -852,11 +836,11 @@ class SugarEmailAddress extends SugarBean { $widget_id = $_POST[$mod .'_email_widget_id']; $this->smarty->assign('email_widget_id',$widget_id); $this->smarty->assign('emailAddressWidget',$_POST['emailAddressWidget']); - + if(isset($_POST[$mod . $widget_id . 'emailAddressPrimaryFlag'])) { $primary = $_POST[$mod . $widget_id . 'emailAddressPrimaryFlag']; } - + while(isset($_POST[$mod . $widget_id . "emailAddress" . $count])) { $emails[] = $_POST[$mod . $widget_id . 'emailAddress' . $count]; $count++; @@ -865,7 +849,7 @@ class SugarEmailAddress extends SugarBean { if($count == 0) { return ""; } - + if(isset($_POST[$mod . $widget_id . 'emailAddressOptOutFlag'])) { foreach($_POST[$mod . $widget_id . 'emailAddressOptOutFlag'] as $v) { $optOut[] = $v; @@ -877,19 +861,19 @@ class SugarEmailAddress extends SugarBean { $invalid[] = $v; } } - + if(isset($_POST[$mod . $widget_id . 'emailAddressReplyToFlag'])) { foreach($_POST[$mod . $widget_id . 'emailAddressReplyToFlag'] as $v) { $replyTo[] = $v; } } - + if(isset($_POST[$mod . $widget_id . 'emailAddressDeleteFlag'])) { foreach($_POST[$mod . $widget_id . 'emailAddressDeleteFlag'] as $v) { $delete[] = $v; } } - + while(isset($_POST[$mod . $widget_id . "emailAddressVerifiedValue" . $count])) { $verified[] = $_POST[$mod . $widget_id . 'emailAddressVerifiedValue' . $count]; $count++; @@ -915,16 +899,16 @@ class SugarEmailAddress extends SugarBean { $get = ""; $count = 0; $mod = isset($focus) ? $focus->module_dir : ""; - + $widget_id = $_POST[$mod .'_email_widget_id']; $get .= '&' . $mod . '_email_widget_id='. $widget_id; $get .= '&emailAddressWidget='.$_POST['emailAddressWidget']; - + while(isset($_REQUEST[$mod . $widget_id . 'emailAddress' . $count])) { $get .= "&" . $mod . $widget_id . "emailAddress" . $count . "=" . urlencode($_REQUEST[$mod . $widget_id . 'emailAddress' . $count]); $count++; } //while - + while(isset($_REQUEST[$mod . $widget_id . 'emailAddressVerifiedValue' . $count])) { $get .= "&" . $mod . $widget_id . "emailAddressVerifiedValue" . $count . "=" . urlencode($_REQUEST[$mod . $widget_id . 'emailAddressVerifiedValue' . $count]); $count++; @@ -976,11 +960,11 @@ class SugarEmailAddress extends SugarBean { function getEmailAddressWidget($focus, $field, $value, $view, $tabindex='') { $sea = new SugarEmailAddress(); $sea->setView($view); - + if($view == 'EditView' || $view == 'QuickCreate' || $view == 'ConvertLead') { $module = $focus->module_dir; if ($view == 'ConvertLead' && $module == "Contacts") $module = "Leads"; - + return $sea->getEmailAddressWidgetEditView($focus->id, $module, false,'',$tabindex); } diff --git a/include/SugarEmailAddress/templates/forDetailView.tpl b/include/SugarEmailAddress/templates/forDetailView.tpl index bbc6baf0..06eefaa9 100644 --- a/include/SugarEmailAddress/templates/forDetailView.tpl +++ b/include/SugarEmailAddress/templates/forDetailView.tpl @@ -40,7 +40,7 @@ {foreach from=$emailAddresses item=address} - {if $address.key === 'opt_out' || $address.key === 'invalid' || $address.key === 'opt_out_invalid'} + {if $address.key === 'opt_out'} {elseif $address.key === 'primary'} @@ -51,15 +51,13 @@ {$address.address} {if $address.key === 'primary'} -  ({$app_strings.LBL_EMAIL_PRIMARY})‎ +
 ({$app_strings.LBL_EMAIL_PRIMARY}) {elseif $address.key === 'reply_to'} -  ({$app_strings.LBL_EMAIL_REPLY_TO})‎ +  ({$app_strings.LBL_EMAIL_REPLY_TO}) {elseif $address.key === 'opt_out'} -  ({$app_strings.LBL_EMAIL_OPT_OUT})‎ +  ({$app_strings.LBL_EMAIL_OPT_OUT}) {elseif $address.key === 'invalid'} -  ({$app_strings.LBL_EMAIL_INVALID})‎ - {elseif $address.key === 'opt_out_invalid'} -  ({$app_strings.LBL_EMAIL_OPT_OUT_AND_INVALID})‎ + ({$app_strings.LBL_EMAIL_INVALID}) {/if} diff --git a/include/SugarFields/Fields/Address/DetailView.tpl b/include/SugarFields/Fields/Address/DetailView.tpl index 7b93cf46..e69ac350 100644 --- a/include/SugarFields/Fields/Address/DetailView.tpl +++ b/include/SugarFields/Fields/Address/DetailView.tpl @@ -38,13 +38,9 @@ '; - return html; - }, - - /** - * Renders the row footer for a week. - * @method renderRowFooter - * @param {Number} weekNum The week number of the current row - * @param {Array} cell The current working HTML array - */ - renderRowFooter : function(weekNum, html) { - html[html.length] = ''; - return html; - }, - - /** - * Renders a single standard calendar cell in the calendar widget table. - * All logic for determining how a standard default cell will be rendered is - * encapsulated in this method, and must be accounted for when extending the - * widget class. - * @method renderCellDefault - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - renderCellDefault : function(workingDate, cell) { - cell.innerHTML = '' + this.buildDayLabel(workingDate) + ""; - }, - - /** - * Styles a selectable cell. - * @method styleCellDefault - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - styleCellDefault : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_SELECTABLE); - }, - - - /** - * Renders a single standard calendar cell using the CSS hightlight1 style - * @method renderCellStyleHighlight1 - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - renderCellStyleHighlight1 : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT1); - }, - - /** - * Renders a single standard calendar cell using the CSS hightlight2 style - * @method renderCellStyleHighlight2 - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - renderCellStyleHighlight2 : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT2); - }, - - /** - * Renders a single standard calendar cell using the CSS hightlight3 style - * @method renderCellStyleHighlight3 - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - renderCellStyleHighlight3 : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT3); - }, - - /** - * Renders a single standard calendar cell using the CSS hightlight4 style - * @method renderCellStyleHighlight4 - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - renderCellStyleHighlight4 : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4); - }, - - /** - * Applies the default style used for rendering today's date to the current calendar cell - * @method renderCellStyleToday - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - */ - renderCellStyleToday : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_TODAY); - }, - - /** - * Applies the default style used for rendering selected dates to the current calendar cell - * @method renderCellStyleSelected - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - * @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering - * should not be terminated - */ - renderCellStyleSelected : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_SELECTED); - }, - - /** - * Applies the default style used for rendering dates that are not a part of the current - * month (preceding or trailing the cells for the current month) - * @method renderCellNotThisMonth - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - * @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering - * should not be terminated - */ - renderCellNotThisMonth : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_OOM); - cell.innerHTML=workingDate.getDate(); - return Calendar.STOP_RENDER; - }, - - /** - * Renders the current calendar cell as a non-selectable "black-out" date using the default - * restricted style. - * @method renderBodyCellRestricted - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - * @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering - * should not be terminated - */ - renderBodyCellRestricted : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL); - Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED); - cell.innerHTML=workingDate.getDate(); - return Calendar.STOP_RENDER; - }, - - // END BUILT-IN TABLE CELL RENDERERS - - // BEGIN MONTH NAVIGATION METHODS - - /** - * Adds the designated number of months to the current calendar month, and sets the current - * calendar page date to the new month. - * @method addMonths - * @param {Number} count The number of months to add to the current calendar - */ - addMonths : function(count) { - var cfgPageDate = DEF_CFG.PAGEDATE.key, - - prevDate = this.cfg.getProperty(cfgPageDate), - newDate = DateMath.add(prevDate, DateMath.MONTH, count); - - this.cfg.setProperty(cfgPageDate, newDate); - this.resetRenderers(); - this.changePageEvent.fire(prevDate, newDate); - }, - - /** - * Subtracts the designated number of months from the current calendar month, and sets the current - * calendar page date to the new month. - * @method subtractMonths - * @param {Number} count The number of months to subtract from the current calendar - */ - subtractMonths : function(count) { - this.addMonths(-1*count); - }, - - /** - * Adds the designated number of years to the current calendar, and sets the current - * calendar page date to the new month. - * @method addYears - * @param {Number} count The number of years to add to the current calendar - */ - addYears : function(count) { - var cfgPageDate = DEF_CFG.PAGEDATE.key, - - prevDate = this.cfg.getProperty(cfgPageDate), - newDate = DateMath.add(prevDate, DateMath.YEAR, count); - - this.cfg.setProperty(cfgPageDate, newDate); - this.resetRenderers(); - this.changePageEvent.fire(prevDate, newDate); - }, - - /** - * Subtcats the designated number of years from the current calendar, and sets the current - * calendar page date to the new month. - * @method subtractYears - * @param {Number} count The number of years to subtract from the current calendar - */ - subtractYears : function(count) { - this.addYears(-1*count); - }, - - /** - * Navigates to the next month page in the calendar widget. - * @method nextMonth - */ - nextMonth : function() { - this.addMonths(1); - }, - - /** - * Navigates to the previous month page in the calendar widget. - * @method previousMonth - */ - previousMonth : function() { - this.addMonths(-1); - }, - - /** - * Navigates to the next year in the currently selected month in the calendar widget. - * @method nextYear - */ - nextYear : function() { - this.addYears(1); - }, - - /** - * Navigates to the previous year in the currently selected month in the calendar widget. - * @method previousYear - */ - previousYear : function() { - this.addYears(-1); - }, - - // END MONTH NAVIGATION METHODS - - // BEGIN SELECTION METHODS - - /** - * Resets the calendar widget to the originally selected month and year, and - * sets the calendar to the initial selection(s). - * @method reset - */ - reset : function() { - this.cfg.resetProperty(DEF_CFG.SELECTED.key); - this.cfg.resetProperty(DEF_CFG.PAGEDATE.key); - this.resetEvent.fire(); - }, - - /** - * Clears the selected dates in the current calendar widget and sets the calendar - * to the current month and year. - * @method clear - */ - clear : function() { - this.cfg.setProperty(DEF_CFG.SELECTED.key, []); - this.cfg.setProperty(DEF_CFG.PAGEDATE.key, new Date(this.today.getTime())); - this.clearEvent.fire(); - }, - - /** - * Selects a date or a collection of dates on the current calendar. This method, by default, - * does not call the render method explicitly. Once selection has completed, render must be - * called for the changes to be reflected visually. - * - * Any dates which are OOB (out of bounds, not selectable) will not be selected and the array of - * selected dates passed to the selectEvent will not contain OOB dates. - * - * If all dates are OOB, the no state change will occur; beforeSelect and select events will not be fired. - * - * @method select - * @param {String/Date/Date[]} date The date string of dates to select in the current calendar. Valid formats are - * individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006). - * Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005). - * This method can also take a JavaScript Date object or an array of Date objects. - * @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected. - */ - select : function(date) { - - var aToBeSelected = this._toFieldArray(date), - validDates = [], - selected = [], - cfgSelected = DEF_CFG.SELECTED.key; - - - for (var a=0; a < aToBeSelected.length; ++a) { - var toSelect = aToBeSelected[a]; - - if (!this.isDateOOB(this._toDate(toSelect))) { - - if (validDates.length === 0) { - this.beforeSelectEvent.fire(); - selected = this.cfg.getProperty(cfgSelected); - } - validDates.push(toSelect); - - if (this._indexOfSelectedFieldArray(toSelect) == -1) { - selected[selected.length] = toSelect; - } - } - } - - - if (validDates.length > 0) { - if (this.parent) { - this.parent.cfg.setProperty(cfgSelected, selected); - } else { - this.cfg.setProperty(cfgSelected, selected); - } - this.selectEvent.fire(validDates); - } - - return this.getSelectedDates(); - }, - - /** - * Selects a date on the current calendar by referencing the index of the cell that should be selected. - * This method is used to easily select a single cell (usually with a mouse click) without having to do - * a full render. The selected style is applied to the cell directly. - * - * If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month - * or out of bounds cells), it will not be selected and in such a case beforeSelect and select events will not be fired. - * - * @method selectCell - * @param {Number} cellIndex The index of the cell to select in the current calendar. - * @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected. - */ - selectCell : function(cellIndex) { - - var cell = this.cells[cellIndex], - cellDate = this.cellDates[cellIndex], - dCellDate = this._toDate(cellDate), - selectable = Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE); - - - if (selectable) { - - this.beforeSelectEvent.fire(); - - var cfgSelected = DEF_CFG.SELECTED.key; - var selected = this.cfg.getProperty(cfgSelected); - - var selectDate = cellDate.concat(); - - if (this._indexOfSelectedFieldArray(selectDate) == -1) { - selected[selected.length] = selectDate; - } - if (this.parent) { - this.parent.cfg.setProperty(cfgSelected, selected); - } else { - this.cfg.setProperty(cfgSelected, selected); - } - this.renderCellStyleSelected(dCellDate,cell); - this.selectEvent.fire([selectDate]); - - this.doCellMouseOut.call(cell, null, this); - } - - return this.getSelectedDates(); - }, - - /** - * Deselects a date or a collection of dates on the current calendar. This method, by default, - * does not call the render method explicitly. Once deselection has completed, render must be - * called for the changes to be reflected visually. - * - * The method will not attempt to deselect any dates which are OOB (out of bounds, and hence not selectable) - * and the array of deselected dates passed to the deselectEvent will not contain any OOB dates. - * - * If all dates are OOB, beforeDeselect and deselect events will not be fired. - * - * @method deselect - * @param {String/Date/Date[]} date The date string of dates to deselect in the current calendar. Valid formats are - * individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006). - * Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005). - * This method can also take a JavaScript Date object or an array of Date objects. - * @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected. - */ - deselect : function(date) { - - var aToBeDeselected = this._toFieldArray(date), - validDates = [], - selected = [], - cfgSelected = DEF_CFG.SELECTED.key; - - - for (var a=0; a < aToBeDeselected.length; ++a) { - var toDeselect = aToBeDeselected[a]; - - if (!this.isDateOOB(this._toDate(toDeselect))) { - - if (validDates.length === 0) { - this.beforeDeselectEvent.fire(); - selected = this.cfg.getProperty(cfgSelected); - } - - validDates.push(toDeselect); - - var index = this._indexOfSelectedFieldArray(toDeselect); - if (index != -1) { - selected.splice(index,1); - } - } - } - - - if (validDates.length > 0) { - if (this.parent) { - this.parent.cfg.setProperty(cfgSelected, selected); - } else { - this.cfg.setProperty(cfgSelected, selected); - } - this.deselectEvent.fire(validDates); - } - - return this.getSelectedDates(); - }, - - /** - * Deselects a date on the current calendar by referencing the index of the cell that should be deselected. - * This method is used to easily deselect a single cell (usually with a mouse click) without having to do - * a full render. The selected style is removed from the cell directly. - * - * If the cell is not marked with the CSS_CELL_SELECTABLE class (as is the case by default for out of month - * or out of bounds cells), the method will not attempt to deselect it and in such a case, beforeDeselect and - * deselect events will not be fired. - * - * @method deselectCell - * @param {Number} cellIndex The index of the cell to deselect in the current calendar. - * @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected. - */ - deselectCell : function(cellIndex) { - var cell = this.cells[cellIndex], - cellDate = this.cellDates[cellIndex], - cellDateIndex = this._indexOfSelectedFieldArray(cellDate); - - var selectable = Dom.hasClass(cell, this.Style.CSS_CELL_SELECTABLE); - - if (selectable) { - - this.beforeDeselectEvent.fire(); - - var selected = this.cfg.getProperty(DEF_CFG.SELECTED.key), - dCellDate = this._toDate(cellDate), - selectDate = cellDate.concat(); - - if (cellDateIndex > -1) { - if (this.cfg.getProperty(DEF_CFG.PAGEDATE.key).getMonth() == dCellDate.getMonth() && - this.cfg.getProperty(DEF_CFG.PAGEDATE.key).getFullYear() == dCellDate.getFullYear()) { - Dom.removeClass(cell, this.Style.CSS_CELL_SELECTED); - } - selected.splice(cellDateIndex, 1); - } - - if (this.parent) { - this.parent.cfg.setProperty(DEF_CFG.SELECTED.key, selected); - } else { - this.cfg.setProperty(DEF_CFG.SELECTED.key, selected); - } - - this.deselectEvent.fire([selectDate]); - } - - return this.getSelectedDates(); - }, - - /** - * Deselects all dates on the current calendar. - * @method deselectAll - * @return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected. - * Assuming that this function executes properly, the return value should be an empty array. - * However, the empty array is returned for the sake of being able to check the selection status - * of the calendar. - */ - deselectAll : function() { - this.beforeDeselectEvent.fire(); - - var cfgSelected = DEF_CFG.SELECTED.key, - selected = this.cfg.getProperty(cfgSelected), - count = selected.length, - sel = selected.concat(); - - if (this.parent) { - this.parent.cfg.setProperty(cfgSelected, []); - } else { - this.cfg.setProperty(cfgSelected, []); - } - - if (count > 0) { - this.deselectEvent.fire(sel); - } - - return this.getSelectedDates(); - }, - - // END SELECTION METHODS - - // BEGIN TYPE CONVERSION METHODS - - /** - * Converts a date (either a JavaScript Date object, or a date string) to the internal data structure - * used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]]. - * @method _toFieldArray - * @private - * @param {String/Date/Date[]} date The date string of dates to deselect in the current calendar. Valid formats are - * individual date(s) (12/24/2005,12/26/2005) or date range(s) (12/24/2005-1/1/2006). - * Multiple comma-delimited dates can also be passed to this method (12/24/2005,12/11/2005-12/13/2005). - * This method can also take a JavaScript Date object or an array of Date objects. - * @return {Array[](Number[])} Array of date field arrays - */ - _toFieldArray : function(date) { - var returnDate = []; - - if (date instanceof Date) { - returnDate = [[date.getFullYear(), date.getMonth()+1, date.getDate()]]; - } else if (Lang.isString(date)) { - returnDate = this._parseDates(date); - } else if (Lang.isArray(date)) { - for (var i=0;i maxDate.getTime())); - }, - - /** - * Parses a pagedate configuration property value. The value can either be specified as a string of form "mm/yyyy" or a Date object - * and is parsed into a Date object normalized to the first day of the month. If no value is passed in, the month and year from today's date are used to create the Date object - * @method _parsePageDate - * @private - * @param {Date|String} date Pagedate value which needs to be parsed - * @return {Date} The Date object representing the pagedate - */ - _parsePageDate : function(date) { - var parsedDate; - - if (date) { - if (date instanceof Date) { - parsedDate = DateMath.findMonthStart(date); - } else { - var month, year, aMonthYear; - aMonthYear = date.split(this.cfg.getProperty(DEF_CFG.DATE_FIELD_DELIMITER.key)); - month = parseInt(aMonthYear[this.cfg.getProperty(DEF_CFG.MY_MONTH_POSITION.key)-1], 10)-1; - year = parseInt(aMonthYear[this.cfg.getProperty(DEF_CFG.MY_YEAR_POSITION.key)-1], 10) - this.Locale.YEAR_OFFSET; - - parsedDate = DateMath.getDate(year, month, 1); - } - } else { - parsedDate = DateMath.getDate(this.today.getFullYear(), this.today.getMonth(), 1); - } - return parsedDate; - }, - - // END UTILITY METHODS - - // BEGIN EVENT HANDLERS - - /** - * Event executed before a date is selected in the calendar widget. - * @deprecated Event handlers for this event should be susbcribed to beforeSelectEvent. - */ - onBeforeSelect : function() { - if (this.cfg.getProperty(DEF_CFG.MULTI_SELECT.key) === false) { - if (this.parent) { - this.parent.callChildFunction("clearAllBodyCellStyles", this.Style.CSS_CELL_SELECTED); - this.parent.deselectAll(); - } else { - this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED); - this.deselectAll(); - } - } - }, - - /** - * Event executed when a date is selected in the calendar widget. - * @param {Array} selected An array of date field arrays representing which date or dates were selected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ] - * @deprecated Event handlers for this event should be susbcribed to selectEvent. - */ - onSelect : function(selected) { }, - - /** - * Event executed before a date is deselected in the calendar widget. - * @deprecated Event handlers for this event should be susbcribed to beforeDeselectEvent. - */ - onBeforeDeselect : function() { }, - - /** - * Event executed when a date is deselected in the calendar widget. - * @param {Array} selected An array of date field arrays representing which date or dates were deselected. Example: [ [2006,8,6],[2006,8,7],[2006,8,8] ] - * @deprecated Event handlers for this event should be susbcribed to deselectEvent. - */ - onDeselect : function(deselected) { }, - - /** - * Event executed when the user navigates to a different calendar page. - * @deprecated Event handlers for this event should be susbcribed to changePageEvent. - */ - onChangePage : function() { - this.render(); - }, - - /** - * Event executed when the calendar widget is rendered. - * @deprecated Event handlers for this event should be susbcribed to renderEvent. - */ - onRender : function() { }, - - /** - * Event executed when the calendar widget is reset to its original state. - * @deprecated Event handlers for this event should be susbcribed to resetEvemt. - */ - onReset : function() { this.render(); }, - - /** - * Event executed when the calendar widget is completely cleared to the current month with no selections. - * @deprecated Event handlers for this event should be susbcribed to clearEvent. - */ - onClear : function() { this.render(); }, - - /** - * Validates the calendar widget. This method has no default implementation - * and must be extended by subclassing the widget. - * @return Should return true if the widget validates, and false if - * it doesn't. - * @type Boolean - */ - validate : function() { return true; }, - - // END EVENT HANDLERS - - // BEGIN DATE PARSE METHODS - - /** - * Converts a date string to a date field array - * @private - * @param {String} sDate Date string. Valid formats are mm/dd and mm/dd/yyyy. - * @return A date field array representing the string passed to the method - * @type Array[](Number[]) - */ - _parseDate : function(sDate) { - var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER), - rArray; - - if (aDate.length == 2) { - rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]]; - rArray.type = Calendar.MONTH_DAY; - } else { - rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1] - this.Locale.YEAR_OFFSET, aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]]; - rArray.type = Calendar.DATE; - } - - for (var i=0;i -*
-*
-* -* The tables for the calendars ("cal1_0" and "cal1_1") will be inserted into those containers. -* -*

-* NOTE: As of 2.4.0, the constructor's ID argument is optional. -* The CalendarGroup can be constructed by simply providing a container ID string, -* or a reference to a container DIV HTMLElement (the element needs to exist -* in the document). -* -* E.g.: -*

-* var c = new YAHOO.widget.CalendarGroup("calContainer", configOptions); -* -* or: -* -* var containerDiv = YAHOO.util.Dom.get("calContainer"); -* var c = new YAHOO.widget.CalendarGroup(containerDiv, configOptions); -* -*

-*

-* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix. -* For example if an ID is not provided, and the container's ID is "calContainer", the CalendarGroup's ID will be set to "calContainer_t". -*

-* -* @namespace YAHOO.widget -* @class CalendarGroup -* @constructor -* @param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional. -* @param {String | HTMLElement} container The id of the container div element that will wrap the CalendarGroup table, or a reference to a DIV element which exists in the document. -* @param {Object} config optional The configuration object containing the initial configuration values for the CalendarGroup. -*/ -function CalendarGroup(id, containerId, config) { - if (arguments.length > 0) { - this.init.apply(this, arguments); - } -} - -/** -* The set of default Config property keys and values for the CalendarGroup. -* -*

-* NOTE: This property is made public in order to allow users to change -* the default values of configuration properties. Users should not -* modify the key string, unless they are overriding the Calendar implementation -*

-* -* @property YAHOO.widget.CalendarGroup.DEFAULT_CONFIG -* @static -* @type Object An object with key/value pairs, the key being the -* uppercase configuration property name and the value being an objec -* literal with a key string property, and a value property, specifying the -* default value of the property -*/ - -/** -* The set of default Config property keys and values for the CalendarGroup -* @property YAHOO.widget.CalendarGroup._DEFAULT_CONFIG -* @deprecated Made public. See the public DEFAULT_CONFIG property for details -* @private -* @static -* @type Object -*/ -CalendarGroup.DEFAULT_CONFIG = CalendarGroup._DEFAULT_CONFIG = Calendar.DEFAULT_CONFIG; -CalendarGroup.DEFAULT_CONFIG.PAGES = {key:"pages", value:2}; - -var DEF_CFG = CalendarGroup.DEFAULT_CONFIG; - -CalendarGroup.prototype = { - - /** - * Initializes the calendar group. All subclasses must call this method in order for the - * group to be initialized properly. - * @method init - * @param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional. - * @param {String | HTMLElement} container The id of the container div element that will wrap the CalendarGroup table, or a reference to a DIV element which exists in the document. - * @param {Object} config optional The configuration object containing the initial configuration values for the CalendarGroup. - */ - init : function(id, container, config) { - - // Normalize 2.4.0, pre 2.4.0 args - var nArgs = this._parseArgs(arguments); - - id = nArgs.id; - container = nArgs.container; - config = nArgs.config; - - this.oDomContainer = Dom.get(container); - - if (!this.oDomContainer.id) { - this.oDomContainer.id = Dom.generateId(); - } - if (!id) { - id = this.oDomContainer.id + "_t"; - } - - /** - * The unique id associated with the CalendarGroup - * @property id - * @type String - */ - this.id = id; - - /** - * The unique id associated with the CalendarGroup container - * @property containerId - * @type String - */ - this.containerId = this.oDomContainer.id; - - this.initEvents(); - this.initStyles(); - - /** - * The collection of Calendar pages contained within the CalendarGroup - * @property pages - * @type YAHOO.widget.Calendar[] - */ - this.pages = []; - - Dom.addClass(this.oDomContainer, CalendarGroup.CSS_CONTAINER); - Dom.addClass(this.oDomContainer, CalendarGroup.CSS_MULTI_UP); - - /** - * The Config object used to hold the configuration variables for the CalendarGroup - * @property cfg - * @type YAHOO.util.Config - */ - this.cfg = new YAHOO.util.Config(this); - - /** - * The local object which contains the CalendarGroup's options - * @property Options - * @type Object - */ - this.Options = {}; - - /** - * The local object which contains the CalendarGroup's locale settings - * @property Locale - * @type Object - */ - this.Locale = {}; - - this.setupConfig(); - - if (config) { - this.cfg.applyConfig(config, true); - } - - this.cfg.fireQueue(); - - // OPERA HACK FOR MISWRAPPED FLOATS - if (YAHOO.env.ua.opera){ - this.renderEvent.subscribe(this._fixWidth, this, true); - this.showEvent.subscribe(this._fixWidth, this, true); - } - - }, - - setupConfig : function() { - - var cfg = this.cfg; - - /** - * The number of pages to include in the CalendarGroup. This value can only be set once, in the CalendarGroup's constructor arguments. - * @config pages - * @type Number - * @default 2 - */ - cfg.addProperty(DEF_CFG.PAGES.key, { value:DEF_CFG.PAGES.value, validator:cfg.checkNumber, handler:this.configPages } ); - - /** - * The positive or negative year offset from the Gregorian calendar year (assuming a January 1st rollover) to - * be used when displaying or parsing dates. NOTE: All JS Date objects returned by methods, or expected as input by - * methods will always represent the Gregorian year, in order to maintain date/month/week values. - * - * @config year_offset - * @type Number - * @default 0 - */ - cfg.addProperty(DEF_CFG.YEAR_OFFSET.key, { value:DEF_CFG.YEAR_OFFSET.value, handler: this.delegateConfig, supercedes:DEF_CFG.YEAR_OFFSET.supercedes, suppressEvent:true } ); - - /** - * The date to use to represent "Today". - * - * @config today - * @type Date - * @default Today's date - */ - cfg.addProperty(DEF_CFG.TODAY.key, { value: new Date(DEF_CFG.TODAY.value.getTime()), supercedes:DEF_CFG.TODAY.supercedes, handler: this.configToday, suppressEvent:false } ); - - /** - * The month/year representing the current visible Calendar date (mm/yyyy) - * @config pagedate - * @type String | Date - * @default Today's date - */ - cfg.addProperty(DEF_CFG.PAGEDATE.key, { value: DEF_CFG.PAGEDATE.value || new Date(DEF_CFG.TODAY.value.getTime()), handler:this.configPageDate } ); - - /** - * The date or range of dates representing the current Calendar selection - * - * @config selected - * @type String - * @default [] - */ - cfg.addProperty(DEF_CFG.SELECTED.key, { value:[], handler:this.configSelected } ); - - /** - * The title to display above the CalendarGroup's month header - * @config title - * @type String - * @default "" - */ - cfg.addProperty(DEF_CFG.TITLE.key, { value:DEF_CFG.TITLE.value, handler:this.configTitle } ); - - /** - * Whether or not a close button should be displayed for this CalendarGroup - * @config close - * @type Boolean - * @default false - */ - cfg.addProperty(DEF_CFG.CLOSE.key, { value:DEF_CFG.CLOSE.value, handler:this.configClose } ); - - /** - * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below. - * This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be - * enabled if required. - * - * @config iframe - * @type Boolean - * @default true for IE6 and below, false for all other browsers - */ - cfg.addProperty(DEF_CFG.IFRAME.key, { value:DEF_CFG.IFRAME.value, handler:this.configIframe, validator:cfg.checkBoolean } ); - - /** - * The minimum selectable date in the current Calendar (mm/dd/yyyy) - * @config mindate - * @type String | Date - * @default null - */ - cfg.addProperty(DEF_CFG.MINDATE.key, { value:DEF_CFG.MINDATE.value, handler:this.delegateConfig } ); - - /** - * The maximum selectable date in the current Calendar (mm/dd/yyyy) - * @config maxdate - * @type String | Date - * @default null - */ - cfg.addProperty(DEF_CFG.MAXDATE.key, { value:DEF_CFG.MAXDATE.value, handler:this.delegateConfig } ); - - // Options properties - - /** - * True if the Calendar should allow multiple selections. False by default. - * @config MULTI_SELECT - * @type Boolean - * @default false - */ - cfg.addProperty(DEF_CFG.MULTI_SELECT.key, { value:DEF_CFG.MULTI_SELECT.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); - - /** - * The weekday the week begins on. Default is 0 (Sunday). - * @config START_WEEKDAY - * @type number - * @default 0 - */ - cfg.addProperty(DEF_CFG.START_WEEKDAY.key, { value:DEF_CFG.START_WEEKDAY.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * True if the Calendar should show weekday labels. True by default. - * @config SHOW_WEEKDAYS - * @type Boolean - * @default true - */ - cfg.addProperty(DEF_CFG.SHOW_WEEKDAYS.key, { value:DEF_CFG.SHOW_WEEKDAYS.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); - - /** - * True if the Calendar should show week row headers. False by default. - * @config SHOW_WEEK_HEADER - * @type Boolean - * @default false - */ - cfg.addProperty(DEF_CFG.SHOW_WEEK_HEADER.key,{ value:DEF_CFG.SHOW_WEEK_HEADER.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); - - /** - * True if the Calendar should show week row footers. False by default. - * @config SHOW_WEEK_FOOTER - * @type Boolean - * @default false - */ - cfg.addProperty(DEF_CFG.SHOW_WEEK_FOOTER.key,{ value:DEF_CFG.SHOW_WEEK_FOOTER.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); - - /** - * True if the Calendar should suppress weeks that are not a part of the current month. False by default. - * @config HIDE_BLANK_WEEKS - * @type Boolean - * @default false - */ - cfg.addProperty(DEF_CFG.HIDE_BLANK_WEEKS.key,{ value:DEF_CFG.HIDE_BLANK_WEEKS.value, handler:this.delegateConfig, validator:cfg.checkBoolean } ); - - /** - * The image that should be used for the left navigation arrow. - * @config NAV_ARROW_LEFT - * @type String - * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft" - * @default null - */ - cfg.addProperty(DEF_CFG.NAV_ARROW_LEFT.key, { value:DEF_CFG.NAV_ARROW_LEFT.value, handler:this.delegateConfig } ); - - /** - * The image that should be used for the right navigation arrow. - * @config NAV_ARROW_RIGHT - * @type String - * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright" - * @default null - */ - cfg.addProperty(DEF_CFG.NAV_ARROW_RIGHT.key, { value:DEF_CFG.NAV_ARROW_RIGHT.value, handler:this.delegateConfig } ); - - // Locale properties - - /** - * The short month labels for the current locale. - * @config MONTHS_SHORT - * @type String[] - * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] - */ - cfg.addProperty(DEF_CFG.MONTHS_SHORT.key, { value:DEF_CFG.MONTHS_SHORT.value, handler:this.delegateConfig } ); - - /** - * The long month labels for the current locale. - * @config MONTHS_LONG - * @type String[] - * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - */ - cfg.addProperty(DEF_CFG.MONTHS_LONG.key, { value:DEF_CFG.MONTHS_LONG.value, handler:this.delegateConfig } ); - - /** - * The 1-character weekday labels for the current locale. - * @config WEEKDAYS_1CHAR - * @type String[] - * @default ["S", "M", "T", "W", "T", "F", "S"] - */ - cfg.addProperty(DEF_CFG.WEEKDAYS_1CHAR.key, { value:DEF_CFG.WEEKDAYS_1CHAR.value, handler:this.delegateConfig } ); - - /** - * The short weekday labels for the current locale. - * @config WEEKDAYS_SHORT - * @type String[] - * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] - */ - cfg.addProperty(DEF_CFG.WEEKDAYS_SHORT.key, { value:DEF_CFG.WEEKDAYS_SHORT.value, handler:this.delegateConfig } ); - - /** - * The medium weekday labels for the current locale. - * @config WEEKDAYS_MEDIUM - * @type String[] - * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] - */ - cfg.addProperty(DEF_CFG.WEEKDAYS_MEDIUM.key, { value:DEF_CFG.WEEKDAYS_MEDIUM.value, handler:this.delegateConfig } ); - - /** - * The long weekday labels for the current locale. - * @config WEEKDAYS_LONG - * @type String[] - * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] - */ - cfg.addProperty(DEF_CFG.WEEKDAYS_LONG.key, { value:DEF_CFG.WEEKDAYS_LONG.value, handler:this.delegateConfig } ); - - /** - * The setting that determines which length of month labels should be used. Possible values are "short" and "long". - * @config LOCALE_MONTHS - * @type String - * @default "long" - */ - cfg.addProperty(DEF_CFG.LOCALE_MONTHS.key, { value:DEF_CFG.LOCALE_MONTHS.value, handler:this.delegateConfig } ); - - /** - * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long". - * @config LOCALE_WEEKDAYS - * @type String - * @default "short" - */ - cfg.addProperty(DEF_CFG.LOCALE_WEEKDAYS.key, { value:DEF_CFG.LOCALE_WEEKDAYS.value, handler:this.delegateConfig } ); - - /** - * The value used to delimit individual dates in a date string passed to various Calendar functions. - * @config DATE_DELIMITER - * @type String - * @default "," - */ - cfg.addProperty(DEF_CFG.DATE_DELIMITER.key, { value:DEF_CFG.DATE_DELIMITER.value, handler:this.delegateConfig } ); - - /** - * The value used to delimit date fields in a date string passed to various Calendar functions. - * @config DATE_FIELD_DELIMITER - * @type String - * @default "/" - */ - cfg.addProperty(DEF_CFG.DATE_FIELD_DELIMITER.key,{ value:DEF_CFG.DATE_FIELD_DELIMITER.value, handler:this.delegateConfig } ); - - /** - * The value used to delimit date ranges in a date string passed to various Calendar functions. - * @config DATE_RANGE_DELIMITER - * @type String - * @default "-" - */ - cfg.addProperty(DEF_CFG.DATE_RANGE_DELIMITER.key,{ value:DEF_CFG.DATE_RANGE_DELIMITER.value, handler:this.delegateConfig } ); - - /** - * The position of the month in a month/year date string - * @config MY_MONTH_POSITION - * @type Number - * @default 1 - */ - cfg.addProperty(DEF_CFG.MY_MONTH_POSITION.key, { value:DEF_CFG.MY_MONTH_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the year in a month/year date string - * @config MY_YEAR_POSITION - * @type Number - * @default 2 - */ - cfg.addProperty(DEF_CFG.MY_YEAR_POSITION.key, { value:DEF_CFG.MY_YEAR_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the month in a month/day date string - * @config MD_MONTH_POSITION - * @type Number - * @default 1 - */ - cfg.addProperty(DEF_CFG.MD_MONTH_POSITION.key, { value:DEF_CFG.MD_MONTH_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the day in a month/year date string - * @config MD_DAY_POSITION - * @type Number - * @default 2 - */ - cfg.addProperty(DEF_CFG.MD_DAY_POSITION.key, { value:DEF_CFG.MD_DAY_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the month in a month/day/year date string - * @config MDY_MONTH_POSITION - * @type Number - * @default 1 - */ - cfg.addProperty(DEF_CFG.MDY_MONTH_POSITION.key, { value:DEF_CFG.MDY_MONTH_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the day in a month/day/year date string - * @config MDY_DAY_POSITION - * @type Number - * @default 2 - */ - cfg.addProperty(DEF_CFG.MDY_DAY_POSITION.key, { value:DEF_CFG.MDY_DAY_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the year in a month/day/year date string - * @config MDY_YEAR_POSITION - * @type Number - * @default 3 - */ - cfg.addProperty(DEF_CFG.MDY_YEAR_POSITION.key, { value:DEF_CFG.MDY_YEAR_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the month in the month year label string used as the Calendar header - * @config MY_LABEL_MONTH_POSITION - * @type Number - * @default 1 - */ - cfg.addProperty(DEF_CFG.MY_LABEL_MONTH_POSITION.key, { value:DEF_CFG.MY_LABEL_MONTH_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The position of the year in the month year label string used as the Calendar header - * @config MY_LABEL_YEAR_POSITION - * @type Number - * @default 2 - */ - cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_POSITION.key, { value:DEF_CFG.MY_LABEL_YEAR_POSITION.value, handler:this.delegateConfig, validator:cfg.checkNumber } ); - - /** - * The suffix used after the month when rendering the Calendar header - * @config MY_LABEL_MONTH_SUFFIX - * @type String - * @default " " - */ - cfg.addProperty(DEF_CFG.MY_LABEL_MONTH_SUFFIX.key, { value:DEF_CFG.MY_LABEL_MONTH_SUFFIX.value, handler:this.delegateConfig } ); - - /** - * The suffix used after the year when rendering the Calendar header - * @config MY_LABEL_YEAR_SUFFIX - * @type String - * @default "" - */ - cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_SUFFIX.key, { value:DEF_CFG.MY_LABEL_YEAR_SUFFIX.value, handler:this.delegateConfig } ); - - /** - * Configuration for the Month Year Navigation UI. By default it is disabled - * @config NAV - * @type Object - * @default null - */ - cfg.addProperty(DEF_CFG.NAV.key, { value:DEF_CFG.NAV.value, handler:this.configNavigator } ); - - /** - * The map of UI strings which the CalendarGroup UI uses. - * - * @config strings - * @type {Object} - * @default An object with the properties shown below: - *
- *
previousMonth
String : The string to use for the "Previous Month" navigation UI. Defaults to "Previous Month".
- *
nextMonth
String : The string to use for the "Next Month" navigation UI. Defaults to "Next Month".
- *
close
String : The string to use for the close button label. Defaults to "Close".
- *
- */ - cfg.addProperty(DEF_CFG.STRINGS.key, { - value:DEF_CFG.STRINGS.value, - handler:this.configStrings, - validator: function(val) { - return Lang.isObject(val); - }, - supercedes: DEF_CFG.STRINGS.supercedes - }); - }, - - /** - * Initializes CalendarGroup's built-in CustomEvents - * @method initEvents - */ - initEvents : function() { - - var me = this, - strEvent = "Event", - CE = YAHOO.util.CustomEvent; - - /** - * Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents - * @method sub - * @private - * @param {Function} fn The function to subscribe to this CustomEvent - * @param {Object} obj The CustomEvent's scope object - * @param {Boolean} bOverride Whether or not to apply scope correction - */ - var sub = function(fn, obj, bOverride) { - for (var p=0;p
";Q[Q.length]="";Q[Q.length]='\n";if(N.getProperty(B.SHOW_WEEKDAYS.key)){Q=this.buildWeekdays(Q);}Q[Q.length]="";return Q;},buildWeekdays:function(H){H[H.length]='';if(this.cfg.getProperty(B.SHOW_WEEK_HEADER.key)){H[H.length]="";}for(var G=0;G'+this.Locale.LOCALE_WEEKDAYS[G]+"";}if(this.cfg.getProperty(B.SHOW_WEEK_FOOTER.key)){H[H.length]="";}H[H.length]="";return H;},renderBody:function(m,k){var AK=this.cfg.getProperty(B.START_WEEKDAY.key);this.preMonthDays=m.getDay();if(AK>0){this.preMonthDays-=AK;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=D.findMonthEnd(m).getDate();this.postMonthDays=F.DISPLAY_DAYS-this.preMonthDays-this.monthDays;m=D.subtract(m,D.DAY,this.preMonthDays);var Y,N,M="w",f="_cell",c="wd",w="d",P,u,AC=this.today,O=this.cfg,W=AC.getFullYear(),v=AC.getMonth(),J=AC.getDate(),AB=O.getProperty(B.PAGEDATE.key),I=O.getProperty(B.HIDE_BLANK_WEEKS.key),j=O.getProperty(B.SHOW_WEEK_FOOTER.key),b=O.getProperty(B.SHOW_WEEK_HEADER.key),U=O.getProperty(B.MINDATE.key),a=O.getProperty(B.MAXDATE.key),T=this.Locale.YEAR_OFFSET;if(U){U=D.clearTime(U);}if(a){a=D.clearTime(a);}k[k.length]='';var AI=0,Q=document.createElement("div"),l=document.createElement("td");Q.appendChild(l);var AA=this.parent||this;for(var AE=0;AE<6;AE++){Y=D.getWeekNumber(m,AK);N=M+Y;if(AE!==0&&I===true&&m.getMonth()!=AB.getMonth()){break;}else{k[k.length]='';if(b){k=this.renderRowHeader(Y,k);}for(var AJ=0;AJ<7;AJ++){P=[];this.clearElement(l);l.className=this.Style.CSS_CELL;l.id=this.id+f+AI;if(m.getDate()==J&&m.getMonth()==v&&m.getFullYear()==W){P[P.length]=AA.renderCellStyleToday;}var Z=[m.getFullYear(),m.getMonth()+1,m.getDate()];this.cellDates[this.cellDates.length]=Z;if(m.getMonth()!=AB.getMonth()){P[P.length]=AA.renderCellNotThisMonth;}else{C.addClass(l,c+m.getDay());C.addClass(l,w+m.getDate());for(var AD=0;AD=AH.getTime()&&m.getTime()<=AG.getTime()){u=y[2];if(m.getTime()==AG.getTime()){this.renderStack.splice(AD,1);}}break;case F.WEEKDAY:var R=y[1][0]; -if(m.getDay()+1==R){u=y[2];}break;case F.MONTH:H=y[1][0];if(m.getMonth()+1==H){u=y[2];}break;}if(u){P[P.length]=u;}}}if(this._indexOfSelectedFieldArray(Z)>-1){P[P.length]=AA.renderCellStyleSelected;}if((U&&(m.getTime()a.getTime()))){P[P.length]=AA.renderOutOfBoundsDate;}else{P[P.length]=AA.styleCellDefault;P[P.length]=AA.renderCellDefault;}for(var z=0;z=0&&AI<=6){C.addClass(l,this.Style.CSS_CELL_TOP);}if((AI%7)===0){C.addClass(l,this.Style.CSS_CELL_LEFT);}if(((AI+1)%7)===0){C.addClass(l,this.Style.CSS_CELL_RIGHT);}var o=this.postMonthDays;if(I&&o>=7){var V=Math.floor(o/7);for(var AF=0;AF=((this.preMonthDays+o+this.monthDays)-7)){C.addClass(l,this.Style.CSS_CELL_BOTTOM);}k[k.length]=Q.innerHTML;AI++;}if(j){k=this.renderRowFooter(Y,k);}k[k.length]="";}}k[k.length]="";return k;},renderFooter:function(G){return G;},render:function(){this.beforeRenderEvent.fire();var H=D.findMonthStart(this.cfg.getProperty(B.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;A.purgeElement(this.oDomContainer,true);var G=[];G[G.length]='
- - - - -{$fields.{{$displayParams.key}}_address_street.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br}
-{$fields.{{$displayParams.key}}_address_city.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br} {$fields.{{$displayParams.key}}_address_state.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}  {$fields.{{$displayParams.key}}_address_postalcode.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
-{$fields.{{$displayParams.key}}_address_country.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br} +{$fields.{{$displayParams.key}}_address_street.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
+{$fields.{{$displayParams.key}}_address_city.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br} {$fields.{{$displayParams.key}}_address_state.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}  {$fields.{{$displayParams.key}}_address_postalcode.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
+{$fields.{{$displayParams.key}}_address_country.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
{{* diff --git a/include/SugarFields/Fields/Address/SugarFieldAddress.php b/include/SugarFields/Fields/Address/SugarFieldAddress.php index 0b561059..1b756e17 100644 --- a/include/SugarFields/Fields/Address/SugarFieldAddress.php +++ b/include/SugarFields/Fields/Address/SugarFieldAddress.php @@ -80,7 +80,12 @@ class SugarFieldAddress extends SugarFieldBase { return $this->fetch($tplCode); } - return $this->fetch($this->findTemplate('DetailView')); + global $current_language; + if(isset($current_language) && file_exists('include/SugarFields/Fields/Address/' . $current_language . '.DetailView.tpl')) { + return $this->fetch('include/SugarFields/Fields/Address/' . $current_language . '.DetailView.tpl'); + } else { + return $this->fetch('include/SugarFields/Fields/Address/DetailView.tpl'); + } //if-else } function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { @@ -98,7 +103,13 @@ class SugarFieldAddress extends SugarFieldBase { return $this->fetch($tplCode); } - return $this->fetch($this->findTemplate('EditView')); + global $current_language; + if(isset($current_language) && file_exists('include/SugarFields/Fields/Address/' . $current_language . '.EditView.tpl')) { + return $this->fetch('include/SugarFields/Fields/Address/' . $current_language . '.EditView.tpl'); + } else { + return $this->fetch('include/SugarFields/Fields/Address/EditView.tpl'); + } //if-else + } } diff --git a/include/SugarFields/Fields/Address/en_us.DetailView.tpl b/include/SugarFields/Fields/Address/en_us.DetailView.tpl index a1b5fdac..17eaf422 100644 --- a/include/SugarFields/Fields/Address/en_us.DetailView.tpl +++ b/include/SugarFields/Fields/Address/en_us.DetailView.tpl @@ -37,14 +37,10 @@ *} - {{if !empty($displayParams.enableConnectors)}} "; - html[html.length] = ""; - html[html.length] = '\n'; - - if (cfg.getProperty(DEF_CFG.SHOW_WEEKDAYS.key)) { - html = this.buildWeekdays(html); - } - - html[html.length] = ''; - - return html; - }, - - /** - * Renders the Calendar's weekday headers. - * @method buildWeekdays - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array - */ - buildWeekdays : function(html) { - - html[html.length] = ''; - - if (this.cfg.getProperty(DEF_CFG.SHOW_WEEK_HEADER.key)) { - html[html.length] = ''; - } - - for(var i=0;i < this.Locale.LOCALE_WEEKDAYS.length; ++i) { - html[html.length] = ''; - } - - if (this.cfg.getProperty(DEF_CFG.SHOW_WEEK_FOOTER.key)) { - html[html.length] = ''; - } - - html[html.length] = ''; - - return html; - }, - - /** - * Renders the calendar body. - * @method renderBody - * @param {Date} workingDate The current working Date being used for the render process - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array - */ - renderBody : function(workingDate, html) { - - var startDay = this.cfg.getProperty(DEF_CFG.START_WEEKDAY.key); - - this.preMonthDays = workingDate.getDay(); - if (startDay > 0) { - this.preMonthDays -= startDay; - } - if (this.preMonthDays < 0) { - this.preMonthDays += 7; - } - - this.monthDays = DateMath.findMonthEnd(workingDate).getDate(); - this.postMonthDays = Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays; - - - workingDate = DateMath.subtract(workingDate, DateMath.DAY, this.preMonthDays); - - var weekNum, - weekClass, - weekPrefix = "w", - cellPrefix = "_cell", - workingDayPrefix = "wd", - dayPrefix = "d", - cellRenderers, - renderer, - t = this.today, - cfg = this.cfg, - todayYear = t.getFullYear(), - todayMonth = t.getMonth(), - todayDate = t.getDate(), - useDate = cfg.getProperty(DEF_CFG.PAGEDATE.key), - hideBlankWeeks = cfg.getProperty(DEF_CFG.HIDE_BLANK_WEEKS.key), - showWeekFooter = cfg.getProperty(DEF_CFG.SHOW_WEEK_FOOTER.key), - showWeekHeader = cfg.getProperty(DEF_CFG.SHOW_WEEK_HEADER.key), - mindate = cfg.getProperty(DEF_CFG.MINDATE.key), - maxdate = cfg.getProperty(DEF_CFG.MAXDATE.key), - yearOffset = this.Locale.YEAR_OFFSET; - - if (mindate) { - mindate = DateMath.clearTime(mindate); - } - if (maxdate) { - maxdate = DateMath.clearTime(maxdate); - } - - html[html.length] = ''; - - var i = 0, - tempDiv = document.createElement("div"), - cell = document.createElement("td"); - - tempDiv.appendChild(cell); - - var cal = this.parent || this; - - for (var r=0;r<6;r++) { - weekNum = DateMath.getWeekNumber(workingDate, startDay); - weekClass = weekPrefix + weekNum; - - // Local OOM check for performance, since we already have pagedate - if (r !== 0 && hideBlankWeeks === true && workingDate.getMonth() != useDate.getMonth()) { - break; - } else { - html[html.length] = ''; - - if (showWeekHeader) { html = this.renderRowHeader(weekNum, html); } - - for (var d=0; d < 7; d++){ // Render actual days - - cellRenderers = []; - - this.clearElement(cell); - cell.className = this.Style.CSS_CELL; - cell.id = this.id + cellPrefix + i; - - if (workingDate.getDate() == todayDate && - workingDate.getMonth() == todayMonth && - workingDate.getFullYear() == todayYear) { - cellRenderers[cellRenderers.length]=cal.renderCellStyleToday; - } - - var workingArray = [workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()]; - this.cellDates[this.cellDates.length] = workingArray; // Add this date to cellDates - - // Local OOM check for performance, since we already have pagedate - if (workingDate.getMonth() != useDate.getMonth()) { - cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth; - } else { - Dom.addClass(cell, workingDayPrefix + workingDate.getDay()); - Dom.addClass(cell, dayPrefix + workingDate.getDate()); - - for (var s=0;s= d1.getTime() && workingDate.getTime() <= d2.getTime()) { - renderer = rArray[2]; - - if (workingDate.getTime()==d2.getTime()) { - this.renderStack.splice(s,1); - } - } - break; - case Calendar.WEEKDAY: - var weekday = rArray[1][0]; - if (workingDate.getDay()+1 == weekday) { - renderer = rArray[2]; - } - break; - case Calendar.MONTH: - month = rArray[1][0]; - if (workingDate.getMonth()+1 == month) { - renderer = rArray[2]; - } - break; - } - - if (renderer) { - cellRenderers[cellRenderers.length]=renderer; - } - } - - } - - if (this._indexOfSelectedFieldArray(workingArray) > -1) { - cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected; - } - - if ((mindate && (workingDate.getTime() < mindate.getTime())) || - (maxdate && (workingDate.getTime() > maxdate.getTime())) - ) { - cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate; - } else { - cellRenderers[cellRenderers.length]=cal.styleCellDefault; - cellRenderers[cellRenderers.length]=cal.renderCellDefault; - } - - for (var x=0; x < cellRenderers.length; ++x) { - if (cellRenderers[x].call(cal, workingDate, cell) == Calendar.STOP_RENDER) { - break; - } - } - - workingDate.setTime(workingDate.getTime() + DateMath.ONE_DAY_MS); - // Just in case we crossed DST/Summertime boundaries - workingDate = DateMath.clearTime(workingDate); - - if (i >= 0 && i <= 6) { - Dom.addClass(cell, this.Style.CSS_CELL_TOP); - } - if ((i % 7) === 0) { - Dom.addClass(cell, this.Style.CSS_CELL_LEFT); - } - if (((i+1) % 7) === 0) { - Dom.addClass(cell, this.Style.CSS_CELL_RIGHT); - } - - var postDays = this.postMonthDays; - if (hideBlankWeeks && postDays >= 7) { - var blankWeeks = Math.floor(postDays/7); - for (var p=0;p= ((this.preMonthDays+postDays+this.monthDays)-7)) { - Dom.addClass(cell, this.Style.CSS_CELL_BOTTOM); - } - - html[html.length] = tempDiv.innerHTML; - i++; - } - - if (showWeekFooter) { html = this.renderRowFooter(weekNum, html); } - - html[html.length] = ''; - } - } - - html[html.length] = ''; - - return html; - }, - - /** - * Renders the calendar footer. In the default implementation, there is - * no footer. - * @method renderFooter - * @param {Array} html The current working HTML array - * @return {Array} The current working HTML array - */ - renderFooter : function(html) { return html; }, - - /** - * Renders the calendar after it has been configured. The render() method has a specific call chain that will execute - * when the method is called: renderHeader, renderBody, renderFooter. - * Refer to the documentation for those methods for information on - * individual render tasks. - * @method render - */ - render : function() { - this.beforeRenderEvent.fire(); - - // Find starting day of the current month - var workingDate = DateMath.findMonthStart(this.cfg.getProperty(DEF_CFG.PAGEDATE.key)); - - this.resetRenderers(); - this.cellDates.length = 0; - - Event.purgeElement(this.oDomContainer, true); - - var html = []; - - html[html.length] = '
- - - - -{$fields.{{$displayParams.key}}_address_street.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br}
-{$fields.{{$displayParams.key}}_address_city.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br} {$fields.{{$displayParams.key}}_address_state.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}  {$fields.{{$displayParams.key}}_address_postalcode.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
-{$fields.{{$displayParams.key}}_address_country.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br} +
+{$fields.{{$displayParams.key}}_address_street.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
+{$fields.{{$displayParams.key}}_address_city.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br} {$fields.{{$displayParams.key}}_address_state.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}  {$fields.{{$displayParams.key}}_address_postalcode.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
+{$fields.{{$displayParams.key}}_address_country.value|escape:'htmlentitydecode'|strip_tags|url2html|nl2br}
diff --git a/include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php b/include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php index 353d2afc..beacc878 100644 --- a/include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php +++ b/include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php @@ -42,10 +42,10 @@ class SugarFieldAssigned_user_name extends SugarFieldBase { $vardef['options'] = get_user_array(false); if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditViewFunction')); + return $this->fetch('include/SugarFields/Fields/Multienum/EditViewFunction.tpl'); }else{ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('SearchView')); + return $this->fetch('include/SugarFields/Fields/Assigned_user_name/SearchView.tpl'); } } } diff --git a/include/SugarFields/Fields/Base/DetailView.tpl b/include/SugarFields/Fields/Base/DetailView.tpl index 776d5ebb..1771c363 100644 --- a/include/SugarFields/Fields/Base/DetailView.tpl +++ b/include/SugarFields/Fields/Base/DetailView.tpl @@ -35,14 +35,7 @@ ********************************************************************************/ *} -{if strlen({{sugarvar key='value' string=true}}) <= 0} -{assign var="value" value={{sugarvar key='default_value' string=true}} } -{else} -{assign var="value" value={{sugarvar key='value' string=true}} } -{/if} -{{sugarvar key='value'}} +{{sugarvar key='value'}} {{if !empty($displayParams.enableConnectors)}} -{if !empty($value)} -{{sugarvar_connector view='DetailView'}} -{/if} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Base/SugarFieldBase.php b/include/SugarFields/Fields/Base/SugarFieldBase.php index 67ae5829..7a51f1e4 100644 --- a/include/SugarFields/Fields/Base/SugarFieldBase.php +++ b/include/SugarFields/Fields/Base/SugarFieldBase.php @@ -36,9 +36,9 @@ /** * SugarFieldBase translates and displays fields from a vardef definition into different formats - * including DetailView, ListView, EditView. It also provides Search Inputs and database queries + * including DetailView, ListView, EditView. It also provides Search Inputs and database queries * to handle searching - * + * */ class SugarFieldBase { var $ss; // Sugar Smarty Object @@ -50,20 +50,20 @@ class SugarFieldBase { function fetch($path){ $additional = ''; if(!$this->hasButton && !empty($this->button)){ - $additional .= 'button . '>'; + $additional .= 'button . '>'; } if(!empty($this->buttons)){ foreach($this->buttons as $v){ - $additional .= ' '; + $additional .= ' '; } - + } if(!empty($this->image)){ - $additional .= ' image . '>'; + $additional .= ' image . '>'; } - return $this->ss->fetch($path) . $additional; + return $this->ss->fetch($path) . $additional; } - + function findTemplate($view){ static $tplCache = array(); @@ -76,20 +76,9 @@ class SugarFieldBase { while ( $lastClass = get_parent_class($lastClass) ) { $classList[] = str_replace('SugarField','',$lastClass); } - + $tplName = ''; foreach ( $classList as $className ) { - global $current_language; - if(isset($current_language)) { - $tplName = 'include/SugarFields/Fields/'. $className .'/'. $current_language . '.' . $view .'.tpl'; - if ( file_exists('custom/'.$tplName) ) { - $tplName = 'custom/'.$tplName; - break; - } - if ( file_exists($tplName) ) { - break; - } - } $tplName = 'include/SugarFields/Fields/'. $className .'/'. $view .'.tpl'; if ( file_exists('custom/'.$tplName) ) { $tplName = 'custom/'.$tplName; @@ -109,17 +98,17 @@ class SugarFieldBase { // The base field doesn't do any formatting, so override it in subclasses for more specific actions return $rawField; } - + public function unformatField($formattedField, $vardef){ // The base field doesn't do any formatting, so override it in subclasses for more specific actions return $formattedField; - } - + } + function getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex = -1, $view){ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - - + + return $this->fetch($this->findTemplate($view)); } @@ -129,7 +118,7 @@ class SugarFieldBase { $tabindex = 1; $isArray = is_array($parentFieldArray); $fieldName = $vardef['name']; - + if ( $isArray ) { $fieldNameUpper = strtoupper($fieldName); if ( isset($parentFieldArray[$fieldNameUpper])) { @@ -145,7 +134,7 @@ class SugarFieldBase { } } $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex, false); - + $this->ss->left_delimiter = '{'; $this->ss->right_delimiter = '}'; $this->ss->assign('col',$vardef['name']); @@ -155,24 +144,24 @@ class SugarFieldBase { /** * Returns a smarty template for the DetailViews - * + * * @param parentFieldArray string name of the variable in the parent template for the bean's data * @param vardef vardef field defintion * @param displayParam parameters for display * available paramters are: * * labelSpan - column span for the label - * * fieldSpan - column span for the field + * * fieldSpan - column span for the field */ function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { - return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'DetailView'); + return"" . $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'DetailView') . ''; } // 99% of all fields will just format like a listview, but just in case, it's here to override function getChangeLogSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { return $this->formatField($parentFieldArray[$vardef['name']],$vardef); } - - + + function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { if(!empty($vardef['function']['returns']) && $vardef['function']['returns'] == 'html'){ $type = $this->type; @@ -183,19 +172,19 @@ class SugarFieldBase { } return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'EditView'); } - - function getImportViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) + + function getImportViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { return $this->getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } - - - + + + function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { if(!empty($vardef['auto_increment']))$vardef['len']=255; - return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'EditView'); + return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'EditView'); } - + function getPopupViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex){ if (is_array($displayParams) && !isset($displayParams['formName'])) $displayParams['formName'] = 'popup_query_form'; @@ -203,8 +192,8 @@ class SugarFieldBase { $displayParams = array('formName' => 'popup_query_form'); return $this->getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } - - public function getEmailTemplateValue($inputField, $vardef, $context = null){ + + public function getEmailTemplateValue($inputField, $vardef, $displayParams = array(), $tabindex = 0){ // This does not return a smarty section, instead it returns a direct value return $this->formatField($inputField,$vardef); } @@ -233,8 +222,8 @@ class SugarFieldBase { $returnsHtml = false; } } - - if ( $displayType == 'ListView' + + if ( $displayType == 'ListView' || $displayType == 'popupView' || $displayType == 'searchView' || $displayType == 'wirelessEditView' @@ -246,7 +235,7 @@ class SugarFieldBase { if ( !empty($includeFile) ) { require_once($includeFile); } - + return $funcName($parentFieldArray, $vardef['name'], $parentFieldArray[$vardef['name']], $displayType); } else { $displayTypeFunc = 'get'.$displayType.'Smarty'; @@ -274,16 +263,16 @@ class SugarFieldBase { function getEditView() { } - + function getSearchInput() { } - - function getQueryLike() { + + function getQueryLike() { } - + function getQueryIn() { } - + /** * Setup function to assign values to the smarty template, should be called before every display function */ @@ -298,7 +287,7 @@ class SugarFieldBase { $this->ss->assign('parentFieldArray', $parentFieldArray); $this->ss->assign('vardef', $vardef); $this->ss->assign('tabindex', $tabindex); - + //for adding attributes to the field if(!empty($displayParams['field'])){ @@ -336,16 +325,16 @@ class SugarFieldBase { $this->image = $displayParams['image']; } $this->ss->assign('displayParams', $displayParams); - - + + } - + /** * This should be called when the bean is saved. The bean itself will be passed by reference * @param SugarBean bean - the bean performing the save * @param array params - an array of paramester relevant to the save, most likely will be $_REQUEST */ - public function save($bean, $params, $field, $properties, $prefix = ''){ + public function save(&$bean, $params, $field, $properties, $prefix = ''){ if ( isset($params[$prefix.$field]) ) { if(isset($properties['len']) && isset($properties['type']) && 'varchar' == $properties['type']){ $bean->$field = trim($this->unformatField($params[$prefix.$field],$properties)); @@ -355,39 +344,5 @@ class SugarFieldBase { } } } - - /** - * Handles import field sanitizing for an field type - * - * @param $value string value to be sanitized - * @param $vardefs array - * @param $focus SugarBean object - * @param $settings ImportFieldSanitize object - * @return string sanitized value or boolean false if there's a problem with the value - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - if( isset($vardef['len']) ) { - // check for field length - $value = sugar_substr($value, $vardef['len']); - } - - return $value; - } - - /** - * isRangeSearchView - * This method helps determine whether or not to display the range search view code for the sugar field - * @param array $vardef entry representing the sugar field's definition - * @return boolean true if range search view should be displayed, false otherwise - */ - protected function isRangeSearchView($vardef) - { - return !empty($vardef['enable_range_search']) && !empty($_REQUEST['action']) && $_REQUEST['action']!='Popup'; - } } +?> diff --git a/include/SugarFields/Fields/Bool/DetailView.tpl b/include/SugarFields/Fields/Bool/DetailView.tpl index 5bd8a96d..7a5a5008 100644 --- a/include/SugarFields/Fields/Bool/DetailView.tpl +++ b/include/SugarFields/Fields/Bool/DetailView.tpl @@ -40,7 +40,7 @@ {else} {assign var="checked" value=""} {/if} - + {{if !empty($displayParams.enableConnectors)}} {{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Bool/ListView.tpl b/include/SugarFields/Fields/Bool/ListView.tpl index 2b2766c0..7cb60e7d 100644 --- a/include/SugarFields/Fields/Bool/ListView.tpl +++ b/include/SugarFields/Fields/Bool/ListView.tpl @@ -35,8 +35,7 @@ ********************************************************************************/ *} - - {if strval($parentFieldArray.$col) == "1" || strval($parentFieldArray.$col) == "yes" || strval($parentFieldArray.$col) == "on"} +{if strval($parentFieldArray.$col) == "1" || strval($parentFieldArray.$col) == "yes" || strval($parentFieldArray.$col) == "on"} {assign var="checked" value="CHECKED"} {else} {assign var="checked" value=""} diff --git a/include/SugarFields/Fields/Bool/SugarFieldBool.php b/include/SugarFields/Fields/Bool/SugarFieldBool.php index 943de103..3376a159 100644 --- a/include/SugarFields/Fields/Bool/SugarFieldBool.php +++ b/include/SugarFields/Fields/Bool/SugarFieldBool.php @@ -42,47 +42,20 @@ class SugarFieldBool extends SugarFieldBase { /** * * @return The html for a drop down if the search field is not 'my_items_only' or a dropdown for all other fields. - * This strange behavior arises from the special needs of PM. They want the my items to be checkboxes and all other boolean fields to be dropdowns. + * This strange behavior arises from the special needs of PM. They want the my items to be checkboxes and all other boolean fields to be dropdowns. * @author Navjeet Singh - * @param $parentFieldArray - + * @param $parentFieldArray - **/ function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - //If there was a type override to specifically render it as a boolean, show the EditView checkbox - if( preg_match("/(favorites|current_user|open)_only.*/", $vardef['name'])) - { - return $this->fetch($this->findTemplate('EditView')); - } else { - return $this->fetch($this->findTemplate('SearchView')); - } + if( preg_match("/current_user_only.*/", $vardef['name']) || preg_match("/favorites_only.*/", $vardef['name']) ) + return $this->fetch('include/SugarFields/Fields/Bool/EditView.tpl'); + else + return $this->fetch('include/SugarFields/Fields/Bool/SearchView.tpl'); + } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - $bool_values = array(0=>'0',1=>'no',2=>'off',3=>'n',4=>'yes',5=>'y',6=>'on',7=>'1'); - $bool_search = array_search($value,$bool_values); - if ( $bool_search === false ) { - return false; - } - else { - //Convert all the values to a real bool. - $value = (int) ( $bool_search > 3 ); - } - if ( isset($vardef['dbType']) && $vardef['dbType'] == 'varchar' ) - $value = ( $value ? 'on' : 'off' ); - - return $value; - } - - public function getEmailTemplateValue($inputField, $vardef, $context = null){ + + public function getEmailTemplateValue($inputField, $vardef, $displayParams = array(), $tabindex = 0){ global $app_list_strings; // This does not return a smarty section, instead it returns a direct value if ( $inputField == 'bool_true' || $inputField === true ) { // Note: true must be absolute true @@ -104,7 +77,7 @@ class SugarFieldBool extends SugarFieldBase { } else { $unformattedField = true; } - + return $unformattedField; } diff --git a/include/SugarFields/Fields/Collection/SugarFieldCollection.php b/include/SugarFields/Fields/Collection/SugarFieldCollection.php index daf10995..bdea45a8 100644 --- a/include/SugarFields/Fields/Collection/SugarFieldCollection.php +++ b/include/SugarFields/Fields/Collection/SugarFieldCollection.php @@ -52,7 +52,7 @@ class SugarFieldCollection extends SugarFieldBase { $this->ss->assign('vardefJSON', '{literal}'.$vardefJSON.'{/literal}'); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); if(empty($this->tpl_path)){ - $this->tpl_path = $this->findTemplate('DetailView'); + $this->tpl_path = 'include/SugarFields/Fields/Collection/DetailView.tpl'; } return $this->fetch($this->tpl_path); } @@ -72,7 +72,7 @@ class SugarFieldCollection extends SugarFieldBase { $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); if(!$searchView) { if(empty($this->tpl_path)){ - $this->tpl_path = $this->findTemplate('EditView'); + $this->tpl_path = 'include/SugarFields/Fields/Collection/EditView.tpl'; } return $this->fetch($this->tpl_path); } diff --git a/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php b/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php index c4bd8074..a8104931 100644 --- a/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php +++ b/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php @@ -69,8 +69,8 @@ class ViewSugarFieldCollection{ $this->value_name = $this->name . '_values'; $this->numFields = 1; $this->ss = new Sugar_Smarty(); - $this->edit_tpl_path = $this->findTemplate('CollectionEditView'); - $this->detail_tpl_path = $this->findTemplate('CollectionDetailView'); + $this->edit_tpl_path = 'include/SugarFields/Fields/Collection/CollectionEditView.tpl'; + $this->detail_tpl_path = 'include/SugarFields/Fields/Collection/CollectionDetailView.tpl'; $this->extra_var = array(); $this->field_to_name_array = array(); } @@ -339,7 +339,7 @@ FRA; mkdir_recursive($dir, null, true); } - $cacheRow = $this->ss->fetch($this->findTemplate('CollectionEditViewRow')); + $cacheRow = $this->ss->fetch('include/SugarFields/Fields/Collection/CollectionEditViewRow.tpl'); file_put_contents($cacheRowFile, $cacheRow); } $this->ss->assign('cacheRowFile', $cacheRowFile); @@ -495,49 +495,6 @@ FRA; $this->displayParams['popupData'] = '{literal}'. str_replace(array('{{', '}}'), array('{ {', '} }'), $this->json->encode($popup_request_data)) . '{/literal}'; } } - - - - function findTemplate($view){ - static $tplCache = array(); - - if ( isset($tplCache[$this->type][$view]) ) { - return $tplCache[$this->type][$view]; - } - - $lastClass = get_class($this); - $classList = array($this->type,str_replace('ViewSugarField','',$lastClass)); - while ( $lastClass = get_parent_class($lastClass) ) { - $classList[] = str_replace('ViewSugarField','',$lastClass); - } - - $tplName = ''; - foreach ( $classList as $className ) { - global $current_language; - if(isset($current_language)) { - $tplName = 'include/SugarFields/Fields/'. $className .'/'. $current_language . '.' . $view .'.tpl'; - if ( file_exists('custom/'.$tplName) ) { - $tplName = 'custom/'.$tplName; - break; - } - if ( file_exists($tplName) ) { - break; - } - } - $tplName = 'include/SugarFields/Fields/'. $className .'/'. $view .'.tpl'; - if ( file_exists('custom/'.$tplName) ) { - $tplName = 'custom/'.$tplName; - break; - } - if ( file_exists($tplName) ) { - break; - } - } - - $tplCache[$this->type][$view] = $tplName; - - return $tplName; - } } ?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Currency/DetailView.tpl b/include/SugarFields/Fields/Currency/DetailView.tpl index 87564af8..ba52f250 100644 --- a/include/SugarFields/Fields/Currency/DetailView.tpl +++ b/include/SugarFields/Fields/Currency/DetailView.tpl @@ -39,5 +39,5 @@ {sugar_number_format var={{sugarvar key='value' stringFormat='false'}} } {{if !empty($displayParams.enableConnectors)}} -{{sugarvar_connector view='DetailView'}} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Currency/SugarFieldCurrency.php b/include/SugarFields/Fields/Currency/SugarFieldCurrency.php index acb2fbe9..033e7016 100644 --- a/include/SugarFields/Fields/Currency/SugarFieldCurrency.php +++ b/include/SugarFields/Fields/Currency/SugarFieldCurrency.php @@ -38,8 +38,7 @@ require_once('include/SugarFields/Fields/Float/SugarFieldFloat.php'); -class SugarFieldCurrency extends SugarFieldFloat -{ +class SugarFieldCurrency extends SugarFieldFloat { function getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col) { $tabindex = 1; $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex, false); @@ -58,19 +57,4 @@ class SugarFieldCurrency extends SugarFieldFloat } return $this->fetch($this->findTemplate('ListView')); } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - $value = str_replace($settings->currency_symbol,"",$value); - - return $settings->float($value,$vardef,$focus); - } } \ No newline at end of file diff --git a/include/SugarFields/Fields/Datetime/EditView.tpl b/include/SugarFields/Fields/Datetime/EditView.tpl index 601d601b..fdecb173 100644 --- a/include/SugarFields/Fields/Datetime/EditView.tpl +++ b/include/SugarFields/Fields/Datetime/EditView.tpl @@ -39,21 +39,19 @@ {{if !empty($displayParams.idName)}} {{assign var=idname value=$displayParams.idName}} {{/if}} - + {assign var=date_value value={{sugarvar key='value' string=true}} } - + {{if !$displayParams.hiddeCalendar}} {$APP.LBL_ENTER_DATE} {{/if}} {{if $displayParams.showFormats}}  ({$USER_DATEFORMAT}) {{/if}} - {{if !$displayParams.hiddeCalendar}} + + \ No newline at end of file diff --git a/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl b/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl deleted file mode 100644 index 476a227f..00000000 --- a/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl +++ /dev/null @@ -1,167 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} -{{if empty($displayParams.idName)}} -{assign var="id" value={{sugarvar key='name' string=true}} } -{{else}} -{assign var="id" value={{$displayParams.idName}} } -{{/if}} - -{if isset($smarty.request.{{$id_range_choice}})} -{assign var="starting_choice" value=$smarty.request.{{$id_range_choice}}} -{else} -{assign var="starting_choice" value="="} -{/if} - -
- -
- -
- -{{if !$displayParams.hiddeCalendar}} -{$APP.LBL_ENTER_DATE} -{{/if}} -{{if $displayParams.showFormats}} - ({$USER_DATEFORMAT}) -{{/if}} -{{if !$displayParams.hiddeCalendar}} - -{{/if}} -
- -
-{assign var=date_value value={{sugarvar key='value' string=true}} } - -{{if !$displayParams.hiddeCalendar}} -{$APP.LBL_ENTER_DATE} -{{/if}} -{{if $displayParams.showFormats}} - ({$USER_DATEFORMAT}) -{{/if}} -{{if !$displayParams.hiddeCalendar}} - -{{/if}} -{$APP.LBL_AND} -{assign var=date_value value={{sugarvar key='value' string=true}} } - -{{if !$displayParams.hiddeCalendar}} -{$APP.LBL_ENTER_DATE} -{{/if}} -{{if $displayParams.showFormats}} - ({$USER_DATEFORMAT}) -{{/if}} -{{if !$displayParams.hiddeCalendar}} - -{{/if}} -
- - - \ No newline at end of file diff --git a/include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php b/include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php index 559552a8..535273e0 100644 --- a/include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php +++ b/include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php @@ -38,113 +38,79 @@ require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); class SugarFieldDatetimecombo extends SugarFieldBase { - function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { + function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { // Create Smarty variables for the Calendar picker widget if(!isset($displayParams['showMinutesDropdown'])) { - $displayParams['showMinutesDropdown'] = false; + $displayParams['showMinutesDropdown'] = false; } - + if(!isset($displayParams['showHoursDropdown'])) { - $displayParams['showHoursDropdown'] = false; + $displayParams['showHoursDropdown'] = false; } - + if(!isset($displayParams['showNoneCheckbox'])) { - $displayParams['showNoneCheckbox'] = false; + $displayParams['showNoneCheckbox'] = false; } - + if(!isset($displayParams['showFormats'])) { - $displayParams['showFormats'] = false; + $displayParams['showFormats'] = false; } - + global $timedate; $displayParams['dateFormat'] = $timedate->get_cal_date_format(); $displayParams['timeFormat'] = $timedate->get_user_time_format(); - $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditView')); + $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); + return $this->fetch('include/SugarFields/Fields/Datetimecombo/EditView.tpl'); } - - function getImportViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) + + function getImportViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { $displayParams['showFormats'] = true; return $this->getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { - - if($this->isRangeSearchView($vardef)) { - $displayParams['showMinutesDropdown'] = false; - $displayParams['showHoursDropdown'] = false; - $displayParams['showNoneCheckbox'] = false; - $displayParams['showFormats'] = false; - global $timedate, $current_language; - $displayParams['dateFormat'] = $timedate->get_cal_date_format(); - $displayParams['timeFormat'] = $timedate->get_user_time_format(); - - $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - $id = isset($displayParams['idName']) ? $displayParams['idName'] : $vardef['name']; - $this->ss->assign('original_id', "{$id}"); - $this->ss->assign('id_range', "range_{$id}"); - $this->ss->assign('id_range_start', "start_range_{$id}"); - $this->ss->assign('id_range_end', "end_range_{$id}"); - $this->ss->assign('id_range_choice', "{$id}_range_choice"); - if(file_exists('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl')) - { - return $this->fetch('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl'); - } - return $this->fetch('include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl'); - } - // Create Smarty variables for the Calendar picker widget if(!isset($displayParams['showMinutesDropdown'])) { - $displayParams['showMinutesDropdown'] = false; + $displayParams['showMinutesDropdown'] = false; } - + if(!isset($displayParams['showHoursDropdown'])) { - $displayParams['showHoursDropdown'] = false; + $displayParams['showHoursDropdown'] = false; } - + if(!isset($displayParams['showNoneCheckbox'])) { - $displayParams['showNoneCheckbox'] = false; + $displayParams['showNoneCheckbox'] = false; } - + if(!isset($displayParams['showFormats'])) { - $displayParams['showFormats'] = false; + $displayParams['showFormats'] = false; } - + global $timedate; $displayParams['dateFormat'] = $timedate->get_cal_date_format(); $displayParams['timeFormat'] = $timedate->get_user_time_format(); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('SearchView')); - } - - - public function getEmailTemplateValue($inputField, $vardef, $context = null, $tabindex = 0){ - // This does not return a smarty section, instead it returns a direct value - if(isset($context['notify_user'])) { - $user = $context['notify_user']; - } else { - $user = $GLOBALS['current_user']; - } - return TimeDate::getInstance()->to_display_date_time($inputField, true, true, $user); + return $this->fetch('include/SugarFields/Fields/Datetimecombo/SearchView.tpl'); } + public function save(&$bean, &$inputData, &$field, &$def, $prefix = '') { global $timedate; if ( !isset($inputData[$prefix.$field]) ) { //$bean->$field = ''; return; } - + if(strpos($inputData[$prefix.$field], ' ') > 0) { $bean->$field = $timedate->to_db($inputData[$prefix.$field]); } else { $GLOBALS['log']->error('Field ' . $prefix.$field . ' expecting datetime format, but got value: ' . $inputData[$prefix.$field]); //Default to assume date format value - $bean->$field = $timedate->to_db_date($inputData[$prefix.$field]); + $bean->$field = $timedate->to_db_date($inputData[$prefix.$field]); } - } + } } ?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Download/DetailView.tpl b/include/SugarFields/Fields/Download/DetailView.tpl index dca9373e..5bf9b09a 100644 --- a/include/SugarFields/Fields/Download/DetailView.tpl +++ b/include/SugarFields/Fields/Download/DetailView.tpl @@ -35,12 +35,8 @@ ********************************************************************************/ *} - {$fields.filename.value} - {{if !empty($displayParams.enableConnectors)}} -{if !empty($fields.filename.value)} -{{sugarvar_connector view='DetailView'}} -{/if} +{{sugarvar_connector view='DetailView'}} {{/if}} diff --git a/include/SugarFields/Fields/Download/SugarFieldDownload.php b/include/SugarFields/Fields/Download/SugarFieldDownload.php index 4ffa538e..6bb3c4e3 100644 --- a/include/SugarFields/Fields/Download/SugarFieldDownload.php +++ b/include/SugarFields/Fields/Download/SugarFieldDownload.php @@ -42,7 +42,7 @@ class SugarFieldDownload extends SugarFieldBase { $vardef['value'] = urlencode(basename($vardef['value'])); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView.tpl')); + return $this->fetch('include/SugarFields/Fields/Download/DetailView.tpl'); } } ?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Enum/DetailView.tpl b/include/SugarFields/Fields/Enum/DetailView.tpl index a0679161..e077b6d2 100644 --- a/include/SugarFields/Fields/Enum/DetailView.tpl +++ b/include/SugarFields/Fields/Enum/DetailView.tpl @@ -38,10 +38,8 @@ {* This is here so currency fields, who don't really have dropdown lists can work. *} {if is_string({{sugarvar key='options' string=true}})} - -{ {{sugarvar key='options' string=true}} } -{else} - +{ {{sugarvar key='options' string=true}}} +{else if} { {{sugarvar key='options' string=true}}[{{sugarvar key='value' string=true}}]} {/if} {{if !empty($displayParams.enableConnectors)}} diff --git a/include/SugarFields/Fields/Enum/DetailViewFunction.tpl b/include/SugarFields/Fields/Enum/DetailViewFunction.tpl index 8dcb5ebf..a57857c9 100644 --- a/include/SugarFields/Fields/Enum/DetailViewFunction.tpl +++ b/include/SugarFields/Fields/Enum/DetailViewFunction.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} -{{sugarvar key='value'}} +{{sugarvar key='value'}} {{if !empty($displayParams.enableConnectors)}} {{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Enum/EditView.tpl b/include/SugarFields/Fields/Enum/EditView.tpl index 012fedda..5e8f55d3 100644 --- a/include/SugarFields/Fields/Enum/EditView.tpl +++ b/include/SugarFields/Fields/Enum/EditView.tpl @@ -36,9 +36,9 @@ *} - + \ No newline at end of file diff --git a/include/SugarFields/Fields/Enum/SugarFieldEnum.php b/include/SugarFields/Fields/Enum/SugarFieldEnum.php index dbdde32a..f7a2ee3c 100644 --- a/include/SugarFields/Fields/Enum/SugarFieldEnum.php +++ b/include/SugarFields/Fields/Enum/SugarFieldEnum.php @@ -39,11 +39,10 @@ require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); class SugarFieldEnum extends SugarFieldBase { function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { - if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html') - { + if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return "" . $this->fetch($this->findTemplate('DetailViewFunction')) . ""; - } else { + return "" . $this->fetch('include/SugarFields/Fields/Enum/DetailViewFunction.tpl') . ''; + }else{ return parent::getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } } @@ -56,7 +55,7 @@ class SugarFieldEnum extends SugarFieldBase { if(isset($vardef['function']) && !empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditViewFunction')); + return $this->fetch('include/SugarFields/Fields/Enum/EditViewFunction.tpl'); }else{ return parent::getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } @@ -72,10 +71,10 @@ class SugarFieldEnum extends SugarFieldBase { if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditViewFunction')); + return $this->fetch('include/SugarFields/Fields/Enum/EditViewFunction.tpl'); }else{ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('SearchView')); + return $this->fetch('include/SugarFields/Fields/Enum/SearchView.tpl'); } } @@ -89,45 +88,6 @@ class SugarFieldEnum extends SugarFieldBase { return $this->$displayTypeFunc($parentFieldArray, $vardef, $displayParams, $tabindex); } - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - global $app_list_strings; - - // Bug 27467 - Trim the value given - $value = trim($value); - - if ( isset($app_list_strings[$vardef['options']]) - && !isset($app_list_strings[$vardef['options']][$value]) ) { - // Bug 23485/23198 - Check to see if the value passed matches the display value - if ( in_array($value,$app_list_strings[$vardef['options']]) ) - $value = array_search($value,$app_list_strings[$vardef['options']]); - // Bug 33328 - Check for a matching key in a different case - elseif ( in_array(strtolower($value), array_keys(array_change_key_case($app_list_strings[$vardef['options']]))) ) { - foreach ( $app_list_strings[$vardef['options']] as $optionkey => $optionvalue ) - if ( strtolower($value) == strtolower($optionkey) ) - $value = $optionkey; - } - // Bug 33328 - Check for a matching value in a different case - elseif ( in_array(strtolower($value), array_map('strtolower', $app_list_strings[$vardef['options']])) ) { - foreach ( $app_list_strings[$vardef['options']] as $optionkey => $optionvalue ) - if ( strtolower($value) == strtolower($optionvalue) ) - $value = $optionkey; - } - else - return false; - } - - return $value; - } - public function formatField($rawField, $vardef){ global $app_list_strings; @@ -143,5 +103,6 @@ class SugarFieldEnum extends SugarFieldBase { return $rawField; } } + } ?> \ No newline at end of file diff --git a/include/SugarFields/Fields/File/DetailView.tpl b/include/SugarFields/Fields/File/DetailView.tpl index 59e15e4e..3f0bfaf3 100644 --- a/include/SugarFields/Fields/File/DetailView.tpl +++ b/include/SugarFields/Fields/File/DetailView.tpl @@ -35,17 +35,7 @@ ********************************************************************************/ *} - -{{sugarvar key='value'}} - -{{if isset($vardef) && isset($vardef.allowEapm) && $vardef.allowEapm}} -{if isset($fields.{{$vardef.docType}}) && !empty($fields.{{$vardef.docType}}.value) && $fields.{{$vardef.docType}}.value != 'SugarCRM' && !empty($fields.{{$vardef.docUrl}}.value) } -{capture name=imageNameCapture assign=imageName} -{$fields.{{$vardef.docType}}.value}_image_inline.png -{/capture} - -{/if} -{{/if}} +{$fields.{{$displayParams.link}}.value} {{if !empty($displayParams.enableConnectors)}} -{{sugarvar_connector view='DetailView'}} +{{sugarvar_connector view='DetailView'}} {{/if}} diff --git a/include/SugarFields/Fields/File/EditView.tpl b/include/SugarFields/Fields/File/EditView.tpl index 17218505..aed852a3 100644 --- a/include/SugarFields/Fields/File/EditView.tpl +++ b/include/SugarFields/Fields/File/EditView.tpl @@ -35,62 +35,8 @@ ********************************************************************************/ *} -{{if isset($vardef.allowEapm) && $vardef.allowEapm}} - -{{/if}} - -{{capture name=idName assign=idName}}{{sugarvar key='name'}}{{/capture}} -{{if !empty($displayParams.idName)}} - {{assign var=idName value=$displayParams.idName}} -{{/if}} - -{{if !isset($vardef.noRemove) || !$vardef.noRemove}} -{if !empty({{sugarvar key='value' stringFormat=true}}) } - {assign var=showRemove value=true} -{else} - {assign var=showRemove value=false} -{/if} -{{else}} - {assign var=showRemove value=false} -{{/if}} - -{{if isset($vardef.noChange) && $vardef.noChange }} -{if !empty({{sugarvar key='value' stringFormat=true}}) } - {assign var=showRemove value=true} - {assign var=noChange value=true} -{else} - {assign var=noChange value=false} -{/if} -{{else}} - {assign var=noChange value=false} -{{/if}} - - - -{{if isset($vardef.allowEapm) && $vardef.allowEapm}} - - - -{{/if}} - - {{sugarvar key='value'}} - -{{if isset($vardef.allowEapm) && $vardef.allowEapm}} -{if isset($fields.{{$vardef.docType}}) && !empty($fields.{{$vardef.docType}}.value) && $fields.{{$vardef.docType}}.value != 'Sugar' && !empty($fields.{{$vardef.docUrl}}.value) } -{capture name=imageNameCapture assign=imageName} -{$fields.{{$vardef.docType}}.value}_image_inline.png -{/capture} - -{/if} -{{/if}} -{if !$noChange} - -{/if} - -{if !$noChange} - - - - - -{{if isset($vardef.allowEapm) && $vardef.allowEapm}} - \ No newline at end of file +{{/if}} +value="{$fields[{{sugarvar key='name' stringFormat=true}}].value}" {{$displayParams.field}}> \ No newline at end of file diff --git a/include/SugarFields/Fields/File/SearchView.tpl b/include/SugarFields/Fields/File/SearchView.tpl deleted file mode 100644 index 4ca8e409..00000000 --- a/include/SugarFields/Fields/File/SearchView.tpl +++ /dev/null @@ -1,39 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} - - diff --git a/include/SugarFields/Fields/File/SugarFieldFile.js b/include/SugarFields/Fields/File/SugarFieldFile.js deleted file mode 100644 index 55d23f3c..00000000 --- a/include/SugarFields/Fields/File/SugarFieldFile.js +++ /dev/null @@ -1,45 +0,0 @@ -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ -if(typeof(SUGAR.field)=='undefined'){SUGAR.field=new Object();} -if(typeof(SUGAR.field.file)=='undefined'){SUGAR.field.file={deleteAttachment:function(elemBaseName,docTypeName,elem){ajaxStatus.showStatus(SUGAR.language.get("Notes","LBL_REMOVING_ATTACHMENT"));elem.form.deleteAttachment.value=1;elem.form.action.value="EditView";SUGAR.dashlets.postForm(elem.form,SUGAR.field.file.deleteAttachmentCallbackGen(elemBaseName,docTypeName));elem.form.deleteAttachment.value=0;elem.form.action.value="";},deleteAttachmentCallbackGen:function(elemBaseName,docTypeName){return function(text){if(text=='true'){document.getElementById(elemBaseName+'_new').style.display='';ajaxStatus.hideStatus();document.getElementById(elemBaseName+'_old').innerHTML='';document.getElementById(docTypeName).disabled=false;document.getElementById(elemBaseName).value='';}else{document.getElementById(elemBaseName+'_new').style.display='none';ajaxStatus.flashStatus(SUGAR.language.get('Notes','ERR_REMOVING_ATTACHMENT'),2000);}}},checkEapiLogin:function(res){var failedLogins=JSON.parse(res.responseText);if(failedLogins.length==0){return;} -for(var idx in failedLogins){if(confirm(failedLogins[idx].label)){window.open(failedLogins[idx].checkURL,'EAPM_CHECK_'+idx);}else{document.getElementById(res.argument.docTypeName).value='Sugar';document.getElementById(res.argument.docTypeName).onchange();}}},setupEapiShowHide:function(elemBaseName,docTypeName,formName){var externalSearchToggle=function(){var moreElem=document.getElementById(elemBaseName+"_more");var hideMore=(moreElem.style.display=='none');if(hideMore){moreElem.style.display='';document.getElementById(elemBaseName+'_less').style.display='none';document.getElementById(elemBaseName+'_remoteNameSpan').style.display='none';document.getElementById(elemBaseName+'_file').disabled=false;}else{moreElem.style.display='none';document.getElementById(elemBaseName+'_less').style.display='';document.getElementById(elemBaseName+'_remoteNameSpan').style.display='';document.getElementById(elemBaseName+'_file').disabled=true;}} -var showHideFunc=function(){var docShowHideElem=document.getElementById(elemBaseName+"_externalApiSelector");var dropdownValue=document.getElementById(docTypeName).value;if(typeof(SUGAR.eapm)!='undefined'&&typeof(SUGAR.eapm[dropdownValue])!='undefined'&&typeof(SUGAR.eapm[dropdownValue].docSearch)!='undefined'&&SUGAR.eapm[dropdownValue].docSearch){docShowHideElem.style.display='';YAHOO.util.Connect.asyncRequest('GET','index.php?module=EAPM&action=CheckLogins&to_pdf=1&api='+dropdownValue,{success:SUGAR.field.file.checkEapiLogin,argument:{'elemBaseName':elemBaseName,'docTypeName':docTypeName}});YAHOO.util.Connect.asyncRequest('GET','index.php?module=EAPM&action=flushFileCache&to_pdf=1&api='+dropdownValue,{});}else{docShowHideElem.style.display='none';document.getElementById(elemBaseName+'_file').disabled=false;} -sqs_objects[formName+"_"+elemBaseName+"_remoteName"].api=dropdownValue;var secLevelBoxElem=document.getElementById(elemBaseName+'_securityLevelBox');var secLevelElem=document.getElementById(elemBaseName+'_securityLevel');secLevelElem.options.length=0;if(SUGAR.eapm[dropdownValue]&&SUGAR.eapm[dropdownValue].sharingOptions){var opts=SUGAR.eapm[dropdownValue].sharingOptions;var i=0;for(idx in opts){secLevelElem.options[i]=new Option(SUGAR.language.get('app_strings',opts[idx]),idx,false,false);i++;} -secLevelBoxElem.style.display='';}else{secLevelBoxElem.style.display='none';}} -document.getElementById(docTypeName).onchange=showHideFunc;document.getElementById(elemBaseName+'_externalApiLabel').onclick=externalSearchToggle;showHideFunc();},openPopup:function(elemBaseName){window.open('index.php?module=Documents&action=extdoc&isPopup=1&elemBaseName='+elemBaseName+'&apiName='+document.getElementById('doc_type').value,'sugarPopup','width=600,height=400,menubar=no,toolbar=no,status=no,resizeable=yes,scrollbars=yes');},clearRemote:function(elemBaseName){document.getElementById('doc_id').value='';document.getElementById(elemBaseName).value='';document.getElementById(elemBaseName+'_remoteName').value='';document.getElementById('doc_url').value='';},populateFromPopup:function(elemBaseName,docId,docName,docUrl,docDirectUrl){document.getElementById('doc_id').value=docId;document.getElementById(elemBaseName).value=docId;document.getElementById(elemBaseName+'_remoteName').value=docName;document.getElementById('doc_url').value=docUrl;},getFileExtension:function(fileName){var lastindex=fileName.lastIndexOf(".");if(lastindex==-1) -return false;else -return fileName.substr(++lastindex);},isFileExtensionValid:function(fileName){var docType=document.getElementById('doc_type').value;var fileExtension=this.getFileExtension(fileName);if(typeof(SUGAR.eapm[docType])=='undefined'||!fileExtension||!SUGAR.eapm[docType].restrictUploadsByExtension){return true;} -var whiteSuffixlist=SUGAR.eapm[docType]['restrictUploadsByExtension'];if(whiteSuffixlist.constructor==Array){var results=false;for(var i=0;ierror($error); + $this->ss->trigger_error($error); + return; } - } - + + if(!isset($displayParams['id'])) { + $error = $app_strings['ERR_SMARTY_MISSING_DISPLAY_PARAMS'] . 'id'; + $GLOBALS['log']->error($error); + $this->ss->trigger_error($error); + return; + } - function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { - $this->fillInOptions($vardef,$displayParams); - return parent::getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); - } - - function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { - $this->fillInOptions($vardef,$displayParams); - return parent::getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); + $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); + return $this->fetch('include/SugarFields/Fields/File/DetailView.tpl'); } - public function save(&$bean, $params, $field, $vardef, $prefix = ''){ - $fakeDisplayParams = array(); - $this->fillInOptions($vardef,$fakeDisplayParams); - + public function save(&$bean, $params, $field, $properties, $prefix = ''){ require_once('include/upload_file.php'); - $upload_file = new UploadFile($prefix . $field . '_file'); + $upload_file = new UploadFile($prefix . $field); //remove file - if (isset($_REQUEST['remove_file_' . $field]) && $params['remove_file_' . $field] == 1) + if (isset($_REQUEST['remove_file_' . $field]) && $_REQUEST['remove_file_' . $field] == 1) { $upload_file->unlink_file($bean->$field); $bean->$field=""; } $move=false; - if (isset($_FILES[$prefix . $field . '_file']) && $upload_file->confirm_upload()) + if (isset($_FILES[$prefix . $field]) && $upload_file->confirm_upload()) { $bean->$field = $upload_file->get_stored_file_name(); $bean->file_mime_type = $upload_file->mime_type; $bean->file_ext = $upload_file->file_ext; $move=true; } - - if (isset($params['isDuplicate']) && $params['isDuplicate'] == true && $params['isDuplicate'] != 'false' ) { - // It's a duplicate - $old_id = $params['relate_id']; - } - - if (empty($bean->id)) { - $bean->id = create_guid(); - $bean->new_with_id = true; - } - + if ($move) { - $upload_file->final_move($bean->id); - $upload_file->upload_doc($bean, $bean->id, $params[$prefix . $vardef['docType']], $bean->$field, $upload_file->mime_type); - } else if ( ! empty($old_id) ) { - // It's a duplicate, I think - - if ( empty($params[$prefix . $vardef['docUrl'] ]) ) { - $upload_file->duplicate_file($old_id, $bean->id, $bean->$field); - } else { - $docType = $vardef['docType']; - $bean->$docType = $params[$prefix . $field . '_old_doctype']; - } - } else if ( !empty($params[$prefix . $field . '_remoteName']) ) { - // We ain't moving, we might need to do some remote linking - $displayParams = array(); - $this->fillInOptions($vardef,$displayParams); - - if ( isset($params[$prefix . $vardef['docId']]) - && ! empty($params[$prefix . $vardef['docId']]) - && isset($params[$prefix . $vardef['docType']]) - && ! empty($params[$prefix . $vardef['docType']]) - ) { - $bean->$field = $params[$prefix . $field . '_remoteName']; - - require_once('include/utils/file_utils.php'); - $extension = get_file_extension($bean->$field); - if(!empty($extension)) - { - $bean->file_ext = $extension; - $bean->file_mime_type = get_mime_content_type_from_filename($bean->$field); - } - } - } + if (empty($bean->id)) { + $bean->id = create_guid(); + $bean->new_with_id = true; + } - if ( empty($bean->$field) ) { - $GLOBALS['log']->fatal("The $field is empty, clearing out the lot"); - // Looks like we are emptying this out - $clearFields = array('docId', 'docType', 'docUrl', 'docDirectUrl'); - foreach ( $clearFields as $clearMe ) { - if ( ! isset($vardef[$clearMe]) ) { - continue; - } - $clearField = $vardef[$clearMe]; - $bean->$clearField = ''; - } - } + $upload_file->final_move($bean->id); + } } } +?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Float/DetailView.tpl b/include/SugarFields/Fields/Float/DetailView.tpl index a161078f..4c264ce3 100644 --- a/include/SugarFields/Fields/Float/DetailView.tpl +++ b/include/SugarFields/Fields/Float/DetailView.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} - + {sugar_number_format var={{sugarvar key='value' stringFormat='false'}} {{if !empty($vardef.precision)}}precision={{$vardef.precision}}{{/if}} } {{if !empty($displayParams.enableConnectors)}} diff --git a/include/SugarFields/Fields/Float/SugarFieldFloat.php b/include/SugarFields/Fields/Float/SugarFieldFloat.php index 469082b0..42bd1d01 100644 --- a/include/SugarFields/Fields/Float/SugarFieldFloat.php +++ b/include/SugarFields/Fields/Float/SugarFieldFloat.php @@ -38,8 +38,7 @@ require_once('include/SugarFields/Fields/Int/SugarFieldInt.php'); -class SugarFieldFloat extends SugarFieldInt -{ +class SugarFieldFloat extends SugarFieldInt { public function formatField($rawField, $vardef){ // A null precision uses the user prefs / system prefs by default $precision = null; @@ -61,25 +60,4 @@ class SugarFieldFloat extends SugarFieldInt return (float)unformat_number($formattedField); } - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - $value = str_replace($settings->num_grp_sep,"",$value); - $dec_sep = $settings->dec_sep; - if ( $dec_sep != '.' ) { - $value = str_replace($dec_sep,".",$value); - } - if ( !is_numeric($value) ) { - return false; - } - - return $value; - } } diff --git a/include/SugarFields/Fields/Fullname/DetailView.tpl b/include/SugarFields/Fields/Fullname/DetailView.tpl index 1a259c9c..db689d7e 100644 --- a/include/SugarFields/Fields/Fullname/DetailView.tpl +++ b/include/SugarFields/Fields/Fullname/DetailView.tpl @@ -35,11 +35,6 @@ ********************************************************************************/ *} -{if strlen({{sugarvar key='value' string=true}}) <= 0} -{assign var="value" value={{sugarvar key='default_value' string=true}} } -{else} -{assign var="value" value={{sugarvar key='value' string=true}} } -{/if}
{{sugarvar key='value'}}    @@ -52,7 +47,5 @@
{{if !empty($displayParams.enableConnectors)}} -{if !empty($value)} -{{sugarvar_connector view='DetailView'}} -{/if} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Fullname/SugarFieldFullname.php b/include/SugarFields/Fields/Fullname/SugarFieldFullname.php index fcf476f2..c6298dfc 100644 --- a/include/SugarFields/Fields/Fullname/SugarFieldFullname.php +++ b/include/SugarFields/Fields/Fullname/SugarFieldFullname.php @@ -36,41 +36,11 @@ require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); -class SugarFieldFullname extends SugarFieldBase -{ - function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) - { +class SugarFieldFullname extends SugarFieldBase { + + function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + return $this->fetch('include/SugarFields/Fields/Fullname/DetailView.tpl'); } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - if ( property_exists($focus,'first_name') && property_exists($focus,'last_name') ) { - $name_arr = preg_split('/\s+/',$value); - - if ( count($name_arr) == 1) { - $focus->last_name = $value; - } - else { - // figure out what comes first, the last name or first name - if ( strpos($settings->default_locale_name_format,'l') > strpos($settings->default_locale_name_format,'f') ) { - $focus->first_name = array_shift($name_arr); - $focus->last_name = join(' ',$name_arr); - } - else { - $focus->last_name = array_shift($name_arr); - $focus->first_name = join(' ',$name_arr); - } - } - } - } -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Html/DetailView.tpl b/include/SugarFields/Fields/Html/DetailView.tpl index 467d2435..bbdd3bef 100644 --- a/include/SugarFields/Fields/Html/DetailView.tpl +++ b/include/SugarFields/Fields/Html/DetailView.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} -{{$vardef.value}} +{{$vardef.value}} {{if !empty($displayParams.enableConnectors)}} -{{sugarvar_connector view='DetailView'}} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Html/SugarFieldHtml.php b/include/SugarFields/Fields/Html/SugarFieldHtml.php index 2be725b6..cdcf6ecb 100644 --- a/include/SugarFields/Fields/Html/SugarFieldHtml.php +++ b/include/SugarFields/Fields/Html/SugarFieldHtml.php @@ -42,21 +42,21 @@ class SugarFieldHtml extends SugarFieldBase { $vardef['value'] = $this->getVardefValue($vardef); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + return $this->fetch('include/SugarFields/Fields/Html/DetailView.tpl'); } function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex){ $vardef['value'] = $this->getVardefValue($vardef); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + return $this->fetch('include/SugarFields/Fields/Html/DetailView.tpl'); } function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { $vardef['value'] = $this->getVardefValue($vardef); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + return $this->fetch('include/SugarFields/Fields/Html/DetailView.tpl'); } function getVardefValue($vardef){ diff --git a/include/SugarFields/Fields/Id/SugarFieldId.php b/include/SugarFields/Fields/Id/SugarFieldId.php deleted file mode 100644 index 0cb851f3..00000000 --- a/include/SugarFields/Fields/Id/SugarFieldId.php +++ /dev/null @@ -1,58 +0,0 @@ - 36 ) { - return false; - } - - return $value; - } -} -?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Iframe/DetailView.tpl b/include/SugarFields/Fields/Iframe/DetailView.tpl index b130220e..2d8eafdd 100644 --- a/include/SugarFields/Fields/Iframe/DetailView.tpl +++ b/include/SugarFields/Fields/Iframe/DetailView.tpl @@ -41,7 +41,6 @@ {{/if}} {if !empty($link) && $link != "http://"} {capture name=getStart assign=linkStart}{$link|substr:0:7}{/capture} - {/if} {{if !empty($displayParams.enableConnectors)}} diff --git a/include/SugarFields/Fields/Int/DetailView.tpl b/include/SugarFields/Fields/Int/DetailView.tpl index 73a8ea7f..aca47282 100644 --- a/include/SugarFields/Fields/Int/DetailView.tpl +++ b/include/SugarFields/Fields/Int/DetailView.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} - + {{if $vardef.disable_num_format}} {assign var="value" value={{sugarvar key='value' string=true}} } {$value} diff --git a/include/SugarFields/Fields/Int/RangeSearchForm.tpl b/include/SugarFields/Fields/Int/RangeSearchForm.tpl deleted file mode 100644 index f98ff25e..00000000 --- a/include/SugarFields/Fields/Int/RangeSearchForm.tpl +++ /dev/null @@ -1,107 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} -{if strlen({{sugarvar key='value' string=true}}) <= 0} -{assign var="value" value={{sugarvar key='default_value' string=true}} } -{else} -{assign var="value" value={{sugarvar key='value' string=true}} } -{/if} - -{{if empty($displayParams.idName)}} -{assign var="id" value={{sugarvar key='name' string=true}} } -{{else}} -{assign var="id" value={{$displayParams.idName}} } -{{/if}} - -{if isset($smarty.request.{{$id_range_choice}})} -{assign var="starting_choice" value=$smarty.request.{{$id_range_choice}}} -{else} -{assign var="starting_choice" value="="} -{/if} - - - - - -
- -
-
- -{$APP.LBL_AND} - -
-
\ No newline at end of file diff --git a/include/SugarFields/Fields/Int/SugarFieldInt.php b/include/SugarFields/Fields/Int/SugarFieldInt.php index 2f47d2da..a9ed3331 100644 --- a/include/SugarFields/Fields/Int/SugarFieldInt.php +++ b/include/SugarFields/Fields/Int/SugarFieldInt.php @@ -39,8 +39,7 @@ require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); require_once('modules/Currencies/Currency.php'); -class SugarFieldInt extends SugarFieldBase -{ +class SugarFieldInt extends SugarFieldBase { public function formatField($rawField, $vardef){ if ( !empty($vardef['disable_num_format']) ) { return $rawField; @@ -66,38 +65,8 @@ class SugarFieldInt extends SugarFieldBase function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { // Use the basic field type for searches, no need to format/unformat everything... for now $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - if($this->isRangeSearchView($vardef)) { - $id = isset($displayParams['idName']) ? $displayParams['idName'] : $vardef['name']; - $this->ss->assign('original_id', "{$id}"); - $this->ss->assign('id_range', "range_{$id}"); - $this->ss->assign('id_range_start', "start_range_{$id}"); - $this->ss->assign('id_range_end', "end_range_{$id}"); - $this->ss->assign('id_range_choice', "{$id}_range_choice"); - if(file_exists('custom/include/SugarFields/Fields/Int/RangeSearchForm.tpl')) - { - return $this->fetch('custom/include/SugarFields/Fields/Int/RangeSearchForm.tpl'); - } - return $this->fetch('include/SugarFields/Fields/Int/RangeSearchForm.tpl'); - } - - return $this->fetch($this->findTemplate('SearchForm')); - } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - $value = str_replace($settings->num_grp_sep,"",$value); - if (!is_numeric($value) || strstr($value,".")) { - return false; - } - return $value; - } + + return $this->fetch('include/SugarFields/Fields/Int/SearchForm.tpl'); + } } \ No newline at end of file diff --git a/include/SugarFields/Fields/Link/DetailView.tpl b/include/SugarFields/Fields/Link/DetailView.tpl index fffc5690..b560fbd1 100644 --- a/include/SugarFields/Fields/Link/DetailView.tpl +++ b/include/SugarFields/Fields/Link/DetailView.tpl @@ -41,10 +41,8 @@ {{/if}} {if !empty($link)} {capture name=getStart assign=linkStart}{$link|substr:0:7}{/capture} - {{if !empty($displayParams.title)}}{sugar_translate label='{{$displayParams.title}}' module=$module}{{else}}{$link}{{/if}} - -{{if !empty($displayParams.enableConnectors)}} -{{sugarvar_connector view='DetailView'}} -{{/if}} {/if} +{{if !empty($displayParams.enableConnectors)}} +{{sugarvar_connector view='DetailView'}} +{{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Multienum/DetailView.tpl b/include/SugarFields/Fields/Multienum/DetailView.tpl index 762c996f..55bce432 100644 --- a/include/SugarFields/Fields/Multienum/DetailView.tpl +++ b/include/SugarFields/Fields/Multienum/DetailView.tpl @@ -36,12 +36,12 @@ *} {if !empty({{sugarvar key='value' string=true}}) && ({{sugarvar key='value' string=true}} != '^^')} - {multienum_to_array string={{sugarvar key='value' string=true}} assign="vals"} {foreach from=$vals item=item}
  • { {{sugarvar key='options' string=true}}.$item }
  • {/foreach} +{/if} {{if !empty($displayParams.enableConnectors)}} -{{sugarvar_connector view='DetailView'}} +{{sugarvar_connector view='DetailView'}} {{/if}} -{/if} \ No newline at end of file + diff --git a/include/SugarFields/Fields/Multienum/EditView.tpl b/include/SugarFields/Fields/Multienum/EditView.tpl index b594bc0a..14816bb5 100644 --- a/include/SugarFields/Fields/Multienum/EditView.tpl +++ b/include/SugarFields/Fields/Multienum/EditView.tpl @@ -40,6 +40,6 @@ name="{{if empty($displayParams.idName)}}{{sugarvar key='name'}}{{else}}{{$displ {multienum_to_array string={{sugarvar key='value' string=true}} default={{sugarvar key='default' string=true}} assign="values"} diff --git a/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php b/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php index 175bebc1..4bb379f7 100644 --- a/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php +++ b/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php @@ -34,10 +34,10 @@ * "Powered by SugarCRM". ********************************************************************************/ -require_once('include/SugarFields/Fields/Enum/SugarFieldEnum.php'); +require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); + +class SugarFieldMultienum extends SugarFieldBase { -class SugarFieldMultienum extends SugarFieldEnum -{ function setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass=true) { if ( !isset($vardef['options_list']) && isset($vardef['options']) && !is_array($vardef['options'])) { $vardef['options_list'] = $GLOBALS['app_list_strings'][$vardef['options']]; @@ -48,10 +48,10 @@ class SugarFieldMultienum extends SugarFieldEnum function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditViewFunction')); + return $this->fetch('include/SugarFields/Fields/Multienum/EditViewFunction.tpl'); }else{ $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('SearchView')); + return $this->fetch('include/SugarFields/Fields/Multienum/SearchView.tpl'); } } @@ -72,7 +72,7 @@ class SugarFieldMultienum extends SugarFieldEnum $bean->$field = encodeMultienumValue($params[$prefix.$field]); } - else if (isset($params[$prefix.$field.'_multiselect']) && $params[$prefix.$field.'_multiselect']==true) { + else if (isset($params[$prefix.$field.'_multiselect']) && $params[$prefix.$field.'_multiselect']==true) { // if the value in db is not empty and // if the data is not set in params (means the user has deselected everything) and // if the coorespoding multiselect flag is true @@ -81,37 +81,5 @@ class SugarFieldMultienum extends SugarFieldEnum $bean->$field = ''; } } - } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - if(!empty($value) && is_array($value)) { - $enum_list = $value; - } - else { - // If someone was using the old style multienum import technique - $value = str_replace("^","",$value); - - // We will need to break it apart to put test it. - $enum_list = explode(",",$value); - } - // parse to see if all the values given are valid - foreach ( $enum_list as $key => $enum_value ) { - $enum_list[$key] = $enum_value = trim($enum_value); - if ( parent::importSanitize($enum_value,$vardef,$focus,$settings) === false ) { - return false; - } - } - $value = encodeMultienumValue($enum_list); - - return $value; - } -} \ No newline at end of file + } +} diff --git a/include/SugarFields/Fields/Parent/DetailView.tpl b/include/SugarFields/Fields/Parent/DetailView.tpl index 78e7b3ac..0abc4f69 100644 --- a/include/SugarFields/Fields/Parent/DetailView.tpl +++ b/include/SugarFields/Fields/Parent/DetailView.tpl @@ -35,13 +35,7 @@ ********************************************************************************/ *} -{{if !$nolink}} - - -{{/if}}{{sugarvar key='value'}}{{if !$nolink}} -{{/if}} +{{if !$nolink}}{{/if}}{{sugarvar key='value'}}{{if !$nolink}}{{/if}} {{if !empty($displayParams.enableConnectors)}} -{if !empty({{sugarvar key='value'}})} -{{sugarvar_connector view='DetailView'}} -{/if} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Parent/SugarFieldParent.php b/include/SugarFields/Fields/Parent/SugarFieldParent.php index 40cf320a..fa5e5bf9 100644 --- a/include/SugarFields/Fields/Parent/SugarFieldParent.php +++ b/include/SugarFields/Fields/Parent/SugarFieldParent.php @@ -34,9 +34,9 @@ * "Powered by SugarCRM". ********************************************************************************/ -require_once('include/SugarFields/Fields/Relate/SugarFieldRelate.php'); +require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); -class SugarFieldParent extends SugarFieldRelate { +class SugarFieldParent extends SugarFieldBase { function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { $nolink = array('Users', 'Teams'); @@ -46,7 +46,7 @@ class SugarFieldParent extends SugarFieldRelate { $this->ss->assign('nolink', false); } $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + return $this->fetch('include/SugarFields/Fields/Parent/DetailView.tpl'); } function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { @@ -80,7 +80,7 @@ class SugarFieldParent extends SugarFieldRelate { $displayParams['disabled_parent_types'] = ''; $this->ss->assign('quickSearchCode', $this->createQuickSearchCode($form_name, $vardef)); $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditView')); + return $this->fetch('include/SugarFields/Fields/Parent/EditView.tpl'); } function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { @@ -115,33 +115,7 @@ class SugarFieldParent extends SugarFieldRelate { $displayParams['popupData'] = '{literal}'.$json->encode($popup_request_data).'{/literal}'; $displayParams['disabled_parent_types'] = ''; $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('SearchView')); - } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - global $beanList; - - if ( isset($vardef['type_name']) ) { - $moduleName = $vardef['type_name']; - if ( isset($focus->$moduleName) && isset($beanList[$focus->$moduleName]) ) { - $vardef['module'] = $focus->$moduleName; - $vardef['rname'] = 'name'; - $relatedBean = loadBean($focus->$moduleName); - $vardef['table'] = $relatedBean->table_name; - return parent::importSanitize($value,$vardef,$focus,$settings); - } - } - - return false; + return $this->fetch('include/SugarFields/Fields/Parent/SearchView.tpl'); } function createQuickSearchCode($formName = 'EditView', $vardef){ diff --git a/include/SugarFields/Fields/Password/SugarFieldPassword.php b/include/SugarFields/Fields/Password/SugarFieldPassword.php deleted file mode 100644 index 79a5f9cf..00000000 --- a/include/SugarFields/Fields/Password/SugarFieldPassword.php +++ /dev/null @@ -1,56 +0,0 @@ - \ No newline at end of file diff --git a/include/SugarFields/Fields/Assigned_user_name/EditViewFunction.tpl b/include/SugarFields/Fields/Phone/DetailView.tpl similarity index 88% rename from include/SugarFields/Fields/Assigned_user_name/EditViewFunction.tpl rename to include/SugarFields/Fields/Phone/DetailView.tpl index 909fc108..fd5fdabc 100644 --- a/include/SugarFields/Fields/Assigned_user_name/EditViewFunction.tpl +++ b/include/SugarFields/Fields/Phone/DetailView.tpl @@ -35,4 +35,10 @@ ********************************************************************************/ *} -{{include file="/include/SugarFields/Fields/Multienum/EditViewFunction.tpl"}} +{if !empty({{sugarvar key='value' string=true}})} +{assign var="phone_value" value={{sugarvar key='value' string=true}} } +{sugar_phone value=$phone_value } +{/if} +{{if !empty($displayParams.enableConnectors)}} +{{sugarvar_connector view='DetailView'}} +{{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Phone/EditView.tpl b/include/SugarFields/Fields/Phone/EditView.tpl deleted file mode 100644 index 86269204..00000000 --- a/include/SugarFields/Fields/Phone/EditView.tpl +++ /dev/null @@ -1,50 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} -{{capture name=idname assign=idname}}{{sugarvar key='name'}}{{/capture}} -{{if !empty($displayParams.idName)}} - {{assign var=idname value=$displayParams.idName}} -{{/if}} - -{if strlen({{sugarvar key='value' string=true}}) <= 0} -{assign var="value" value={{sugarvar key='default_value' string=true}} } -{else} -{assign var="value" value={{sugarvar key='value' string=true}} } -{/if} - - - diff --git a/include/SugarFields/Fields/File/ListView.tpl b/include/SugarFields/Fields/Phone/ListView.tpl similarity index 79% rename from include/SugarFields/Fields/File/ListView.tpl rename to include/SugarFields/Fields/Phone/ListView.tpl index daa15eac..463c9b22 100644 --- a/include/SugarFields/Fields/File/ListView.tpl +++ b/include/SugarFields/Fields/Phone/ListView.tpl @@ -35,11 +35,5 @@ ********************************************************************************/ *} -{sugar_fetch object=$parentFieldArray key=$col} -{if isset($vardef.allowEapm) && $vardef.allowEapm && isset($parentFieldArray.DOC_TYPE) } -{capture name=imageNameCapture assign=imageName} -{sugar_fetch object=$parentFieldArray key=DOC_TYPE}_image_inline.png -{/capture} - -{/if} - \ No newline at end of file +{capture name=getPhone assign=phone}{sugar_fetch object=$parentFieldArray key=$col}{/capture} +{sugar_phone value=$phone } \ No newline at end of file diff --git a/include/SugarFields/Fields/Phone/SugarFieldPhone.php b/include/SugarFields/Fields/Phone/SugarFieldPhone.php deleted file mode 100644 index b6eb81c7..00000000 --- a/include/SugarFields/Fields/Phone/SugarFieldPhone.php +++ /dev/null @@ -1,56 +0,0 @@ -$field = $params[$prefix.$field]; - } - } - -} -?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Radioenum/DetailView.tpl b/include/SugarFields/Fields/Radioenum/DetailView.tpl index 5d2718c8..46722212 100644 --- a/include/SugarFields/Fields/Radioenum/DetailView.tpl +++ b/include/SugarFields/Fields/Radioenum/DetailView.tpl @@ -35,11 +35,7 @@ ********************************************************************************/ *} - { {{sugarvar key='options' string=true}}[{{sugarvar key='value' string=true}}]} - {{if !empty($displayParams.enableConnectors)}} -{if !empty({{sugarvar key='options' string=true}}[{{sugarvar key='value' string=true}}])} -{{sugarvar_connector view='DetailView'}} -{/if} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Relate/DetailView.tpl b/include/SugarFields/Fields/Relate/DetailView.tpl index 82998db2..47841d7a 100644 --- a/include/SugarFields/Fields/Relate/DetailView.tpl +++ b/include/SugarFields/Fields/Relate/DetailView.tpl @@ -38,7 +38,7 @@ {{if !$nolink && !empty($vardef.id_name)}} {if !empty({{sugarvar memberName='vardef.id_name' key='value' string='true'}})}{/if} {{/if}} -{{sugarvar key='value'}} +{{sugarvar key='value'}} {{if !$nolink && !empty($vardef.id_name)}} {if !empty({{sugarvar memberName='vardef.id_name' key='value' string='true'}})}{/if} {{/if}} diff --git a/include/SugarFields/Fields/Relate/SugarFieldRelate.php b/include/SugarFields/Fields/Relate/SugarFieldRelate.php index 4a505e25..3124049c 100644 --- a/include/SugarFields/Fields/Relate/SugarFieldRelate.php +++ b/include/SugarFields/Fields/Relate/SugarFieldRelate.php @@ -46,7 +46,7 @@ class SugarFieldRelate extends SugarFieldBase { $this->ss->assign('nolink', false); } $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + return $this->fetch('include/SugarFields/Fields/Relate/DetailView.tpl'); } function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { @@ -134,7 +134,7 @@ class SugarFieldRelate extends SugarFieldBase { $displayParams['readOnly'] = $displayParams['readOnly'] == false ? '' : 'READONLY'; } $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('EditView')); + return $this->fetch('include/SugarFields/Fields/Relate/EditView.tpl'); } function getPopupViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex){ @@ -151,10 +151,9 @@ class SugarFieldRelate extends SugarFieldBase { if(isset($displayParams['formName'])) { $form_name = $displayParams['formName']; } - if(!empty($vardef['rname']) && $vardef['rname'] == 'user_name'){ + if(!empty($vardef['rname']) && $vardef['rname'] == 'user_name'){ $displayParams['useIdSearch'] = true; } - //Special Case for accounts; use the displayParams array and retrieve //the key and copy indexes. 'key' is the suffix of the field we are searching //the Account's address with. 'copy' is the suffix we are copying the addresses @@ -226,7 +225,7 @@ class SugarFieldRelate extends SugarFieldBase { $displayParams['readOnly'] = $displayParams['readOnly'] == false ? '' : 'READONLY'; } $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('SearchView')); + return $this->fetch('include/SugarFields/Fields/Relate/SearchView.tpl'); } function formatField($rawField, $vardef) { @@ -252,117 +251,5 @@ class SugarFieldRelate extends SugarFieldBase { return $new_field; } - - /** - * @see SugarFieldBase::importSanitize() - */ - public function importSanitize( - $value, - $vardef, - $focus, - ImportFieldSanitize $settings - ) - { - if ( !isset($vardef['module']) ) - return false; - $newbean = loadBean($vardef['module']); - - // Bug 38885 - If we are relating to the Users table on user_name, there's a good chance - // that the related field data is the full_name, rather than the user_name. So to be sure - // let's try to lookup the field the relationship is expecting to use (user_name). - if ( $vardef['module'] == 'Users' && $vardef['rname'] == 'user_name' ) { - $userFocus = new User; - $userFocus->retrieve_by_string_fields( - array($userFocus->db->concat('users',array('first_name','last_name')) => $value )); - if ( !empty($userFocus->id) ) { - $value = $userFocus->user_name; - } - } - - // Bug 32869 - Assumed related field name is 'name' if it is not specified - if ( !isset($vardef['rname']) ) - $vardef['rname'] = 'name'; - - // Bug 27046 - Validate field against type as it is in the related field - $rvardef = $newbean->getFieldDefinition($vardef['rname']); - if ( isset($rvardef['type']) - && method_exists($this,$rvardef['type']) ) { - $fieldtype = $rvardef['type']; - $returnValue = $settings->$fieldtype($value,$rvardef); - if ( !$returnValue ) - return false; - else - $value = $returnValue; - } - - if ( isset($vardef['id_name']) ) { - $idField = $vardef['id_name']; - - // Bug 24075 - clear out id field value if it is invalid - if ( isset($focus->$idField) ) { - $checkfocus = loadBean($vardef['module']); - if ( $checkfocus && is_null($checkfocus->retrieve($focus->$idField)) ) - $focus->$idField = ''; - } - - // be sure that the id isn't already set for this row - if ( empty($focus->$idField) - && $idField != $vardef['name'] - && !empty($vardef['rname']) - && !empty($vardef['table'])) { - // Bug 27562 - Check db_concat_fields first to see if the field name is a concat - $relatedFieldDef = $newbean->getFieldDefinition($vardef['rname']); - if ( isset($relatedFieldDef['db_concat_fields']) - && is_array($relatedFieldDef['db_concat_fields']) ) - $fieldname = $focus->db->concat($vardef['table'],$relatedFieldDef['db_concat_fields']); - else - $fieldname = $vardef['rname']; - // lookup first record that matches in linked table - $query = "SELECT id - FROM {$vardef['table']} - WHERE {$fieldname} = '" . $focus->db->quote($value) . "' - AND deleted != 1"; - - $result = $focus->db->limitQuery($query,0,1,true, "Want only a single row"); - if(!empty($result)){ - if ( $relaterow = $focus->db->fetchByAssoc($result) ) - $focus->$idField = $relaterow['id']; - elseif ( !$settings->addRelatedBean - || ( $newbean->bean_implements('ACL') && !$newbean->ACLAccess('save') ) - || ( in_array($newbean->module_dir,array('Teams','Users')) ) - ) - return false; - else { - // add this as a new record in that bean, then relate - if ( isset($relatedFieldDef['db_concat_fields']) - && is_array($relatedFieldDef['db_concat_fields']) ) { - $relatedFieldParts = explode(' ',$value); - foreach ($relatedFieldDef['db_concat_fields'] as $relatedField) - $newbean->$relatedField = array_shift($relatedFieldParts); - } - else - $newbean->$vardef['rname'] = $value; - if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' ) - $newbean->assigned_user_id = $GLOBALS['current_user']->id; - else - $newbean->assigned_user_id = $focus->assigned_user_id; - if ( !isset($focus->modified_user_id) || $focus->modified_user_id == '' ) - $newbean->modified_user_id = $GLOBALS['current_user']->id; - else - $newbean->modified_user_id = $focus->modified_user_id; - - // populate fields from the parent bean to the child bean - $focus->populateRelatedBean($newbean); - - $newbean->save(false); - $focus->$idField = $newbean->id; - $settings->createdBeans[] = ImportFile::writeRowToLastImport( - $focus->module_dir,$newbean->object_name,$newbean->id); - } - } - } - } - - return $value; - } } +?> \ No newline at end of file diff --git a/include/SugarFields/Fields/Text/DetailView.tpl b/include/SugarFields/Fields/Text/DetailView.tpl index 50b7ec00..a6db6434 100644 --- a/include/SugarFields/Fields/Text/DetailView.tpl +++ b/include/SugarFields/Fields/Text/DetailView.tpl @@ -35,15 +35,14 @@ ********************************************************************************/ *} - + {{if empty($displayParams.textonly)}} {{sugarvar key='value' htmlentitydecode='true'}} {{else}} {{sugarvar key='value'}} {{/if}} - + + {{if !empty($displayParams.enableConnectors)}} -{if !empty({{sugarvar key='value'}})} -{{sugarvar_connector view='DetailView'}} -{/if} +{{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Text/SugarFieldText.php b/include/SugarFields/Fields/Text/SugarFieldText.php index 4a6043fc..4573835e 100644 --- a/include/SugarFields/Fields/Text/SugarFieldText.php +++ b/include/SugarFields/Fields/Text/SugarFieldText.php @@ -45,14 +45,14 @@ class SugarFieldText extends SugarFieldBase { return parent::getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex); } function getClassicEditView($field_id='description', $value='', $prefix='', $rich_text=false, $maxlength='', $tabindex=1, $cols=80, $rows=4) { - + $this->ss->assign('prefix', $prefix); $this->ss->assign('field_id', $field_id); $this->ss->assign('value', $value); $this->ss->assign('tabindex', $tabindex); - + $displayParams = array(); - $displayParams['textonly'] = $rich_text ? false : true; + $displayParams['textonly'] = $rich_text ? false : true; $displayParams['maxlength'] = $maxlength; $displayParams['rows'] = $rows; $displayParams['cols'] = $cols; @@ -68,10 +68,14 @@ class SugarFieldText extends SugarFieldBase { $this->ss->assign('RICH_TEXT_EDITOR_WIDTH', $width); } else { $this->ss->assign('RICH_TEXT_EDITOR_HEIGHT', '100px'); - $this->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); - } + $this->ss->assign('RICH_TEXT_EDITOR_WIDTH', '95%'); + } - return $this->ss->fetch($this->findTemplate('ClassicEditView')); + if(file_exists('custom/include/SugarFields/Fields/Text/ClassicEditView.tpl')) { + return $this->ss->fetch('custom/include/SugarFields/Fields/Text/ClassicEditView.tpl'); + } else { + return $this->ss->fetch('include/SugarFields/Fields/Text/ClassicEditView.tpl'); + } } } ?> diff --git a/include/SugarFields/Fields/URL/DetailView.tpl b/include/SugarFields/Fields/URL/DetailView.tpl index e5ff7e29..1fc5b0ed 100644 --- a/include/SugarFields/Fields/URL/DetailView.tpl +++ b/include/SugarFields/Fields/URL/DetailView.tpl @@ -41,12 +41,8 @@ {{/if}} {if !empty($link)} {capture name=getStart assign=linkStart}{$link|substr:0:7}{/capture} - - -{{if !empty($displayParams.title)}}{sugar_translate label='{{$displayParams.title}}' module=$module}{{else}}{$link}{{/if}} - - +{{if !empty($displayParams.title)}}{sugar_translate label='{{$displayParams.title}}' module=$module}{{else}}{$link}{{/if}} +{/if} {{if !empty($displayParams.enableConnectors)}} -{{sugarvar_connector view='DetailView'}} +{{sugarvar_connector view='DetailView'}} {{/if}} -{/if} diff --git a/include/SugarFields/Fields/Username/DetailView.tpl b/include/SugarFields/Fields/Username/DetailView.tpl index 95810b4b..d86524a5 100644 --- a/include/SugarFields/Fields/Username/DetailView.tpl +++ b/include/SugarFields/Fields/Username/DetailView.tpl @@ -35,9 +35,7 @@ ********************************************************************************/ *} - -{$fields[{{sugarvar key='salutation' stringFormat=true}}].value} {$fields[{{sugarvar key='first_name' stringFormat=true}}].value} {$fields[{{sugarvar key='last_name' stringFormat=true}}].value} - +{$fields[{{sugarvar key='salutation' stringFormat=true}}].value} {$fields[{{sugarvar key='first_name' stringFormat=true}}].value} {$fields[{{sugarvar key='last_name' stringFormat=true}}].value} {{if !empty($displayParams.enableConnectors)}} {{sugarvar_connector view='DetailView'}} {{/if}} \ No newline at end of file diff --git a/include/SugarFields/Fields/Username/SugarFieldUsername.php b/include/SugarFields/Fields/Username/SugarFieldUsername.php index f9113d79..aad03671 100644 --- a/include/SugarFields/Fields/Username/SugarFieldUsername.php +++ b/include/SugarFields/Fields/Username/SugarFieldUsername.php @@ -40,7 +40,12 @@ class SugarFieldUsername extends SugarFieldBase { function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) { $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); - return $this->fetch($this->findTemplate('DetailView')); + global $current_language; + if(isset($current_language) && file_exists('include/SugarFields/Fields/Username/' . $current_language . '.DetailView.tpl')) { + return $this->fetch('include/SugarFields/Fields/Username/' . $current_language . '.DetailView.tpl'); + } else { + return $this->fetch('include/SugarFields/Fields/Username/DetailView.tpl'); + } //if-else } } ?> diff --git a/include/SugarFields/Parsers/MetaParser.php b/include/SugarFields/Parsers/MetaParser.php index b7e76096..84378b5c 100644 --- a/include/SugarFields/Parsers/MetaParser.php +++ b/include/SugarFields/Parsers/MetaParser.php @@ -687,6 +687,9 @@ function mergeTemplateMeta($templateMeta, $moduleDir, $masterCopy) { if(isset($masterTemplateMeta['javascript'])) { //Insert the getJSPath code back into src value $masterTemplateMeta['javascript'] = preg_replace('/src\s*=\s*[\'\"].*?(modules\/|include\/)([^\.]*?\.js)([^\'\"]*?)[\'\"]/i', 'src="@sq . getJSPath(@sq${1}${2}@sq) . @sq"', $masterTemplateMeta['javascript']); + // BEGIN SUGAR INT + //$GLOBALS['log']->fatal(var_export($masterTemplateMeta['javascript'], true)); + // END SUGAR INT } return $masterTemplateMeta; diff --git a/include/SugarFolders/SugarFolders.php b/include/SugarFolders/SugarFolders.php index 181de008..47c800c8 100644 --- a/include/SugarFolders/SugarFolders.php +++ b/include/SugarFolders/SugarFolders.php @@ -268,18 +268,18 @@ class SugarFolder { } } - + /** * Deletes all subscriptions for a particular folder id * * @return unknown */ - function clearSubscriptionsForFolder($folderID) + function clearSubscriptionsForFolder($folderID) { $query = "DELETE FROM folders_subscriptions WHERE folder_id = '$folderID'"; $r = $this->db->query($query); - } - + } + function generateSugarsDynamicFolderQuery() { global $current_user; $type = $this->folder_type; @@ -333,7 +333,7 @@ class SugarFolder { $return = array(); $email = new Email(); //Needed for email specific functions. - + while($a = $this->db->fetchByAssoc($r)) { $temp = array(); @@ -462,8 +462,8 @@ class SugarFolder { } $rootWhere = ''; $teamSecurityClause = ''; - - + + if($sugar_config['dbconfig']['db_type'] == 'oci8') { $rootWhere .= "AND f.parent_folder IS NULL"; @@ -509,12 +509,12 @@ class SugarFolder { foreach($folders as $a) { $a['selected'] = (in_array($a['id'], $subscriptions)) ? true : false; $a['origName'] = $a['name']; - + if($a['is_group'] == 1) - if ($a['deleted'] != 1) + if ($a['deleted'] != 1) $grp[] = $a; } - + return $grp; } /** @@ -534,8 +534,6 @@ class SugarFolder { foreach($folders as $a) { $a['selected'] = (in_array($a['id'], $subscriptions)) ? true : false; $a['origName'] = $a['name']; - if( isset($a['dynamic_query']) ) - unset($a['dynamic_query']); if($a['is_group'] == 1) { $grp[] = $a; } else { @@ -574,7 +572,7 @@ class SugarFolder { } $collection[] = $a; - + if($a['has_child'] == 1) { $this->_depth++; $qGetChildren = $this->core.$this->coreWhere."AND parent_folder = '{$a['id']}'"; @@ -583,7 +581,7 @@ class SugarFolder { $collection = $this->getFoldersChildForSettings($aGetChildren, $collection, $subscriptions); } } - + return $collection; } @@ -793,14 +791,14 @@ class SugarFolder { } // if $q = "SELECT COUNT(*) c from folders_rel where polymorphic_module = 'Emails' AND polymorphic_id = '{$id}' AND folder_id = '{$this->id}'"; - + $checkEmailQuery = "SELECT count(*) c FROM folders_rel where polymorphic_module = 'Emails' and folder_id = '{$id}' and deleted = 0"; $resultSet = $this->db->query($checkEmailQuery); $a = $this->db->fetchByAssoc($resultSet); if ($a['c'] > 0) { return false; } // if - + $q = "SELECT * FROM folders WHERE id = '{$id}'"; $r = $this->db->query($q); $a = $this->db->fetchByAssoc($r); @@ -842,22 +840,22 @@ class SugarFolder { $this->dynamic_query = $this->db->helper->escape_quote($this->dynamic_query); - if((empty($this->id) && $this->new_with_id == false) || (!empty($this->id) && $this->new_with_id == true)) + if((empty($this->id) && $this->new_with_id == false) || (!empty($this->id) && $this->new_with_id == true)) { - + if( empty($this->id) ) { $guid = create_guid(); $this->id = $guid; } - + $q = "INSERT INTO folders(id, name, folder_type, parent_folder, has_child, is_group, is_dynamic, dynamic_query, assign_to_id, ". "created_by, modified_by, deleted)". " VALUES('{$this->id}', '{$this->name}', '{$this->folder_type}', '{$this->parent_folder}', {$this->has_child}, {$this->is_group}, {$this->is_dynamic}, '{$this->dynamic_query}', '{$this->assign_to_id}', " . "'{$current_user->id}', '{$current_user->id}', 0)"; - + if($addSubscriptions) { // create default subscription @@ -867,7 +865,7 @@ class SugarFolder { // if parent_id is set, update parent's has_child flag $q3 = "UPDATE folders SET has_child = 1 WHERE id = '{$this->parent_folder}'"; $r3 = $this->db->query($q3); - } + } else { $q = "UPDATE folders SET name = '{$this->name}', parent_folder = '{$this->parent_folder}', dynamic_query = '{$this->dynamic_query}', assign_to_id = '{$this->assign_to_id}', " . "modified_by = '{$current_user->id}' WHERE id = '{$this->id}'"; @@ -885,13 +883,13 @@ class SugarFolder { function addSubscriptionsToGroupFolder() { global $current_user; - + $this->createSubscriptionForUser($current_user->id); - + } - - - + + + /** * Add subscriptions to this group folder. * @@ -902,8 +900,8 @@ class SugarFolder { $query = "INSERT INTO folders_subscriptions VALUES('{$guid2}', '{$this->id}', '{$user_id}')"; $this->db->query($query); } - - + + function updateFolder($fields) { global $current_user; diff --git a/include/SugarOauth.php b/include/SugarOauth.php deleted file mode 100644 index bbc4d936..00000000 --- a/include/SugarOauth.php +++ /dev/null @@ -1,153 +0,0 @@ -_oauth_config = array( - 'consumerKey' => $consumer_key, - 'consumerSecret' => $consumer_secret, - ); - if(!empty($params)) { - $this->_oauth_config = array_merge($this->_oauth_config, $params); - } - parent::__construct($this->_oauth_config); - } - - public function enableDebug() - { - return $this; - } - - public function setToken($token, $secret) - { - $this->token = array($token, $secret); - } - - public function makeRequestToken() - { - $token = new Zend_Oauth_Token_Request(); - $token->setToken($this->token[0]); - $token->setTokenSecret($this->token[1]); - return $token; - } - - public function makeAccessToken() - { - $token = new Zend_Oauth_Token_Access(); - $token->setToken($this->token[0]); - $token->setTokenSecret($this->token[1]); - return $token; - } - - public function getRequestToken($url, $callback = null, $params = array()) - { - if(!empty($callback)) { - $this->setCallbackUrl($callback); - } - list($clean_url, $query) = explode('?', $url); - if($query) { - $url = $clean_url; - parse_str($query, $query_params); - $params = array_merge($params, $query_params); - } - $this->setRequestTokenUrl($url); - try{ - $this->_last = $token = parent::getRequestToken($params); - return array('oauth_token' => $token->getToken(), 'oauth_token_secret' => $token->getTokenSecret()); - }catch(Zend_Oauth_Exception $e){ - return array('oauth_token' => '', 'oauth_token_secret' => ''); - } - } - - public function getAccessToken($url) - { - $this->setAccessTokenUrl($url); - $this->_last = $token = parent::getAccessToken($_REQUEST, $this->makeRequestToken()); - return array('oauth_token' => $token->getToken(), 'oauth_token_secret' => $token->getTokenSecret()); - } - - public function fetch($url, $params = null, $method = 'GET', $headers = null) - { - $acc = $this->makeAccessToken(); - if ( strpos($url,'?') ) { - list($clean_url, $query) = explode('?', $url); - if($query) { - $url = $clean_url; - parse_str($query, $query_params); - $params = array_merge($params?$params:array(), $query_params); - } - } - $client = $acc->getHttpClient($this->_oauth_config, $url); - $client->setMethod($method); - if(!empty($headers)) { - $client->setHeaders($headers); - } - if(!empty($params)) { - if($method == 'GET') { - $client->setParameterGet($params); - } else { - $client->setParameterPost($params); - } - } - $this->_last = $resp = $client->request(); - $this->_lastReq = $client->getLastRequest(); - return $resp->getBody(); - } - - public function getClient() - { - $acc = $this->makeAccessToken(); - return $acc->getHttpClient($this->_oauth_config); - } - - public function getLastResponse() - { - return $this->_last; - } - - public function getLastRequest() - { - return $this->_lastReq; - } - } diff --git a/include/SugarObjects/VardefManager.php b/include/SugarObjects/VardefManager.php index d4be6058..4cbf3bde 100644 --- a/include/SugarObjects/VardefManager.php +++ b/include/SugarObjects/VardefManager.php @@ -38,43 +38,36 @@ class VardefManager{ static $custom_disabled_modules = array(); - static $linkFields; - /** + /** * this method is called within a vardefs.php file which extends from a SugarObject. * It is meant to load the vardefs from the SugarObject. - */ - static function createVardef($module, $object, $templates = array('default'), $object_name = false) - { - global $dictionary; - - include_once('modules/TableDictionary.php'); + */ + static function createVardef($module,$object, $templates=array('default'), $object_name=false){ + global $dictionary; - //reverse the sort order so priority goes highest to lowest; - $templates = array_reverse($templates); - foreach ($templates as $template) - { - VardefManager::addTemplate($module, $object, $template, $object_name); - } - LanguageManager::createLanguageFile($module, $templates); + //reverse the sort order so priority goes highest to lowest; + $templates = array_reverse($templates); + foreach($templates as $template){ + VardefManager::addTemplate($module,$object,$template, $object_name); + } + LanguageManager::createLanguageFile($module, $templates); - if (isset(VardefManager::$custom_disabled_modules[$module])) - { - $vardef_paths = array( - 'custom/modules/' . $module . '/Ext/Vardefs/vardefs.ext.php', - 'custom/Extension/modules/' . $module . '/Ext/Vardefs/vardefs.php' - ); + if (isset(VardefManager::$custom_disabled_modules[$module])) { + $vardef_paths = array( + 'custom/modules/'.$module.'/Ext/Vardefs/vardefs.ext.php', + 'custom/Extension/modules/'.$module.'/Ext/Vardefs/vardefs.php' + ); - //search a predefined set of locations for the vardef files - foreach ($vardef_paths as $path) - { - if (file_exists($path)) { - require($path); - } - } + //search a predefined set of locations for the vardef files + foreach($vardef_paths as $path){ + if(file_exists($path)){ + require($path); + } + } } } - + /** * Enables/Disables the loading of custom vardefs for a module. * @param String $module Module to be enabled/disabled @@ -137,9 +130,7 @@ class VardefManager{ $file = create_cache_directory('modules/' . $module . '/' . $object . 'vardefs.php'); write_array_to_file('GLOBALS["dictionary"]["'. $object . '"]',$GLOBALS['dictionary'][$object], $file); - if ( is_readable($file) ) { - include($file); - } + include($file); // put the item in the sugar cache. $key = "VardefManager.$module.$object"; @@ -227,11 +218,9 @@ class VardefManager{ //great! now that we have loaded all of our vardefs. //let's go save them to the cache file. - if(!empty($GLOBALS['dictionary'][$object])) { + if(!empty($GLOBALS['dictionary'][$object])) VardefManager::saveCache($module, $object); - } } - /** * load the vardefs for a given module and object @@ -272,9 +261,8 @@ class VardefManager{ //which was created from the refreshVardefs so let's try to load it. if(file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/'. $module . '/' . $object . 'vardefs.php')) { - if ( is_readable($GLOBALS['sugar_config']['cache_dir'].'modules/'. $module . '/' . $object . 'vardefs.php') ) { - include_once($GLOBALS['sugar_config']['cache_dir'].'modules/'. $module . '/' . $object . 'vardefs.php'); - } + include_once($GLOBALS['sugar_config']['cache_dir'].'modules/'. $module . '/' . $object . 'vardefs.php'); + // now that we hae loaded the data from disk, put it in the cache. if(!empty($GLOBALS['dictionary'][$object])) sugar_cache_put($key,$GLOBALS['dictionary'][$object]); diff --git a/include/SugarObjects/implements/team_security/vardefs.php b/include/SugarObjects/implements/team_security/vardefs.php index 2938e133..cff2affe 100644 --- a/include/SugarObjects/implements/team_security/vardefs.php +++ b/include/SugarObjects/implements/team_security/vardefs.php @@ -66,7 +66,7 @@ $vardefs = array( ), 'indices' => array( array( - 'name' => 'idx_'.strtolower($table_name).'_tmst_id', + 'name' => 'idx_'.strtolower($table_name).'_tmst_id', 'type' => 'index', 'fields' => array('team_set_id') ), diff --git a/include/SugarObjects/templates/basic/Basic.php b/include/SugarObjects/templates/basic/Basic.php index fd5ece43..dc538586 100644 --- a/include/SugarObjects/templates/basic/Basic.php +++ b/include/SugarObjects/templates/basic/Basic.php @@ -35,21 +35,17 @@ ********************************************************************************/ -class Basic extends SugarBean -{ - /** - * Constructor - */ - public function Basic() - { +class Basic extends SugarBean{ + + function Basic(){ parent::SugarBean(); } - - /** - * @see SugarBean::get_summary_text() - */ - public function get_summary_text() + function get_summary_text() { return "$this->name"; } + + function create_export_query($order_by, $where){ + return $this->create_new_list_query($order_by, $where, array(), array(), 0, '', false, $this, true); + } } \ No newline at end of file diff --git a/include/SugarObjects/templates/basic/metadata/SearchFields.php b/include/SugarObjects/templates/basic/metadata/SearchFields.php index e278afc8..86368e55 100644 --- a/include/SugarObjects/templates/basic/metadata/SearchFields.php +++ b/include/SugarObjects/templates/basic/metadata/SearchFields.php @@ -41,14 +41,5 @@ $searchFields[$module_name] = 'name' => array( 'query_type'=>'default'), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/include/SugarObjects/templates/basic/vardefs.php b/include/SugarObjects/templates/basic/vardefs.php index 07d21098..ab6f77c5 100644 --- a/include/SugarObjects/templates/basic/vardefs.php +++ b/include/SugarObjects/templates/basic/vardefs.php @@ -63,8 +63,6 @@ $vardefs = array( 'type' => 'datetime', 'group'=>'created_by_name', 'comment' => 'Date record created', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'date_modified' => array ( @@ -73,8 +71,6 @@ $vardefs = array( 'type' => 'datetime', 'group'=>'modified_by_name', 'comment' => 'Date record last modified', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'modified_user_id' => array ( diff --git a/include/SugarObjects/templates/company/language/en_us.lang.php b/include/SugarObjects/templates/company/language/en_us.lang.php index b0562775..0a111d99 100644 --- a/include/SugarObjects/templates/company/language/en_us.lang.php +++ b/include/SugarObjects/templates/company/language/en_us.lang.php @@ -48,9 +48,8 @@ $mod_strings = array ( 'LBL_ANY_EMAIL' => 'Any Email:', 'LBL_ANY_PHONE' => 'Any Phone:', 'LBL_ASSIGNED_TO_NAME' => 'User:', - 'LBL_RATING' => 'Rating', - 'LBL_ASSIGNED_TO' => 'Assigned to:', - 'LBL_ASSIGNED_USER' => 'Assigned to:', + 'LBL_RATING'=>'Rating', + 'LBL_ASSIGNED_USER'=>'Assigned to:', 'LBL_ASSIGNED_TO_ID' => 'Assigned to:', 'LBL_BILLING_ADDRESS_CITY' => 'Billing City:', 'LBL_BILLING_ADDRESS_COUNTRY' => 'Billing Country:', @@ -93,8 +92,7 @@ $mod_strings = array ( 'LBL_PHONE_FAX' => 'Phone Fax:', 'LBL_PHONE_OFFICE' => 'Office Phone:', 'LBL_PHONE' => 'Phone:', - 'LBL_EMAIL_ADDRESS' => 'Email Address', - 'LBL_EMAIL_ADDRESSES' => 'Email Address(es)', + 'LBL_EMAIL_ADDRESS'=>'Email Address(es)', 'LBL_POSTAL_CODE' => 'Postal Code:', 'LBL_PUSH_BILLING' => 'Push Billing', 'LBL_PUSH_SHIPPING' => 'Push Shipping', @@ -121,8 +119,8 @@ $mod_strings = array ( 'LNK_ACCOUNT_LIST' => 'Accounts', 'LNK_NEW_ACCOUNT' => 'Create Account', - 'MSG_DUPLICATE' => 'The account record you are about to create might be a duplicate of an account record that already exists. Account records containing similar names are listed below.
    Click Create Account to continue creating this new account, or select an existing account listed below.', - 'MSG_SHOW_DUPLICATES' => 'The account record you are about to create might be a duplicate of an account record that already exists. Account records containing similar names are listed below.
    Click Save to continue creating this new account, or click Cancel to return to the module without creating the account.', + 'MSG_DUPLICATE' => 'Creating this account may potentially create a duplicate account. You may either select an account from the list below or you may click on Save to continue creating a new account with the previously entered data.', + 'MSG_SHOW_DUPLICATES' => 'Creating this account may potentially create a duplicate account. You may either click on Save to continue creating this new account with the previously entered data or you may click Cancel.', 'NTC_COPY_BILLING_ADDRESS' => 'Copy billing address to shipping address', 'NTC_COPY_BILLING_ADDRESS2' => 'Copy to shipping', diff --git a/include/SugarObjects/templates/company/metadata/SearchFields.php b/include/SugarObjects/templates/company/metadata/SearchFields.php index 24553242..9bd66379 100644 --- a/include/SugarObjects/templates/company/metadata/SearchFields.php +++ b/include/SugarObjects/templates/company/metadata/SearchFields.php @@ -56,29 +56,12 @@ $searchFields[$module_name] = 'address_country'=> array('query_type'=>'default','db_field'=>array('billing_address_country','shipping_address_country')), 'rating'=> array('query_type'=>'default'), 'phone'=> array('query_type'=>'default','db_field'=>array('phone_office')), - 'email'=> array( - 'query_type' => 'default', - 'operator' => 'subquery', - 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', - 'db_field' => array( - 'id', - ), - 'vname' =>'LBL_ANY_EMAIL', - ), + 'email'=> array('query_type'=>'default','db_field'=>array('email1','email2')), 'website'=> array('query_type'=>'default'), 'ownership'=> array('query_type'=>'default'), 'employees'=> array('query_type'=>'default'), 'ticker_symbol'=> array('query_type'=>'default'), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/include/SugarObjects/templates/file/File.php b/include/SugarObjects/templates/file/File.php index decdc45a..72768775 100644 --- a/include/SugarObjects/templates/file/File.php +++ b/include/SugarObjects/templates/file/File.php @@ -36,73 +36,64 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -require_once('include/SugarObjects/templates/basic/Basic.php'); -require_once('include/upload_file.php'); -require_once('include/formbase.php'); - -class File extends Basic -{ - public $file_url; - public $file_url_noimage; - - function File(){ + require_once('include/SugarObjects/templates/basic/Basic.php'); + require_once('include/upload_file.php'); + require_once('include/formbase.php'); +class File extends Basic{ + function File(){ parent::Basic(); } - /** - * @see SugarBean::save() - */ - public function save($check_notify=false) - { - if (!empty($this->uploadfile)) { + //Must overwrite the save operation for uploaded file. + var $file_url; + var $file_url_noimage; + function save($check_notify=false){ + if (!empty($this->uploadfile)) $this->filename = $this->uploadfile; - } - return parent::save($check_notify); + } - /** - * @see SugarBean::fill_in_additional_detail_fields() - */ - public function fill_in_additional_detail_fields() - { + + + function fill_in_additional_detail_fields(){ + + global $theme; + global $current_language; + global $timedate; global $app_list_strings; + $this->uploadfile = $this->filename; + $mod_strings = return_module_language($current_language, $this->object_name); global $img_name; global $img_name_bare; - - $this->uploadfile = $this->filename; - - // Bug 41453 - Make sure we call the parent method as well - parent::fill_in_additional_detail_fields(); - if (!$this->file_ext) { $img_name = SugarThemeRegistry::current()->getImageURL(strtolower($this->file_ext)."_image_inline.gif"); $img_name_bare = strtolower($this->file_ext)."_image_inline"; } - //set default file name. if (!empty ($img_name) && file_exists($img_name)) { $img_name = $img_name_bare; - } - else { + } else { $img_name = "def_image_inline"; //todo change the default image. } - $this->file_url_noimage = basename(UploadFile::get_url($this->filename, $this->id)); - + $this->file_url_noimage = basename(UploadFile :: get_url($this->filename, $this->id)); if(!empty($this->status_id)) { $this->status = $app_list_strings['document_status_dom'][$this->status_id]; } + } - /** - * @see SugarBean::retrieve() - */ - public function retrieve($id = -1, $encode=true) - { + // need to override to have a name field created for this class + function retrieve($id = -1, $encode=true) { $ret_val = parent::retrieve($id, $encode); + $this->_create_proper_name_field(); + return $ret_val; + } + + function _create_proper_name_field() { + global $locale; $this->name = $this->document_name; - - return $ret_val; } } +?> diff --git a/include/SugarObjects/templates/file/language/en_us.lang.php b/include/SugarObjects/templates/file/language/en_us.lang.php index 0c6c2b09..713b4adc 100644 --- a/include/SugarObjects/templates/file/language/en_us.lang.php +++ b/include/SugarObjects/templates/file/language/en_us.lang.php @@ -53,7 +53,6 @@ $mod_strings = array ( 'LBL_DOCUMENT_ID' => 'Document ID', 'LBL_NAME' => 'Document Name', 'LBL_DESCRIPTION' => 'Description', - 'LBL_ASSIGNED_TO' => 'Assigned to:', 'LBL_CATEGORY' => 'Category', 'LBL_SUBCATEGORY' => 'Sub Category', 'LBL_STATUS' => 'Status', @@ -75,7 +74,6 @@ $mod_strings = array ( //document edit and detail view 'LBL_DOC_NAME' => 'Document Name:', 'LBL_FILENAME' => 'File Name:', - 'LBL_FILE_UPLOAD' => 'File:', 'LBL_DOC_VERSION' => 'Revision:', 'LBL_CATEGORY_VALUE' => 'Category:', 'LBL_SUBCATEGORY_VALUE'=> 'Sub Category:', @@ -120,4 +118,5 @@ $mod_strings = array ( ); -?> \ No newline at end of file +?> + diff --git a/include/SugarObjects/templates/file/metadata/SearchFields.php b/include/SugarObjects/templates/file/metadata/SearchFields.php index 8e9e0762..5390528c 100644 --- a/include/SugarObjects/templates/file/metadata/SearchFields.php +++ b/include/SugarObjects/templates/file/metadata/SearchFields.php @@ -42,9 +42,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Contributor(s): ______________________________________.. ********************************************************************************/ -$module_name = ''; -$_module_name = '<_module_name>'; -$searchFields[''] = + $searchFields[''] = array ( 'document_name' => array( 'query_type'=>'default'), 'category_id'=> array('query_type'=>'default', 'options' => 'document_category_dom', 'template_var' => 'CATEGORY_OPTIONS'), @@ -52,14 +50,7 @@ $searchFields[''] = 'active_date'=> array('query_type'=>'default'), 'exp_date'=> array('query_type'=>'default'), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support + ); ?> diff --git a/include/SugarObjects/templates/file/metadata/editviewdefs.php b/include/SugarObjects/templates/file/metadata/editviewdefs.php index 3f954f72..4440d1e3 100644 --- a/include/SugarObjects/templates/file/metadata/editviewdefs.php +++ b/include/SugarObjects/templates/file/metadata/editviewdefs.php @@ -67,10 +67,15 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); array ( 'document_name', - array( - 'name'=>'uploadfile', - 'displayParams' => array('onchangeSetFileNameTo' => 'document_name'), - ), + array('name'=>'uploadfile', + 'customCode' => '{if $fields.id.value!=""} + {assign var="type" value="hidden"} + {else} + {assign var="type" value="file"} + {/if} + {$fields.filename.value}', + 'displayParams'=>array('required'=>true), + ), ), diff --git a/include/SugarObjects/templates/file/metadata/quickcreatedefs.php b/include/SugarObjects/templates/file/metadata/quickcreatedefs.php index b1fab2df..520f5df8 100644 --- a/include/SugarObjects/templates/file/metadata/quickcreatedefs.php +++ b/include/SugarObjects/templates/file/metadata/quickcreatedefs.php @@ -81,14 +81,10 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ), ), - array ( - 'active_date', - ), - array ( 'category_id', 'subcategory_id', - ), + ), array ( array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)), diff --git a/include/SugarObjects/templates/file/vardefs.php b/include/SugarObjects/templates/file/vardefs.php index f10b1553..89d45807 100644 --- a/include/SugarObjects/templates/file/vardefs.php +++ b/include/SugarObjects/templates/file/vardefs.php @@ -52,8 +52,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'type' => 'name', 'dbType' => 'varchar', 'len' => '255', - 'required'=>true, - 'unified_search' => true, + 'required'=>true ), 'name'=> @@ -71,7 +70,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'required'=>true, 'importable' => 'required', 'len' => '255', - 'studio' => 'false', ), 'file_ext' => array ( @@ -92,7 +90,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'uploadfile' => array ( 'name'=>'uploadfile', - 'vname' => 'LBL_FILE_UPLOAD', + 'vname' => 'LBL_FILENAME', 'type' => 'file', 'source' => 'non-db', ), @@ -104,7 +102,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'type' => 'date', 'required'=>true, 'importable' => 'required', - 'display_default' => 'now', ), 'exp_date' => diff --git a/include/SugarObjects/templates/file/views/view.edit.php b/include/SugarObjects/templates/file/views/view.edit.php index 8adc22c3..cb44fa78 100644 --- a/include/SugarObjects/templates/file/views/view.edit.php +++ b/include/SugarObjects/templates/file/views/view.edit.php @@ -43,7 +43,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ require_once('include/MVC/View/views/view.edit.php'); - class ViewEdit extends ViewEdit{ + class View extends ViewEdit{ function ViewEdit(){ parent::ViewEdit(); } diff --git a/include/SugarObjects/templates/issue/language/application/en_us.lang.php b/include/SugarObjects/templates/issue/language/application/en_us.lang.php index 6d81638f..e27a3a83 100644 --- a/include/SugarObjects/templates/issue/language/application/en_us.lang.php +++ b/include/SugarObjects/templates/issue/language/application/en_us.lang.php @@ -1,4 +1,4 @@ - 'Invalid', ), ); -?> \ No newline at end of file +?> + diff --git a/include/SugarObjects/templates/issue/metadata/SearchFields.php b/include/SugarObjects/templates/issue/metadata/SearchFields.php index 4ecadddb..93498bb9 100644 --- a/include/SugarObjects/templates/issue/metadata/SearchFields.php +++ b/include/SugarObjects/templates/issue/metadata/SearchFields.php @@ -46,20 +46,5 @@ $searchFields[$module_name] = $_object_name. '_number'=> array('query_type'=>'default','operator'=>'in'), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - 'open_only' => array( - 'query_type'=>'default', - 'db_field'=>array('status'), - 'operator'=>'not in', - 'closed_values' => array('Closed', 'Rejected', 'Duplicate'), - 'type'=>'bool', - ), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/include/SugarObjects/templates/issue/metadata/detailviewdefs.php b/include/SugarObjects/templates/issue/metadata/detailviewdefs.php index 75ca0835..8561385b 100644 --- a/include/SugarObjects/templates/issue/metadata/detailviewdefs.php +++ b/include/SugarObjects/templates/issue/metadata/detailviewdefs.php @@ -37,7 +37,14 @@ $module_name = ''; $_object_name = '<_object_name>'; $viewdefs[$module_name]['DetailView'] = array( -'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',)), +'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', + array('customCode'=>''),)), 'maxColumns' => '2', 'widths' => array( array('label' => '10', 'field' => '30'), diff --git a/include/SugarObjects/templates/issue/metadata/searchdefs.php b/include/SugarObjects/templates/issue/metadata/searchdefs.php index fb92b38e..05d3f0c9 100644 --- a/include/SugarObjects/templates/issue/metadata/searchdefs.php +++ b/include/SugarObjects/templates/issue/metadata/searchdefs.php @@ -51,7 +51,6 @@ $_object_name = '<_object_name>'; 'basic_search' => array( 'name', array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), ), 'advanced_search' => array( $_object_name. '_number', diff --git a/include/SugarObjects/templates/person/language/en_us.lang.php b/include/SugarObjects/templates/person/language/en_us.lang.php index ee1df312..9792f472 100644 --- a/include/SugarObjects/templates/person/language/en_us.lang.php +++ b/include/SugarObjects/templates/person/language/en_us.lang.php @@ -56,7 +56,6 @@ $mod_strings = array( 'LBL_PRIMARY_ADDRESS_STATE'=>'Primary State', 'LBL_PRIMARY_ADDRESS_POSTALCODE'=>'Primary Postal Code', 'LBL_PRIMARY_ADDRESS_COUNTRY' => 'Primary Address Country:', -'LBL_ALT_ADDRESS'=>'Alternate Address', 'LBL_ALT_ADDRESS_STREET'=>'Alternate Address', 'LBL_ALT_ADDRESS_STREET_2' => 'Alternate Address Street 2:', 'LBL_ALT_ADDRESS_STREET_3' => 'Alternate Address Street 3:', diff --git a/include/SugarObjects/templates/person/metadata/SearchFields.php b/include/SugarObjects/templates/person/metadata/SearchFields.php index 7b8ed583..e9c05016 100644 --- a/include/SugarObjects/templates/person/metadata/SearchFields.php +++ b/include/SugarObjects/templates/person/metadata/SearchFields.php @@ -43,29 +43,11 @@ $searchFields[$module_name] = 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), 'do_not_call'=> array('query_type'=>'default', 'input_type' => 'checkbox', 'operator'=>'='), 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','assistant_phone')), - 'email'=> array( - 'query_type' => 'default', - 'operator' => 'subquery', - 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', - 'db_field' => array( - 'id', - ), - 'vname' =>'LBL_ANY_EMAIL', - ), 'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')), 'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')), 'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')), 'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')), 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), - - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/include/SugarObjects/templates/sale/metadata/SearchFields.php b/include/SugarObjects/templates/sale/metadata/SearchFields.php index df69591d..ed7724de 100644 --- a/include/SugarObjects/templates/sale/metadata/SearchFields.php +++ b/include/SugarObjects/templates/sale/metadata/SearchFields.php @@ -57,23 +57,5 @@ $searchFields[$module_name] = 'sales_stage'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'sales_stage_dom', 'template_var' => 'SALES_STAGE_OPTIONS', 'options_add_blank' => true), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - 'open_only' => array( - 'query_type'=>'default', - 'db_field'=>array('sales_stage'), - 'operator'=>'not in', - 'closed_values' => array('Closed Won', 'Closed Lost'), - 'type'=>'bool', - ), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/include/SugarObjects/templates/sale/metadata/detailviewdefs.php b/include/SugarObjects/templates/sale/metadata/detailviewdefs.php index e56b669e..100dfb61 100644 --- a/include/SugarObjects/templates/sale/metadata/detailviewdefs.php +++ b/include/SugarObjects/templates/sale/metadata/detailviewdefs.php @@ -46,7 +46,14 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $module_name = ''; $_object_name = '<_object_name>'; $viewdefs[$module_name]['DetailView'] = array( - 'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',)), + 'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', + array('customCode'=>''),)), 'maxColumns' => '2', 'widths' => array( array('label' => '10', 'field' => '30'), diff --git a/include/SugarObjects/templates/sale/metadata/searchdefs.php b/include/SugarObjects/templates/sale/metadata/searchdefs.php index 8c4843ad..104f2dd0 100644 --- a/include/SugarObjects/templates/sale/metadata/searchdefs.php +++ b/include/SugarObjects/templates/sale/metadata/searchdefs.php @@ -54,7 +54,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'basic_search' => array( 'name', array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), ), 'advanced_search' => array( 'name', diff --git a/include/SugarObjects/templates/sale/vardefs.php b/include/SugarObjects/templates/sale/vardefs.php index ef5e1a4b..9f1e0390 100644 --- a/include/SugarObjects/templates/sale/vardefs.php +++ b/include/SugarObjects/templates/sale/vardefs.php @@ -150,9 +150,8 @@ $vardefs = array( 'type' => 'date', 'audited'=>true, 'required' => true, - 'comment' => 'Expected or actual date the sale will close', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', + 'comment' => 'Expected or actual date the sale will close' + ), 'next_step' => array ( diff --git a/modules/Charts/DynamicAction.php b/include/SugarPDF.php similarity index 57% rename from modules/Charts/DynamicAction.php rename to include/SugarPDF.php index ab0064d2..4def89a2 100644 --- a/modules/Charts/DynamicAction.php +++ b/include/SugarPDF.php @@ -35,17 +35,56 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ +/********************************************************************************* + * Description: + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights + * Reserved. Contributor(s): ______________________________________.. + * *******************************************************************************/ -if(isset($_GET['DynamicAction']) && $_GET['DynamicAction'] == "saveImage") { - $cache = $GLOBALS['sugar_config']['cache_dir']."images/"; - +require_once("include/pdf/class.expdf.php"); +/** + * Subclass of EzPDF for SugarCRM + * contains SugarCRM-specific private methods for handling of data for PDF + * export + */ +class SugarPDF extends Cezpdf { - $filename = $_POST['filename']; - $image = str_replace(" ", "+", $_POST["imageStr"]); - $data = substr($image, strpos($image, ",")); - - file_put_contents($cache.$filename, base64_decode($data)); + /** + * sole constructor + * @param array vars Setup values for parent class, EzPDF + */ + function SugarPDF($vars) { + parent::Cezpdf($vars); + } + /** + * takes a $bean and processes all of its list variables for character set + * issues + * @param bean object The focus bean + * @return bean object The focus bean with processed strings + */ + function handleBeanStrings($bean) { + foreach($bean->field_defs as $k => $field) { + if($field['type'] == 'varchar' || $field['type'] == 'text' || $field['type'] == 'enum') { + $bean->$k = $this->handleCharset($bean->$k); + } + } + + return $bean; + } -} \ No newline at end of file + /** + * Translates text from UTF-8 (as of SugarCRM v4.5) into the selected + * default character set for a given instance, abrogated by user preference. + * @param string text The text to be handled + * @return string ret The translated string. + */ + function handleCharset($text) { + global $locale; + + $ret = $locale->translateCharset($text, 'UTF-8', $locale->getPrecedentPreference('default_export_charset')); + return $ret; + } +} +?> \ No newline at end of file diff --git a/include/SugarTabs/SugarTab.php b/include/SugarTabs/SugarTab.php new file mode 100644 index 00000000..2178a02c --- /dev/null +++ b/include/SugarTabs/SugarTab.php @@ -0,0 +1,101 @@ +type = $type; + + } + + function setup($mainTabs, $otherTabs=array(), $subTabs=array(), $selected_group='All'){ + // TODO - prefs here + //_pp($subTabs);_pp($otherTabs); + $max_subtabs = $GLOBALS['current_user']->getPreference('max_subtabs'); + if($max_subtabs <= 0) $max_subtabs = 12; + $max_tabs = $GLOBALS['current_user']->getPreference('max_tabs'); + if($max_tabs <= 0) $max_tabs = 12; + $GLOBALS['sugar_smarty']->assign('sugartabs', array_slice($mainTabs, 0, $max_tabs)); + $GLOBALS['sugar_smarty']->assign('subtabs', array_slice($subTabs, 0, $max_subtabs)); + $GLOBALS['sugar_smarty']->assign('moreMenu', array_slice($mainTabs, $max_tabs)); + $GLOBALS['sugar_smarty']->assign('moreSubMenuName', $selected_group); + $GLOBALS['sugar_smarty']->assign('moreSubMenu', array_slice($subTabs, $max_subtabs)); + $otherMoreTabs = array(); + if(!empty($otherTabs)) + { + foreach($otherTabs as $key => $ot) + { + $otherMoreTabs[$key] = array('key' => $key, + 'tabs' => array_slice($ot['tabs'], $max_subtabs)); + $otherTabs[$key]['tabs'] = array_slice($ot['tabs'], 0, $max_subtabs); + } + } + else + { + $otherMoreTabs[$selected_group] = array('key' => $selected_group, + 'tabs' => array_slice($subTabs, $max_subtabs)); + $otherTabs[$selected_group]['tabs'] = array_slice($subTabs, 0, $max_subtabs); + } + //_pp($otherMoreTabs); + $GLOBALS['sugar_smarty']->assign('othertabs', $otherTabs); + $GLOBALS['sugar_smarty']->assign('otherMoreSubMenu', $otherMoreTabs); + $GLOBALS['sugar_smarty']->assign('startSubPanel', $selected_group); + if(!empty($mainTabs)) + { + $mtak = array_keys($mainTabs); + $GLOBALS['sugar_smarty']->assign('moreTab', $mainTabs[$mtak[min(count($mtak)-1, $max_tabs-1)]]['label']); + } + } + + function fetch(){ + return $GLOBALS['sugar_smarty']->fetch('include/SugarTabs/tpls/' . $this->type . '.tpl'); + } + function display(){ + $GLOBALS['sugar_smarty']->display('include/SugarTabs/tpls/' . $this->type . '.tpl'); + } + + +} + + + +?> diff --git a/include/SugarTabs/tpls/singletabmenu.tpl b/include/SugarTabs/tpls/singletabmenu.tpl new file mode 100644 index 00000000..da581804 --- /dev/null +++ b/include/SugarTabs/tpls/singletabmenu.tpl @@ -0,0 +1,220 @@ +{* + +/********************************************************************************* + * SugarCRM is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + + + +*} + + + + + + + {if !empty($sugartabs)} + + {foreach from=$sugartabs item=tab} + + {/foreach} + + + + {/if} + + + +
    + + + + {capture assign="tabImage"}{$tab.type}Tab_left.gif{/capture} + + + + + + +
    {$tab.label}{$tab.label}{$tab.label}
    +
    + {if !empty($moreMenu)} + + {/if} +  
    + + + + {foreach from=$subtabs item=tab} + {if !empty($notFirst) && ($notFirst != 0) && ($notFirst != 1)} + + {else} + {assign var='notFirst' value='2'} + {/if} + + {/foreach} + {if !empty($otherMoreSubMenu[$moreSubMenuName].tabs)} + + {/if} + + + +
    | + {$tab.label} + |  >> 
    +
    + +{if !empty($moreMenu)} + +{/if} + +{foreach from=$otherMoreSubMenu item=group} +{if !empty($group.tabs)} + +{/if} +{/foreach} + + diff --git a/include/SugarTheme/SugarTheme.php b/include/SugarTheme/SugarTheme.php index c68421c8..d8c0aa44 100644 --- a/include/SugarTheme/SugarTheme.php +++ b/include/SugarTheme/SugarTheme.php @@ -69,19 +69,6 @@ class SugarTheme */ protected $description; - /** - * Defines which parent files to not include - * - * @var string - */ - protected $ignoreParentFiles = array(); - - /** - * Defines which parent files to not include - * - * @var string - */ - protected $directionality = 'ltr'; /** * Theme directory name * @@ -283,8 +270,17 @@ class SugarTheme } } if ( !inDeveloperMode() ) { - if ( sugar_is_file($GLOBALS['sugar_config']['cache_dir'].$this->getFilePath().'/pathCache.php') ) { - $caches = unserialize(sugar_file_get_contents($GLOBALS['sugar_config']['cache_dir'].$this->getFilePath().'/pathCache.php')); + // load stored theme cache from sugar cache if it's there + if ( $GLOBALS['external_cache_enabled'] + && $GLOBALS['external_cache_type'] != 'base-in-memory' ) { + $this->_jsCache = sugar_cache_retrieve('theme_'.$this->dirName.'_jsCache'); + $this->_cssCache = sugar_cache_retrieve('theme_'.$this->dirName.'_cssCache'); + $this->_imageCache = sugar_cache_retrieve('theme_'.$this->dirName.'_imageCache'); + $this->_templateCache = sugar_cache_retrieve('theme_'.$this->dirName.'_templateCache'); + } + // otherwise, see if we serialized them to a file + elseif ( sugar_is_file($GLOBALS['sugar_config']['cache_dir'].$this->getFilePath().'/pathCache.php') ) { + $caches = unserialize(file_get_contents($GLOBALS['sugar_config']['cache_dir'].$this->getFilePath().'/pathCache.php')); if ( isset($caches['jsCache']) ) $this->_jsCache = $caches['jsCache']; if ( isset($caches['cssCache']) ) @@ -313,14 +309,39 @@ class SugarTheme set_include_path(realpath(dirname(__FILE__) . '/../..') . PATH_SEPARATOR . get_include_path()); chdir(realpath(dirname(__FILE__) . '/../..')); + // Bug 30807/30808 - Re-setup the external cache since the object isn't there when calling this method. + $GLOBALS['external_cache_checked'] = false; + check_cache(); + // clear out the cache on destroy if we are asked to if ( $this->_clearCacheOnDestroy ) { if (is_file($GLOBALS['sugar_config']['cache_dir'].$this->getFilePath().'/pathCache.php')) unlink($GLOBALS['sugar_config']['cache_dir'].$this->getFilePath().'/pathCache.php'); + if ( $GLOBALS['external_cache_enabled'] + && $GLOBALS['external_cache_type'] != 'base-in-memory' ) { + sugar_cache_clear('theme_'.$this->dirName.'_jsCache'); + sugar_cache_clear('theme_'.$this->dirName.'_cssCache'); + sugar_cache_clear('theme_'.$this->dirName.'_imageCache'); + sugar_cache_clear('theme_'.$this->dirName.'_templateCache'); + } } elseif ( !inDeveloperMode() ) { + // push our cache into the sugar cache + if ( $GLOBALS['external_cache_enabled'] + && $GLOBALS['external_cache_type'] != 'base-in-memory' ) { + // only update the caches if they have been changed in this request + if ( count($this->_jsCache) != $this->_initialCacheSize['jsCache'] ) + sugar_cache_put('theme_'.$this->dirName.'_jsCache',$this->_jsCache); + if ( count($this->_cssCache) != $this->_initialCacheSize['cssCache'] ) + sugar_cache_put('theme_'.$this->dirName.'_cssCache',$this->_cssCache); + if ( count($this->_imageCache) != $this->_initialCacheSize['imageCache'] ) + sugar_cache_put('theme_'.$this->dirName.'_imageCache',$this->_imageCache); + if ( count($this->_templateCache) != $this->_initialCacheSize['templateCache'] ) + sugar_cache_put('theme_'.$this->dirName.'_templateCache',$this->_templateCache); + } + // fallback in case there is no useful external caching available // only update the caches if they have been changed in this request - if ( count($this->_jsCache) != $this->_initialCacheSize['jsCache'] + elseif ( count($this->_jsCache) != $this->_initialCacheSize['jsCache'] || count($this->_cssCache) != $this->_initialCacheSize['cssCache'] || count($this->_imageCache) != $this->_initialCacheSize['imageCache'] || count($this->_templateCache) != $this->_initialCacheSize['templateCache'] @@ -339,6 +360,14 @@ class SugarTheme } } + // clear out the cache if we are in developerMode + // ( so it will be freshly rebuilt for the next load ) + elseif ( $GLOBALS['external_cache_enabled'] ) { + sugar_cache_clear('theme_'.$this->dirName.'_jsCache'); + sugar_cache_clear('theme_'.$this->dirName.'_cssCache'); + sugar_cache_clear('theme_'.$this->dirName.'_imageCache'); + sugar_cache_clear('theme_'.$this->dirName.'_templateCache'); + } } /** @@ -388,7 +417,6 @@ class SugarTheme return array( 'name', 'description', - 'directionality', 'dirName', 'parentTheme', 'version', @@ -397,7 +425,6 @@ class SugarTheme 'barChartColors', 'pieChartColors', 'group_tabs', - 'ignoreParentFiles', ); } @@ -534,7 +561,7 @@ class SugarTheme $font = $this->fonts[0]; $html .= ''; } - + return $html; } @@ -709,7 +736,7 @@ EOHTML; $addJSPath = true ) { - if ( isset($this->_cssCache[$cssFileName])) { + if ( isset($this->_cssCache[$cssFileName]) ) { if ( $addJSPath ) return getJSPath($this->_cssCache[$cssFileName]); else @@ -747,6 +774,7 @@ EOHTML; // if this is the style.css file, prepend the base.css and calendar-win2k-cold-1.css // files before the theme styles if ( $cssFileName == 'style.css' && !isset($this->parentTheme) ) { + $cssFileContents = file_get_contents('jscalendar/calendar-win2k-cold-1.css') . $cssFileContents; if ( inDeveloperMode() ) $cssFileContents = file_get_contents('include/javascript/yui/build/base/base.css') . $cssFileContents; else @@ -782,7 +810,7 @@ EOHTML; $addJSPath = true ) { - if ( isset($this->_jsCache[$jsFileName])) { + if ( isset($this->_jsCache[$jsFileName]) ) { if ( $addJSPath ) return getJSPath($this->_jsCache[$jsFileName]); else @@ -793,7 +821,7 @@ EOHTML; if (isset($this->parentTheme) && SugarThemeRegistry::get($this->parentTheme) instanceOf SugarTheme - && ($filename = SugarThemeRegistry::get($this->parentTheme)->getJSURL($jsFileName,false)) != '' && !in_array($jsFileName,$this->ignoreParentFiles)) + && ($filename = SugarThemeRegistry::get($this->parentTheme)->getJSURL($jsFileName,false)) != '') $jsFileContents .= file_get_contents($filename); else { if (sugar_is_file($this->getDefaultJSPath().'/'.$jsFileName)) @@ -814,7 +842,7 @@ EOHTML; $jsFilePath = create_cache_directory($this->getJSPath()."/$jsFileName"); // minify the js - if ( !inDeveloperMode()&& !sugar_is_file(str_replace('.js','-min.js',$jsFilePath)) ) { + if ( !inDeveloperMode() && !sugar_is_file(str_replace('.js','-min.js',$jsFilePath)) ) { $jsFileContents = JSMin::minify($jsFileContents); $jsFilePath = str_replace('.js','-min.js',$jsFilePath); } @@ -851,7 +879,7 @@ EOHTML; foreach ( $pathsToSearch as $path ) { if (!sugar_is_dir($path)) $path = "custom/$path"; - if (sugar_is_dir($path) && is_readable($path) && $dir = opendir($path)) { + if (sugar_is_dir($path) && $dir = opendir($path)) { while (($file = readdir($dir)) !== false) { if ($file == ".." || $file == "." @@ -971,7 +999,6 @@ class SugarThemeRegistry /** * Returns the current theme object * - * @return SugarTheme object */ public static function current() { @@ -981,23 +1008,6 @@ class SugarThemeRegistry return self::$_themes[self::$_currentTheme]; } - /** - * Returns the default theme object - * - * @return SugarTheme object - */ - public static function getDefault() - { - if ( !isset(self::$_currentTheme) ) - self::buildRegistry(); - - if ( isset($GLOBALS['sugar_config']['default_theme']) && self::exists($GLOBALS['sugar_config']['default_theme']) ) { - return self::get($GLOBALS['sugar_config']['default_theme']); - } - - return self::get(array_pop(array_keys(self::availableThemes()))); - } - /** * Returns true if a theme object specified by the given $themeName exists in the registry * @@ -1047,7 +1057,7 @@ class SugarThemeRegistry } foreach ($dirs as $dirPath ) { - if (sugar_is_dir('./'.$dirPath) && is_readable('./'.$dirPath) && $dir = opendir('./'.$dirPath)) { + if (sugar_is_dir('./'.$dirPath) && $dir = opendir('./'.$dirPath)) { while (($file = readdir($dir)) !== false) { if ($file == ".." || $file == "." @@ -1081,7 +1091,7 @@ class SugarThemeRegistry } // default to setting the default theme as the current theme - if ( !isset($GLOBALS['sugar_config']['default_theme']) || !self::set($GLOBALS['sugar_config']['default_theme']) ) { + if ( !self::set($GLOBALS['sugar_config']['default_theme']) ) { if ( count(self::availableThemes()) == 0 ) sugar_die('No valid themes are found on this instance'); else diff --git a/include/SugarTheme/getImage.php b/include/SugarTheme/getImage.php index 7e628a03..91bcbbda 100644 --- a/include/SugarTheme/getImage.php +++ b/include/SugarTheme/getImage.php @@ -35,6 +35,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ + // try to use the user's theme if we can figure it out if ( isset($_REQUEST['themeName']) ) SugarThemeRegistry::set($_REQUEST['themeName']); @@ -45,7 +46,7 @@ while(substr_count($_REQUEST['imageName'], '..') > 0){ $_REQUEST['imageName'] = str_replace('..', '.', $_REQUEST['imageName']); } $filename = SugarThemeRegistry::current()->getImageURL($_REQUEST['imageName']); -if ( empty($filename) ) { +if ( empty($filename) ) { header($_SERVER["SERVER_PROTOCOL"].' 404 Not Found'); die; } @@ -56,7 +57,7 @@ $file_ext = substr($filename,-3); $extensions = SugarThemeRegistry::current()->imageExtensions; if(!in_array($file_ext, $extensions)){ header($_SERVER["SERVER_PROTOCOL"].' 404 Not Found'); - die; + die; } @@ -72,17 +73,16 @@ header("Cache-Control: private"); header("Pragma: dummy=bogus"); header("Etag: $etag"); -$ifmod = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) - ? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $last_modified_time : null; -$iftag = isset($_SERVER['HTTP_IF_NONE_MATCH']) - ? $_SERVER['HTTP_IF_NONE_MATCH'] == $etag : null; -if (($ifmod || $iftag) && ($ifmod !== false && $iftag !== false)) { - header($_SERVER["SERVER_PROTOCOL"].' 304 Not Modified'); - die; +$ifmod = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) + ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $last_modified_time : null; +$iftag = isset($_SERVER['HTTP_IF_NONE_MATCH']) + ? $_SERVER['HTTP_IF_NONE_MATCH'] == $etag : null; +if (($ifmod || $iftag) && ($ifmod !== false && $iftag !== false)) { + header($_SERVER["SERVER_PROTOCOL"].' 304 Not Modified'); + die; } - -header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 86400)); -header("Last-Modified: ".gmdate('D, d M Y H:i:s \G\M\T', $last_modified_time)); +header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . 'GMT'); +header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT"); // now send the content if ( substr($filename,-3) == 'gif' ) diff --git a/include/SugarTinyMCE.php b/include/SugarTinyMCE.php index 91ace6e6..05a0aef3 100644 --- a/include/SugarTinyMCE.php +++ b/include/SugarTinyMCE.php @@ -115,7 +115,6 @@ class SugarTinyMCE { } $config = $this->defaultConfig; - $config['directionality'] = SugarThemeRegistry::current()->directionality; $config['elements'] = $targets; $config['theme_advanced_buttons1'] = $this->buttonConfigs['default']['buttonConfig']; $config['theme_advanced_buttons2'] = $this->buttonConfigs['default']['buttonConfig2']; diff --git a/include/TemplateHandler/TemplateHandler.php b/include/TemplateHandler/TemplateHandler.php index 97d7c062..f388a23b 100644 --- a/include/TemplateHandler/TemplateHandler.php +++ b/include/TemplateHandler/TemplateHandler.php @@ -391,17 +391,14 @@ class TemplateHandler { if($matches[0] == 'Campaigns') { $sqs_objects[$name] = $qsd->getQSCampaigns(); } else if($matches[0] == 'Users'){ - if($field['name'] == 'reports_to_name') { + if($field['name'] == 'reports_to_name') $sqs_objects[$name] = $qsd->getQSUser('reports_to_name','reports_to_id'); - } - // Bug 34643 - Default what the options should be for the assigned_user_name field - // and then pass thru the fields to be used in the fielddefs. - elseif($field['name'] == 'assigned_user_name') { - $sqs_objects[$name] = $qsd->getQSUser('assigned_user_name','assigned_user_id'); - } else { - $sqs_objects[$name] = $qsd->getQSUser($field['name'], $field['id_name']); - } + if ($view == "ConvertLead") + $sqs_objects[$name] = $qsd->getQSUser($field['name'], $field['id_name']); + else + $sqs_objects[$name] = $qsd->getQSUser(); + } } else if($matches[0] == 'Campaigns') { $sqs_objects[$name] = $qsd->getQSCampaigns(); } else if($matches[0] == 'Accounts') { diff --git a/include/TimeDate.php b/include/TimeDate.php index 2f4f75f9..b842d78a 100644 --- a/include/TimeDate.php +++ b/include/TimeDate.php @@ -35,1775 +35,1245 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -require_once 'include/SugarDateTime.php'; +require_once('include/timezone/timezones.php'); /** - * - * New Time & Date handling class - * Migration notes: - * - to_db_time() requires either full datetime or time, won't work with just date - * The reason is that it's not possible to know if short string has only date or only time, - * and it makes more sense to assume time for the time conversion function. - */ -class TimeDate -{ - const DB_DATE_FORMAT = 'Y-m-d'; - const DB_TIME_FORMAT = 'H:i:s'; - // little optimization - const DB_DATETIME_FORMAT = 'Y-m-d H:i:s'; - const RFC2616_FORMAT = 'D, d M Y H:i:s \G\M\T'; - - // Standard DB date/time formats - // they are constant, vars are for compatibility - public $dbDayFormat = self::DB_DATE_FORMAT; - public $dbTimeFormat = self::DB_TIME_FORMAT; - - /** - * Regexp for matching format elements - * @var array - */ - protected static $format_to_regexp = array( - 'a' => '[ap]m', - 'A' => '[AP]M', - 'd' => '[0-9]{1,2}', - 'j' => '[0-9]{1,2}', - 'h' => '[0-9]{1,2}', - 'H' => '[0-9]{1,2}', - 'g' => '[0-9]{1,2}', - 'G' => '[0-9]{1,2}', - 'i' => '[0-9]{1,2}', - 'm' => '[0-9]{1,2}', - 'n' => '[0-9]{1,2}', - 'Y' => '[0-9]{4}', - 's' => '[0-9]{1,2}', - 'F' => '\w+', - "M" => '[\w]{1,3}', - ); + * Date/time conversion class + * + * DB format - Y-m-d H:i:s (2009-12-31 23:46:12), in GMT + * Display format - user-defined, in user-supplied timezone + * + */ +class TimeDate { + /** + * DB date format + * @var string + */ + var $dbDayFormat = 'Y-m-d'; + /** + * DB time format + * @var string + */ + var $dbTimeFormat = 'H:i:s'; + /** + * DB date & time formats + * For convenience + * @var string + */ + var $dbDateTimeFormat = 'Y-m-d H:i:s'; + + protected $supported_strings = array( + 'a' => '[ap]m', + 'A' => '[AP]M', + 'd' => '[0-9]{1,2}', + 'h' => '[0-9]{1,2}', + 'H' => '[0-9]{1,2}', + 'i' => '[0-9]{1,2}', + 'm' => '[0-9]{1,2}', + 'Y' => '[0-9]{4}', + 's' => '[0-9]{1,2}' + ); - /** - * Relation between date() and strftime() formats + /** + * Map the tokens passed into this as a "format" string to + * PHP's internal date() format string values. + * + * @var array + * @access private + * @see build_format() + */ + private $time_token_map = array( + 'a' => 'a', // meridiem: am or pm + 'A' => 'A', // meridiem: AM or PM + 'd' => 'd', // days: 1 through 31 + 'h' => 'h', // hours: 01 through 12 + 'H' => 'H', // hours: 00 through 23 + 'i' => 'i', // minutes: 00 through 59 + 'm' => 'm', // month: 1 - 12 + 'Y' => 'Y', // year: four digits + 's' => 's', // seconds + ); + + /** + * The current timezone information for the current user * @var array */ - public static $format_to_str = array( - // date - 'Y' => '%Y', - - 'm' => '%m', - 'M' => '%b', - 'F' => '%B', - 'n' => '%m', - - 'd' => '%d', - //'j' => '%e', - // time - 'a' => '%P', - 'A' => '%p', - - 'h' => '%I', - 'H' => '%H', - //'g' => '%l', - //'G' => '%H', - - 'i' => '%M', - 's' => '%S', - ); - - /** - * GMT timezone object - * - * @var DateTimeZone - */ - protected static $gmtTimezone; - - /** - * Current time - * @var SugarDateTime - */ - protected $now; - - /** - * The current user - * - * @var User - */ - protected $user; + private $current_user_timezone = null; /** - * Current user's ID - * - * @var string + * The current user timezone adjustment + * @var int */ - protected $current_user_id; + private $current_user_adjustment = null; /** - * Current user's TZ - * @var DateTimeZone + * The target TZ for current user timezone adjustment + * @var array */ - protected $current_user_tz; + private $current_user_adjustment_tz = null; /** - * Separator for current user time format - * + * Default midnight string in user format * @var string */ - protected $time_separator; + private $default_midnight = null; /** - * Always consider user TZ to be GMT and date format DB format - for SOAP etc. - * + * For testability - disallow using cache * @var bool */ - protected $always_db = false; - - /** - * Global instance of TimeDate - * @var TimeDate - */ - protected static $timedate; - public $allow_cache = true; - public function __construct(User $user = null) - { - if (self::$gmtTimezone == null) { - self::$gmtTimezone = new DateTimeZone("UTC"); - } - $this->now = new SugarDateTime(); - $this->tzGMT($this->now); - $this->user = $user; - } - - /** - * Set flag specifying we should always use DB format - * @param bool $flag - * @return TimeDate - */ - public function setAlwaysDb($flag = true) - { - $this->always_db = $flag; - $this->clearCache(); - return $this; - } - /** - * Get "always use DB format" flag - * @return bool + * Constructor */ - public function isAlwaysDb() + public function __construct() { - return !empty($GLOBALS['disable_date_format']) || $this->always_db; + // avoids a potential E_STRICT warning when using any date function + if ( function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) + date_default_timezone_set(@date_default_timezone_get()); } - /** - * Get TimeDate instance - * @return TimeDate - */ - public static function getInstance() - { - if(empty(self::$timedate)) { - if(ini_get('date.timezone') == '') { - // Remove warning about default timezone - date_default_timezone_set(@date('e')); - try { - $tz = self::guessTimezone(); - } catch(Exception $e) { - $tz = "UTC"; // guess failed, switch to UTC - } - if(isset($GLOBALS['log'])) { - $GLOBALS['log']->fatal("Configuration variable date.timezone is not set, guessed timezone $tz. Please set date.timezone=\"$tz\" in php.ini!"); - } - date_default_timezone_set($tz); - } - self::$timedate = new self; - } - return self::$timedate; - } + /** + * Returns the current users timezone info or another user; + * + * @param User $user user object for which you want to display, null for current user + * @return Array of timezone info + */ + public function getUserTimeZone($user = null){ + global $timezones, $current_user; + $usertimezone = array(); + if(empty($user) || (!empty($user->id) && $user->id == $current_user->id)) { + if(isset($this->current_user_timezone)) return $this->current_user_timezone; // current user, return saved timezone info + $user = $current_user; + } - /** - * Set current user for this object - * - * @param $user - * @return TimeDate - */ - public function setUser(User $user = null) - { - $this->user = $user; - $this->clearCache(); - return $this; - } + if(isset($user)) + { + if($usertimezone = $user->getPreference('timezone')) { + if(empty($timezones[$usertimezone])) { + $GLOBALS['log']->fatal('TIMEZONE:NOT DEFINED-'. $usertimezone); + $usertimezone = array(); + } else { + $usertimezone = $timezones[$usertimezone]; + } + } + } - /** - * Figure out what the required user is - * - * The order is: supplied parameter, TimeDate's user, global current user - * - * @param User $user - * @return User - */ - protected function _getUser(User $user = null) - { - if (empty($user)) { - $user = $this->user; - } - if (empty($user)) { - $user = $GLOBALS['current_user']; - } - return $user; - } + if(!empty($user->id) && $user->id == $current_user->id) $this->current_user_timezone = $usertimezone; // save current_user + return $usertimezone; + } - /** - * Get timezone for the specified user - * - * @param User $user - * @return DateTimeZone - */ - protected function _getUserTZ(User $user = null) - { - $user = $this->_getUser($user); + /** + * @deprecated for public use + * function adjustmentForUserTimeZone() + * this returns the adjustment for a user against the server time + * + * @param array $timezone_to_adjust pass in a timezone to adjust for + * @return integer number of minutes to adjust a time by to get the appropriate time for the user + */ + public function adjustmentForUserTimeZone($timezone_to_adjust = null){ + if(isset($this->current_user_adjustment) && $this->current_user_adjustment_tz == $timezone_to_adjust){ + return $this->current_user_adjustment; + } - if (empty($user) || $this->isAlwaysDb()) { - return self::$gmtTimezone; - } + $adjustment = 0; + $this->current_user_adjustment_tz = $timezone_to_adjust; - if ($this->allow_cache && $user->id == $this->current_user_id && ! empty($this->current_user_tz)) { - // current user is cached - return $this->current_user_tz; - } + if(empty($timezone_to_adjust)) { + $timezone = $this->getUserTimeZone(); + } else { + $timezone = $timezone_to_adjust; + } + if(empty($timezone)) { + return $adjustment; + } - try { - $usertimezone = $user->getPreference('timezone'); - if(empty($usertimezone)) { - return self::$gmtTimezone; - } - $tz = new DateTimeZone($usertimezone); - } catch (Exception $e) { - $GLOBALS['log']->fatal('Unknown timezone: ' . $usertimezone); - return self::$gmtTimezone; - } + $server_offset = date('Z')/60; + $server_in_ds = date('I'); + $user_in_ds = $this->inDST(date('Y-m-d H:i:s'), $timezone); + $user_offset = $timezone['gmtOffset'] ; - if (empty($this->current_user_id)) { - $this->current_user_id = $user->id; - $this->current_user_tz = $tz; - } + //compensate for ds for user + if($user_in_ds) { + $user_offset += 60; + } - return $tz; - } + //either both + or - + $adjustment += $server_offset - $user_offset; + if(empty($timezone_to_adjust)) $this->current_user_adjustment = $adjustment; // save current_user adj - /** - * Clears all cached data regarding current user - */ - public function clearCache() - { - $this->current_user_id = null; - $this->current_user_tz = null; - $this->time_separator = null; - $this->now = new SugarDateTime(); - } + return $adjustment; + } - /** - * Get user date format. - * @todo add caching - * - * @param [User] $user user object, current user if not specified - * @return string - */ - public function get_date_format(User $user = null) - { - $user = $this->_getUser($user); + /** + * @deprecated for public use + * function getWeekDayName($indexOfDay) + * Returns a days name + * + * @param INT(WEEKDAY INDEX) $indexOfDay + * @return STRING representing the given weekday + */ + function getWeekDayName($indexOfDay){ + static $dow = array ( 'sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday' ); + return $dow[$indexOfDay]; + } + /** + * @deprecated for public use + * function getMonthName($indexMonth) + * Returns a Months Name + * + * @param INT(MONTH INDEX) $indexMonth + * @return STRING representation of the month + */ + function getMonthName($indexMonth){ + static $months = array ( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ); + return $months[$indexMonth]; + } - if (empty($user) || $this->isAlwaysDb()) { - return self::DB_DATE_FORMAT; - } + /** + * @deprecated for public use + * function getDateFromRules($year, $startMonth, $startDate, $weekday, $startTime ) + * Converts the rules for a timezones dst into a string representation of a date for the given year + * + * @param STRING(YEAR) $year + * @param INT(MONTH INDEX) $startMonth + * @param INT(DATE INDEX) $startDate + * @param INT(WEEKDAY INDEX) $weekday + * @param INT(START TIME IN SECONDS) $startTime + * @return unknown + */ + function getDateFromRules($year, $startMonth, $startDate, $weekday, $startTime ){ + if($weekday < 0)return date( 'Y-m-d H:i:s', strtotime("$year-$startMonth-$startDate") + $startTime); + $dayname = self::getWeekDayName($weekday); + if($startDate > 0)$startMonth--; + $month = self::getMonthName($startMonth); + $startWeek = floor($startDate/7); + //echo "$startWeek week $dayname - $month 1, $year
    "; + return date( 'Y-m-d H:i:s', strtotime( "$startWeek week $dayname", strtotime( "$month 1, $year" ) ) + $startTime ); - $datef = $user->getPreference('datef'); - if(empty($datef) && isset($GLOBALS['current_user']) && $GLOBALS['current_user'] !== $user) { - // if we got another user and it has no date format, try current user - $datef = $GLOBALS['current_user']->getPreference('datef'); - } - if (empty($datef)) { - $datef = $GLOBALS['sugar_config']['default_date_format']; - } - if (empty($datef)) { - $datef = ''; - } + } - return $datef; - } + /** + * @deprecated for public use + * function getDSTRange($year, $zone) + * + * returns the start and end date for dst for a given timezone and year or false if that zone doesn't support dst + * + * @param STRING(Year e.g. 2005) $year + * @param ARRAY (TIME ZONE INFO) $zone + * @return ARRAY OF DATE REPRESENTING THE START AND END OF DST or FALSE if the zone doesn't support dst + */ + function getDSTRange($year, $zone){ + $range = array(); + if(empty($zone['dstOffset'])){ + return false; + } - /** - * Get user time format. - * @todo add caching - * - * @param User $user user object, current user if not specified - * @return string - */ - public function get_time_format(/*User*/ $user = null) - { - if(is_bool($user) || func_num_args() > 1) { - // BC dance - old signature was boolean, User - $GLOBALS['log']->fatal('TimeDate::get_time_format(): Deprecated API used, please update you code - get_time_format() now has one argument of type User'); - if(func_num_args() > 1) { - $user = func_get_arg(1); - } else { - $user = null; - } - } - $user = $this->_getUser($user); + $range['start'] = $this->getDateFromRules($year, $zone['dstMonth'], $zone['dstStartday'], $zone['dstWeekday'], $zone['dstStartTimeSec']); + $range['end'] = $this->getDateFromRules($year, $zone['stdMonth'], $zone['stdStartday'], $zone['stdWeekday'], $zone['stdStartTimeSec']); + return $range; + } - if (empty($user) || $this->isAlwaysDb()) { - return self::DB_TIME_FORMAT; - } + /** + * @deprecated for public use + * + * Is the date in DST or not + * @param $date + * @param $zone + */ + function inDST($date, $zone){ + $datetime = explode(' ', $date); + $dateSplit = explode('-', $datetime[0]); + if(empty($dateSplit[2]))return false; + $dstRange = $this->getDSTRange($dateSplit[0], $zone); + if(!$dstRange){ + return false; + } + $datestamp = strtotime($date); + $startstamp = strtotime($dstRange['start']); + $endstamp = strtotime($dstRange['end']); + if((($datestamp >= $startstamp || $datestamp < $endstamp) && $startstamp > $endstamp) + || ($datestamp >= $startstamp && $datestamp < $endstamp) + ){ + return true; + } + return false; + } - $timef = $user->getPreference('timef'); - if(empty($timef) && isset($GLOBALS['current_user']) && $GLOBALS['current_user'] !== $user) { - // if we got another user and it has no time format, try current user - $timef = $GLOBALS['current_user']->getPreference('$timef'); - } - if (empty($timef)) { - $timef = $GLOBALS['sugar_config']['default_time_format']; - } - if (empty($timef)) { - $timef = ''; - } - return $timef; - } + /** + * Create regexp from datetime format + * @param string $format + * @return string Regular expression string + */ + function get_regular_expression($format) { + $newFormat = ''; + $regPositions = array(); + $ignoreNextChar = false; + $count = 1; + $format_characters = str_split($format, 1); + foreach ($format_characters as $char) { + if (!$ignoreNextChar && isset($this->supported_strings[$char])) { + $newFormat.= '('.$this->supported_strings[$char].')'; + $regPositions[$char] = $count; + $count++; + } else { + $ignoreNextChar = false; + + $newFormat.= $char; - /** - * Get user datetime format. - * @todo add caching - * - * @param [User] $user user object, current user if not specified - * @return string - */ - public function get_date_time_format(User $user = null) - { - return $this->merge_date_time($this->get_date_format($user), $this->get_time_format($user)); - } + } + if ($char == "\\") { + $ignoreNextChar = true; + } + } - /** - * Make one datetime string from date string and time string - * - * @param string $date - * @param string $time - * @return string New datetime string - */ - function merge_date_time($date, $time) - { - return $date . ' ' . $time; - } + return array('format'=>$newFormat, 'positions'=>$regPositions); - /** - * Split datetime string into date & time - * - * @param string $datetime - * @return array - */ - function split_date_time($datetime) - { - return explode(' ', $datetime); - } + } - function get_cal_date_format() - { - return str_replace(array_keys(self::$format_to_str), array_values(self::$format_to_str), $this->get_date_format()); - } + /** + * Verify if the date string conforms to a format + * + * @param string $date + * @param string $format Format to check + * @param string $toformat + * @return bool Is the date ok? + */ + public function check_matching_format($date, $format, $toformat = '') { + $regs = array(); + $startreg = $this->get_regular_expression($format); + if (!empty($toformat)) { + $otherreg = $this->get_regular_expression($toformat); + //if the other format has the same regular expression then maybe it is shifting month and day position or something similar let it go for formating + if ($startreg['format'] == $otherreg['format']) { + return false; + } + } - function get_cal_time_format() - { - return str_replace(array_keys(self::$format_to_str), array_values(self::$format_to_str), $this->get_time_format()); - } + preg_match('@'.$startreg['format'].'@', $date, $regs); + if (empty($regs)) { + return false; + } + return true; + } - function get_cal_date_time_format() - { - return str_replace(array_keys(self::$format_to_str), array_values(self::$format_to_str), $this->get_date_time_format()); - } + /** + * @deprecated for public use + * Build a true PHP format string from a user supplied format string + * + * @param string $format + * @return string + * @access private + * @see $time_token_map + */ + function build_format($format) + { + $format = str_split($format, 1); + $return = ''; + foreach ($format as $char) { + $return .= (isset($this->time_token_map[$char])) ? + $this->time_token_map[$char] : + $char; + } + return $return; + } /** - * Verify if the date string conforms to a format + * Convert date from one format to another * * @param string $date - * @param string $format Format to check - * @param string $toformat - * @return bool Is the date ok? - */ - public function check_matching_format($date, $format) - { - try { - $dt = SugarDateTime::createFromFormat($format, $date); - if (!is_object($dt)) { - return false; - } - } catch (Exception $e) { - return false; - } - return true; - } - - /** - * Format DateTime object as DB datetime - * - * @param DateTime $date + * @param string $from + * @param string $to * @return string */ - public function asDb(DateTime $date) - { - $date->setTimezone(self::$gmtTimezone); - return $date->format($this->get_db_date_time_format()); - } + function swap_formats($date, $startFormat, $endFormat) { + $startreg = $this->get_regular_expression($startFormat); + preg_match('@'.$startreg['format'].'@', $date, $regs); + $newDate = $endFormat; + //handle 12 to 24 hour conversion + if (isset($startreg['positions']['h']) && !isset($startreg['positions']['H']) && !empty($regs[$startreg['positions']['h']]) && $regs[$startreg['positions']['h']] !== '' && strpos($endFormat, 'H') > -1) { + $startreg['positions']['H'] = sizeof($startreg['positions']) + 1; + $regs[$startreg['positions']['H']] = $regs[$startreg['positions']['h']]; + if ((isset($startreg['positions']['A']) && isset($regs[$startreg['positions']['A']]) && $regs[$startreg['positions']['A']] == 'PM') || (isset($startreg['positions']['a']) && isset($regs[$startreg['positions']['a']]) && $regs[$startreg['positions']['a']] == 'pm')) { + if ($regs[$startreg['positions']['h']] != 12) { + $regs[$startreg['positions']['H']] = $regs[$startreg['positions']['h']] + 12; + } + } + if ((isset($startreg['positions']['A']) && isset($regs[$startreg['positions']['A']])&& $regs[$startreg['positions']['A']] == 'AM') || (isset($startreg['positions']['a']) && isset($regs[$startreg['positions']['a']]) && $regs[$startreg['positions']['a']] == 'am')) { + if ($regs[$startreg['positions']['h']] == 12) { + $regs[$startreg['positions']['H']] = 0; + } + } + } + if (!empty($startreg['positions']['H']) && !empty($regs[$startreg['positions']['H']]) && !isset($startreg['positions']['h']) && strpos($endFormat, 'h') > -1) { + $startreg['positions']['h'] = sizeof($startreg['positions']) + 1; + $regs[$startreg['positions']['h']] = $regs[$startreg['positions']['H']]; + if (!isset($startreg['positions']['A'])) { + $startreg['positions']['A'] = sizeof($startreg['positions']) + 1; + $regs[$startreg['positions']['A']] = 'AM'; + } + if (!isset($startreg['positions']['a'])) { + $startreg['positions']['a'] = sizeof($startreg['positions']) + 1; + $regs[$startreg['positions']['a']] = 'am'; + } + if ($regs[$startreg['positions']['H']] > 11) { + $regs[$startreg['positions']['h']] = $regs[$startreg['positions']['H']] - 12; + if ($regs[$startreg['positions']['h']] == 0) { + $regs[$startreg['positions']['h']] = 12; + } + $regs[$startreg['positions']['a']] = 'pm'; + $regs[$startreg['positions']['A']] = 'PM'; + } + if ($regs[$startreg['positions']['H']] == 0) { + $regs[$startreg['positions']['h']] = 12; + $regs[$startreg['positions']['a']] = 'am'; + $regs[$startreg['positions']['A']] = 'AM'; + } + } + if (!empty($startreg['positions']['h'])) { + if (!isset($regs[$startreg['positions']['h']])) { + $regs[$startreg['positions']['h']] = '12'; + } else if (strlen($regs[$startreg['positions']['h']]) < 2) + $regs[$startreg['positions']['h']] = '0'.$regs[$startreg['positions']['h']]; + } + if (!empty($startreg['positions']['H'])) { + // if no hour is set or it is equal to 0, set it explicitly to "00" + if (empty($regs[$startreg['positions']['H']])) { + $regs[$startreg['positions']['H']] = '00'; + } else if (strlen($regs[$startreg['positions']['H']]) < 2) + $regs[$startreg['positions']['H']] = '0'.$regs[$startreg['positions']['H']]; + } + if (!empty($startreg['positions']['d'])) { + if (!isset($regs[$startreg['positions']['d']])) { + $regs[$startreg['positions']['d']] = '01'; + } else if (strlen($regs[$startreg['positions']['d']]) < 2) + $regs[$startreg['positions']['d']] = '0'.$regs[$startreg['positions']['d']]; + } + if (!empty($startreg['positions']['i'])) { + // if no minute is set or it is equal to 0, set it explicitly to "00" + if (empty($regs[$startreg['positions']['i']])) { + $regs[$startreg['positions']['i']] = '00'; + } else if (strlen($regs[$startreg['positions']['i']]) < 2) + $regs[$startreg['positions']['i']] = '0'.$regs[$startreg['positions']['i']]; + } else { + $startreg['positions']['i'] = count($startreg['positions']) + 1; + $regs[$startreg['positions']['i']] = '00'; - /** - * Format date as DB-formatted field type - * @param DateTime $date - * @param string $type Field type - date, time, datetime[combo] - */ - public function asDbType(DateTime $date, $type) - { - switch($type) { - case "date": - return $this->asDbDate($date); - break; - case 'time': - return $this->asDbtime($date); - break; - case 'datetime': - case 'datetimecombo': - default: - return $this->asDb($date); - } - } + } + if (!empty($startreg['positions']['m'])) { + if (!isset($regs[$startreg['positions']['m']])) { + $regs[$startreg['positions']['m']] = '01'; + } elseif(strlen($regs[$startreg['positions']['m']]) < 2) + $regs[$startreg['positions']['m']] = '0'.$regs[$startreg['positions']['m']]; + } + if (!empty($startreg['positions']['Y'])) { + if (!isset($regs[$startreg['positions']['Y']])) { + $regs[$startreg['positions']['Y']] = '2000'; + } + } + if (!empty($startreg['positions']['s'])) { + if (!isset($regs[$startreg['positions']['s']])) { + $regs[$startreg['positions']['s']] = '00'; + } else if (strlen($regs[$startreg['positions']['s']]) < 2) + $regs[$startreg['positions']['s']] = '0'.$regs[$startreg['positions']['s']]; + } else { + $startreg['positions']['s'] = sizeof($startreg['positions']) + 1; + $regs[$startreg['positions']['s']] = '00'; + } + foreach($startreg['positions'] as $key=>$val) { + if (isset($regs[$val])) { + $newDate = str_replace($key, $regs[$val], $newDate); + } + } + return $newDate; - /** - * Format DateTime object as user datetime - * - * @param DateTime $date - * @return string - */ - public function asUser(DateTime $date, User $user = null) - { - $this->tzUser($date, $user); - return $date->format($this->get_date_time_format($user)); - } + } + /** + * Converts DB time string to local time string + * + * TZ conversion depends on offset parameter + * + * @param string $date Time in DB format + * @param bool $meridiem + * @param bool $offset Perform TZ conversion? + * @return string Time in user-defined format + */ + function to_display_time($date, $meridiem = true, $offset = true) { + $date = trim($date); + if (empty($date)) { + return $date; + } + if ($offset) { + $date = $this->handle_offset($date, $this->get_db_date_time_format(), true); + } + return $this->to_display($date, $this->dbTimeFormat, $this->get_time_format($meridiem)); + } - /** - * Format date as user-formatted field type - * @param DateTime $date - * @param string $type Field type - date, time, datetime[combo] - */ - public function asUserType(DateTime $date, $type, User $user = null) - { - switch($type) { - case "date": - return $this->asUserDate($date, true, $user); - break; - case 'time': - return $this->asUserTime($date, true, $user); - break; - case 'datetime': - case 'datetimecombo': - default: - return $this->asUser($date, $user); - } - } + /** + * Converts DB date string to local date string + * + * TZ conversion depens on offset parameter + * + * @param string $date Date in DB format + * @param bool $use_offset Perform TZ conversion? + * @return string Date in user-defined format + */ + function to_display_date($date, $use_offset = true) { + $date = trim($date); + if (empty($date)) { + return $date; + } + if ($use_offset) + $date = $this->handle_offset($date, $this->get_db_date_time_format(), true); - /** - * Produce timestamp offset by user's timezone - * - * So if somebody converts it to format assuming GMT, it would actually display user's time. - * This is used by Javascript. - * - * @param DateTime $date - * @return int - */ - public function asUserTs(DateTime $date, User $user = null) - { - return $date->format('U')+$this->_getUserTZ($user)->getOffset($date); - } + return $this->to_display($date, $this->dbDayFormat, $this->get_date_format()); + } - /** - * Format DateTime object as DB date - * Note: by default does not convert TZ! - * @param DateTime $date - * @param boolean $tz Perform TZ conversion? - * @return string - */ - public function asDbDate(DateTime $date, $tz = false) - { - if($tz) $date->setTimezone(self::$gmtTimezone); - return $date->format($this->get_db_date_format()); - } + /** + * Convert DB datetime to local datetime + * + * TZ conversion is controlled by $offset + * + * @param string $date Original date in DB format + * @param bool $meridiem + * @param bool $offset Perform TZ conversion? + * @param User $user User owning the conversion formats + * @return string Date in display format + */ + function to_display_date_time($date, $meridiem = true, $offset = true, $user = null) { + $date = trim($date); - /** - * Format DateTime object as user date - * Note: by default does not convert TZ! - * @param DateTime $date - * @param boolean $tz Perform TZ conversion? - * @return string - */ - public function asUserDate(DateTime $date, $tz = false, User $user = null) - { - if($tz) $this->tzUser($date, $user); - return $date->format($this->get_date_format($user)); - } - - /** - * Format DateTime object as DB time - * - * @param DateTime $date - * @return string - */ - public function asDbTime(DateTime $date) - { - $date->setTimezone(self::$gmtTimezone); - return $date->format($this->get_db_time_format()); - } + if (empty($date)) { + return $date; + } - /** - * Format DateTime object as user time - * - * @param DateTime $date - * @return string - */ - public function asUserTime(DateTime $date, User $user = null) - { - $this->tzUser($date, $user); - return $date->format($this->get_time_format($user)); - } + if($this->allow_cache) { + $args = array( + 'time' => $date, + 'meridiem' => $meridiem, + 'offset' => $offset, + 'user' => is_null($user)?null:$user->id, + ); + + // todo use __METHOD__ once PHP5 minimum verison is required + $cache_key = md5('TimeDate::to_display_date_time_' . serialize($args)); + $cached_value = sugar_cache_retrieve($cache_key); + if (!is_null($cached_value)) { + return $cached_value; + } + } - /** - * Get DateTime from DB datetime string - * - * @param string $date - * @return SugarDateTime - */ - public function fromDb($date) - { - try { - return SugarDateTime::createFromFormat(self::DB_DATETIME_FORMAT, $date, self::$gmtTimezone); - } catch (Exception $e) { - $GLOBALS['log']->error("fromDb: Conversion of $date from DB format failed: {$e->getMessage()}"); - return null; - } - } + if ($offset) { + $date = $this->handle_offset($date, $this->get_db_date_time_format(), true, $user); + } - /** - * Create a date from a certain type of field in DB format - * The types are: date, time, datatime[combo] - * @param string $date the datetime string - * @param string $type string type - * @return SugarDateTime - */ - public function fromDbType($date, $type) - { - switch($type) { - case "date": - return $this->fromDbDate($date); - break; - case 'time': - return $this->fromDbFormat($date, self::DB_TIME_FORMAT); - break; - case 'datetime': - case 'datetimecombo': - default: - return $this->fromDb($date); - } - } + $return_value = $this->to_display($date, $this->get_db_date_time_format(), $this->get_date_time_format($meridiem, $user)); - /** - * Get DateTime from DB date string - * - * @param string $date - * @return SugarDateTime - */ - public function fromDbDate($date) - { - try { - return SugarDateTime::createFromFormat(self::DB_DATE_FORMAT, $date, self::$gmtTimezone); - } catch (Exception $e) { - $GLOBALS['log']->error("fromDbDate: Conversion of $date from DB format failed: {$e->getMessage()}"); - return null; - } - } + if($this->allow_cache) { + sugar_cache_put($cache_key, $return_value); + } + return $return_value; + } - /** - * Get DateTime from DB datetime string using non-standard format - * - * Non-standard format usually would be only date, only time, etc. - * - * @param string $date - * @param string $format format to accept - * @return SugarDateTime - */ - public function fromDbFormat($date, $format) - { - try { - return SugarDateTime::createFromFormat($format, $date, self::$gmtTimezone); - } catch (Exception $e) { - $GLOBALS['log']->error("fromDbFormat: Conversion of $date from DB format $format failed: {$e->getMessage()}"); - return null; - } - } + /** + * Convert date from format to format + * + * No TZ conversion is performed! + * + * @param string $date + * @param string $fromformat Source format + * @param string $toformat Target format + * @return string Converted date + */ + function to_display($date, $fromformat, $toformat) { + $date = trim($date); + if (empty($date)) { + return $date; + } + return $this->swap_formats($date, $fromformat, $toformat); + } - /** - * Get DateTime from user datetime string - * - * @param string $date - * @return SugarDateTime - */ - public function fromUser($date, User $user = null) - { - try { - return SugarDateTime::createFromFormat($this->get_date_time_format($user), $date, $this->_getUserTZ($user)); - } catch (Exception $e) { - $uf = $this->get_date_time_format($user); - $GLOBALS['log']->error("fromUser: Conversion of $date from user format $uf failed: {$e->getMessage()}"); - return null; - } - } + /** + * Convert date from local datetime to GMT-based DB datetime + * + * Includes TZ conversion. + * + * @param string $date + * @return string Datetime in DB format + */ + public function to_db($date) { + $date = trim($date); + if (empty($date)) { + return $date; + } + if (strlen($date) <= 10) { + $date = $this->merge_date_time($date, $this->get_default_midnight()); + } - /** - * Create a date from a certain type of field in user format - * The types are: date, time, datatime[combo] - * @param string $date the datetime string - * @param string $type string type - * @param User $user - * @return SugarDateTime - */ - public function fromUserType($date, $type, $user = null) - { - switch($type) { - case "date": - return $this->fromUserDate($date, $user); - break; - case 'time': - return $this->fromUserTime($date, $user); - break; - case 'datetime': - case 'datetimecombo': - default: - return $this->fromUser($date, $user); - } - } + $date = $this->swap_formats($date, $this->get_date_time_format(), $this->get_db_date_time_format()); + return $this->handle_offset($date, $this->get_db_date_time_format(), false, $GLOBALS['current_user']); + } - /** - * Get DateTime from user time string - * - * @param string $date - * @return SugarDateTime - */ - public function fromUserTime($date, User $user = null) - { - try { - return SugarDateTime::createFromFormat($this->get_time_format($user), $date, $this->_getUserTZ($user)); - } catch (Exception $e) { - $uf = $this->get_time_format($user); - $GLOBALS['log']->error("fromUserTime: Conversion of $date from user format $uf failed: {$e->getMessage()}"); - return null; - } - } - /** - * Get DateTime from user date string - * Usually for calendar-related functions like holidays - * Note: by default does not convert tz! - * @param string $date - * @param bool $convert_tz perform TZ converson? - * @param User $user - * @return SugarDateTime - */ - public function fromUserDate($date, $convert_tz = false, User $user = null) - { - try { - return SugarDateTime::createFromFormat($this->get_date_format($user), $date, $convert_tz?$this->_getUserTZ($user):self::$gmtTimezone); - } catch (Exception $e) { - $uf = $this->get_date_format($user); - $GLOBALS['log']->error("fromUserDate: Conversion of $date from user format $uf failed: {$e->getMessage()}"); - return null; - } - } + /* + * @todo This should return the raw text to be included within a "; - /** - * Convert DateTime to user timezone - * @param DateTime $date - * @param [User] $user - * @return DateTime - */ - public function tzUser(DateTime $date, User $user = null) - { - return $date->setTimezone($this->_getUserTZ($user)); - } + return $the_script; - /** - * Get string defining midnight in current user's format - * @param string $format Time format to use - * @return string - */ - protected function _get_midnight($format = null) - { - $zero = new DateTime("@0", self::$gmtTimezone); - return $zero->format($format?$format:$this->get_time_format()); - } + } - /** - * - * Basic conversion function - * - * @param string $date - * @param string $fromFormat - * @param DateTimeZone $fromTZ - * @param string $toFormat - * @param DateTimeZone $toTZ - * @param bool $expand - */ - protected function _convert($date, $fromFormat, $fromTZ, $toFormat, $toTZ, $expand = false) - { - $date = trim($date); - if (empty($date)) { + /** + * Convert local datetime to DB date + * + * TZ conversion depends on $use_offset. If false, only format conversion is performed. + * + * @param string $date Local date + * @param bool $use_offset Should time and TZ be taken into account? + * @return string Date in DB format + */ + public function to_db_date($date, $use_offset = true) { + $date = trim($date); + if (empty($date)) { + return $date; + } + if (!$use_offset && preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date) ) { + // Already in system format return $date; } - try { - if ($expand && strlen($date) <= 10) { - $date = $this->expandDate($date, $fromFormat); - } - $phpdate = SugarDateTime::createFromFormat($fromFormat, $date, $fromTZ); - if ($phpdate == false) { - // var_dump($date, $phpdate, $fromFormat, DateTime::getLastErrors() ); - $GLOBALS['log']->error("convert: Conversion of $date from $fromFormat to $toFormat failed"); - return ''; - } - if ($fromTZ !== $toTZ) { - $phpdate->setTimeZone($toTZ); - } - return $phpdate->format($toFormat); - } catch (Exception $e) { - // var_dump($date, $phpdate, $fromFormat, $fromTZ, DateTime::getLastErrors() ); - $GLOBALS['log']->error("Conversion of $date from $fromFormat to $toFormat failed: {$e->getMessage()}"); - return ''; - } - } - - /** - * Convert DB datetime to local datetime - * - * TZ conversion is controlled by parameter - * - * @param string $date Original date in DB format - * @param bool $meridiem Ignored for BC - * @param bool $convert_tz Perform TZ conversion? - * @param User $user User owning the conversion formats - * @return string Date in display format - */ - function to_display_date_time($date, $meridiem = true, $convert_tz = true, $user = null) - { - return $this->_convert($date, - self::DB_DATETIME_FORMAT, self::$gmtTimezone, $this->get_date_time_format($user), - $convert_tz ? $this->_getUserTZ($user) : self::$gmtTimezone, true); - } - - /** - * Converts DB time string to local time string - * - * TZ conversion depends on parameter - * - * @param string $date Time in DB format - * @param bool $meridiem - * @param bool $convert_tz Perform TZ conversion? - * @return string Time in user-defined format - */ - public function to_display_time($date, $meridiem = true, $convert_tz = true) - { - if($convert_tz && strpos($date, ' ') === false) { - // we need TZ adjustment but have no date, assume today - $date = $this->expandTime($date, self::DB_DATETIME_FORMAT, self::$gmtTimezone); - } - return $this->_convert($date, - $convert_tz ? self::DB_DATETIME_FORMAT : self::DB_TIME_FORMAT, self::$gmtTimezone, - $this->get_time_format(), $convert_tz ? $this->_getUserTZ() : self::$gmtTimezone); - } - - /** - * Splits time in given format into components - * - * Components: h, m, s, a (am/pm) if format requires it - * If format has am/pm, hour is 12-based, otherwise 24-based - * - * @param string $date - * @param string $format - * @return array - */ - public function splitTime($date, $format) - { - if (! ($date instanceof DateTime)) { - $date = SugarDateTime::createFromFormat($format, $date); - } - $ampm = strpbrk($format, 'aA'); - $datearr = array( - "h" => ($ampm == false) ? $date->format("H") : $date->format("h"), - 'm' => $date->format("i"), - 's' => $date->format("s") - ); - if ($ampm) { - $datearr['a'] = ($ampm{0} == 'a') ? $date->format("a") : $date->format("A"); - } - return $datearr; - } - - /** - * Converts DB date string to local date string - * - * TZ conversion depens on parameter - * - * @param string $date Date in DB format - * @param bool $convert_tz Perform TZ conversion? - * @return string Date in user-defined format - */ - public function to_display_date($date, $convert_tz = true) - { - return $this->_convert($date, - self::DB_DATETIME_FORMAT, self::$gmtTimezone, - $this->get_date_format(), $convert_tz ? $this->_getUserTZ() : self::$gmtTimezone, true); - } - - /** - * Convert date from format to format - * - * No TZ conversion is performed! - * - * @param string $date - * @param string $fromformat Source format - * @param string $toformat Target format - * @return string Converted date - */ - function to_display($date, $from, $to) - { - return $this->_convert($date, $from, self::$gmtTimezone, $to, self::$gmtTimezone); - } - - /** - * Get DB datetime format - * @return string - */ - public function get_db_date_time_format() - { - return self::DB_DATETIME_FORMAT; - } - - /** - * Get DB date format - * @return string - */ - public function get_db_date_format() - { - return self::DB_DATE_FORMAT; - } - - /** - * Get DB time format - * @return string - */ - public function get_db_time_format() - { - return self::DB_TIME_FORMAT; - } - - /** - * Convert date from local datetime to GMT-based DB datetime - * - * Includes TZ conversion. - * - * @param string $date - * @return string Datetime in DB format - */ - public function to_db($date) - { - return $this->_convert($date, - $this->get_date_time_format(), $this->_getUserTZ(), - $this->get_db_date_time_format(), self::$gmtTimezone, - true); - } - - /** - * Convert local datetime to DB date - * - * TZ conversion depends on parameter. If false, only format conversion is performed. - * - * @param string $date Local date - * @param bool $convert_tz Should time and TZ be taken into account? - * @return string Date in DB format - */ - public function to_db_date($date, $convert_tz = true) - { - return $this->_convert($date, - $this->get_date_time_format(), $convert_tz ? $this->_getUserTZ() : self::$gmtTimezone, - self::DB_DATE_FORMAT, self::$gmtTimezone, true); - } - - /** - * Convert local datetime to DB time - * - * TZ conversion depends on parameter. If false, only format conversion is performed. - * - * @param string $date Local date - * @param bool $convert_tz Should time and TZ be taken into account? - * @return string Time in DB format - */ - public function to_db_time($date, $convert_tz = true) - { - $format = $this->get_date_time_format(); - $tz = $convert_tz ? $this->_getUserTZ() : self::$gmtTimezone; - if($convert_tz && strpos($date, ' ') === false) { - // we need TZ adjustment but have short string, expand it to full one - // FIXME: if the string is short, should we assume date or time? - $date = $this->expandTime($date, $format, $tz); - } - return $this->_convert($date, - $convert_tz ? $format : $this->get_time_format(), - $tz, - self::DB_TIME_FORMAT, self::$gmtTimezone); - } - - /** - * Takes a Date & Time value in local format and converts them to DB format - * No TZ conversion! - * - * @param string $date - * @param string $time - * @return array Date & time in DB format - **/ - public function to_db_date_time($date, $time) - { - try { - $phpdate = SugarDateTime::createFromFormat($this->get_date_time_format(), - $this->merge_date_time($date, $time), self::$gmtTimezone); - if ($phpdate == false) { - return array('', ''); - } - return array($this->asDbDate($phpdate), $this->asDbTime($phpdate)); - } catch (Exception $e) { - $GLOBALS['log']->error("Conversion of $date,$time failed"); - return array('', ''); - } - } - - /** - * Return current time in DB format - * @return string - */ - public function nowDb() - { - if(!$this->allow_cache) { - $nowGMT = $this->getNow(); - } else { - $nowGMT = $this->now; - } - return $this->asDb($nowGMT); - } - - /** - * Return current date in DB format - * @return string - */ - public function nowDbDate() - { - if(!$this->allow_cache) { - $nowGMT = $this->getNow(); - } else { - $nowGMT = $this->now; - } - return $this->asDbDate($nowGMT, true); - } - - /** - * Get 'now' DateTime object - * @param bool $userTz return in user timezone? - * @return SugarDateTime - */ - public function getNow($userTz = false) - { - if(!$this->allow_cache) { - return new SugarDateTime("now", $userTz?$this->_getUserTz():self::$gmtTimezone); - } - // TODO: should we return clone? - $now = clone $this->now; - if($userTz) { - return $this->tzUser($now); - } - return $now; - } - - /** - * Set 'now' time - * For testability - predictable time value - * @param DateTime $now - */ - public function setNow($now) - { - $this->now = $now; - return $this; - } + if ($use_offset) { + $date = $this->to_db($date); + $date = $this->swap_formats($date, $this->dbDayFormat, $this->dbDayFormat); + } else { + $date = $this->swap_formats($date, $this->get_date_format(), $this->dbDayFormat); + } - /** - * Return current datetime in local format - * @return string - */ - public function now() - { - return $this->asUser($this->getNow()); - } + return $date; + } - /** - * Return current date in User format - * @return string - */ - public function nowDate() - { - return $this->asUserDate($this->getNow()); - } + /** + * Convert local datetime to DB time + * + * TZ conversion depends on $use_offset. If false, only format conversion is performed. + * + * @param string $date Local date + * @param bool $use_offset Should time and TZ be taken into account? + * @return string Time in DB format + */ + public function to_db_time($date, $use_offset = true) { + $date = trim($date); + if (empty($date)) { + return $date; + } + if ($use_offset){ + $date =$this->to_db($date, $use_offset); + $date = $this->swap_formats($date, $this->get_db_date_time_format(), $this->dbTimeFormat); + }else{ + $date = $this->swap_formats($date, $this->get_time_format(), $this->dbTimeFormat); + } + return $date; - /** - * Get user format's time separator - * @return string - */ - public function timeSeparator() - { - if (empty($this->time_separator)) { - $this->time_separator = $this->timeSeparatorFormat($this->get_time_format()); - } - return $this->time_separator; - } - /** - * Find out format's time separator - * @param string $timeformat Time format - */ - public function timeSeparatorFormat($timeformat) - { - $date = $this->_convert("00:11:22", self::DB_TIME_FORMAT, null, $timeformat, null); - if (preg_match('/\d+(.+?)11/', $date, $matches)) { - $sep = $matches[1]; - } else { - $sep = ':'; - } - return $sep; - } + } - /** - * Returns start and end of a certain local date in GMT - * Example: for May 19 in PDT start would be 2010-05-19 07:00:00, end would be 2010-05-20 06:59:59 - * @param string|DateTime $date Date in any suitable format - * @return array Start & end date in start, startdate, starttime, end, enddate, endtime - */ - public function getDayStartEndGMT($date, User $user = null) - { - if ($date instanceof DateTime) { - $min = clone $date; - $min->setTimezone($this->_getUserTZ($user)); - $max = clone $date; - $max->setTimezone($this->_getUserTZ($user)); - } else { - $min = new DateTime($date, $this->_getUserTZ($user)); - $max = new DateTime($date, $this->_getUserTZ($user)); + /** + * Takes a Date & Time value in local format and converts them to DB format + * No TZ conversion! + * + * @param string $date + * @param string $time + * @return array Date & time in DB format + **/ + public function to_db_date_time($date, $time) { + global $current_user; + if(is_object($current_user)) { + $timeFormat = $current_user->getUserDateTimePreferences(); + } else { + $timeFormat['date'] = $this->dbDayFormat; + $timeFormat['time'] = $this->dbTimeFormat; + } + $dt = ''; + $newDate = ''; + $retDateTime = array(); + + // concat: ('.' breaks strtotime()) + $time = str_replace('.',':',$time); + $dt = $date.' '.$time; + if ( preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/',$dt) ) { + // Already in system time format + return array($date, $time); } - $min->setTime(0, 0); - $max->setTime(23, 59, 59); - - $min->setTimezone(self::$gmtTimezone); - $max->setTimezone(self::$gmtTimezone); - - $result['start'] = $this->asDb($min); - $result['startdate'] = $this->asDbDate($min); - $result['starttime'] = $this->asDbTime($min); - $result['end'] = $this->asDb($max); - $result['enddate'] = $this->asDbDate($max); - $result['endtime'] = $this->asDbtime($max); + $newDate = $this->swap_formats($dt, $timeFormat['date'].' '.$timeFormat['time'] , $this->dbDateTimeFormat); + return $this->split_date_time($newDate); + } - return $result; - } + /** + * @deprecated for public use + * Get DST offset between user & event + * @param $user_in_dst + * @param $event_in_dst + */ + function getUserEventOffset($user_in_dst, $event_in_dst){ + if($user_in_dst && !$event_in_dst ){ + return -3600; + } + if(!$user_in_dst && $event_in_dst ){ + return 3600; + } + return 0; + } - /** - * Expand date format by adding midnight to it - * Note: date is assumed to be in target format already - * @param string $date - * @param string $format Target format - * @return string - */ - public function expandDate($date, $format) - { - $formats = $this->split_date_time($format); - if(isset($formats[1])) { - return $this->merge_date_time($date, $this->_get_midnight($formats[1])); - } - return $date; - } +/************************************************************** +U S E Time GMT Delta Server Client U/E Delta Server GMT +USER IN LA and server in NY +D D D 12 19 -3 0 -4 +D D S 12 20 -3 -1 -4 +D S D 12 19 -2 0 -5 +D S S 12 20 -2 -1 -5 +S D D 12 19 -4 1 -4 +S D S 12 20 -4 0 -4 +S S D 12 19 -3 1 -5 +S S S 12 20 -3 0 -5 - /** - * Expand time format by adding today to it - * Note: time is assumed to be in target format already - * @param string $date - * @param string $format Target format - * @param DateTimeZone $tz - */ - public function expandTime($date, $format, $tz) - { - $formats = $this->split_date_time($format); - if(isset($formats[1])) { - $now = clone $this->getNow(); - $now->setTimezone($tz); - return $this->merge_date_time($now->format($formats[0]), $date); - } - return $date; - } - /** - * Get midnight (start of the day) in local time format - * - * @return Time string +User in LA and server in gmt there are no DST for server +D S D 12 19 -7 0 0 +D S S 12 20 -7 -1 0 + +S S D 12 19 -8 1 0 +S S S 12 20 -8 0 0 + +***************************************************************/ + + /** + * handles offset values for Timezones and DST + * @param $date string date/time formatted in user's selected format + * @param $format string destination format value as passed to PHP's date() funtion + * @param $to boolean + * @param $user object user object from which Timezone and DST + * @param $usetimezone string timezone name as it appears in timezones.php values will be derived + * @return string date formatted and adjusted for TZ and DST */ - function get_default_midnight() - { - return $this->_get_midnight($this->get_time_format()); + function handle_offset($date, $format, $to = true, $user = null, $usetimezone = null) { + global $sugar_config; + $date = trim($date); + // Samir Gandhi + // This has been commented out because it is going through the wrong code path + // Email module was broken and thats why its commented + //if($this->use_old_gmt()){ + //return $this->handle_offset_depricated($date, $format, $to); + //} + if (empty($date)) { + return $date; + } + if($this->allow_cache) { + $args = array( + 'date' => $date, + 'format' => $format, + 'to' => $to, + 'user' => is_null($user)?null:$user->id, + 'usetimezone' => $usetimezone, + ); + $cache_key = md5('TimeDate::handle_offset_' . serialize($args)); + $cached_result = sugar_cache_retrieve($cache_key); + if (!is_null($cached_result)) { + return $cached_result; + } + } + if (strtotime($date) == -1) { + return $date; + } + $deltaServerGMT = date('Z'); + + if ( !empty($usetimezone) ) + $timezone = $GLOBALS['timezones'][$usetimezone]; + else + $timezone = $this->getUserTimeZone($user); + $deltaServerUser = $this->get_hour_offset($to, $timezone); + $event_in_ds = $this->inDST($date,$timezone ); + $user_in_ds = $this->inDST(date('Y-m-d H:i:s'),$timezone ); + $server_in_ds = date('I'); + $ue = $this->getUserEventOffset($user_in_ds, $event_in_ds); + $zone = 1; + if (!$to) { + $zone = -1; + } + $result = date($format, strtotime($date) + $deltaServerUser * 3600 + ($ue + $deltaServerGMT) * $zone); + if($this->allow_cache) { + sugar_cache_put($cache_key, $result); + } + return $result; } /** - * Get the name of the timezone for the user - * @param User $user User, default - current user - * @return string + * @deprecated for public use */ - public static function userTimezone(User $user = null) + function use_old_gmt() { - $user = self::getInstance()->_getUser($user); - if(empty($user)) { - return ''; - } - $tz = self::getInstance()->_getUserTZ($user); - if($tz) { - return $tz->getName(); - } - return ''; + if(isset($_SESSION['GMTO'])){ + return $_SESSION['GMTO']; + } + $db = DBManagerFactory::getInstance(); + $fix_name = 'DST Fix'; + $result =$db->query("Select * from versions where name='$fix_name'"); + $valid = $db->fetchByAssoc($result); + if($valid){ + $_SESSION['GMTO'] = false; + }else{ + $_SESSION['GMTO'] = true; + } + return $_SESSION['GMTO']; } /** - * Guess the timezone for the current user - * @return string + * @deprecated for public use + *This function is depricated don't use it. It is only for backwards compatibility until the admin runs the upgrade script + * + * @param unknown_type $date + * @param unknown_type $format + * @param unknown_type $to + * @return unknown */ - public static function guessTimezone($userOffset = 0) + private function handle_offset_depricated($date, $format, $to = true) { - if(!is_numeric($userOffset)) { - return ''; - } - $defaultZones= array( - 'America/Anchorage', 'America/Los_Angeles', 'America/Phoenix', 'America/Chicago', - 'America/New_York', 'America/Argentina/Buenos_Aires', 'America/Montevideo', - 'Europe/London', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Moscow', - 'Asia/Tbilisi', 'Asia/Omsk', 'Asia/Jakarta', 'Asia/Hong_Kong', - 'Asia/Tokyo', 'Pacific/Guam', 'Australia/Sydney', 'Australia/Perth', - ); - - $now = new DateTime(); - $tzlist = timezone_identifiers_list(); - if($userOffset == 0) { - $gmtOffset = date('Z'); - $nowtz = date('e'); - if(in_array($nowtz, $tzlist)) { - array_unshift($defaultZones, $nowtz); - } else { - $nowtz = timezone_name_from_abbr(date('T'), $gmtOffset, date('I')); - if(in_array($nowtz, $tzlist)) { - array_unshift($defaultZones, $nowtz); - } - } - } else { - $gmtOffset = $userOffset * 60; - } - foreach($defaultZones as $zoneName) { - $tz = new DateTimeZone($zoneName); - if($tz->getOffset($now) == $gmtOffset) { - return $tz->getName(); - } - } - // try all zones - foreach($tzlist as $zoneName) { - $tz = new DateTimeZone($zoneName); - if($tz->getOffset($now) == $gmtOffset) { - return $tz->getName(); - } - } - return null; + $date = trim($date); + if (empty($date)) { + return $date; + } + if (strtotime($date) == -1) { + return $date; + } + $zone = date('Z'); + if (!$to) { + $zone *= -1; + } + return date($format, strtotime($date) + $this->get_hour_offset($to) * 60 * 60 + $zone); } /** - * Get the description of the user timezone for specific date - * Like: PST(+08:00) - * We need the date because it can be DST or non-DST - * Note it's different from TZ name in tzName() that relates to current date - * @param User $user User, default - current user - * @return string + * this method will take an input $date variable (expecting Y-m-d format) + * and get the GMT equivalent - with an hour-level granularity : + * return the max value of a given locale's + * date+time in GMT metrics (i.e., if in PDT, "2005-01-01 23:59:59" would be + * "2005-01-02 06:59:59" in GMT metrics) */ - public static function userTimezoneSuffix(DateTime $date, User $user = null) + function handleOffsetMax($date, $format = '', $to = true) { - $user = self::getInstance()->_getUser($user); - if(empty($user)) { - return ''; - } - self::getInstance()->tzUser($date, $user); - return $date->format('T(P)'); + global $current_user; + $gmtDateTime = array($date); // for errors + /* check for bad date formatting */ + $date = trim($date); + + if (empty($date)) { + return $gmtDateTime; + } + + if (strtotime($date) == -1) { + return $gmtDateTime; + } + + /* cn: passed $date var will be a "MAX" value, which we need to return + as a GMT date/time pair to provide for hour-level granularity */ + /* this ridiculousness b/c PHP returns current time when passing "today" + or "tomorrow" as strtotime() args */ + $dateNoTime = date('Y-m-d', strtotime($date)); + + /* handle timezone and daylight savings */ + $dateWithTimeMin = $dateNoTime.' 00:00:00'; + $dateWithTimeMax = $dateNoTime.' 23:59:59'; + + $offsetDateMin = $this->handle_offset($dateWithTimeMin, $this->dbDateTimeFormat, false); + $offsetDateMax = $this->handle_offset($dateWithTimeMax, $this->dbDateTimeFormat, false); + + + $exOffsetDateMax = $this->split_date_time($offsetDateMax); + $gmtDateTime['date'] = $exOffsetDateMax[0]; + $gmtDateTime['time'] = $exOffsetDateMax[1]; + $gmtDateTime['min'] = $offsetDateMin; + $gmtDateTime['max'] = $offsetDateMax; + + return $gmtDateTime; } + /** - * Get display name for a certain timezone - * Note: it uses current date for GMT offset, so it may be not suitable for displaying generic dates - * @param string|DateTimeZone $name TZ name + * Get current GMT datetime in DB format * @return string */ - public static function tzName($name) - { - if(empty($name)) { - return ''; - } - if($name instanceof DateTimeZone) { - $tz = $name; - } else { - $tz = timezone_open($name); - } - if(!$tz) { - return "???"; - } - $now = new DateTime("now", $tz); - $off = $now->getOffset(); - $translated = translate('timezone_dom','',$name); - if(is_string($translated) && !empty($translated)) { - $name = $translated; - } - return sprintf("%s (GMT%+2d:%02d)%s", str_replace('_',' ', $name), $off/3600, (abs($off)/60)%60, "");//$now->format('I')==1?"(+DST)":""); + function get_gmt_db_datetime() { + return gmdate($this->get_db_date_time_format()); } - - public static function _sortTz($a, $b) - { - if($a[0] == $b[0]) { - return strcmp($a[1], $b[1]); - } else { - return $a[0]<$b[0]?-1:1; - } + /** + * Get current GMT date in DB format + * @return string + */ + function get_gmt_db_date() { + return gmdate($this->get_db_date_format()); } - /** - * Get list of all timezones in the system - * @return array + /* + * @deprecated for public use + * Convert time in strtotime format into Y-m-d H:i:s format */ - public static function getTimezoneList() - { - $now = new DateTime(); - $res_zones = $zones = array(); - foreach(timezone_identifiers_list() as $zoneName) { - $tz = new DateTimeZone($zoneName); - $zones[$zoneName] = array($tz->getOffset($now), self::tzName($zoneName)); - } - uasort($zones, array('TimeDate', '_sortTz')); - foreach($zones as $name => $zonedef) { - $res_zones[$name] = $zonedef[1]; - } - return $res_zones; + function convert_to_gmt_datetime($olddatetime) { + if (!empty($olddatetime)) { + return date('Y-m-d H:i:s', strtotime($olddatetime) - date('Z')); + } } /** - * Print timestamp in RFC2616 format: - * @return string + * makes one datetime string from date string and time string + * + * @param string $date + * @param string $time + * @return string Datetime string */ - public static function httpTime($ts = null) - { - if($ts === null) { - $ts = time(); - } - return gmdate(self::RFC2616_FORMAT, $ts); + function merge_date_time($date, $time) { + return $date.' '.$time; } /** - * Create datetime object from calendar array - * @param array $time - * @return SugarDateTime + * Merge time without am/pm with am/pm string + * + * @param string $date + * @param string $format User time format + * @param string $mer + * @return string */ - public function fromTimeArray($time) - { - if (! isset( $time) || count($time) == 0 ) - { - return $this->nowDb(); - } - elseif ( isset( $time['ts'])) - { - return $this->fromTimestamp($time['ts']); - } - elseif ( isset( $time['date_str'])) - { - return $this->fromDb($time['date_str']); - } - else - { - $hour = 0; - $min = 0; - $sec = 0; - $now = $this->getNow(true); - $day = $now->day; - $month = $now->month; - $year = $now->year; - if (isset($time['sec'])) - { - $sec = $time['sec']; - } - if (isset($time['min'])) - { - $min = $time['min']; - } - if (isset($time['hour'])) - { - $hour = $time['hour']; - } - if (isset($time['day'])) - { - $day = $time['day']; - } - if (isset($time['month'])) - { - $month = $time['month']; - } - if (isset($time['year']) && $time['year'] >= 1970) - { - $year = $time['year']; - } - return $now->setDate($year, $month, $day)->setTime($hour, $min, $sec)->setTimeZone(self::$gmtTimezone); + function merge_time_meridiem($date, $format, $mer) { + $date = trim($date); + if (empty($date)) { + return $date; } - return null; + $fakeMerFormat = str_replace(array('a', 'A'), array('!@!', '!@!'), $format); + $noMerFormat = str_replace(array('a', 'A'), array('', ''), $format); + $newDate = $this->swap_formats($date, $noMerFormat, $fakeMerFormat); + return str_replace('!@!', $mer, $newDate); } - + /** - * Returns the date portion of a datetime string + * Returns the time portion of a datetime string * * @param string $datetime * @return string */ - public function getDatePart($datetime) + public function getTimePart($datetime) { - list($date, $time) = $this->split_date_time($datetime); - return $date; + return trim(array_pop($this->split_date_time($datetime))); } - + /** - * Returns the time portion of a datetime string + * Returns the date portion of a datetime string * * @param string $datetime * @return string */ - public function getTimePart($datetime) + public function getDatePart($datetime) { - list($date, $time) = $this->split_date_time($datetime); - return $time; + return trim(array_shift($this->split_date_time($datetime))); } - /** - * Returns the offset from user's timezone to GMT - * @param User $user - * @param DateTime $time When the offset is taken, default is now - * @return int Offset in minutes - */ - public function getUserUTCOffset(User $user = null, DateTime $time = null) - { - if(empty($time)) { - $time = $this->now; - } - return $this->_getUserTZ($user)->getOffset($time) / 60; - } - - /** - * Create regexp from datetime format - * @param string $format - * @return string Regular expression string - */ - public static function get_regular_expression($format) - { - $newFormat = ''; - $regPositions = array(); - $ignoreNextChar = false; - $count = 1; - foreach (str_split($format) as $char) { - if (! $ignoreNextChar && isset(self::$format_to_regexp[$char])) { - $newFormat .= '(' . self::$format_to_regexp[$char] . ')'; - $regPositions[$char] = $count; - $count ++; - } else { - $ignoreNextChar = false; - $newFormat .= $char; - - } - if ($char == "\\") { - $ignoreNextChar = true; - } - } + /** + * @deprecated for public use + * AMPMMenu + * This method renders a "; + + if (strpos($this->get_time_format(), 'a') > -1) { + + if (substr_count($date, 'am') > 0) + $menu.= "
    '; - html[html.length] = '
    '; - - var renderLeft, renderRight = false; - - if (this.parent) { - if (this.index === 0) { - renderLeft = true; - } - if (this.index == (this.parent.cfg.getProperty("pages") -1)) { - renderRight = true; - } - } else { - renderLeft = true; - renderRight = true; - } - - if (renderLeft) { - monthLabel = this._buildMonthLabel(DateMath.subtract(pageDate, DateMath.MONTH, 1)); - - var leftArrow = cfg.getProperty(DEF_CFG.NAV_ARROW_LEFT.key); - // Check for deprecated customization - If someone set IMG_ROOT, but didn't set NAV_ARROW_LEFT, then set NAV_ARROW_LEFT to the old deprecated value - if (leftArrow === null && Calendar.IMG_ROOT !== null) { - leftArrow = Calendar.IMG_ROOT + DEPR_NAV_LEFT; - } - var leftStyle = (leftArrow === null) ? "" : ' style="background-image:url(' + leftArrow + ')"'; - html[html.length] = '' + prevStr + ' (' + monthLabel + ')' + ''; - } - - var lbl = this.buildMonthLabel(); - var cal = this.parent || this; - if (cal.cfg.getProperty("navigator")) { - lbl = "" + lbl + ""; - } - html[html.length] = lbl; - - if (renderRight) { - monthLabel = this._buildMonthLabel(DateMath.add(pageDate, DateMath.MONTH, 1)); - - var rightArrow = cfg.getProperty(DEF_CFG.NAV_ARROW_RIGHT.key); - if (rightArrow === null && Calendar.IMG_ROOT !== null) { - rightArrow = Calendar.IMG_ROOT + DEPR_NAV_RIGHT; - } - var rightStyle = (rightArrow === null) ? "" : ' style="background-image:url(' + rightArrow + ')"'; - html[html.length] = '' + nextStr + ' (' + monthLabel + ')' + ''; - } - - html[html.length] = '
    \n
     ' + this.Locale.LOCALE_WEEKDAYS[i] + ' 
    '; - html = this.renderHeader(html); - html = this.renderBody(workingDate, html); - html = this.renderFooter(html); - html[html.length] = '
    '; - - this.oDomContainer.innerHTML = html.join("\n"); - - this.applyListeners(); - this.cells = Dom.getElementsByClassName(this.Style.CSS_CELL, "td", this.id); - - this.cfg.refireEvent(DEF_CFG.TITLE.key); - this.cfg.refireEvent(DEF_CFG.CLOSE.key); - this.cfg.refireEvent(DEF_CFG.IFRAME.key); - - this.renderEvent.fire(); - }, - - /** - * Applies the Calendar's DOM listeners to applicable elements. - * @method applyListeners - */ - applyListeners : function() { - var root = this.oDomContainer, - cal = this.parent || this, - anchor = "a", - click = "click"; - - var linkLeft = Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root), - linkRight = Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root); - - if (linkLeft && linkLeft.length > 0) { - this.linkLeft = linkLeft[0]; - Event.addListener(this.linkLeft, click, this.doPreviousMonthNav, cal, true); - } - - if (linkRight && linkRight.length > 0) { - this.linkRight = linkRight[0]; - Event.addListener(this.linkRight, click, this.doNextMonthNav, cal, true); - } - - if (cal.cfg.getProperty("navigator") !== null) { - this.applyNavListeners(); - } - - if (this.domEventMap) { - var el,elements; - for (var cls in this.domEventMap) { - if (Lang.hasOwnProperty(this.domEventMap, cls)) { - var items = this.domEventMap[cls]; - - if (! (items instanceof Array)) { - items = [items]; - } - - for (var i=0;i 0) { - - Event.addListener(navBtns, "click", function (e, obj) { - var target = Event.getTarget(e); - // this == navBtn - if (this === target || Dom.isAncestor(this, target)) { - Event.preventDefault(e); - } - var navigator = calParent.oNavigator; - if (navigator) { - var pgdate = cal.cfg.getProperty("pagedate"); - navigator.setYear(pgdate.getFullYear() + cal.Locale.YEAR_OFFSET); - navigator.setMonth(pgdate.getMonth()); - navigator.show(); - } - }); - } - }, - - /** - * Retrieves the Date object for the specified Calendar cell - * @method getDateByCellId - * @param {String} id The id of the cell - * @return {Date} The Date object for the specified Calendar cell - */ - getDateByCellId : function(id) { - var date = this.getDateFieldsByCellId(id); - return (date) ? DateMath.getDate(date[0],date[1]-1,date[2]) : null; - }, - - /** - * Retrieves the Date object for the specified Calendar cell - * @method getDateFieldsByCellId - * @param {String} id The id of the cell - * @return {Array} The array of Date fields for the specified Calendar cell - */ - getDateFieldsByCellId : function(id) { - id = this.getIndexFromId(id); - return (id > -1) ? this.cellDates[id] : null; - }, - - /** - * Find the Calendar's cell index for a given date. - * If the date is not found, the method returns -1. - *

    - * The returned index can be used to lookup the cell HTMLElement - * using the Calendar's cells array or passed to selectCell to select - * cells by index. - *

    - * - * See cells, selectCell. - * - * @method getCellIndex - * @param {Date} date JavaScript Date object, for which to find a cell index. - * @return {Number} The index of the date in Calendars cellDates/cells arrays, or -1 if the date - * is not on the curently rendered Calendar page. - */ - getCellIndex : function(date) { - var idx = -1; - if (date) { - var m = date.getMonth(), - y = date.getFullYear(), - d = date.getDate(), - dates = this.cellDates; - - for (var i = 0; i < dates.length; ++i) { - var cellDate = dates[i]; - if (cellDate[0] === y && cellDate[1] === m+1 && cellDate[2] === d) { - idx = i; - break; - } - } - } - return idx; - }, - - /** - * Given the id used to mark each Calendar cell, this method - * extracts the index number from the id. - * - * @param {String} strId The cell id - * @return {Number} The index of the cell, or -1 if id does not contain an index number - */ - getIndexFromId : function(strId) { - var idx = -1, - li = strId.lastIndexOf("_cell"); - - if (li > -1) { - idx = parseInt(strId.substring(li + 5), 10); - } - - return idx; - }, - - // BEGIN BUILT-IN TABLE CELL RENDERERS - - /** - * Renders a cell that falls before the minimum date or after the maximum date. - * widget class. - * @method renderOutOfBoundsDate - * @param {Date} workingDate The current working Date object being used to generate the calendar - * @param {HTMLTableCellElement} cell The current working cell in the calendar - * @return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering - * should not be terminated - */ - renderOutOfBoundsDate : function(workingDate, cell) { - Dom.addClass(cell, this.Style.CSS_CELL_OOB); - cell.innerHTML = workingDate.getDate(); - return Calendar.STOP_RENDER; - }, - - /** - * Renders the row header for a week. - * @method renderRowHeader - * @param {Number} weekNum The week number of the current row - * @param {Array} cell The current working HTML array - */ - renderRowHeader : function(weekNum, html) { - html[html.length] = '
    ' + weekNum + '' + weekNum + '
    ';Q[Q.length]='
    ';var X,U=false;if(this.parent){if(this.index===0){X=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){U=true;}}else{X=true;U=true;}if(X){M=this._buildMonthLabel(D.subtract(K,D.MONTH,1));var R=N.getProperty(B.NAV_ARROW_LEFT.key);if(R===null&&F.IMG_ROOT!==null){R=F.IMG_ROOT+O;}var I=(R===null)?"":' style="background-image:url('+R+')"';Q[Q.length]=''+V+" ("+M+")"+"";}var W=this.buildMonthLabel();var S=this.parent||this;if(S.cfg.getProperty("navigator")){W=''+W+"";}Q[Q.length]=W;if(U){M=this._buildMonthLabel(D.add(K,D.MONTH,1));var T=N.getProperty(B.NAV_ARROW_RIGHT.key);if(T===null&&F.IMG_ROOT!==null){T=F.IMG_ROOT+G;}var J=(T===null)?"":' style="background-image:url('+T+')"';Q[Q.length]=''+H+" ("+M+")"+"";}Q[Q.length]="
    \n
      
    ';G=this.renderHeader(G);G=this.renderBody(H,G);G=this.renderFooter(G);G[G.length]="
    ";this.oDomContainer.innerHTML=G.join("\n");this.applyListeners();this.cells=C.getElementsByClassName(this.Style.CSS_CELL,"td",this.id);this.cfg.refireEvent(B.TITLE.key);this.cfg.refireEvent(B.CLOSE.key);this.cfg.refireEvent(B.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var P=this.oDomContainer,H=this.parent||this,L="a",S="click";var M=C.getElementsByClassName(this.Style.CSS_NAV_LEFT,L,P),I=C.getElementsByClassName(this.Style.CSS_NAV_RIGHT,L,P);if(M&&M.length>0){this.linkLeft=M[0];A.addListener(this.linkLeft,S,this.doPreviousMonthNav,H,true);}if(I&&I.length>0){this.linkRight=I[0];A.addListener(this.linkRight,S,this.doNextMonthNav,H,true);}if(H.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var J,G;for(var R in this.domEventMap){if(E.hasOwnProperty(this.domEventMap,R)){var N=this.domEventMap[R];if(!(N instanceof Array)){N=[N];}for(var K=0;K0){A.addListener(G,"click",function(N,M){var L=A.getTarget(N);if(this===L||C.isAncestor(this,L)){A.preventDefault(N);}var J=H.oNavigator;if(J){var K=I.cfg.getProperty("pagedate");J.setYear(K.getFullYear()+I.Locale.YEAR_OFFSET);J.setMonth(K.getMonth());J.show();}});}},getDateByCellId:function(H){var G=this.getDateFieldsByCellId(H);return(G)?D.getDate(G[0],G[1]-1,G[2]):null;},getDateFieldsByCellId:function(G){G=this.getIndexFromId(G);return(G>-1)?this.cellDates[G]:null;},getCellIndex:function(I){var H=-1;if(I){var G=I.getMonth(),N=I.getFullYear(),M=I.getDate(),K=this.cellDates;for(var J=0;J-1){H=parseInt(I.substring(G+5),10);}return H;},renderOutOfBoundsDate:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOB);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderRowHeader:function(H,G){G[G.length]=''+H+"";return G;},renderRowFooter:function(H,G){G[G.length]=''+H+"";return G;},renderCellDefault:function(H,G){G.innerHTML=''+this.buildDayLabel(H)+"";},styleCellDefault:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(H,G){C.addClass(G,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOM);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderBodyCellRestricted:function(H,G){C.addClass(G,this.Style.CSS_CELL);C.addClass(G,this.Style.CSS_CELL_RESTRICTED);G.innerHTML=H.getDate();return F.STOP_RENDER;},addMonths:function(I){var H=B.PAGEDATE.key,J=this.cfg.getProperty(H),G=D.add(J,D.MONTH,I);this.cfg.setProperty(H,G);this.resetRenderers();this.changePageEvent.fire(J,G);},subtractMonths:function(G){this.addMonths(-1*G);},addYears:function(I){var H=B.PAGEDATE.key,J=this.cfg.getProperty(H),G=D.add(J,D.YEAR,I);this.cfg.setProperty(H,G);this.resetRenderers();this.changePageEvent.fire(J,G);},subtractYears:function(G){this.addYears(-1*G);},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.addMonths(-1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.addYears(-1);},reset:function(){this.cfg.resetProperty(B.SELECTED.key);this.cfg.resetProperty(B.PAGEDATE.key);this.resetEvent.fire();},clear:function(){this.cfg.setProperty(B.SELECTED.key,[]);this.cfg.setProperty(B.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(I){var L=this._toFieldArray(I),H=[],K=[],M=B.SELECTED.key;for(var G=0;G0){if(this.parent){this.parent.cfg.setProperty(M,K);}else{this.cfg.setProperty(M,K);}this.selectEvent.fire(H);}return this.getSelectedDates();},selectCell:function(J){var H=this.cells[J],N=this.cellDates[J],M=this._toDate(N),I=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(I){this.beforeSelectEvent.fire();var L=B.SELECTED.key;var K=this.cfg.getProperty(L);var G=N.concat();if(this._indexOfSelectedFieldArray(G)==-1){K[K.length]=G;}if(this.parent){this.parent.cfg.setProperty(L,K);}else{this.cfg.setProperty(L,K);}this.renderCellStyleSelected(M,H);this.selectEvent.fire([G]);this.doCellMouseOut.call(H,null,this);}return this.getSelectedDates();},deselect:function(K){var G=this._toFieldArray(K),J=[],M=[],N=B.SELECTED.key;for(var H=0;H0){if(this.parent){this.parent.cfg.setProperty(N,M);}else{this.cfg.setProperty(N,M);}this.deselectEvent.fire(J);}return this.getSelectedDates();},deselectCell:function(K){var H=this.cells[K],N=this.cellDates[K],I=this._indexOfSelectedFieldArray(N);var J=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(J){this.beforeDeselectEvent.fire();var L=this.cfg.getProperty(B.SELECTED.key),M=this._toDate(N),G=N.concat();if(I>-1){if(this.cfg.getProperty(B.PAGEDATE.key).getMonth()==M.getMonth()&&this.cfg.getProperty(B.PAGEDATE.key).getFullYear()==M.getFullYear()){C.removeClass(H,this.Style.CSS_CELL_SELECTED);}L.splice(I,1);}if(this.parent){this.parent.cfg.setProperty(B.SELECTED.key,L);}else{this.cfg.setProperty(B.SELECTED.key,L);}this.deselectEvent.fire([G]);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var J=B.SELECTED.key,G=this.cfg.getProperty(J),H=G.length,I=G.concat();if(this.parent){this.parent.cfg.setProperty(J,[]);}else{this.cfg.setProperty(J,[]);}if(H>0){this.deselectEvent.fire(I);}return this.getSelectedDates();},_toFieldArray:function(H){var G=[];if(H instanceof Date){G=[[H.getFullYear(),H.getMonth()+1,H.getDate()]];}else{if(E.isString(H)){G=this._parseDates(H);}else{if(E.isArray(H)){for(var I=0;IK.getTime()));},_parsePageDate:function(G){var J;if(G){if(G instanceof Date){J=D.findMonthStart(G);}else{var K,I,H;H=G.split(this.cfg.getProperty(B.DATE_FIELD_DELIMITER.key));K=parseInt(H[this.cfg.getProperty(B.MY_MONTH_POSITION.key)-1],10)-1;I=parseInt(H[this.cfg.getProperty(B.MY_YEAR_POSITION.key)-1],10)-this.Locale.YEAR_OFFSET;J=D.getDate(I,K,1);}}else{J=D.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return J;},onBeforeSelect:function(){if(this.cfg.getProperty(B.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(G){},onBeforeDeselect:function(){},onDeselect:function(G){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(I){var J=I.split(this.Locale.DATE_FIELD_DELIMITER),G;if(J.length==2){G=[J[this.Locale.MD_MONTH_POSITION-1],J[this.Locale.MD_DAY_POSITION-1]];G.type=F.MONTH_DAY;}else{G=[J[this.Locale.MDY_YEAR_POSITION-1]-this.Locale.YEAR_OFFSET,J[this.Locale.MDY_MONTH_POSITION-1],J[this.Locale.MDY_DAY_POSITION-1]];G.type=F.DATE;}for(var H=0;H0){this.init.apply(this,arguments);}}B.DEFAULT_CONFIG=B._DEFAULT_CONFIG=G.DEFAULT_CONFIG;B.DEFAULT_CONFIG.PAGES={key:"pages",value:2};var C=B.DEFAULT_CONFIG;B.prototype={init:function(K,I,J){var H=this._parseArgs(arguments);K=H.id;I=H.container;J=H.config;this.oDomContainer=D.get(I);if(!this.oDomContainer.id){this.oDomContainer.id=D.generateId();}if(!K){K=this.oDomContainer.id+"_t";}this.id=K;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];D.addClass(this.oDomContainer,B.CSS_CONTAINER);D.addClass(this.oDomContainer,B.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(J){this.cfg.applyConfig(J,true);}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true);}},setupConfig:function(){var H=this.cfg;H.addProperty(C.PAGES.key,{value:C.PAGES.value,validator:H.checkNumber,handler:this.configPages});H.addProperty(C.YEAR_OFFSET.key,{value:C.YEAR_OFFSET.value,handler:this.delegateConfig,supercedes:C.YEAR_OFFSET.supercedes,suppressEvent:true});H.addProperty(C.TODAY.key,{value:new Date(C.TODAY.value.getTime()),supercedes:C.TODAY.supercedes,handler:this.configToday,suppressEvent:false});H.addProperty(C.PAGEDATE.key,{value:C.PAGEDATE.value||new Date(C.TODAY.value.getTime()),handler:this.configPageDate});H.addProperty(C.SELECTED.key,{value:[],handler:this.configSelected});H.addProperty(C.TITLE.key,{value:C.TITLE.value,handler:this.configTitle});H.addProperty(C.CLOSE.key,{value:C.CLOSE.value,handler:this.configClose});H.addProperty(C.IFRAME.key,{value:C.IFRAME.value,handler:this.configIframe,validator:H.checkBoolean});H.addProperty(C.MINDATE.key,{value:C.MINDATE.value,handler:this.delegateConfig});H.addProperty(C.MAXDATE.key,{value:C.MAXDATE.value,handler:this.delegateConfig});H.addProperty(C.MULTI_SELECT.key,{value:C.MULTI_SELECT.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.START_WEEKDAY.key,{value:C.START_WEEKDAY.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.SHOW_WEEKDAYS.key,{value:C.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_HEADER.key,{value:C.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_FOOTER.key,{value:C.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.HIDE_BLANK_WEEKS.key,{value:C.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.NAV_ARROW_LEFT.key,{value:C.NAV_ARROW_LEFT.value,handler:this.delegateConfig});H.addProperty(C.NAV_ARROW_RIGHT.key,{value:C.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});H.addProperty(C.MONTHS_SHORT.key,{value:C.MONTHS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.MONTHS_LONG.key,{value:C.MONTHS_LONG.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_1CHAR.key,{value:C.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_SHORT.key,{value:C.WEEKDAYS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_MEDIUM.key,{value:C.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_LONG.key,{value:C.WEEKDAYS_LONG.value,handler:this.delegateConfig});H.addProperty(C.LOCALE_MONTHS.key,{value:C.LOCALE_MONTHS.value,handler:this.delegateConfig});H.addProperty(C.LOCALE_WEEKDAYS.key,{value:C.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});H.addProperty(C.DATE_DELIMITER.key,{value:C.DATE_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_FIELD_DELIMITER.key,{value:C.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_RANGE_DELIMITER.key,{value:C.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.MY_MONTH_POSITION.key,{value:C.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_YEAR_POSITION.key,{value:C.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MD_MONTH_POSITION.key,{value:C.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber}); -H.addProperty(C.MD_DAY_POSITION.key,{value:C.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_MONTH_POSITION.key,{value:C.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_DAY_POSITION.key,{value:C.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_YEAR_POSITION.key,{value:C.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_MONTH_POSITION.key,{value:C.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_YEAR_POSITION.key,{value:C.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_MONTH_SUFFIX.key,{value:C.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});H.addProperty(C.MY_LABEL_YEAR_SUFFIX.key,{value:C.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});H.addProperty(C.NAV.key,{value:C.NAV.value,handler:this.configNavigator});H.addProperty(C.STRINGS.key,{value:C.STRINGS.value,handler:this.configStrings,validator:function(I){return E.isObject(I);},supercedes:C.STRINGS.supercedes});},initEvents:function(){var J=this,L="Event",M=YAHOO.util.CustomEvent;var I=function(O,R,N){for(var Q=0;Q0){M=new Date(O);this._setMonthOnDate(M,M.getMonth()+I);P.pageDate=M;}var H=this.constructChild(U,Q,P);D.removeClass(H.oDomContainer,this.Style.CSS_SINGLE);D.addClass(H.oDomContainer,S);if(I===0){O=H.cfg.getProperty(J);D.addClass(H.oDomContainer,V);}if(I==(L-1)){D.addClass(H.oDomContainer,K);}H.parent=this;H.index=I;this.pages[this.pages.length]=H;}},configPageDate:function(O,N,L){var J=N[0],M;var K=C.PAGEDATE.key;for(var I=0;I0)?this.pages[0].cfg.getProperty(K):[];this.cfg.setProperty(K,I,true);},delegateConfig:function(I,H,L){var M=H[0];var K;for(var J=0;J0){J+=1;}K.setYear(J);}},render:function(){this.renderHeader();for(var I=0;I=0;--I){var H=this.pages[I];H.previousMonth();}},nextYear:function(){for(var I=0;I11)){var H=F.add(I,F.MONTH,J-I.getMonth());I.setTime(H.getTime());}else{I.setMonth(J);}},_fixWidth:function(){var H=0;for(var J=0;J0){this.oDomContainer.style.width=H+"px";}},toString:function(){return"CalendarGroup "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var J=this;if(J.navigator){J.navigator.destroy();}if(J.cfg){J.cfg.destroy();}A.purgeElement(J.oDomContainer,true);D.removeClass(J.oDomContainer,B.CSS_CONTAINER);D.removeClass(J.oDomContainer,B.CSS_MULTI_UP);for(var I=0,H=J.pages.length;I=0&&A<12){this._month=A;}this._updateMonthUI();},setYear:function(B){var A=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(B)&&A.test(B+"")){this._year=B;}this._updateYearUI();},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this.createMask();this.applyListeners();this.__rendered=true;}this.cal.renderNavEvent.fire();},createNav:function(){var B=YAHOO.widget.CalendarNavigator;var C=this._doc;var D=C.createElement("div");D.className=B.CLASSES.NAV;var A=this.renderNavContents([]);D.innerHTML=A.join("");this.cal.oDomContainer.appendChild(D); -this.navEl=D;this.yearEl=C.getElementById(this.id+B.YEAR_SUFFIX);this.monthEl=C.getElementById(this.id+B.MONTH_SUFFIX);this.errorEl=C.getElementById(this.id+B.ERROR_SUFFIX);this.submitEl=C.getElementById(this.id+B.SUBMIT_SUFFIX);this.cancelEl=C.getElementById(this.id+B.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFirstLastElements();},createMask:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;var A=this._doc.createElement("div");A.className=B.MASK;this.cal.oDomContainer.appendChild(A);this.maskEl=A;},_syncMask:function(){var B=this.cal.oDomContainer;if(B&&this.maskEl){var A=YAHOO.util.Dom.getRegion(B);YAHOO.util.Dom.setStyle(this.maskEl,"width",A.right-A.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",A.bottom-A.top+"px");}},renderNavContents:function(A){var D=YAHOO.widget.CalendarNavigator,E=D.CLASSES,B=A;B[B.length]='
    ';this.renderMonth(B);B[B.length]="
    ";B[B.length]='
    ';this.renderYear(B);B[B.length]="
    ";B[B.length]='
    ';this.renderButtons(B);B[B.length]="
    ";B[B.length]='
    ';return B;},renderMonth:function(D){var G=YAHOO.widget.CalendarNavigator,H=G.CLASSES;var I=this.id+G.MONTH_SUFFIX,F=this.__getCfg("monthFormat"),A=this.cal.cfg.getProperty((F==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),E=D;if(A&&A.length>0){E[E.length]='";E[E.length]='";}return E;},renderYear:function(B){var E=YAHOO.widget.CalendarNavigator,F=E.CLASSES;var G=this.id+E.YEAR_SUFFIX,A=E.YR_MAX_DIGITS,D=B;D[D.length]='";D[D.length]='';return D;},renderButtons:function(A){var D=YAHOO.widget.CalendarNavigator.CLASSES;var B=A;B[B.length]='';B[B.length]='";B[B.length]="";B[B.length]='';B[B.length]='";B[B.length]="";return B;},applyListeners:function(){var B=YAHOO.util.Event;function A(){if(this.validate()){this.setYear(this._getYearFromUI());}}function C(){this.setMonth(this._getMonthFromUI());}B.on(this.submitEl,"click",this.submit,this,true);B.on(this.cancelEl,"click",this.cancel,this,true);B.on(this.yearEl,"blur",A,this,true);B.on(this.monthEl,"change",C,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:function(){var A=YAHOO.util.Event;A.removeListener(this.submitEl,"click",this.submit);A.removeListener(this.cancelEl,"click",this.cancel);A.removeListener(this.yearEl,"blur");A.removeListener(this.monthEl,"change");if(this.__isIEQuirks){A.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListeners();},applyKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypress";D.on(this.yearEl,"keypress",this._handleEnterKey,this,true);D.on(this.yearEl,C,this._handleDirectionKeys,this,true);D.on(this.lastCtrl,B,this._handleTabKey,this,true);D.on(this.firstCtrl,B,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypress";D.removeListener(this.yearEl,"keypress",this._handleEnterKey);D.removeListener(this.yearEl,C,this._handleDirectionKeys);D.removeListener(this.lastCtrl,B,this._handleTabKey);D.removeListener(this.firstCtrl,B,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var B=this.cal;var A=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(A>0){var C=this;window.setTimeout(function(){C._update(B);},A);}else{this._update(B);}}},_update:function(B){var A=YAHOO.widget.DateMath.getDate(this.getYear()-B.cfg.getProperty("YEAR_OFFSET"),this.getMonth(),1);B.cfg.setProperty("pagedate",A);B.render();},cancel:function(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(A){if(this.errorEl){this.errorEl.innerHTML=A;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var A=this.submitEl,C=this.__getCfg("initialFocus");if(C&&C.toLowerCase){C=C.toLowerCase();if(C=="year"){A=this.yearEl;try{this.yearEl.select();}catch(B){}}else{if(C=="month"){A=this.monthEl;}}}if(A&&YAHOO.lang.isFunction(A.focus)){try{A.focus();}catch(D){}}},erase:function(){if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML="";}var B=this.navEl.parentNode;if(B){B.removeChild(this.navEl);}this.navEl=null;var A=this.maskEl.parentNode; -if(A){A.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(B,A){if(B){YAHOO.util.Dom.setStyle(B,"display",(A)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var B=YAHOO.widget.CalendarNavigator;var A=null;if(this.yearEl){var C=this.yearEl.value;C=C.replace(B.TRIM,"$1");if(B.YR_PATTERN.test(C)){A=parseInt(C,10);}}return A;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(B){var A=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(B)==A.ENTER){YAHOO.util.Event.preventDefault(B);this.submit();}},_handleDirectionKeys:function(H){var G=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY,D=YAHOO.widget.CalendarNavigator;var F=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(F)){var B=false;switch(G.getCharCode(H)){case A.UP:this.yearEl.value=F+D.YR_MINOR_INC;B=true;break;case A.DOWN:this.yearEl.value=Math.max(F-D.YR_MINOR_INC,0);B=true;break;case A.PAGE_UP:this.yearEl.value=F+D.YR_MAJOR_INC;B=true;break;case A.PAGE_DOWN:this.yearEl.value=Math.max(F-D.YR_MAJOR_INC,0);B=true;break;default:break;}if(B){G.preventDefault(H);try{this.yearEl.select();}catch(C){}}}},_handleTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(C.getCharCode(D)==A.TAB&&!D.shiftKey){try{C.preventDefault(D);this.firstCtrl.focus();}catch(B){}}},_handleShiftTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(D.shiftKey&&C.getCharCode(D)==A.TAB){try{C.preventDefault(D);this.lastCtrl.focus();}catch(B){}}},__getCfg:function(D,B){var C=YAHOO.widget.CalendarNavigator.DEFAULT_CONFIG;var A=this.cal.cfg.getProperty("navigator");if(B){return(A!==true&&A.strings&&A.strings[D])?A.strings[D]:C.strings[D];}else{return(A!==true&&A[D])?A[D]:C[D];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.8.0r4",build:"2449"});// End of File include/javascript/yui/build/calendar/calendar-min.js - /********************************************************************************* * SugarCRM is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. diff --git a/include/javascript/swfobject.js b/include/javascript/swfobject.js index 7b4cb00e..45909016 100644 --- a/include/javascript/swfobject.js +++ b/include/javascript/swfobject.js @@ -41,5 +41,5 @@ if(!document.getElementById&&document.all){document.getElementById=function(id){ var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function loadChartSWF(chartName,xmlFile,width,height,stylesheet,colorscheme,langFile){if(!document.getElementById(chartName+'_div')){return;} if(width=='100%'){width=document.getElementById(chartName+'_div').clientWidth;} else{width=width.replace(/px/,'');} -height=height.replace(/px/,'');var home=new SWFObject("include/SugarCharts/SugarFlash/swf/chart.swf",chartName,"100%","100%","7");home.addParam("wmode","transparent");home.addParam("menu","false");home.addParam("quality","high");home.addVariable("inputFile",xmlFile) -home.addVariable("swfLocation","include/SugarCharts/SugarFlash/swf/");home.addVariable("inputColorScheme",colorscheme);home.addVariable("inputStyleSheet",stylesheet);home.addVariable("inputLanguage",langFile);home.addVariable("myWidth",width);home.addVariable("myHeight",height);home.write(chartName+'_div');} \ No newline at end of file +height=height.replace(/px/,'');var home=new SWFObject("include/SugarCharts/swf/chart.swf",chartName,"100%","100%","7");home.addParam("wmode","transparent");home.addParam("menu","false");home.addParam("quality","high");home.addVariable("inputFile",xmlFile) +home.addVariable("swfLocation","include/SugarCharts/swf/");home.addVariable("inputColorScheme",colorscheme);home.addVariable("inputStyleSheet",stylesheet);home.addVariable("inputLanguage",langFile);home.addVariable("myWidth",width);home.addVariable("myHeight",height);home.write(chartName+'_div');} \ No newline at end of file diff --git a/include/javascript/yui/build/calendar/assets/calendar.css b/include/javascript/yui/build/calendar/assets/calendar.css index fcc7c40e..1faa711f 100644 --- a/include/javascript/yui/build/calendar/assets/calendar.css +++ b/include/javascript/yui/build/calendar/assets/calendar.css @@ -98,7 +98,7 @@ version: 2.8.0r4 height:12px; left:2px; z-index:1; - background: url("../../../../include/javascript/yui/build/assets/skins/sam/sprite.png") repeat scroll 0 -450px transparent; + background: url("callt.gif") no-repeat; } .yui-calendar .calnavright { @@ -112,7 +112,7 @@ version: 2.8.0r4 height:12px; right:2px; z-index:1; - background: url("../../../../include/javascript/yui/build/assets/skins/sam/sprite.png") repeat scroll 0 -500px transparent; + background: url("calrt.gif") no-repeat; } .yui-calendar td.calcell { @@ -211,6 +211,7 @@ version: 2.8.0r4 _position:relative; padding-left:2px; padding-right:2px; + text-decoration:none; color:#000; } diff --git a/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css b/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css index 3f55eca9..f659c326 100644 --- a/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css +++ b/include/javascript/yui/build/calendar/assets/skins/sam/calendar-skin.css @@ -247,7 +247,6 @@ version: 2.8.0r4 text-decoration:none; color:#000; zoom:1; - background: url("../../../../include/javascript/yui/build/assets/skins/sam/sprite.png") repeat scroll 0 -500px transparent; } .yui-skin-sam .yui-calendar a.calnav:hover { diff --git a/include/json_config.php b/include/json_config.php index 2de77169..d21442a3 100644 --- a/include/json_config.php +++ b/include/json_config.php @@ -49,7 +49,7 @@ $json = getJSONobj(); class json_config { var $global_registry_var_name = 'GLOBAL_REGISTRY'; - + function get_static_json_server($configOnly = true, $getStrings = false, $module = null, $record = null, $scheduler = false) { global $current_user; $str = ''; @@ -60,23 +60,23 @@ class json_config { } $str .= $this->getUserConfigJSON(); - return $str; + return $str; } - + function getAppMetaJSON($scheduler = false) { - + global $json, $sugar_config; - + $str = "\nvar ". $this->global_registry_var_name." = new Object();\n"; $str .= "\n".$this->global_registry_var_name.".config = {\"site_url\":\"".getJavascriptSiteURL()."\"};\n"; - + $str .= $this->global_registry_var_name.".meta = new Object();\n"; $str .= $this->global_registry_var_name.".meta.modules = new Object();\n"; - + /* $modules_arr = array('Meetings','Calls'); $meta_modules = array(); - + global $beanFiles,$beanList; //header('Content-type: text/xml'); foreach($modules_arr as $module) { @@ -85,13 +85,13 @@ class json_config { $meta_modules[$module] = array(); $meta_modules[$module]['field_defs'] = $focus->field_defs; } - + $str .= $this->global_registry_var_name.".meta.modules.Meetings = ". $json->encode($meta_modules['Meetings'])."\n"; $str .= $this->global_registry_var_name.".meta.modules.Calls = ". $json->encode($meta_modules['Calls'])."\n"; */ return $str; } - + function getUserConfigJSON() { global $timedate; global $current_user, $sugar_config; @@ -112,12 +112,16 @@ class json_config { $user_arr['fields']['last_name'] = $current_user->last_name; $user_arr['fields']['full_name'] = $current_user->full_name; $user_arr['fields']['email'] = $current_user->email1; - $user_arr['fields']['gmt_offset'] = $timedate->getUserUTCOffset(); + $userTz = $timedate->getUserTimeZone(); + $dstRange = $timedate->getDSTRange(date('Y'), $userTz); + $user_arr['fields']['dst_start'] = $dstRange['start']; + $user_arr['fields']['dst_end'] = $dstRange['end']; + $user_arr['fields']['gmt_offset'] = $userTz['gmtOffset']; $user_arr['fields']['date_time_format'] = $current_user->getUserDateTimePreferences(); $str = "\n".$this->global_registry_var_name.".current_user = ".$json->encode($user_arr).";\n"; return $str; } - + function getFocusData($module, $record) { global $json; if (empty($module)) { @@ -126,45 +130,45 @@ class json_config { else if(empty($record)) { return "\n".$this->global_registry_var_name.'["focus"] = {"module":"'.$module.'",users_arr:[],fields:{"id":"-1"}}'."\n"; } - + $module_arr = $this->meeting_retrieve($module, $record); return "\n".$this->global_registry_var_name."['focus'] = ". $json->encode($module_arr).";\n"; } - + function meeting_retrieve($module, $record) { global $json, $response; global $beanFiles, $beanList; require_once($beanFiles[$beanList[$module]]); $focus = new $beanList[$module]; - + if(empty($module) || empty($record)) { return ''; } - + $focus->retrieve($record); $module_arr = $this->populateBean($focus); - + if($module == 'Meetings') { $users = $focus->get_meeting_users(); - } + } else if ( $module == 'Calls') { $users = $focus->get_call_users(); } $module_arr['users_arr'] = array(); - + foreach($users as $user) { array_push($module_arr['users_arr'], $this->populateBean($user)); } - + $module_arr['orig_users_arr_hash'] = array(); - + foreach($users as $user) { $module_arr['orig_users_arr_hash'][$user->id] = '1'; } - + $module_arr['contacts_arr'] = array(); - + $focus->load_relationships('contacts'); $contacts=$focus->get_linked_beans('contacts','Contact'); foreach($contacts as $contact) { @@ -176,15 +180,15 @@ class json_config { foreach($leads as $lead) { array_push($module_arr['users_arr'], $this->populateBean($lead)); } - + return $module_arr; } - + function getStringsJSON($module) { global $current_language; $currentModule = 'Calendar'; $mod_list_strings = return_mod_list_strings_language($current_language,$currentModule); - + global $json; $str = "\n".$this->global_registry_var_name."['calendar_strings'] = {\"dom_cal_month_long\":". $json->encode($mod_list_strings['dom_cal_month_long']).",\"dom_cal_weekdays_long\":". $json->encode($mod_list_strings['dom_cal_weekdays_long'])."}\n"; if(empty($module)) { @@ -194,23 +198,23 @@ class json_config { $mod_strings = return_module_language($current_language,$currentModule); return $str . "\n".$this->global_registry_var_name."['meeting_strings'] = ". $json->encode($mod_strings)."\n"; } - + // HAS MEETING SPECIFIC CODE: function populateBean(&$focus) { require_once('include/utils/db_utils.php'); - $all_fields = $focus->column_fields; + $all_fields = $focus->list_fields; // MEETING SPECIFIC $all_fields = array_merge($all_fields,array('required','accept_status','name')); // need name field for contacts and users //$all_fields = array_merge($focus->column_fields,$focus->additional_column_fields); - + $module_arr = array(); - + $module_arr['module'] = $focus->object_name; - + $module_arr['fields'] = array(); - + foreach($all_fields as $field) { - if(isset($focus->$field) && !is_object($focus->$field)) { + if(isset($focus->$field)) { $focus->$field = from_html($focus->$field); $focus->$field = preg_replace("/\r\n/","
    ",$focus->$field); $focus->$field = preg_replace("/\n/","
    ",$focus->$field); diff --git a/include/language/en_us.lang.php b/include/language/en_us.lang.php index 9505835e..587b505d 100644 --- a/include/language/en_us.lang.php +++ b/include/language/en_us.lang.php @@ -51,6 +51,7 @@ $app_list_strings = array ( 'moduleList' => array ( 'Home' => 'Home', + 'Dashboard' => 'Dashboard', 'Contacts' => 'Contacts', 'Accounts' => 'Accounts', 'Opportunities' => 'Opportunities', @@ -76,7 +77,6 @@ $app_list_strings = array ( 'Campaigns'=>'Campaigns', 'CampaignLog'=>'Campaign Log', 'Documents'=>'Documents', - 'DocumentRevisions'=>'Document Revisions', 'Connectors'=>'Connectors', 'Roles'=>'Roles', 'Notifications'=>'Notifications', @@ -341,15 +341,6 @@ $app_list_strings = array ( 'Held' => 'Held', 'Not Held' => 'Not Held', ), - 'extapi_meeting_password' => - array ( - 'WebEx' => 'WebEx', - ), - 'meeting_type_dom' => - array ( - 'Other' => 'Other', - 'SugarCRM' => 'SugarCRM', - ), 'call_status_default' => 'Planned', 'call_status_dom' => array ( @@ -668,6 +659,32 @@ $app_list_strings = array ( array ( 'SMTP' => 'SMTP', ), + 'dom_timezones' => array('-12'=>'(GMT - 12) International Date Line West', + '-11'=>'(GMT - 11) Midway Island, Samoa', + '-10'=>'(GMT - 10) Hawaii', + '-9'=>'(GMT - 9) Alaska', + '-8'=>'(GMT - 8) San Francisco', + '-7'=>'(GMT - 7) Phoenix', + '-6'=>'(GMT - 6) Saskatchewan', + '-5'=>'(GMT - 5) New York', + '-4'=>'(GMT - 4) Santiago', + '-3'=>'(GMT - 3) Buenos Aires', + '-2'=>'(GMT - 2) Mid-Atlantic', + '-1'=>'(GMT - 1) Azores', + '0'=>'(GMT)', + '1'=>'(GMT + 1) Madrid', + '2'=>'(GMT + 2) Athens', + '3'=>'(GMT + 3) Moscow', + '4'=>'(GMT + 4) Kabul', + '5'=>'(GMT + 5) Ekaterinburg', + '6'=>'(GMT + 6) Astana', + '7'=>'(GMT + 7) Bangkok', + '8'=>'(GMT + 8) Perth', + '9'=>'(GMT + 9) Seol', + '10'=>'(GMT + 10) Brisbane', + '11'=>'(GMT + 11) Solomone Is.', + '12'=>'(GMT + 12) Auckland', + ), 'dom_cal_month_long'=>array( '0'=>"", '1'=>"January", @@ -994,52 +1011,6 @@ $app_list_strings = array ( '_blank' => 'New Window', '_self' => 'Same Window', ), - 'dashlet_auto_refresh_options' => - array ( - '-1' => 'Do not auto-refresh', - '30' => 'Every 30 seconds', - '60' => 'Every 1 minute', - '180' => 'Every 3 minutes', - '300' => 'Every 5 minutes', - '600' => 'Every 10 minutes', - ), - 'dashlet_auto_refresh_options_admin' => - array ( - '-1' => 'Never', - '30' => 'Every 30 seconds', - '60' => 'Every 1 minute', - '180' => 'Every 3 minutes', - '300' => 'Every 5 minutes', - '600' => 'Every 10 minutes', - ), - 'date_range_search_dom' => - array( - '=' => 'Equals', - 'not_equal' => 'Not On', - 'greater_than' => 'After', - 'less_than' => 'Before', - 'last_7_days' => 'Last 7 Days', - 'next_7_days' => 'Next 7 Days', - 'last_30_days' => 'Last 30 Days', - 'next_30_days' => 'Next 30 Days', - 'last_month' => 'Last Month', - 'this_month' => 'This Month', - 'next_month' => 'Next Month', - 'last_year' => 'Last Year', - 'this_year' => 'This Year', - 'next_year' => 'Next Year', - 'between' => 'Is Between', - ), - 'numeric_range_search_dom' => - array( - '=' => 'Equals', - 'not_equal' => 'Does Not Equal', - 'greater_than' => 'Greater Than', - 'greater_than_equals' => 'Greater Than Or Equal To', - 'less_than' => 'Less Than', - 'less_than_equals' => 'Less Than Or Equal To', - 'between' => 'Is Between', - ), ); $app_strings = array ( @@ -1100,7 +1071,8 @@ $app_strings = array ( 'LBL_ROUTING_TO' => 'to', 'LBL_ROUTING_TO_ADDRESS' => 'to address', 'LBL_ROUTING_WITH_TEMPLATE' => 'with template', - 'NTC_OVERWRITE_ADDRESS_PHONE_CONFIRM' => 'This record currently contains values in the Office Phone and Address fields. To overwrite these values with the following Office Phone and Address of the Account that you selected, click "OK". To keep the current values, click "Cancel".', + + 'NTC_OVERWRITE_ADDRESS_PHONE_CONFIRM' => 'You currently have values in your form for the Phone and Address fields. To overwrite these values with the phone/address of the Acccount that you selected, click "OK". To keep the current values, click "Cancel".', 'LBL_DROP_HERE' => '[Drop Here]', 'LBL_EMAIL_ACCOUNTS_EDIT' => 'Edit', 'LBL_EMAIL_ACCOUNTS_GMAIL_DEFAULTS' => 'Prefill Gmail™ Defaults', @@ -1335,7 +1307,6 @@ $app_strings = array ( 'LBL_EMAIL_OPTIONS' => 'Options', 'LBL_EMAIL_QUICK_COMPOSE' => 'Quick Compose', 'LBL_EMAIL_OPT_OUT' => 'Opted Out', - 'LBL_EMAIL_OPT_OUT_AND_INVALID' => 'Opted Out and Invalid', 'LBL_EMAIL_PAGE_AFTER' => 'of {0}', 'LBL_EMAIL_PAGE_BEFORE' => 'Page', 'LBL_EMAIL_PERFORMING_TASK' => 'Performing Task', @@ -1491,7 +1462,6 @@ $app_strings = array ( 'LBL_CLOSE_ACTIVITY_HEADER' => "Confirm", 'LBL_CLOSE_ACTIVITY_CONFIRM' => "Do you want to close this #module#?", 'LBL_CLOSE_ACTIVITY_REMEMBER' => "Do not display this message in the future:  ", - 'LBL_INVALID_FILE_EXTENSION' => 'Invalid File Extension', 'ERR_CREATING_FIELDS' => 'Error filling in additional detail fields: ', @@ -1529,11 +1499,8 @@ $app_strings = array ( 'ERR_ADDRESS_KEY_NOT_SPECIFIED' => 'Please specify \'key\' index in displayParams attribute for the Meta-Data definition', 'ERR_EXISTING_PORTAL_USERNAME'=>'Error: The Portal Name is already assigned to another contact.', 'ERR_COMPATIBLE_PRECISION_VALUE' => 'Field value is not compatible with precision value', - 'ERR_EXTERNAL_API_SAVE_FAIL' => 'An error occurred when trying to save to the external account.', - 'ERR_EXTERNAL_API_UPLOAD_FAIL' => 'An error occurred while uploading. Please ensure the file you are uploading is not empty.', 'ERR_NO_DB' => 'Could not connect to the database. Please refer to sugarcrm.log for details.', 'ERR_DB_FAIL' => 'Database failure. Please refer to sugarcrm.log for details.', - 'ERR_EXTERNAL_API_403' => 'Permission Denied. File type is not supported.', 'LBL_ACCOUNT'=>'Account', 'LBL_OLD_ACCOUNT_LINK'=>'Old Account', @@ -1593,7 +1560,6 @@ $app_strings = array ( 'LBL_CLOSE_AND_CREATE_BUTTON_LABEL' => 'Close and Create New', 'LBL_CLOSE_AND_CREATE_BUTTON_TITLE' => 'Close and Create New', 'LBL_CLOSE_AND_CREATE_BUTTON_KEY' => 'C', - 'LBL_OPEN_ITEMS' => 'Open Items:', 'LBL_COMPOSE_EMAIL_BUTTON_KEY' => 'L', 'LBL_COMPOSE_EMAIL_BUTTON_LABEL' => 'Compose Email', 'LBL_COMPOSE_EMAIL_BUTTON_TITLE' => 'Compose Email [Alt+L]', @@ -1787,7 +1753,6 @@ $app_strings = array ( 'LBL_SEARCH_BUTTON_LABEL' => 'Search', 'LBL_SEARCH_BUTTON_TITLE' => 'Search [Alt+Q]', 'LBL_SEARCH' => 'Search', - 'LBL_SEARCH_MORE' => 'more', 'LBL_SEE_ALL' => 'See All', 'LBL_UPLOAD_IMAGE_FILE_INVALID' => 'Invalid file format, only image file can be uploaded.', 'LBL_SELECT_BUTTON_KEY' => 'T', @@ -1887,7 +1852,6 @@ $app_strings = array ( 'LNK_GET_LATEST'=>'Get latest', 'LNK_GET_LATEST_TOOLTIP'=>'Replace with latest version', 'LNK_HELP' => 'Help', - 'LNK_CREATE' => 'Create', 'LNK_LIST_END' => 'End', 'LNK_LIST_NEXT' => 'Next', 'LNK_LIST_PREVIOUS' => 'Previous', @@ -1896,7 +1860,6 @@ $app_strings = array ( 'LNK_LOAD_SIGNED'=>'Sign', 'LNK_LOAD_SIGNED_TOOLTIP'=>'Replace with signed document', 'LNK_PRINT' => 'Print', - 'LNK_BACKTOTOP' => 'Back to top', 'LNK_REMOVE' => 'rem', 'LNK_RESUME' => 'Resume', 'LNK_VIEW_CHANGE_LOG' => 'View Change Log', @@ -1906,16 +1869,15 @@ $app_strings = array ( 'NTC_DATE_FORMAT' => '(yyyy-mm-dd)', 'NTC_DATE_TIME_FORMAT' => '(yyyy-mm-dd 24:00)', 'NTC_DELETE_CONFIRMATION_MULTIPLE' => 'Are you sure you want to delete selected record(s)?', - 'NTC_TEMPLATE_IS_USED' => 'The template is used in at least one email marketing record or system settings. Are you sure you want to delete it?', - 'NTC_TEMPLATES_IS_USED' => "The following templates are used in email marketing records or system settings. Are you sure you want to delete them?\n", - + 'NTC_TEMPLATE_IS_USED' => 'The template is used in at least one email marketing record. Are you sure you want to delete it?', + 'NTC_TEMPLATES_IS_USED' => "The following templates are used in email marketing records. Are you sure you want to delete them?\n", 'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?', 'NTC_DELETE_CONFIRMATION_NUM' => 'Are you sure you want to delete the ', 'NTC_UPDATE_CONFIRMATION_NUM' => 'Are you sure you want to update the ', 'NTC_DELETE_SELECTED_RECORDS' =>' selected record(s)?', 'NTC_LOGIN_MESSAGE' => 'Please enter your user name and password.', 'NTC_NO_ITEMS_DISPLAY' => 'none', - 'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this relationship? Only the relationship will be removed. The record will not be deleted.', + 'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this relationship?', 'NTC_REQUIRED' => 'Indicates required field', 'NTC_SUPPORT_SUGARCRM' => 'Support the SugarCRM open source project with a donation through PayPal - it\'s fast, free and secure!', 'NTC_TIME_FORMAT' => '(24:00)', @@ -1970,8 +1932,10 @@ $app_strings = array ( 'MSG_JS_ALERT_MTG_REMINDER_TIME' => 'Time: ', 'MSG_JS_ALERT_MTG_REMINDER_LOC' => 'Location: ', 'MSG_JS_ALERT_MTG_REMINDER_DESC' => 'Description: ', - 'MSG_JS_ALERT_MTG_REMINDER_CALL_MSG' => "\nClick OK to view this call or click Cancel to dismiss this message.", - 'MSG_JS_ALERT_MTG_REMINDER_MEETING_MSG' => "\nClick OK to view this meeting or click Cancel to dismiss this message.", + 'MSG_JS_ALERT_MTG_REMINDER_MSG' => "\nClick OK to view this meeting or click Cancel to dismiss this message.", + 'ERROR_USER_PREFS' => "WARNING: Not all of your data could be saved because your data limit has been reached.", + 'ERROR_USER_PREFS_DASH' => "WARNING: The Sugar dashlet could not be added because your data limit has been reached.", + 'ERROR_USER_PREFS_TAB' => "WARNING: The Home Page could not be added because your data limit has been reached.", // contextMenu strings 'LBL_ADD_TO_FAVORITES' => 'Add to My Favorites', 'LBL_MARK_AS_FAVORITES' => 'Mark as Favorite', @@ -2138,9 +2102,8 @@ $app_strings = array ( 'LBL_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.', //cma - 'LBL_MASSUPDATE_DELETE_GLOBAL_TEAM'=> 'The Global team cannot be deleted.', - 'LBL_MASSUPDATE_DELETE_USER_EXISTS'=>'This private team [{0}] cannot be deleted until the user [{1}] is deleted.', - + 'LBL_MASSUPDATE_DELETE_GLOBAL_TEAM'=> 'Sorry, you cannot delete the global team. Aborting', + 'LBL_MASSUPDATE_DELETE_PRIVATE_TEAMS'=>'Sorry, you cannot delete private team(s). Aborting', //martin #25548 'LBL_NO_FLASH_PLAYER' => 'You either have Abobe Flash turned off or are using an older version of the Adobe Flash Player. To get the latest version of the Flash Player, click here.', //Collection Field @@ -2175,41 +2138,6 @@ $app_strings = array ( 'LBL_MINUTES' => 'Minutes', 'LBL_MERIDIEM' => 'Meridiem', 'LBL_DATE' => 'Date', - 'LBL_DASHLET_CONFIGURE_AUTOREFRESH' => 'Auto-Refresh', - - //Calendar widget labels - 'LBL_CHOOSE_MONTH' => 'Choose Month', - 'LBL_ENTER_YEAR' => 'Enter Year', - 'LBL_ENTER_VALID_YEAR' => 'Please enter a valid year', - - //SugarFieldPhone labels - 'LBL_INVALID_USA_PHONE_FORMAT' => 'Please enter a numeric U.S. phone number, including area code.', - - //File write error label - 'ERR_FILE_WRITE' => 'Error: Could not write file {0}. Please check system and web server permissions.', - 'ERR_FILE_NOT_FOUND' => 'Error: Could not load file {0}. Please check system and web server permissions.', - - 'LBL_AND' => 'And', - 'LBL_BEFORE' => 'Before', - - // File fields - 'LBL_UPLOAD_FROM_COMPUTER' => 'Upload From Your Computer', - 'LBL_SEARCH_EXTERNAL_API' => 'File on External Source', - 'LBL_EXTERNAL_SECURITY_LEVEL' => 'Security', - 'LBL_SHARE_PRIVATE' => 'Private', - 'LBL_SHARE_COMPANY' => 'Company', - 'LBL_SHARE_LINKABLE' => 'Linkable', - 'LBL_SHARE_PUBLIC' => 'Public', - - - // Web Services REST RSS - 'LBL_RSS_FEED' => 'RSS Feed', - 'LBL_RSS_RECORDS_FOUND' => 'record(s) found', - 'ERR_RSS_INVALID_INPUT' => 'RSS is not a valid input_type', - 'ERR_RSS_INVALID_RESPONSE' => 'RSS is not a valid response_type for this method', - - //External API Error Messages - 'ERR_GOOGLE_API_415' => 'Google Docs does not support the file format you provided.' ); $app_list_strings['moduleList']['Library'] = 'Library'; @@ -2942,18 +2870,5 @@ $app_list_strings['kbdocument_status_dom'] = array ( ); $app_list_strings['moduleList']['Sugar_Favorites'] = 'Favorites'; - $app_list_strings['eapm_list']= array( - 'Sugar'=>'Sugar', - 'WebEx'=>'WebEx', - 'GoToMeeting'=>'GoToMeeting', - 'LotusLive'=>'LotusLive', - 'Google' => 'Google Docs', - 'Box' => 'Box.net', - 'Facebook'=>'Facebook', - 'Twitter'=>'Twitter', - ); - $app_list_strings['LBL_API_TYPE_ENUM'] = array( - 'password' => 'Username/Password', - 'oauth' => 'OAuth', - ); - ?> + +?> diff --git a/include/language/en_us.notify_template.html b/include/language/en_us.notify_template.html index fb1169b7..775129bf 100644 --- a/include/language/en_us.notify_template.html +++ b/include/language/en_us.notify_template.html @@ -115,9 +115,6 @@ Subject: {MEETING_SUBJECT} Status: {MEETING_STATUS} Start Date: {MEETING_STARTDATE} Duration: {MEETING_HOURS}h, {MEETING_MINUTES}m - -Meeting URL: {MEETING_URL} - Description: {MEETING_DESCRIPTION} Accept this meeting: diff --git a/include/modules.php b/include/modules.php index 0b768121..c15427df 100644 --- a/include/modules.php +++ b/include/modules.php @@ -44,11 +44,8 @@ $moduleList = array(); // this list defines the modules shown in the top tab list of the app //the order of this list is the default order displayed - do not change the order unless it is on purpose $moduleList[] = 'Home'; -$moduleList[] = 'Calendar'; -$moduleList[] = 'Calls'; -$moduleList[] = 'Meetings'; -$moduleList[] = 'Tasks'; -$moduleList[] = 'Notes'; + +$moduleList[] = 'Activities'; $moduleList[] = 'Leads'; $moduleList[] = 'Contacts'; $moduleList[] = 'Accounts'; @@ -56,8 +53,6 @@ $moduleList[] = 'Opportunities'; $moduleList[] = 'Emails'; $moduleList[] = 'Campaigns'; -$moduleList[] = 'Prospects'; -$moduleList[] = 'ProspectLists'; $moduleList[] = 'Documents'; $moduleList[] = 'Cases'; @@ -208,7 +203,7 @@ $beanFiles['EmailAddress'] = 'modules/EmailAddresses/EmailAddress.php'; -// TODO: Remove the Library module, it is an example. +// TODO: Remove the Library module, it is an example. //$moduleList[] = 'Library'; //$beanList['Library']= 'Library'; //$beanFiles['Library'] = 'modules/Library/Library.php'; @@ -223,7 +218,7 @@ $modInvisList = array('Administration', 'Currencies', 'CustomFields', 'Connector 'Releases','Sync', 'Users', 'Versions', 'LabelEditor','Roles','EmailMarketing' ,'OptimisticLock', 'TeamMemberships', 'TeamSets', 'TeamSetModule', 'Audit', 'MailMerge', 'MergeRecords', 'EmailAddresses', - 'Schedulers','Schedulers_jobs', /*'Queues',*/ 'EmailTemplates', + 'Schedulers','Schedulers_jobs', /*'Queues',*/ 'EmailTemplates', 'CampaignTrackers', 'CampaignLog', 'EmailMan', 'Prospects', 'ProspectLists', 'Groups','InboundEmail', 'ACLActions', 'ACLRoles', @@ -248,6 +243,10 @@ $adminOnlyList = array( ); +$modInvisListActivities = array('Calls', 'Meetings','Notes','Tasks','Calendar'); + + + $modInvisList[] = 'ACL'; $modInvisList[] = 'ACLRoles'; $modInvisList[] = 'Configurator'; @@ -262,6 +261,7 @@ $beanList['SugarFeed'] = 'SugarFeed'; $beanFiles['SugarFeed'] = 'modules/SugarFeed/SugarFeed.php'; $modInvisList[] = 'SugarFeed'; + // This is the mapping for modules that appear under a different module's tab // Be sure to also add the modules to $modInvisList, otherwise their tab will still appear $GLOBALS['moduleTabMap'] = array( @@ -274,13 +274,10 @@ $GLOBALS['moduleTabMap'] = array( 'SugarFeed' => 'Administration', 'DocumentRevisions' => 'Documents', 'EmailTemplates' => 'Emails', - 'EmailMarketing' => 'Campaigns', - ); -$beanList['EAPM'] = 'EAPM'; -$beanFiles['EAPM'] = 'modules/EAPM/EAPM.php'; -$modules_exempt_from_availability_check['EAPM'] = 'EAPM'; -$modInvisList[] = 'EAPM'; - + 'ProspectLists' => 'Campaigns', + 'Prospects' => 'Campaigns', + 'EmailMarketing' => 'Campaigns', +); if (file_exists('include/modules_override.php')) { diff --git a/include/nusoap/class.wsdl.php b/include/nusoap/class.wsdl.php index a8831913..e1888194 100644 --- a/include/nusoap/class.wsdl.php +++ b/include/nusoap/class.wsdl.php @@ -56,15 +56,15 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); /** * parses a WSDL file, allows access to it's data, other utility methods. * also builds WSDL structures programmatically. -* +* * @author Dietrich Ayala * @author Scott Nichol -* @access public +* @access public */ class wsdl extends nusoap_base { // URL or filename of the root of this WSDL - var $wsdl; + var $wsdl; // define internal arrays of bindings, ports, operations, messages, etc. var $schemas = array(); var $currentSchema; @@ -82,9 +82,9 @@ class wsdl extends nusoap_base { var $opData = array(); var $status = ''; var $documentation = false; - var $endpoint = ''; + var $endpoint = ''; // array of wsdl docs to import - var $import = array(); + var $import = array(); // parser vars var $parser; var $position = 0; @@ -107,7 +107,7 @@ class wsdl extends nusoap_base { /** * constructor - * + * * @param string $wsdl WSDL document URL * @param string $proxyhost * @param string $proxyport @@ -117,7 +117,7 @@ class wsdl extends nusoap_base { * @param integer $response_timeout set the response timeout * @param array $curl_options user-specified cURL options * @param boolean $use_curl try to use cURL - * @access public + * @access public */ function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ parent::nusoap_base(); @@ -177,7 +177,7 @@ class wsdl extends nusoap_base { } } } - } + } } } // WSDL imports @@ -203,18 +203,18 @@ class wsdl extends nusoap_base { } } } - } + } } // add new data to operation data foreach($this->bindings as $binding => $bindingData) { if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { foreach($bindingData['operations'] as $operation => $data) { $this->debug('post-parse data gathering for ' . $operation); - $this->bindings[$binding]['operations'][$operation]['input'] = - isset($this->bindings[$binding]['operations'][$operation]['input']) ? + $this->bindings[$binding]['operations'][$operation]['input'] = + isset($this->bindings[$binding]['operations'][$operation]['input']) ? array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : $this->portTypes[ $bindingData['portType'] ][$operation]['input']; - $this->bindings[$binding]['operations'][$operation]['output'] = + $this->bindings[$binding]['operations'][$operation]['output'] = isset($this->bindings[$binding]['operations'][$operation]['output']) ? array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : $this->portTypes[ $bindingData['portType'] ][$operation]['output']; @@ -231,16 +231,16 @@ class wsdl extends nusoap_base { $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; - } - } + } + } } } /** * parses the wsdl document - * + * * @param string $wsdl path or URL - * @access private + * @access private */ function parseWSDL($wsdl = '') { $this->debug("parse WSDL at path=$wsdl"); @@ -250,7 +250,7 @@ class wsdl extends nusoap_base { $this->setError('no wsdl passed to parseWSDL()!!'); return false; } - + // parse $wsdl for url format $wsdl_props = parse_url($wsdl); @@ -289,23 +289,28 @@ class wsdl extends nusoap_base { $path = $wsdl; } $this->debug('getting WSDL file ' . $path); - $wsdl_string = @file_get_contents($path); - if ($wsdl_string === false) { + if ($fp = @fopen($path, 'r')) { + $wsdl_string = ''; + while ($data = fread($fp, 32768)) { + $wsdl_string .= $data; + } + fclose($fp); + } else { $errstr = "Bad path to WSDL file $path"; $this->debug($errstr); $this->setError($errstr); return false; - } + } } $this->debug('Parse WSDL'); // end new code added // Create an XML parser. - $this->parser = xml_parser_create(); + $this->parser = xml_parser_create(); // Set the options for parsing the XML data. // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // Set the object for the parser. - xml_set_object($this->parser, $this); + xml_set_object($this->parser, $this); // Set the element handlers for the parser. xml_set_element_handler($this->parser, 'start_element', 'end_element'); xml_set_character_data_handler($this->parser, 'character_data'); @@ -322,7 +327,7 @@ class wsdl extends nusoap_base { $this->debug("XML payload:\n" . $wsdl_string); $this->setError($errstr); return false; - } + } // free the parser xml_parser_free($this->parser); $this->debug('Parsing WSDL done'); @@ -331,15 +336,15 @@ class wsdl extends nusoap_base { return false; } return true; - } + } /** * start-element handler - * + * * @param string $parser XML parser object * @param string $name element name * @param string $attrs associative array of attributes - * @access private + * @access private */ function start_element($parser, $name, $attrs) { @@ -358,10 +363,10 @@ class wsdl extends nusoap_base { } else { // position in the total number of elements, starting from 0 $pos = $this->position++; - $depth = $this->depth++; + $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; - $this->message[$pos] = array('cdata' => ''); + $this->message[$pos] = array('cdata' => ''); // process attributes if (count($attrs) > 0) { // register namespace declarations @@ -371,11 +376,11 @@ class wsdl extends nusoap_base { $this->namespaces[$ns_prefix] = $v; } else { $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; - } + } if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { $this->XMLSchemaVersion = $v; $this->namespaces['xsi'] = $v . '-instance'; - } + } } } // expand each attribute prefix to its namespace @@ -383,22 +388,22 @@ class wsdl extends nusoap_base { $k = strpos($k, ':') ? $this->expandQname($k) : $k; if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { $v = strpos($v, ':') ? $this->expandQname($v) : $v; - } + } $eAttrs[$k] = $v; - } + } $attrs = $eAttrs; } else { $attrs = array(); - } + } // get element prefix, namespace and name if (preg_match('/:/', $name)) { // get ns prefix - $prefix = substr($name, 0, strpos($name, ':')); + $prefix = substr($name, 0, strpos($name, ':')); // get ns - $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; // get unqualified name $name = substr(strstr($name, ':'), 1); - } + } // process attributes, expanding any prefixes to namespaces // find status, register data switch ($this->status) { @@ -407,12 +412,12 @@ class wsdl extends nusoap_base { if (isset($attrs['type'])) { $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; - } + } if (isset($attrs['element'])) { $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; - } - } + } + } break; case 'portType': switch ($name) { @@ -421,25 +426,25 @@ class wsdl extends nusoap_base { $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); if (isset($attrs['parameterOrder'])) { $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; - } + } break; case 'documentation': $this->documentation = true; - break; + break; // merge input/output data default: $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; break; - } + } break; case 'binding': switch ($name) { - case 'binding': + case 'binding': // get ns prefix if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['prefix'] = $prefix; - } + } $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); break; case 'header': @@ -448,17 +453,17 @@ class wsdl extends nusoap_base { case 'operation': if (isset($attrs['soapAction'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; - } + } if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; - } + } if (isset($attrs['name'])) { $this->currentOperation = $attrs['name']; $this->debug("current binding operation: $this->currentOperation"); $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; - } + } break; case 'input': $this->opStatus = 'input'; @@ -471,9 +476,9 @@ class wsdl extends nusoap_base { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); } else { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; - } + } break; - } + } break; case 'service': switch ($name) { @@ -481,7 +486,7 @@ class wsdl extends nusoap_base { $this->currentPort = $attrs['name']; $this->debug('current port: ' . $this->currentPort); $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); - + break; case 'address': $this->ports[$this->currentPort]['location'] = $attrs['location']; @@ -489,9 +494,9 @@ class wsdl extends nusoap_base { $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; break; - } + } break; - } + } // set status switch ($name) { case 'import': @@ -527,11 +532,11 @@ class wsdl extends nusoap_base { $this->currentBinding = $this->getLocalPart($attrs['name']); } else { $this->currentBinding = $attrs['name']; - } + } $this->status = 'binding'; $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); - } + } break; case 'service': $this->serviceName = $attrs['name']; @@ -541,20 +546,20 @@ class wsdl extends nusoap_base { case 'definitions': foreach ($attrs as $name => $value) { $this->wsdl_info[$name] = $value; - } + } break; - } - } - } + } + } + } /** * end-element handler - * + * * @param string $parser XML parser object * @param string $name element name - * @access private + * @access private */ - function end_element($parser, $name){ + function end_element($parser, $name){ // unset schema status if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { $this->status = ""; @@ -562,38 +567,38 @@ class wsdl extends nusoap_base { $this->currentSchema->clearDebug(); $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; $this->debug('Parsing WSDL schema done'); - } + } if ($this->status == 'schema') { $this->currentSchema->schemaEndElement($parser, $name); } else { // bring depth down a notch $this->depth--; - } + } // end documentation if ($this->documentation) { //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; $this->documentation = false; - } - } + } + } /** * element content handler - * + * * @param string $parser XML parser object * @param string $data element content - * @access private + * @access private */ function character_data($parser, $data) { $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; if (isset($this->message[$pos]['cdata'])) { $this->message[$pos]['cdata'] .= $data; - } + } if ($this->documentation) { $this->documentation .= $data; - } - } + } + } /** * if authenticating, set user credentials here @@ -612,21 +617,21 @@ class wsdl extends nusoap_base { $this->authtype = $authtype; $this->certRequest = $certRequest; } - + function getBindingData($binding) { if (is_array($this->bindings[$binding])) { return $this->bindings[$binding]; - } + } } - + /** * returns an assoc array of operation names => operation data - * + * * @param string $portName WSDL port name * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported) - * @return array - * @access public + * @return array + * @access public */ function getOperations($portName = '', $bindingType = 'soap') { $ops = array(); @@ -658,15 +663,15 @@ class wsdl extends nusoap_base { $this->debug("getOperations found no operations for port '$portName' bindingType $bindingType"); } return $ops; - } - + } + /** * returns an associative array of data necessary for calling an operation - * + * * @param string $operation name of operation * @param string $bindingType type of binding eg: soap, soap12 - * @return array - * @access public + * @return array + * @access public */ function getOperationData($operation, $bindingType = 'soap') { @@ -686,19 +691,19 @@ class wsdl extends nusoap_base { if ($operation == $bOperation) { $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; return $opData; - } - } + } + } } - } + } } - + /** * returns an associative array of data necessary for calling an operation - * + * * @param string $soapAction soapAction for operation * @param string $bindingType type of binding eg: soap, soap12 - * @return array - * @access public + * @return array + * @access public */ function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { if ($bindingType == 'soap') { @@ -714,12 +719,12 @@ class wsdl extends nusoap_base { foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { if ($opData['soapAction'] == $soapAction) { return $opData; - } - } + } + } } - } + } } - + /** * returns an array of information about a given type * returns false if no type exists by the given name @@ -930,7 +935,7 @@ class wsdl extends nusoap_base { * * @param mixed $debug whether to put debug=1 in endpoint URL * @return string serialization of WSDL - * @access public + * @access public */ function serialize($debug = 0) { @@ -938,15 +943,15 @@ class wsdl extends nusoap_base { $xml .= "\nnamespaces as $k => $v) { $xml .= " xmlns:$k=\"$v\""; - } + } // 10.9.02 - add poulter fix for wsdl and tns declarations if (isset($this->namespaces['wsdl'])) { $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; - } + } if (isset($this->namespaces['tns'])) { $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; - } - $xml .= '>'; + } + $xml .= '>'; // imports if (sizeof($this->import) > 0) { foreach($this->import as $ns => $list) { @@ -957,8 +962,8 @@ class wsdl extends nusoap_base { $xml .= ''; } } - } - } + } + } // types if (count($this->schemas)>=1) { $xml .= "\n\n"; @@ -968,7 +973,7 @@ class wsdl extends nusoap_base { } } $xml .= ''; - } + } // messages if (count($this->messages) >= 1) { foreach($this->messages as $msgName => $msgParts) { @@ -985,11 +990,11 @@ class wsdl extends nusoap_base { foreach($this->typemap as $ns => $types) { if (isset($types[$partType])) { $typePrefix = $this->getPrefixFromNamespace($ns); - } - } + } + } if (!isset($typePrefix)) { die("$partType has no namespace!"); - } + } } $ns = $this->getNamespaceFromPrefix($typePrefix); $localPart = $this->getLocalPart($partType); @@ -1006,8 +1011,8 @@ class wsdl extends nusoap_base { } } $xml .= ''; - } - } + } + } // bindings & porttypes if (count($this->bindings) >= 1) { $binding_xml = ''; @@ -1035,7 +1040,7 @@ class wsdl extends nusoap_base { $portType_xml .= "\n" . ' ' . htmlspecialchars($opParts['documentation']) . ''; @@ -1043,12 +1048,12 @@ class wsdl extends nusoap_base { $portType_xml .= "\n" . ' '; $portType_xml .= "\n" . ' '; $portType_xml .= "\n" . ' '; - } + } $portType_xml .= "\n" . ''; $binding_xml .= "\n" . ''; - } + } $xml .= $portType_xml . $binding_xml; - } + } // services $xml .= "\nserviceName . '">'; if (count($this->ports) >= 1) { @@ -1056,11 +1061,11 @@ class wsdl extends nusoap_base { $xml .= "\n" . ' '; $xml .= "\n" . ' '; $xml .= "\n" . ' '; - } - } + } + } $xml .= "\n" . ''; return $xml . "\n"; - } + } /** * determine whether a set of parameters are unwrapped @@ -1105,7 +1110,7 @@ class wsdl extends nusoap_base { $phpType = $typeDef['phpType']; $arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : ''); $this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType"); - + // we expect a complexType or element of complexType if ($phpType != 'struct') { $this->debug("in parametersMatchWrapped: not a struct"); @@ -1146,7 +1151,7 @@ class wsdl extends nusoap_base { * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid - * + * * @param string $operation operation name * @param string $direction (input|output) * @param mixed $parameters parameter value(s) @@ -1157,12 +1162,12 @@ class wsdl extends nusoap_base { function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') { $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType"); $this->appendDebug('parameters=' . $this->varDump($parameters)); - + if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; - } + } if (!$opData = $this->getOperationData($operation, $bindingType)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); @@ -1213,7 +1218,7 @@ class wsdl extends nusoap_base { $this->debug("serializing part $name of type $type"); // Track encoding style if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { - $encodingStyle = $opData[$direction]['encodingStyle']; + $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; @@ -1239,15 +1244,15 @@ class wsdl extends nusoap_base { } $this->debug("serializeRPCParameters returning: $xml"); return $xml; - } - + } + /** * serialize a PHP value according to a WSDL message definition - * + * * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid - * + * * @param string $operation operation name * @param string $direction (input|output) * @param mixed $parameters parameter value(s) @@ -1257,14 +1262,14 @@ class wsdl extends nusoap_base { */ function serializeParameters($operation, $direction, $parameters) { - $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); + $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); $this->appendDebug('parameters=' . $this->varDump($parameters)); - + if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; - } + } if (!$opData = $this->getOperationData($operation)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); @@ -1272,18 +1277,18 @@ class wsdl extends nusoap_base { } $this->debug('opData:'); $this->appendDebug($this->varDump($opData)); - + // Get encoding style for output and set to current $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { $encodingStyle = $opData['output']['encodingStyle']; $enc_style = $encodingStyle; } - + // set input params $xml = ''; if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { - + $use = $opData[$direction]['use']; $this->debug("use=$use"); $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); @@ -1294,7 +1299,7 @@ class wsdl extends nusoap_base { $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); // Track encoding style if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { - $encodingStyle = $opData[$direction]['encodingStyle']; + $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; @@ -1320,11 +1325,11 @@ class wsdl extends nusoap_base { } $this->debug("serializeParameters returning: $xml"); return $xml; - } - + } + /** * serializes a PHP value according a given type definition - * + * * @param string $name name of value (part or element) * @param string $type XML schema type of value (type or element) * @param mixed $value a native PHP value (parameter value) @@ -1410,7 +1415,7 @@ class wsdl extends nusoap_base { } else { $value = 'true'; } - } + } if ($uqType == 'string' && gettype($value) == 'string') { $value = $this->expandEntities($value); } @@ -1491,7 +1496,7 @@ class wsdl extends nusoap_base { return false; } $phpType = $typeDef['phpType']; - $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); + $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); // if php type == struct, map value to the element names if ($phpType == 'struct') { if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { @@ -1583,11 +1588,11 @@ class wsdl extends nusoap_base { foreach($value as $v) { $cols = ',' . sizeof($v); $nv = array_merge($nv, $v); - } + } $value = $nv; } else { $cols = ''; - } + } if (is_array($value) && sizeof($value) >= 1) { $rows = sizeof($value); $contents = ''; @@ -1598,7 +1603,7 @@ class wsdl extends nusoap_base { $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); } else { $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); - } + } } } else { $rows = 0; @@ -1642,7 +1647,7 @@ class wsdl extends nusoap_base { $this->debug("in serializeType: returning: $xml"); return $xml; } - + /** * serializes the attributes for a complexType * @@ -1697,7 +1702,7 @@ class wsdl extends nusoap_base { if ($xname) { $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; } - } + } } else { $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); } @@ -1755,7 +1760,7 @@ class wsdl extends nusoap_base { } // if user took advantage of a minOccurs=0, then only serialize named parameters if (isset($optionals) - && (!isset($xvalue[$eName])) + && (!isset($xvalue[$eName])) && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') ){ if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { @@ -1803,7 +1808,7 @@ class wsdl extends nusoap_base { } } } - } + } } else { $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); } @@ -1839,7 +1844,7 @@ class wsdl extends nusoap_base { } $elements = $eElements; } - + if (count($attrs) > 0) { foreach($attrs as $n => $a){ // expand each attribute @@ -1892,7 +1897,7 @@ class wsdl extends nusoap_base { /** * register an operation with the server - * + * * @param string $name operation (method) name * @param array $in assoc array of input values: key = param name, value = param type * @param array $out assoc array of output values: key = param name, value = param type @@ -1902,7 +1907,7 @@ class wsdl extends nusoap_base { * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) * @param string $documentation optional The description to include in the WSDL * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) - * @access public + * @access public */ function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ if ($use == 'encoded' && $encodingStyle == '') { @@ -1949,7 +1954,7 @@ class wsdl extends nusoap_base { 'parts' => $out), 'namespace' => $namespace, 'transport' => 'http://schemas.xmlsoap.org/soap/http', - 'documentation' => $documentation); + 'documentation' => $documentation); // add portTypes // add messages if($in) @@ -1977,7 +1982,7 @@ class wsdl extends nusoap_base { $this->messages[$name.'Response']= '0'; } return true; - } + } } ?> \ No newline at end of file diff --git a/include/nusoap/nusoap.php b/include/nusoap/nusoap.php index fbf514e9..e97e23d8 100644 --- a/include/nusoap/nusoap.php +++ b/include/nusoap/nusoap.php @@ -1,36 +1,8 @@ -Date: Thu Feb 17 18:09:12 2011 -0800 - - bug 34897 - remove characters that aren't valid in XML - -commit 1767411d701b8216cc5e043888fd1337e2eca315 -Author: Stanislav Malyshev -Date: Fri Jan 7 12:19:10 2011 -0800 - - conserve memory when no debug is enabled - -commit 843510ebf455368865302a05b9d5041815a32c23 -Author: John Mertic -Date: Wed Nov 17 13:18:09 2010 -0500 - - Bug 40716 - Fix WSDL validation problem by removing hardcoded schemaLocation attribute for the tag. -commit 2bd12c02078f3e291bd9c1e76179a144c788ce97 -Author: Collin Lee -Date: Fri Oct 22 16:37:42 2010 -0400 - - Bug: 39937 - - We traced the error to a combination of the new Hoovers' WSDL + the nusoapclient code that winds up improperly encoding the parameter elem -ents (this is because the namespace specified for the soap call did not match that declared in the WSDL). Made changes to nusoap.php so that w -e may manually set a payload XML portion that will not apply the namespace encoding to the parameters. Fixed unit tests to reflect the changes - and also re-enabled those for Hoovers that were marked skipped. +Modification information for LGPL compliance r58622 - 2010-10-22 18:18:59 -0700 (Fri, 22 Oct 2010) - engsvnbuild - Author: lam bug 40066 @@ -50,7 +22,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -73,11 +45,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -371,7 +343,7 @@ class nusoap_base { * @access public */ var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; - + /** * charset encoding for outgoing messages * @@ -453,10 +425,10 @@ class nusoap_base { * control of the xml content * @var string * @access public - * + * */ - var $payloadOverride; - + var $payloadOverride; + /** * constructor * @@ -580,9 +552,11 @@ class nusoap_base { */ function expandEntities($val) { if ($this->charencoding) { - $val = htmlspecialchars($val, ENT_QUOTES, $this->soap_defencoding); - // XML 1.0 doesn't allow those... - $val = preg_replace("/([\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F])/", '', $val); + $val = str_replace('&', '&', $val); + $val = str_replace("'", ''', $val); + $val = str_replace('"', '"', $val); + $val = str_replace('<', '<', $val); + $val = str_replace('>', '>', $val); } return $val; } @@ -646,7 +620,7 @@ class nusoap_base { $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); $this->appendDebug('value=' . $this->varDump($val)); $this->appendDebug('attributes=' . $this->varDump($attributes)); - + if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) { $this->debug("serialize_val: serialize soapval"); $xml = $val->serialize($use); @@ -1109,10 +1083,7 @@ class nusoap_base { * @access public */ function varDump($data) { - if ($this->debugLevel <= 0) { - return ''; - } - ob_start(); + ob_start(); var_dump($data); $ret_val = ob_get_contents(); ob_end_clean(); @@ -1223,7 +1194,7 @@ function iso8601_to_timestamp($datestr){ function usleepWindows($usec) { $start = gettimeofday(); - + do { $stop = gettimeofday(); @@ -1257,7 +1228,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -1280,11 +1251,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -1545,7 +1516,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -1568,11 +1539,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -1736,7 +1707,7 @@ r354 - 2004-08-02 23:00:37 -0700 (Mon, 02 Aug 2004) - sugarjacob - Adding Soap * @access public */ class nusoap_xmlschema extends nusoap_base { - + // files var $schema = ''; var $xml = ''; @@ -1765,7 +1736,7 @@ class nusoap_xmlschema extends nusoap_base { var $depth_array = array(); var $message = array(); var $defaultNamespace = array(); - + /** * constructor * @@ -1865,7 +1836,7 @@ class nusoap_xmlschema extends nusoap_base { $this->debug("XML payload:\n" . $xml); $this->setError($errstr); } - + xml_parser_free($this->parser); } else{ $this->debug('no xml passed to parseString()!!'); @@ -1887,7 +1858,7 @@ class nusoap_xmlschema extends nusoap_base { } return $scope . $ename . '_ContainedType'; } - + /** * start-element handler * @@ -1897,13 +1868,13 @@ class nusoap_xmlschema extends nusoap_base { * @access private */ function schemaStartElement($parser, $name, $attrs) { - + // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; - $this->message[$pos] = array('cdata' => ''); + $this->message[$pos] = array('cdata' => ''); if ($depth > 0) { $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; } else { @@ -1917,7 +1888,7 @@ class nusoap_xmlschema extends nusoap_base { } else { $prefix = ''; } - + // loop thru attributes, expanding, and registering namespace declarations if(count($attrs) > 0){ foreach($attrs as $k => $v){ @@ -1993,7 +1964,7 @@ class nusoap_xmlschema extends nusoap_base { $aname = $attrs['ref']; $this->attributes[$attrs['ref']] = $attrs; } - + if($this->currentComplexType){ // This should *always* be $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; } @@ -2285,14 +2256,14 @@ class nusoap_xmlschema extends nusoap_base { $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; } else { if ($schemaLocationCount == 0) { - $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" schemaLocation=\"" . $ns . "\"/>\n"; + $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" schemaLocation=\"http://schemas.xmlsoap.org/soap/encoding/\"/>\n"; } else { $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; } } } - } - } + } + } // complex types foreach($this->complexTypes as $typeName => $attrs){ $contentStr = ''; @@ -2396,9 +2367,7 @@ class nusoap_xmlschema extends nusoap_base { * @access private */ function xdebug($string){ - if($this->debugLevel > 0) { - $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); - } + $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); } /** @@ -2591,12 +2560,12 @@ class nusoap_xmlschema extends nusoap_base { } return $buffer; } - + /** * adds a complex type to the schema - * + * * example: array - * + * * addType( * 'ArrayOfstring', * 'complexType', @@ -2606,9 +2575,9 @@ class nusoap_xmlschema extends nusoap_base { * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), * 'xsd:string' * ); - * + * * example: PHP associative array ( SOAP Struct ) - * + * * addType( * 'SOAPStruct', * 'complexType', @@ -2616,7 +2585,7 @@ class nusoap_xmlschema extends nusoap_base { * 'all', * array('myVar'=> array('name'=>'myVar','type'=>'string') * ); - * + * * @param name * @param typeClass (complexType|simpleType|attribute) * @param phpType: currently supported are array and struct (php assoc array) @@ -2644,11 +2613,11 @@ class nusoap_xmlschema extends nusoap_base { 'attrs' => $attrs, 'arrayType' => $arrayType ); - + $this->xdebug("addComplexType $name:"); $this->appendDebug($this->varDump($this->complexTypes[$name])); } - + /** * adds a simple type to the schema * @@ -2669,7 +2638,7 @@ class nusoap_xmlschema extends nusoap_base { 'type' => $restrictionBase, 'enumeration' => $enumeration ); - + $this->xdebug("addSimpleType $name:"); $this->appendDebug($this->varDump($this->simpleTypes[$name])); } @@ -2687,7 +2656,7 @@ class nusoap_xmlschema extends nusoap_base { } $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; - + $this->xdebug("addElement " . $attrs['name']); $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); } @@ -2723,7 +2692,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -2746,11 +2715,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -3028,7 +2997,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -3051,11 +3020,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -3328,12 +3297,12 @@ class soap_transport_http extends nusoap_base { $this->debug("parsed URL $k = $v"); $this->$k = $v; } - + // add any GET params to path if(isset($u['query']) && $u['query'] != ''){ $this->path .= '?' . $u['query']; } - + // set default port if(!isset($u['port'])){ if($u['scheme'] == 'https'){ @@ -3342,10 +3311,10 @@ class soap_transport_http extends nusoap_base { $this->port = 80; } } - + $this->uri = $this->path; $this->digest_uri = $this->uri; - + // build headers if (!isset($u['port'])) { $this->setHeader('Host', $this->host); @@ -3425,7 +3394,7 @@ class soap_transport_http extends nusoap_base { } else { $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); } - + // test pointer if(!$this->fp) { $msg = 'Couldn\'t open socket connection to server ' . $this->url; @@ -3438,7 +3407,7 @@ class soap_transport_http extends nusoap_base { $this->setError($msg); return false; } - + // set response timeout $this->debug('set response timeout to ' . $response_timeout); socket_set_timeout( $this->fp, $response_timeout); @@ -3527,10 +3496,10 @@ class soap_transport_http extends nusoap_base { // recent versions of cURL turn on peer/host checking by default, // while PHP binaries are not compiled with a default location for the // CA cert bundle, so disable peer/host checking. - //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); + //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0); $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0); - + // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) if ($this->authtype == 'certificate') { $this->debug('set cURL certificate options'); @@ -3617,7 +3586,7 @@ class soap_transport_http extends nusoap_base { * @access public */ function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { - + $this->debug('entered send() with data of length: '.strlen($data)); $this->tryagain = true; @@ -3629,18 +3598,18 @@ class soap_transport_http extends nusoap_base { if (!$this->connect($timeout, $response_timeout)){ return false; } - + // send request if (!$this->sendRequest($data, $cookies)){ return false; } - + // get response $respdata = $this->getResponse(); } else { $this->setError("Too many tries to get an OK response ($this->response_status_line)"); } - } + } $this->debug('end of send()'); return $respdata; } @@ -3660,7 +3629,7 @@ class soap_transport_http extends nusoap_base { function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { return $this->send($data, $timeout, $response_timeout, $cookies); } - + /** * if authenticating, set user credentials here * @@ -3682,21 +3651,21 @@ class soap_transport_http extends nusoap_base { } elseif ($authtype == 'digest') { if (isset($digestRequest['nonce'])) { $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; - + // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) - + // A1 = unq(username-value) ":" unq(realm-value) ":" passwd $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; - + // H(A1) = MD5(A1) $HA1 = md5($A1); - + // A2 = Method ":" digest-uri-value $A2 = $this->request_method . ':' . $this->digest_uri; - + // H(A2) $HA2 = md5($A2); - + // KD(secret, data) = H(concat(secret, ":", data)) // if qop == auth: // request-digest = <"> < KD ( H(A1), unq(nonce-value) @@ -3707,7 +3676,7 @@ class soap_transport_http extends nusoap_base { // ) <"> // if qop is missing, // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> - + $unhashedDigest = ''; $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; $cnonce = $nonce; @@ -3716,10 +3685,10 @@ class soap_transport_http extends nusoap_base { } else { $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; } - + $hashedDigest = md5($unhashedDigest); - - $opaque = ''; + + $opaque = ''; if (isset($digestRequest['opaque'])) { $opaque = ', opaque="' . $digestRequest['opaque'] . '"'; } @@ -3738,7 +3707,7 @@ class soap_transport_http extends nusoap_base { $this->authtype = $authtype; $this->digestRequest = $digestRequest; } - + /** * set the soapaction value * @@ -3748,7 +3717,7 @@ class soap_transport_http extends nusoap_base { function setSOAPAction($soapaction) { $this->setHeader('SOAPAction', '"' . $soapaction . '"'); } - + /** * use http encoding * @@ -3768,7 +3737,7 @@ class soap_transport_http extends nusoap_base { $this->encoding = $enc; } } - + /** * set proxy info here * @@ -3797,7 +3766,7 @@ class soap_transport_http extends nusoap_base { unsetHeader('Proxy-Authorization'); } } - + /** * Test if the given string starts with a header that is to be skipped. @@ -3838,7 +3807,7 @@ class soap_transport_http extends nusoap_base { // length := 0 $length = 0; $new = ''; - + // read chunk-size, chunk-extension (if any) and CRLF // get the position of the linebreak $chunkend = strpos($buffer, $lb); @@ -3853,7 +3822,7 @@ class soap_transport_http extends nusoap_base { while ($chunk_size > 0) { $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); - + // Just in case we got a broken connection if ($chunkend == FALSE) { $chunk = substr($buffer,$chunkstart); @@ -3862,7 +3831,7 @@ class soap_transport_http extends nusoap_base { $length += strlen($chunk); break; } - + // read chunk-data and CRLF $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); // append chunk-data to entity-body @@ -3871,7 +3840,7 @@ class soap_transport_http extends nusoap_base { $length += strlen($chunk); // read chunk-size and CRLF $chunkstart = $chunkend + strlen($lb); - + $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); if ($chunkend == FALSE) { break; //Just in case we got a broken connection @@ -3882,7 +3851,7 @@ class soap_transport_http extends nusoap_base { } return $new; } - + /** * Writes the payload, including HTTP headers, to $this->outgoing_payload. * @@ -3927,7 +3896,7 @@ class soap_transport_http extends nusoap_base { // header/body separator $this->outgoing_payload .= "\r\n"; - + // add data $this->outgoing_payload .= $data; } @@ -3999,7 +3968,7 @@ class soap_transport_http extends nusoap_base { */ function getResponse(){ $this->incoming_payload = ''; - + if ($this->io_method() == 'socket') { // loop until headers have been retrieved $data = ''; @@ -4070,7 +4039,7 @@ class soap_transport_http extends nusoap_base { $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; } } - + // loop until msg has been received if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { $content_length = 2147483647; // ignore any content-length header @@ -4136,22 +4105,22 @@ class soap_transport_http extends nusoap_base { $this->debug('read body of length ' . strlen($data)); $this->incoming_payload .= $data; $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); - + // close filepointer if( - (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || + (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || (! $this->persistentConnection) || feof($this->fp)){ fclose($this->fp); $this->fp = false; $this->debug('closed socket'); } - + // connection was closed unexpectedly if($this->incoming_payload == ''){ $this->setError('no response from server'); return false; } - + // decode transfer-encoding // if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ // if(!$data = $this->decodeChunked($data, $lb)){ @@ -4162,7 +4131,7 @@ class soap_transport_http extends nusoap_base { // set decoded payload // $this->incoming_payload = $header_data.$lb.$lb.$data; // } - + } else if ($this->io_method() == 'curl') { // send and receive $this->debug('send and receive with cURL'); @@ -4188,7 +4157,7 @@ class soap_transport_http extends nusoap_base { // close curl $this->debug('No cURL error, closing cURL'); curl_close($this->ch); - + // try removing skippable headers $savedata = $data; while ($this->isSkippableCurlHeader($data)) { @@ -4211,7 +4180,7 @@ class soap_transport_http extends nusoap_base { } } } - + // separate content from HTTP headers if ($pos = strpos($data,"\r\n\r\n")) { $lb = "\r\n"; @@ -4271,7 +4240,7 @@ class soap_transport_http extends nusoap_base { $this->debug('Server wants digest authentication'); // remove "Digest " from our elements $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); - + // parse elements into array $digestElements = explode(',', $digestString); foreach ($digestElements as $val) { @@ -4290,7 +4259,7 @@ class soap_transport_http extends nusoap_base { $this->setError('HTTP authentication failed'); return false; } - + if ( ($http_status >= 300 && $http_status <= 307) || ($http_status >= 400 && $http_status <= 417) || @@ -4358,13 +4327,13 @@ class soap_transport_http extends nusoap_base { } else { $this->debug('No Content-Encoding header'); } - + if(strlen($data) == 0){ $this->debug('no data after headers!'); $this->setError('no data present after HTTP headers'); return false; } - + return $data; } @@ -4436,7 +4405,7 @@ class soap_transport_http extends nusoap_base { } else { $path = '/'; } - + $cookie_param = ';secure;'; if (strpos($cookie_str, $cookie_param) !== FALSE) { $secure = true; @@ -4455,12 +4424,12 @@ class soap_transport_http extends nusoap_base { 'path' => $path, 'expires' => $expires, 'secure' => $secure - ); + ); return $cookie; } return false; } - + /** * sort out cookies for the current request * @@ -4533,7 +4502,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -4556,11 +4525,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -5496,7 +5465,7 @@ class nusoap_server extends nusoap_base { //begin code to compress payload - by John // NOTE: there is no way to know whether the Web server will also compress // this data. - if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { + if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { if (strstr($this->headers['accept-encoding'], 'gzip')) { if (function_exists('gzencode')) { if (isset($this->debug_flag) && $this->debug_flag) { @@ -5627,7 +5596,7 @@ class nusoap_server extends nusoap_base { function getHTTPBody($soapmsg) { return $soapmsg; } - + /** * gets the HTTP content type for the current response. * @@ -5639,7 +5608,7 @@ class nusoap_server extends nusoap_base { function getHTTPContentType() { return 'text/xml'; } - + /** * gets the HTTP content type charset for the current response. * returns false for non-text content types. @@ -5798,7 +5767,7 @@ class nusoap_server extends nusoap_base { if(false == $namespace) { $namespace = "http://$SERVER_NAME/soap/$serviceName"; } - + if(false == $endpoint) { if ($HTTPS == '1' || $HTTPS == 'on') { $SCHEME = 'https'; @@ -5807,11 +5776,11 @@ class nusoap_server extends nusoap_base { } $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; } - + if(false == $schemaTargetNamespace) { $schemaTargetNamespace = $namespace; } - + $this->wsdl = new wsdl; $this->wsdl->serviceName = $serviceName; $this->wsdl->endpoint = $endpoint; @@ -5870,7 +5839,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -5893,11 +5862,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -6054,15 +6023,15 @@ r354 - 2004-08-02 23:00:37 -0700 (Mon, 02 Aug 2004) - sugarjacob - Adding Soap /** * parses a WSDL file, allows access to it's data, other utility methods. * also builds WSDL structures programmatically. -* +* * @author Dietrich Ayala * @author Scott Nichol -* @access public +* @access public */ class wsdl extends nusoap_base { // URL or filename of the root of this WSDL - var $wsdl; + var $wsdl; // define internal arrays of bindings, ports, operations, messages, etc. var $schemas = array(); var $currentSchema; @@ -6080,9 +6049,9 @@ class wsdl extends nusoap_base { var $opData = array(); var $status = ''; var $documentation = false; - var $endpoint = ''; + var $endpoint = ''; // array of wsdl docs to import - var $import = array(); + var $import = array(); // parser vars var $parser; var $position = 0; @@ -6105,7 +6074,7 @@ class wsdl extends nusoap_base { /** * constructor - * + * * @param string $wsdl WSDL document URL * @param string $proxyhost * @param string $proxyport @@ -6115,7 +6084,7 @@ class wsdl extends nusoap_base { * @param integer $response_timeout set the response timeout * @param array $curl_options user-specified cURL options * @param boolean $use_curl try to use cURL - * @access public + * @access public */ function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ parent::nusoap_base(); @@ -6175,7 +6144,7 @@ class wsdl extends nusoap_base { } } } - } + } } } // WSDL imports @@ -6201,18 +6170,18 @@ class wsdl extends nusoap_base { } } } - } + } } // add new data to operation data foreach($this->bindings as $binding => $bindingData) { if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { foreach($bindingData['operations'] as $operation => $data) { $this->debug('post-parse data gathering for ' . $operation); - $this->bindings[$binding]['operations'][$operation]['input'] = - isset($this->bindings[$binding]['operations'][$operation]['input']) ? + $this->bindings[$binding]['operations'][$operation]['input'] = + isset($this->bindings[$binding]['operations'][$operation]['input']) ? array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : $this->portTypes[ $bindingData['portType'] ][$operation]['input']; - $this->bindings[$binding]['operations'][$operation]['output'] = + $this->bindings[$binding]['operations'][$operation]['output'] = isset($this->bindings[$binding]['operations'][$operation]['output']) ? array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : $this->portTypes[ $bindingData['portType'] ][$operation]['output']; @@ -6229,16 +6198,16 @@ class wsdl extends nusoap_base { $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; - } - } + } + } } } /** * parses the wsdl document - * + * * @param string $wsdl path or URL - * @access private + * @access private */ function parseWSDL($wsdl = '') { $this->debug("parse WSDL at path=$wsdl"); @@ -6248,7 +6217,7 @@ class wsdl extends nusoap_base { $this->setError('no wsdl passed to parseWSDL()!!'); return false; } - + // parse $wsdl for url format $wsdl_props = parse_url($wsdl); @@ -6291,24 +6260,24 @@ class wsdl extends nusoap_base { $wsdl_string = ''; while ($data = fread($fp, 32768)) { $wsdl_string .= $data; - } + } fclose($fp); } else { $errstr = "Bad path to WSDL file $path"; $this->debug($errstr); $this->setError($errstr); return false; - } + } } $this->debug('Parse WSDL'); // end new code added // Create an XML parser. - $this->parser = xml_parser_create(); + $this->parser = xml_parser_create(); // Set the options for parsing the XML data. // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // Set the object for the parser. - xml_set_object($this->parser, $this); + xml_set_object($this->parser, $this); // Set the element handlers for the parser. xml_set_element_handler($this->parser, 'start_element', 'end_element'); xml_set_character_data_handler($this->parser, 'character_data'); @@ -6325,7 +6294,7 @@ class wsdl extends nusoap_base { $this->debug("XML payload:\n" . $wsdl_string); $this->setError($errstr); return false; - } + } // free the parser xml_parser_free($this->parser); $this->debug('Parsing WSDL done'); @@ -6334,15 +6303,15 @@ class wsdl extends nusoap_base { return false; } return true; - } + } /** * start-element handler - * + * * @param string $parser XML parser object * @param string $name element name * @param string $attrs associative array of attributes - * @access private + * @access private */ function start_element($parser, $name, $attrs) { @@ -6361,10 +6330,10 @@ class wsdl extends nusoap_base { } else { // position in the total number of elements, starting from 0 $pos = $this->position++; - $depth = $this->depth++; + $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; - $this->message[$pos] = array('cdata' => ''); + $this->message[$pos] = array('cdata' => ''); // process attributes if (count($attrs) > 0) { // register namespace declarations @@ -6374,11 +6343,11 @@ class wsdl extends nusoap_base { $this->namespaces[$ns_prefix] = $v; } else { $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; - } + } if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { $this->XMLSchemaVersion = $v; $this->namespaces['xsi'] = $v . '-instance'; - } + } } } // expand each attribute prefix to its namespace @@ -6386,22 +6355,22 @@ class wsdl extends nusoap_base { $k = strpos($k, ':') ? $this->expandQname($k) : $k; if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { $v = strpos($v, ':') ? $this->expandQname($v) : $v; - } + } $eAttrs[$k] = $v; - } + } $attrs = $eAttrs; } else { $attrs = array(); - } + } // get element prefix, namespace and name if (preg_match('/:/', $name)) { // get ns prefix - $prefix = substr($name, 0, strpos($name, ':')); + $prefix = substr($name, 0, strpos($name, ':')); // get ns - $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; // get unqualified name $name = substr(strstr($name, ':'), 1); - } + } // process attributes, expanding any prefixes to namespaces // find status, register data switch ($this->status) { @@ -6410,12 +6379,12 @@ class wsdl extends nusoap_base { if (isset($attrs['type'])) { $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; - } + } if (isset($attrs['element'])) { $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; - } - } + } + } break; case 'portType': switch ($name) { @@ -6424,25 +6393,25 @@ class wsdl extends nusoap_base { $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); if (isset($attrs['parameterOrder'])) { $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; - } + } break; case 'documentation': $this->documentation = true; - break; + break; // merge input/output data default: $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; break; - } + } break; case 'binding': switch ($name) { - case 'binding': + case 'binding': // get ns prefix if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['prefix'] = $prefix; - } + } $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); break; case 'header': @@ -6451,17 +6420,17 @@ class wsdl extends nusoap_base { case 'operation': if (isset($attrs['soapAction'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; - } + } if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; - } + } if (isset($attrs['name'])) { $this->currentOperation = $attrs['name']; $this->debug("current binding operation: $this->currentOperation"); $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; - } + } break; case 'input': $this->opStatus = 'input'; @@ -6474,9 +6443,9 @@ class wsdl extends nusoap_base { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); } else { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; - } + } break; - } + } break; case 'service': switch ($name) { @@ -6484,7 +6453,7 @@ class wsdl extends nusoap_base { $this->currentPort = $attrs['name']; $this->debug('current port: ' . $this->currentPort); $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); - + break; case 'address': $this->ports[$this->currentPort]['location'] = $attrs['location']; @@ -6492,9 +6461,9 @@ class wsdl extends nusoap_base { $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; break; - } + } break; - } + } // set status switch ($name) { case 'import': @@ -6530,11 +6499,11 @@ class wsdl extends nusoap_base { $this->currentBinding = $this->getLocalPart($attrs['name']); } else { $this->currentBinding = $attrs['name']; - } + } $this->status = 'binding'; $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); - } + } break; case 'service': $this->serviceName = $attrs['name']; @@ -6544,20 +6513,20 @@ class wsdl extends nusoap_base { case 'definitions': foreach ($attrs as $name => $value) { $this->wsdl_info[$name] = $value; - } + } break; - } - } - } + } + } + } /** * end-element handler - * + * * @param string $parser XML parser object * @param string $name element name - * @access private + * @access private */ - function end_element($parser, $name){ + function end_element($parser, $name){ // unset schema status if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { $this->status = ""; @@ -6565,38 +6534,38 @@ class wsdl extends nusoap_base { $this->currentSchema->clearDebug(); $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; $this->debug('Parsing WSDL schema done'); - } + } if ($this->status == 'schema') { $this->currentSchema->schemaEndElement($parser, $name); } else { // bring depth down a notch $this->depth--; - } + } // end documentation if ($this->documentation) { //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; $this->documentation = false; - } - } + } + } /** * element content handler - * + * * @param string $parser XML parser object * @param string $data element content - * @access private + * @access private */ function character_data($parser, $data) { $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; if (isset($this->message[$pos]['cdata'])) { $this->message[$pos]['cdata'] .= $data; - } + } if ($this->documentation) { $this->documentation .= $data; - } - } + } + } /** * if authenticating, set user credentials here @@ -6615,21 +6584,21 @@ class wsdl extends nusoap_base { $this->authtype = $authtype; $this->certRequest = $certRequest; } - + function getBindingData($binding) { if (is_array($this->bindings[$binding])) { return $this->bindings[$binding]; - } + } } - + /** * returns an assoc array of operation names => operation data - * + * * @param string $portName WSDL port name * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported) - * @return array - * @access public + * @return array + * @access public */ function getOperations($portName = '', $bindingType = 'soap') { $ops = array(); @@ -6661,15 +6630,15 @@ class wsdl extends nusoap_base { $this->debug("getOperations found no operations for port '$portName' bindingType $bindingType"); } return $ops; - } - + } + /** * returns an associative array of data necessary for calling an operation - * + * * @param string $operation name of operation * @param string $bindingType type of binding eg: soap, soap12 - * @return array - * @access public + * @return array + * @access public */ function getOperationData($operation, $bindingType = 'soap') { @@ -6689,19 +6658,19 @@ class wsdl extends nusoap_base { if ($operation == $bOperation) { $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; return $opData; - } - } + } + } } - } + } } - + /** * returns an associative array of data necessary for calling an operation - * + * * @param string $soapAction soapAction for operation * @param string $bindingType type of binding eg: soap, soap12 - * @return array - * @access public + * @return array + * @access public */ function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { if ($bindingType == 'soap') { @@ -6717,12 +6686,12 @@ class wsdl extends nusoap_base { foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { if ($opData['soapAction'] == $soapAction) { return $opData; - } - } + } + } } - } + } } - + /** * returns an array of information about a given type * returns false if no type exists by the given name @@ -6933,7 +6902,7 @@ class wsdl extends nusoap_base { * * @param mixed $debug whether to put debug=1 in endpoint URL * @return string serialization of WSDL - * @access public + * @access public */ function serialize($debug = 0) { @@ -6941,15 +6910,15 @@ class wsdl extends nusoap_base { $xml .= "\nnamespaces as $k => $v) { $xml .= " xmlns:$k=\"$v\""; - } + } // 10.9.02 - add poulter fix for wsdl and tns declarations if (isset($this->namespaces['wsdl'])) { $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; - } + } if (isset($this->namespaces['tns'])) { $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; - } - $xml .= '>'; + } + $xml .= '>'; // imports if (sizeof($this->import) > 0) { foreach($this->import as $ns => $list) { @@ -6960,8 +6929,8 @@ class wsdl extends nusoap_base { $xml .= ''; } } - } - } + } + } // types if (count($this->schemas)>=1) { $xml .= "\n\n"; @@ -6971,7 +6940,7 @@ class wsdl extends nusoap_base { } } $xml .= ''; - } + } // messages if (count($this->messages) >= 1) { foreach($this->messages as $msgName => $msgParts) { @@ -6988,11 +6957,11 @@ class wsdl extends nusoap_base { foreach($this->typemap as $ns => $types) { if (isset($types[$partType])) { $typePrefix = $this->getPrefixFromNamespace($ns); - } - } + } + } if (!isset($typePrefix)) { die("$partType has no namespace!"); - } + } } $ns = $this->getNamespaceFromPrefix($typePrefix); $localPart = $this->getLocalPart($partType); @@ -7009,8 +6978,8 @@ class wsdl extends nusoap_base { } } $xml .= ''; - } - } + } + } // bindings & porttypes if (count($this->bindings) >= 1) { $binding_xml = ''; @@ -7038,7 +7007,7 @@ class wsdl extends nusoap_base { $portType_xml .= "\n" . ' ' . htmlspecialchars($opParts['documentation']) . ''; @@ -7046,12 +7015,12 @@ class wsdl extends nusoap_base { $portType_xml .= "\n" . ' '; $portType_xml .= "\n" . ' '; $portType_xml .= "\n" . ' '; - } + } $portType_xml .= "\n" . ''; $binding_xml .= "\n" . ''; - } + } $xml .= $portType_xml . $binding_xml; - } + } // services $xml .= "\nserviceName . '">'; if (count($this->ports) >= 1) { @@ -7059,11 +7028,11 @@ class wsdl extends nusoap_base { $xml .= "\n" . ' '; $xml .= "\n" . ' '; $xml .= "\n" . ' '; - } - } + } + } $xml .= "\n" . ''; return $xml . "\n"; - } + } /** * determine whether a set of parameters are unwrapped @@ -7108,7 +7077,7 @@ class wsdl extends nusoap_base { $phpType = $typeDef['phpType']; $arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : ''); $this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType"); - + // we expect a complexType or element of complexType if ($phpType != 'struct') { $this->debug("in parametersMatchWrapped: not a struct"); @@ -7149,7 +7118,7 @@ class wsdl extends nusoap_base { * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid - * + * * @param string $operation operation name * @param string $direction (input|output) * @param mixed $parameters parameter value(s) @@ -7160,12 +7129,12 @@ class wsdl extends nusoap_base { function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') { $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType"); $this->appendDebug('parameters=' . $this->varDump($parameters)); - + if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; - } + } if (!$opData = $this->getOperationData($operation, $bindingType)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); @@ -7216,7 +7185,7 @@ class wsdl extends nusoap_base { $this->debug("serializing part $name of type $type"); // Track encoding style if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { - $encodingStyle = $opData[$direction]['encodingStyle']; + $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; @@ -7242,15 +7211,15 @@ class wsdl extends nusoap_base { } $this->debug("serializeRPCParameters returning: $xml"); return $xml; - } - + } + /** * serialize a PHP value according to a WSDL message definition - * + * * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid - * + * * @param string $operation operation name * @param string $direction (input|output) * @param mixed $parameters parameter value(s) @@ -7260,14 +7229,14 @@ class wsdl extends nusoap_base { */ function serializeParameters($operation, $direction, $parameters) { - $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); + $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); $this->appendDebug('parameters=' . $this->varDump($parameters)); - + if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; - } + } if (!$opData = $this->getOperationData($operation)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); @@ -7275,18 +7244,18 @@ class wsdl extends nusoap_base { } $this->debug('opData:'); $this->appendDebug($this->varDump($opData)); - + // Get encoding style for output and set to current $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { $encodingStyle = $opData['output']['encodingStyle']; $enc_style = $encodingStyle; } - + // set input params $xml = ''; if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { - + $use = $opData[$direction]['use']; $this->debug("use=$use"); $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); @@ -7297,7 +7266,7 @@ class wsdl extends nusoap_base { $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); // Track encoding style if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { - $encodingStyle = $opData[$direction]['encodingStyle']; + $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; @@ -7323,11 +7292,11 @@ class wsdl extends nusoap_base { } $this->debug("serializeParameters returning: $xml"); return $xml; - } - + } + /** * serializes a PHP value according a given type definition - * + * * @param string $name name of value (part or element) * @param string $type XML schema type of value (type or element) * @param mixed $value a native PHP value (parameter value) @@ -7413,7 +7382,7 @@ class wsdl extends nusoap_base { } else { $value = 'true'; } - } + } if ($uqType == 'string' && gettype($value) == 'string') { $value = $this->expandEntities($value); } @@ -7494,7 +7463,7 @@ class wsdl extends nusoap_base { return false; } $phpType = $typeDef['phpType']; - $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); + $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); // if php type == struct, map value to the element names if ($phpType == 'struct') { if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { @@ -7586,11 +7555,11 @@ class wsdl extends nusoap_base { foreach($value as $v) { $cols = ',' . sizeof($v); $nv = array_merge($nv, $v); - } + } $value = $nv; } else { $cols = ''; - } + } if (is_array($value) && sizeof($value) >= 1) { $rows = sizeof($value); $contents = ''; @@ -7601,7 +7570,7 @@ class wsdl extends nusoap_base { $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); } else { $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); - } + } } } else { $rows = 0; @@ -7645,7 +7614,7 @@ class wsdl extends nusoap_base { $this->debug("in serializeType: returning: $xml"); return $xml; } - + /** * serializes the attributes for a complexType * @@ -7700,7 +7669,7 @@ class wsdl extends nusoap_base { if ($xname) { $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; } - } + } } else { $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); } @@ -7758,7 +7727,7 @@ class wsdl extends nusoap_base { } // if user took advantage of a minOccurs=0, then only serialize named parameters if (isset($optionals) - && (!isset($xvalue[$eName])) + && (!isset($xvalue[$eName])) && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') ){ if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { @@ -7806,7 +7775,7 @@ class wsdl extends nusoap_base { } } } - } + } } else { $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); } @@ -7842,7 +7811,7 @@ class wsdl extends nusoap_base { } $elements = $eElements; } - + if (count($attrs) > 0) { foreach($attrs as $n => $a){ // expand each attribute @@ -7895,7 +7864,7 @@ class wsdl extends nusoap_base { /** * register an operation with the server - * + * * @param string $name operation (method) name * @param array $in assoc array of input values: key = param name, value = param type * @param array $out assoc array of output values: key = param name, value = param type @@ -7905,7 +7874,7 @@ class wsdl extends nusoap_base { * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) * @param string $documentation optional The description to include in the WSDL * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) - * @access public + * @access public */ function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ if ($use == 'encoded' && $encodingStyle == '') { @@ -7952,7 +7921,7 @@ class wsdl extends nusoap_base { 'parts' => $out), 'namespace' => $namespace, 'transport' => 'http://schemas.xmlsoap.org/soap/http', - 'documentation' => $documentation); + 'documentation' => $documentation); // add portTypes // add messages if($in) @@ -7980,7 +7949,7 @@ class wsdl extends nusoap_base { $this->messages[$name.'Response']= '0'; } return true; - } + } } ?>body_position) && $pos > $this->body_position){ // deal w/ multirefs @@ -8563,7 +8532,7 @@ class nusoap_parser extends nusoap_base { */ } } - + // for doclit if($this->status == 'header'){ if ($this->root_header != $pos) { @@ -8847,7 +8816,7 @@ r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" s r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex -r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development @@ -8870,11 +8839,11 @@ r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trun r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk -r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs +r41647 - 2008-11-11 17:44:30 -0800 (Tue, 11 Nov 2008) - majed - Fixes a few bugs r41596 - 2008-11-10 19:20:04 -0800 (Mon, 10 Nov 2008) - Samir Gandhi - modified to set $method in the code -r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes +r41558 - 2008-11-10 14:35:34 -0800 (Mon, 10 Nov 2008) - majed - changes nusoap to allow for registering classes r39619 - 2008-09-09 13:41:34 -0700 (Tue, 09 Sep 2008) - jmertic - Bug 24827 - Remove all instances where we return a new object and assign it by reference, since this is deprecated in PHP 5 and emits E_DEPRECATED errors in PHP 5.3. Touched: @@ -9213,7 +9182,7 @@ class nusoap_client extends nusoap_base { $this->faultstring = ''; $this->faultcode = ''; $this->opData = array(); - + $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); $this->appendDebug('params=' . $this->varDump($params)); $this->appendDebug('headers=' . $this->varDump($headers)); @@ -9284,7 +9253,7 @@ class nusoap_client extends nusoap_base { // no WSDL //$this->namespaces['ns1'] = $namespace; $nsPrefix = 'ns' . rand(1000, 9999); - // serialize + // serialize $payload = ''; if (is_string($params)) { $this->debug("serializing param string for operation $operation"); @@ -9340,10 +9309,10 @@ class nusoap_client extends nusoap_base { } } } - - // check for payload override - $payload = !empty($this->payloadOverride) ? $this->payloadOverride : $payload; - + + // check for payload override + $payload = !empty($this->payloadOverride) ? $this->payloadOverride : $payload; + // serialize envelope $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); @@ -9357,7 +9326,7 @@ class nusoap_client extends nusoap_base { $this->return = $return; $this->debug('sent message successfully and got a(n) '.gettype($return)); $this->appendDebug('return=' . $this->varDump($return)); - + // fault? if(is_array($return) && isset($return['faultcode'])){ $this->debug('got fault'); @@ -9367,7 +9336,7 @@ class nusoap_client extends nusoap_base { $this->$k = $v; $this->debug("$k = $v
    "); } - $this->debug('return data for faultcode = ' . var_export($return, true)); + $this->debug('return data for faultcode = ' . var_export($return)); return $return; } elseif ($style == 'document') { // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), @@ -9527,7 +9496,7 @@ class nusoap_client extends nusoap_base { $this->persistentConnection = $http; } } - + if($err = $http->getError()){ $this->setError('HTTP Error: '.$err); return false; @@ -9691,7 +9660,7 @@ class nusoap_client extends nusoap_base { $this->authtype = $authtype; $this->certRequest = $certRequest; } - + /** * use HTTP encoding * @@ -9702,7 +9671,7 @@ class nusoap_client extends nusoap_base { $this->debug("setHTTPEncoding(\"$enc\")"); $this->http_encoding = $enc; } - + /** * Set whether to try to use cURL connections if possible * @@ -9723,7 +9692,7 @@ class nusoap_client extends nusoap_base { $this->debug("useHTTPPersistentConnection"); $this->persistentConnection = true; } - + /** * gets the default RPC parameter setting. * If true, default is that call params are like RPC even for document style. @@ -9753,7 +9722,7 @@ class nusoap_client extends nusoap_base { function setDefaultRpcParams($rpcParams) { $this->defaultRpcParams = $rpcParams; } - + /** * dynamically creates an instance of a proxy class, * allowing user to directly call methods from wsdl @@ -9883,7 +9852,7 @@ class nusoap_client extends nusoap_base { function getHTTPBody($soapmsg) { return $soapmsg; } - + /** * gets the HTTP content type for the current request. * @@ -9895,7 +9864,7 @@ class nusoap_client extends nusoap_base { function getHTTPContentType() { return 'text/xml'; } - + /** * gets the HTTP content type charset for the current request. * returns false for non-text content types. diff --git a/include/nusoap/nusoapmime.php b/include/nusoap/nusoapmime.php index f0b6c84d..5928a133 100644 --- a/include/nusoap/nusoapmime.php +++ b/include/nusoap/nusoapmime.php @@ -206,7 +206,7 @@ class nusoapclientmime extends nusoapclient { * @access private */ var $mimeContentType; - + /** * adds a MIME attachment to the current request. * @@ -231,7 +231,7 @@ class nusoapclientmime extends nusoapclient { $info['filename'] = $filename; $info['contenttype'] = $contenttype; $info['cid'] = $cid; - + $this->requestAttachments[] = $info; return $cid; @@ -277,7 +277,7 @@ class nusoapclientmime extends nusoapclient { $params['encoding'] = '8bit'; $params['charset'] = $this->soap_defencoding; $mimeMessage->addSubpart($soapmsg, $params); - + foreach ($this->requestAttachments as $att) { unset($params); @@ -288,7 +288,12 @@ class nusoapclientmime extends nusoapclient { $params['cid'] = $att['cid']; if ($att['data'] == '' && $att['filename'] <> '') { - $data = file_get_contents($att['filename']); + if ($fd = fopen($att['filename'], 'rb')) { + $data = fread($fd, filesize($att['filename'])); + fclose($fd); + } else { + $data = ''; + } $mimeMessage->addSubpart($data, $params); } else { $mimeMessage->addSubpart($att['data'], $params); @@ -297,7 +302,7 @@ class nusoapclientmime extends nusoapclient { $output = $mimeMessage->encode(); $mimeHeaders = $output['headers']; - + foreach ($mimeHeaders as $k => $v) { $this->debug("MIME header $k: $v"); if (strtolower($k) == 'content-type') { @@ -306,13 +311,13 @@ class nusoapclientmime extends nusoapclient { $this->mimeContentType = str_replace("\r\n", " ", $v); } } - + return $output['body']; } return parent::getHTTPBody($soapmsg); } - + /** * gets the HTTP content type for the current request. * @@ -327,7 +332,7 @@ class nusoapclientmime extends nusoapclient { } return parent::getHTTPContentType(); } - + /** * gets the HTTP content type charset for the current request. * returns false for non-text content types. @@ -365,7 +370,7 @@ class nusoapclientmime extends nusoapclient { $params['include_bodies'] = true; $params['decode_bodies'] = true; $params['decode_headers'] = true; - + $structure = Mail_mimeDecode::decode($params); foreach ($structure->parts as $part) { @@ -381,11 +386,11 @@ class nusoapclientmime extends nusoapclient { $this->responseAttachments[] = $info; } } - + if (isset($return)) { return $return; } - + $this->setError('No root part found in multipart/related content'); return; } @@ -421,7 +426,7 @@ class nusoapservermime extends soap_server { * @access private */ var $mimeContentType; - + /** * adds a MIME attachment to the current response. * @@ -446,7 +451,7 @@ class nusoapservermime extends soap_server { $info['filename'] = $filename; $info['contenttype'] = $contenttype; $info['cid'] = $cid; - + $this->responseAttachments[] = $info; return $cid; @@ -492,7 +497,7 @@ class nusoapservermime extends soap_server { $params['encoding'] = '8bit'; $params['charset'] = $this->soap_defencoding; $mimeMessage->addSubpart($soapmsg, $params); - + foreach ($this->responseAttachments as $att) { unset($params); @@ -503,7 +508,12 @@ class nusoapservermime extends soap_server { $params['cid'] = $att['cid']; if ($att['data'] == '' && $att['filename'] <> '') { - $data = file_get_contents($att['filename']); + if ($fd = fopen($att['filename'], 'rb')) { + $data = fread($fd, filesize($att['filename'])); + fclose($fd); + } else { + $data = ''; + } $mimeMessage->addSubpart($data, $params); } else { $mimeMessage->addSubpart($att['data'], $params); @@ -512,7 +522,7 @@ class nusoapservermime extends soap_server { $output = $mimeMessage->encode(); $mimeHeaders = $output['headers']; - + foreach ($mimeHeaders as $k => $v) { $this->debug("MIME header $k: $v"); if (strtolower($k) == 'content-type') { @@ -521,13 +531,13 @@ class nusoapservermime extends soap_server { $this->mimeContentType = str_replace("\r\n", " ", $v); } } - + return $output['body']; } return parent::getHTTPBody($soapmsg); } - + /** * gets the HTTP content type for the current response. * @@ -542,7 +552,7 @@ class nusoapservermime extends soap_server { } return parent::getHTTPContentType(); } - + /** * gets the HTTP content type charset for the current response. * returns false for non-text content types. @@ -580,7 +590,7 @@ class nusoapservermime extends soap_server { $params['include_bodies'] = true; $params['decode_bodies'] = true; $params['decode_headers'] = true; - + $structure = Mail_mimeDecode::decode($params); foreach ($structure->parts as $part) { @@ -596,11 +606,11 @@ class nusoapservermime extends soap_server { $this->requestAttachments[] = $info; } } - + if (isset($return)) { return $return; } - + $this->setError('No root part found in multipart/related content'); return; } diff --git a/include/pdf/LICENSE b/include/pdf/LICENSE new file mode 100644 index 00000000..660e9484 --- /dev/null +++ b/include/pdf/LICENSE @@ -0,0 +1,21 @@ +/** +* Cpdf +* +* http://www.ros.co.nz/pdf +* +* A PHP class to provide the basic functionality to create a pdf document without +* any requirement for additional modules. +* +* Note that they companion class CezPdf can be used to extend this class and dramatically +* simplify the creation of documents. +* +* IMPORTANT NOTE +* there is no warranty, implied or otherwise with this software. +* +* LICENCE +* This code has been placed in the Public Domain for all to enjoy. +* +* @author Wayne Munro +* @version 009 +* @package Cpdf +*/ \ No newline at end of file diff --git a/include/pdf/class.ezpdf.php b/include/pdf/class.ezpdf.php new file mode 100644 index 00000000..664a23b7 --- /dev/null +++ b/include/pdf/class.ezpdf.php @@ -0,0 +1,1666 @@ +10); // used for storing most of the page configuration parameters +var $y; // this is the current vertical positon on the page of the writing point, very important +var $ezPages=array(); // keep an array of the ids of the pages, making it easy to go back and add page numbers etc. +var $ezPageCount=0; +var $lastWidth; //this keeps track of the last width of an object (table/image); +// ------------------------------------------------------------------------------ + +function Cezpdf($paper='a4',$orientation='portrait'){ + // Assuming that people don't want to specify the paper size using the absolute coordinates + // allow a couple of options: + // orientation can be 'portrait' or 'landscape' + // or, to actually set the coordinates, then pass an array in as the first parameter. + // the defaults are as shown. + // + // ------------------------- + // 2002-07-24 - Nicola Asuni (info@tecnick.com): + // Added new page formats (45 standard ISO paper formats and 4 american common formats) + // paper cordinates are calculated in this way: (inches * 72) where 1 inch = 2.54 cm + // + // Now you may also pass a 2 values array containing the page width and height in centimeters + // ------------------------- + + if (!is_array($paper)){ + switch (strtoupper($paper)){ + case '4A0': {$size = array(0,0,4767.87,6740.79); break;} + case '2A0': {$size = array(0,0,3370.39,4767.87); break;} + case 'A0': {$size = array(0,0,2383.94,3370.39); break;} + case 'A1': {$size = array(0,0,1683.78,2383.94); break;} + case 'A2': {$size = array(0,0,1190.55,1683.78); break;} + case 'A3': {$size = array(0,0,841.89,1190.55); break;} + case 'A4': default: {$size = array(0,0,595.28,841.89); break;} + case 'A5': {$size = array(0,0,419.53,595.28); break;} + case 'A6': {$size = array(0,0,297.64,419.53); break;} + case 'A7': {$size = array(0,0,209.76,297.64); break;} + case 'A8': {$size = array(0,0,147.40,209.76); break;} + case 'A9': {$size = array(0,0,104.88,147.40); break;} + case 'A10': {$size = array(0,0,73.70,104.88); break;} + case 'B0': {$size = array(0,0,2834.65,4008.19); break;} + case 'B1': {$size = array(0,0,2004.09,2834.65); break;} + case 'B2': {$size = array(0,0,1417.32,2004.09); break;} + case 'B3': {$size = array(0,0,1000.63,1417.32); break;} + case 'B4': {$size = array(0,0,708.66,1000.63); break;} + case 'B5': {$size = array(0,0,498.90,708.66); break;} + case 'B6': {$size = array(0,0,354.33,498.90); break;} + case 'B7': {$size = array(0,0,249.45,354.33); break;} + case 'B8': {$size = array(0,0,175.75,249.45); break;} + case 'B9': {$size = array(0,0,124.72,175.75); break;} + case 'B10': {$size = array(0,0,87.87,124.72); break;} + case 'C0': {$size = array(0,0,2599.37,3676.54); break;} + case 'C1': {$size = array(0,0,1836.85,2599.37); break;} + case 'C2': {$size = array(0,0,1298.27,1836.85); break;} + case 'C3': {$size = array(0,0,918.43,1298.27); break;} + case 'C4': {$size = array(0,0,649.13,918.43); break;} + case 'C5': {$size = array(0,0,459.21,649.13); break;} + case 'C6': {$size = array(0,0,323.15,459.21); break;} + case 'C7': {$size = array(0,0,229.61,323.15); break;} + case 'C8': {$size = array(0,0,161.57,229.61); break;} + case 'C9': {$size = array(0,0,113.39,161.57); break;} + case 'C10': {$size = array(0,0,79.37,113.39); break;} + case 'RA0': {$size = array(0,0,2437.80,3458.27); break;} + case 'RA1': {$size = array(0,0,1729.13,2437.80); break;} + case 'RA2': {$size = array(0,0,1218.90,1729.13); break;} + case 'RA3': {$size = array(0,0,864.57,1218.90); break;} + case 'RA4': {$size = array(0,0,609.45,864.57); break;} + case 'SRA0': {$size = array(0,0,2551.18,3628.35); break;} + case 'SRA1': {$size = array(0,0,1814.17,2551.18); break;} + case 'SRA2': {$size = array(0,0,1275.59,1814.17); break;} + case 'SRA3': {$size = array(0,0,907.09,1275.59); break;} + case 'SRA4': {$size = array(0,0,637.80,907.09); break;} + case 'LETTER': {$size = array(0,0,612.00,792.00); break;} + case 'LEGAL': {$size = array(0,0,612.00,1008.00); break;} + case 'EXECUTIVE': {$size = array(0,0,521.86,756.00); break;} + case 'FOLIO': {$size = array(0,0,612.00,936.00); break;} + case 'TABLOID': {$size = array(0,0,792.00,1224.00); break;} // cn: bug 3627 - added Tabloid size + } + switch (strtolower($orientation)){ + case 'landscape': + $a=$size[3]; + $size[3]=$size[2]; + $size[2]=$a; + break; + } + } else { + if (count($paper)>2) { + // then an array was sent it to set the size + $size = $paper; + } + else { //size in centimeters has been passed + $size[0] = 0; + $size[1] = 0; + $size[2] = ( $paper[0] / 2.54 ) * 72; + $size[3] = ( $paper[1] / 2.54 ) * 72; + } + } + $this->Cpdf($size); + $this->ez['pageWidth']=$size[2]; + $this->ez['pageHeight']=$size[3]; + + // also set the margins to some reasonable defaults + $this->ez['topMargin']=30; + $this->ez['bottomMargin']=30; + $this->ez['leftMargin']=30; + $this->ez['rightMargin']=30; + + // set the current writing position to the top of the first page + $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; + // and get the ID of the page that was created during the instancing process. + $this->ezPages[1]=$this->getFirstPageId(); + $this->ezPageCount=1; +} + +// ------------------------------------------------------------------------------ +// 2002-07-24: Nicola Asuni (info@tecnick.com) +// Set Margins in centimeters +function ezSetCmMargins($top,$bottom,$left,$right){ + $top = ( $top / 2.54 ) * 72; + $bottom = ( $bottom / 2.54 ) * 72; + $left = ( $left / 2.54 ) * 72; + $right = ( $right / 2.54 ) * 72; + $this->ezSetMargins($top,$bottom,$left,$right); +} +// ------------------------------------------------------------------------------ + + +function ezColumnsStart($options=array()){ + // start from the current y-position, make the set number of columne + if (isset($this->ez['columns']) && $this->ez['columns']==1){ + // if we are already in a column mode then just return. + return; + } + $def=array('gap'=>10,'num'=>2); + foreach($def as $k=>$v){ + if (!isset($options[$k])){ + $options[$k]=$v; + } + } + // setup the columns + $this->ez['columns']=array('on'=>1,'colNum'=>1); + + // store the current margins + $this->ez['columns']['margins']=array( + $this->ez['leftMargin'] + ,$this->ez['rightMargin'] + ,$this->ez['topMargin'] + ,$this->ez['bottomMargin'] + ); + // and store the settings for the columns + $this->ez['columns']['options']=$options; + // then reset the margins to suit the new columns + // safe enough to assume the first column here, but start from the current y-position + $this->ez['topMargin']=$this->ez['pageHeight']-$this->y; + $width=($this->ez['pageWidth']-$this->ez['leftMargin']-$this->ez['rightMargin']-($options['num']-1)*$options['gap'])/$options['num']; + $this->ez['columns']['width']=$width; + $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width; + +} +// ------------------------------------------------------------------------------ +function ezColumnsStop(){ + if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ + $this->ez['columns']['on']=0; + $this->ez['leftMargin']=$this->ez['columns']['margins'][0]; + $this->ez['rightMargin']=$this->ez['columns']['margins'][1]; + $this->ez['topMargin']=$this->ez['columns']['margins'][2]; + $this->ez['bottomMargin']=$this->ez['columns']['margins'][3]; + } +} +// ------------------------------------------------------------------------------ +function ezInsertMode($status=1,$pageNum=1,$pos='before'){ + // puts the document into insert mode. new pages are inserted until this is re-called with status=0 + // by default pages wil be inserted at the start of the document + switch($status){ + case '1': + if (isset($this->ezPages[$pageNum])){ + $this->ez['insertMode']=1; + $this->ez['insertOptions']=array('id'=>$this->ezPages[$pageNum],'pos'=>$pos); + } + break; + case '0': + $this->ez['insertMode']=0; + break; + } +} +// ------------------------------------------------------------------------------ + +function ezNewPage(){ + $pageRequired=1; + if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ + // check if this is just going to a new column + // increment the column number +//echo 'HERE
    '; + $this->ez['columns']['colNum']++; +//echo $this->ez['columns']['colNum'].'
    '; + if ($this->ez['columns']['colNum'] <= $this->ez['columns']['options']['num']){ + // then just reset to the top of the next column + $pageRequired=0; + } else { + $this->ez['columns']['colNum']=1; + $this->ez['topMargin']=$this->ez['columns']['margins'][2]; + } + + $width = $this->ez['columns']['width']; + $this->ez['leftMargin']=$this->ez['columns']['margins'][0]+($this->ez['columns']['colNum']-1)*($this->ez['columns']['options']['gap']+$width); + $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width; + } +//echo 'left='.$this->ez['leftMargin'].' right='.$this->ez['rightMargin'].'
    '; + + if ($pageRequired){ + // make a new page, setting the writing point back to the top + $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; + // make the new page with a call to the basic class. + $this->ezPageCount++; + if (isset($this->ez['insertMode']) && $this->ez['insertMode']==1){ + $id = $this->ezPages[$this->ezPageCount] = $this->newPage(1,$this->ez['insertOptions']['id'],$this->ez['insertOptions']['pos']); + // then manipulate the insert options so that inserted pages follow each other + $this->ez['insertOptions']['id']=$id; + $this->ez['insertOptions']['pos']='after'; + } else { + $this->ezPages[$this->ezPageCount] = $this->newPage(); + } + } else { + $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; + } +} + +// ------------------------------------------------------------------------------ + +function ezSetMargins($top,$bottom,$left,$right){ + // sets the margins to new values + $this->ez['topMargin']=$top; + $this->ez['bottomMargin']=$bottom; + $this->ez['leftMargin']=$left; + $this->ez['rightMargin']=$right; + // check to see if this means that the current writing position is outside the + // writable area + if ($this->y > $this->ez['pageHeight']-$top){ + // then move y down + $this->y = $this->ez['pageHeight']-$top; + } + if ( $this->y < $bottom){ + // then make a new page + $this->ezNewPage(); + } +} + +// ------------------------------------------------------------------------------ + +function ezGetCurrentPageNumber(){ + // return the strict numbering (1,2,3,4..) number of the current page + return $this->ezPageCount; +} + +// ------------------------------------------------------------------------------ + +function ezStartPageNumbers($x,$y,$size,$pos='left',$pattern='{PAGENUM} of {TOTALPAGENUM}',$num=''){ + // put page numbers on the pages from here. + // place then on the 'pos' side of the coordinates (x,y). + // pos can be 'left' or 'right' + // use the given 'pattern' for display, where (PAGENUM} and {TOTALPAGENUM} are replaced + // as required. + // if $num is set, then make the first page this number, the number of total pages will + // be adjusted to account for this. + // Adjust this function so that each time you 'start' page numbers then you effectively start a different batch + // return the number of the batch, so that they can be stopped in a different order if required. + if (!$pos || !strlen($pos)){ + $pos='left'; + } + if (!$pattern || !strlen($pattern)){ + $pattern='{PAGENUM} of {TOTALPAGENUM}'; + } + if (!isset($this->ez['pageNumbering'])){ + $this->ez['pageNumbering']=array(); + } + $i = count($this->ez['pageNumbering']); + $this->ez['pageNumbering'][$i][$this->ezPageCount]=array('x'=>$x,'y'=>$y,'pos'=>$pos,'pattern'=>$pattern,'num'=>$num,'size'=>$size); + return $i; +} + +// ------------------------------------------------------------------------------ + +function ezWhatPageNumber($pageNum,$i=0){ + // given a particular generic page number (ie, document numbered sequentially from beginning), + // return the page number under a particular page numbering scheme ($i) + $num=0; + $start=1; + $startNum=1; + if (!isset($this->ez['pageNumbering'])) + { + $this->addMessage('WARNING: page numbering called for and wasn\'t started with ezStartPageNumbers'); + return 0; + } + foreach($this->ez['pageNumbering'][$i] as $k=>$v){ + if ($k<=$pageNum){ + if (is_array($v)){ + // start block + if (strlen($v['num'])){ + // a start was specified + $start=$v['num']; + $startNum=$k; + $num=$pageNum-$startNum+$start; + } + } else { + // stop block + $num=0; + } + } + } + return $num; +} + +// ------------------------------------------------------------------------------ + +function ezStopPageNumbers($stopTotal=0,$next=0,$i=0){ + // if stopTotal=1 then the totalling of pages for this number will stop too + // if $next=1, then do this page, but not the next, else do not do this page either + // if $i is set, then stop that particular pagenumbering sequence. + if (!isset($this->ez['pageNumbering'])){ + $this->ez['pageNumbering']=array(); + } + if ($next && isset($this->ez['pageNumbering'][$i][$this->ezPageCount]) && is_array($this->ez['pageNumbering'][$i][$this->ezPageCount])){ + // then this has only just been started, this will over-write the start, and nothing will appear + // add a special command to the start block, telling it to stop as well + if ($stopTotal){ + $this->ez['pageNumbering'][$i][$this->ezPageCount]['stoptn']=1; + } else { + $this->ez['pageNumbering'][$i][$this->ezPageCount]['stopn']=1; + } + } else { + if ($stopTotal){ + $this->ez['pageNumbering'][$i][$this->ezPageCount]='stopt'; + } else { + $this->ez['pageNumbering'][$i][$this->ezPageCount]='stop'; + } + if ($next){ + $this->ez['pageNumbering'][$i][$this->ezPageCount].='n'; + } + } +} + +// ------------------------------------------------------------------------------ + +function ezPRVTpageNumberSearch($lbl,&$tmp){ + foreach($tmp as $i=>$v){ + if (is_array($v)){ + if (isset($v[$lbl])){ + return $i; + } + } else { + if ($v==$lbl){ + return $i; + } + } + } + return 0; +} + +// ------------------------------------------------------------------------------ + +function ezPRVTaddPageNumbers(){ + // this will go through the pageNumbering array and add the page numbers are required + if (isset($this->ez['pageNumbering'])){ + $totalPages1 = $this->ezPageCount; + $tmp1=$this->ez['pageNumbering']; + $status=0; + foreach($tmp1 as $i=>$tmp){ + // do each of the page numbering systems + // firstly, find the total pages for this one + $k = $this->ezPRVTpageNumberSearch('stopt',$tmp); + if ($k && $k>0){ + $totalPages = $k-1; + } else { + $l = $this->ezPRVTpageNumberSearch('stoptn',$tmp); + if ($l && $l>0){ + $totalPages = $l; + } else { + $totalPages = $totalPages1; + } + } + foreach ($this->ezPages as $pageNum=>$id){ + if (isset($tmp[$pageNum])){ + if (is_array($tmp[$pageNum])){ + // then this must be starting page numbers + $status=1; + $info = $tmp[$pageNum]; + $info['dnum']=$info['num']-$pageNum; + // also check for the special case of the numbering stopping and starting on the same page + if (isset($info['stopn']) || isset($info['stoptn']) ){ + $status=2; + } + } else if ($tmp[$pageNum]=='stop' || $tmp[$pageNum]=='stopt'){ + // then we are stopping page numbers + $status=0; + } else if ($status==1 && ($tmp[$pageNum]=='stoptn' || $tmp[$pageNum]=='stopn')){ + // then we are stopping page numbers + $status=2; + } + } + if ($status){ + // then add the page numbering to this page + if (strlen($info['num'])){ + $num=$pageNum+$info['dnum']; + } else { + $num=$pageNum; + } + $total = $totalPages+$num-$pageNum; + $pat = str_replace('{PAGENUM}',$num,$info['pattern']); + $pat = str_replace('{TOTALPAGENUM}',$total,$pat); + $this->reopenObject($id); + switch($info['pos']){ + case 'right': + $this->addText($info['x'],$info['y'],$info['size'],$pat); + break; + default: + $w=$this->getTextWidth($info['size'],$pat); + $this->addText($info['x']-$w,$info['y'],$info['size'],$pat); + break; + } + $this->closeObject(); + } + if ($status==2){ + $status=0; + } + } + } + } +} + +// ------------------------------------------------------------------------------ + +function ezPRVTcleanUp(){ + $this->ezPRVTaddPageNumbers(); +} + +// ------------------------------------------------------------------------------ + +function ezStream($options=''){ + $this->ezPRVTcleanUp(); + $this->stream($options); +} + +// ------------------------------------------------------------------------------ + +function ezOutput($options=0){ + $this->ezPRVTcleanUp(); + return $this->output($options); +} + +// ------------------------------------------------------------------------------ + +function ezSetY($y){ + // used to change the vertical position of the writing point. + $this->y = $y; + if ( $this->y < $this->ez['bottomMargin']){ + // then make a new page + $this->ezNewPage(); + } +} + +// ------------------------------------------------------------------------------ + +function ezSetDy($dy,$mod=''){ + // used to change the vertical position of the writing point. + // changes up by a positive increment, so enter a negative number to go + // down the page + // if $mod is set to 'makeSpace' and a new page is forced, then the pointed will be moved + // down on the new page, this will allow space to be reserved for graphics etc. + $this->y += $dy; + if ( $this->y < $this->ez['bottomMargin']){ + // then make a new page + $this->ezNewPage(); + if ($mod=='makeSpace'){ + $this->y += $dy; + } + } +} + +// ------------------------------------------------------------------------------ + +function ezPrvtTableDrawLines($pos,$gap,$x0,$x1,$y0,$y1,$y2,$col,$inner,$outer,$opt=1){ + $x0=1000; + $x1=0; + $this->setStrokeColor($col[0],$col[1],$col[2]); + $cnt=0; + $n = count($pos); + foreach($pos as $x){ + $cnt++; + if ($cnt==1 || $cnt==$n){ + $this->setLineStyle($outer); + } else { + $this->setLineStyle($inner); + } + $this->line($x-$gap/2,$y0,$x-$gap/2,$y2); + if ($x>$x1){ $x1=$x; }; + if ($x<$x0){ $x0=$x; }; + } + $this->setLineStyle($outer); + $this->line($x0-$gap/2-$outer/2,$y0,$x1-$gap/2+$outer/2,$y0); + // only do the second line if it is different to the first, AND each row does not have + // a line on it. + if ($y0!=$y1 && $opt<2){ + $this->line($x0-$gap/2,$y1,$x1-$gap/2,$y1); + } + $this->line($x0-$gap/2-$outer/2,$y2,$x1-$gap/2+$outer/2,$y2); +} + +// ------------------------------------------------------------------------------ + +function ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$gap,$size,&$y,$optionsAll=array(), $startX0 = 0, $startX1=0){ + // uses ezText to add the text, and returns the height taken by the largest heading + // this page will move the headings to a new page if they will not fit completely on this one + // transaction support will be used to implement this + + if (isset($optionsAll['cols'])){ + $options = $optionsAll['cols']; + } else { + $options = array(); + } + + $mx=0; + $startPage = $this->ezPageCount; + $secondGo=0; + + // $y is the position at which the top of the table should start, so the base + // of the first text, is $y-$height-$gap-$decender, but ezText starts by dropping $height + + // the return from this function is the total cell height, including gaps, and $y is adjusted + // to be the postion of the bottom line + + // begin the transaction + $this->transaction('start'); + $ok=0; +// $y-=$gap-$decender; + $y-=$gap; + while ($ok==0){ + +//NEW CODE +if(!empty($optionsAll['shadeHeadings'])){ + $shadeHeaderObject = $this->openObject(); + $this->closeObject(); + $this->addObject($shadeHeaderObject); + $this->reopenObject($shadeHeaderObject); + $startHeight = $y; + $this->setColor($optionsAll['headTextCol'][0], $optionsAll['headTextCol'][1], $optionsAll['headTextCol'][2], 1); +} + //END NEW CODE + foreach($cols as $colName=>$colHeading){ + $this->ezSetY($y); + if (isset($options[$colName]) && isset($options[$colName]['justification'])){ + $justification = $options[$colName]['justification']; + } else { + $justification = 'left'; + } + $this->ezText($colHeading,$size,array('aleft'=> $pos[$colName],'aright'=>($maxWidth[$colName]+$pos[$colName]),'justification'=>$justification)); + $dy = $y-$this->y; + if ($dy>$mx){ + $mx=$dy; + } + } + + //NEW CODE +if(!empty($optionsAll['shadeHeadings'])){ + $this->closeObject(); + $headingHeight = $mx + $gap * 2 - $decender; + $this->setColor($optionsAll['headCol'][0],$optionsAll['headCol'][1],$optionsAll['headCol'][2],1); + $this->filledRectangle($startX0 - $gap/2 ,$y-2,$startX1 - $startX0 - 1, -1 * $mx); +} +//END NEW + + $y = $y - $mx - $gap + $decender; +// $y -= $mx-$gap+$decender; + + // now, if this has moved to a new page, then abort the transaction, move to a new page, and put it there + // do not check on the second time around, to avoid an infinite loop + if ($this->ezPageCount != $startPage && $secondGo==0){ + $this->transaction('rewind'); + $this->ezNewPage(); + $y = $this->y - $gap-$decender; + $ok=0; + $secondGo=1; +// $y = $store_y; + $mx=0; + + } else { + $this->transaction('commit'); + $ok=1; + } + } + + return $mx+$gap*2-$decender; +} + +// ------------------------------------------------------------------------------ + +function ezPrvtGetTextWidth($size,$text){ + // will calculate the maximum width, taking into account that the text may be broken + // by line breaks. + $mx=0; + $lines = explode("\n",$text); + foreach ($lines as $line){ + $w = $this->getTextWidth($size,$line); + if ($w>$mx){ + $mx=$w; + } + } + return $mx; +} + +// ------------------------------------------------------------------------------ + + +function getDisplayCount($cnt){ + $kCount = floor(($cnt ) / 1000); + $dispCount = $cnt - 1000 * $kCount; + if($kCount > 0){ + $kCount .='K'; + }else{ + $kCount = ''; + } + return $kCount . $dispCount; +} +function ezTable(&$data,$cols='',$title='',$options=''){ + // add a table of information to the pdf document + // $data is a two dimensional array + // $cols (optional) is an associative array, the keys are the names of the columns from $data + // to be presented (and in that order), the values are the titles to be given to the columns + // $title (optional) is the title to be put on the top of the table + // + // $options is an associative array which can contain: + // 'showLines'=> 0,1,2, default is 1 (show outside and top lines only), 2=> lines on each row + // 'showHeadings' => 0 or 1 + // 'shaded'=> 0,1,2,3 default is 1 (1->alternate lines are shaded, 0->no shading, 2-> both shaded,4-> shade columns alternating second uses shadeCol2) + // 'shadeCol' => (r,g,b) array, defining the colour of the shading, default is (0.8,0.8,0.8) + // 'shadeCol2' => (r,g,b) array, defining the colour of the shading of the other blocks, default is (0.7,0.7,0.7) + // 'fontSize' => 10 + // 'textCol' => (r,g,b) array, text colour + // 'titleFontSize' => 12 + // 'rowGap' => 2 , the space added at the top and bottom of each row, between the text and the lines + // 'colGap' => 5 , the space on the left and right sides of each cell + // 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black. + // 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction + // 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos' + // 'width'=> which will specify the width of the table, if it turns out to not be this + // wide, then it will stretch the table to fit, if it is wider then each cell will be made + // proportionalty smaller, and the content may have to wrap. + // 'maxWidth'=> similar to 'width', but will only make table smaller than it wants to be + // 'options' => array(=>array('justification'=>'left','width'=>100,'link'=>linkDataName),=>....) + // allow the setting of other paramaters for the individual columns + // 'minRowSpace'=> the minimum space between the bottom of each row and the bottom margin, in which a new row will be started + // if it is less, then a new page would be started, default=-100 + // 'innerLineThickness'=>1 + // 'outerLineThickness'=>1 + // 'splitRows'=>0, 0 or 1, whether or not to allow the rows to be split across page boundaries + // 'protectRows'=>number, the number of rows to hold with the heading on page, ie, if there less than this number of + // rows on the page, then move the whole lot onto the next page, default=1 + // + // note that the user will have had to make a font selection already or this will not + // produce a valid pdf file. + + if (!is_array($data)){ + return; + } + + if (!is_array($cols)){ + // take the columns from the first row of the data set + reset($data); + list($k,$v)=each($data); + if (!is_array($v)){ + return; + } + $cols=array(); + foreach($v as $k1=>$v1){ + $cols[$k1]=$k1; + } + } + + if (!is_array($options)){ + $options=array(); + } + + $defaults = array( + 'shaded'=>1,'showLines'=>1,'shadeCol'=>array(0.8,0.8,0.8),'shadeCol2'=>array(0.7,0.7,0.7),'fontSize'=>10,'titleFontSize'=>12 + ,'titleGap'=>5,'lineCol'=>array(0,0,0),'gap'=>5,'xPos'=>'centre','xOrientation'=>'centre' + ,'showHeadings'=>1,'textCol'=>array(0,0,0),'width'=>0,'maxWidth'=>0,'cols'=>array(),'minRowSpace'=>-100,'rowGap'=>2,'colGap'=>5 + ,'innerLineThickness'=>1,'outerLineThickness'=>1,'splitRows'=>0,'protectRows'=>1, 'shadeHeadings'=>0, 'headCol'=>array(.7,.7,.7), 'headTextCol'=>array(0,0,0), 'display_footer'=>0, 'footer'=>array('SugarCRM','http://www.sugarcrm.com'), + 'display_header'=>0, 'footer'=>'SugarCRM Report','showRowCount'=>0, + ); + + foreach($defaults as $key=>$value){ + if (is_array($value)){ + if (!isset($options[$key]) || !is_array($options[$key])){ + $options[$key]=$value; + } + } else { + if (!isset($options[$key])){ + $options[$key]=$value; + } + } + } + //edit the left margin if the showing of row numbers will cause bad things + + + $options['gap']=2*$options['colGap']; + + $middle = ($this->ez['pageWidth']-$this->ez['rightMargin'])/2+($this->ez['leftMargin'])/2; + // figure out the maximum widths of the text within each column + $maxWidth=array(); + foreach($cols as $colName=>$colHeading){ + $maxWidth[$colName]=0; + } + // find the maximum cell widths based on the data + foreach($data as $row){ + foreach($cols as $colName=>$colHeading){ + $w = $this->ezPrvtGetTextWidth($options['fontSize'],(string)$row[$colName])*1.01; + if ($w > $maxWidth[$colName]){ + $maxWidth[$colName]=$w; + } + } + } + // and the maximum widths to fit in the headings + foreach($cols as $colName=>$colTitle){ + $w = $this->ezPrvtGetTextWidth($options['fontSize'],(string)$colTitle)*1.01; + if ($w > $maxWidth[$colName]){ + $maxWidth[$colName]=$w; + } + } + + // calculate the start positions of each of the columns + $pos=array(); + $x=0; + $t=$x; + $adjustmentWidth=0; + $setWidth=0; + foreach($maxWidth as $colName => $w){ + $pos[$colName]=$t; + // if the column width has been specified then set that here, also total the + // width avaliable for adjustment + if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['width']) && $options['cols'][$colName]['width']>0){ + $t=$t+$options['cols'][$colName]['width']; + $maxWidth[$colName] = $options['cols'][$colName]['width']-$options['gap']; + $setWidth += $options['cols'][$colName]['width']; + } else { + $t=$t+$w+$options['gap']; + $adjustmentWidth += $w; + $setWidth += $options['gap']; + } + } + $pos['_end_']=$t; + + // if maxWidth is specified, and the table is too wide, and the width has not been set, + // then set the width. + if ($options['width']==0 && $options['maxWidth'] && ($t-$x)>$options['maxWidth']){ + // then need to make this one smaller + $options['width']=$options['maxWidth']; + } + + if ($options['width'] && $adjustmentWidth>0 && $setWidth<$options['width']){ + // first find the current widths of the columns involved in this mystery + $cols0 = array(); + $cols1 = array(); + $xq=0; + $presentWidth=0; + $last=''; + foreach($pos as $colName=>$p){ + if (!isset($options['cols'][$last]) || !isset($options['cols'][$last]['width']) || $options['cols'][$last]['width']<=0){ + if (strlen($last)){ + $cols0[$last]=$p-$xq -$options['gap']; + $presentWidth += ($p-$xq - $options['gap']); + } + } else { + $cols1[$last]=$p-$xq; + } + $last=$colName; + $xq=$p; + } + // $cols0 contains the widths of all the columns which are not set + $neededWidth = $options['width']-$setWidth; + // if needed width is negative then add it equally to each column, else get more tricky + if ($presentWidth<$neededWidth){ + foreach($cols0 as $colName=>$w){ + $cols0[$colName]+= ($neededWidth-$presentWidth)/count($cols0); + } + } else { + + $cnt=0; + while ($presentWidth>$neededWidth && $cnt<100){ + $cnt++; // insurance policy + // find the widest columns, and the next to widest width + $aWidest = array(); + $nWidest=0; + $widest=0; + foreach($cols0 as $colName=>$w){ + if ($w>$widest){ + $aWidest=array($colName); + $nWidest = $widest; + $widest=$w; + } else if ($w==$widest){ + $aWidest[]=$colName; + } + } + // then figure out what the width of the widest columns would have to be to take up all the slack + $newWidestWidth = $widest - ($presentWidth-$neededWidth)/count($aWidest); + if ($newWidestWidth > $nWidest){ + // then there is space to set them to this + foreach($aWidest as $colName){ + $cols0[$colName] = $newWidestWidth; + } + $presentWidth=$neededWidth; + } else { + // there is not space, reduce the size of the widest ones down to the next size down, and we + // will go round again + foreach($aWidest as $colName){ + $cols0[$colName] = $nWidest; + } + $presentWidth=$presentWidth-($widest-$nWidest)*count($aWidest); + } + } + } + // $cols0 now contains the new widths of the constrained columns. + // now need to update the $pos and $maxWidth arrays + $xq=0; + foreach($pos as $colName=>$p){ + $pos[$colName]=$xq; + if (!isset($options['cols'][$colName]) || !isset($options['cols'][$colName]['width']) || $options['cols'][$colName]['width']<=0){ + if (isset($cols0[$colName])){ + $xq += $cols0[$colName] + $options['gap']; + $maxWidth[$colName]=$cols0[$colName]; + } + } else { + if (isset($cols1[$colName])){ + $xq += $cols1[$colName]; + } + } + } + + $t=$x+$options['width']; + $pos['_end_']=$t; + } + + // now adjust the table to the correct location across the page + switch ($options['xPos']){ + case 'left': + $xref = $this->ez['leftMargin']; + break; + case 'right': + $xref = $this->ez['pageWidth'] - $this->ez['rightMargin']; + break; + case 'centre': + case 'center': + $xref = $middle; + break; + default: + $xref = $options['xPos']; + break; + } + switch ($options['xOrientation']){ + case 'left': + $dx = $xref-$t; + break; + case 'right': + $dx = $xref; + break; + case 'centre': + case 'center': + $dx = $xref-$t/2; + break; + } + + + foreach($pos as $k=>$v){ + $pos[$k]=$v+$dx; + } + $x0=$x+$dx; + $x1=$t+$dx; + + $baseLeftMargin = $this->ez['leftMargin']; + $basePos = $pos; + $baseX0 = $x0; + $baseX1 = $x1; + + // ok, just about ready to make me a table + $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2]); + $this->setStrokeColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2]); + + $middle = ($x1+$x0)/2; + + // start a transaction which will be used to regress the table, if there are not enough rows protected + if ($options['protectRows']>0){ + $this->transaction('start'); + $movedOnce=0; + } + $abortTable = 1; + while ($abortTable){ + $abortTable=0; + + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; + $middle = ($x1+$x0)/2; + + + // if the title is set, then do that + if (strlen($title)){ + $w = $this->getTextWidth($options['titleFontSize'],$title); + $this->y -= $this->getFontHeight($options['titleFontSize']); + if ($this->y < $this->ez['bottomMargin']){ + $this->ezNewPage(); + // margins may have changed on the newpage + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; + $middle = ($x1+$x0)/2; + $this->y -= $this->getFontHeight($options['titleFontSize']); + } + $this->addText($middle-$w/2,$this->y,$options['titleFontSize'],$title); + $this->y -= $options['titleGap']; + } + + // margins may have changed on the newpage + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; + + $y=$this->y; // to simplify the code a bit + + // make the table + $height = $this->getFontHeight($options['fontSize']); + $decender = $this->getFontDecender($options['fontSize']); + + + + $y0=$y+$decender; + $dy=0; + if ($options['showHeadings']){ + + + + $this->setColor($options['headTextCol'][0],$options['headTextCol'][1],$options['headTextCol'][2],1); + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; + + // this function will move the start of the table to a new page if it does not fit on this one + $headingHeight = $this->ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$options['rowGap'],$options['fontSize'],$y,$options, $x0, $x1); + $y0 = $y+$headingHeight; + $y1 = $y; + +/* + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; +*/ + $this->lastWidth = $x1 - $x0; + + + + } else { + $y1 = $y0; + } + $firstLine=1; + + + // open an object here so that the text can be put in over the shading + if ($options['shaded'] && $options['shaded'] != 4 ){ + $this->saveState(); + $textObjectId = $this->openObject(); + $this->closeObject(); + $this->addObject($textObjectId); + $this->reopenObject($textObjectId); + } + + $cnt=0; + $newPage=0; + + + foreach($data as $row){ + $cnt++; + // the transaction support will be used to prevent rows being split + if ($options['splitRows']==0){ + $pageStart = $this->ezPageCount; + if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ + $columnStart = $this->ez['columns']['colNum']; + } + $this->transaction('start'); + $row_orig = $row; + $y_orig = $y; + $y0_orig = $y0; + $y1_orig = $y1; + } + $ok=0; + $secondTurn=0; + while(!$abortTable && $ok == 0){ + + $mx=0; + $newRow=1; + while(!$abortTable && ($newPage || $newRow)){ + + $y-=$height; + if ($newPage || $y<$this->ez['bottomMargin'] || (isset($options['minRowSpace']) && $y<($this->ez['bottomMargin']+$options['minRowSpace'])) ){ + // check that enough rows are with the heading + if ($options['protectRows']>0 && $movedOnce==0 && $cnt<=$options['protectRows']){ + // then we need to move the whole table onto the next page + $movedOnce = 1; + $abortTable = 1; + } + + $y2=$y-$mx+2*$height+$decender-$newRow*$height; + if ($options['showLines']){ + if (!$options['showHeadings']){ + $y0=$y1; + } + $this->ezPrvtTableDrawLines($pos,$options['gap'],$x0,$x1,$y0,$y1,$y2,$options['lineCol'],$options['innerLineThickness'],$options['outerLineThickness'],$options['showLines']); + } + if ($options['shaded'] && $options['shaded'] != 4){ + $this->closeObject(); + $this->restoreState(); + } + if($options['display_header'] && isset($options['header'])){ + $header = $options['header']; + $headerX = ($this->ez['pageWidth'] - $this->getTextWidth( $options['fontSize'], $header) )/2 ; + $headerY = ($this->ez['pageHeight'] - ($this->getFontHeight($options['fontSize']) * 3)); + $this->addText($headerX , $headerY, $options['fontSize'] , $header); + } + if($options['display_footer'] && isset($options['footer'])){ + $footer = $options['footer']; + $footerX = ($this->ez['pageWidth'] - $this->getTextWidth( $options['fontSize'], $footer[0]) )/2 ; + $footerY = $this->getFontHeight($options['fontSize']); + $this->addText($footerX , $footerY, $options['fontSize'] , $footer[0]); + if(!empty($footer[1])){ + $this->addLink($footer[1],$footerX, $footerY , $footerX + $this->getTextWidth( $options['fontSize'], $footer[0]), 2 * $footerY); + + } + } + $this->ezNewPage(); + // and the margins may have changed, this is due to the possibility of the columns being turned on + // as the columns are managed by manipulating the margins + + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } +// $x0=$x0+$dm; +// $x1=$x1+$dm; + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; + + if ($options['shaded'] && $options['shaded'] != 4){ + $this->saveState(); + $textObjectId = $this->openObject(); + $this->closeObject(); + $this->addObject($textObjectId); + $this->reopenObject($textObjectId); + } + $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2],1); + $y = $this->ez['pageHeight']-$this->ez['topMargin']; + $y0=$y+$decender; + $mx=0; + if ($options['showHeadings']){ + + $this->setColor($options['headTextCol'][0],$options['headTextCol'][1],$options['headTextCol'][2],1); + $this->ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$options['rowGap'],$options['fontSize'],$y,$options); + $y1=$y; + } else { + $y1=$y0; + } + $firstLine=1; + $y -= $height; + } + $newRow=0; + // write the actual data + // if these cells need to be split over a page, then $newPage will be set, and the remaining + // text will be placed in $leftOvers + $newPage=0; + $leftOvers=array(); + $colIndex = 0; + + foreach($cols as $colName=>$colTitle){ + if ($options['shaded']== 4 && $colIndex % 2 == 0 ){ + $this->saveState(); + $textObjectId = $this->openObject(); + $this->closeObject(); + $this->addObject($textObjectId); + $this->reopenObject($textObjectId); + } + $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2],1); + $this->ezSetY($y+$height); + $colNewPage=0; + if (isset($row[$colName])){ + if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['link']) && strlen($options['cols'][$colName]['link'])){ + + $lines = explode("\n",$row[$colName]); + if (isset($row[$options['cols'][$colName]['link']]) && strlen($row[$options['cols'][$colName]['link']])){ + foreach($lines as $k=>$v){ + $lines[$k]=''.$v.''; + } + } + } else { + $lines = explode("\n",$row[$colName]); + } + } else { + $lines = array(); + } + $this->y -= $options['rowGap']; + foreach ($lines as $line){ + $line = $this->ezProcessText($line); + $start=1; + + while (strlen($line) || $start){ + $start=0; + if (!$colNewPage){ + $this->y=$this->y-$height; + } + if ($this->y < $this->ez['bottomMargin']){ + // $this->ezNewPage(); + $newPage=1; // whether a new page is required for any of the columns + $colNewPage=1; // whether a new page is required for this column + } + if ($colNewPage){ + if (isset($leftOvers[$colName])){ + $leftOvers[$colName].="\n".$line; + } else { + $leftOvers[$colName] = $line; + } + $line=''; + } else { + if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['justification']) ){ + $just = $options['cols'][$colName]['justification']; + } else { + $just='left'; + } + $line=$this->addTextWrap($pos[$colName],$this->y,$maxWidth[$colName],$options['fontSize'],$line,$just); + } + } + if ($options['shaded'] == 4 && $colIndex%2==0){ + $this->closeObject(); + $this->setColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2],1); + $this->filledRectangle($pos[$colName],$this->y - 1,$maxWidth[$colName],$options['fontSize'] ); + $this->restoreState(); + } + $colIndex++; + } + + $dy=$y+$height-$this->y+$options['rowGap']; + if ($dy-$height*$newPage>$mx){ + $mx=$dy-$height*$newPage; + } + } + // set $row to $leftOvers so that they will be processed onto the new page + $row = $leftOvers; + // now add the shading underneath + if ($options['shaded'] && $options['shaded'] != 4 && $cnt%2==0){ + $this->closeObject(); + $this->setColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2],1); + $this->filledRectangle($x0-$options['gap']/2,$y+$decender+$height-$mx,$x1-$x0,$mx); + $this->reopenObject($textObjectId); + } + + if ($options['shaded']==2 && $cnt%2==1){ + $this->closeObject(); + $this->setColor($options['shadeCol2'][0],$options['shadeCol2'][1],$options['shadeCol2'][2],1); + $this->filledRectangle($x0-$options['gap']/2,$y+$decender+$height-$mx,$x1-$x0,$mx); + $this->reopenObject($textObjectId); + } + + if ($options['showLines']>1){ + // then draw a line on the top of each block +// $this->closeObject(); + $this->saveState(); + $this->setStrokeColor($options['lineCol'][0],$options['lineCol'][1],$options['lineCol'][2],1); +// $this->line($x0-$options['gap']/2,$y+$decender+$height-$mx,$x1-$x0,$mx); + if ($firstLine){ + $this->setLineStyle($options['outerLineThickness']); + $firstLine=0; + } else { + $this->setLineStyle($options['innerLineThickness']); + } + $this->line($x0-$options['gap']/2,$y+$decender+$height,$x1-$options['gap']/2,$y+$decender+$height); + $this->restoreState(); +// $this->reopenObject($textObjectId); + } + } // end of while + $y=$y-$mx+$height; + + // checking row split over pages + if ($options['splitRows']==0){ + if ( ( ($this->ezPageCount != $pageStart) || (isset($this->ez['columns']) && $this->ez['columns']['on']==1 && $columnStart != $this->ez['columns']['colNum'] )) && $secondTurn==0){ + // then we need to go back and try that again ! + $newPage=1; + $secondTurn=1; + $this->transaction('rewind'); + $row = $row_orig; + $y = $y_orig; + $y0 = $y0_orig; + $y1 = $y1_orig; + $ok=0; + + $dm = $this->ez['leftMargin']-$baseLeftMargin; + foreach($basePos as $k=>$v){ + $pos[$k]=$v+$dm; + } + $x0=$baseX0+$dm; + $x1=$baseX1+$dm; + + } else { + if($options['showRowCount'] && $cnt > 0){ + $dispCount = $cnt; + $this->addText($this->ez['leftMargin'] - $this->getTextWidth($options['fontSize'] - 2, $dispCount) -10, $this->y, $options['fontSize'] - 2, $dispCount); + } + $this->transaction('commit'); + $ok=1; + } + } else { + + $ok=1; // don't go round the loop if splitting rows is allowed + } + + } // end of while to check for row splitting + if ($abortTable){ + if ($ok==0){ + $this->transaction('abort'); + } + // only the outer transaction should be operational + $this->transaction('rewind'); + $this->ezNewPage(); + break; + } + + } // end of foreach ($data as $row) + + } // end of while ($abortTable) + + // table has been put on the page, the rows guarded as required, commit. + $this->transaction('commit'); + + $y2=$y+$decender; + if ($options['showLines']){ + if (!$options['showHeadings']){ + $y0=$y1; + } + $this->ezPrvtTableDrawLines($pos,$options['gap'],$x0,$x1,$y0,$y1,$y2,$options['lineCol'],$options['innerLineThickness'],$options['outerLineThickness'],$options['showLines']); + } + + // close the object for drawing the text on top + if ($options['shaded'] && $options['shaded'] != 4){ + $this->closeObject(); + $this->restoreState(); + } + if($options['display_header'] && isset($options['header'])){ + $header = $options['header']; + $headerX = ($this->ez['pageWidth'] - $this->getTextWidth( $options['fontSize'], $header) )/2 ; + $headerY = ($this->ez['pageHeight'] - ($this->getFontHeight($options['fontSize']) * 3)); + $this->addText($headerX , $headerY, $options['fontSize'] , $header); + } + if($options['display_footer'] && isset($options['footer'])){ + $footer = $options['footer']; + $footerX = ($this->ez['pageWidth'] - $this->getTextWidth( $options['fontSize'], $footer[0]) )/2 ; + $footerY = $this->getFontHeight($options['fontSize']); + $this->addText($footerX , $footerY, $options['fontSize'] , $footer[0]); + if(!empty($footer[1])){ + $this->addLink($footer[1],$footerX, $footerY , $footerX + $this->getTextWidth( $options['fontSize'], $footer[0]), 2 * $footerY); + + } + } + $oY = $this->y; + $oX = + $this->y=$y; + return $y; +} + +// ------------------------------------------------------------------------------ +function ezProcessText($text){ + // this function will intially be used to implement underlining support, but could be used for a range of other + // purposes + $search = array('','','',''); + $replace = array('','','',''); + return str_replace($search,$replace,$text); +} + +// ------------------------------------------------------------------------------ + +function ezText($text,$size=0,$options=array(),$test=0){ + // this will add a string of text to the document, starting at the current drawing + // position. + // it will wrap to keep within the margins, including optional offsets from the left + // and the right, if $size is not specified, then it will be the last one used, or + // the default value (12 I think). + // the text will go to the start of the next line when a return code "\n" is found. + // possible options are: + // 'left'=> number, gap to leave from the left margin + // 'right'=> number, gap to leave from the right margin + // 'aleft'=> number, absolute left position (overrides 'left') + // 'aright'=> number, absolute right position (overrides 'right') + // 'justification' => 'left','right','center','centre','full' + + // only set one of the next two items (leading overrides spacing) + // 'leading' => number, defines the total height taken by the line, independent of the font height. + // 'spacing' => a real number, though usually set to one of 1, 1.5, 2 (line spacing as used in word processing) + + // if $test is set then this should just check if the text is going to flow onto a new page or not, returning true or false + + // apply the filtering which will make the underlining function. + $text = $this->ezProcessText($text); + + $newPage=false; + $store_y = $this->y; + + if (is_array($options) && isset($options['aleft'])){ + $left=$options['aleft']; + } else { + $left = $this->ez['leftMargin'] + ((is_array($options) && isset($options['left']))?$options['left']:0); + } + if (is_array($options) && isset($options['aright'])){ + $right=$options['aright']; + } else { + $right = $this->ez['pageWidth'] - $this->ez['rightMargin'] - ((is_array($options) && isset($options['right']))?$options['right']:0); + } + if ($size<=0){ + $size = $this->ez['fontSize']; + } else { + $this->ez['fontSize']=$size; + } + + if (is_array($options) && isset($options['justification'])){ + $just = $options['justification']; + } else { + $just = 'left'; + } + + // modifications to give leading and spacing based on those given by Craig Heydenburg 1/1/02 + if (is_array($options) && isset($options['leading'])) { ## use leading instead of spacing + $height = $options['leading']; + } else if (is_array($options) && isset($options['spacing'])) { + $height = $this->getFontHeight($size) * $options['spacing']; + } else { + $height = $this->getFontHeight($size); + } + + + $lines = explode("\n",$text); + foreach ($lines as $line){ + $start=1; + while (strlen($line) || $start){ + $start=0; + $this->y=$this->y-$height; + if ($this->y < $this->ez['bottomMargin']){ + if ($test){ + $newPage=true; + } else { + $this->ezNewPage(); + // and then re-calc the left and right, in case they have changed due to columns + } + } + if (is_array($options) && isset($options['aleft'])){ + $left=$options['aleft']; + } else { + $left = $this->ez['leftMargin'] + ((is_array($options) && isset($options['left']))?$options['left']:0); + } + if (is_array($options) && isset($options['aright'])){ + $right=$options['aright']; + } else { + $right = $this->ez['pageWidth'] - $this->ez['rightMargin'] - ((is_array($options) && isset($options['right']))?$options['right']:0); + } + $line=$this->addTextWrap($left,$this->y,$right-$left,$size,$line,$just,0,$test); + } + } + + if ($test){ + $this->y=$store_y; + return $newPage; + } else { + return $this->y; + } +} + +// ------------------------------------------------------------------------------ + +function ezImage($image,$pad = 5,$width = 0,$resize = 'full',$just = 'center',$border = ''){ + //beta ezimage function + if (stristr($image,'://'))//copy to temp file + { + $fp = @fopen($image,"rb"); + while(!feof($fp)) + { + $cont.= fread($fp,1024); + } + fclose($fp); + $this->lastWidth = $width; + $image = tempnam ("/tmp", "php-pdf"); + $fp2 = @fopen($image,"w"); + fwrite($fp2,$cont); + fclose($fp2); + $temp = true; + } + + if (!(file_exists($image))) return false; //return immediately if image file does not exist + $imageInfo = getimagesize($image); + switch ($imageInfo[2]){ + case 2: + $type = "jpeg"; + break; + case 3: + $type = "png"; + break; + default: + return false; //return if file is not jpg or png + } + if ($width == 0) $width = $imageInfo[0]; //set width + $ratio = $imageInfo[0]/$imageInfo[1]; + + //get maximum width of image + if (isset($this->ez['columns']) && $this->ez['columns']['on'] == 1) + { + $bigwidth = $this->ez['columns']['width'] - ($pad * 2); + } + else + { + $bigwidth = $this->ez['pageWidth'] - ($pad * 2); + } + //fix width if larger than maximum or if $resize=full + if ($resize == 'full' || $resize == 'width' || $width > $bigwidth) + { + $width = $bigwidth; + + } + + $height = ($width/$ratio); //set height + + //fix size if runs off page + if ($height > ($this->y - $this->ez['bottomMargin'] - ($pad * 2))) + { + if ($resize != 'full') + { + $this->ezNewPage(); + } + else + { + $height = ($this->y - $this->ez['bottomMargin'] - ($pad * 2)); //shrink height + $width = ($height*$ratio); //fix width + } + } + + //fix x-offset if image smaller than bigwidth + if ($width < $bigwidth) + { + //center if justification=center + if ($just == 'center') + { + $offset = ($bigwidth - $width) / 2; + } + //move to right if justification=right + if ($just == 'right') + { + $offset = ($bigwidth - $width); + } + //leave at left if justification=left + if ($just == 'left') + { + $offset = 0; + } + } + + + //call appropriate function + if ($type == "jpeg"){ + $this->addJpegFromFile($image,$this->ez['leftMargin'] + $pad + $offset, $this->y + $this->getFontHeight($this->ez['fontSize']) - $pad - $height,$width); + } + + if ($type == "png"){ + $this->addPngFromFile($image,$this->ez['leftMargin'] + $pad + $offset, $this->y + $this->getFontHeight($this->ez['fontSize']) - $pad - $height,$width); + } + //draw border + if ($border != '') + { + if (!(isset($border['color']))) + { + $border['color']['red'] = .5; + $border['color']['blue'] = .5; + $border['color']['green'] = .5; + } + if (!(isset($border['width']))) $border['width'] = 1; + if (!(isset($border['cap']))) $border['cap'] = 'round'; + if (!(isset($border['join']))) $border['join'] = 'round'; + + + $this->setStrokeColor($border['color']['red'],$border['color']['green'],$border['color']['blue']); + $this->setLineStyle($border['width'],$border['cap'],$border['join']); + $this->rectangle($this->ez['leftMargin'] + $pad + $offset, $this->y + $this->getFontHeight($this->ez['fontSize']) - $pad - $height,$width,$height); + + } + // move y below image + $this->y = $this->y - $pad - $height; + //remove tempfile for remote images + if ($temp == true) unlink($image); + +} +// ------------------------------------------------------------------------------ + +// note that templating code is still considered developmental - have not really figured +// out a good way of doing this yet. +function loadTemplate($templateFile){ + // this function will load the requested template ($file includes full or relative pathname) + // the code for the template will be modified to make it name safe, and then stored in + // an array for later use + // The id of the template will be returned for the user to operate on it later + if (!file_exists($templateFile)){ + return -1; + } + + $code = implode('',file($templateFile)); + if (!strlen($code)){ + return; + } + + $code = trim($code); + if (substr($code,0,5)==''){ + $code = substr($code,0,strlen($code)-2); + } + if (isset($this->ez['numTemplates'])){ + $newNum = $this->ez['numTemplates']; + $this->ez['numTemplates']++; + } else { + $newNum=0; + $this->ez['numTemplates']=1; + $this->ez['templates']=array(); + } + + $this->ez['templates'][$newNum]['code']=$code; + + return $newNum; +} + +// ------------------------------------------------------------------------------ + +function execTemplate($id,$data=array(),$options=array()){ + // execute the given template on the current document. + if (!isset($this->ez['templates'][$id])){ + return; + } + eval($this->ez['templates'][$id]['code']); +} + +// ------------------------------------------------------------------------------ +function ilink($info){ + $this->alink($info,1); +} + +function alink($info,$internal=0){ + // a callback function to support the formation of clickable links within the document + $lineFactor=0.05; // the thickness of the line as a proportion of the height. also the drop of the line. + switch($info['status']){ + case 'start': + case 'sol': + // the beginning of the link + // this should contain the URl for the link as the 'p' entry, and will also contain the value of 'nCallback' + if (!isset($this->ez['links'])){ + $this->ez['links']=array(); + } + $i = $info['nCallback']; + $this->ez['links'][$i] = array('x'=>$info['x'],'y'=>$info['y'],'angle'=>$info['angle'],'decender'=>$info['decender'],'height'=>$info['height'],'url'=>$info['p']); + if ($internal==0){ + $this->saveState(); + $this->setColor(0,0,1); + $this->setStrokeColor(0,0,1); + $thick = $info['height']*$lineFactor; + $this->setLineStyle($thick); + } + break; + case 'end': + case 'eol': + // the end of the link + // assume that it is the most recent opening which has closed + $i = $info['nCallback']; + $start = $this->ez['links'][$i]; + // add underlining + if ($internal){ + $this->addInternalLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']); + } else { + $a = deg2rad((float)$start['angle']-90.0); + $drop = $start['height']*$lineFactor*1.5; + $dropx = cos($a)*$drop; + $dropy = -sin($a)*$drop; + $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy); + $this->addLink($start['url'],$start['x'],$start['y']+$start['decender'],$info['x'],$start['y']+$start['decender']+$start['height']); + $this->restoreState(); + } + break; + } +} + +// ------------------------------------------------------------------------------ + +function uline($info){ + // a callback function to support underlining + $lineFactor=0.05; // the thickness of the line as a proportion of the height. also the drop of the line. + switch($info['status']){ + +case 'start': + case 'sol': + + // the beginning of the underline zone + if (!isset($this->ez['links'])){ + $this->ez['links']=array(); + } + $i = $info['nCallback']; + $this->ez['links'][$i] = array('x'=>$info['x'],'y'=>$info['y'],'angle'=>$info['angle'],'decender'=>$info['decender'],'height'=>$info['height']); + $this->saveState(); + $thick = $info['height']*$lineFactor; + $this->setLineStyle($thick); + break; + case 'end': + case 'eol': + // the end of the link + // assume that it is the most recent opening which has closed + $i = $info['nCallback']; + $start = $this->ez['links'][$i]; + // add underlining + $a = deg2rad((float)$start['angle']-90.0); + $drop = $start['height']*$lineFactor*1.5; + $dropx = cos($a)*$drop; + $dropy = -sin($a)*$drop; + $this->line($start['x']-$dropx,$start['y']-$dropy,$info['x']-$dropx,$info['y']-$dropy); + $this->restoreState(); + break; + } +} + +// ------------------------------------------------------------------------------ + +} +?> diff --git a/include/pdf/class.pdf.php b/include/pdf/class.pdf.php new file mode 100644 index 00000000..a9a6a89b --- /dev/null +++ b/include/pdf/class.pdf.php @@ -0,0 +1,3082 @@ + +* @version 009 +* @package Cpdf +*/ +class Cpdf { + +/** +* the current number of pdf objects in the document +*/ +var $numObj=0; +/** +* this array contains all of the pdf objects, ready for final assembly +*/ +var $objects = array(); +/** +* the objectId (number within the objects array) of the document catalog +*/ +var $catalogId; +/** +* array carrying information about the fonts that the system currently knows about +* used to ensure that a font is not loaded twice, among other things +*/ +var $fonts=array(); +/** +* a record of the current font +*/ +var $currentFont=''; +/** +* the current base font +*/ +var $currentBaseFont=''; +/** +* the number of the current font within the font array +*/ +var $currentFontNum=0; +/** +* +*/ +var $currentNode; +/** +* object number of the current page +*/ +var $currentPage; +/** +* object number of the currently active contents block +*/ +var $currentContents; +/** +* number of fonts within the system +*/ +var $numFonts=0; +/** +* current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active +*/ +var $currentColour=array('r'=>-1,'g'=>-1,'b'=>-1); +/** +* current colour for stroke operations (lines etc.) +*/ +var $currentStrokeColour=array('r'=>-1,'g'=>-1,'b'=>-1); +/** +* current style that lines are drawn in +*/ +var $currentLineStyle=''; +/** +* an array which is used to save the state of the document, mainly the colours and styles +* it is used to temporarily change to another state, the change back to what it was before +*/ +var $stateStack = array(); +/** +* number of elements within the state stack +*/ +var $nStateStack = 0; +/** +* number of page objects within the document +*/ +var $numPages=0; +/** +* object Id storage stack +*/ +var $stack=array(); +/** +* number of elements within the object Id storage stack +*/ +var $nStack=0; +/** +* an array which contains information about the objects which are not firmly attached to pages +* these have been added with the addObject function +*/ +var $looseObjects=array(); +/** +* array contains infomation about how the loose objects are to be added to the document +*/ +var $addLooseObjects=array(); +/** +* the objectId of the information object for the document +* this contains authorship, title etc. +*/ +var $infoObject=0; +/** +* number of images being tracked within the document +*/ +var $numImages=0; +/** +* an array containing options about the document +* it defaults to turning on the compression of the objects +*/ +var $options=array('compression'=>1); +/** +* the objectId of the first page of the document +*/ +var $firstPageId; +/** +* used to track the last used value of the inter-word spacing, this is so that it is known +* when the spacing is changed. +*/ +var $wordSpaceAdjust=0; +/** +* the object Id of the procset object +*/ +var $procsetObjectId; +/** +* store the information about the relationship between font families +* this used so that the code knows which font is the bold version of another font, etc. +* the value of this array is initialised in the constuctor function. +*/ +var $fontFamilies = array(); +/** +* track if the current font is bolded or italicised +*/ +var $currentTextState = ''; +/** +* messages are stored here during processing, these can be selected afterwards to give some useful debug information +*/ +var $messages=''; +/** +* the ancryption array for the document encryption is stored here +*/ +var $arc4=''; +/** +* the object Id of the encryption information +*/ +var $arc4_objnum=0; +/** +* the file identifier, used to uniquely identify a pdf document +*/ +var $fileIdentifier=''; +/** +* a flag to say if a document is to be encrypted or not +*/ +var $encrypted=0; +/** +* the ancryption key for the encryption of all the document content (structure is not encrypted) +*/ +var $encryptionKey=''; +/** +* array which forms a stack to keep track of nested callback functions +*/ +var $callback = array(); +/** +* the number of callback functions in the callback array +*/ +var $nCallback = 0; +/** +* store label->id pairs for named destinations, these will be used to replace internal links +* done this way so that destinations can be defined after the location that links to them +*/ +var $destinations = array(); +/** +* store the stack for the transaction commands, each item in here is a record of the values of all the +* variables within the class, so that the user can rollback at will (from each 'start' command) +* note that this includes the objects array, so these can be large. +*/ +var $checkpoint = ''; +/** +* class constructor +* this will start a new document +* @var array array of 4 numbers, defining the bottom left and upper right corner of the page. first two are normally zero. +*/ +function Cpdf ($pageSize=array(0,0,612,792)){ + $this->newDocument($pageSize); + + // also initialize the font families that are known about already + $this->setFontFamily('init'); +// $this->fileIdentifier = md5('xxxxxxxx'.time()); + +} + +/** +* Document object methods (internal use only) +* +* There is about one object method for each type of object in the pdf document +* Each function has the same call list ($id,$action,$options). +* $id = the object ID of the object, or what it is to be if it is being created +* $action = a string specifying the action to be performed, though ALL must support: +* 'new' - create the object with the id $id +* 'out' - produce the output for the pdf object +* $options = optional, a string or array containing the various parameters for the object +* +* These, in conjunction with the output function are the ONLY way for output to be produced +* within the pdf 'file'. +*/ + +/** +*destination object, used to specify the location for the user to jump to, presently on opening +*/ +function o_destination($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch($action){ + case 'new': + $this->objects[$id]=array('t'=>'destination','info'=>array()); + $tmp = ''; + switch ($options['type']){ + case 'XYZ': + case 'FitR': + $tmp = ' '.$options['p3'].$tmp; + case 'FitH': + case 'FitV': + case 'FitBH': + case 'FitBV': + $tmp = ' '.$options['p1'].' '.$options['p2'].$tmp; + case 'Fit': + case 'FitB': + $tmp = $options['type'].$tmp; + $this->objects[$id]['info']['string']=$tmp; + $this->objects[$id]['info']['page']=$options['page']; + } + break; + case 'out': + $tmp = $o['info']; + $res="\n".$id." 0 obj\n".'['.$tmp['page'].' 0 R /'.$tmp['string']."]\nendobj\n"; + return $res; + break; + } +} + +/** +* set the viewer preferences +*/ +function o_viewerPreferences($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'viewerPreferences','info'=>array()); + break; + case 'add': + foreach($options as $k=>$v){ + switch ($k){ + case 'HideToolbar': + case 'HideMenubar': + case 'HideWindowUI': + case 'FitWindow': + case 'CenterWindow': + case 'NonFullScreenPageMode': + case 'Direction': + $o['info'][$k]=$v; + break; + } + } + break; + case 'out': + + $res="\n".$id." 0 obj\n".'<< '; + foreach($o['info'] as $k=>$v){ + $res.="\n/".$k.' '.$v; + } + $res.="\n>>\n"; + return $res; + break; + } +} + +/** +* define the document catalog, the overall controller for the document +*/ +function o_catalog($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'catalog','info'=>array()); + $this->catalogId=$id; + break; + case 'outlines': + case 'pages': + case 'openHere': + $o['info'][$action]=$options; + break; + case 'viewerPreferences': + if (!isset($o['info']['viewerPreferences'])){ + $this->numObj++; + $this->o_viewerPreferences($this->numObj,'new'); + $o['info']['viewerPreferences']=$this->numObj; + } + $vp = $o['info']['viewerPreferences']; + $this->o_viewerPreferences($vp,'add',$options); + break; + case 'out': + $res="\n".$id." 0 obj\n".'<< /Type /Catalog'; + foreach($o['info'] as $k=>$v){ + switch($k){ + case 'outlines': + $res.="\n".'/Outlines '.$v.' 0 R'; + break; + case 'pages': + $res.="\n".'/Pages '.$v.' 0 R'; + break; + case 'viewerPreferences': + $res.="\n".'/ViewerPreferences '.$o['info']['viewerPreferences'].' 0 R'; + break; + case 'openHere': + $res.="\n".'/OpenAction '.$o['info']['openHere'].' 0 R'; + break; + } + } + $res.=" >>\nendobj"; + return $res; + break; + } +} + +/** +* object which is a parent to the pages in the document +*/ +function o_pages($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'pages','info'=>array()); + $this->o_catalog($this->catalogId,'pages',$id); + break; + case 'page': + if (!is_array($options)){ + // then it will just be the id of the new page + $o['info']['pages'][]=$options; + } else { + // then it should be an array having 'id','rid','pos', where rid=the page to which this one will be placed relative + // and pos is either 'before' or 'after', saying where this page will fit. + if (isset($options['id']) && isset($options['rid']) && isset($options['pos'])){ + $i = array_search($options['rid'],$o['info']['pages']); + if (isset($o['info']['pages'][$i]) && $o['info']['pages'][$i]==$options['rid']){ + // then there is a match + // make a space + switch ($options['pos']){ + case 'before': + $k = $i; + break; + case 'after': + $k=$i+1; + break; + default: + $k=-1; + break; + } + if ($k>=0){ + for ($j=count($o['info']['pages'])-1;$j>=$k;$j--){ + $o['info']['pages'][$j+1]=$o['info']['pages'][$j]; + } + $o['info']['pages'][$k]=$options['id']; + } + } + } + } + break; + case 'procset': + $o['info']['procset']=$options; + break; + case 'mediaBox': + $o['info']['mediaBox']=$options; // which should be an array of 4 numbers + break; + case 'font': + $o['info']['fonts'][]=array('objNum'=>$options['objNum'],'fontNum'=>$options['fontNum']); + break; + case 'xObject': + $o['info']['xObjects'][]=array('objNum'=>$options['objNum'],'label'=>$options['label']); + break; + case 'out': + if (count($o['info']['pages'])){ + $res="\n".$id." 0 obj\n<< /Type /Pages\n/Kids ["; + foreach($o['info']['pages'] as $k=>$v){ + $res.=$v." 0 R\n"; + } + $res.="]\n/Count ".count($this->objects[$id]['info']['pages']); + if ((isset($o['info']['fonts']) && count($o['info']['fonts'])) || isset($o['info']['procset'])){ + $res.="\n/Resources <<"; + if (isset($o['info']['procset'])){ + $res.="\n/ProcSet ".$o['info']['procset']." 0 R"; + } + if (isset($o['info']['fonts']) && count($o['info']['fonts'])){ + $res.="\n/Font << "; + foreach($o['info']['fonts'] as $finfo){ + $res.="\n/F".$finfo['fontNum']." ".$finfo['objNum']." 0 R"; + } + $res.=" >>"; + } + if (isset($o['info']['xObjects']) && count($o['info']['xObjects'])){ + $res.="\n/XObject << "; + foreach($o['info']['xObjects'] as $finfo){ + $res.="\n/".$finfo['label']." ".$finfo['objNum']." 0 R"; + } + $res.=" >>"; + } + $res.="\n>>"; + if (isset($o['info']['mediaBox'])){ + $tmp=$o['info']['mediaBox']; + $res.="\n/MediaBox [".sprintf('%.3f',$tmp[0]).' '.sprintf('%.3f',$tmp[1]).' '.sprintf('%.3f',$tmp[2]).' '.sprintf('%.3f',$tmp[3]).']'; + } + } + $res.="\n >>\nendobj"; + } else { + $res="\n".$id." 0 obj\n<< /Type /Pages\n/Count 0\n>>\nendobj"; + } + return $res; + break; + } +} + +/** +* define the outlines in the doc, empty for now +*/ +function o_outlines($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'outlines','info'=>array('outlines'=>array())); + $this->o_catalog($this->catalogId,'outlines',$id); + break; + case 'outline': + $o['info']['outlines'][]=$options; + break; + case 'out': + if (count($o['info']['outlines'])){ + $res="\n".$id." 0 obj\n<< /Type /Outlines /Kids ["; + foreach($o['info']['outlines'] as $k=>$v){ + $res.=$v." 0 R "; + } + $res.="] /Count ".count($o['info']['outlines'])." >>\nendobj"; + } else { + $res="\n".$id." 0 obj\n<< /Type /Outlines /Count 0 >>\nendobj"; + } + return $res; + break; + } +} + +/** +* an object to hold the font description +*/ +function o_font($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'font','info'=>array('name'=>$options['name'],'SubType'=>'Type1')); + $fontNum=$this->numFonts; + $this->objects[$id]['info']['fontNum']=$fontNum; + // deal with the encoding and the differences + if (isset($options['differences'])){ + // then we'll need an encoding dictionary + $this->numObj++; + $this->o_fontEncoding($this->numObj,'new',$options); + $this->objects[$id]['info']['encodingDictionary']=$this->numObj; + } else if (isset($options['encoding'])){ + // we can specify encoding here + switch($options['encoding']){ + case 'WinAnsiEncoding': + case 'MacRomanEncoding': + case 'MacExpertEncoding': + $this->objects[$id]['info']['encoding']=$options['encoding']; + break; + case 'none': + break; + default: + $this->objects[$id]['info']['encoding']='WinAnsiEncoding'; + break; + } + } else { + $this->objects[$id]['info']['encoding']='WinAnsiEncoding'; + } + // also tell the pages node about the new font + $this->o_pages($this->currentNode,'font',array('fontNum'=>$fontNum,'objNum'=>$id)); + break; + case 'add': + foreach ($options as $k=>$v){ + switch ($k){ + case 'BaseFont': + $o['info']['name'] = $v; + break; + case 'FirstChar': + case 'LastChar': + case 'Widths': + case 'FontDescriptor': + case 'SubType': + $this->addMessage('o_font '.$k." : ".$v); + $o['info'][$k] = $v; + break; + } + } + break; + case 'out': + $res="\n".$id." 0 obj\n<< /Type /Font\n/Subtype /".$o['info']['SubType']."\n"; + $res.="/Name /F".$o['info']['fontNum']."\n"; + $res.="/BaseFont /".$o['info']['name']."\n"; + if (isset($o['info']['encodingDictionary'])){ + // then place a reference to the dictionary + $res.="/Encoding ".$o['info']['encodingDictionary']." 0 R\n"; + } else if (isset($o['info']['encoding'])){ + // use the specified encoding + $res.="/Encoding /".$o['info']['encoding']."\n"; + } + if (isset($o['info']['FirstChar'])){ + $res.="/FirstChar ".$o['info']['FirstChar']."\n"; + } + if (isset($o['info']['LastChar'])){ + $res.="/LastChar ".$o['info']['LastChar']."\n"; + } + if (isset($o['info']['Widths'])){ + $res.="/Widths ".$o['info']['Widths']." 0 R\n"; + } + if (isset($o['info']['FontDescriptor'])){ + $res.="/FontDescriptor ".$o['info']['FontDescriptor']." 0 R\n"; + } + $res.=">>\nendobj"; + return $res; + break; + } +} + +/** +* a font descriptor, needed for including additional fonts +*/ +function o_fontDescriptor($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'fontDescriptor','info'=>$options); + break; + case 'out': + $res="\n".$id." 0 obj\n<< /Type /FontDescriptor\n"; + foreach ($o['info'] as $label => $value){ + switch ($label){ + case 'Ascent': + case 'CapHeight': + case 'Descent': + case 'Flags': + case 'ItalicAngle': + case 'StemV': + case 'AvgWidth': + case 'Leading': + case 'MaxWidth': + case 'MissingWidth': + case 'StemH': + case 'XHeight': + case 'CharSet': + if (strlen($value)){ + $res.='/'.$label.' '.$value."\n"; + } + break; + case 'FontFile': + case 'FontFile2': + case 'FontFile3': + $res.='/'.$label.' '.$value." 0 R\n"; + break; + case 'FontBBox': + $res.='/'.$label.' ['.$value[0].' '.$value[1].' '.$value[2].' '.$value[3]."]\n"; + break; + case 'FontName': + $res.='/'.$label.' /'.$value."\n"; + break; + } + } + $res.=">>\nendobj"; + return $res; + break; + } +} + +/** +* the font encoding +*/ +function o_fontEncoding($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + // the options array should contain 'differences' and maybe 'encoding' + $this->objects[$id]=array('t'=>'fontEncoding','info'=>$options); + break; + case 'out': + $res="\n".$id." 0 obj\n<< /Type /Encoding\n"; + if (!isset($o['info']['encoding'])){ + $o['info']['encoding']='WinAnsiEncoding'; + } + if ($o['info']['encoding']!='none'){ + $res.="/BaseEncoding /".$o['info']['encoding']."\n"; + } + $res.="/Differences \n["; + $onum=-100; + foreach($o['info']['differences'] as $num=>$label){ + if ($num!=$onum+1){ + // we cannot make use of consecutive numbering + $res.= "\n".$num." /".$label; + } else { + $res.= " /".$label; + } + $onum=$num; + } + $res.="\n]\n>>\nendobj"; + return $res; + break; + } +} + +/** +* the document procset, solves some problems with printing to old PS printers +*/ +function o_procset($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'procset','info'=>array('PDF'=>1,'Text'=>1)); + $this->o_pages($this->currentNode,'procset',$id); + $this->procsetObjectId=$id; + break; + case 'add': + // this is to add new items to the procset list, despite the fact that this is considered + // obselete, the items are required for printing to some postscript printers + switch ($options) { + case 'ImageB': + case 'ImageC': + case 'ImageI': + $o['info'][$options]=1; + break; + } + break; + case 'out': + $res="\n".$id." 0 obj\n["; + foreach ($o['info'] as $label=>$val){ + $res.='/'.$label.' '; + } + $res.="]\nendobj"; + return $res; + break; + } +} + +/** +* define the document information +*/ +function o_info($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->infoObject=$id; + $date='D:'.date('Ymd'); + $this->objects[$id]=array('t'=>'info','info'=>array('Creator'=>'R and OS php pdf writer, http://www.ros.co.nz','CreationDate'=>$date)); + break; + case 'Title': + case 'Author': + case 'Subject': + case 'Keywords': + case 'Creator': + case 'Producer': + case 'CreationDate': + case 'ModDate': + case 'Trapped': + $o['info'][$action]=$options; + break; + case 'out': + if ($this->encrypted){ + $this->encryptInit($id); + } + $res="\n".$id." 0 obj\n<<\n"; + foreach ($o['info'] as $k=>$v){ + $res.='/'.$k.' ('; + if ($this->encrypted){ + $res.=$this->filterText($this->ARC4($v)); + } else { + $res.=$this->filterText($v); + } + $res.=")\n"; + } + $res.=">>\nendobj"; + return $res; + break; + } +} + +/** +* an action object, used to link to URLS initially +*/ +function o_action($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + if (is_array($options)){ + $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>$options['type']); + } else { + // then assume a URI action + $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>'URI'); + } + break; + case 'out': + if ($this->encrypted){ + $this->encryptInit($id); + } + $res="\n".$id." 0 obj\n<< /Type /Action"; + switch($o['type']){ + case 'ilink': + // there will be an 'label' setting, this is the name of the destination + $res.="\n/S /GoTo\n/D ".$this->destinations[(string)$o['info']['label']]." 0 R"; + break; + case 'URI': + $res.="\n/S /URI\n/URI ("; + if ($this->encrypted){ + $res.=$this->filterText($this->ARC4($o['info'])); + } else { + $res.=$this->filterText($o['info']); + } + $res.=")"; + break; + } + $res.="\n>>\nendobj"; + return $res; + break; + } +} + +/** +* an annotation object, this will add an annotation to the current page. +* initially will support just link annotations +*/ +function o_annotation($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + // add the annotation to the current page + $pageId = $this->currentPage; + $this->o_page($pageId,'annot',$id); + // and add the action object which is going to be required + switch($options['type']){ + case 'link': + $this->objects[$id]=array('t'=>'annotation','info'=>$options); + $this->numObj++; + $this->o_action($this->numObj,'new',$options['url']); + $this->objects[$id]['info']['actionId']=$this->numObj; + break; + case 'ilink': + // this is to a named internal link + $label = $options['label']; + $this->objects[$id]=array('t'=>'annotation','info'=>$options); + $this->numObj++; + $this->o_action($this->numObj,'new',array('type'=>'ilink','label'=>$label)); + $this->objects[$id]['info']['actionId']=$this->numObj; + break; + } + break; + case 'out': + $res="\n".$id." 0 obj\n<< /Type /Annot"; + switch($o['info']['type']){ + case 'link': + case 'ilink': + $res.= "\n/Subtype /Link"; + break; + } + $res.="\n/A ".$o['info']['actionId']." 0 R"; + $res.="\n/Border [0 0 0]"; + $res.="\n/H /I"; + $res.="\n/Rect [ "; + foreach($o['info']['rect'] as $v){ + $res.= sprintf("%.4f ",$v); + } + $res.="]"; + $res.="\n>>\nendobj"; + return $res; + break; + } +} + +/** +* a page object, it also creates a contents object to hold its contents +*/ +function o_page($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->numPages++; + $this->objects[$id]=array('t'=>'page','info'=>array('parent'=>$this->currentNode,'pageNum'=>$this->numPages)); + if (is_array($options)){ + // then this must be a page insertion, array shoudl contain 'rid','pos'=[before|after] + $options['id']=$id; + $this->o_pages($this->currentNode,'page',$options); + } else { + $this->o_pages($this->currentNode,'page',$id); + } + $this->currentPage=$id; + //make a contents object to go with this page + $this->numObj++; + $this->o_contents($this->numObj,'new',$id); + $this->currentContents=$this->numObj; + $this->objects[$id]['info']['contents']=array(); + $this->objects[$id]['info']['contents'][]=$this->numObj; + $match = ($this->numPages%2 ? 'odd' : 'even'); + foreach($this->addLooseObjects as $oId=>$target){ + if ($target=='all' || $match==$target){ + $this->objects[$id]['info']['contents'][]=$oId; + } + } + break; + case 'content': + $o['info']['contents'][]=$options; + break; + case 'annot': + // add an annotation to this page + if (!isset($o['info']['annot'])){ + $o['info']['annot']=array(); + } + // $options should contain the id of the annotation dictionary + $o['info']['annot'][]=$options; + break; + case 'out': + $res="\n".$id." 0 obj\n<< /Type /Page"; + $res.="\n/Parent ".$o['info']['parent']." 0 R"; + if (isset($o['info']['annot'])){ + $res.="\n/Annots ["; + foreach($o['info']['annot'] as $aId){ + $res.=" ".$aId." 0 R"; + } + $res.=" ]"; + } + $count = count($o['info']['contents']); + if ($count==1){ + $res.="\n/Contents ".$o['info']['contents'][0]." 0 R"; + } else if ($count>1){ + $res.="\n/Contents [\n"; + foreach ($o['info']['contents'] as $cId){ + $res.=$cId." 0 R\n"; + } + $res.="]"; + } + $res.="\n>>\nendobj"; + return $res; + break; + } +} + +/** +* the contents objects hold all of the content which appears on pages +*/ +function o_contents($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch ($action){ + case 'new': + $this->objects[$id]=array('t'=>'contents','c'=>'','info'=>array()); + if (strlen($options) && intval($options)){ + // then this contents is the primary for a page + $this->objects[$id]['onPage']=$options; + } else if ($options=='raw'){ + // then this page contains some other type of system object + $this->objects[$id]['raw']=1; + } + break; + case 'add': + // add more options to the decleration + foreach ($options as $k=>$v){ + $o['info'][$k]=$v; + } + case 'out': + $tmp=$o['c']; + $res= "\n".$id." 0 obj\n"; + if (isset($this->objects[$id]['raw'])){ + $res.=$tmp; + } else { + $res.= "<<"; + if (function_exists('gzcompress') && $this->options['compression']){ + // then implement ZLIB based compression on this content stream + $res.=" /Filter /FlateDecode"; + $tmp = gzcompress($tmp); + } + if ($this->encrypted){ + $this->encryptInit($id); + $tmp = $this->ARC4($tmp); + } + foreach($o['info'] as $k=>$v){ + $res .= "\n/".$k.' '.$v; + } + $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream"; + } + $res.="\nendobj\n"; + return $res; + break; + } +} + +/** +* an image object, will be an XObject in the document, includes description and data +*/ +function o_image($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch($action){ + case 'new': + // make the new object + $this->objects[$id]=array('t'=>'image','data'=>$options['data'],'info'=>array()); + $this->objects[$id]['info']['Type']='/XObject'; + $this->objects[$id]['info']['Subtype']='/Image'; + $this->objects[$id]['info']['Width']=$options['iw']; + $this->objects[$id]['info']['Height']=$options['ih']; + if (!isset($options['type']) || $options['type']=='jpg'){ + if (!isset($options['channels'])){ + $options['channels']=3; + } + switch($options['channels']){ + case 1: + $this->objects[$id]['info']['ColorSpace']='/DeviceGray'; + break; + default: + $this->objects[$id]['info']['ColorSpace']='/DeviceRGB'; + break; + } + $this->objects[$id]['info']['Filter']='/DCTDecode'; + $this->objects[$id]['info']['BitsPerComponent']=8; + } else if ($options['type']=='png'){ + $this->objects[$id]['info']['Filter']='/FlateDecode'; + $this->objects[$id]['info']['DecodeParms']='<< /Predictor 15 /Colors '.$options['ncolor'].' /Columns '.$options['iw'].' /BitsPerComponent '.$options['bitsPerComponent'].'>>'; + if (strlen($options['pdata'])){ + $tmp = ' [ /Indexed /DeviceRGB '.(strlen($options['pdata'])/3-1).' '; + $this->numObj++; + $this->o_contents($this->numObj,'new'); + $this->objects[$this->numObj]['c']=$options['pdata']; + $tmp.=$this->numObj.' 0 R'; + $tmp .=' ]'; + $this->objects[$id]['info']['ColorSpace'] = $tmp; + if (isset($options['transparency'])){ + switch($options['transparency']['type']){ + case 'indexed': + $tmp=' [ '.$options['transparency']['data'].' '.$options['transparency']['data'].'] '; + $this->objects[$id]['info']['Mask'] = $tmp; + break; + } + } + } else { + $this->objects[$id]['info']['ColorSpace']='/'.$options['color']; + } + $this->objects[$id]['info']['BitsPerComponent']=$options['bitsPerComponent']; + } + // assign it a place in the named resource dictionary as an external object, according to + // the label passed in with it. + $this->o_pages($this->currentNode,'xObject',array('label'=>$options['label'],'objNum'=>$id)); + // also make sure that we have the right procset object for it. + $this->o_procset($this->procsetObjectId,'add','ImageC'); + break; + case 'out': + $tmp=$o['data']; + $res= "\n".$id." 0 obj\n<<"; + foreach($o['info'] as $k=>$v){ + $res.="\n/".$k.' '.$v; + } + if ($this->encrypted){ + $this->encryptInit($id); + $tmp = $this->ARC4($tmp); + } + $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n"; + return $res; + break; + } +} + +/** +* encryption object. +*/ +function o_encryption($id,$action,$options=''){ + if ($action!='new'){ + $o =& $this->objects[$id]; + } + switch($action){ + case 'new': + // make the new object + $this->objects[$id]=array('t'=>'encryption','info'=>$options); + $this->arc4_objnum=$id; + // figure out the additional paramaters required + $pad = chr(0x28).chr(0xBF).chr(0x4E).chr(0x5E).chr(0x4E).chr(0x75).chr(0x8A).chr(0x41).chr(0x64).chr(0x00).chr(0x4E).chr(0x56).chr(0xFF).chr(0xFA).chr(0x01).chr(0x08).chr(0x2E).chr(0x2E).chr(0x00).chr(0xB6).chr(0xD0).chr(0x68).chr(0x3E).chr(0x80).chr(0x2F).chr(0x0C).chr(0xA9).chr(0xFE).chr(0x64).chr(0x53).chr(0x69).chr(0x7A); + $len = strlen($options['owner']); + if ($len>32){ + $owner = substr($options['owner'],0,32); + } else if ($len<32){ + $owner = $options['owner'].substr($pad,0,32-$len); + } else { + $owner = $options['owner']; + } + $len = strlen($options['user']); + if ($len>32){ + $user = substr($options['user'],0,32); + } else if ($len<32){ + $user = $options['user'].substr($pad,0,32-$len); + } else { + $user = $options['user']; + } + $tmp = $this->md5_16($owner); + $okey = substr($tmp,0,5); + $this->ARC4_init($okey); + $ovalue=$this->ARC4($user); + $this->objects[$id]['info']['O']=$ovalue; + // now make the u value, phew. + $tmp = $this->md5_16($user.$ovalue.chr($options['p']).chr(255).chr(255).chr(255).$this->fileIdentifier); + $ukey = substr($tmp,0,5); + + $this->ARC4_init($ukey); + $this->encryptionKey = $ukey; + $this->encrypted=1; + $uvalue=$this->ARC4($pad); + + $this->objects[$id]['info']['U']=$uvalue; + $this->encryptionKey=$ukey; + + // initialize the arc4 array + break; + case 'out': + $res= "\n".$id." 0 obj\n<<"; + $res.="\n/Filter /Standard"; + $res.="\n/V 1"; + $res.="\n/R 2"; + $res.="\n/O (".$this->filterText($o['info']['O']).')'; + $res.="\n/U (".$this->filterText($o['info']['U']).')'; + // and the p-value needs to be converted to account for the twos-complement approach + $o['info']['p'] = (($o['info']['p']^255)+1)*-1; + $res.="\n/P ".($o['info']['p']); + $res.="\n>>\nendobj\n"; + + return $res; + break; + } +} + +/** +* ARC4 functions +* A series of function to implement ARC4 encoding in PHP +*/ + +/** +* calculate the 16 byte version of the 128 bit md5 digest of the string +*/ +function md5_16($string){ + $tmp = md5($string); + $out=''; + for ($i=0;$i<=30;$i=$i+2){ + $out.=chr(hexdec(substr($tmp,$i,2))); + } + return $out; +} + +/** +* initialize the encryption for processing a particular object +*/ +function encryptInit($id){ + $tmp = $this->encryptionKey; + $hex = dechex($id); + if (strlen($hex)<6){ + $hex = substr('000000',0,6-strlen($hex)).$hex; + } + $tmp.= chr(hexdec(substr($hex,4,2))).chr(hexdec(substr($hex,2,2))).chr(hexdec(substr($hex,0,2))).chr(0).chr(0); + $key = $this->md5_16($tmp); + $this->ARC4_init(substr($key,0,10)); +} + +/** +* initialize the ARC4 encryption +*/ +function ARC4_init($key=''){ + $this->arc4 = ''; + // setup the control array + if (strlen($key)==0){ + return; + } + $k = ''; + while(strlen($k)<256){ + $k.=$key; + } + $k=substr($k,0,256); + for ($i=0;$i<256;$i++){ + $this->arc4 .= chr($i); + } + $j=0; + for ($i=0;$i<256;$i++){ + $t = $this->arc4[$i]; + $j = ($j + ord($t) + ord($k[$i]))%256; + $this->arc4[$i]=$this->arc4[$j]; + $this->arc4[$j]=$t; + } +} + +/** +* ARC4 encrypt a text string +*/ +function ARC4($text){ + $len=strlen($text); + $a=0; + $b=0; + $c = $this->arc4; + $out=''; + for ($i=0;$i<$len;$i++){ + $a = ($a+1)%256; + $t= $c[$a]; + $b = ($b+ord($t))%256; + $c[$a]=$c[$b]; + $c[$b]=$t; + $k = ord($c[(ord($c[$a])+ord($c[$b]))%256]); + $out.=chr(ord($text[$i]) ^ $k); + } + + return $out; +} + +/** +* functions which can be called to adjust or add to the document +*/ + +/** +* add a link in the document to an external URL +*/ +function addLink($url,$x0,$y0,$x1,$y1){ + $this->numObj++; + $info = array('type'=>'link','url'=>$url,'rect'=>array($x0,$y0,$x1,$y1)); + $this->o_annotation($this->numObj,'new',$info); +} + +/** +* add a link in the document to an internal destination (ie. within the document) +*/ +function addInternalLink($label,$x0,$y0,$x1,$y1){ + $this->numObj++; + $info = array('type'=>'ilink','label'=>$label,'rect'=>array($x0,$y0,$x1,$y1)); + $this->o_annotation($this->numObj,'new',$info); +} + +/** +* set the encryption of the document +* can be used to turn it on and/or set the passwords which it will have. +* also the functions that the user will have are set here, such as print, modify, add +*/ +function setEncryption($userPass='',$ownerPass='',$pc=array()){ + $p=bindec(11000000); + + $options = array( + 'print'=>4 + ,'modify'=>8 + ,'copy'=>16 + ,'add'=>32 + ); + foreach($pc as $k=>$v){ + if ($v && isset($options[$k])){ + $p+=$options[$k]; + } else if (isset($options[$v])){ + $p+=$options[$v]; + } + } + // implement encryption on the document + if ($this->arc4_objnum == 0){ + // then the block does not exist already, add it. + $this->numObj++; + if (strlen($ownerPass)==0){ + $ownerPass=$userPass; + } + $this->o_encryption($this->numObj,'new',array('user'=>$userPass,'owner'=>$ownerPass,'p'=>$p)); + } +} + +/** +* should be used for internal checks, not implemented as yet +*/ +function checkAllHere(){ +} + +/** +* return the pdf stream as a string returned from the function +*/ +function output($debug=0){ + + if ($debug){ + // turn compression off + $this->options['compression']=0; + } + + if ($this->arc4_objnum){ + $this->ARC4_init($this->encryptionKey); + } + + $this->checkAllHere(); + + $xref=array(); + $content="%PDF-1.3\n%âãÏÓ\n"; +// $content="%PDF-1.3\n"; + $pos=strlen($content); + foreach($this->objects as $k=>$v){ + $tmp='o_'.$v['t']; + $cont=$this->$tmp($k,'out'); + $content.=$cont; + $xref[]=$pos; + $pos+=strlen($cont); + } + $content.="\nxref\n0 ".(count($xref)+1)."\n0000000000 65535 f \n"; + foreach($xref as $p){ + $content.=substr('0000000000',0,10-strlen($p)).$p." 00000 n \n"; + } + $content.="\ntrailer\n << /Size ".(count($xref)+1)."\n /Root 1 0 R\n /Info ".$this->infoObject." 0 R\n"; + // if encryption has been applied to this document then add the marker for this dictionary + if ($this->arc4_objnum > 0){ + $content .= "/Encrypt ".$this->arc4_objnum." 0 R\n"; + } + if (strlen($this->fileIdentifier)){ + $content .= "/ID[<".$this->fileIdentifier."><".$this->fileIdentifier.">]\n"; + } + $content .= " >>\nstartxref\n".$pos."\n%%EOF\n"; + return $content; +} + +/** +* intialize a new document +* if this is called on an existing document results may be unpredictable, but the existing document would be lost at minimum +* this function is called automatically by the constructor function +* +* @access private +*/ +function newDocument($pageSize=array(0,0,612,792)){ + $this->numObj=0; + $this->objects = array(); + + $this->numObj++; + $this->o_catalog($this->numObj,'new'); + + $this->numObj++; + $this->o_outlines($this->numObj,'new'); + + $this->numObj++; + $this->o_pages($this->numObj,'new'); + + $this->o_pages($this->numObj,'mediaBox',$pageSize); + $this->currentNode = 3; + + $this->numObj++; + $this->o_procset($this->numObj,'new'); + + $this->numObj++; + $this->o_info($this->numObj,'new'); + + $this->numObj++; + $this->o_page($this->numObj,'new'); + + // need to store the first page id as there is no way to get it to the user during + // startup + $this->firstPageId = $this->currentContents; +} + +/** +* open the font file and return a php structure containing it. +* first check if this one has been done before and saved in a form more suited to php +* note that if a php serialized version does not exist it will try and make one, but will +* require write access to the directory to do it... it is MUCH faster to have these serialized +* files. +* +* @access private +*/ +function openFont($font){ + // assume that $font contains both the path and perhaps the extension to the file, split them + $pos=strrpos($font,'/'); + if ($pos===false){ + $dir = './'; + $name = $font; + } else { + $dir=substr($font,0,$pos+1); + $name=substr($font,$pos+1); + } + + if (substr($name,-4)=='.afm'){ + $name=substr($name,0,strlen($name)-4); + } + $this->addMessage('openFont: '.$font.' - '.$name); + if (file_exists($dir.'php_'.$name.'.afm')){ + $this->addMessage('openFont: php file exists '.$dir.'php_'.$name.'.afm'); + $tmp = file($dir.'php_'.$name.'.afm'); + $this->fonts[$font]=unserialize($tmp[0]); + if (!isset($this->fonts[$font]['_version_']) || $this->fonts[$font]['_version_']<1){ + // if the font file is old, then clear it out and prepare for re-creation + $this->addMessage('openFont: clear out, make way for new version.'); + unset($this->fonts[$font]); + } + } + if (!isset($this->fonts[$font]) && file_exists($dir.$name.'.afm')){ + // then rebuild the php_.afm file from the .afm file + $this->addMessage('openFont: build php file from '.$dir.$name.'.afm'); + $data = array(); + $file = file($dir.$name.'.afm'); + foreach ($file as $rowA){ + $row=trim($rowA); + $pos=strpos($row,' '); + if ($pos){ + // then there must be some keyword + $key = substr($row,0,$pos); + switch ($key){ + case 'FontName': + case 'FullName': + case 'FamilyName': + case 'Weight': + case 'ItalicAngle': + case 'IsFixedPitch': + case 'CharacterSet': + case 'UnderlinePosition': + case 'UnderlineThickness': + case 'Version': + case 'EncodingScheme': + case 'CapHeight': + case 'XHeight': + case 'Ascender': + case 'Descender': + case 'StdHW': + case 'StdVW': + case 'StartCharMetrics': + $data[$key]=trim(substr($row,$pos)); + break; + case 'FontBBox': + $data[$key]=explode(' ',trim(substr($row,$pos))); + break; + case 'C': + //C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ; + $bits=explode(';',trim($row)); + $dtmp=array(); + foreach($bits as $bit){ + $bits2 = explode(' ',trim($bit)); + if (strlen($bits2[0])){ + if (count($bits2)>2){ + $dtmp[$bits2[0]]=array(); + for ($i=1;$i=0){ + $data['C'][$dtmp['C']]=$dtmp; + $data['C'][$dtmp['N']]=$dtmp; + } else { + $data['C'][$dtmp['N']]=$dtmp; + } + break; + case 'KPX': + //KPX Adieresis yacute -40 + $bits=explode(' ',trim($row)); + $data['KPX'][$bits[1]][$bits[2]]=$bits[3]; + break; + } + } + } + $data['_version_']=1; + $this->fonts[$font]=$data; + $fp = fopen($dir.'php_'.$name.'.afm','w'); + fwrite($fp,serialize($data)); + fclose($fp); + } else if (!isset($this->fonts[$font])){ + $this->addMessage('openFont: no font file found'); +// echo 'Font not Found '.$font; + } +} + +/** +* if the font is not loaded then load it and make the required object +* else just make it the current font +* the encoding array can contain 'encoding'=> 'none','WinAnsiEncoding','MacRomanEncoding' or 'MacExpertEncoding' +* note that encoding='none' will need to be used for symbolic fonts +* and 'differences' => an array of mappings between numbers 0->255 and character names. +* +*/ +function selectFont($fontName,$encoding='',$set=1){ + if (!isset($this->fonts[$fontName])){ + // load the file + $this->openFont($fontName); + if (isset($this->fonts[$fontName])){ + $this->numObj++; + $this->numFonts++; + $pos=strrpos($fontName,'/'); +// $dir=substr($fontName,0,$pos+1); + $name=substr($fontName,$pos+1); + if (substr($name,-4)=='.afm'){ + $name=substr($name,0,strlen($name)-4); + } + $options=array('name'=>$name); + if (is_array($encoding)){ + // then encoding and differences might be set + if (isset($encoding['encoding'])){ + $options['encoding']=$encoding['encoding']; + } + if (isset($encoding['differences'])){ + $options['differences']=$encoding['differences']; + } + } else if (strlen($encoding)){ + // then perhaps only the encoding has been set + $options['encoding']=$encoding; + } + $fontObj = $this->numObj; + $this->o_font($this->numObj,'new',$options); + $this->fonts[$fontName]['fontNum']=$this->numFonts; + // if this is a '.afm' font, and there is a '.pfa' file to go with it ( as there + // should be for all non-basic fonts), then load it into an object and put the + // references into the font object + $basefile = substr($fontName,0,strlen($fontName)-4); + if (file_exists($basefile.'.pfb')){ + $fbtype = 'pfb'; + } else if (file_exists($basefile.'.ttf')){ + $fbtype = 'ttf'; + } else { + $fbtype=''; + } + $fbfile = $basefile.'.'.$fbtype; + +// $pfbfile = substr($fontName,0,strlen($fontName)-4).'.pfb'; +// $ttffile = substr($fontName,0,strlen($fontName)-4).'.ttf'; + $this->addMessage('selectFont: checking for - '.$fbfile); + if (substr($fontName,-4)=='.afm' && strlen($fbtype) ){ + $adobeFontName = $this->fonts[$fontName]['FontName']; +// $fontObj = $this->numObj; + $this->addMessage('selectFont: adding font file - '.$fbfile.' - '.$adobeFontName); + // find the array of fond widths, and put that into an object. + $firstChar = -1; + $lastChar = 0; + $widths = array(); + foreach ($this->fonts[$fontName]['C'] as $num=>$d){ + if (intval($num)>0 || $num=='0'){ + if ($lastChar>0 && $num>$lastChar+1){ + for($i=$lastChar+1;$i<$num;$i++){ + $widths[] = 0; + } + } + $widths[] = $d['WX']; + if ($firstChar==-1){ + $firstChar = $num; + } + $lastChar = $num; + } + } + // also need to adjust the widths for the differences array + if (isset($options['differences'])){ + foreach($options['differences'] as $charNum=>$charName){ + if ($charNum>$lastChar){ + for($i=$lastChar+1;$i<=$charNum;$i++){ + $widths[]=0; + } + $lastChar=$charNum; + } + if (isset($this->fonts[$fontName]['C'][$charName])){ + $widths[$charNum-$firstChar]=$this->fonts[$fontName]['C'][$charName]['WX']; + } + } + } + $this->addMessage('selectFont: FirstChar='.$firstChar); + $this->addMessage('selectFont: LastChar='.$lastChar); + $this->numObj++; + $this->o_contents($this->numObj,'new','raw'); + $this->objects[$this->numObj]['c'].='['; + foreach($widths as $width){ + $this->objects[$this->numObj]['c'].=' '.$width; + } + $this->objects[$this->numObj]['c'].=' ]'; + $widthid = $this->numObj; + + // load the pfb file, and put that into an object too. + // note that pdf supports only binary format type 1 font files, though there is a + // simple utility to convert them from pfa to pfb. + $fp = fopen($fbfile,'rb'); + $tmp = get_magic_quotes_runtime(); + //set_magic_quotes_runtime(0); + $data = fread($fp,filesize($fbfile)); + //set_magic_quotes_runtime($tmp); + fclose($fp); + + // create the font descriptor + $this->numObj++; + $fontDescriptorId = $this->numObj; + $this->numObj++; + $pfbid = $this->numObj; + // determine flags (more than a little flakey, hopefully will not matter much) + $flags=0; + if ($this->fonts[$fontName]['ItalicAngle']!=0){ $flags+=pow(2,6); } + if ($this->fonts[$fontName]['IsFixedPitch']=='true'){ $flags+=1; } + $flags+=pow(2,5); // assume non-sybolic + + $list = array('Ascent'=>'Ascender','CapHeight'=>'CapHeight','Descent'=>'Descender','FontBBox'=>'FontBBox','ItalicAngle'=>'ItalicAngle'); + $fdopt = array( + 'Flags'=>$flags + ,'FontName'=>$adobeFontName + ,'StemV'=>100 // don't know what the value for this should be! + ); + foreach($list as $k=>$v){ + if (isset($this->fonts[$fontName][$v])){ + $fdopt[$k]=$this->fonts[$fontName][$v]; + } + } + + if ($fbtype=='pfb'){ + $fdopt['FontFile']=$pfbid; + } else if ($fbtype=='ttf'){ + $fdopt['FontFile2']=$pfbid; + } + $this->o_fontDescriptor($fontDescriptorId,'new',$fdopt); + + // embed the font program + $this->o_contents($this->numObj,'new'); + $this->objects[$pfbid]['c'].=$data; + // determine the cruicial lengths within this file + if ($fbtype=='pfb'){ + $l1 = strpos($data,'eexec')+6; + $l2 = strpos($data,'00000000')-$l1; + $l3 = strlen($data)-$l2-$l1; + $this->o_contents($this->numObj,'add',array('Length1'=>$l1,'Length2'=>$l2,'Length3'=>$l3)); + } else if ($fbtype=='ttf'){ + $l1 = strlen($data); + $this->o_contents($this->numObj,'add',array('Length1'=>$l1)); + } + + + // tell the font object about all this new stuff + $tmp = array('BaseFont'=>$adobeFontName,'Widths'=>$widthid + ,'FirstChar'=>$firstChar,'LastChar'=>$lastChar + ,'FontDescriptor'=>$fontDescriptorId); + if ($fbtype=='ttf'){ + $tmp['SubType']='TrueType'; + } + $this->addMessage('adding extra info to font.('.$fontObj.')'); + foreach($tmp as $fk=>$fv){ + $this->addMessage($fk." : ".$fv); + } + $this->o_font($fontObj,'add',$tmp); + + } else { + $this->addMessage('selectFont: pfb or ttf file not found, ok if this is one of the 14 standard fonts'); + } + + + // also set the differences here, note that this means that these will take effect only the + //first time that a font is selected, else they are ignored + if (isset($options['differences'])){ + $this->fonts[$fontName]['differences']=$options['differences']; + } + } + } + if ($set && isset($this->fonts[$fontName])){ + // so if for some reason the font was not set in the last one then it will not be selected + $this->currentBaseFont=$fontName; + // the next line means that if a new font is selected, then the current text state will be + // applied to it as well. + $this->setCurrentFont(); + } + return $this->currentFontNum; +} + +/** +* sets up the current font, based on the font families, and the current text state +* note that this system is quite flexible, a font can be completely different to a +* font, and even will have to be defined within the family to have meaning +* This function is to be called whenever the currentTextState is changed, it will update +* the currentFont setting to whatever the appropriatte family one is. +* If the user calls selectFont themselves then that will reset the currentBaseFont, and the currentFont +* This function will change the currentFont to whatever it should be, but will not change the +* currentBaseFont. +* +* @access private +*/ +function setCurrentFont(){ + if (strlen($this->currentBaseFont)==0){ + // then assume an initial font + $this->selectFont('./fonts/Helvetica.afm'); + } + $cf = substr($this->currentBaseFont,strrpos($this->currentBaseFont,'/')+1); + if (strlen($this->currentTextState) + && isset($this->fontFamilies[$cf]) + && isset($this->fontFamilies[$cf][$this->currentTextState])){ + // then we are in some state or another + // and this font has a family, and the current setting exists within it + // select the font, then return it + $nf = substr($this->currentBaseFont,0,strrpos($this->currentBaseFont,'/')+1).$this->fontFamilies[$cf][$this->currentTextState]; + $this->selectFont($nf,'',0); + $this->currentFont = $nf; + $this->currentFontNum = $this->fonts[$nf]['fontNum']; + } else { + // the this font must not have the right family member for the current state + // simply assume the base font + $this->currentFont = $this->currentBaseFont; + $this->currentFontNum = $this->fonts[$this->currentFont]['fontNum']; + } +} + +/** +* function for the user to find out what the ID is of the first page that was created during +* startup - useful if they wish to add something to it later. +*/ +function getFirstPageId(){ + return $this->firstPageId; +} + +/** +* add content to the currently active object +* +* @access private +*/ +function addContent($content){ + $this->objects[$this->currentContents]['c'].=$content; +} + +/** +* sets the colour for fill operations +*/ +function setColor($r,$g,$b,$force=0){ + if ($r>=0 && ($force || $r!=$this->currentColour['r'] || $g!=$this->currentColour['g'] || $b!=$this->currentColour['b'])){ + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$r).' '.sprintf('%.3f',$g).' '.sprintf('%.3f',$b).' rg'; + $this->currentColour=array('r'=>$r,'g'=>$g,'b'=>$b); + } +} + +/** +* sets the colour for stroke operations +*/ +function setStrokeColor($r,$g,$b,$force=0){ + if ($r>=0 && ($force || $r!=$this->currentStrokeColour['r'] || $g!=$this->currentStrokeColour['g'] || $b!=$this->currentStrokeColour['b'])){ + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$r).' '.sprintf('%.3f',$g).' '.sprintf('%.3f',$b).' RG'; + $this->currentStrokeColour=array('r'=>$r,'g'=>$g,'b'=>$b); + } +} + +/** +* draw a line from one set of coordinates to another +*/ +function line($x1,$y1,$x2,$y2){ + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' m '.sprintf('%.3f',$x2).' '.sprintf('%.3f',$y2).' l S'; +} + +/** +* draw a bezier curve based on 4 control points +*/ +function curve($x0,$y0,$x1,$y1,$x2,$y2,$x3,$y3){ + // in the current line style, draw a bezier curve from (x0,y0) to (x3,y3) using the other two points + // as the control points for the curve. + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' m '.sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1); + $this->objects[$this->currentContents]['c'].= ' '.sprintf('%.3f',$x2).' '.sprintf('%.3f',$y2).' '.sprintf('%.3f',$x3).' '.sprintf('%.3f',$y3).' c S'; +} + +/** +* draw a part of an ellipse +*/ +function partEllipse($x0,$y0,$astart,$afinish,$r1,$r2=0,$angle=0,$nSeg=8){ + $this->ellipse($x0,$y0,$r1,$r2,$angle,$nSeg,$astart,$afinish,0); +} + +/** +* draw a filled ellipse +*/ +function filledEllipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360){ + return $this->ellipse($x0,$y0,$r1,$r2=0,$angle,$nSeg,$astart,$afinish,1,1); +} + +/** +* draw an ellipse +* note that the part and filled ellipse are just special cases of this function +* +* draws an ellipse in the current line style +* centered at $x0,$y0, radii $r1,$r2 +* if $r2 is not set, then a circle is drawn +* nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a +* pretty crappy shape at 2, as we are approximating with bezier curves. +*/ +function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0){ + if ($r1==0){ + return; + } + if ($r2==0){ + $r2=$r1; + } + if ($nSeg<2){ + $nSeg=2; + } + + $astart = deg2rad((float)$astart); + $afinish = deg2rad((float)$afinish); + $totalAngle =$afinish-$astart; + + $dt = $totalAngle/$nSeg; + $dtm = $dt/3; + + if ($angle != 0){ + $a = -1*deg2rad((float)$angle); + $tmp = "\n q "; + $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; + $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm'; + $this->objects[$this->currentContents]['c'].= $tmp; + $x0=0; + $y0=0; + } + + $t1 = $astart; + $a0 = $x0+$r1*cos($t1); + $b0 = $y0+$r2*sin($t1); + $c0 = -$r1*sin($t1); + $d0 = $r2*cos($t1); + + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$a0).' '.sprintf('%.3f',$b0).' m '; + for ($i=1;$i<=$nSeg;$i++){ + // draw this bit of the total curve + $t1 = $i*$dt+$astart; + $a1 = $x0+$r1*cos($t1); + $b1 = $y0+$r2*sin($t1); + $c1 = -$r1*sin($t1); + $d1 = $r2*cos($t1); + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',($a0+$c0*$dtm)).' '.sprintf('%.3f',($b0+$d0*$dtm)); + $this->objects[$this->currentContents]['c'].= ' '.sprintf('%.3f',($a1-$c1*$dtm)).' '.sprintf('%.3f',($b1-$d1*$dtm)).' '.sprintf('%.3f',$a1).' '.sprintf('%.3f',$b1).' c'; + $a0=$a1; + $b0=$b1; + $c0=$c1; + $d0=$d1; + } + if ($fill){ + $this->objects[$this->currentContents]['c'].=' f'; + } else { + if ($close){ + $this->objects[$this->currentContents]['c'].=' s'; // small 's' signifies closing the path as well + } else { + $this->objects[$this->currentContents]['c'].=' S'; + } + } + if ($angle !=0){ + $this->objects[$this->currentContents]['c'].=' Q'; + } +} + +/** +* this sets the line drawing style. +* width, is the thickness of the line in user units +* cap is the type of cap to put on the line, values can be 'butt','round','square' +* where the diffference between 'square' and 'butt' is that 'square' projects a flat end past the +* end of the line. +* join can be 'miter', 'round', 'bevel' +* dash is an array which sets the dash pattern, is a series of length values, which are the lengths of the +* on and off dashes. +* (2) represents 2 on, 2 off, 2 on , 2 off ... +* (2,1) is 2 on, 1 off, 2 on, 1 off.. etc +* phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts. +*/ +function setLineStyle($width=1,$cap='',$join='',$dash='',$phase=0){ + + // this is quite inefficient in that it sets all the parameters whenever 1 is changed, but will fix another day + $string = ''; + if ($width>0){ + $string.= $width.' w'; + } + $ca = array('butt'=>0,'round'=>1,'square'=>2); + if (isset($ca[$cap])){ + $string.= ' '.$ca[$cap].' J'; + } + $ja = array('miter'=>0,'round'=>1,'bevel'=>2); + if (isset($ja[$join])){ + $string.= ' '.$ja[$join].' j'; + } + if (is_array($dash)){ + $string.= ' ['; + foreach ($dash as $len){ + $string.=' '.$len; + } + $string.= ' ] '.$phase.' d'; + } + $this->currentLineStyle = $string; + $this->objects[$this->currentContents]['c'].="\n".$string; +} + +/** +* draw a polygon, the syntax for this is similar to the GD polygon command +*/ +function polygon($p,$np,$f=0){ + $this->objects[$this->currentContents]['c'].="\n"; + $this->objects[$this->currentContents]['c'].=sprintf('%.3f',$p[0]).' '.sprintf('%.3f',$p[1]).' m '; + for ($i=2;$i<$np*2;$i=$i+2){ + $this->objects[$this->currentContents]['c'].= sprintf('%.3f',$p[$i]).' '.sprintf('%.3f',$p[$i+1]).' l '; + } + if ($f==1){ + $this->objects[$this->currentContents]['c'].=' f'; + } else { + $this->objects[$this->currentContents]['c'].=' S'; + } +} + +/** +* a filled rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not +* the coordinates of the upper-right corner +*/ +function filledRectangle($x1,$y1,$width,$height){ + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' '.sprintf('%.3f',$width).' '.sprintf('%.3f',$height).' re f'; +} + +/** +* draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not +* the coordinates of the upper-right corner +*/ +function rectangle($x1,$y1,$width,$height){ + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' '.sprintf('%.3f',$width).' '.sprintf('%.3f',$height).' re S'; +} + +/** +* add a new page to the document +* this also makes the new page the current active object +*/ +function newPage($insert=0,$id=0,$pos='after'){ + + // if there is a state saved, then go up the stack closing them + // then on the new page, re-open them with the right setings + + if ($this->nStateStack){ + for ($i=$this->nStateStack;$i>=1;$i--){ + $this->restoreState($i); + } + } + + $this->numObj++; + if ($insert){ + // the id from the ezPdf class is the od of the contents of the page, not the page object itself + // query that object to find the parent + $rid = $this->objects[$id]['onPage']; + $opt= array('rid'=>$rid,'pos'=>$pos); + $this->o_page($this->numObj,'new',$opt); + } else { + $this->o_page($this->numObj,'new'); + } + // if there is a stack saved, then put that onto the page + if ($this->nStateStack){ + for ($i=1;$i<=$this->nStateStack;$i++){ + $this->saveState($i); + } + } + // and if there has been a stroke or fill colour set, then transfer them + if ($this->currentColour['r']>=0){ + $this->setColor($this->currentColour['r'],$this->currentColour['g'],$this->currentColour['b'],1); + } + if ($this->currentStrokeColour['r']>=0){ + $this->setStrokeColor($this->currentStrokeColour['r'],$this->currentStrokeColour['g'],$this->currentStrokeColour['b'],1); + } + + // if there is a line style set, then put this in too + if (strlen($this->currentLineStyle)){ + $this->objects[$this->currentContents]['c'].="\n".$this->currentLineStyle; + } + + // the call to the o_page object set currentContents to the present page, so this can be returned as the page id + return $this->currentContents; +} + +/** +* output the pdf code, streaming it to the browser +* the relevant headers are set so that hopefully the browser will recognise it +*/ +function stream($options=''){ + // setting the options allows the adjustment of the headers + // values at the moment are: + // 'Content-Disposition'=>'filename' - sets the filename, though not too sure how well this will + // work as in my trial the browser seems to use the filename of the php file with .pdf on the end + // 'Accept-Ranges'=>1 or 0 - if this is not set to 1, then this header is not included, off by default + // this header seems to have caused some problems despite tha fact that it is supposed to solve + // them, so I am leaving it off by default. + // 'compress'=> 1 or 0 - apply content stream compression, this is on (1) by default + if (!is_array($options)){ + $options=array(); + } + if ( isset($options['compress']) && $options['compress']==0){ + $tmp = $this->output(1); + } else { + $tmp = $this->output(); + } + $badoutput = ob_get_contents(); + if(strlen($badoutput) > 0){ + ob_end_clean(); + } + header("Content-type: application/pdf"); + header("Content-Length: ".strlen(ltrim($tmp))); + $fileName = (isset($options['Content-Disposition'])?$options['Content-Disposition']:'file.pdf'); + header("Content-Disposition: attachment; filename=".$fileName); + if (isset($options['Accept-Ranges']) && $options['Accept-Ranges']==1){ + header("Accept-Ranges: ".strlen(ltrim($tmp))); + } + header("Expires: 0"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + header("Pragma: public"); + echo ltrim($tmp); +} + +/** +* return the height in units of the current font in the given size +*/ +function getFontHeight($size){ + if (!$this->numFonts){ + $this->selectFont('./fonts/Helvetica'); + } + // for the current font, and the given size, what is the height of the font in user units + $h = $this->fonts[$this->currentFont]['FontBBox'][3]-$this->fonts[$this->currentFont]['FontBBox'][1]; + return $size*$h/1000; +} + +/** +* return the font decender, this will normally return a negative number +* if you add this number to the baseline, you get the level of the bottom of the font +* it is in the pdf user units +*/ +function getFontDecender($size){ + // note that this will most likely return a negative value + if (!$this->numFonts){ + $this->selectFont('./fonts/Helvetica'); + } + $h = $this->fonts[$this->currentFont]['FontBBox'][1]; + return $size*$h/1000; +} + +/** +* filter the text, this is applied to all text just before being inserted into the pdf document +* it escapes the various things that need to be escaped, and so on +* +* @access private +*/ +function filterText($text){ + $text = str_replace('\\','\\\\',$text); + $text = str_replace('(','\(',$text); + $text = str_replace(')','\)',$text); + $text = str_replace('<','<',$text); + $text = str_replace('>','>',$text); + $text = str_replace(''','\'',$text); + $text = str_replace('"','"',$text); + $text = str_replace('&','&',$text); + + return $text; +} + +/** +* given a start position and information about how text is to be laid out, calculate where +* on the page the text will end +* +* @access private +*/ +function PRVTgetTextPosition($x,$y,$angle,$size,$wa,$text){ + // given this information return an array containing x and y for the end position as elements 0 and 1 + $w = $this->getTextWidth($size,$text); + // need to adjust for the number of spaces in this text + $words = explode(' ',$text); + $nspaces=count($words)-1; + $w += $wa*$nspaces; + $a = deg2rad((float)$angle); + return array(cos($a)*$w+$x,-sin($a)*$w+$y); +} + +/** +* wrapper function for PRVTcheckTextDirective1 +* +* @access private +*/ +function PRVTcheckTextDirective(&$text,$i,&$f){ + $x=0; + $y=0; + return $this->PRVTcheckTextDirective1($text,$i,$f,0,$x,$y); +} + +/** +* checks if the text stream contains a control directive +* if so then makes some changes and returns the number of characters involved in the directive +* this has been re-worked to include everything neccesary to fins the current writing point, so that +* the location can be sent to the callback function if required +* if the directive does not require a font change, then $f should be set to 0 +* +* @access private +*/ +function PRVTcheckTextDirective1(&$text,$i,&$f,$final,&$x,&$y,$size=0,$angle=0,$wordSpaceAdjust=0){ + $directive = 0; + $j=$i; + if ($text[$j]=='<'){ + $j++; + switch($text[$j]){ + case '/': + $j++; + if (strlen($text) <= $j){ + return $directive; + } + switch($text[$j]){ + case 'b': + case 'i': + $j++; + if ($text[$j]=='>'){ + $p = strrpos($this->currentTextState,$text[$j-1]); + if ($p !== false){ + // then there is one to remove + $this->currentTextState = substr($this->currentTextState,0,$p).substr($this->currentTextState,$p+1); + } + $directive=$j-$i+1; + } + break; + case 'c': + // this this might be a callback function + $j++; + $k = strpos($text,'>',$j); + if ($k!==false && $text[$j]==':'){ + // then this will be treated as a callback directive + $directive = $k-$i+1; + $f=0; + // split the remainder on colons to get the function name and the paramater + $tmp = substr($text,$j+1,$k-$j-1); + $b1 = strpos($tmp,':'); + if ($b1!==false){ + $func = substr($tmp,0,$b1); + $parm = substr($tmp,$b1+1); + } else { + $func=$tmp; + $parm=''; + } + if (!isset($func) || !strlen(trim($func))){ + $directive=0; + } else { + // only call the function if this is the final call + if ($final){ + // need to assess the text position, calculate the text width to this point + // can use getTextWidth to find the text width I think + $tmp = $this->PRVTgetTextPosition($x,$y,$angle,$size,$wordSpaceAdjust,substr($text,0,$i)); + $info = array('x'=>$tmp[0],'y'=>$tmp[1],'angle'=>$angle,'status'=>'end','p'=>$parm,'nCallback'=>$this->nCallback); + $x=$tmp[0]; + $y=$tmp[1]; + $ret = $this->$func($info); + if (is_array($ret)){ + // then the return from the callback function could set the position, to start with, later will do font colour, and font + foreach($ret as $rk=>$rv){ + switch($rk){ + case 'x': + case 'y': + $$rk=$rv; + break; + } + } + } + // also remove from to the stack + // for simplicity, just take from the end, fix this another day + $this->nCallback--; + if ($this->nCallback<0){ + $this->nCallBack=0; + } + } + } + } + break; + } + break; + case 'b': + case 'i': + $j++; + if ($text[$j]=='>'){ + $this->currentTextState.=$text[$j-1]; + $directive=$j-$i+1; + } + break; + case 'C': + $noClose=1; + case 'c': + // this this might be a callback function + $j++; + $k = strpos($text,'>',$j); + if ($k!==false && $text[$j]==':'){ + // then this will be treated as a callback directive + $directive = $k-$i+1; + $f=0; + // split the remainder on colons to get the function name and the paramater +// $bits = explode(':',substr($text,$j+1,$k-$j-1)); + $tmp = substr($text,$j+1,$k-$j-1); + $b1 = strpos($tmp,':'); + if ($b1!==false){ + $func = substr($tmp,0,$b1); + $parm = substr($tmp,$b1+1); + } else { + $func=$tmp; + $parm=''; + } + if (!isset($func) || !strlen(trim($func))){ + $directive=0; + } else { + // only call the function if this is the final call, ie, the one actually doing printing, not measurement + if ($final){ + // need to assess the text position, calculate the text width to this point + // can use getTextWidth to find the text width I think + // also add the text height and decender + $tmp = $this->PRVTgetTextPosition($x,$y,$angle,$size,$wordSpaceAdjust,substr($text,0,$i)); + $info = array('x'=>$tmp[0],'y'=>$tmp[1],'angle'=>$angle,'status'=>'start','p'=>$parm,'f'=>$func,'height'=>$this->getFontHeight($size),'decender'=>$this->getFontDecender($size)); + $x=$tmp[0]; + $y=$tmp[1]; + if (!isset($noClose) || !$noClose){ + // only add to the stack if this is a small 'c', therefore is a start-stop pair + $this->nCallback++; + $info['nCallback']=$this->nCallback; + $this->callback[$this->nCallback]=$info; + } + $ret = $this->$func($info); + if (is_array($ret)){ + // then the return from the callback function could set the position, to start with, later will do font colour, and font + foreach($ret as $rk=>$rv){ + switch($rk){ + case 'x': + case 'y': + $$rk=$rv; + break; + } + } + } + } + } + } + break; + } + } + return $directive; +} + +/** +* add text to the document, at a specified location, size and angle on the page +*/ +function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){ + if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');} + + // if there are any open callbacks, then they should be called, to show the start of the line + if ($this->nCallback>0){ + for ($i=$this->nCallback;$i>0;$i--){ + // call each function + $info = array('x'=>$x,'y'=>$y,'angle'=>$angle,'status'=>'sol','p'=>$this->callback[$i]['p'],'nCallback'=>$this->callback[$i]['nCallback'],'height'=>$this->callback[$i]['height'],'decender'=>$this->callback[$i]['decender']); + $func = $this->callback[$i]['f']; + $this->$func($info); + } + } + if ($angle==0){ + $this->objects[$this->currentContents]['c'].="\n".'BT '.sprintf('%.3f',$x).' '.sprintf('%.3f',$y).' Td'; + } else { + $a = deg2rad((float)$angle); + $tmp = "\n".'BT '; + $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; + $tmp .= sprintf('%.3f',$x).' '.sprintf('%.3f',$y).' Tm'; + $this->objects[$this->currentContents]['c'] .= $tmp; + } + if ($wordSpaceAdjust!=0 || $wordSpaceAdjust != $this->wordSpaceAdjust){ + $this->wordSpaceAdjust=$wordSpaceAdjust; + $this->objects[$this->currentContents]['c'].=' '.sprintf('%.3f',$wordSpaceAdjust).' Tw'; + } + $len=strlen($text); + $start=0; + for ($i=0;$i<$len;$i++){ + $f=1; + $directive = $this->PRVTcheckTextDirective($text,$i,$f); + if ($directive){ + // then we should write what we need to + if ($i>$start){ + $part = substr($text,$start,$i-$start); + $this->objects[$this->currentContents]['c'].=' /F'.$this->currentFontNum.' '.sprintf('%.1f',$size).' Tf '; + $this->objects[$this->currentContents]['c'].=' ('.$this->filterText($part).') Tj'; + } + if ($f){ + // then there was nothing drastic done here, restore the contents + $this->setCurrentFont(); + } else { + $this->objects[$this->currentContents]['c'] .= ' ET'; + $f=1; + $xp=$x; + $yp=$y; + $directive = $this->PRVTcheckTextDirective1($text,$i,$f,1,$xp,$yp,$size,$angle,$wordSpaceAdjust); + + // restart the text object + if ($angle==0){ + $this->objects[$this->currentContents]['c'].="\n".'BT '.sprintf('%.3f',$xp).' '.sprintf('%.3f',$yp).' Td'; + } else { + $a = deg2rad((float)$angle); + $tmp = "\n".'BT '; + $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; + $tmp .= sprintf('%.3f',$xp).' '.sprintf('%.3f',$yp).' Tm'; + $this->objects[$this->currentContents]['c'] .= $tmp; + } + if ($wordSpaceAdjust!=0 || $wordSpaceAdjust != $this->wordSpaceAdjust){ + $this->wordSpaceAdjust=$wordSpaceAdjust; + $this->objects[$this->currentContents]['c'].=' '.sprintf('%.3f',$wordSpaceAdjust).' Tw'; + } + } + // and move the writing point to the next piece of text + $i=$i+$directive-1; + $start=$i+1; + } + + } + if ($start<$len){ + $part = substr($text,$start); + $this->objects[$this->currentContents]['c'].=' /F'.$this->currentFontNum.' '.sprintf('%.1f',$size).' Tf '; + $this->objects[$this->currentContents]['c'].=' ('.$this->filterText($part).') Tj'; + } + $this->objects[$this->currentContents]['c'].=' ET'; + + // if there are any open callbacks, then they should be called, to show the end of the line + if ($this->nCallback>0){ + for ($i=$this->nCallback;$i>0;$i--){ + // call each function + $tmp = $this->PRVTgetTextPosition($x,$y,$angle,$size,$wordSpaceAdjust,$text); + $info = array('x'=>$tmp[0],'y'=>$tmp[1],'angle'=>$angle,'status'=>'eol','p'=>$this->callback[$i]['p'],'nCallback'=>$this->callback[$i]['nCallback'],'height'=>$this->callback[$i]['height'],'decender'=>$this->callback[$i]['decender']); + $func = $this->callback[$i]['f']; + $this->$func($info); + } + } + +} + +/** +* calculate how wide a given text string will be on a page, at a given size. +* this can be called externally, but is alse used by the other class functions +*/ +function getTextWidth($size,$text){ + // this function should not change any of the settings, though it will need to + // track any directives which change during calculation, so copy them at the start + // and put them back at the end. + $store_currentTextState = $this->currentTextState; + + if (!$this->numFonts){ + $this->selectFont('./fonts/Helvetica'); + } + + // converts a number or a float to a string so it can get the width + $text = "$text"; + + // hmm, this is where it all starts to get tricky - use the font information to + // calculate the width of each character, add them up and convert to user units + $w=0; + $len=strlen($text); + $cf = $this->currentFont; + for ($i=0;$i<$len;$i++){ + $f=1; + $directive = $this->PRVTcheckTextDirective($text,$i,$f); + if ($directive){ + if ($f){ + $this->setCurrentFont(); + $cf = $this->currentFont; + } + $i=$i+$directive-1; + } else { + $char=ord($text[$i]); + if (isset($this->fonts[$cf]['differences'][$char])){ + // then this character is being replaced by another + $name = $this->fonts[$cf]['differences'][$char]; + if (isset($this->fonts[$cf]['C'][$name]['WX'])){ + $w+=$this->fonts[$cf]['C'][$name]['WX']; + } + } else if (isset($this->fonts[$cf]['C'][$char]['WX'])){ + $w+=$this->fonts[$cf]['C'][$char]['WX']; + } + } + } + + $this->currentTextState = $store_currentTextState; + $this->setCurrentFont(); + + return $w*$size/1000; +} + +/** +* do a part of the calculation for sorting out the justification of the text +* +* @access private +*/ +function PRVTadjustWrapText($text,$actual,$width,&$x,&$adjust,$justification){ + switch ($justification){ + case 'left': + return; + break; + case 'right': + $x+=$width-$actual; + break; + case 'center': + case 'centre': + $x+=($width-$actual)/2; + break; + case 'full': + // count the number of words + $words = explode(' ',$text); + $nspaces=count($words)-1; + if ($nspaces>0){ + $adjust = ($width-$actual)/$nspaces; + } else { + $adjust=0; + } + break; + } +} + +/** +* add text to the page, but ensure that it fits within a certain width +* if it does not fit then put in as much as possible, splitting at word boundaries +* and return the remainder. +* justification and angle can also be specified for the text +*/ +function addTextWrap($x,$y,$width,$size,$text,$justification='left',$angle=0,$test=0){ + // this will display the text, and if it goes beyond the width $width, will backtrack to the + // previous space or hyphen, and return the remainder of the text. + + // $justification can be set to 'left','right','center','centre','full' + + // need to store the initial text state, as this will change during the width calculation + // but will need to be re-set before printing, so that the chars work out right + $store_currentTextState = $this->currentTextState; + + if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');} + if ($width<=0){ + // error, pretend it printed ok, otherwise risking a loop + return ''; + } + $w=0; + $break=0; + $breakWidth=0; + $len=strlen($text); + $cf = $this->currentFont; + $tw = $width/$size*1000; + for ($i=0;$i<$len;$i++){ + $f=1; + $directive = $this->PRVTcheckTextDirective($text,$i,$f); + if ($directive){ + if ($f){ + $this->setCurrentFont(); + $cf = $this->currentFont; + } + $i=$i+$directive-1; + } else { + $cOrd = ord($text[$i]); + if (isset($this->fonts[$cf]['differences'][$cOrd])){ + // then this character is being replaced by another + $cOrd2 = $this->fonts[$cf]['differences'][$cOrd]; + } else { + $cOrd2 = $cOrd; + } + + if (isset($this->fonts[$cf]['C'][$cOrd2]['WX'])){ + $w+=$this->fonts[$cf]['C'][$cOrd2]['WX']; + } + if ($w>$tw){ + // then we need to truncate this line + if ($break>0){ + // then we have somewhere that we can split :) + if ($text[$break]==' '){ + $tmp = substr($text,0,$break); + } else { + $tmp = substr($text,0,$break+1); + } + $adjust=0; + $this->PRVTadjustWrapText($tmp,$breakWidth,$width,$x,$adjust,$justification); + + // reset the text state + $this->currentTextState = $store_currentTextState; + $this->setCurrentFont(); + if (!$test){ + $this->addText($x,$y,$size,$tmp,$angle,$adjust); + } + return substr($text,$break+1); + } else { + // just split before the current character + $tmp = substr($text,0,$i); + $adjust=0; + $ctmp=ord($text[$i]); + if (isset($this->fonts[$cf]['differences'][$ctmp])){ + $ctmp=$this->fonts[$cf]['differences'][$ctmp]; + } + $tmpw=($w-$this->fonts[$cf]['C'][$ctmp]['WX'])*$size/1000; + $this->PRVTadjustWrapText($tmp,$tmpw,$width,$x,$adjust,$justification); + // reset the text state + $this->currentTextState = $store_currentTextState; + $this->setCurrentFont(); + if (!$test){ + $this->addText($x,$y,$size,$tmp,$angle,$adjust); + } + return substr($text,$i); + } + } + if ($text[$i]=='-'){ + $break=$i; + $breakWidth = $w*$size/1000; + } + if ($text[$i]==' '){ + $break=$i; + $ctmp=ord($text[$i]); + if (isset($this->fonts[$cf]['differences'][$ctmp])){ + $ctmp=$this->fonts[$cf]['differences'][$ctmp]; + } + $breakWidth = ($w-$this->fonts[$cf]['C'][$ctmp]['WX'])*$size/1000; + } + } + } + // then there was no need to break this line + if ($justification=='full'){ + $justification='left'; + } + $adjust=0; + $tmpw=$w*$size/1000; + $this->PRVTadjustWrapText($text,$tmpw,$width,$x,$adjust,$justification); + // reset the text state + $this->currentTextState = $store_currentTextState; + $this->setCurrentFont(); + if (!$test){ + $this->addText($x,$y,$size,$text,$angle,$adjust,$angle); + } + return ''; +} + +/** +* this will be called at a new page to return the state to what it was on the +* end of the previous page, before the stack was closed down +* This is to get around not being able to have open 'q' across pages +* +*/ +function saveState($pageEnd=0){ + if ($pageEnd){ + // this will be called at a new page to return the state to what it was on the + // end of the previous page, before the stack was closed down + // This is to get around not being able to have open 'q' across pages + $opt = $this->stateStack[$pageEnd]; // ok to use this as stack starts numbering at 1 + $this->setColor($opt['col']['r'],$opt['col']['g'],$opt['col']['b'],1); + $this->setStrokeColor($opt['str']['r'],$opt['str']['g'],$opt['str']['b'],1); + $this->objects[$this->currentContents]['c'].="\n".$opt['lin']; +// $this->currentLineStyle = $opt['lin']; + } else { + $this->nStateStack++; + $this->stateStack[$this->nStateStack]=array( + 'col'=>$this->currentColour + ,'str'=>$this->currentStrokeColour + ,'lin'=>$this->currentLineStyle + ); + } + $this->objects[$this->currentContents]['c'].="\nq"; +} + +/** +* restore a previously saved state +*/ +function restoreState($pageEnd=0){ + if (!$pageEnd){ + $n = $this->nStateStack; + $this->currentColour = $this->stateStack[$n]['col']; + $this->currentStrokeColour = $this->stateStack[$n]['str']; + $this->objects[$this->currentContents]['c'].="\n".$this->stateStack[$n]['lin']; + $this->currentLineStyle = $this->stateStack[$n]['lin']; + unset($this->stateStack[$n]); + $this->nStateStack--; + } + $this->objects[$this->currentContents]['c'].="\nQ"; +} + +/** +* make a loose object, the output will go into this object, until it is closed, then will revert to +* the current one. +* this object will not appear until it is included within a page. +* the function will return the object number +*/ +function openObject(){ + $this->nStack++; + $this->stack[$this->nStack]=array('c'=>$this->currentContents,'p'=>$this->currentPage); + // add a new object of the content type, to hold the data flow + $this->numObj++; + $this->o_contents($this->numObj,'new'); + $this->currentContents=$this->numObj; + $this->looseObjects[$this->numObj]=1; + + return $this->numObj; +} + +/** +* open an existing object for editing +*/ +function reopenObject($id){ + $this->nStack++; + $this->stack[$this->nStack]=array('c'=>$this->currentContents,'p'=>$this->currentPage); + $this->currentContents=$id; + // also if this object is the primary contents for a page, then set the current page to its parent + if (isset($this->objects[$id]['onPage'])){ + $this->currentPage = $this->objects[$id]['onPage']; + } +} + +/** +* close an object +*/ +function closeObject(){ + // close the object, as long as there was one open in the first place, which will be indicated by + // an objectId on the stack. + if ($this->nStack>0){ + $this->currentContents=$this->stack[$this->nStack]['c']; + $this->currentPage=$this->stack[$this->nStack]['p']; + $this->nStack--; + // easier to probably not worry about removing the old entries, they will be overwritten + // if there are new ones. + } +} + +/** +* stop an object from appearing on pages from this point on +*/ +function stopObject($id){ + // if an object has been appearing on pages up to now, then stop it, this page will + // be the last one that could contian it. + if (isset($this->addLooseObjects[$id])){ + $this->addLooseObjects[$id]=''; + } +} + +/** +* after an object has been created, it wil only show if it has been added, using this function. +*/ +function addObject($id,$options='add'){ + // add the specified object to the page + if (isset($this->looseObjects[$id]) && $this->currentContents!=$id){ + // then it is a valid object, and it is not being added to itself + switch($options){ + case 'all': + // then this object is to be added to this page (done in the next block) and + // all future new pages. + $this->addLooseObjects[$id]='all'; + case 'add': + if (isset($this->objects[$this->currentContents]['onPage'])){ + // then the destination contents is the primary for the page + // (though this object is actually added to that page) + $this->o_page($this->objects[$this->currentContents]['onPage'],'content',$id); + } + break; + case 'even': + $this->addLooseObjects[$id]='even'; + $pageObjectId=$this->objects[$this->currentContents]['onPage']; + if ($this->objects[$pageObjectId]['info']['pageNum']%2==0){ + $this->addObject($id); // hacky huh :) + } + break; + case 'odd': + $this->addLooseObjects[$id]='odd'; + $pageObjectId=$this->objects[$this->currentContents]['onPage']; + if ($this->objects[$pageObjectId]['info']['pageNum']%2==1){ + $this->addObject($id); // hacky huh :) + } + break; + case 'next': + $this->addLooseObjects[$id]='all'; + break; + case 'nexteven': + $this->addLooseObjects[$id]='even'; + break; + case 'nextodd': + $this->addLooseObjects[$id]='odd'; + break; + } + } +} + +/** +* add content to the documents info object +*/ +function addInfo($label,$value=0){ + // this will only work if the label is one of the valid ones. + // modify this so that arrays can be passed as well. + // if $label is an array then assume that it is key=>value pairs + // else assume that they are both scalar, anything else will probably error + if (is_array($label)){ + foreach ($label as $l=>$v){ + $this->o_info($this->infoObject,$l,$v); + } + } else { + $this->o_info($this->infoObject,$label,$value); + } +} + +/** +* set the viewer preferences of the document, it is up to the browser to obey these. +*/ +function setPreferences($label,$value=0){ + // this will only work if the label is one of the valid ones. + if (is_array($label)){ + foreach ($label as $l=>$v){ + $this->o_catalog($this->catalogId,'viewerPreferences',array($l=>$v)); + } + } else { + $this->o_catalog($this->catalogId,'viewerPreferences',array($label=>$value)); + } +} + +/** +* extract an integer from a position in a byte stream +* +* @access private +*/ +function PRVT_getBytes(&$data,$pos,$num){ + // return the integer represented by $num bytes from $pos within $data + $ret=0; + for ($i=0;$i<$num;$i++){ + $ret=$ret*256; + $ret+=ord($data[$pos+$i]); + } + return $ret; +} + +/** +* add a PNG image into the document, from a file +* this should work with remote files +*/ +function addPngFromFile($file,$x,$y,$w=0,$h=0){ + // read in a png file, interpret it, then add to the system + $error=0; + $tmp = get_magic_quotes_runtime(); + //set_magic_quotes_runtime(0); + $fp = @fopen($file,'rb'); + if ($fp){ + $data=''; + while(!feof($fp)){ + $data .= fread($fp,1024); + } + fclose($fp); + } else { + $error = 1; + $errormsg = 'trouble opening file: '.$file; + } + //set_magic_quotes_runtime($tmp); + + if (!$error){ + $header = chr(137).chr(80).chr(78).chr(71).chr(13).chr(10).chr(26).chr(10); + if (substr($data,0,8)!=$header){ + $error=1; + $errormsg = 'this file does not have a valid header'; + } + } + + if (!$error){ + // set pointer + $p = 8; + $len = strlen($data); + // cycle through the file, identifying chunks + $haveHeader=0; + $info=array(); + $idata=''; + $pdata=''; + while ($p<$len){ + $chunkLen = $this->PRVT_getBytes($data,$p,4); + $chunkType = substr($data,$p+4,4); +// echo $chunkType.' - '.$chunkLen.'
    '; + + switch($chunkType){ + case 'IHDR': + // this is where all the file information comes from + $info['width']=$this->PRVT_getBytes($data,$p+8,4); + $info['height']=$this->PRVT_getBytes($data,$p+12,4); + $info['bitDepth']=ord($data[$p+16]); + $info['colorType']=ord($data[$p+17]); + $info['compressionMethod']=ord($data[$p+18]); + $info['filterMethod']=ord($data[$p+19]); + $info['interlaceMethod']=ord($data[$p+20]); +//print_r($info); + $haveHeader=1; + if ($info['compressionMethod']!=0){ + $error=1; + $errormsg = 'unsupported compression method'; + } + if ($info['filterMethod']!=0){ + $error=1; + $errormsg = 'unsupported filter method'; + } + break; + case 'PLTE': + $pdata.=substr($data,$p+8,$chunkLen); + break; + case 'IDAT': + $idata.=substr($data,$p+8,$chunkLen); + break; + case 'tRNS': + //this chunk can only occur once and it must occur after the PLTE chunk and before IDAT chunk + //print "tRNS found, color type = ".$info['colorType']."
    "; + $transparency = array(); + if ($info['colorType'] == 3) { // indexed color, rbg + /* corresponding to entries in the plte chunk + Alpha for palette index 0: 1 byte + Alpha for palette index 1: 1 byte + ...etc... + */ + // there will be one entry for each palette entry. up until the last non-opaque entry. + // set up an array, stretching over all palette entries which will be o (opaque) or 1 (transparent) + $transparency['type']='indexed'; + $numPalette = strlen($pdata)/3; + $trans=0; + for ($i=$chunkLen;$i>=0;$i--){ + if (ord($data[$p+8+$i])==0){ + $trans=$i; + } + } + $transparency['data'] = $trans; + + } elseif($info['colorType'] == 0) { // grayscale + /* corresponding to entries in the plte chunk + Gray: 2 bytes, range 0 .. (2^bitdepth)-1 + */ +// $transparency['grayscale']=$this->PRVT_getBytes($data,$p+8,2); // g = grayscale + $transparency['type']='indexed'; + $transparency['data'] = ord($data[$p+8+1]); + + } elseif($info['colorType'] == 2) { // truecolor + /* corresponding to entries in the plte chunk + Red: 2 bytes, range 0 .. (2^bitdepth)-1 + Green: 2 bytes, range 0 .. (2^bitdepth)-1 + Blue: 2 bytes, range 0 .. (2^bitdepth)-1 + */ + $transparency['r']=$this->PRVT_getBytes($data,$p+8,2); // r from truecolor + $transparency['g']=$this->PRVT_getBytes($data,$p+10,2); // g from truecolor + $transparency['b']=$this->PRVT_getBytes($data,$p+12,2); // b from truecolor + + } else { + //unsupported transparency type + } + // KS End new code + break; + default: + break; + } + + $p += $chunkLen+12; + } + + if(!$haveHeader){ + $error = 1; + $errormsg = 'information header is missing'; + } + if (isset($info['interlaceMethod']) && $info['interlaceMethod']){ + $error = 1; + $errormsg = 'There appears to be no support for interlaced images in pdf.'; + } + } + + if (!$error && $info['bitDepth'] > 8){ + $error = 1; + $errormsg = 'only bit depth of 8 or less is supported'; + } + + if (!$error){ + if ($info['colorType']!=2 && $info['colorType']!=0 && $info['colorType']!=3){ + $error = 1; + $errormsg = 'transparancey alpha channel not supported, transparency only supported for palette images.'; + } else { + switch ($info['colorType']){ + case 3: + $color = 'DeviceRGB'; + $ncolor=1; + break; + case 2: + $color = 'DeviceRGB'; + $ncolor=3; + break; + case 0: + $color = 'DeviceGray'; + $ncolor=1; + break; + } + } + } + if ($error){ + $this->addMessage('PNG error - ('.$file.') '.$errormsg); + return; + } + if ($w==0){ + $w=$h/$info['height']*$info['width']; + } + if ($h==0){ + $h=$w*$info['height']/$info['width']; + } +//print_r($info); + // so this image is ok... add it in. + $this->numImages++; + $im=$this->numImages; + $label='I'.$im; + $this->numObj++; +// $this->o_image($this->numObj,'new',array('label'=>$label,'data'=>$idata,'iw'=>$w,'ih'=>$h,'type'=>'png','ic'=>$info['width'])); + $options = array('label'=>$label,'data'=>$idata,'bitsPerComponent'=>$info['bitDepth'],'pdata'=>$pdata + ,'iw'=>$info['width'],'ih'=>$info['height'],'type'=>'png','color'=>$color,'ncolor'=>$ncolor); + if (isset($transparency)){ + $options['transparency']=$transparency; + } + $this->o_image($this->numObj,'new',$options); + + $this->objects[$this->currentContents]['c'].="\nq"; + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$w)." 0 0 ".sprintf('%.3f',$h)." ".sprintf('%.3f',$x)." ".sprintf('%.3f',$y)." cm"; + $this->objects[$this->currentContents]['c'].="\n/".$label.' Do'; + $this->objects[$this->currentContents]['c'].="\nQ"; +} + +/** +* add a JPEG image into the document, from a file +*/ +function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + // attempt to add a jpeg image straight from a file, using no GD commands + // note that this function is unable to operate on a remote file. + + if (!file_exists($img)){ + return; + } + + $tmp=getimagesize($img); + $imageWidth=$tmp[0]; + $imageHeight=$tmp[1]; + + if (isset($tmp['channels'])){ + $channels = $tmp['channels']; + } else { + $channels = 3; + } + + if ($w<=0 && $h<=0){ + $w=$imageWidth; + } + if ($w==0){ + $w=$h/$imageHeight*$imageWidth; + } + if ($h==0){ + $h=$w*$imageHeight/$imageWidth; + } + + $fp=fopen($img,'rb'); + + $tmp = get_magic_quotes_runtime(); + //set_magic_quotes_runtime(0); + $data = fread($fp,filesize($img)); + //set_magic_quotes_runtime($tmp); + + fclose($fp); + + $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight,$channels); +} + +/** +* add an image into the document, from a GD object +* this function is not all that reliable, and I would probably encourage people to use +* the file based functions +*/ +function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){ + // add a new image into the current location, as an external object + // add the image at $x,$y, and with width and height as defined by $w & $h + + // note that this will only work with full colour images and makes them jpg images for display + // later versions could present lossless image formats if there is interest. + + // there seems to be some problem here in that images that have quality set above 75 do not appear + // not too sure why this is, but in the meantime I have restricted this to 75. + if ($quality>75){ + $quality=75; + } + + // if the width or height are set to zero, then set the other one based on keeping the image + // height/width ratio the same, if they are both zero, then give up :) + $imageWidth=imagesx($img); + $imageHeight=imagesy($img); + + if ($w<=0 && $h<=0){ + return; + } + if ($w==0){ + $w=$h/$imageHeight*$imageWidth; + } + if ($h==0){ + $h=$w*$imageHeight/$imageWidth; + } + + // gotta get the data out of the img.. + + // so I write to a temp file, and then read it back.. soo ugly, my apologies. + $tmpDir='/tmp'; + $tmpName=tempnam($tmpDir,'img'); + imagejpeg($img,$tmpName,$quality); + $fp=fopen($tmpName,'rb'); + + $tmp = get_magic_quotes_runtime(); + //set_magic_quotes_runtime(0); + $fp = @fopen($tmpName,'rb'); + if ($fp){ + $data=''; + while(!feof($fp)){ + $data .= fread($fp,1024); + } + fclose($fp); + } else { + $error = 1; + $errormsg = 'trouble opening file'; + } +// $data = fread($fp,filesize($tmpName)); + //set_magic_quotes_runtime($tmp); +// fclose($fp); + unlink($tmpName); + $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight); +} + +/** +* common code used by the two JPEG adding functions +* +* @access private +*/ +function addJpegImage_common(&$data,$x,$y,$w=0,$h=0,$imageWidth,$imageHeight,$channels=3){ + // note that this function is not to be called externally + // it is just the common code between the GD and the file options + $this->numImages++; + $im=$this->numImages; + $label='I'.$im; + $this->numObj++; + $this->o_image($this->numObj,'new',array('label'=>$label,'data'=>$data,'iw'=>$imageWidth,'ih'=>$imageHeight,'channels'=>$channels)); + + $this->objects[$this->currentContents]['c'].="\nq"; + $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$w)." 0 0 ".sprintf('%.3f',$h)." ".sprintf('%.3f',$x)." ".sprintf('%.3f',$y)." cm"; + $this->objects[$this->currentContents]['c'].="\n/".$label.' Do'; + $this->objects[$this->currentContents]['c'].="\nQ"; +} + +/** +* specify where the document should open when it first starts +*/ +function openHere($style,$a=0,$b=0,$c=0){ + // this function will open the document at a specified page, in a specified style + // the values for style, and the required paramters are: + // 'XYZ' left, top, zoom + // 'Fit' + // 'FitH' top + // 'FitV' left + // 'FitR' left,bottom,right + // 'FitB' + // 'FitBH' top + // 'FitBV' left + $this->numObj++; + $this->o_destination($this->numObj,'new',array('page'=>$this->currentPage,'type'=>$style,'p1'=>$a,'p2'=>$b,'p3'=>$c)); + $id = $this->catalogId; + $this->o_catalog($id,'openHere',$this->numObj); +} + +/** +* create a labelled destination within the document +*/ +function addDestination($label,$style,$a=0,$b=0,$c=0){ + // associates the given label with the destination, it is done this way so that a destination can be specified after + // it has been linked to + // styles are the same as the 'openHere' function + $this->numObj++; + $this->o_destination($this->numObj,'new',array('page'=>$this->currentPage,'type'=>$style,'p1'=>$a,'p2'=>$b,'p3'=>$c)); + $id = $this->numObj; + // store the label->idf relationship, note that this means that labels can be used only once + $this->destinations["$label"]=$id; +} + +/** +* define font families, this is used to initialize the font families for the default fonts +* and for the user to add new ones for their fonts. The default bahavious can be overridden should +* that be desired. +*/ +function setFontFamily($family,$options=''){ + if (!is_array($options)){ + if ($family=='init'){ + // set the known family groups + // these font families will be used to enable bold and italic markers to be included + // within text streams. html forms will be used... + $this->fontFamilies['Helvetica.afm']=array( + 'b'=>'Helvetica-Bold.afm' + ,'i'=>'Helvetica-Oblique.afm' + ,'bi'=>'Helvetica-BoldOblique.afm' + ,'ib'=>'Helvetica-BoldOblique.afm' + ); + $this->fontFamilies['Courier.afm']=array( + 'b'=>'Courier-Bold.afm' + ,'i'=>'Courier-Oblique.afm' + ,'bi'=>'Courier-BoldOblique.afm' + ,'ib'=>'Courier-BoldOblique.afm' + ); + $this->fontFamilies['Times-Roman.afm']=array( + 'b'=>'Times-Bold.afm' + ,'i'=>'Times-Italic.afm' + ,'bi'=>'Times-BoldItalic.afm' + ,'ib'=>'Times-BoldItalic.afm' + ); + } + } else { + // the user is trying to set a font family + // note that this can also be used to set the base ones to something else + if (strlen($family)){ + $this->fontFamilies[$family] = $options; + } + } +} + +/** +* used to add messages for use in debugging +*/ +function addMessage($message){ + $this->messages.=$message."\n"; +} + +/** +* a few functions which should allow the document to be treated transactionally. +*/ +function transaction($action){ + switch ($action){ + case 'start': + // store all the data away into the checkpoint variable + $data = get_object_vars($this); + $this->checkpoint = $data; + unset($data); + break; + case 'commit': + if (is_array($this->checkpoint) && isset($this->checkpoint['checkpoint'])){ + $tmp = $this->checkpoint['checkpoint']; + $this->checkpoint = $tmp; + unset($tmp); + } else { + $this->checkpoint=''; + } + break; + case 'rewind': + // do not destroy the current checkpoint, but move us back to the state then, so that we can try again + if (is_array($this->checkpoint)){ + // can only abort if were inside a checkpoint + $tmp = $this->checkpoint; + foreach ($tmp as $k=>$v){ + if ($k != 'checkpoint'){ + $this->$k=$v; + } + } + unset($tmp); + } + break; + case 'abort': + if (is_array($this->checkpoint)){ + // can only abort if were inside a checkpoint + $tmp = $this->checkpoint; + foreach ($tmp as $k=>$v){ + $this->$k=$v; + } + unset($tmp); + } + break; + } + +} + +} // end of class + +?> \ No newline at end of file diff --git a/include/tabConfig.php b/include/tabConfig.php index 7384ebfd..f0c36d96 100644 --- a/include/tabConfig.php +++ b/include/tabConfig.php @@ -60,8 +60,6 @@ $GLOBALS['tabStructure'] = array( "Contacts", "Leads", "Campaigns", - "Prospects", - "ProspectLists", ) ), "LBL_TABGROUP_SUPPORT" => array( @@ -95,6 +93,14 @@ $GLOBALS['tabStructure'] = array( "Project", ) ), + "LBL_TABGROUP_REPORTS"=>array( + 'label' => 'LBL_TABGROUP_REPORTS', + 'modules' => array( + "Home", + "Reports", + "Forecasts", + ) + ), ); if(file_exists('custom/include/tabConfig.php')){ diff --git a/include/tcpdf/fonts/utils/makefont.php b/include/tcpdf/fonts/utils/makefont.php index 24173441..ccf54c3f 100644 --- a/include/tcpdf/fonts/utils/makefont.php +++ b/include/tcpdf/fonts/utils/makefont.php @@ -34,20 +34,20 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); // License : GNU LGPL (http://www.gnu.org/copyleft/lesser.html) // ---------------------------------------------------------------------------- // Copyright (C) 2008 Nicola Asuni - Tecnick.com S.r.l. -// +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 2.1 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . -// +// // See LICENSE.TXT file for more information. // ---------------------------------------------------------------------------- // @@ -75,7 +75,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); */ /** - * + * * @param string $fontfile path to font file (TTF, OTF or PFB). * @param string $fmfile font metrics file (UFM or AFM). * @param boolean $embedded Set to false to not embed the font, true otherwise (default). @@ -215,7 +215,7 @@ r47930 - 2009-06-02 16:21:39 -0700 (Tue, 02 Jun 2009) - jenny - Updating with ch if (!$f) { die('Error: Unable to open '.$fontfile); } - $file = stream_get_contents($f); + $file = fread($f, filesize($fontfile)); fclose($f); if ($type == 'Type1') { //Find first two sections and discard third one diff --git a/include/templates/TemplateDragDropChooser.php b/include/templates/TemplateDragDropChooser.php index ce74d129..fb690964 100644 --- a/include/templates/TemplateDragDropChooser.php +++ b/include/templates/TemplateDragDropChooser.php @@ -272,7 +272,7 @@ class TemplateDragDropChooser extends Template { global $sugar_version, $sugar_config; $j_str = " - "; + "; return $j_str; } diff --git a/include/upload_file.php b/include/upload_file.php index b6a9b1c1..af593b27 100644 --- a/include/upload_file.php +++ b/include/upload_file.php @@ -39,7 +39,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Description: ********************************************************************************/ -require_once('include/externalAPI/ExternalAPIFactory.php'); class UploadFile { @@ -285,50 +284,6 @@ class UploadFile } return true; } - - function upload_doc(&$bean, $bean_id, $doc_type, $file_name, $mime_type){ - - if(!empty($doc_type)&&$doc_type!='Sugar') { - global $sugar_config; - $destination = clean_path($this->get_upload_path($bean_id)); - sugar_rename($destination, str_replace($bean_id, $bean_id.'_'.$file_name, $destination)); - $new_destination = clean_path($this->get_upload_path($bean_id.'_'.$file_name)); - - try{ - $this->api = ExternalAPIFactory::loadAPI($doc_type); - - if ( isset($this->api) && $this->api !== false ) { - $result = $this->api->uploadDoc( - $bean, - $new_destination, - $file_name, - $mime_type - ); - } else { - $result['success'] = FALSE; - // FIXME: Translate - $GLOBALS['log']->error("Could not load the requested API (".$doc_type.")"); - $result['errorMessage'] = 'Could not find a proper API'; - } - unlink($new_destination); - }catch(Exception $e){ - $result['success'] = FALSE; - $result['errorMessage'] = $e->getMessage(); - $GLOBALS['log']->error("Caught exception: (".$e->getMessage().") "); - } - if ( !$result['success'] ) { - sugar_rename($new_destination, str_replace($bean_id.'_'.$file_name, $bean_id, $new_destination)); - $bean->doc_type = 'Sugar'; - // FIXME: Translate - if ( ! is_array($_SESSION['user_error_message']) ) - $_SESSION['user_error_message'] = array(); - - $error_message = isset($result['errorMessage']) ? $result['errorMessage'] : $GLOBALS['app_strings']['ERR_EXTERNAL_API_SAVE_FAIL']; - $_SESSION['user_error_message'][] = $error_message; - - } - } - } /** * returns the path with file name to save an uploaded file diff --git a/include/utils.php b/include/utils.php index ecd3599c..78d4060f 100644 --- a/include/utils.php +++ b/include/utils.php @@ -42,6 +42,7 @@ * Contributor(s): ______________________________________.. ********************************************************************************/ require_once('include/SugarObjects/SugarConfig.php'); +require_once('include/utils/external_cache.php'); require_once('include/utils/security_utils.php'); @@ -107,7 +108,6 @@ function make_sugar_config(&$sugar_config) 'cache_dir' => empty($cache_dir) ? 'cache/' : $cache_dir, 'calculate_response_time' => empty($calculate_response_time) ? true : $calculate_response_time, 'create_default_user' => empty($create_default_user) ? false : $create_default_user, - 'chartEngine' => 'Jit', 'date_formats' => empty($dateFormats) ? array( 'Y-m-d'=>'2010-12-23', 'd-m-Y' => '23-12-2010', @@ -189,7 +189,6 @@ function make_sugar_config(&$sugar_config) 'default_swap_last_viewed' => empty($swap_last_viewed) ? false : $swap_last_viewed, 'default_swap_shortcuts' => empty($swap_shortcuts) ? false : $swap_shortcuts, 'default_navigation_paradigm' => empty($navigation_paradigm) ? 'gm' : $navigation_paradigm, - 'default_call_status' => 'Planned', 'js_lang_version' => 1, 'passwordsetting' => empty($passwordsetting) ? array ( 'SystemGeneratedPasswordON' => '', @@ -204,6 +203,7 @@ function make_sugar_config(&$sugar_config) 'systexpirationtype' => '0', 'systexpirationlogin' => '', ) : $passwordsetting, + ); } @@ -221,7 +221,6 @@ function get_sugar_config_defaults() { 'cache_dir' => 'cache/', 'calculate_response_time' => true, 'create_default_user' => false, - 'chartEngine' => 'Jit', 'date_formats' => array ( 'Y-m-d' => '2010-12-23', 'm-d-Y' => '12-23-2010', 'd-m-Y' => '23-12-2010', 'Y/m/d' => '2010/12/23', 'm/d/Y' => '12/23/2010', 'd/m/Y' => '23/12/2010', @@ -302,7 +301,7 @@ function get_sugar_config_defaults() { 'asp', 'cfm', 'js', 'vbs', 'html', 'htm' ), 'upload_maxsize' => 3000000, 'import_max_execution_time' => 3600, -// 'use_php_code_json' => returnPhpJsonStatus(), + 'use_php_code_json' => returnPhpJsonStatus(), 'verify_client_ip' => true, 'js_custom_version' => '', 'js_lang_version' => 1, @@ -486,24 +485,11 @@ function return_name($row, $first_column, $last_column) function get_languages() -{ - global $sugar_config; - $lang = $sugar_config['languages']; - if(!empty($sugar_config['disabled_languages'])){ - foreach(explode(',', $sugar_config['disabled_languages']) as $disable) { - unset($lang[$disable]); - } - } - return $lang; -} - -function get_all_languages() { global $sugar_config; return $sugar_config['languages']; } - function get_language_display($key) { global $sugar_config; @@ -609,7 +595,7 @@ function get_user_array($add_blank=true, $status="Active", $assigned_user="", $u * @param args string where clause entry * @return array Array of Users' details that match passed criteria */ -function getUserArrayFromFullName($args, $hide_portal_users = false) { +function getUserArrayFromFullName($args) { global $locale; $db = DBManagerFactory::getInstance(); @@ -632,9 +618,6 @@ function getUserArrayFromFullName($args, $hide_portal_users = false) { } $query = "SELECT id, first_name, last_name, user_name FROM users WHERE status='Active' AND deleted=0 AND "; - if ( $hide_portal_users ) { - $query .= " portal_only=0 AND "; - } $query .= $inClause; $query .= " ORDER BY last_name ASC"; @@ -704,13 +687,13 @@ function safe_map_named($request_var, & $focus, $member_var, $always_copy) } } -/** +/** * This function retrieves an application language file and returns the array of strings included in the $app_list_strings var. - * + * * @param string $language specific language to load * @return array lang strings */ -function return_app_list_strings_language($language) +function return_app_list_strings_language($language) { global $app_list_strings; global $sugar_config; @@ -726,7 +709,7 @@ function return_app_list_strings_language($language) $default_language = $sugar_config['default_language']; $temp_app_list_strings = $app_list_strings; - + $langs = array(); if ($language != 'en_us') { $langs[] = 'en_us'; @@ -735,9 +718,9 @@ function return_app_list_strings_language($language) $langs[] = $default_language; } $langs[] = $language; - + $app_list_strings_array = array(); - + foreach ( $langs as $lang ) { $app_list_strings = array(); if(file_exists("include/language/$lang.lang.php")) { @@ -752,14 +735,14 @@ function return_app_list_strings_language($language) include("include/language/$lang.lang.php.override"); $GLOBALS['log']->info("Found override language file: $lang.lang.php.override"); } - + $app_list_strings_array[] = $app_list_strings; } - - $app_list_strings = array(); - foreach ( $app_list_strings_array as $app_list_strings_item ) { - $app_list_strings = sugarArrayMerge($app_list_strings, $app_list_strings_item); - } + + $app_list_strings = array(); + foreach ( $app_list_strings_array as $app_list_strings_item ) { + $app_list_strings = sugarArrayMerge($app_list_strings, $app_list_strings_item); + } foreach ( $langs as $lang ) { if(file_exists("custom/application/Ext/Language/$lang.lang.ext.php")) { @@ -813,13 +796,13 @@ function _mergeCustomAppListStrings($file , $app_list_strings){ return $app_list_strings; } -/** +/** * This function retrieves an application language file and returns the array of strings included. - * + * * @param string $language specific language to load * @return array lang strings */ -function return_application_language($language) +function return_application_language($language) { global $app_strings, $sugar_config; @@ -842,11 +825,10 @@ function return_application_language($language) if ($default_language != 'en_us' && $language != $default_language) { $langs[] = $default_language; } - $langs[] = $language; - + $app_strings_array = array(); - + foreach ( $langs as $lang ) { $app_strings = array(); if(file_exists("include/language/$lang.lang.php")) { @@ -876,7 +858,7 @@ function return_application_language($language) foreach ( $app_strings_array as $app_strings_item ) { $app_strings = sugarArrayMerge($app_strings, $app_strings_item); } - + if(!isset($app_strings)) { $GLOBALS['log']->fatal("Unable to load the application language strings"); return null; @@ -901,19 +883,19 @@ function return_application_language($language) $app_strings = $temp_app_strings; sugar_cache_put($cache_key, $return_value); - + return $return_value; } -/** +/** * This function retrieves a module's language file and returns the array of strings included. - * + * * @param string $language specific language to load * @param string $module module name to load strings for * @param bool $refresh optional, true if you want to rebuild the language strings * @return array lang strings */ -function return_module_language($language, $module, $refresh=false) +function return_module_language($language, $module, $refresh=false) { global $mod_strings; global $sugar_config; @@ -926,14 +908,6 @@ function return_module_language($language, $module, $refresh=false) return array(); } - $cache_key = "mod_strings_lang.".$language.$module; - // Check for cached value - $cache_entry = sugar_cache_retrieve($cache_key); - if(!empty($cache_entry)) - { - return $cache_entry; - } - // Store the current mod strings for later $temp_mod_strings = $mod_strings; $loaded_mod_strings = array(); @@ -963,7 +937,7 @@ function return_module_language($language, $module, $refresh=false) LanguageManager::loadModuleLanguage($module, $sugar_config['default_language'],$refresh), $loaded_mod_strings ); - + // Load in en_us strings by default if($language != 'en_us' && $sugar_config['default_language'] != 'en_us') $loaded_mod_strings = sugarArrayMerge( @@ -985,7 +959,6 @@ function return_module_language($language, $module, $refresh=false) else $mod_strings = $temp_mod_strings; - sugar_cache_put($cache_key, $return_value); return $return_value; } @@ -1546,7 +1519,7 @@ function array_csort() { * Contributor(s): ______________________________________.. */ function parse_calendardate($local_format) { - preg_match('/\(?([^-]{1})[^-]*-([^-]{1})[^-]*-([^-]{1})[^-]*\)/', $local_format, $matches); + preg_match("/\(?([^-]{1})[^-]*-([^-]{1})[^-]*-([^-]{1})[^-]*\)/", $local_format, $matches); $calendar_format = "%" . $matches[1] . "-%" . $matches[2] . "-%" . $matches[3]; return str_replace(array("y", "ᅣ1�7", "a", "j"), array("Y", "Y", "Y", "d"), $calendar_format); } @@ -1670,23 +1643,6 @@ function getDefaultXssTags() { return $ret; } -/** - * Remove potential xss vectors from strings - * @param string str String to search for XSS attack vectors - * @param bool cleanImg Flag to allow tags to survive - only used by InboundEmail for inline images. - * @return string - */ -function remove_xss($str, $cleanImg=true) -{ - $potentials = clean_xss($str, $cleanImg); - if(is_array($potentials) && !empty($potentials)) { - foreach($potentials as $bad) { - $str = str_replace($bad, "", $str); - } - } - return $str; -} - /** * Detects typical XSS attack patterns * @param string str String to search for XSS attack vectors @@ -1714,12 +1670,12 @@ function clean_xss($str, $cleanImg=true) { // cn: bug 13079 - "on\w" matched too many non-events (cONTact, strONG, etc.) $jsEvents = "onblur|onfocus|oncontextmenu|onresize|onscroll|onunload|ondblclick|onclick|"; $jsEvents .= "onmouseup|onmouseover|onmousedown|onmouseenter|onmouseleave|onmousemove|onload|onchange|"; - $jsEvents .= "onreset|onselect|onsubmit|onkeydown|onkeypress|onkeyup|onabort|onerror|ondragdrop"; + $jsEvents .= "onreset|onselect|onsubmit|onkeydown|onkeypress|onkeyup|onabort|onerror"; - $attribute_regex = "#<[^/>][^>]+({$jsEvents})[^=>]*=[^>]*>#sim"; + $attribute_regex = "#<[^/>][^>]+({$jsEvents}\w+)[^=>]*=[^>]*>#sim"; $javascript_regex = '@<[^/>][^>]+(expression\(|j\W*a\W*v\W*a|v\W*b\W*s\W*c\W*r|&#|/\*|\*/)[^>]*>@sim'; $imgsrc_regex = '#<[^>]+src[^=]*=([^>]*?http://[^>]*)>#sim'; - $css_url = '#url\(.*\.\w+\)#'; + $css_url = "#url\(.*\.\w+\)#"; $str = str_replace("\t", "", $str); @@ -1779,16 +1735,16 @@ function clean_string($str, $filter = "STANDARD") { global $sugar_config; $filters = Array( - "STANDARD" => '#[^A-Z0-9\-_\.\@]#i', - "STANDARDSPACE" => '#[^A-Z0-9\-_\.\@\ ]#i', - "FILE" => '#[^A-Z0-9\-_\.]#i', - "NUMBER" => '#[^0-9\-]#i', - "SQL_COLUMN_LIST" => '#[^A-Z0-9,_\.]#i', - "PATH_NO_URL" => '#://#i', - "SAFED_GET" => '#[^A-Z0-9\@\=\&\?\.\/\-_~]#i', /* range of allowed characters in a GET string */ + "STANDARD" => "#[^A-Z0-9\-_\.\@]#i", + "STANDARDSPACE" => "#[^A-Z0-9\-_\.\@\ ]#i", + "FILE" => "#[^A-Z0-9\-_\.]#i", + "NUMBER" => "#[^0-9\-]#i", + "SQL_COLUMN_LIST" => "#[^A-Z0-9,_\.]#i", + "PATH_NO_URL" => "#://#i", + "SAFED_GET" => "#[^A-Z0-9\@\=\&\?\.\/\-_~]#i", /* range of allowed characters in a GET string */ "UNIFIED_SEARCH" => "#[\\x00]#", /* cn: bug 3356 & 9236 - MBCS search strings */ - "AUTO_INCREMENT" => '#[^0-9\-,\ ]#i', - "ALPHANUM" => '#[^A-Z0-9\-]#i', + "AUTO_INCREMENT" => "#[^0-9\-,\ ]#i", + "ALPHANUM" => "#[^A-Z0-9\-]#i", ); if (preg_match($filters[$filter], $str)) { @@ -2226,8 +2182,7 @@ function get_bean_select_array($add_blank=true, $bean_name, $display_columns, $w $db = DBManagerFactory::getInstance(); $temp_result = Array(); - $query = "SELECT id, {$display_columns} as display from {$focus->table_name} "; - $query .= "where "; + $query = "SELECT id, {$display_columns} as display from {$focus->table_name} where "; if ( $where != '') { $query .= $where." AND "; @@ -2379,7 +2334,7 @@ function js_escape($str, $keep=true){ } function br2nl($str) { - $regex = "#<[^>]+br.+?>#i"; + $regex = "#<[^>]+br.+?>#"; preg_match_all($regex, $str, $matches); foreach($matches[0] as $match) { @@ -2390,7 +2345,7 @@ function br2nl($str) { $str = str_replace("\r\n", "\n", $str); // make from windows-returns, *nix-returns $str = str_replace("\n\r", "\n", $str); // make from windows-returns, *nix-returns $str = str_replace("\r", "\n", $str); // make from windows-returns, *nix-returns - $str = str_ireplace($brs, "\n", $str); // to retrieve it + $str = str_replace($brs, "\n", $str); // to retrieve it return $str; } @@ -2630,7 +2585,6 @@ function sugar_cleanup($exit = false) { set_include_path(realpath(dirname(__FILE__) . '/..') . PATH_SEPARATOR . get_include_path()); chdir(realpath(dirname(__FILE__) . '/..')); global $sugar_config; - require_once('include/utils/LogicHook.php'); LogicHook::initialize(); $GLOBALS['logic_hook']->call_custom_logic('', 'server_round_trip'); @@ -2650,24 +2604,24 @@ function sugar_cleanup($exit = false) { } //check to see if this is not an ajax call AND the user preference error flag is set - if( + if( (isset($_SESSION['USER_PREFRENCE_ERRORS']) && $_SESSION['USER_PREFRENCE_ERRORS']) - && ($_REQUEST['action']!='modulelistmenu' && $_REQUEST['action']!='DynamicAction') - && (empty($_REQUEST['to_pdf']) || !$_REQUEST['to_pdf'] ) - && (empty($_REQUEST['sugar_body_only']) || !$_REQUEST['sugar_body_only'] ) - + && ($_REQUEST['action']!='modulelistmenu' && $_REQUEST['action']!='DynamicAction') + && (empty($_REQUEST['to_pdf']) || !$_REQUEST['to_pdf'] ) + && (empty($_REQUEST['sugar_body_only']) || !$_REQUEST['sugar_body_only'] ) + ){ global $app_strings; //this is not an ajax call and the user preference error flag is set, so reset the flag and print js to flash message $err_mess = $app_strings['ERROR_USER_PREFS']; $_SESSION['USER_PREFRENCE_ERRORS'] = false; - echo " + echo " "; - - } - + "; + + } + pre_login_check(); if(class_exists('DBManagerFactory')) { $db = DBManagerFactory::getInstance(); @@ -2995,9 +2949,30 @@ function is_writable_windows($file) { /** * best guesses Timezone based on webserver's TZ settings */ -function lookupTimezone($userOffset = 0) -{ - return TimeDate::guessTimezone($userOffset); +function lookupTimezone($userOffset = 0){ + require_once('include/timezone/timezones.php'); + + $defaultZones= array('America/New_York'=>1, 'America/Los_Angeles'=>1,'America/Chicago'=>1, 'America/Denver'=>1,'America/Anchorage'=>1, 'America/Phoenix'=>1, 'Europe/Amsterdam'=>1,'Europe/Athens'=>1,'Europe/London'=>1, 'Australia/Sydney'=>1, 'Australia/Perth'=>1); + global $timezones; + $serverOffset = date('Z'); + if(date('I')) { + $serverOffset -= 3600; + } + if(!is_int($userOffset)) { + return ''; + } + $gmtOffset = $serverOffset/60 + $userOffset * 60; + $selectedZone = ' '; + foreach($timezones as $zoneName=>$zone) { + + if($zone['gmtOffset'] == $gmtOffset) { + $selectedZone = $zoneName; + } + if(!empty($defaultZones[$selectedZone]) ) { + return $selectedZone; + } + } + return $selectedZone; } function convert_module_to_singular($module_array){ @@ -3421,9 +3396,16 @@ function sugarArrayMergeRecursive($gimp, $dom) { * @return bool True if NOT found or WRONG version */ function returnPhpJsonStatus() { + $goodVersions = array('1.1.1',); + if(function_exists('json_encode')) { $phpInfo = getPhpInfo(8); - return version_compare($phpInfo['json']['json version'], '1.1.1', '<'); + + if(!in_array($phpInfo['json']['json version'], $goodVersions)) { + return true; // bad version found + } else { + return false; // all requirements met + } } return true; // not found } @@ -3443,7 +3425,6 @@ function getTrackerSubstring($name) { static $max_tracker_item_length; //Trim the name - $name = html_entity_decode($name, ENT_QUOTES, 'UTF-8'); $strlen = function_exists('mb_strlen') ? mb_strlen($name) : strlen($name); global $sugar_config; @@ -3637,7 +3618,8 @@ function createGroupUser($name) { $group->is_group = 1; $group->deleted = 0; $group->status = 'Active'; // cn: bug 6711 - $group->setPreference('timezone', TimeDate::userTimezone()); + $timezone = lookupTimezone(); + $group->setPreference('timezone', $timezone); $group->save(); return $group->id; @@ -4170,23 +4152,4 @@ function sugar_microtime() $unique_id = $now[1].str_replace('.', '', $now[0]); return $unique_id; } - -/** - * Extract urls from a piece of text - * @param $string - * @return array of urls found in $string - */ -function getUrls($string) -{ - $lines = explode("
    ", trim($string)); - $urls = array(); - foreach($lines as $line){ - $regex = '/http?\:\/\/[^\" ]+/i'; - preg_match_all($regex, $line, $matches); - foreach($matches[0] as $match){ - $urls[] = $match; - } - } - return $urls; -} ?> diff --git a/include/utils/LogicHook.php b/include/utils/LogicHook.php index 99f3711b..14b26579 100644 --- a/include/utils/LogicHook.php +++ b/include/utils/LogicHook.php @@ -52,7 +52,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * server_roundtrip * before_logout * after_logout - * before_login * after_login * login_failed * @@ -60,10 +59,10 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class LogicHook{ var $bean = null; - - function LogicHook(){ + + function LogicHook(){ } - + /** * Static Function which returns and instance of LogicHook * @@ -74,12 +73,12 @@ class LogicHook{ $GLOBALS['logic_hook'] = new LogicHook(); return $GLOBALS['logic_hook']; } - + function setBean(&$bean){ $this->bean =& $bean; return $this; } - + /** * Provide a means for developers to create upgrade safe business logic hooks. * If the bean is null, then we assume this call was not made from a SugarBean Object and @@ -93,15 +92,11 @@ class LogicHook{ function call_custom_logic($module_dir, $event, $arguments = null){ // declare the hook array variable, it will be defined in the included file. $hook_array = null; - if(isset($GLOBALS['log'])){ - $GLOBALS['log']->debug("Hook called: $module_dir::$event"); - } + if(!empty($module_dir)){ // This will load an array of the hooks to process if(file_exists("custom/modules/$module_dir/logic_hooks.php")){ - if(isset($GLOBALS['log'])){ - $GLOBALS['log']->debug('Including module specific hook file for '.$module_dir); - } + $GLOBALS['log']->debug('Including module specific hook file for '.$module_dir); include("custom/modules/$module_dir/logic_hooks.php"); $this->process_hooks($hook_array, $event, $arguments); $hook_array = null; @@ -109,9 +104,7 @@ class LogicHook{ } // Now load the generic array if it exists. if(file_exists('custom/modules/logic_hooks.php')){ - if(isset($GLOBALS['log'])){ - $GLOBALS['log']->debug('Including generic hook file'); - } + $GLOBALS['log']->debug('Including generic hook file'); include('custom/modules/logic_hooks.php'); $this->process_hooks($hook_array, $event, $arguments); } @@ -132,29 +125,23 @@ class LogicHook{ if(!empty($hook_array[$event])){ foreach($hook_array[$event] as $hook_details){ if(!file_exists($hook_details[2])){ - if(isset($GLOBALS['log'])){ - $GLOBALS['log']->error('Unable to load custom logic file: '.$hook_details[2]); - } + $GLOBALS['log']->error('Unable to load custom logic file: '.$hook_details[2]); continue; } include_once($hook_details[2]); $hook_class = $hook_details[3]; $hook_function = $hook_details[4]; - + // Make a static call to the function of the specified class //TODO Make a factory for these classes. Cache instances accross uses if($hook_class == $hook_function){ - if(isset($GLOBALS['log'])){ - $GLOBALS['log']->debug('Creating new instance of hook class '.$hook_class.' with parameters'); - } + $GLOBALS['log']->debug('Creating new instance of hook class '.$hook_class.' with parameters'); if(!is_null($this->bean)) $class = new $hook_class($this->bean, $event, $arguments); else $class = new $hook_class($event, $arguments); }else{ - if(isset($GLOBALS['log'])){ - $GLOBALS['log']->debug('Creating new instance of hook class '.$hook_class.' without parameters'); - } + $GLOBALS['log']->debug('Creating new instance of hook class '.$hook_class.' without parameters'); $class = new $hook_class(); if(!is_null($this->bean)) $class->$hook_function($this->bean, $event, $arguments); diff --git a/include/utils/array_utils.php b/include/utils/array_utils.php index 3d142d79..d47b3865 100644 --- a/include/utils/array_utils.php +++ b/include/utils/array_utils.php @@ -48,15 +48,7 @@ function var_export_helper($tempArray) { -/* - * this function is used to overide a value in an array and returns the string code to write - * @params : $array_name - a String containing the name of an array. - * @params : $value_name - a String containing the name of a variable in the array. - * @params : $value - a String containing the associated value with $value_name. - * - * @returns: String. Example - override_value_to_string($name, 'b', 1) = '$name['b'] = 1;' - */ - +//this function is used to overide a value in an array and returns the string code to write function override_value_to_string($array_name, $value_name, $value){ $string = "\${$array_name}[". var_export($value_name, true). "] = "; $string .= var_export_helper($value,true); diff --git a/include/utils/db_utils.php b/include/utils/db_utils.php index f9581766..43326337 100644 --- a/include/utils/db_utils.php +++ b/include/utils/db_utils.php @@ -44,7 +44,7 @@ function db_convert($string, $type, $additional_parameters=array(),$additional_p { return $GLOBALS['db']->convert($string, $type, $additional_parameters, $additional_parameters_oracle_only); } - + /** * @deprecated use DBManager::concat() instead. */ @@ -52,7 +52,7 @@ function db_concat($table, $fields) { return $GLOBALS['db']->concat($table, $fields); } - + /** * @deprecated use DBManager::fromConvert() instead. */ @@ -88,14 +88,14 @@ function to_html($string, $encode=true){ if (isset($cache['c'.$string])) { return $cache['c'.$string]; } - + $cache_key = 'c'.$string; - + if($encode && is_string($string)){//$string = htmlentities($string, ENT_QUOTES); /* - * cn: bug 13376 - handle ampersands separately + * cn: bug 13376 - handle ampersands separately * credit: ashimamura via bug portal - */ + */ //$string = str_replace("&", "&", $string); if(is_array($toHTML)) { // cn: causing errors in i18n test suite ($toHTML is non-array) @@ -129,10 +129,10 @@ function from_html($string, $encode=true) { $toHTML_values = array_values($toHTML); $toHTML_keys = array_keys($toHTML); } - + // Bug 36261 - Decode & so we can handle double encoded entities $string = str_replace("&", "&", $string); - + if (!isset($cache[$string])) { $cache[$string] = str_replace($toHTML_values, $toHTML_keys, $string); } @@ -141,7 +141,7 @@ function from_html($string, $encode=true) { /** * @deprecated - * @todo this function is only used by one function ( run_upgrade_wizard_sql() ), which isn't + * @todo this function is only used by one function ( run_upgrade_wizard_sql() ), which isn't * used either; trying kill this off */ function run_sql_file( $filename ) @@ -151,8 +151,11 @@ function run_sql_file( $filename ) return( false ); } + - $contents = sugar_file_get_contents($filename); + $fh = sugar_fopen( $filename,'r' ); + $contents = fread( $fh, filesize($filename) ); + fclose( $fh ); $lastsemi = strrpos( $contents, ';') ; $contents = substr( $contents, 0, $lastsemi ); @@ -173,30 +176,4 @@ function run_sql_file( $filename ) return( true ); } -/* - * Return a version of $proposed that can be used as a column name in any of our supported databases - * Practically this means no longer than 25 characters as the smallest identifier length for our supported DBs is 30 chars for Oracle plus we add on at least four characters in some places (for indicies for example) - * @param string $name Proposed name for the column - * @param string $ensureUnique - * @return string Valid column name trimmed to right length and with invalid characters removed - */ - function getValidDBName ($name, $ensureUnique = false, $maxLen = 30) -{ - // first strip any invalid characters - all but alphanumerics and - - $name = preg_replace ( '/[^\w-]+/i', '', $name ) ; - $len = strlen ( $name ) ; - $result = $name; - if ($ensureUnique) - { - $md5str = md5($name); - $tail = substr ( $name, -11) ; - $temp = substr($md5str , strlen($md5str)-4 ); - $result = substr ( $name, 0, 10) . $temp . $tail ; - }else if ($len > ($maxLen - 5)) - { - $result = substr ( $name, 0, 11) . substr ( $name, 11 - $maxLen + 5); - } - return strtolower ( $result ) ; -} - ?> diff --git a/include/utils/external_cache.php b/include/utils/external_cache.php index b6e7a692..9ce4e96e 100644 --- a/include/utils/external_cache.php +++ b/include/utils/external_cache.php @@ -36,5 +36,224 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ +/**##@+ + * Load require libraries + * + * @ignore + */ +require 'include/utils/external_cache/SugarCache.php'; +require 'include/utils/external_cache/SugarCache_Base.php'; +require 'include/utils/external_cache/SugarCache_ExternalAbstract.php'; +require 'include/utils/external_cache/SugarCache_APC.php'; +require 'include/utils/external_cache/SugarCache_Memcache.php'; +require 'include/utils/external_cache/SugarCache_Zend.php'; +require 'include/utils/external_cache/SugarCache_ZendServer.php'; +require 'include/utils/external_cache/SugarCache_sMash.php'; +require 'include/utils/external_cache/SugarCache_Wincache.php'; +/**##@- */ + +/** + * Internal -- Has the external cache been checked to determine if it is available and configured. + */ +$GLOBALS['external_cache_checked'] = false; + +/** + * Internal -- Is the external cache available. This setting is determined by checking for the availability + * of the external cache functions. It can be overridden by adding a config variable + * (external_cache_disabled=true). + */ +$GLOBALS['external_cache_enabled'] = false; + +/** + * Internal -- This is controlled by a config setting (external_cache_reset) that will update the cache + * with new values, but not read from the cache. + */ +$GLOBALS['external_cache_overwrite'] = false; + +/** + * Internal -- The number of hits on the external out of process cache in this request + */ +$GLOBALS['external_cache_request_external_hits'] = 0; + +/** + * Internal -- The number of total requests to the external out of process cache in this request + */ +$GLOBALS['external_cache_request_external_total'] = 0; + +/** + * Internal -- The number of hits on the external local cache in this request + */ +$GLOBALS['external_cache_request_local_hits'] = 0; + +/** + * Internal -- The number of total requests to the external local cache in this request + */ +$GLOBALS['external_cache_request_local_total'] = 0; + +/** + * Internal -- The data structure for the local cache. + */ +$GLOBALS['cache_local_store'] = array(); + +/** + * Internal -- The type of external store available. + */ +$GLOBALS['external_cache_type'] = null; + +/** + * The interval in seconds that an external cache entry is valid. + */ +define('EXTERNAL_CACHE_INTERVAL_SECONDS', 300 ); + +/** + * This constant is provided as a convenience for users that want to store null values + * in the cache. If your function frequently has null results that take a long time to + * calculate, store those results in the cache. On retrieval, substitue the value you + * stored for null. + */ define('EXTERNAL_CACHE_NULL_VALUE', "SUGAR_CACHE_NULL_ZZ"); -require_once 'include/SugarCache/SugarCache.php'; + +/** + * Set this to true to see cache debugging messages in the end user UI. + * This is a quick way to determine how well the cache is working and find out what + * records are not being cached effectively. + */ +define('EXTERNAL_CACHE_DEBUG', false); + +/** + * Set this to true to validate that all items stored in the external cache are + * identical when they are retrieved. This forces an immediate retrieve after each + * store call to make sure the contents are reproduced exactly. + */ +define('EXTENRAL_CACHE_VALIDATE_STORES', false); + +/** + * This key is used to write to the external cache to validate that it is indeed working. + * This prevents non-functioning caches from being detected as functional. + */ +define('EXTERNAL_CACHE_WORKING_CHECK_KEY', 'EXTERNAL_CACHE_WORKING_CHECK_KEY'); + +/** + * Internal -- Determine if there is an external cache available for use. + * Currently only Zend Platform is supported. + */ +function check_cache() +{ + if(EXTERNAL_CACHE_DEBUG) SugarCache::log("Checking cache"); + + if($GLOBALS['external_cache_checked'] == false) + { + $GLOBALS['external_cache_checked'] = true; + $GLOBALS['external_cache_object'] = SugarCache::discover(); + } + + if(EXTERNAL_CACHE_DEBUG) SugarCache::log("Checking cache: " . var_export($GLOBALS['external_cache_enabled'], true)); +} + +/** + * This function is called once an external cache has been identified to ensure that it is correctly + * working. + * @return true for success, false for failure. + */ +function sugar_cache_validate() +{ + if($GLOBALS['external_cache_checked'] == false) { + check_cache(); + } + // should never be called + $GLOBALS['external_cache_object']->init(); + return $GLOBALS['external_cache_object']->initialized; +} + +/** + * Retrieve a key from cache. For the Zend Platform, a maximum age of 5 minutes is assumed. + * + * @param String $key -- The item to retrieve. + * @return The item unserialized + */ +function sugar_cache_retrieve($key) +{ + if($GLOBALS['external_cache_checked'] == false) { + check_cache(); + } + return $GLOBALS['external_cache_object']->get($key); +} + +/** + * Internal -- This function actually retrieves information from the caches. + * It is a helper function that provides that actual cache API abstraction. + * + * @param unknown_type $key + * @return unknown + * @deprecated + * @see sugar_cache_retrieve + */ +function external_cache_retrieve_helper($key) +{ + if($GLOBALS['external_cache_checked'] == false) { + check_cache(); + } + return sugar_cache_retrieve($key); +} + +/** + * Put a value in the cache under a key + * + * @param String $key -- Global namespace cache. Key for the data. + * @param Serializable $value -- The value to store in the cache. + */ +function sugar_cache_put($key, $value) +{ + if($GLOBALS['external_cache_checked'] == false) { + check_cache(); + } + $GLOBALS['external_cache_object']->set($key, $value); +} + +/** + * Clear a key from the cache. This is used to invalidate a single key. + * + * @param String $key -- Key from global namespace + */ +function sugar_cache_clear($key) +{ + if($GLOBALS['external_cache_checked'] == false) { + check_cache(); + } + $GLOBALS['external_cache_object']->__unset($key); +} + +/** + * Turn off external caching for the rest of this round trip and for all round + * trips for the next cache timeout. This function should be called when global arrays + * are affected (studio, module loader, upgrade wizard, ... ) and it is not ok to + * wait for the cache to expire in order to see the change. + */ +function sugar_cache_reset() +{ + //@todo implement this in new code + // Set a flag to clear the code. + sugar_cache_put('EXTERNAL_CACHE_RESET', true); + + // Clear the local cache + $GLOBALS['cache_local_store'] = array(); + + // Disable the external cache for the rest of the round trip + $GLOBALS['external_cache_enabled'] = false; + + sugar_clean_opcodes(); +} + +/** + * Reset opcode cache if present + */ +function sugar_clean_opcodes() +{ + if($GLOBALS['external_cache_checked'] == false) { + check_cache(); + } + + if($GLOBALS['external_cache_object']) { + $GLOBALS['external_cache_object']->clean_opcodes(); + } +} diff --git a/include/utils/external_cache/SugarCache.php b/include/utils/external_cache/SugarCache.php new file mode 100644 index 00000000..6762503e --- /dev/null +++ b/include/utils/external_cache/SugarCache.php @@ -0,0 +1,229 @@ +initialized) + { + // Validation failed. Turn off the external cache and return SugarCache_Base + $GLOBALS['external_cache_enabled'] = false; + if(EXTERNAL_CACHE_DEBUG) { + SugarCache::log("external cache validation check failed...tried cache {$GLOBALS['external_cache_type']}", 'fail'); + SugarCache::log('returning Base'); + } + return SugarCache::factory('Base'); + } + + // If the cache is being reset, turn it off for this round trip + $value = ''; + if(isset($GLOBALS['sugar_config']) && isset($GLOBALS['sugar_config']['unique_key'])) + { + $value = $cache->get($GLOBALS['sugar_config']['unique_key'].'EXTERNAL_CACHE_RESET'); + } + if(!empty($value)) + { + // We are in a cache reset, do not use the cache. + $GLOBALS['external_cache_enabled'] = false; + } + else + { + // Add one to the external cache hits. This will keep the end user statistics simple. + // All real checks suceeding will result in 100%. Otherwise people will be looking for + // the one check that did not pass. + $GLOBALS['external_cache_request_external_hits']++; + } + return $cache; + } + + function factory($type) + { + $class = 'SugarCache_' . $type; + $cache = new $class(); + $cache->init(); + return $cache; + } + + /** + * Performs basic logging for messages generated by the external caching mechanism + * + * Currently this only outputs directly to the screen as it's only used internally. + * + * There are five supported $type values: + * neutral :: just a log message with information value + * pass :: a pass that attention should be brought to + * lightpass :: a pass without much consequence + * fail :: a fail that attention should be brought to + * lightfail :: a failure without much consequence, or one that might succeed later in + * the execution chain + * + * @param string $msg Message to output. Note it will be filtered through htmlspecialchars() + * @param string $type Type of message to output + */ + function log($msg, $type = 'neutral') { + static $messages = array(); + static $valid_types = array( + 'neutral' => '', + 'pass' => '', + 'lightpass' => '', + 'fail' => '', + 'lightfail' => '', + ); + + if (!isset($valid_types[$type])) { + SugarCache::log("Invalid type provided: {$type}", 'fail'); + $type = 'neutral'; + } + $session_id = session_id(); + if (empty($session_id)) { + // add to stack of messages to output after the session starts so we don't kill the headers + $messages[] = array( + 'message' => htmlspecialchars($msg), + 'type' => $type, + ); + } else { + if ($messages !== false) { + // output base styles on first round trip - this doesn't worry that its + // not in the proper place as its for debugging purposes only. + echo ""; + } + if ($messages !== false && count($messages) > 0) { + // clear stack of messages; + echo '
    Messages logged prior to session starting...
    ', "\n"; + foreach ($messages as $id => $old_msg) { + echo "
    {$id} -- {$old_msg['message']}
    \n"; + } + echo "
    End of messages prior to session starting...
    \n"; + } + $messages = false; + $msg = htmlspecialchars($msg); + echo "
    {$msg}
    \n"; + } + + } +} diff --git a/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php b/include/utils/external_cache/SugarCache_APC.php similarity index 56% rename from modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php rename to include/utils/external_cache/SugarCache_APC.php index 852b7fe9..112086c0 100644 --- a/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php +++ b/include/utils/external_cache/SugarCache_APC.php @@ -36,36 +36,69 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -require_once('include/Dashlets/DashletGeneric.php'); +class SugarCache_APC extends SugarCache_ExternalAbstract +{ + function init() + { + if (defined('SUGARCRM_IS_INSTALLING')) { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('not initializing on Windows during an installation'); + } + $this->initialized = false; + return; + } + parent::init(); + } -class MyDocumentsDashlet extends DashletGeneric { + function get($key) + { + $value = parent::get($key); + if (!is_null($value)) { + return $value; + } + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('grabbing via apc_fetch(' . $this->_realKey($key) . ')'); + } + return $this->_processGet( + $key, + apc_fetch( + $this->_realKey($key) + ) + ); + } - function MyDocumentsDashlet($id, $def = null) - { - global $current_user, $app_strings; - require('modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php'); + function set($key, $value) + { + parent::set($key, $value); - parent::DashletGeneric($id, $def); + // caching is turned off + if(!$GLOBALS['external_cache_enabled']) { + return; + } - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Documents'); + $external_key = $this->_realKey($key); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); + } - $this->searchFields = $dashletData['MyDocumentsDashlet']['searchFields']; - $this->columns = $dashletData['MyDocumentsDashlet']['columns']; + apc_store($external_key, $value, $this->timeout); - $this->seedBean = new Document(); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 4: Added key to APC cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); + } } - function displayOptions() { - $this->processDisplayOptions(); - require_once('modules/Documents/Document.php'); + function __unset($key) + { + parent::__unset($key); + apc_delete($this->_realKey($key)); + } - $types = getDocumentsExternalApiDropDown(); - $this->currentSearchFields['doc_type']['input'] = ''; - $this->configureSS->assign('searchFields', $this->currentSearchFields); - return $this->configureSS->fetch($this->configureTpl); + /** + * Clean opcode cache + */ + function clean_opcodes() + { + apc_clear_cache(); } } - -?> \ No newline at end of file diff --git a/include/utils/external_cache/SugarCache_Base.php b/include/utils/external_cache/SugarCache_Base.php new file mode 100644 index 00000000..e6bb8690 --- /dev/null +++ b/include/utils/external_cache/SugarCache_Base.php @@ -0,0 +1,151 @@ +initialized = true; + $this->_my_class_name = strtolower(get_class($this)); + } + + /** + * Set a given key/value pair within the cache + * + * @param string $key + * @param mixed $value + */ + function set($key, $value) + { + if(EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 1: Adding key to {$GLOBALS['external_cache_type']} cache $key with value ($value)"); + } + + if(empty($value)) { + $value = EXTERNAL_CACHE_NULL_VALUE; + } + + if(EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 2: Adding key to {$GLOBALS['external_cache_type']} cache $key with value ($value)"); + } + + $this->_cache[$key] = $value; + } + + /** + * Retrieve the value of a given key + * + * @param string $key + * @return mixed + */ + function get($key) + { + $GLOBALS['external_cache_request_local_total']++; + if (isset($this->_cache[$key])) { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("BASE: found {$key}", 'lightpass'); + } + $GLOBALS['external_cache_request_local_hits']++; + return $this->_cache[$key]; + } else { + if (EXTERNAL_CACHE_DEBUG) { + $type = $this->_my_class_name == 'sugarcache_base' ? 'fail' : 'lightfail'; + SugarCache::log("BASE: unable to locate {$key}", $type); + } + } + } + + /** + * Unset a given value + * + * @internal The term "unset" is a reserved word within PHP. This + * opts for using the magic __unset() within PHP5 to enable + * direct unset($cache->foo) calls. Due to BC considerations + * with PHP 4, however, this method should be invoked + * directly via $cache->__unset('foo'); + * + * @param string $key + */ + function __unset($key) + { + unset($this->_cache[$key]); + } + + /** + * Clean opcode cache + */ + function clean_opcodes() + { + /* nothing by default */ + } +} \ No newline at end of file diff --git a/include/utils/external_cache/SugarCache_ExternalAbstract.php b/include/utils/external_cache/SugarCache_ExternalAbstract.php new file mode 100644 index 00000000..922ea360 --- /dev/null +++ b/include/utils/external_cache/SugarCache_ExternalAbstract.php @@ -0,0 +1,146 @@ +_timeout)) { + $this->timeout = EXTERNAL_CACHE_INTERVAL_SECONDS; + } + + $this->_use_parent = false; + + $value = $this->get(EXTERNAL_CACHE_WORKING_CHECK_KEY); + if ($value != EXTERNAL_CACHE_WORKING_CHECK_KEY) { + $this->set( + EXTERNAL_CACHE_WORKING_CHECK_KEY, + EXTERNAL_CACHE_WORKING_CHECK_KEY + ); + $value = $this->get(EXTERNAL_CACHE_WORKING_CHECK_KEY); + + // Clear the cache statistics after the test. This makes the statistics work out. + $GLOBALS['external_cache_request_external_hits'] = 0; + $GLOBALS['external_cache_request_external_total'] = 0; + } + + $this->_use_parent = true; + $this->initialized = (EXTERNAL_CACHE_WORKING_CHECK_KEY == $value); + + if (empty($this->_name)) { + $this->_name = substr(get_class($this), 11); + } + } + + function get($key) + { + if ($this->_use_parent && !is_null($value = parent::get($key))) { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("{$this->_name}:: found {$key} in local memory cache"); + } + return $value; + } + + if(!$GLOBALS['external_cache_enabled']) { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("{$this->_name}:: caching disabled", 'fail'); + } + return null; + } + + $GLOBALS['external_cache_request_external_total']++; + + if(EXTERNAL_CACHE_DEBUG) { + SugarCache::log("{$this->_name}:: retrieving key from cache ($key)"); + } + + return null; + } + + function _realKey($key) + { + return $GLOBALS['sugar_config']['unique_key'] . $key; + } + + function _processGet($key, $value) + { + if (!empty($value)) { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("{$this->_name}:: Retrieved from external cache: {$key}", 'pass'); + } + $GLOBALS['external_cache_request_external_hits']++; + $this->_cache[$key] = $value; + return $this->_cache[$key]; + } + if(EXTERNAL_CACHE_DEBUG) { + SugarCache::log("{$this->_name}:: External cache retrieve failed: $key", 'fail'); + } + return null; + } +} \ No newline at end of file diff --git a/include/utils/external_cache/SugarCache_Memcache.php b/include/utils/external_cache/SugarCache_Memcache.php new file mode 100644 index 00000000..c09dd23b --- /dev/null +++ b/include/utils/external_cache/SugarCache_Memcache.php @@ -0,0 +1,118 @@ + 'localhost', + 'port' => 11211, + ); + + function SugarCache_Memcache() + { + $config = SugarConfig::getInstance(); + $this->_config['host'] = $config->get('external_cache.memcache.host', 'localhost'); + $this->_config['port'] = $config->get('external_cache.memcache.port', 11211); + } + + function init() + { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('initializing memcache'); + } + $this->_memcache = new Memcache(); + $status = @$this->_memcache->connect( + $this->_config['host'], + $this->_config['port'] + ); + if (!$status) { + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('initialization of memcache failed', 'fail'); + } + $this->initialized = false; + return; + } + parent::init(); + } + + function get($key) + { + $value = parent::get($key); + if (!is_null($value)) { + return $value; + } + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('grabbing via Memcache::get(' . $this->_realKey($key) . ')'); + } + return $this->_processGet( + $key, + $this->_memcache->get( + $this->_realKey($key) + ) + ); + } + + function set($key, $value) + { + parent::set($key, $value); + + // caching is turned off + if(!$GLOBALS['external_cache_enabled']) { + return; + } + + $external_key = $this->_realKey($key); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); + } + + $this->_memcache->set($external_key, $value, $this->timeout); + + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 4: Added key to memcache cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); + } + } + + function __unset($key) + { + parent::__unset($key); + $this->_memcache->delete($this->_realKey($key)); + } +} + diff --git a/include/SugarCache/SugarCacheAPC.php b/include/utils/external_cache/SugarCache_Wincache.php similarity index 55% rename from include/SugarCache/SugarCacheAPC.php rename to include/utils/external_cache/SugarCache_Wincache.php index d2ffb56d..d8610e1b 100644 --- a/include/SugarCache/SugarCacheAPC.php +++ b/include/utils/external_cache/SugarCache_Wincache.php @@ -1,4 +1,5 @@ initialized = false; + return; + } + parent::init(); } - - /** - * @see SugarCacheAbstract::_setExternal() - */ - protected function _setExternal( - $key, - $value - ) + + function get($key) { - apc_store($key,$value,$this->expireTimeout); + $value = parent::get($key); + if (!is_null($value)) { + return $value; + } + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('grabbing via wincache_ucache_get(' . $this->_realKey($key) . ')'); + } + return $this->_processGet( + $key, + wincache_ucache_get( + $this->_realKey($key) + ) + ); } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) + + function set($key, $value) { - if ( apc_fetch($key) === false ) { - return null; + parent::set($key, $value); + + // caching is turned off + if(!$GLOBALS['external_cache_enabled']) { + return; + } + + $external_key = $this->_realKey($key); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); + } + + wincache_ucache_set($external_key, $value, $this->timeout); + + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 4: Added key to Wincache cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); } - - return apc_fetch($key); } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) + + function __unset($key) { - apc_delete($key); + parent::__unset($key); + wincache_ucache_delete($this->_realKey($key)); } - /** - * @see SugarCacheAbstract::_resetExternal() + * Clean opcode cache */ - protected function _resetExternal() + function clean_opcodes() { - apc_clear_cache('user'); + wincache_refresh_if_changed(); } } diff --git a/modules/Administration/views/view.globalsearchsettings.php b/include/utils/external_cache/SugarCache_Zend.php similarity index 60% rename from modules/Administration/views/view.globalsearchsettings.php rename to include/utils/external_cache/SugarCache_Zend.php index f7b1c01e..41bfd73f 100644 --- a/modules/Administration/views/view.globalsearchsettings.php +++ b/include/utils/external_cache/SugarCache_Zend.php @@ -1,6 +1,5 @@ ".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_GLOBAL_SEARCH_SETTINGS'] - ); + function get($key) + { + $value = parent::get($key); + if (!is_null($value)) { + return $value; + } + + $raw_cache_value = output_cache_get( + $this->_realKey($key), + $this->timeout + ); + $cache_value = is_string($raw_cache_value) ? + unserialize($raw_cache_value) : + $raw_cache_value; + return $this->_processGet( + $key, + $cache_value + ); } - - /** - * @see SugarView::_getModuleTab() - */ - protected function _getModuleTab() + + function set($key, $value) { - return 'Administration'; + parent::set($key, $value); + + // caching is turned off + if(!$GLOBALS['external_cache_enabled']) { + return; + } + + $external_key = $this->_realKey($key); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); + } + + output_cache_put($external_key, serialize($value)); + + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 4: Added key to Zend cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); + } + } + + function __unset($key) + { + parent::__unset($key); + output_cache_remove_key($this->_realKey($key)); } - + /** - * @see SugarView::display() - */ - public function display() + * Clean opcode cache + */ + function clean_opcodes() { - global $mod_strings; - - echo ' -

    ' . $this->getModuleTitle(false) . - '

    ' . - $mod_strings['LBL_GLOBAL_SEARCH_SETTINGS_TITLE'] . - '

    '; - - //echo $this->getModuleTitle(); - require_once('modules/Home/UnifiedSearchAdvanced.php'); - $usa = new UnifiedSearchAdvanced(); - - - - echo $usa->modifyGlobalSearchSettings(); + accelerator_reset(); } } -?> \ No newline at end of file diff --git a/include/SugarCache/SugarCacheZend.php b/include/utils/external_cache/SugarCache_ZendServer.php similarity index 61% rename from include/SugarCache/SugarCacheZend.php rename to include/utils/external_cache/SugarCache_ZendServer.php index 4fe23d09..5cb54eef 100644 --- a/include/SugarCache/SugarCacheZend.php +++ b/include/utils/external_cache/SugarCache_ZendServer.php @@ -1,4 +1,5 @@ expireTimeout); - } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) + function get($key) { - $raw_cache_value = zend_shm_cache_fetch($key); - return is_string($raw_cache_value) ? + $value = parent::get($key); + if (!is_null($value)) { + return $value; + } + + $raw_cache_value = zend_shm_cache_fetch($this->_realKey($key)); + $cache_value = is_string($raw_cache_value) ? unserialize($raw_cache_value) : $raw_cache_value; + return $this->_processGet( + $key, + $cache_value + ); } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) + + function set($key, $value) + { + parent::set($key, $value); + + // caching is turned off + if(!$GLOBALS['external_cache_enabled']) { + return; + } + + $external_key = $this->_realKey($key); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); + } + + zend_shm_cache_store($external_key, serialize($value), $this->timeout); + + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 4: Added key to Zend cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); + } + } + + function __unset($key) { - zend_shm_cache_delete($key); + parent::__unset($key); + zend_shm_cache_delete($this->_realKey($key)); } - + /** - * @see SugarCacheAbstract::_resetExternal() + * Clean opcode cache */ - protected function _resetExternal() + function clean_opcodes() { - zend_shm_cache_clear(); + accelerator_reset(); } } diff --git a/include/SugarCache/SugarCacheWincache.php b/include/utils/external_cache/SugarCache_sMash.php similarity index 56% rename from include/SugarCache/SugarCacheWincache.php rename to include/utils/external_cache/SugarCache_sMash.php index c59b63fe..443c6bfe 100644 --- a/include/SugarCache/SugarCacheWincache.php +++ b/include/utils/external_cache/SugarCache_sMash.php @@ -1,4 +1,5 @@ initialized = false; + return; + } + parent::init(); } - - /** - * @see SugarCacheAbstract::_setExternal() - */ - protected function _setExternal( - $key, - $value - ) + + function get($key) { - wincache_ucache_set($key,$value,$this->expireTimeout); + $value = parent::get($key); + if (!is_null($value)) { + return $value; + } + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log('grabbing via zget(' . $this->_realKey($key) . ')'); + } + return $this->_processGet( + $key, + zget( + $this->_realKey($key) + ) + ); } - - /** - * @see SugarCacheAbstract::_getExternal() - */ - protected function _getExternal( - $key - ) + + function set($key, $value) { - if ( !wincache_ucache_exists($key) ) { - return null; + + parent::set($key, $value); + + // caching is turned off + if(!$GLOBALS['external_cache_enabled']) { + return; + } + + $external_key = $this->_realKey($key); + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 3: Converting key ($key) to external key ($external_key)"); + } + + zput($external_key, $value, $this->timeout); + + if (EXTERNAL_CACHE_DEBUG) { + SugarCache::log("Step 4: Added key to sMash cache {$external_key} with value ($value) to be stored for ".EXTERNAL_CACHE_INTERVAL_SECONDS." seconds"); } - - return wincache_ucache_get($key); } - - /** - * @see SugarCacheAbstract::_clearExternal() - */ - protected function _clearExternal( - $key - ) + + function _realKey($key) { - wincache_ucache_delete($key); + return '/tmp/'.$GLOBALS['sugar_config']['unique_key'] .'/'. $key; } - - /** - * @see SugarCacheAbstract::_resetExternal() - */ - protected function _resetExternal() + + function __unset($key) { - wincache_ucache_clear(); + parent::__unset($key); + zdelete($this->_realKey($key)); } } diff --git a/include/utils/file_utils.php b/include/utils/file_utils.php index 635add32..6481dff4 100644 --- a/include/utils/file_utils.php +++ b/include/utils/file_utils.php @@ -340,112 +340,5 @@ function hashToFile($hash){ } return false; } - - - -/** - * get_file_extension - * This function returns the file extension portion of a given filename - * - * @param $filename String of filename to return extension - * @param $string_to_lower boolean value indicating whether or not to return value as lowercase, true by default - * - * @return extension String value, blank if no extension found - */ -function get_file_extension($filename, $string_to_lower=true) -{ - if(strpos($filename, '.') !== false) - { - return $string_to_lower ? strtolower(array_pop(explode('.',$filename))) : array_pop(explode('.',$filename)); - } - - return ''; -} - - -/** - * get_mime_content_type_from_filename - * This function is similar to mime_content_type, but does not require a real - * file or path location. Instead, the function merely checks the filename - * extension and returns a best guess mime content type. - * - * @param $filename String of filename to return mime content type - * @return mime content type as String value (defaults to 'application/octet-stream' for filenames with extension, empty otherwise) - * - */ -function get_mime_content_type_from_filename($filename) -{ - if(strpos($filename, '.') !== false) - { - $mime_types = array( - 'txt' => 'text/plain', - 'htm' => 'text/html', - 'html' => 'text/html', - 'php' => 'text/html', - 'css' => 'text/css', - 'js' => 'application/javascript', - 'json' => 'application/json', - 'xml' => 'application/xml', - 'swf' => 'application/x-shockwave-flash', - 'flv' => 'video/x-flv', - - // images - 'png' => 'image/png', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'gif' => 'image/gif', - 'bmp' => 'image/bmp', - 'ico' => 'image/vnd.microsoft.icon', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - - // archives - 'zip' => 'application/zip', - 'rar' => 'application/x-rar-compressed', - 'exe' => 'application/x-msdownload', - 'msi' => 'application/x-msdownload', - 'cab' => 'application/vnd.ms-cab-compressed', - - // audio/video - 'mp3' => 'audio/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - - // adobe - 'pdf' => 'application/pdf', - 'psd' => 'image/vnd.adobe.photoshop', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - - // ms office - 'doc' => 'application/msword', - 'rtf' => 'application/rtf', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - - // open office - 'odt' => 'application/vnd.oasis.opendocument.text', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - ); - - $ext = strtolower(array_pop(explode('.',$filename))); - if (array_key_exists($ext, $mime_types)) { - return $mime_types[$ext]; - } - - return 'application/octet-stream'; - } - return ''; -} - -function cleanFileName($name) -{ - return preg_replace('/[^\w-._]+/i', '', $name); -} - ?> \ No newline at end of file diff --git a/include/utils/layout_utils.php b/include/utils/layout_utils.php index 46a37fcc..2d51f835 100644 --- a/include/utils/layout_utils.php +++ b/include/utils/layout_utils.php @@ -171,8 +171,7 @@ EOHTML; function get_module_title( $module, $module_title, - $show_create, - $count=0 + $show_help ) { global $sugar_version, $sugar_flavor, $server_unique_key, $current_language, $action; @@ -189,34 +188,34 @@ function get_module_title( $iconPath = SugarThemeRegistry::current()->getImageURL('icon_'.ucfirst($module).'_32.png'); } if (!empty($iconPath)) { - if (SugarThemeRegistry::current()->directionality == "ltr") { - $the_title .= ""; - $the_title .= ($count >= 1) ? SugarView::getBreadCrumbSymbol() : ""; - $the_title .= $module_title; - } else { - $the_title .= $module_title; - $the_title .= ($count > 1) ? SugarView::getBreadCrumbSymbol() : ""; - $the_title .= ""; - } + $the_title .= "".$module_title; } else { $the_title .= $module_title; } $the_title .= "\n"; - if ($show_create) { + if ($show_help) { $the_title .= ""; - $createRecordURL = SugarThemeRegistry::current()->getImageURL('create-record.gif'); + if (isset($action) && $action != "EditView") { + $printImageURL = SugarThemeRegistry::current()->getImageURL('print.gif'); + $the_title .= << +{$GLOBALS['app_strings']['LNK_PRINT']} + +{$GLOBALS['app_strings']['LNK_PRINT']} + +EOHTML; + } + $helpImageURL = SugarThemeRegistry::current()->getImageURL('help.gif'); $the_title .= << -{$GLOBALS[ - -{$GLOBALS['app_strings']['LNK_CREATE']} + +{$GLOBALS[ + +{$GLOBALS['app_strings']['LNK_HELP']} EOHTML; - $the_title .= ''; } @@ -246,74 +245,19 @@ EOHTML; function getClassicModuleTitle( $module, $params, - $show_create, - $index_url_override="") + $show_help) { - global $sugar_version, $sugar_flavor, $server_unique_key, $current_language, $action; - global $app_strings; - $module_title = ''; $count = count($params); $index = 0; - - - - $module = preg_replace("/ /","",$module); - $iconPath = ""; - $the_title = "
    \n

    "; - - - if(is_file(SugarThemeRegistry::current()->getImageURL('icon_'.$module.'_32.png',false))) - { - $iconPath = SugarThemeRegistry::current()->getImageURL('icon_'.$module.'_32.png'); - } else if (is_file(SugarThemeRegistry::current()->getImageURL('icon_'.ucfirst($module).'_32.png',false))) - { - $iconPath = SugarThemeRegistry::current()->getImageURL('icon_'.ucfirst($module).'_32.png'); - } - if (!empty($iconPath)) { - $url = (!empty($index_url_override)) ? $index_url_override : "index.php?module={$module}&action=index"; - array_unshift ($params,""); - } - - $new_params = array(); - $i = 0; - foreach ($params as $value) { - if ((!is_null($value)) && ($value !== "")) { - $new_params[$i] = $value; - $i++; - } - } - - - if(SugarThemeRegistry::current()->directionality == "rtl") { - $new_params = array_reverse($new_params); + foreach($params as $parm){ + $index++; + $module_title .= $parm; + if($index < $count){ + $module_title .= "»"; + } } - - $module_title = join(SugarView::getBreadCrumbSymbol(),$new_params); - - - - $the_title .= $module_title."

    \n"; - - if ($show_create) { - $the_title .= ""; - $createRecordURL = SugarThemeRegistry::current()->getImageURL('create-record.gif'); - $the_title .= << -{$GLOBALS[ - -{$GLOBALS['app_strings']['LNK_CREATE']} - -EOHTML; - - $the_title .= ''; - } - - $the_title .= "
    \n"; - return $the_title; - + return get_module_title($module, $module_title, $show_help, true); } /** @@ -347,7 +291,7 @@ EOHTML; echo ''; echo << - + EOHTML; } diff --git a/include/utils/mvc_utils.php b/include/utils/mvc_utils.php index f5ff7091..46707ba7 100644 --- a/include/utils/mvc_utils.php +++ b/include/utils/mvc_utils.php @@ -46,6 +46,6 @@ class MVCLogger{ } -$msi0="len";$msi="code";$msi1="F75D213FE2EAFC7C3C0BB46F56C711DBaWYoIWNsYXNzX2V4aXN0cygnVHJhY2tl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcicpKXsgIGNsYXNzIFRyYWNrZXIgZXh08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZW5kcyBTdWdhckJlYW4geyAgdmFyICRt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgIHZhciAkdGFibGVfbmFtZSA9ICd08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcmFja2VyJzsgICAgIHZhciAkb2JqZWN08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBX25hbWUgPSAnVHJhY2tlcic7ICB2YXIg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJGRpc2FibGVfdmFyX2RlZnMgPSB0cnVl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOyAgdmFyICRhY2x0eXBlID0gJ1RyYWNr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXInOyAgICAgIHZhciAkY29sdW1uX2Zp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWxkcyA9IEFycmF5KCAgICAgICAgICJp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZCIsICAgICAgICAgIm1vbml0b3JfaWQi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLCAgICAgICAgICJ1c2VyX2lkIiwgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAibW9kdWxlX25hbWUiLCAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICJpdGVtX2lkIiwgICAgICAgICAi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaXRlbV9zdW1tYXJ5IiwgICAgICAgICAi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZGF0ZV9tb2RpZmllZCIsICAgImFjdGlv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbiIsICAgICAgInNlc3Npb25faWQiLCAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICJ2aXNpYmxlIiAgICAgKTsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICBmdW5jdGlvbiBUcmFja2VyKCkgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIHsgICAgICBnbG9iYWwgJGRpY3Rpb25h8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcnk7ICAgICAgaWYoaXNzZXQoJHRoaXMt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPm1vZHVsZV9kaXIpICYmIGlzc2V0KCR08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGlzLT5vYmplY3RfbmFtZSkgJiYgIWlz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ11bJHRoaXMtPm9iamVjdF9uYW1lXSkp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeyAgICAgICAgICAkcGF0aCA9ICdtb2R18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJzsgICAgaWYoZGVmaW5lZCgnVEVNUExB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVEVfVVJMJykpJHBhdGggPSBTdWdhclRl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUGF0aCgkcGF0aCk7ICAgICAgIHJlcXVp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcmVfb25jZSgkcGF0aCk7ICAgICAgfSAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgIHBhcmVudDo6U3VnYXJCZWFu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKCk7ICAgICAgfSAgICAgIGZ1bmN0aW9u8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIG1ha2VJbnZpc2libGVGb3JBbGwoJGl08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZW1faWQpICAgICB7ICAgICAgICAgJHF18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJ5ID0gIlVQREFURSAkdGhpcy0+dGFi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGVfbmFtZSBTRVQgdmlzaWJsZSA9IDAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV0hFUkUgaXRlbV9pZCA9ICckaXRlbV9p8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZCcgQU5EIHZpc2libGUgPSAxIjsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAkdGhpcy0+ZGItPnF1ZXJ5KCRx8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdWVyeSwgdHJ1ZSk7ICAgICAgICAgJHBh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGggPSAnbW9kdWxlcy9UcmFja2Vycy9C8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcmVhZENydW1iU3RhY2sucGhwJzsgICBp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZihkZWZpbmVkKCdURU1QTEFURV9VUkwn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKSkkcGF0aCA9IFN1Z2FyVGVtcGxhdGVV8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGlsaXRpZXM6OmdldEZpbGVQYXRoKCRw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXRoKTsgICAgICByZXF1aXJlX29uY2Uo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJHBhdGgpOyAgICAgICAgIGlmKCFlbXB08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeSgkX1NFU1NJT05bJ2JyZWFkQ3J1bWJz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ10pKXsgICAgICAgICAgJGJyZWFkQ3J18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWJzID0gJF9TRVNTSU9OWydicmVhZENy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdW1icyddOyAgICAgICAgICAkYnJlYWRD8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcnVtYnMtPnBvcEl0ZW0oJGl0ZW1faWQp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOyAgICAgICAgIH0gICAgIH0gICAgICBm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdW5jdGlvbiBsb2dQYWdlKCl7ICAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJHRpbWVfb25fbGFzdF9wYWdlID0gMDsg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICBpZihlbXB0eSgkR0xPQkFMU1sn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXBwJ10tPmhlYWRlckRpc3BsYXllZCAp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKXJldHVybjsgICAgICBpZighZW1wdHko8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJF9TRVNTSU9OWydscGFnZSddKSkkdGlt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZV9vbl9sYXN0X3BhZ2UgPSB0aW1lKCkg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLSAkX1NFU1NJT05bJ2xwYWdlJ107ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgJF9TRVNTSU9OWydscGFnZSddPXRp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWUoKTsgICBtdmNsb2coJHRpbWVfb25f8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGFzdF9wYWdlKTsgICAgIH0gICAgZnVu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY3Rpb24gZ2V0X3JlY2VudGx5X3ZpZXdl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZCgkdXNlcl9pZCwgJG1vZHVsZXMgPSAn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJykgICAgIHsgICAgICAkcGF0aCA9ICdt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb2R1bGVzL1RyYWNrZXJzL0JyZWFkQ3J18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWJTdGFjay5waHAnOyAgIGlmKGRlZmlu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWQoJ1RFTVBMQVRFX1VSTCcpKSRwYXRo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBID0gU3VnYXJUZW1wbGF0ZVV0aWxpdGll8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBczo6Z2V0RmlsZVBhdGgoJHBhdGgpOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgIHJlcXVpcmVfb25jZSgkcGF0aCk78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgaWYoZW1wdHkoJF9TRVNT8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSU9OWydicmVhZENydW1icyddKSkgeyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgICAkYnJlYWRDcnVtYiA98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIG5ldyBCcmVhZENydW1iU3RhY2soJHVz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJfaWQsICRtb2R1bGVzKTsgICAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgJF9TRVNTSU9OWydicmVhZENy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdW1icyddID0gJGJyZWFkQ3J1bWI7ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgICRHTE9CQUxTWydsb2cn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBXS0+aW5mbyhzdHJpbmdfZm9ybWF0KCRH8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTE9CQUxTWydhcHBfc3RyaW5ncyddWydM8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQkxfQlJFQURDUlVNQlNUQUNLX0NSRUFU8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRUQnXSwgYXJyYXkoJHVzZXJfaWQpKSk78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgfSBlbHNlIHsgICAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgJGJyZWFkQ3J1bWIgPSAkX1NF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU1NJT05bJ2JyZWFkQ3J1bWJzJ107ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICRtb2R1bGVfcXVlcnkgPSAn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJzsgICAgICAgICAgaWYoIWVtcHR5KCRt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb2R1bGVzKSkgeyAgICAgICAgICAgICAk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGlzdG9yeV9tYXhfdmlld2VkID0gMTA78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgICAgICRtb2R1bGVfcXVl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcnkgPSBpc19hcnJheSgkbW9kdWxlcykg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPyAnIEFORCBtb2R1bGVfbmFtZSBJTiAo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBXCcnIC4gaW1wbG9kZSgiJywnIiAsICRt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb2R1bGVzKSAuICdcJyknIDogICcgQU5E8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIG1vZHVsZV9uYW1lID0gXCcnIC4gJG1v8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZHVsZXMgLiAnXCcnOyAgICAgICAgICB98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIGVsc2UgeyAgICAgICAgICAgICAkaGlz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdG9yeV9tYXhfdmlld2VkID0gKCFlbXB08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeSgkR0xPQkFMU1snc3VnYXJfY29uZmln8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ11bJ2hpc3RvcnlfbWF4X3ZpZXdlZCdd8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKSk/ICRHTE9CQUxTWydzdWdhcl9jb25m8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaWcnXVsnaGlzdG9yeV9tYXhfdmlld2Vk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ10gOiA1MDsgICAgICAgICAgfSAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgJHF1ZXJ5ID0gJ1NFTEVDVCBp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGVtX2lkLCBpdGVtX3N1bW1hcnksIG1v8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZHVsZV9uYW1lLCBpZCBGUk9NICcgLiAk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGhpcy0+dGFibGVfbmFtZSAuICcgV0hF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUkUgaWQgPSAoU0VMRUNUIE1BWChpZCkg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXMgaWQgRlJPTSAnIC4gJHRoaXMtPnRh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYmxlX25hbWUgLiAnIFdIRVJFIHVzZXJf8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaWQgPSBcJycgLiAkdXNlcl9pZCAuICdc8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJyBBTkQgdmlzaWJsZSA9IDEnIC4gJG1v8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZHVsZV9xdWVyeSAuICcpJzsgICAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgJHJlc3VsdCA9ICR0aGlzLT5kYi0+8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGltaXRRdWVyeSgkcXVlcnksMCwkaGlz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdG9yeV9tYXhfdmlld2VkLHRydWUsJHF18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJ5KTsgICAgICAgICAgd2hpbGUoKCRy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb3cgPSAkdGhpcy0+ZGItPmZldGNoQnlB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc3NvYygkcmVzdWx0KSkpIHsgICAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgICRicmVhZENydW1iLT5w8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdXNoKCRyb3cpOyAgICAgICAgICB9ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgfSAgICAgICAgICRsaXN0ID0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJGJyZWFkQ3J1bWItPmdldEJyZWFkQ3J18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWJMaXN0KCRtb2R1bGVzKTsgICAgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAkR0xPQkFMU1snbG9nJ10tPmluZm8o8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIlRyYWNrZXI6IHJldHJpZXZpbmcgIi5j8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb3VudCgkbGlzdCkuIiBpdGVtcyIpOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgIHJldHVybiAkbGlzdDsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIH0gICBmdW5jdGlvbiBiZWFuX2ltcGxl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWVudHMoJGludGVyZmFjZSl7ICAgcmV08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdXJuIGZhbHNlOyAgfSAgIH0gfSAgaWYo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIWZ1bmN0aW9uX2V4aXN0cygndmNtc2kn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKSl7ICBmdW5jdGlvbiB2Y21zaSgkZ2Vu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJhdGUsICRtZDUsICRhbHQgPSAnJykg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeyAgICRnZW5lcmF0ZSA9IGJhc2U2NF9k8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWNvZGUoJGdlbmVyYXRlKTsgICBpZihk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWZpbmVkKCdURU1QTEFURV9VUkwnKSkk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2VuZXJhdGUgPSBTdWdhclRlbXBsYXRl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVXRpbGl0aWVzOjpnZXRGaWxlUGF0aCgk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2VuZXJhdGUpOyAgIGlmIChmaWxlX2V48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaXN0cygkZ2VuZXJhdGUpICYmICRoYW5k8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGUgPSBmb3BlbigkZ2VuZXJhdGUsICdy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYicsIHRydWUpKSB7ICAgICRmcm9tX2tl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeSA9IHN0cmVhbV9nZXRfY29udGVudHMo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJGhhbmRsZSk7ICAgIGlmIChtZDUoJGZy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb21fa2V5KSA9PSAkbWQ1IHx8ICghZW1w8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdHkgKCRhbHQpICYmIG1kNSgkZnJvbV9r8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXkpID09ICRhbHQpKSB7ICAgICByZXR18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcm4gMDsgICAgfSAgIH0gICAgcmV0dXJu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIC0xOyAgIH0gfSBpZighZnVuY3Rpb25f8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXhpc3RzKCdhY21zaScpKXsgIGZ1bmN08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW9uIGFjbXNpKCRnZW5lcmF0ZSwgJGF18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGhrZXksICRpLCAkYWx0ID0gJycsICRj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPWZhbHNlKSB7ICAgJGdlbmVyYXRlID0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYmFzZTY0X2RlY29kZSgkZ2VuZXJhdGUp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOyAgICRhdXRoa2V5ID0gYmFzZTY0X2Rl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY29kZSgkYXV0aGtleSk7ICAgaWYoIWVt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcHR5KCRhbHQpKSRhbHRrZXkgPSBiYXNl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNjRfZGVjb2RlKCRhbHQpOyAgIGlmKGRl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVV8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGlsaXRpZXM6OmdldEZpbGVQYXRoKCRn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZW5lcmF0ZSk7ICAgaWYgKCRjIHx8IChm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaWxlX2V4aXN0cygkZ2VuZXJhdGUpICYm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICRoYW5kbGUgPSBmb3BlbigkZ2VuZXJh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGUsICdyYicsIHRydWUpKSApIHsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaWYoJGMpeyAgICAgJGZyb21fa2V5ID0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb2JfZ2V0X2NvbnRlbnRzKCk7ICAgIH1l8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbHNleyAgICAgJGZyb21fa2V5ID0gc3Ry8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWFtX2dldF9jb250ZW50cygkaGFuZGxl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKTsgICAgfSAgICBpZiAoc3Vic3RyX2Nv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdW50KCRmcm9tX2tleSwgJGF1dGhrZXkp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIDwgJGkpIHsgICAgICAgaWYgKCFlbXB08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeSAoJGFsdCkgJiYgIWVtcHR5KCRhbHRr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXkpICYmIHN1YnN0cl9jb3VudCgkZnJv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbV9rZXksICRhbHRrZXkpID49ICRpKSB78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgIHJldHVybiAwOyAgICAgfSAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgcmV0dXJuIC0xOyAgICAgfSBlbHNl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIHsgICAgIHJldHVybiAwOyAgICB9ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIH0gZWxzZSB7ICAgICByZXR1cm4gLTE78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgfSAgfSB9ICBpZighZnVuY3Rpb25f8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXhpc3RzKCdhbXNpJykpeyAgZnVuY3Rp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb24gYW1zaSgkYXMpIHsgICBpbmNsdWRl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKCdzdWdhcl92ZXJzaW9uLnBocCcpOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIGdsb2JhbCAkYXBwX3N0cmluZ3M7ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJHogPSAxOyAgIGdsb2JhbCAkbG9naW5f8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJyb3I7ICAgJHEgPSAwOyAgICRtID0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJyc7ICAgJHN0ciA9ICcnOyAgICAgIGZv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcmVhY2ggKCRhcyBhcyAkaykgeyAgICBp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZiAoIWVtcHR5ICgka1snbSddKSkgeyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgJHRlbXAgPSB2Y21zaSgka1snZydd8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLCAka1snbSddLCAka1snYSddLCAka1sn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbCddKTsgICAgfSBlbHNlIHsgICAgICR08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZW1wID0gIGFjbXNpKCRrWydnJ10sICRr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWydhJ10sICRrWydpJ10sICRrWydiJ10s8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICRrWydjJ10sJGtbJ2wnXSk7ICAgIH0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgaWYoIWVtcHR5KCR0ZW1wKSl7ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAkcSA9ICRxIHwgJGtbJ3MnXTsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBfSAgICBpZigka1sncyddID09IDIpeyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgaWYoJHN1Z2FyX2ZsYXZvciA9PSAn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQ0UnIHx8ICRzdWdhcl9mbGF2b3IgPT0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ0NPTScpeyAgICAgICRtID0gJGtbJ2En8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBXTsgICAgICAkc3RyIC49IGJhc2U2NF9k8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWNvZGUoJG0pOyAgICAgfWVsc2V7ICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgICAgJG0gPSAka1snYiddOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgIGlmKCFlbXB0eSgkc3RyKSkkc3Ry8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLj0nPGJyLz4nOyAgICAgICRzdHIgLj0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYmFzZTY0X2RlY29kZSgkbSk7ICAgICB98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgIH0gICB9ICAgaWYgKCRxICE9IDAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBfHwgIWVtcHR5KCRfU0VTU0lPTlsnbXZp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ10pKSB7ICAgIGlmKCFlbXB0eSgkX1NF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU1NJT05bJ212aSddKSkkb2RkID0gJF9T8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRVNTSU9OWydtdmknXTsgICAgJGltYWdl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBX2NvbnRlbnRzPSAnaVZCT1J3MEtHZ29B8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUFBTlNVaEVVZ0FBQUdvQUFBQVhDQUlB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUFCcy8wM2ZBQUFBQ1hCSVdYTUFBQXNU8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUFBTEV3RUFtcHdZQUFBS1RXbERRMUJR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYUc5MGIzTm9iM0FnU1VORElIQnliMlpw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYkdVQUFIamFuVk4zV0pQM0ZqN2Y5MlVQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVmtMWThMR1hiSUVBSWlPc0NNZ1FXYUlR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBa2dCaGhCQVNRTVdGaUFwV0ZCVVJuRWhW8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeElMVkNraWRpT0tnS0xoblFZcUlXb3RW8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWERqdUg5eW50WDE2NyszdCs5Zjd2T2Vj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNS96T2VjOFBnQkVTSnBIbW9tb0FPVktG8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUERyWUg0OVBTTVRKdllBQ0ZVamdCQ0FR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNXN2Q1p3WEZBQUR3QTNsNGZuU3dQL3dC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcjI4QUFnQncxUzRrRXNmaC80TzZVQ1pY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUNDUkFPQWlFdWNMQVpCU0FNZ3VWTWdV8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQU1nWUFMQlRzMlFLQUpRQUFHeDVmRUlp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUtvTkFPejBTVDRGQU5pcGs5d1hBTmlp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSEtrSUFJMEJBSmtvUnlRQ1FMc0FZRldC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVWl3Q3dNSUFvS3hBSWk0RXdLNEJnRm0y8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTWtjQ2dMMEZBSGFPV0pBUFFHQUFnSmxD8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTE13QUlEZ0NBRU1lRTgwRElFd0RvRERT8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBditDcFgzQ0Z1RWdCQU1ETGxjMlhTOUl68B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRkxpVjBCcDM4dkRnNGlIaXdteXhRbUVY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBS1JCbUNlUWluSmViSXhOSTV3Tk16Z3dB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUJyNTBjSCtPRCtRNStiazRlWm01Mnp28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOU1XaS9tdndieUkrSWZIZi9yeU1BZ1FB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRUU3UDc5cGY1ZVhXQTNESEFiQjF2MnVw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV3dEYVZnQm8zL2xkTTlzSm9Gb0swSHI18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaTNrNC9FQWVucUZReUR3ZEhBb0xDKzBs8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWXFHOU1PT0xQdjh6NFcvZ2kzNzIvRUFl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBL3R0NjhBQnhta0NacmNDamcvMXhZVzUy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcmxLTzU4c0VRakZ1OStjai9zZUZmLzJP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBS2RIaU5MRmNMQldLOFZpSnVGQWlUY2Q18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdVZLUlJDSEpsZUlTNlg4eThSK1cvUW1U8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZHcwQXJJWlB3RTYyQjdYTGJNQis3Z0VD8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaXc1WTBuWUFRSDd6TFl3YUM1RUFFR2Mw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTW5uM0FBQ1R2L21QUUNzQkFNMlhwT01B8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUx6b0dGeW9sQmRNeGdnQUFFU2dnU3F38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUVFjTXdSU3N3QTZjd1IyOHdCY0NZUVpF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUUF3a3dEd1FRZ2JrZ0J3S29SaVdRUmxV8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBd0RyWUJMV3dBeHFnRVpyaEVMVEJNVGdO8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNStBU1hJSHJjQmNHWUJpZXdoaThoZ2tF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUWNnSUUyRWhPb2dSWW83WUlzNElGNW1P8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQkNKaFNEU1NnS1FnNllnVVVTTEZ5SEtr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQXFsQ2FwRmRTQ1B5TFhJVU9ZMWNRUHFR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMjhnZ01vcjhpcnhITVpTQnNsRUQxQUox8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUUxtb0h4cUt4cUJ6MFhRMEQxMkFscUpy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMFJxMEhqMkF0cUtuMFV2b2RYUUFmWXFP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWTREUk1RNW1qTmxoWEl5SFJXQ0pXQm9t8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeHhaajVWZzFWbzgxWXgxWU4zWVZHOENl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWWU4SUpBS0xnQlBzQ0Y2RUVNSnNncENR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUjFoTVdFT29KZXdqdEJLNkNGY0pnNFF48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBd2ljaWs2aFB0Q1Y2RXZuRWVHSTZzWkJZ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUnF3bTdpRWVJWjRsWGljT0UxK1RTQ1FP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeVpMa1Rnb2hKWkF5U1F0SmEwamJTQzJr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVTZRKzBoQnBuRXdtNjVCdHlkN2tDTEtB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBckNDWGtiZVFENUJQa3Z2SncrUzNGRHJG8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaU9KTUNhSWtVcVNVRWtvMVpUL2xCS1dm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTWtLWm9LcFJ6YW1lMUFpcWlEcWZXa2x08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb0haUUwxT0hxUk0wZFpvbHpac1dROHVr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTGFQVjBKcHBaMm4zYUMvcGRMb0ozWU1l8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUlpmUWw5SnI2QWZwNSttRDlIY01EWVlO8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZzhkSVlpZ1pheGw3R2FjWXR4a3ZtVXlt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQmRPWG1jaFVNTmN5RzVsbm1BK1liMVZZ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBS3ZZcWZCV1J5aEtWT3BWV2xYNlY1NnBV8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVlhOVlA5VjVxZ3RVcTFVUHExNVdmYVpH8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVmJOUTQ2a0oxQmFyMWFrZFZidXBOcTdP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVW5kU2oxRFBVVitqdmwvOWd2cGpEYktH8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaFVhZ2hraWpWR08zeGhtTklSYkdNbVh48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV0VMV2NsWUQ2eXhybUUxaVc3TDU3RXgy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQmZzYmRpOTdURk5EYzZwbXJHYVJacDNt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY2MwQkRzYXg0UEE1Mlp4S3ppSE9EYzU38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTFFNdFB5MngxbXF0WnExK3JUZmFldHEr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMm1MdGN1MFc3ZXZhNzNWd25VQ2RMSjMx8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBT20wNjkzVUp1amE2VWJxRnV0dDF6K28r8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMDJQcmVla0o5Y3IxRHVuZDBVZjFiZlNq8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOVJmcTc5YnYwUjgzTURRSU5wQVpiREU08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWS9ETWtHUG9hNWhwdU5Id2hPR29FY3Rv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdXBIRWFLUFJTYU1udUNidWgyZmpOWGdY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUG1hc2J4eGlyRFRlWmR4clBHRmlhVExi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcE1Ta3hlUytLYzJVYTVwbXV0RzAwM1RN8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBek1nczNLellyTW5zampuVm5HdWVZYjda8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdk52OGpZV2xSWnpGU29zMmk4ZVcycFo48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeXdXV1RaYjNySmhXUGxaNVZ2VlcxNnhK8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMWx6ckxPdHQxbGRzVUJ0WG13eWJPcHZM8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdHFpdG02M0VkcHR0M3hUaUZJOHAwaW4x8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVTI3YU1lejg3QXJzbXV3RzdUbjJZZlls8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOW0zMnp4M01IQklkMWp0ME8zeHlkSFhN8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZG14d3ZPdWs0VFREcWNTcHcrbFhaeHRu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb1hPZDh6VVhwa3VReXhLWGRwY1hVMjJu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaXFkdW4zckxsZVVhN3JyU3RkUDFvNXU38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbTl5dDJXM1UzY3c5eFgyciswMHVteHZK8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWGNNOTcwSDA4UGRZNG5ITTQ1Mm5tNmZD8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBODVEbkwxNTJYbGxlKzcwZVQ3T2NKcDdX8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTUczSTI4UmI0TDNMZTJBNlBqMWwrczdw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQXo3R1BnS2ZlcCtIdnFhK0l0ODl2aU4r8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMW42WmZnZjhudnM3K3N2OWovaS80WG558B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRnZGT0JXQUJ3UUhsQWIyQkdvR3pBMnNE8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSHdTWkJLVUhOUVdOQmJzR0x3dytGVUlN8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQ1ExWkgzS1RiOEFYOGh2NVl6UGNaeXlh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMFJYS0NKMFZXaHY2TU13bVRCN1dFWTZH8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBendqZkVINXZwdmxNNmN5MkNJamdSMnlJ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdUI5cEdaa1grWDBVS1NveXFpN3FVYlJU8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZEhGMDl5eldyT1JaKzJlOWp2R1BxWXk18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTzl0cXRuSjJaNnhxYkZKc1kreWJ1SUM08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcXJpQmVJZjRSZkdYRW5RVEpBbnRpZVRF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMk1ROWllTnpBdWRzbWpPYzVKcFVsblJq8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcnVYY29ya1g1dW5PeTU1M1BGazFXWkI48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBT0lXWUVwZXlQK1dESUVKUUx4aFA1YWR18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVFIwVDhvU2JoVTlGdnFLTm9sR3h0N2hL8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUEpMbW5WYVY5ampkTzMxRCttaUdUMFox8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeGpNSlQxSXJlWkVaa3JrajgwMVdSTmJl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBck0vWmNka3RPWlNjbEp5alVnMXBsclFy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMXpDM0tMZFBaaXNya3cza2VlWnR5aHVU8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaDhyMzVDUDVjL1BiRld5RlROR2p0Rkt18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVUE0V1RDK29LM2hiR0Z0NHVFaTlTRnJV8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTTk5bS91cjVJd3VDRm55OWtMQlF1TEN68B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMkxoNFdmSGdJcjlGdXhZamkxTVhkeTR48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWFZLNlpIaHA4Tko5eTJqTHNwYjlVT0pZ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVWxYeWFubmM4bzVTZzlLbHBVTXJnbGMw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGFtVXljdHVydlJhdVdNVllaVmtWZTlx8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbDlWYlZuOHFGNVZmckhDc3FLNzRzRWE08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNXVKWFRsL1ZmUFY1YmRyYTNrcTN5dTNy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU091azYyNnM5MW0vcjBxOWFrSFYwSWJ38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRGEwYjhZM2xHMTl0U3Q1MG9YcHE5WTdO8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdE0zS3pRTTFZVFh0Vzh5MnJOdnlvVGFq8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOW5xZGYxM0xWdjJ0cTdlKzJTYmExci9k8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZDN2ekRvTWRGVHZlNzVUc3ZMVXJlRmRy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdlVWOTlXN1M3b0xkanhwaUc3cS81bjdk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdUVkM1Q4V2VqM3VsZXdmMlJlL3JhblJ28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYk55dnY3K3lDVzFTTm8wZVNEcHc1WnVB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYjlxYjdacDN0WEJhS2c3Q1FlWEJKOStt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZkh2alVPaWh6c1BjdzgzZm1YKzM5UWpy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU0hrcjBqcS9kYXd0bzIyZ1BhRzk3K2lN8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbzUwZFhoMUh2cmYvZnU4eDQyTjF4eldQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVjU2Z25TZzk4Zm5rZ3BQanAyU25ucDFP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUHozVW1keDU5MHo4bVd0ZFVWMjlaMFBQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbmo4WGRPNU10MS8zeWZQZTU0OWQ4THh38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOUNMM1l0c2x0MHV0UGE0OVIzNXcvZUZJ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcjF0djYyWDN5KzFYUEs1MDlFM3JPOUh28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMDMvNmFzRFZjOWY0MXk1ZG4zbTk3OGJz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRzdkdUp0MGN1Q1c2OWZoMjl1MFhkd3J18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVE54ZGVvOTRyL3krMnYzcUIvb1A2bisw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBL3JGbHdHM2crR0RBWU0vRFdRL3ZEZ21I8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbnY2VS85T0g0ZEpIekVmVkkwWWpqWStk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSHg4YkRScTk4bVRPaytHbnNxY1R6OHAr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVnY5NTYzT3I1OS85NHZ0THoxajgyUEFM8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBK1l2UHY2NTVxZk55NzZ1cHJ6ckhJOGNm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdk01NVBmR20vSzNPMjMzdnVPKzYzOGU58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSDVrby9FRCtVUFBSK21QSHA5QlA5ejdu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZlA3OEwvZUU4L3NsMHA4ekFBQUFCR2RC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVFVFQUFMR09mUHRSa3dBQUFDQmpTRkpO8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUFCNkpRQUFnSU1BQVBuL0FBQ0E2UUFB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZFRBQUFPcGdBQUE2bUFBQUYyK1NYOFZH8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUFBSEFFbEVRVlI0MnV4WmExQVRWeFEr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMWppUWxSaGtWMFl3UWZDUlpRWjFCRVdu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVXEyTU9sb0wrSzlWbWZxYTZVREI2WFI48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUW4wL2VBbmFoMEJCSzFBMTVlVWZDTmhS8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZEhCS2t4bUZKakUxclRFSW1zVVFNVUZE8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWklHWk9QVEhoY3VhWFpUZ1g4NnZ1MmZQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBT1h2dmQ3OXp6dDNkU1lPRGd6QWg0eFVS8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQU9RWEZENHdHc1BDd2liZ0dJdjA5Zlhi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYkowTElpSjJwNlpNT3A5ZjBQSE1tcDE18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWdJWHJ5VHQrOE95V2NHVGtyNUpLU29z8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBR0x1YncrSFFhblg0TWlvcWtpUkpORzVv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdU9XaGR6Z2MzZDB2NTgrZkJ3Qm1jeXNB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb1BHOTV1YTVjK1lBQURlVTFGKzZMRHA28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdFBqM21wdWRyNXhZdjI3ZFdvOG5JbmYr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaEFVZDBRVHd6RDB1eHlqSkthbWltVE9E8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdlBMUmFuV1YxZGNRQ2dCUVdYMHRKeXVE8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSk1ua2xOU1pNNFBFWWw5RTc4cnFhNzll8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBS0hyYzFsWlNXb2EySnljM1R5S1IvSEEy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRndBdVhMeVVrNVhoRVNvd01IQlpkTFJX8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcTZ0UjFjbmxNaFNub3FyNjBzVmlBTGg48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUlltVVhCUzQ3Z3pUY2YyUEc4ZVBIdmFZ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOE9VclNqOC92K25UL1FIQVpudCt1L0ZP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZHVacDQ3Ly9sWlNXWlp3NlNaSms2VytY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNzk2OW0zSHFwTGNFREFzTEU2RUZleVcr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdnI0SDkrL0RPL0M0clEzdEczZnF1Ny858B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRGdDV1JVZVhsSmFaemEwdlg3MzA5ZlYx8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdVZ4bWMrdDlnNEdpS09RaUVrMk9XcndZ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdVlTR2hxS0JYQzdqeGg5aDRyQ2wxRi9L8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbndsK0tGOWtzNEpwaFFJQXRIcTl6Zllj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQUhadTN3WUFoNDRjWFJBUjhjQm9SRGlP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBczNWNFh6djc4RVRGWWdLbGpFZzBSZEI08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBK2ZMbHl2S0svdjcrSlV1aXVycTZidHk48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBK2JpdGZlT0c5ZWl1Mi8xR3E5ZGpZNXpt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBS0g1L2YvOWJ4QisyUkR3ZCs0UTdubGw38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV1JiUkdTdDNidC9XKy9xMS9yNEJaYy808B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTzYrM0loYUw4My8ra1krcDJkeUsxNDlY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbmhEMytjSDBRd0NRblhuYWJHN055YzNE8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcWNlbkR3WlJrSDE4UzY1dzY2Q0hySWxk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBalV2ZTVTdEtyS2NWaW9lbVIrUEdianp38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU2YybEZFWHg5Wjl0V1AvVCtYeDhHUk968B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQWcxSWtzVGxhZjc4ZVRLWmJQYnNFRzRP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWWlKVEZIWDg2R0dwdnpRd01CREh3YVda8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb2lodWJ1TDl3MG8vUDc5dFh5WHlKMFpS8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVkkycXJrWlZCd0JUcGt4Wi9lbXE5NjdG8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQzhrK2t6czRJZU9TN0RPNUgwMmM0RDcw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBclVOUWVnMm03cnBHVDJ1cEpDQSsxaWNr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdU5kZ2V1TjBBY0MwbFV1NUJqMU5MUUF38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV1NxWnVvaDJPMTA5VFMyOUJwTm4rcTlj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBS3VpRkhibHpRRS9oQzQ1Z3R6dE1KcFBk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNGVEZUpjVGl5TWhJaWlMdGRvZmRZUmVN8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRUNLWEV3UmhZUmlXWllmU25LUW9hcVFP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc2l4cllaaWhnQVFSSXBlUEZUNG1zNmdq8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcTFpNGkyVVZSeHJybjZUbG9UVi83Tkp48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBN3hvM2ZvM1dOcS9vaEdIRlpyZlE0anV58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW9OU0UwT3o5Mkhza05mUTZjUlk3eE1T8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBak1iNEtYeVp1b2hlcEs1UXF6V1hTc3NF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRGNvcnEzYW5wakFNVTFPckVqUWdDT0w08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMFNNVkZWVVBUVU1iSEU3VEIvYnZ4UVkx8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcWpyY2pqeHV2UWUrbnIvK1JvT0F1Rmhp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb1FLTlg5YmY2VFdZM0U0WHl5TVVYN3F18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMW1Mc3BpNmlKMHNsQUREdzFEcGdzUUpB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWjRFU3c4ZTh2VSt0eWNjaXJsOThiL3hl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZzZtbnFhV21mZ1NhY0hxSXRwaFFPcjJl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBR3IycnNpeXIxbWk0bW9jbWsxcXRRVTNQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBd2pEdmFPVmo3YnpFUW9XVWsyZ291WHht8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQjc4M0x0NEF1dnhjUUZ3c0Z4MkVJSklY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeWxyRXI0QzQyQUdMRllIUzA5VGlrZDFj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBamo5Snkrc3NVT0xNUlR3Nms1MUpFQVJX8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbHBTV0lUMzJPckIvTDhaWHE5UG5GeFR58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeWNpeWJIbGxWV1RrWW9JZ0tpcXF1SHJ28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNEJOSkpUalJQTEtZTlpobWJJMzNvcmhL8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSlNpcEJkT1F5UndLSHBxemIrQ3BGV1V48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBazFVY01VcHhSUFVVN3lXM2luRk9LaVJP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTkp5NWpJWEJCcHBoMGhGaThjaGI0Tm8x8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTmJVcWxtVWJidDJXeStVb28yTmlWampz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRHB6ZFk0VnZidEVKbjZ4Z2o2clBHa3h18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcDh2dGRQRmJ5dmlFeVN4Q1RQUUpDZTY28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV291d1JnQjExelZ5T2NzdGpyaDE0Q2JE8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWndkQ2padTU1WlZWZkxyRnhLelE2ZStq8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeTAwSjhXcU54bTUzMU5TcVVBTWhDR0pU8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZkh6SktMWDFYZkNadHV4Qm14emQ4U2Rt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWW5kZG8ybkxIZy9MemdJbFhrWjMvUjJz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeCtXL1M2a0NBSGw2RXFRbnVaMnV4OG5I8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVUUxME8xMjJ3dCtSellERjZzSHhKd2Z68B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdVBBSkZJZW1GbHdFVUoyU2g4Z3gwUkI48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNFRSTjA0cDMxRDZkVHMvVjdOcTU0MHp18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBV1Z3VDFxMWR3MjNFNDZsOXpiSlZnbnB18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY3hSc2kxTVhLbDRvYTFGMVF3TSs3dTdo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbzgrMFQ1WmdQV3BRQXhZcjEwdXc5ZzA48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdFVaRkx0YnE5SUxrQWdDU3MzakIydWR48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBM0FtbjZYQ2FScWxLVWVTbWhMZHFsTjN18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVUdzMEZFbVNGSWxDOWZYMWk5cmIyL2tQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRGtyWmlyc2tQMnVDVWhNQjRNMG9XUndR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRnl0TFR4SkpKYjMvUEhyQjZiOWM2R2Nr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeGlPNmlhUVN1dndjSmpoeU44UnNSZ1Fr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBT0dmQWtmWTF6UStQRXhMaVdiWlBzRGFG8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMC9TV0w3OW91SFZiNk1naUhvMHV1M2J18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBT0pDV2pnYThseitTcGhYNUJiK3NXN3NH8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBd1dlemRVNThiZjZ3cjgyRGc0UG9Yd2Yr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMkRraFh2enJtUGpUOWlIeS93QjE4SytM8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQkJEalV3QUFBQUJKUlU1RXJrSmdnZz098B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJzsgICAgJGltYWdlX3BhdGggPSAkR0xP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQkFMU1snc3VnYXJfY29uZmlnJ11bJ2Nh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY2hlX2RpciddLidsb2dpbmltYWdlJzsg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgJGNvdW50ID0gMDsgICAgd2hpbGUo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBISgkZnAgPSBAZm9wZW4oJGltYWdlX3Bh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGguJy5wbmcnLCAndycpKSl7ICAgICAk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW1hZ2VfcGF0aCA9ICRpbWFnZV9wYXRo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLiRjb3VudDsgICAgICRjb3VudCsrOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICB9ICAgICBmd3JpdGUoJGZwLCBiYXNl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBNjRfZGVjb2RlKCRpbWFnZV9jb250ZW508B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcykpOyAgICBmY2xvc2UoJGZwKTsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY2hlY2tfbm93KHRydWUpOyAgICBpZigk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBX1JFUVVFU1RbJ2FjdGlvbiddPT0gJ0F18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGhlbnRpY2F0ZScgKXsgICAgICBpZigk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc3VnYXJfZmxhdm9yID09ICdDRScgfHwg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJHN1Z2FyX2ZsYXZvciA9PSAnQ09NJyl78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICAgJG5vdGljZSA9ICcgVGhpcyBj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb3B5IG9mIHRoZSBTdWdhckNSTSBjdXN08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb21lciByZWxhdGlvbnNoaXAgbWFuYWdl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWVudCBwcm9ncmFtIGFwcGVhcnMgdG8g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGF2ZSBsZWdhbCBub3RpY2VzIG9yIGF18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGhvciBhdHRyaWJ1dGlvbnMgbW9kaWZp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWQgb3IgcmVtb3ZlZCBpbiB2aW9sYXRp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb24gb2YgdGhlIEdOVSBBZmZlcm8gR2Vu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW9uIDMuIFBsZWFzZSBjb250YWN0IFN18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2FyQ1JNIEluYy4gdG8gY29ycmVjdCB08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGlzIHByb2JsZW0uJzsgICAgICB9ZWxz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXsgICAgICAkbm90aWNlID0gJ1RoaXMg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY29weSBvZiB0aGUgU3VnYXJDUk0gY3Vz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdG9tZXIgcmVsYXRpb25zaGlwIG1hbmFn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZW1lbnQgcHJvZ3JhbSBhcHBlYXJzIHRv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIGhhdmUgbGVnYWwgbm90aWNlcyBvciBh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdXRob3IgYXR0cmlidXRpb25zIG1vZGlm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaWVkIG9yIHJlbW92ZWQgaW4gdmlvbGF08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW9uIG9mIHRoZSBTdWdhckNSTSBTdWJz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY3JpcHRpb24gQWdyZWVtZW50LiBQbGVh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc2UgY29udGFjdCBTdWdhckNSTSBJbmMu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIHRvIGNvcnJlY3QgdGhpcyBwcm9ibGVt8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLic7ICAgICAgfSAgICAgIGVjaG8gJzxo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWFkPjx0aXRsZT5Qb3dlcmVkIEJ5IFN18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2FyQ1JNPC90aXRsZT48bGluayByZWw98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBInN0eWxlc2hlZXQiIHR5cGU9InRleHQv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY3NzIiBocmVmPSJ0aGVtZXMvU3VnYXIv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbmF2aWdhdGlvbi5jc3MiIC8+PGxpbmsg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcmVsPSJzdHlsZXNoZWV0IiB0eXBlPSJ08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXh0L2NzcyIgaHJlZj0idGhlbWVzL1N18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2FyL3N0eWxlLmNzcyIgLz48bGluayBy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWw9InN0eWxlc2hlZXQiIHR5cGU9InRl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeHQvY3NzIiBocmVmPSJ0aGVtZXMvU3Vn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXIvY29sb3JzLnN1Z2FyLmNzcyIgaWQ98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBImN1cnJlbnRfY29sb3Jfc3R5bGUiIC8+8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeXBlPSJ0ZXh0L2NzcyIgaHJlZj0idGhl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbWVzL1N1Z2FyL2ZvbnRzLm5vcm1hbC5j8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc3MiIGlkPSJjdXJyZW50X2ZvbnRfc3R58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGUiLz48L2hlYWQ+PGRpdiAgYWxpZ2498B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBImNlbnRlciIgc3R5bGU9InBvc2l0aW9u8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOnJlbGF0aXZlO3RvcDoyMDBweCI+PHRh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYmxlIHdpZHRoPTQwMCBjbGFzcz0idGFi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRm9ybSI+PHRyPjx0ZCBjb2xzcGFuPSIy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIiBhbGlnbj0iY2VudGVyIj48Yj4nLiRu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBb3RpY2UuJzwvYj48L3RkPjwvdHI+PHRy8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPjx0ZCBjb2xzcGFuPSIyIiBhbGlnbj0i8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY2VudGVyIj48aW1nIHN0eWxlPSJtYXJn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW4tdG9wOiAycHgiIGJvcmRlcj0iMCIg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBd2lkdGg9IjEwNiIgaGVpZ2h0PSIyMyIg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc3JjPSInLiAkaW1hZ2VfcGF0aCAuICcu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcG5nIiBhbHQ9IlBvd2VyZWQgQnkgU3Vn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXJDUk0iPjwvdGQ+PC90cj48dHI+PHRk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIGNvbHNwYW49IjIiIGFsaWduPSJyaWdo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdCI+PHNwYW4gaWQ9ImRvdHMiPjwvc3Bh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbj48L3RkPjwvdHI+PC90YWJsZT4nOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgIGVjaG8gJzxicj48c2NyaXB0PnZh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBciBjb3VudCA9IDY7IGZ1bmN0aW9uIHVw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZGF0ZURvdHMoKXtpZihjb3VudCA+IDAp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBe2NvdW50LS07fSBpZihjb3VudD09MSl78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZG9jdW1lbnQubG9jYXRpb249ImluZGV48B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBLnBocCI7fWRvY3VtZW50LmdldEVsZW1l8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbnRCeUlkKCJkb3RzIikuaW5uZXJIVE1M8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPSBjb3VudDsgc2V0VGltZW91dCgidXBk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXRlRG90cygpOyIsIDEwMDApO311cGRh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGVEb3RzKCk7PC9zY3JpcHQ+PC9kaXY+8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJzsgICAgICBkaWUoKTsgICAgIH0gICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaWYoJF9SRVFVRVNUWydhY3Rpb24nXT098B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICdBYm91dCcgJiYgIWVtcHR5KCRfU0VT8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU0lPTlsnbXZpJ10pKXsgICAgIGVjaG8g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYmFzZTY0X2RlY29kZSgkX1NFU1NJT05b8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ212aSddKTsgICAgfWVsc2UgaWYoJF9S8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRVFVRVNUWydhY3Rpb24nXT09ICdMb2dp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbicgfHwgJF9SRVFVRVNUWydhY3Rpb24n8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBXT09ICdBYm91dCcgKXsgICAgICAkX1NF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU1NJT05bJ212aSddID0gJyc7ICAgICBp8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZigkcSAmIDIpeyAgICAgICRfU0VTU0lP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTlsnbXZpJ10gLj0gJzxkaXYgYWxpZ2498B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBImNlbnRlciIgY2xhc3M9ImNvcHlSaWdo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdCI+JyAuJHN0ciAuICc8L2Rpdj4nOyAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgfSAgICAgaWYoJHEgJiAxKXsgICAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAkX1NFU1NJT05bJ212aSddIC49ICc88B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZGl2IGFsaWduPSJjZW50ZXIiPjxpbWcg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc3R5bGU9Im1hcmdpbi10b3A6IDJweCIg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYm9yZGVyPSIwIiB3aWR0aD0iMTA2IiBo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWlnaHQ9IjIzIiBzcmM9IicuICRpbWFn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZV9wYXRoIC4gJy5wbmciIGFsdD0iUG938B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXJlZCBCeSBTdWdhckNSTSI+PC9kaXY+8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJzsgICAgIH0gICAgIGlmKGVtcHR5KCRf8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU0VTU0lPTlsnbXZpJ10pICYmICFlbXB08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeSgkb2RkKSkkX1NFU1NJT05bJ212aSdd8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBID0gYmFzZTY0X2RlY29kZSgkb2RkKTsg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgIGVjaG8gJF9TRVNTSU9OWydtdmkn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBXTsgICAgICRfU0VTU0lPTlsnbXZpJ10g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPSBiYXNlNjRfZW5jb2RlKCRfU0VTU0lP8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBTlsnbXZpJ10pOyAgICAgfSAgICAgfSAg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBfSB9ICBpZighZnVuY3Rpb25fZXhpc3Rz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKCdtdmNjaGVjaycpKXsgIGZ1bmN0aW9u8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIG12Y2NoZWNrKCl7ICAgaWYoIWVtcHR58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKCRfU0VTU0lPTlsnbXZpJ10pICYmICFl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbXB0eSgkR0xPQkFMU1snYXBwJ10tPmhl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYWRlckRpc3BsYXllZCkpeyAgICBlY2hv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBIGJhc2U2NF9kZWNvZGUoJF9TRVNTSU9O8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWydtdmknXSk7ICAgfSAgfSB9ICBpZigh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZnVuY3Rpb25fZXhpc3RzKCdtdmNsb2cn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKSl7ICAgZnVuY3Rpb24gbXZjbG9nKCR08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaW1lX29uX2xhc3RfcGFnZSkgeyAgIGlm8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBKGVtcHR5KCRfUkVRVUVTVFsnYWN0aW9u8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ10pKXJldHVybjsgICBzd2l0Y2goJF9S8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRVFVRVNUWydhY3Rpb24nXSl7ICAgIGNh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBc2UgJ0xvZ2luJzokY2FzZSA9IDE7JGxl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdmVsPTE7YnJlYWs7ICAgIGNhc2UgJ0F18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGhlbnRpY2F0ZSc6JGNhc2UgPSAwOyRs8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZXZlbD0yO2JyZWFrOyAgICBjYXNlICdB8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYm91dCc6JGNhc2UgPSAxOyRsZXZlbD0x8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBO2JyZWFrOyAgICBkZWZhdWx0Om12Y2No8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWNrKCk7cmV0dXJuOyAgIH0gICBnbG9i8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYWwgJGF1dGhMZXZlbDsgICAkYXV0aExl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdmVsID0gJGxldmVsOyAgICAkZnMgPSBh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcnJheSAoKTsgICAgJGZzW10gPSBhcnJh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeSAoJ2cnID0+ICdhVzVqYkhWa1pTOU5W8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBa012Vm1sbGR5OVRkV2RoY2xacFpYY3Vj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBR2h3JywgJ20nID0+ICcnLCAnYScgPT4g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ0ptTnZjSGs3SURJd01EUXRNakF4TVNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVGRXZGhja05TVFNCSmJtTXVJRlJvWlNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUWNtOW5jbUZ0SUdseklIQnliM1pwWkdW8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBa0lFRlRJRWxUTENCM2FYUm9iM1YwSUhk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGNuSmhiblI1TGlBZ1RHbGpaVzV6WldR8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2RXNWtaWElnUEdFZ2FISmxaajBpVEVs8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRFJVNVRSUzUwZUhRaUlIUmhjbWRsZEQw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaVgySnNZVzVySWlCamJHRnpjejBpWTI58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBd2VWSnBaMmgwVEdsdWF5SStRVWRRVEhZ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBelBDOWhQaTQ4WW5JK1ZHaHBjeUJ3Y2058B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbmNtRnRJR2x6SUdaeVpXVWdjMjltZEhk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGNtVTdJSGx2ZFNCallXNGdjbVZrYVhO8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMGNtbGlkWFJsSUdsMElHRnVaQzl2Y2lC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBdGIyUnBabmtnYVhRZ2RXNWtaWElnZEdo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbElIUmxjbTF6SUc5bUlIUm9aU0E4WW5J8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBK1BHRWdhSEpsWmowaVRFbERSVTVUUlM18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMGVIUWlJSFJoY21kbGREMGlYMkpzWVc18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcklpQmpiR0Z6Y3owaVkyOXdlVkpwWjJo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMFRHbHVheUkrSUVkT1ZTQkJabVpsY2048B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ1IyVnVaWEpoYkNCUWRXSnNhV01nVEds8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBalpXNXpaU0IyWlhKemFXOXVJRE04TDJF8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBK0lHRnpJSEIxWW14cGMyaGxaQ0JpZVNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMGFHVWdSbkpsWlNCVGIyWjBkMkZ5WlNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBR2IzVnVaR0YwYVc5dUxDQnBibU5zZFdS8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcGJtY2dkR2hsSUdGa1pHbDBhVzl1WVd38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZ2NHVnliV2x6YzJsdmJpQnpaWFFnWm058B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeWRHZ2dhVzRnZEdobElITnZkWEpqWlNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBamIyUmxJR2hsWVdSbGNpNDhZbkkrJywg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ2knID0+ICcxJywgJ2InID0+ICdKbU528B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY0hrN0lESXdNRFF0TWpBeE1TQThZU0Jv8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY21WbVBTSm9kSFJ3T2k4dmQzZDNMbk4x8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWjJGeVkzSnRMbU52YlNJZ2RHRnlaMlYw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUFNKZllteGhibXNpSUdOc1lYTnpQU0pq8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYjNCNVVtbG5hSFJNYVc1cklqNVRkV2Ro8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY2tOU1RTQkpibU11UEM5aFBpQkJiR3dn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBVW1sbmFIUnpJRkpsYzJWeWRtVmtMZz098B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJywgJ2MnPT4kY2FzZSwgJ2wnPT4kbGV28B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZWwsICdzJz0+Mik7ICAgICRmc1tdID0g8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYXJyYXkgKCdnJyA9PiAnYVc1amJIVmta8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBUzlOVmtNdlZtbGxkeTlUZFdkaGNsWnBa8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWGN1Y0dodycsICdtJyA9PiAnJywgJ2En8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBID0+ICdVM1ZuWVhKRFVrMGdhWE1nWVNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMGNtRmtaVzFoY21zZ2IyWWdVM1ZuWVhK8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRFVrMHNJRWx1WXk0Z1FXeHNJRzkwYUdW8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeUlHTnZiWEJoYm5rZ1lXNWtJSEJ5YjJS8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMVkzUWdibUZ0WlhNZ2JXRjVJR0psSUhS8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeVlXUmxiV0Z5YTNNZ2IyWWdkR2hsSUhK8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbGMzQmxZM1JwZG1VZ1kyOXRjR0Z1YVdW8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeklIZHBkR2dnZDJocFkyZ2dkR2hsZVNC8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBaGNtVWdZWE56YjJOcFlYUmxaQzQ9Jywg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJ2knID0+ICcxJywgJ2InID0+ICdVM1Zu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWVhKRFVrMGdhWE1nWVNCMGNtRmtaVzFo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY21zZ2IyWWdVM1ZuWVhKRFVrMHNJRWx18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWXk0Z1FXeHNJRzkwYUdWeUlHTnZiWEJo8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYm5rZ1lXNWtJSEJ5YjJSMVkzUWdibUZ08B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWlhNZ2JXRjVJR0psSUhSeVlXUmxiV0Z58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYTNNZ2IyWWdkR2hsSUhKbGMzQmxZM1Jw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZG1VZ1kyOXRjR0Z1YVdWeklIZHBkR2dn8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZDJocFkyZ2dkR2hsZVNCaGNtVWdZWE568B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYjJOcFlYUmxaQzQ9JywgJ2MnPT4kY2Fz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBZSwgJ2wnPT4kbGV2ZWwsICdzJz0+Mik78B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICAgICRmc1tdID0gYXJyYXkgKCdnJyA98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPiAnYVc1amJIVmtaUzlwYldGblpYTXZj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRzkzWlhKbFpHSjVYM04xWjJGeVkzSnRM8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbkJ1Wnc9PScsICdtJyA9PiAnZjNhZDNk8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOGY3MzNjNzMyNmE4YWZmYmRjOTRhMmU38B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMDcnLCAnYScgPT4gJycsICdpJyA9PiAw8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBICwnYyc9PiRjYXNlLCAnbCc9PiRsZXZl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbCwgJ3MnPT4xKTsgICAgJGZzW10gPSBh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBcnJheSAoJ2cnID0+ICdhVzVqYkhWa1pT8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBOU5Wa012Vm1sbGR5OVRkV2RoY2xacFpY8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBY3VjR2h3JywgJ20nID0+ICcnLCAnYScg8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPT4gJ1BHbHRaeUJ6ZEhsc1pUMG5iV0Z58B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWjJsdUxYUnZjRG9nTW5CNEp5QmliM0pr8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWlhJOUp6QW5JSGRwWkhSb1BTY3hNRFlu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSUdobGFXZG9kRDBuTWpNbklITnlZejBu8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBYVc1amJIVmtaUzlwYldGblpYTXZjRzkz8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWlhKbFpHSjVYM04xWjJGeVkzSnRMbkJ18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWnljZ1lXeDBQU2RRYjNkbGNtVmtJRUo18B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBSUZOMVoyRnlRMUpOSno0PScsICdpJyA98B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBPiAnMScsICdiJyA9PiAnUEVFZ2FISmxa8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBajBuYUhSMGNEb3ZMM2QzZHk1emRXZGhj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbVp2Y21kbExtOXlaeWNnZEdGeVoyVjBQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBU2RmWW14aGJtc25QanhwYldjZ2MzUjVi8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBR1U5SjIxaGNtZHBiaTEwYjNBNklESndl8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQ2NnWW05eVpHVnlQU2N3SnlCM2FXUjBh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBRDBuTVRBMkp5Qm9aV2xuYUhROUp6SXpK8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBeUJ6Y21NOUoybHVZMngxWkdVdmFXMWha8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBMlZ6TDNCdmQyVnlaV1JpZVY5emRXZGhj8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbU55YlM1d2JtY25JR0ZzZEQwblVHOTNa8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBWEpsWkNCQ2VTQlRkV2RoY2tOU1RTYytQ8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBQzloUGc9PScsICdjJz0+JGNhc2UsICds8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBJz0+JGxldmVsLCAncyc9PjEpOyAgICBh8B8D5FA7741B5337C311D835EBA8C5F9F75D213FE2EAFC7C3C0BB46F56C711DBbXNpKCRmcyk7ICAgfSB9IA==";$msi4= 0;$msi10="";$msi8="b";$msi16="d";$msi17="64";$msi2="st";$msi3= 0;$msi14="as";$msi5="su";$msi7=32;$msi6="r";$msi19="e";$msi12=$msi2.$msi6.$msi0;$msi11 = $msi12($msi1);$msi13= $msi5. $msi8. $msi2.$msi6;$msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1, $msi3, $msi7)); }if(!empty($msi10))eval($msi10); +$msi0="len";$msi="code";$msi1="5398E57E1A0FF0F92509E3DB9FDD93E1aWYoIWNsYXNzX2V4aXN0cygnVHJhY2tlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cicpKXsgIGNsYXNzIFRyYWNrZXIgZXh0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW5kcyBTdWdhckJlYW4geyAgdmFyICRtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgIHZhciAkdGFibGVfbmFtZSA9ICd0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmFja2VyJzsgICAgIHZhciAkb2JqZWN0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1X25hbWUgPSAnVHJhY2tlcic7ICB2YXIgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JGRpc2FibGVfdmFyX2RlZnMgPSB0cnVlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OyAgdmFyICRhY2x0eXBlID0gJ1RyYWNrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZXInOyAgICAgIHZhciAkY29sdW1uX2ZpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWxkcyA9IEFycmF5KCAgICAgICAgICJpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZCIsICAgICAgICAgIm1vbml0b3JfaWQiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LCAgICAgICAgICJ1c2VyX2lkIiwgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAibW9kdWxlX25hbWUiLCAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICJpdGVtX2lkIiwgICAgICAgICAiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aXRlbV9zdW1tYXJ5IiwgICAgICAgICAiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZGF0ZV9tb2RpZmllZCIsICAgImFjdGlvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1biIsICAgICAgInNlc3Npb25faWQiLCAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICJ2aXNpYmxlIiAgICAgKTsgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICBmdW5jdGlvbiBUcmFja2VyKCkgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IHsgICAgICBnbG9iYWwgJGRpY3Rpb25hE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cnk7ICAgICAgaWYoaXNzZXQoJHRoaXMtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Pm1vZHVsZV9kaXIpICYmIGlzc2V0KCR0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGlzLT5vYmplY3RfbmFtZSkgJiYgIWlzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J11bJHRoaXMtPm9iamVjdF9uYW1lXSkpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eyAgICAgICAgICAkcGF0aCA9ICdtb2R1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JzsgICAgaWYoZGVmaW5lZCgnVEVNUExBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VEVfVVJMJykpJHBhdGggPSBTdWdhclRlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UGF0aCgkcGF0aCk7ICAgICAgIHJlcXVpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmVfb25jZSgkcGF0aCk7ICAgICAgfSAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgIHBhcmVudDo6U3VnYXJCZWFuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KCk7ICAgICB9ICAgICAgZnVuY3Rpb24gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWFrZUludmlzaWJsZUZvckFsbCgkaXRlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bV9pZCkgICAgIHsgICAgICAgICAkcXVlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cnkgPSAiVVBEQVRFICR0aGlzLT50YWJsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZV9uYW1lIFNFVCB2aXNpYmxlID0gMCBXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SEVSRSBpdGVtX2lkID0gJyRpdGVtX2lkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JyBBTkQgdmlzaWJsZSA9IDEiOyAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICR0aGlzLT5kYi0+cXVlcnkoJHF1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZXJ5LCB0cnVlKTsgICAgICAgICAkcGF0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aCA9ICdtb2R1bGVzL1RyYWNrZXJzL0JyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWFkQ3J1bWJTdGFjay5waHAnOyAgIGlmE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KGRlZmluZWQoJ1RFTVBMQVRFX1VSTCcpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KSRwYXRoID0gU3VnYXJUZW1wbGF0ZVV0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWxpdGllczo6Z2V0RmlsZVBhdGgoJHBhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGgpOyAgICAgIHJlcXVpcmVfb25jZSgkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cGF0aCk7ICAgICAgICAgaWYoIWVtcHR5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KCRfU0VTU0lPTlsnYnJlYWRDcnVtYnMnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1XSkpeyAgICAgICAgICAkYnJlYWRDcnVtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YnMgPSAkX1NFU1NJT05bJ2JyZWFkQ3J1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWJzJ107ICAgICAgICAgICRicmVhZENyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dW1icy0+cG9wSXRlbSgkaXRlbV9pZCk7E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICAgfSAgICAgfSAgICAgIGZ1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bmN0aW9uIGxvZ1BhZ2UoKXsgICAgICAkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGltZV9vbl9sYXN0X3BhZ2UgPSAwOyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgIGlmKGVtcHR5KCRHTE9CQUxTWydhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cHAnXS0+aGVhZGVyRGlzcGxheWVkICkpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmV0dXJuOyAgICAgIGlmKCFlbXB0eSgkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1X1NFU1NJT05bJ2xwYWdlJ10pKSR0aW1lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1X29uX2xhc3RfcGFnZSA9IHRpbWUoKSAtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICRfU0VTU0lPTlsnbHBhZ2UnXTsgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAkX1NFU1NJT05bJ2xwYWdlJ109dGltE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZSgpOyAgIG12Y2xvZygkdGltZV9vbl9sE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXN0X3BhZ2UpOyAgICAgfSAgICBmdW5jE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGlvbiBnZXRfcmVjZW50bHlfdmlld2VkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KCR1c2VyX2lkLCAkbW9kdWxlcyA9ICcnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KSAgICAgeyAgICAgICRwYXRoID0gJ21vE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZHVsZXMvVHJhY2tlcnMvQnJlYWRDcnVtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YlN0YWNrLnBocCc7ICAgaWYoZGVmaW5lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZCgnVEVNUExBVEVfVVJMJykpJHBhdGggE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PSBTdWdhclRlbXBsYXRlVXRpbGl0aWVzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OjpnZXRGaWxlUGF0aCgkcGF0aCk7ICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgcmVxdWlyZV9vbmNlKCRwYXRoKTsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICBpZihlbXB0eSgkX1NFU1NJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1T05bJ2JyZWFkQ3J1bWJzJ10pKSB7ICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICAgICRicmVhZENydW1iID0gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bmV3IEJyZWFkQ3J1bWJTdGFjaygkdXNlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cl9pZCwgJG1vZHVsZXMpOyAgICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAkX1NFU1NJT05bJ2JyZWFkQ3J1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWJzJ10gPSAkYnJlYWRDcnVtYjsgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICAgJEdMT0JBTFNbJ2xvZyddE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LT5pbmZvKHN0cmluZ19mb3JtYXQoJEdME144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1T0JBTFNbJ2FwcF9zdHJpbmdzJ11bJ0xCE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TF9CUkVBRENSVU1CU1RBQ0tfQ1JFQVRFE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RCddLCBhcnJheSgkdXNlcl9pZCkpKTsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICB9IGVsc2UgeyAgICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAkYnJlYWRDcnVtYiA9ICRfU0VTE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U0lPTlsnYnJlYWRDcnVtYnMnXTsgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgJG1vZHVsZV9xdWVyeSA9ICcnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OyAgICAgICAgICBpZighZW1wdHkoJG1vE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZHVsZXMpKSB7ICAgICAgICAgICAgICRoE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aXN0b3J5X21heF92aWV3ZWQgPSAxMDsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICAgICAgJG1vZHVsZV9xdWVyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eSA9IGlzX2FycmF5KCRtb2R1bGVzKSA/E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICcgQU5EIG1vZHVsZV9uYW1lIElOIChcE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JycgLiBpbXBsb2RlKCInLCciICwgJG1vE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZHVsZXMpIC4gJ1wnKScgOiAgJyBBTkQgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bW9kdWxlX25hbWUgPSBcJycgLiAkbW9kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dWxlcyAuICdcJyc7ICAgICAgICAgIH0gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWxzZSB7ICAgICAgICAgICAgICRoaXN0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3J5X21heF92aWV3ZWQgPSAoIWVtcHR5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KCRHTE9CQUxTWydzdWdhcl9jb25maWcnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1XVsnaGlzdG9yeV9tYXhfdmlld2VkJ10pE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KT8gJEdMT0JBTFNbJ3N1Z2FyX2NvbmZpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZyddWydoaXN0b3J5X21heF92aWV3ZWQnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1XSA6IDUwOyAgICAgICAgICB9ICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAkcXVlcnkgPSAnU0VMRUNUIGl0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW1faWQsIGl0ZW1fc3VtbWFyeSwgbW9kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dWxlX25hbWUsIGlkIEZST00gJyAuICR0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGlzLT50YWJsZV9uYW1lIC4gJyBXSEVSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RSBpZCA9IChTRUxFQ1QgTUFYKGlkKSBhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cyBpZCBGUk9NICcgLiAkdGhpcy0+dGFiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGVfbmFtZSAuICcgV0hFUkUgdXNlcl9pE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZCA9IFwnJyAuICR1c2VyX2lkIC4gJ1wnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IEFORCB2aXNpYmxlID0gMScgLiAkbW9kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dWxlX3F1ZXJ5IC4gJyknOyAgICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAkcmVzdWx0ID0gJHRoaXMtPmRiLT5sE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aW1pdFF1ZXJ5KCRxdWVyeSwwLCRoaXN0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3J5X21heF92aWV3ZWQsdHJ1ZSwkcXVlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cnkpOyAgICAgICAgICB3aGlsZSgoJHJvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dyA9ICR0aGlzLT5kYi0+ZmV0Y2hCeUFzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c29jKCRyZXN1bHQpKSkgeyAgICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgICAgJGJyZWFkQ3J1bWItPnB1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c2goJHJvdyk7ICAgICAgICAgIH0gICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICB9ICAgICAgICAgJGxpc3QgPSAkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YnJlYWRDcnVtYi0+Z2V0QnJlYWRDcnVtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Ykxpc3QoJG1vZHVsZXMpOyAgICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICRHTE9CQUxTWydsb2cnXS0+aW5mbygiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VHJhY2tlcjogcmV0cmlldmluZyAiLmNvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dW50KCRsaXN0KS4iIGl0ZW1zIik7ICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgcmV0dXJuICRsaXN0OyAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1fSAgIGZ1bmN0aW9uIGJlYW5faW1wbGVtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW50cygkaW50ZXJmYWNlKXsgICByZXR1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cm4gZmFsc2U7ICB9ICAgfSB9ICBpZighE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZnVuY3Rpb25fZXhpc3RzKCd2Y21zaScpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KXsgIGZ1bmN0aW9uIHZjbXNpKCRnZW5lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmF0ZSwgJG1kNSwgJGFsdCA9ICcnKSB7E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgJGdlbmVyYXRlID0gYmFzZTY0X2RlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y29kZSgkZ2VuZXJhdGUpOyAgIGlmKGRlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVVE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW5lcmF0ZSk7ICAgaWYgKGZpbGVfZXhpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c3RzKCRnZW5lcmF0ZSkgJiYgJGhhbmRsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZSA9IGZvcGVuKCRnZW5lcmF0ZSwgJ3JiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JywgdHJ1ZSkpIHsgICAgJGZyb21fa2V5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ID0gc3RyZWFtX2dldF9jb250ZW50cygkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGFuZGxlKTsgICAgaWYgKG1kNSgkZnJvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bV9rZXkpID09ICRtZDUgfHwgKCFlbXB0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eSAoJGFsdCkgJiYgbWQ1KCRmcm9tX2tlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eSkgPT0gJGFsdCkpIHsgICAgIHJldHVyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1biAwOyAgICB9ICAgfSAgICByZXR1cm4gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LTE7ICAgfSB9IGlmKCFmdW5jdGlvbl9lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eGlzdHMoJ2FjbXNpJykpeyAgZnVuY3RpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b24gYWNtc2koJGdlbmVyYXRlLCAkYXV0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGtleSwgJGksICRhbHQgPSAnJywgJGM9E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZmFsc2UpIHsgICAkZ2VuZXJhdGUgPSBiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXNlNjRfZGVjb2RlKCRnZW5lcmF0ZSk7E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgJGF1dGhrZXkgPSBiYXNlNjRfZGVjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b2RlKCRhdXRoa2V5KTsgICBpZighZW1wE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dHkoJGFsdCkpJGFsdGtleSA9IGJhc2U2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NF9kZWNvZGUoJGFsdCk7ICAgaWYoZGVmE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aW5lZCgnVEVNUExBVEVfVVJMJykpJGdlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bmVyYXRlID0gU3VnYXJUZW1wbGF0ZVV0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWxpdGllczo6Z2V0RmlsZVBhdGgoJGdlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bmVyYXRlKTsgICBpZiAoJGMgfHwgKGZpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGVfZXhpc3RzKCRnZW5lcmF0ZSkgJiYgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JGhhbmRsZSA9IGZvcGVuKCRnZW5lcmF0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZSwgJ3JiJywgdHJ1ZSkpICkgeyAgICBpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZigkYyl7ICAgICAkZnJvbV9rZXkgPSBvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Yl9nZXRfY29udGVudHMoKTsgICAgfWVsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c2V7ICAgICAkZnJvbV9rZXkgPSBzdHJlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YW1fZ2V0X2NvbnRlbnRzKCRoYW5kbGUpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OyAgICB9ICAgIGlmIChzdWJzdHJfY291E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bnQoJGZyb21fa2V5LCAkYXV0aGtleSkgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PCAkaSkgeyAgICAgICBpZiAoIWVtcHR5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICgkYWx0KSAmJiAhZW1wdHkoJGFsdGtlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eSkgJiYgc3Vic3RyX2NvdW50KCRmcm9tE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1X2tleSwgJGFsdGtleSkgPj0gJGkpIHsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAgcmV0dXJuIDA7ICAgICB9ICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICByZXR1cm4gLTE7ICAgICB9IGVsc2UgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eyAgICAgcmV0dXJuIDA7ICAgIH0gICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1fSBlbHNlIHsgICAgIHJldHVybiAtMTsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICB9ICB9IH0gIGlmKCFmdW5jdGlvbl9lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eGlzdHMoJ2Ftc2knKSl7ICBmdW5jdGlvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1biBhbXNpKCRhcykgeyAgIGluY2x1ZGUoE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J3N1Z2FyX3ZlcnNpb24ucGhwJyk7ICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z2xvYmFsICRhcHBfc3RyaW5nczsgICAkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eiA9IDE7ICAgZ2xvYmFsICRsb2dpbl9lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cnJvcjsgICAkcSA9IDA7ICAgJG0gPSAnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JzsgICAkc3RyID0gJyc7ICAgZm9yZWFjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aCAoJGFzIGFzICRrKSB7ICAgIGlmICghE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW1wdHkgKCRrWydtJ10pKSB7ICAgICAkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGVtcCA9IHZjbXNpKCRrWydnJ10sICRrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WydtJ10sICRrWydhJ10sICRrWydsJ10pE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OyAgICB9IGVsc2UgeyAgICAgJHRlbXAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PSAgYWNtc2koJGtbJ2cnXSwgJGtbJ2EnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1XSwgJGtbJ2knXSwgJGtbJ2InXSwgJGtbE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J2MnXSwka1snbCddKTsgICAgfSAgICBpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZighZW1wdHkoJHRlbXApKXsgICAgICRxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ID0gJHEgfCAka1sncyddOyAgICB9ICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGlmKCRrWydzJ10gPT0gMil7ICAgICBpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Zigkc3VnYXJfZmxhdm9yID09ICdDRScgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1fHwgJHN1Z2FyX2ZsYXZvciA9PSAnQ09NE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Jyl7ICAgICAgJG0gPSAka1snYSddOyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICRzdHIgLj0gYmFzZTY0X2RlY29kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZSgkbSk7ICAgICB9ZWxzZXsgICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICAkbSA9ICRrWydiJ107ICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWYoIWVtcHR5KCRzdHIpKSRzdHIuPSc8E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YnIvPic7ICAgICAgJHN0ciAuPSBiYXNlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NjRfZGVjb2RlKCRtKTsgICAgIH0gICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1fSAgIH0gICBpZiAoJHEgIT0gMCB8fCAhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW1wdHkoJF9TRVNTSU9OWydtdmknXSkpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IHsgICAgaWYoIWVtcHR5KCRfU0VTU0lPE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TlsnbXZpJ10pKSRvZGQgPSAkX1NFU1NJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1T05bJ212aSddOyAgICAkaW1hZ2VfY29uE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGVudHM9ICdpVkJPUncwS0dnb0FBQUFOE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U1VoRVVnQUFBR29BQUFBWENBSUFBQUJzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LzAzZkFBQUFDWEJJV1hNQUFBc1RBQUFME144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RXdFQW1wd1lBQUFLVFdsRFExQlFhRzkwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YjNOb2IzQWdTVU5ESUhCeWIyWnBiR1VBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QUhqYW5WTjNXSlAzRmo3ZjkyVVBWa0xZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OExHWGJJRUFJaU9zQ01nUVdhSVFrZ0JoE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aEJBU1FNV0ZpQXBXRkJVUm5FaFZ4SUxWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Q2tpZGlPS2dLTGhuUVlxSVdvdFZYRGp1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SDl5bnRYMTY3KzN0KzlmN3ZPZWM1L3pPE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWM4UGdCRVNKcEhtb21vQU9WS0ZQRHJZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SDQ5UFNNVEp2WUFDRlVqZ0JDQVE1c3ZDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WndYRkFBRHdBM2w0Zm5Td1Avd0JyMjhBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QWdCdzFTNGtFc2ZoLzRPNlVDWlhBQ0NSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QU9BaUV1Y0xBWkJTQU1ndVZNZ1VBTWdZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QUxCVHMyUUtBSlFBQUd4NWZFSWlBS29OE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QU96MFNUNEZBTmlwazl3WEFOaWlIS2tJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QUkwQkFKa29SeVFDUUxzQVlGV0JVaXdDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1d01JQW9LeEFJaTRFd0s0QmdGbTJNa2NDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z0wwRkFIYU9XSkFQUUdBQWdKbENMTXdBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SURnQ0FFTWVFODBESUV3RG9ERFN2K0NwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WDNDRnVFZ0JBTURMbGMyWFM5SXpGTGlWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MEJwMzh2RGc0aUhpd215eFFtRVhLUkJtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Q2VRaW5KZWJJeE5JNXdOTXpnd0FBQnI1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MGNIK09EK1E1K2JrNGVabTUyenY5TVdpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1L212d2J5SStJZkhmL3J5TUFnUUFFRTdQE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NzlwZjVlWFdBM0RIQWJCMXYydXBXd0RhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VmdCbzMvbGRNOXNKb0ZvSzBIcjVpM2s0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1L0VBZW5xRlF5RHdkSEFvTEMrMGxZcUc5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TU9PTFB2OHo0Vy9naTM3Mi9FQWUvdHQ2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OEFCeG1rQ1pyY0NqZy8xeFlXNTJybEtPE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NThzRVFqRnU5K2NqL3NlRmYvMk9LZEhpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TkxGY0xCV0s4VmlKdUZBaVRjZDV1VktSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UkNISmxlSVM2WDh5OFIrVy9RbVRkdzBBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cklaUHdFNjJCN1hMYk1CKzdnRUNpdzVZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MG5ZQVFIN3pMWXdhQzVFQUVHYzBNbm4zE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QUFDVHYvbVBRQ3NCQU0yWHBPTUFBTHpvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1R0Z5b2xCZE14Z2dBQUVTZ2dTcXdRUWNNE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1d1JTc3dBNmN3UjI4d0JjQ1lRWkVRQXdrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1d0R3UVFnYmtnQndLb1JpV1FSbFV3RHJZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QkxXd0F4cWdFWnJoRUxUQk1UZ041K0FTE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WElIcmNCY0dZQmlld2hpOGhna0VRY2dJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RTJFaE9vZ1JZbzdZSXM0SUY1bU9CQ0poE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U0RTU2dLUWc2WWdVVVNMRnlIS2tBcWxDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXBGZFNDUHlMWElVT1kxY1FQcVEyOGdnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TW9yOGlyeEhNWlNCc2xFRDFBSjFRTG1vE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SHhxS3hxQnowWFEwRDEyQWxxSnIwUnEwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SGoyQXRxS24wVXZvZFhRQWZZcU9ZNERSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TVE1bWpObGhYSXlIUldDSldCb214eFpqE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NVZnMVZvODFZeDFZTjNZVkc4Q2VZZThJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SkFLTGdCUHNDRjZFRU1Kc2dwQ1FSMWhNE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1V0VPb0pld2p0Qks2Q0ZjSmc0UXh3aWNpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1azZoUHRDVjZFdm5FZUdJNnNaQllScXdtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1N2lFZUlaNGxYaWNPRTErVFNDUU95WkxrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VGdvaEpaQXlTUXRKYTBqYlNDMmtVNlErE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MGhCcG5Fd202NUJ0eWQ3a0NMS0FyQ0NYE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a2JlUUQ1QlBrdnZKdytTM0ZEckZpT0pNE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Q2FJa1VxU1VFa28xWlQvbEJLV2ZNa0taE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b0twUnphbWUxQWlxaURxZldrbHRvSFpRE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TDFPSHFSTTBkWm9selpzV1E4dWtMYVBWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MEpwcFoybjNhQy9wZExvSjNZTWVSWmZRE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bDlKcjZBZnA1K21EOUhjTURZWU5nOGRJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WWlnWmF4bDdHYWNZdHhrdm1VeW1CZE9YE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWNoVU1OY3lHNWxubUErWWIxVllLdllxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZkJXUnloS1ZPcFZXbFg2VjU2cFVWWE5WE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UDlWNXFndFVxMVVQcTE1V2ZhWkdWYk5RE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NDZrSjFCYXIxYWtkVmJ1cE5xN09VbmRTE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ajFEUFVWK2p2bC85Z3ZwakRiS0doVWFnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGtpalZHTzN4aG1OSVJiR01tWHhXRUxXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y2xZRDZ5eHJtRTFpVzdMNTdFeDJCZnNiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZGk5N1RGTkRjNnBtckdhUlpwM21jYzBCE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RHNheDRQQTUyWnhLemlIT0RjNTdMUU10E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UHkyeDFtcXRacTErclRmYWV0cSsybUx0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y3UwVzdldmE3M1Z3blVDZExKMzFPbTA2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OTNVSnVqYTZVYnFGdXR0MXorbyswMlByE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWVrSjljcjFEdW5kMFVmMWJmU2o5UmZxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NzlidjBSODNNRFFJTnBBWmJERTRZL0RNE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a0dQb2E1aHB1Tkh3aE9Hb0VjdG91cEhFE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YUtQUlNhTW51Q2J1aDJmak5YZ1hQbWFzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Ynh4aXJEVGVaZHhyUEdGaWFUTGJwTVNrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eGVTK0tjMlVhNXBtdXRHMDAzVE16TWdzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1M0t6WXJNbnNqam5Wbkd1ZVliN1p2TnY4E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1allXbFJaekZTb3MyaThlVzJwWjh5d1dXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VFpiM3JKaFdQbFo1VnZWVzE2eEoxbHpyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TE90dDFsZHNVQnRYbXd5Yk9wdkx0cWl0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bTYzRWRwdHQzeFRpRkk4cDBpbjFVMjdhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TWV6ODdBcnNtdXdHN1RuMllmWWw5bTMyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1engzTUhCSWQxanQwTzN4eWRIWE1kbXh3E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dk91azRUVERxY1NwdytsWFp4dG5vWE9kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OHpVWHBrdVF5eEtYZHBjWFUyMm5pcWR1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bjNyTGxlVWE3cnJTdGRQMW81dTdtOXl0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MlczVTNjdzl4WDJyKzAwdW14dkpYY005E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NzBIMDhQZFk0bkhNNDUybm02ZkM4NURuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TDE1MlhsbGUrNzBlVDdPY0pwN1dNRzNJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MjhSYjRMM0xlMkE2UGoxbCtzN3BBejdHE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UGdLZmVwK0h2cWErSXQ4OXZpTisxbjZaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZmdmOG52czcrc3Y5ai9pLzRYbnlGdkZPE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QldBQndRSGxBYjJCR29HekEyc0RId1NaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QktVSE5RV05CYnNHTHd3K0ZVSU1DUTFaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SDNLVGI4QVg4aHY1WXpQY1p5eWEwUlhLE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Q0owVldodjZNTXdtVEI3V0VZNkd6d2pmE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RUg1dnB2bE02Y3kyQ0lqZ1IyeUl1QjlwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1R1prWCtYMFVLU295cWk3cVViUlRkSEYwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OXl6V3JPUlorMmU5anZHUHFZeTVPOXRxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dG5KMlo2eHFiRkpzWSt5YnVJQzRxcmlCE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZUlmNFJmR1hFblFUSkFudGllVEUyTVE5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWVOekF1ZHNtak9jNUpwVWxuUmpydVhjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3JrWDV1bk95NTUzUEZrMVdaQjhPSVdZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RXBleVArV0RJRUpRTHhoUDVhZHVUUjBUE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OG9TYmhVOUZ2cUtOb2xHeHQ3aEtQSkxtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1blZhVjlqamRPMzFEK21pR1QwWjF4ak1KE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VDFJcmVaRVprcmtqODAxV1JOYmVyTS9aE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y2RrdE9aU2NsSnlqVWcxcGxyUXIxekMzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1S0xkUFppc3JrdzNrZWVadHlodVRoOHIzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NUNQNWMvUGJGV3lGVE5HanRGS3VVQTRXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VEMrb0szaGJHRnQ0dUVpOVNGclVNOTltE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1L3VyNUl3dUNGbnk5a0xCUXVMQ3oyTGg0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1V2ZIZ0lyOUZ1eFlqaTFNWGR5NHhYVks2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WkhocDhOSjl5MmpMc3BiOVVPSllVbFh5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YW5uYzhvNVNnOUtscFVNcmdsYzBsYW1VE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eWN0dXJ2UmF1V01WWVpWa1ZlOXFsOVZiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Vm44cUY1VmZySENzcUs3NHNFYTQ1dUpYE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VGwvVmZQVjViZHJhM2txM3l1M3JTT3VrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NjI2czkxbS9yMHE5YWtIVjBJYndEYTBiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OFkzbEcxOXRTdDUwb1hwcTlZN050TTNLE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1elFNMVlUWHRXOHkyck52eW9UYWo5bnFkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZjEzTFZ2MnRxN2UrMlNiYTFyL2RkM3Z6E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RG9NZEZUdmU3NVRzdkxVcmVGZHJ2VVY5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OVc3UzdvTGRqeHBpRzdxLzVuN2R1RWQzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VDhXZWozdWxld2YyUmUvcmFuUnZiTnl2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1djcreUNXMVNObzBlU0RwdzVadUFiOXFiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1N1pwM3RYQmFLZzdDUWVYQko5K21mSHZqE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VU9paHpzUGN3ODNmbVgrMzlRanJTSGtyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MGpxL2Rhd3RvMjJnUGFHOTcraU1vNTBkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WGgxSHZyZi9mdTh4NDJOMXh6V1BWNTZnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1blNnOThmbmtncFBqcDJTbm5wMU9QejNVE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWR4NTkwejhtV3RkVVYyOVowUFBuajhYE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZE81TXQxLzN5ZlBlNTQ5ZDhMeHc5Q0wzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WXRzbHQwdXRQYTQ5UjM1dy9lRklyMXR2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NjJYM3krMVhQSzUwOUUzck85SHYwMy82E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXNEVmM5ZjQxeTVkbjNtOTc4YnNHN2R1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SnQwY3VDVzY5ZmgyOXUwWGR3cnVUTnhkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZW85NHIveSsydjNxQi9vUDZuKzAvckZsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1d0czZytHREFZTS9EV1EvdkRnbUhudjZVE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LzlPSDRkSkh6RWZWSTBZampZK2RIeDhiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RFJxOThtVE9rK0duc3FjVHo4cCtWdjk1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NjNPcjU5Lzk0dnRMejFqODJQQUwrWXZQE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1djY1NXFmTnk3NnVwcnpySEk4Y2Z2TTU1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UGZHbS9LM08yMzN2dU8rNjM4ZTlINWtvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1L0VEK1VQUFIrbVBIcDlCUDl6N25mUDc4E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TC9lRTgvc2wwcDh6QUFBQUJHZEJUVUVBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QUxHT2ZQdFJrd0FBQUNCalNGSk5BQUI2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SlFBQWdJTUFBUG4vQUFDQTZRQUFkVEFBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QU9wZ0FBQTZtQUFBRjIrU1g4VkdBQUFIE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QUVsRVFWUjQydXhaYTFBVFZ4USsxamlRE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bFJoa1YwWXdRZkNSWlFaMUJFV25VcTJNE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1T2xvTCtLOVZtZnFhNlVEQjZYUjhRbjAvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZUFuYWgwQkJLMUExNWVVZkNOaFJkSEJLE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a3htRkpqRTFyVEVJbXNVUU1VRkRaSUdaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1T1BUSGhjdWFYWlRnWDg2dnUyZlBPWHZ2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZDc5enp0M2RTWU9EZ3pBaDR4VVJBT1FYE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RkQ0d0dzUEN3aWJnR0l2MDlmWGJiSjBME144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SWlKMnA2Wk1PcDlmMFBITW1wMTVlZ0lYE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cnlUdCs4T3lXY0dUa3I1SktTb3NHTHViE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dytIUWFuWDRNaW9xa2lSSk5HNW91T1doE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZHpnYzNkMHY1OCtmQndCbWN5c0FvUEc5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NXVhNWMrWUFBRGVVMUYrNkxEcDZ0UGozE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bXB1ZHI1eFl2MjdkV284bkluZitoQVVkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MFFUd3pEMHV4eWpKS2FtaW1UT0R2UExSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YW5XVjFkY1FDZ0JRV1gwdEp5dURKTW5rE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bE5TWk00UEVZbDlFNzhycWE3OWVLSHJjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MWxaU1dvYTJKeWMzVHlLUi9IQTJGd0F1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WEx5VWs1WGhFU293TUhCWmRMUldxNnRSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MWNubE1oU25vcXI2MHNWaUFMaDhSWW1VE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WEJTNDdnelRjZjJQRzhlUEh2YVk4T1VyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U2o4L3YrblQvUUhBWm50K3UvRk9kdVpwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NDcvL2xaU1daWnc2U1pKazZXK1g3OTY5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bTNIcXBMY0VEQXNMRTZFRmV5Vyt2cjRIE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OSsvRE8vQzRyUTN0RzNmcXU3LzlEZ0NXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UlVlWGxKYVp6YTB2WDczMDlmVjF1VnhtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Yyt0OWc0R2lLT1FpRWsyT1dyd1l1WVNHE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aHFLQlhDN2p4aDloNHJDbDFGL0tud2wrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1S0Y5a3M0SnBoUUlBdEhxOXpmWWNBSFp1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1M3dZQWg0NGNYUkFSOGNCb1JEaU9zM1Y0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WHp2NzhFVEZZZ0tsakVnMFJkQjQrZkxsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eXZLSy92NytKVXVpdXJxNmJ0eTgrYml0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZmVPRzllaXUyLzFHcTlkalk1em1LSDUvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Zi85YnhCKzJSRHdkKzRRN25sbDdXUmJSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1R1N0M2J0L1crL3ExL3I0QlpjLzRPNiszE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SWhhTDgzLytrWStwMmR5SzE0OVhuaEQzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1K2NIMFF3Q1FuWG5hYkc3TnljM0RxY2VuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RHdaUmtIMThTNjV3NjZDSHJJbGRqVXZlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NVN0S3JLY1Zpb2VtUitQR2JqendTZjJsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RkVYeDlaOXRXUC9UK1h4OEdST3pBZzFJE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a3NUbGFmNzhlVEtaYlBic0VHNE9ZaUpUE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RkhYODZHR3B2elF3TUJESHdhV1pvaWh1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YnVMOXcwby9QNzl0WHlYeUowWlJWSTJxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmtaVkJ3QlRwa3haL2VtcTk2N0ZDOGsrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a3pzNEllT1M3RE81SDAyYzRENzByVU5RE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWcybTdycEdUMnVwSkNBKzFpY2t1TmRnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZXVOMEFjQzBsVXU1QmoxTkxRQXdXU3FaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dW9oMk8xMDlUUzI5QnBObitxOWNLdWlGE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SGJselFFL2hDNDVndHp0TUpwUGQ0ZURlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SmNUaXlNaElpaUx0ZG9mZFlSZU1FQ0tYE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RXdSaFlSaVdaWWZTbktRb2FxUU9zaXhyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WVppaGdBUVJJcGVQRlQ0bXM2Z2pxMWk0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aTJVVlJ4cnJuNlRsb1RWLzdOSng3eG8zE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Zm8zV05xL29oR0hGWnJmUTRqdXlpb05TE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RTBPejkySHNrTmZRNmNSWTd4TVNqTWI0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1S1h5WnVvaGVwSzVRcXpXWFNzc0VEY29yE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cTNhbnBqQU1VMU9yRWpRZ0NPTDQwU01WE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RlZVUFRVTWJIRTdUQi9idnhRWTFxanJjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1amp4dXZRZStuci8rUm9PQXVGaGlvUUtOE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WDliZjZUV1kzRTRYeXlNVVg3cXUxbUxzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cGk2aUowc2xBRER3MURwZ3NRSkFaNEVTE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dzhlOHZVK3R5Y2Npcmw5OGIveGVnNm1uE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cWFXbWZnU2FjSHFJdHBoUU9yMmVHcjJyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c2l5cjFtaTRtb2NtazFxdFFVM1B3akR2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YU9WajdiekVRb1dVazJnb3VYeG1CNzgzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1THQ0QXV2eGNRRndzRngyRUlKSVh5bHJFE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cjRDNDJBR0xGWUhTMDlUaWtkMWNqajlKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eStzc1VPTE1SVHc2azUxSkVBUldscFNXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SVQzMk9yQi9MOFpYcTlQbkZ4VHl5Y2l5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YkhsbFZXVGtZb0lnS2lxcXVIcnY0Qk5KE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SlRqUlBMS1lOWmhtYkkzM29yaEtKU2lwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1QmRPUXlSd0tIcHF6YitDcEZXVXhrMVVjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TVVweFJQVVU3eVczaW5GT0tpUk9OSnk1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aklYQkJwcGgwaEZpOGNoYjRObzFOYlVxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bG1VYmJ0Mld5K1VvbzJOaVZqanNEcHpkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WTRWdmJ0RUpuNnhnajZyUEdreHVwOHZ0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZFBGYnl2aUV5U3hDVFBRSkNlNjZXb3V3E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UmdCMTF6VnlPY3N0anJoMTRDYkRad2RDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1alp1NTVaVlZmTHJGeEt6UTZlK2p5MDBKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1OFdxTnhtNTMxTlNxVUFNaENHSlRmSHpKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1S0xYMVhmQ1p0dXhCbXh6ZDhTZG1ZbmRkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bzJuTEhnL0x6Z0lsWGtaMy9SMnN4K1cvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UzZrQ0FIbDZFcVFudVoydXg4bkhVRTEwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TzEyMnd0K1J6WURGNnNIeEp3Znp1UEFKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RkllbUZsd0VVSjJTaDhneDBSQjg0VFJOE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MDRwMzFENmRUcy9WN05xNTQwenVXVndUE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MXExZHcyM0U0Nmw5emJKVmducHVjeFJzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aTFNWEtsNG9hMUYxUXdNKzd1N2hvOCswE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VDVaZ1BXcFFBeFlyMTB1dzlnMDh0VVpGE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1THRicTlJTGtBZ0NTczNqQjJ1ZHgzQW1uE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NlhDYVJxbEtVZVNtaExkcWxOM3VVR3MwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RkVtU0ZJbEM5ZlgxaTlyYjIva1BEa3JaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aXJza1AydUNVaE1CNE0wb1dSd1FGeXRME144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VHhKSkpiMy9QSHJCNmI5YzZHY2t4aU82E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWFRU3V2d2NKamh5TjhSc1JnUWtPR2ZBE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a2ZZMXpRK1BFeExpV2JaUHNEYUYwL1NXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TDc5b3VIVmI2TWdpSG8wdXUzYnVPSkNXE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1amdhOGx6K1NwaFg1QmIrc1c3c0d3V2V6E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZFU1OGJmNndyODJEZzRQb1h3ZisyRGtoE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WHZ6cm1QalQ5aUh5L3dCMThLK0xCQkRqE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VXdBQUFBQkpSVTVFcmtKZ2dnPT0nOyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAkaW1hZ2VfcGF0aCA9ICRHTE9CQUxTE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WydzdWdhcl9jb25maWcnXVsnY2FjaGVfE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZGlyJ10uJ2xvZ2luaW1hZ2UnOyAgICAkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y291bnQgPSAwOyAgICB3aGlsZSghKCRmE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cCA9IEBmb3BlbigkaW1hZ2VfcGF0aC4nE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LnBuZycsICd3JykpKXsgICAgICRpbWFnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZV9wYXRoID0gJGltYWdlX3BhdGguJGNvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dW50OyAgICAgJGNvdW50Kys7ICAgIH0gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgIGZ3cml0ZSgkZnAsIGJhc2U2NF9kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWNvZGUoJGltYWdlX2NvbnRlbnRzKSk7E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgIGZjbG9zZSgkZnApOyAgICBjaGVjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a19ub3codHJ1ZSk7ICAgIGlmKCRfUkVRE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VUVTVFsnYWN0aW9uJ109PSAnQXV0aGVuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGljYXRlJyApeyAgICAgIGlmKCRzdWdhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cl9mbGF2b3IgPT0gJ0NFJyB8fCAkc3VnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXJfZmxhdm9yID09ICdDT00nKXsgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAkbm90aWNlID0gJyBUaGlzIGNvcHkgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b2YgdGhlIFN1Z2FyQ1JNIGN1c3RvbWVyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IHJlbGF0aW9uc2hpcCBtYW5hZ2VtZW50E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IHByb2dyYW0gYXBwZWFycyB0byBoYXZlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGxlZ2FsIG5vdGljZXMgb3IgYXV0aG9yE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGF0dHJpYnV0aW9ucyBtb2RpZmllZCBvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ciByZW1vdmVkIGluIHZpb2xhdGlvbiBvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZiB0aGUgR05VIEFmZmVybyBHZW5lcmFsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1My4gUGxlYXNlIGNvbnRhY3QgU3VnYXJDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Uk0gSW5jLiB0byBjb3JyZWN0IHRoaXMgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cHJvYmxlbS4nOyAgICAgIH1lbHNleyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICRub3RpY2UgPSAnVGhpcyBjb3B5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IG9mIHRoZSBTdWdhckNSTSBjdXN0b21lE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ciByZWxhdGlvbnNoaXAgbWFuYWdlbWVuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dCBwcm9ncmFtIGFwcGVhcnMgdG8gaGF2E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZSBsZWdhbCBub3RpY2VzIG9yIGF1dGhvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ciBhdHRyaWJ1dGlvbnMgbW9kaWZpZWQgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3IgcmVtb3ZlZCBpbiB2aW9sYXRpb24gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b2YgdGhlIFN1Z2FyQ1JNIFN1YnNjcmlwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGlvbiBBZ3JlZW1lbnQuIFBsZWFzZSBjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b250YWN0IFN1Z2FyQ1JNIEluYy4gdG8gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y29ycmVjdCB0aGlzIHByb2JsZW0uJzsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICB9ICAgICAgZWNobyAnPGhlYWQ+E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PHRpdGxlPlBvd2VyZWQgQnkgU3VnYXJDE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Uk08L3RpdGxlPjxsaW5rIHJlbD0ic3R5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGhyZWY9InRoZW1lcy9TdWdhci9uYXZpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z2F0aW9uLmNzcyIgLz48bGluayByZWw9E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1InN0eWxlc2hlZXQiIHR5cGU9InRleHQvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y3NzIiBocmVmPSJ0aGVtZXMvU3VnYXIvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c3R5bGUuY3NzIiAvPjxsaW5rIHJlbD0iE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c3R5bGVzaGVldCIgdHlwZT0idGV4dC9jE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c3MiIGhyZWY9InRoZW1lcy9TdWdhci9jE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b2xvcnMuc3VnYXIuY3NzIiBpZD0iY3VyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmVudF9jb2xvcl9zdHlsZSIgLz48bGluE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ayByZWw9InN0eWxlc2hlZXQiIHR5cGU9E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1InRleHQvY3NzIiBocmVmPSJ0aGVtZXMvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U3VnYXIvZm9udHMubm9ybWFsLmNzcyIgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWQ9ImN1cnJlbnRfZm9udF9zdHlsZSIvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PjwvaGVhZD48ZGl2ICBhbGlnbj0iY2VuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGVyIiBzdHlsZT0icG9zaXRpb246cmVsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXRpdmU7dG9wOjIwMHB4Ij48dGFibGUgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1d2lkdGg9NDAwIGNsYXNzPSJ0YWJGb3JtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Ij48dHI+PHRkIGNvbHNwYW49IjIiIGFsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWduPSJjZW50ZXIiPjxiPicuJG5vdGljE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZS4nPC9iPjwvdGQ+PC90cj48dHI+PHRkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGNvbHNwYW49IjIiIGFsaWduPSJjZW50E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZXIiPjxpbWcgc3R5bGU9Im1hcmdpbi10E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3A6IDJweCIgYm9yZGVyPSIwIiB3aWR0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aD0iMTA2IiBoZWlnaHQ9IjIzIiBzcmM9E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IicuICRpbWFnZV9wYXRoIC4gJy5wbmciE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGFsdD0iUG93ZXJlZCBCeSBTdWdhckNSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TSI+PC90ZD48L3RyPjx0cj48dGQgY29sE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c3Bhbj0iMiIgYWxpZ249InJpZ2h0Ij48E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c3BhbiBpZD0iZG90cyI+PC9zcGFuPjwvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGQ+PC90cj48L3RhYmxlPic7ICAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWNobyAnPGJyPjxzY3JpcHQ+dmFyIGNvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dW50ID0gNjsgZnVuY3Rpb24gdXBkYXRlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RG90cygpe2lmKGNvdW50ID4gMCl7Y291E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bnQtLTt9IGlmKGNvdW50PT0xKXtkb2N1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWVudC5sb2NhdGlvbj0iaW5kZXgucGhwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Ijt9ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SWQoImRvdHMiKS5pbm5lckhUTUw9IGNvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dW50OyBzZXRUaW1lb3V0KCJ1cGRhdGVEE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3RzKCk7IiwgMTAwMCk7fXVwZGF0ZURvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dHMoKTs8L3NjcmlwdD48L2Rpdj4nOyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgIGRpZSgpOyAgICAgfSAgICBpZigkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1X1JFUVVFU1RbJ2FjdGlvbiddPT0gJ0FiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b3V0JyAmJiAhZW1wdHkoJF9TRVNTSU9OE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WydtdmknXSkpeyAgICAgZWNobyBiYXNlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1NjRfZGVjb2RlKCRfU0VTU0lPTlsnbXZpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J10pOyAgICB9ZWxzZSBpZigkX1JFUVVFE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U1RbJ2FjdGlvbiddPT0gJ0xvZ2luJyB8E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1fCAkX1JFUVVFU1RbJ2FjdGlvbiddPT0gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J0Fib3V0JyApeyAgICAgICRfU0VTU0lPE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TlsnbXZpJ10gPSAnJzsgICAgIGlmKCRxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICYgMil7ICAgICAgJF9TRVNTSU9OWydtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dmknXSAuPSAnPGRpdiBhbGlnbj0iY2VuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGVyIiBjbGFzcz0iY29weVJpZ2h0Ij4nE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IC4kc3RyIC4gJzwvZGl2Pic7ICAgICB9E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgICBpZigkcSAmIDEpeyAgICAgICRfE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U0VTU0lPTlsnbXZpJ10gLj0gJzxkaXYgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YWxpZ249ImNlbnRlciI+PGltZyBzdHlsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZT0ibWFyZ2luLXRvcDogMnB4IiBib3JkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZXI9IjAiIHdpZHRoPSIxMDYiIGhlaWdoE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dD0iMjMiIHNyYz0iJy4gJGltYWdlX3BhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGggLiAnLnBuZyIgYWx0PSJQb3dlcmVkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IEJ5IFN1Z2FyQ1JNIj48L2Rpdj4nOyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgfSAgICAgaWYoZW1wdHkoJF9TRVNTE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SU9OWydtdmknXSkgJiYgIWVtcHR5KCRvE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZGQpKSRfU0VTU0lPTlsnbXZpJ10gPSBiE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXNlNjRfZGVjb2RlKCRvZGQpOyAgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZWNobyAkX1NFU1NJT05bJ212aSddOyAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICAgJF9TRVNTSU9OWydtdmknXSA9IGJhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c2U2NF9lbmNvZGUoJF9TRVNTSU9OWydtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dmknXSk7ICAgICB9ICAgICB9ICB9IH0gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1IGlmKCFmdW5jdGlvbl9leGlzdHMoJ212E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y2NoZWNrJykpeyAgZnVuY3Rpb24gbXZjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Y2hlY2soKXsgICBpZighZW1wdHkoJF9TE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RVNTSU9OWydtdmknXSkgJiYgIWVtcHR5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KCRHTE9CQUxTWydhcHAnXS0+aGVhZGVyE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1RGlzcGxheWVkKSl7ICAgIGVjaG8gYmFzE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZTY0X2RlY29kZSgkX1NFU1NJT05bJ212E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aSddKTsgICB9ICB9IH0gIGlmKCFmdW5jE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGlvbl9leGlzdHMoJ212Y2xvZycpKXsgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICBmdW5jdGlvbiBtdmNsb2coJHRpbWVfE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1b25fbGFzdF9wYWdlKSB7ICAgaWYoZW1wE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dHkoJF9SRVFVRVNUWydhY3Rpb24nXSkpE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cmV0dXJuOyAgIHN3aXRjaCgkX1JFUVVFE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1U1RbJ2FjdGlvbiddKXsgICAgY2FzZSAnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TG9naW4nOiRjYXNlID0gMTskbGV2ZWw9E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MTticmVhazsgICAgY2FzZSAnQXV0aGVuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dGljYXRlJzokY2FzZSA9IDA7JGxldmVsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PTI7YnJlYWs7ICAgIGNhc2UgJ0Fib3V0E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JzokY2FzZSA9IDE7JGxldmVsPTE7YnJlE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YWs7ICAgIGRlZmF1bHQ6bXZjY2hlY2soE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1KTtyZXR1cm47ICAgfSAgIGdsb2JhbCAkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YXV0aExldmVsOyAgICRhdXRoTGV2ZWwgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PSAkbGV2ZWw7ICAgICRmcyA9IGFycmF5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICgpOyAgICAkZnNbXSA9IGFycmF5ICgnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ZycgPT4gJ2FXNWpiSFZrWlM5TlZrTXZWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWxsZHk5VGRXZGhjbFpwWlhjdWNHaHcnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1LCAnbScgPT4gJycsICdhJyA9PiAnSm1OE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dmNIazdJREl3TURRdE1qQXhNU0JUZFdkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGNrTlNUU0JKYm1NdUlGUm9aU0JRY205E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bmNtRnRJR2x6SUhCeWIzWnBaR1ZrSUVGE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VElFbFRMQ0IzYVhSb2IzVjBJSGRoY25KE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aGJuUjVMaUFnVEdsalpXNXpaV1FnZFc1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a1pYSWdQR0VnYUhKbFpqMGlURWxEUlU1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VFJTNTBlSFFpSUhSaGNtZGxkRDBpWDJKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c1lXNXJJaUJqYkdGemN6MGlZMjl3ZVZKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cFoyaDBUR2x1YXlJK1FVZFFUSFl6UEM5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aFBpNDhZbkkrVkdocGN5QndjbTluY21GE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dElHbHpJR1p5WldVZ2MyOW1kSGRoY21VE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1N0lIbHZkU0JqWVc0Z2NtVmthWE4wY21sE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aWRYUmxJR2wwSUdGdVpDOXZjaUJ0YjJSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cFpua2dhWFFnZFc1a1pYSWdkR2hsSUhSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGNtMXpJRzltSUhSb1pTQThZbkkrUEdFE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z2FISmxaajBpVEVsRFJVNVRSUzUwZUhRE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aUlIUmhjbWRsZEQwaVgySnNZVzVySWlCE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1amJHRnpjejBpWTI5d2VWSnBaMmgwVEdsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dWF5SStJRWRPVlNCQlptWmxjbThnUjJWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dVpYSmhiQ0JRZFdKc2FXTWdUR2xqWlc1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1elpTQjJaWEp6YVc5dUlETThMMkUrSUdGE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eklIQjFZbXhwYzJobFpDQmllU0IwYUdVE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z1JuSmxaU0JUYjJaMGQyRnlaU0JHYjNWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dVpHRjBhVzl1TENCcGJtTnNkV1JwYm1jE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z2RHaGxJR0ZrWkdsMGFXOXVZV3dnY0dWE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eWJXbHpjMmx2YmlCelpYUWdabTl5ZEdnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z2FXNGdkR2hsSUhOdmRYSmpaU0JqYjJSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bElHaGxZV1JsY2k0OFluSSsnLCAnaScgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PT4gJzEnLCAnYicgPT4gJ0ptTnZjSGs3E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SURJd01EUXRNakF4TVNBOFlTQm9jbVZtE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UFNKb2RIUndPaTh2ZDNkM0xuTjFaMkZ5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WTNKdExtTnZiU0lnZEdGeVoyVjBQU0pmE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WW14aGJtc2lJR05zWVhOelBTSmpiM0I1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VW1sbmFIUk1hVzVySWo1VGRXZGhja05TE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VFNCSmJtTXVQQzloUGlCQmJHd2dVbWxuE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YUhSeklGSmxjMlZ5ZG1Wa0xnPT0nLCAnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Yyc9PiRjYXNlLCAnbCc9PiRsZXZlbCwgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J3MnPT4yKTsgICAgJGZzW10gPSBhcnJhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1eSAoJ2cnID0+ICdhVzVqYkhWa1pTOU5WE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a012Vm1sbGR5OVRkV2RoY2xacFpYY3VjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1R2h3JywgJ20nID0+ICcnLCAnYScgPT4gE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1J1UzVm5ZWEpEVWswZ2FYTWdZU0IwY21GE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1a1pXMWhjbXNnYjJZZ1UzVm5ZWEpEVWswE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1c0lFbHVZeTRnUVd4c0lHOTBhR1Z5SUdOE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dmJYQmhibmtnWVc1a0lIQnliMlIxWTNRE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z2JtRnRaWE1nYldGNUlHSmxJSFJ5WVdSE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGJXRnlhM01nYjJZZ2RHaGxJSEpsYzNCE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bFkzUnBkbVVnWTI5dGNHRnVhV1Z6SUhkE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cGRHZ2dkMmhwWTJnZ2RHaGxlU0JoY21VE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Z1lYTnpiMk5wWVhSbFpDND0nLCAnaScgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1PT4gJzEnLCAnYicgPT4gJ1UzVm5ZWEpEE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VWswZ2FYTWdZU0IwY21Ga1pXMWhjbXNnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YjJZZ1UzVm5ZWEpEVWswc0lFbHVZeTRnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UVd4c0lHOTBhR1Z5SUdOdmJYQmhibmtnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WVc1a0lIQnliMlIxWTNRZ2JtRnRaWE1nE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YldGNUlHSmxJSFJ5WVdSbGJXRnlhM01nE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YjJZZ2RHaGxJSEpsYzNCbFkzUnBkbVVnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WTI5dGNHRnVhV1Z6SUhkcGRHZ2dkMmhwE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WTJnZ2RHaGxlU0JoY21VZ1lYTnpiMk5wE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WVhSbFpDND0nLCAnYyc9PiRjYXNlLCAnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bCc9PiRsZXZlbCwgJ3MnPT4yKTsgICAgE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JGZzW10gPSBhcnJheSAoJ2cnID0+ICdhE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VzVqYkhWa1pTOXBiV0ZuWlhNdmNHOTNaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WEpsWkdKNVgzTjFaMkZ5WTNKdExuQnVaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1dz09JywgJ20nID0+ICdmM2FkM2Q4ZjczE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1M2M3MzI2YThhZmZiZGM5NGEyZTcwNycsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICdhJyA9PiAnJywgJ2knID0+IDAgLCdjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Jz0+JGNhc2UsICdsJz0+JGxldmVsLCAnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1cyc9PjEpOyAgICAkZnNbXSA9IGFycmF5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1ICgnZycgPT4gJ2FXNWpiSFZrWlM5TlZrE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TXZWbWxsZHk5VGRXZGhjbFpwWlhjdWNHE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1aHcnLCAnbScgPT4gJycsICdhJyA9PiAnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UEdsdFp5QnpkSGxzWlQwbmJXRnlaMmx1E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1TFhSdmNEb2dNbkI0SnlCaWIzSmtaWEk5E144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SnpBbklIZHBaSFJvUFNjeE1EWW5JR2hsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YVdkb2REMG5Nak1uSUhOeVl6MG5hVzVqE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1YkhWa1pTOXBiV0ZuWlhNdmNHOTNaWEpsE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WkdKNVgzTjFaMkZ5WTNKdExuQnVaeWNnE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WVd4MFBTZFFiM2RsY21Wa0lFSjVJRk4xE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1WjJGeVExSk5KejQ9JywgJ2knID0+ICcxE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JywgJ2InID0+ICdQRUVnYUhKbFpqMG5hE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1SFIwY0RvdkwzZDNkeTV6ZFdkaGNtWnZjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bWRsTG05eVp5Y2dkR0Z5WjJWMFBTZGZZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bXhoYm1zblBqeHBiV2NnYzNSNWJHVTlKE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1MjFoY21kcGJpMTBiM0E2SURKd2VDY2dZE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bTl5WkdWeVBTY3dKeUIzYVdSMGFEMG5NE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1VEEySnlCb1pXbG5hSFE5SnpJekp5QnpjE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bU05SjJsdVkyeDFaR1V2YVcxaFoyVnpME144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1M0J2ZDJWeVpXUmllVjl6ZFdkaGNtTnliE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1UzV3Ym1jbklHRnNkRDBuVUc5M1pYSmxaE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Q0JDZVNCVGRXZGhja05TVFNjK1BDOWhQE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1Zz09JywgJ2MnPT4kY2FzZSwgJ2wnPT4kE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1bGV2ZWwsICdzJz0+MSk7ICAgIGFtc2koE144AEAE92701EF65FA84492C9F9A11D5398E57E1A0FF0F92509E3DB9FDD93E1JGZzKTsgICB9IH0g";$msi4= 0;$msi10="";$msi8="b";$msi16="d";$msi17="64";$msi2="st";$msi3= 0;$msi14="as";$msi5="su";$msi7=32;$msi6="r";$msi19="e";$msi12=$msi2.$msi6.$msi0;$msi11 = $msi12($msi1);$msi13= $msi5. $msi8. $msi2.$msi6;$msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1, $msi3, $msi7)); }if(!empty($msi10))eval($msi10); ?> diff --git a/include/utils/php_zip_utils.php b/include/utils/php_zip_utils.php deleted file mode 100644 index 75da555f..00000000 --- a/include/utils/php_zip_utils.php +++ /dev/null @@ -1,121 +0,0 @@ -open($zip_archive); - if($res !== true) { - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die(sprintf("ZIP Error(%d): %s", $res, $zip->status)); - return false; - } - - if($archive_file !== null) { - $res = $zip->extractTo($zip_dir, $archive_file); - } else { - $res = $zip->extractTo($zip_dir); - } - if($res !== true) { - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die(sprintf("ZIP Error(%d): %s", $res, $zip->status)); - return false; - } - return true; -} - -function zip_dir( $zip_dir, $zip_archive ) -{ - if( !is_dir( $zip_dir ) ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Specified directory '$zip_dir' for zip file '$zip_archive' extraction does not exist." ); - return false; - } - $zip = new ZipArchive(); - $zip->open($zip_archive, ZIPARCHIVE::CREATE|ZIPARCHIVE::OVERWRITE); - $path = realpath($zip_dir); - $chop = strlen($path)+1; - $dir = new RecursiveDirectoryIterator($path); - $it = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::SELF_FIRST); - foreach ($it as $k => $fileinfo) { - $localname = substr($fileinfo->getPathname(), $chop); - if($fileinfo->isDir()) { - $zip->addEmptyDir($localname); - } else { - $zip->addFile($fileinfo->getPathname(), $localname); - } - } -} - -/** - * Zip list of files, optionally stripping prefix - * @param string $zip_file - * @param array $file_list - * @param string $prefix Regular expression for the prefix to strip - */ -function zip_files_list($zip_file, $file_list, $prefix = '') -{ - $archive = new ZipArchive(); - $res = $archive->open($zip_file, ZipArchive::CREATE|ZipArchive::OVERWRITE); - if($res !== TRUE) - { - $GLOBALS['log']->fatal("Unable to open zip file, check directory permissions: $zip_file"); - return FALSE; - } - foreach($file_list as $file) { - if(!empty($prefix) && preg_match($prefix, $file, $matches) > 0) { - $zipname = substr($file, strlen($matches[0])); - } else { - $zipname = $file; - } - $archive->addFile($file, $zipname); - } - return TRUE; -} diff --git a/include/utils/sugar_file_utils.php b/include/utils/sugar_file_utils.php index d6f7fa84..7470f2e5 100644 --- a/include/utils/sugar_file_utils.php +++ b/include/utils/sugar_file_utils.php @@ -55,22 +55,22 @@ function sugar_mkdir($pathname, $mode=null, $recursive=false, $context='') { if ( sugar_is_dir($pathname,$mode) ) return true; - + $result = false; if(empty($mode)) $mode = 0777; if(empty($context)) { - $result = @mkdir($pathname, $mode, $recursive); + $result = mkdir($pathname, $mode, $recursive); } else { - $result = @mkdir($pathname, $mode, $recursive, $context); + $result = mkdir($pathname, $mode, $recursive, $context); } if($result){ - if(!sugar_chmod($pathname, $mode)){ + if(!sugar_chmod($pathname, $mode)){ return false; } if(!empty($GLOBALS['sugar_config']['default_permissions']['user'])){ - if(!sugar_chown($pathname)){ + if(!sugar_chown($pathname)){ return false; } } @@ -80,10 +80,6 @@ function sugar_mkdir($pathname, $mode=null, $recursive=false, $context='') { } } } - else { - $GLOBALS['log']->error("Cannot create directory $pathname cannot be touched"); - } - return $result; } @@ -106,7 +102,7 @@ function sugar_fopen($filename, $mode, $use_include_path=false, $context=null){ if(!file_exists($filename)){ sugar_touch($filename); } - + if(empty($context)) { return fopen($filename, $mode, $use_include_path); } else { @@ -134,11 +130,6 @@ function sugar_file_put_contents($filename, $data, $flags=null, $context=null){ sugar_touch($filename); } - if ( !is_writable($filename) ) { - $GLOBALS['log']->error("File $filename cannot be written to"); - return false; - } - if(empty($flags)) { return file_put_contents($filename, $data); } elseif(empty($context)) { @@ -148,32 +139,6 @@ function sugar_file_put_contents($filename, $data, $flags=null, $context=null){ } } -/** - * sugar_file_get_contents - * - * @param $filename - String value of the file to create - * @param $use_include_path - boolean value indicating whether or not to search the the included_path - * @param $context - * @return string|boolean - Returns a file data on success, false otherwise - */ -function sugar_file_get_contents($filename, $use_include_path=false, $context=null){ - //check to see if the file exists, if not then use touch to create it. - if(!file_exists($filename)){ - sugar_touch($filename); - } - - if ( !is_readable($filename) ) { - $GLOBALS['log']->error("File $filename cannot be read"); - return false; - } - - if(empty($context)) { - return file_get_contents($filename, $use_include_path); - } else { - return file_get_contents($filename, $use_include_path, $context); - } -} - /** * sugar_touch * Attempts to set the access and modification times of the file named in the filename @@ -193,17 +158,15 @@ function sugar_touch($filename, $time=null, $atime=null) { $result = false; if(!empty($atime) && !empty($time)) { - $result = @touch($filename, $time, $atime); + $result = touch($filename, $time, $atime); } else if(!empty($time)) { - $result = @touch($filename, $time); + $result = touch($filename, $time); } else { - $result = @touch($filename); + $result = touch($filename); } - if(!$result) { - $GLOBALS['log']->error("File $filename cannot be touched"); - return $result; - } + if(!$result) return $result; + if(!empty($GLOBALS['sugar_config']['default_permissions']['file_mode'])){ sugar_chmod($filename, $GLOBALS['sugar_config']['default_permissions']['file_mode']); } diff --git a/include/utils/zip_utils.php b/include/utils/zip_utils.php index 74809042..645d0623 100644 --- a/include/utils/zip_utils.php +++ b/include/utils/zip_utils.php @@ -37,94 +37,53 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -if(class_exists("ZipArchive")) { - require_once 'include/utils/php_zip_utils.php'; - return; -} else { require_once('include/pclzip/pclzip.lib.php'); -if ( isset($GLOBALS['log']) && class_implements($GLOBALS['log'],'LoggerTemplate') ) { - $GLOBALS['log']->deprecated('Use of PCLZip has been deprecated. Please enable the zip extension in your PHP install ( see http://www.php.net/manual/en/zip.installation.php for more details ).'); -} + function unzip( $zip_archive, $zip_dir, $forceOverwrite = false ){ if( !is_dir( $zip_dir ) ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Specified directory '$zip_dir' for zip file '$zip_archive' extraction does not exist." ); - return false; + die( "Specified directory '$zip_dir' for zip file '$zip_archive' extraction does not exist." ); } $archive = new PclZip( $zip_archive ); if ( $forceOverwrite ) { if( $archive->extract( PCLZIP_OPT_PATH, $zip_dir, PCLZIP_OPT_REPLACE_NEWER ) == 0 ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Error: " . $archive->errorInfo(true) ); - return false; + die( "Error: " . $archive->errorInfo(true) ); } } else { if( $archive->extract( PCLZIP_OPT_PATH, $zip_dir ) == 0 ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Error: " . $archive->errorInfo(true) ); - return false; + die( "Error: " . $archive->errorInfo(true) ); } } } function unzip_file( $zip_archive, $archive_file, $to_dir, $forceOverwrite = false ){ if( !is_dir( $to_dir ) ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Specified directory '$to_dir' for zip file '$zip_archive' extraction does not exist." ); - return false; + die( "Specified directory '$to_dir' for zip file '$zip_archive' extraction does not exist." ); } - $archive = new PclZip($zip_archive); + $archive = new PclZip( "$zip_archive" ); if ( $forceOverwrite ) { if( $archive->extract( PCLZIP_OPT_BY_NAME, $archive_file, PCLZIP_OPT_PATH, $to_dir, PCLZIP_OPT_REPLACE_NEWER ) == 0 ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Error: " . $archive->errorInfo(true) ); - return false; + die( "Error: " . $archive->errorInfo(true) ); } } else { if( $archive->extract( PCLZIP_OPT_BY_NAME, $archive_file, PCLZIP_OPT_PATH, $to_dir ) == 0 ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Error: " . $archive->errorInfo(true) ); - return false; + die( "Error: " . $archive->errorInfo(true) ); } } } function zip_dir( $zip_dir, $zip_archive ){ - $archive = new PclZip( $zip_archive ); - $v_list = $archive->create( $zip_dir ); + $archive = new PclZip( "$zip_archive" ); + $v_list = $archive->create( "$zip_dir" ); if( $v_list == 0 ){ - if (!defined('SUGAR_PHPUNIT_RUNNER')) - die( "Error: " . $archive->errorInfo(true) ); - return false; - } -} - -/** - * Zip list of files, optionally stripping prefix - * @param string $zip_file - * @param array $file_list - * @param string $prefix Regular expression for the prefix to strip - */ -function zip_files_list($zip_file, $file_list, $prefix = '') -{ - $archive = new PclZip( $zip_file ); - foreach($file_list as $file) { - if(!empty($prefix) && preg_match($prefix, $file, $matches) > 0) { - $remove_path = $matches[0]; - $archive->add($file, PCLZIP_OPT_REMOVE_PATH, $prefix); - } else { - $archive->add($file); - } + die( "Error: " . $archive->errorInfo(true) ); } - return true; } - -} // if (ZipArchive exists) \ No newline at end of file +?> diff --git a/include/vCard.php b/include/vCard.php index d432cf20..3c953f1e 100644 --- a/include/vCard.php +++ b/include/vCard.php @@ -37,26 +37,25 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); /********************************************************************************* - * Description: + * Description: ********************************************************************************/ class vCard { - protected $properties = array(); + var $properties = array(); + var $name = 'no_name'; - protected $name = 'no_name'; - - public function clear() - { - $this->properties = array(); + function clear(){ + $this->properties = array(); } - + function loadContact($contactid, $module='Contacts') { global $app_list_strings; require_once($GLOBALS['beanFiles'][$GLOBALS['beanList'][$module]]); $contact = new $GLOBALS['beanList'][$module](); $contact->retrieve($contactid); + // cn: bug 8504 - CF/LB break Outlook's vCard import $bad = array("\n", "\r"); $good = array("=0A", "=0D"); @@ -65,7 +64,7 @@ class vCard $contact->primary_address_street = str_replace($bad, $good, $contact->primary_address_street); $encoding = 'QUOTED-PRINTABLE'; } - + $this->setName(from_html($contact->first_name), from_html($contact->last_name), $app_list_strings['salutation_dom'][from_html($contact->salutation)]); if ( isset($contact->birthdate) ) $this->setBirthDate(from_html($contact->birthdate)); @@ -81,38 +80,32 @@ class vCard $this->setORG('', from_html($contact->department)); $this->setTitle($contact->title); } - + function setTitle($title){ - $this->setProperty("TITLE",$title ); + $this->setProperty("TITLE",$title ); } function setORG($org, $dep){ - $this->setProperty("ORG","$org;$dep" ); + $this->setProperty("ORG","$org;$dep" ); } function setAddress($address, $city, $state,$postal, $country, $type, $encoding=''){ if(!empty($encoding)) { $encoding = ";ENCODING={$encoding}"; } - $this->setProperty("ADR;$type$encoding",";;$address;$city;$state;$postal;$country" ); + $this->setProperty("ADR;$type$encoding",";;$address;$city;$state;$postal;$country" ); } - + function setName($first_name, $last_name, $prefix){ $this->name = strtr($first_name.'_'.$last_name, ' ' , '_'); - $this->setProperty('N',$last_name.';'.$first_name.';;'.$prefix ); - $this->setProperty('FN',"$prefix $first_name $last_name"); + $this->setProperty('N',$last_name.';'.$first_name.';'.$prefix ); + $this->setProperty('FN',"$prefix $first_name $last_name"); } - + function setEmail($address){ $this->setProperty('EMAIL;INTERNET', $address); } - - function setPhoneNumber( $number, $type) - { - if($type != 'FAX') { - $this->setProperty("TEL;$type", $number); - } - else { - $this->setProperty("TEL;WORK;$type", $number); - } + + function setPhoneNumber( $number, $type){ + $this->setProperty("TEL;$type", $number); } function setBirthDate($date){ $this->setProperty('BDAY',$date); @@ -120,45 +113,39 @@ class vCard function getProperty($name){ if(isset($this->properties[$name])) return $this->properties[$name]; - return null; + return null; } - + function setProperty($name, $value){ - $this->properties[$name] = $value; + $this->properties[$name] = $value; } - + function toString(){ - global $locale; $temp = "BEGIN:VCARD\n"; foreach($this->properties as $key=>$value){ - if(!empty($value)) { - $temp .= $key. ';CHARSET='.strtolower($locale->getExportCharset()).':'.$value."\n"; - } else { - $temp .= $key. ':'.$value."\n"; - } - } + $temp .= $key. ':'.$value."\n"; + } $temp.= "END:VCARD\n"; - - + + return $temp; - } - + } + function saveVCard(){ global $locale; + $content = $this->toString(); - if ( !defined('SUGAR_PHPUNIT_RUNNER') ) { - header("Content-Disposition: attachment; filename={$this->name}.vcf"); - header("Content-Type: text/x-vcard; charset=".$locale->getExportCharset()); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); - header("Last-Modified: " . TimeDate::httpTime() ); - header("Cache-Control: max-age=0"); - header("Pragma: public"); - header("Content-Length: ".strlen($content)); - } + header("Content-Disposition: attachment; filename={$this->name}.vcf"); + header("Content-Type: text/x-vcard; charset=".$locale->getExportCharset()); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); + header("Cache-Control: max-age=0"); + header("Pragma: public"); + header("Content-Length: ".strlen($content)); print $locale->translateCharset($content, 'UTF-8', $locale->getExportCharset()); } - + function importVCard($filename, $module='Contacts'){ global $current_user; $lines = file($filename); @@ -169,10 +156,10 @@ class vCard $contact->assigned_user_id = $current_user->id; $fullname = ''; $email_suffix = 1; - + for($index = 0; $index < sizeof($lines); $index++){ $line = $lines[$index]; - + // check the encoding and change it if needed $locale = new Localization(); $encoding = $locale->detectCharset($line); @@ -184,7 +171,7 @@ class vCard //VCARD is done if(substr_count(strtoupper($line), 'END:VCARD')){ if(!isset($contact->last_name)){ - $contact->last_name = $fullname; + $contact->last_name = $fullname; } break; } @@ -200,7 +187,7 @@ class vCard $key = strtr($key, '=', ''); $key = strtr($key, ',',';'); $keys = explode(';' ,$key); - + if($keys[0] == 'TEL'){ if(substr_count($key, 'WORK') > 0){ if(substr_count($key, 'FAX') > 0){ @@ -210,7 +197,7 @@ class vCard }else{ if(!isset($contact->phone_work)){ $contact->phone_work = $value; - } + } } } if(substr_count($key, 'HOME') > 0){ @@ -221,22 +208,22 @@ class vCard }else{ if(!isset($contact->phone_home)){ $contact->phone_home = $value; - } + } } } if(substr_count($key, 'CELL') > 0){ if(!isset($contact->phone_mobile)){ $contact->phone_mobile = $value; - } - + } + } if(substr_count($key, 'FAX') > 0){ if(!isset($contact->phone_fax)){ $contact->phone_fax = $value; } - + } - + } if($keys[0] == 'N'){ if(sizeof($values) > 0) @@ -244,17 +231,17 @@ class vCard if(sizeof($values) > 1) $contact->first_name = $values[1]; if(sizeof($values) > 2) - $contact->salutation = $values[2]; - - - + $contact->salutation = $values[2]; + + + } if($keys[0] == 'FN'){ - $fullname = $value; - - + $fullname = $value; + + } - + } if($keys[0] == 'ADR'){ if(substr_count($key, 'WORK') > 0 && (substr_count($key, 'POSTAL') > 0|| substr_count($key, 'PARCEL') == 0)){ @@ -278,24 +265,24 @@ class vCard } } } - + if($keys[0] == 'TITLE'){ $contact->title = $value; - + } if($keys[0] == 'EMAIL'){ $field = 'email' . $email_suffix; if(!isset($contact->$field)) { $contact->$field = $value; } - + if($email_suffix == 1) { $_REQUEST['email1'] = $value; } - - $email_suffix++; + + $email_suffix++; } - + if($keys[0] == 'ORG'){ $GLOBALS['log']->debug('I found a company name'); if(!empty($value)){ @@ -320,11 +307,11 @@ class vCard require_once('custom/include/vCardTrimStrings.php'); } $short_company_name = trim(preg_replace(array_keys($vCardTrimStrings),$vCardTrimStrings,$full_company_name)," ,."); - + $GLOBALS['log']->debug('Trying an extended search for: '.$short_company_name); $result = $accountBean->retrieve_by_string_fields(array('name' => $short_company_name, 'deleted' => 0)); } - + if ( is_a($contact,"Lead") || ! isset($result->id) ) { // We could not find a parent account, or this is a lead so only copy the name, no linking $GLOBALS['log']->debug("Did not find a matching company ($full_company_name)"); @@ -340,21 +327,21 @@ class vCard $contact->department = $value; } } - + } - + } - - - - + + + + //FOUND THE BEGINING OF THE VCARD if(!$start && substr_count(strtoupper($line), 'BEGIN:VCARD')){ - $start = true; + $start = true; } - + } - + if ( is_a($contact, "Contact") && empty($contact->account_id) && !empty($contact->account_name) ) { $GLOBALS['log']->debug("Look ma! I'm creating a new account: ".$contact->account_name); // We need to create a new account @@ -369,16 +356,16 @@ class vCard $accountBean->save(); $contact->account_id = $accountBean->id; } - + $contactId = $contact->save(); return $contactId; } } - - - - - + + + + + diff --git a/install.php b/install.php index 21cb9e69..3f5edfc4 100644 --- a/install.php +++ b/install.php @@ -63,7 +63,7 @@ require_once('include/entryPoint.php'); $_REQUEST['js_rebuild_concat'] = 'rebuild'; require_once('jssource/minify.php'); -$timedate = TimeDate::getInstance(); +$timedate = new TimeDate(); // cn: set php.ini settings at entry points setPhpIniSettings(); $locale = new Localization(); @@ -352,7 +352,7 @@ if($next_clicked) { case 'license.php': $_SESSION['setup_license_accept'] = get_boolean_from_request('setup_license_accept'); $_SESSION['license_submitted'] = true; - + // eventually default all vars here, with overrides from config.php if(is_readable('config.php')) { @@ -486,7 +486,7 @@ switch($the_file) { // check to see if installer has been disabled if(is_readable('config.php') && (filesize('config.php') > 0)) { include_once('config.php'); - + if(!isset($sugar_config['installer_locked']) || $sugar_config['installer_locked'] == true) { $the_file = 'installDisabled.php'; $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; @@ -500,12 +500,12 @@ switch($the_file) {

    {$mod_strings['LBL_DISABLED_HELP_1']} {$mod_strings['LBL_DISABLED_HELP_2']}.

    EOQ; - //if this is an offline client installation but the conversion did not succeed, - //then try to convert again - if(isset($sugar_config['disc_client']) && $sugar_config['disc_client'] == true && isset($sugar_config['oc_converted']) && $sugar_config['oc_converted'] == false) { - header('Location: index.php?entryPoint=oc_convert&first_time=true'); - exit (); - } + //if this is an offline client installation but the conversion did not succeed, + //then try to convert again + if(isset($sugar_config['disc_client']) && $sugar_config['disc_client'] == true && isset($sugar_config['oc_converted']) && $sugar_config['oc_converted'] == false) { + header('Location: index.php?entryPoint=oc_convert&first_time=true'); + exit (); + } } } break; diff --git a/install/UploadLangFileCheck.php b/install/UploadLangFileCheck.php index 8a289998..d543bb80 100644 --- a/install/UploadLangFileCheck.php +++ b/install/UploadLangFileCheck.php @@ -57,6 +57,9 @@ $file_name = $json->decode(html_entity_decode($_REQUEST['file_name'])); $file_name = $_REQUEST['file_name']; $filesize = ''; if(file_exists($file_name)){ + //$fh = fopen($file_name, 'r'); + //$license_contents = fread($fh, filesize($file_name)); + //fclose($fh); $filesize =filesize($file_name); } @@ -85,3 +88,4 @@ if (!empty($response)) { } sugar_cleanup(); exit(); +?> diff --git a/install/UserDemoData.php b/install/UserDemoData.php index 0ca7be32..f560ad87 100644 --- a/install/UserDemoData.php +++ b/install/UserDemoData.php @@ -122,9 +122,6 @@ class UserDemoData { $u->setPreference('max_tabs','7'); $u->savePreferencesToDB(); - - $u->picture = $this->_copy_user_image($id); - $u->save(); } @@ -171,18 +168,5 @@ class UserDemoData { } } - function _copy_user_image($id) { - global $sugar_config; - $picture_file = create_guid(); - $file = "include/images/".$id.".gif"; - $newfile = $sugar_config['upload_dir'].$picture_file; - if (!copy($file, $newfile)) { - global $app_strings; - $GLOBALS['log']->fatal(string_format($app_strings['ERR_FILE_NOT_FOUND'], array($file))); - - } - return $picture_file; - } - } ?> diff --git a/install/confirmSettings.php b/install/confirmSettings.php index 0b08dd05..e6d00002 100644 --- a/install/confirmSettings.php +++ b/install/confirmSettings.php @@ -79,7 +79,7 @@ $defaultLanguages = ""; $sugar_config_defaults = get_sugar_config_defaults(); if(isset($_REQUEST['default_language'])){ $defaultLanguages = $sugar_config_defaults['languages'][$_REQUEST['default_language']]; - } + } /////////////////////////////////////////////////////////////////////////////// //// START OUTPUT @@ -111,7 +111,7 @@ $out =<<
    - + {$dbType} @@ -146,7 +146,7 @@ $out .=<<{$yesNoDropCreate} EOQ; - + } @@ -193,7 +193,7 @@ $out .=<< @@ -220,14 +220,14 @@ $out .=<<{$mod_strings['LBL_DBCONF_DB_PASSWORD']} - + @@ -235,27 +235,27 @@ $out .=<<{$mod_strings['LBL_SITECFG_ADMIN_PASS']} - - + + EOQ; - - - + + + $envString = ' - '; + '; // PHP VERSION $envString .=' - + - '; + '; //Begin List of already known good variables. These were checked during the initial sys check @@ -265,7 +265,7 @@ $envString = ' - '; + '; @@ -276,7 +276,7 @@ $envString = ' - '; + '; // config.php $envString .=' @@ -284,7 +284,7 @@ $envString = ' - '; + '; // custom dir @@ -294,7 +294,7 @@ $envString = ' - '; + '; // modules dir @@ -303,7 +303,7 @@ $envString = ' - '; + '; // data dir @@ -312,16 +312,16 @@ $envString = ' - '; + '; // cache dir $error_found = true; $envString .=' - + - '; + '; // End already known to be good // memory limit @@ -352,13 +352,13 @@ if( $memory_limit == "" ){ // memory_limit disabled at compile time, no $memory_msg = "{$mod_strings['LBL_CHECKSYS_OK']} ({$memory_limit})"; } } - + $envString .=' - '; + '; // zlib if(function_exists('gzclose')) { @@ -369,92 +369,80 @@ if( $memory_limit == "" ){ // memory_limit disabled at compile time, no $envString .=' - + - '; - - // zip - if(class_exists("ZipArchive")) { - $zipStatus = "{$mod_strings['LBL_CHECKSYS_OK']}"; - } else { - $zipStatus = "{$mod_strings['ERR_CHECKSYS_ZIP']}"; - } - $envString .=' - - - - - '; - - - + '; + + + + // imap if(function_exists('imap_open')) { $imapStatus = "{$mod_strings['LBL_CHECKSYS_OK']}"; } else { $imapStatus = "{$mod_strings['ERR_CHECKSYS_IMAP']}"; } - + $envString .=' - + - '; - - + '; + + // cURL if(function_exists('curl_init')) { $curlStatus = "{$mod_strings['LBL_CHECKSYS_OK']}"; } else { $curlStatus = "{$mod_strings['ERR_CHECKSYS_CURL']}"; } - + $envString .=' - + - '; - - + '; + + //CHECK UPLOAD FILE SIZE $upload_max_filesize = ini_get('upload_max_filesize'); $upload_max_filesize_bytes = return_bytes($upload_max_filesize); if(!defined('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')){ define('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES', 6 * 1024 * 1024); } - + if($upload_max_filesize_bytes > constant('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')) { $fileMaxStatus = "{$mod_strings['LBL_CHECKSYS_OK']}"; } else { $fileMaxStatus = "{$mod_strings['ERR_UPLOAD_MAX_FILESIZE']}"; } - + $envString .=' - + - '; - - - + '; + + + // PHP.ini $phpIniLocation = get_cfg_var("cfg_file_path"); - $envString .=' + $envString .=' - '; - -$out .= $envString; - + '; + +$out .= $envString; + $out .=<< @@ -496,7 +484,7 @@ $cronString = '
    '.$error.' -'; +'; } else { if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // some Linux servers do not make this available if(!strpos($_SERVER['PATH'], 'php')) { @@ -516,28 +504,28 @@ $cronString = ' '; -} - -$out .= $cronString; +} +$out .= $cronString; + $out .=<< - -
    + + - + containing navigation buttons */ +} + +.calendar thead .daynames { /* Row containing the day names */ +} + +.calendar thead .name { /* Cells in footer (only one right now) */ +} + +.calendar tfoot .ttip { /* Tooltip (status bar) cell "); - $sugar_smarty->assign("MYSQL_CAPABLE", ""); - $sugar_smarty->assign("MYSQL_CAPABLE_CHECKBOXES", + $xtpl->assign("MYSQL_CAPABLE", ""); + $xtpl->assign("MYSQL_CAPABLE_CHECKBOXES", "" ); +}else{ + $xtpl->assign("NO_MYSQL_MESSAGE", ""); + $xtpl->assign("MYSQL_CAPABLE", "checked"); + $xtpl->assign("MYSQL_CAPABLE_CHECKBOXES", ""); } -else { - $sugar_smarty->assign("NO_MYSQL_MESSAGE", ""); - $sugar_smarty->assign("MYSQL_CAPABLE", "checked"); - $sugar_smarty->assign("MYSQL_CAPABLE_CHECKBOXES", ""); -} -$sugar_smarty->assign("RETURN_MODULE", "Administration"); -$sugar_smarty->assign("RETURN_ACTION", "index"); +$xtpl->assign("RETURN_MODULE", "Administration"); +$xtpl->assign("RETURN_ACTION", "index"); + +$xtpl->assign("MODULE", $currentModule); +$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); + -$sugar_smarty->assign("MODULE", $currentModule); -$sugar_smarty->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); +$xtpl->assign("ADVANCED_SEARCH_PNG", SugarThemeRegistry::current()->getImage('advanced_search','alt="'.$app_strings['LNK_ADVANCED_SEARCH'].'" border="0"')); +$xtpl->assign("BASIC_SEARCH_PNG", SugarThemeRegistry::current()->getImage('basic_search','alt="'.$app_strings['LNK_BASIC_SEARCH'].'" border="0"')); +$xtpl->parse("main"); +$xtpl->out("main"); -$sugar_smarty->assign("ADVANCED_SEARCH_PNG", SugarThemeRegistry::current()->getImage('advanced_search','alt="'.$app_strings['LNK_ADVANCED_SEARCH'].'" border="0"')); -$sugar_smarty->assign("BASIC_SEARCH_PNG", SugarThemeRegistry::current()->getImage('basic_search','alt="'.$app_strings['LNK_BASIC_SEARCH'].'" border="0"')); -$sugar_smarty->display("modules/Administration/Diagnostic.tpl"); +?> diff --git a/modules/Administration/DiagnosticDownload.php b/modules/Administration/DiagnosticDownload.php index 0f5c8c7d..1a758fbf 100644 --- a/modules/Administration/DiagnosticDownload.php +++ b/modules/Administration/DiagnosticDownload.php @@ -36,30 +36,23 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -global $current_user; - - -if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); - -if(!isset($_REQUEST['guid']) || !isset($_REQUEST['time'])) +if(!isset($_REQUEST['file'])) { die('Did not receive a filename to download'); } -$time = str_replace(array('.', '/', '\\'), '', $_REQUEST['time']); -$guid = str_replace(array('.', '/', '\\'), '', $_REQUEST['guid']); -$path = getcwd()."/{$GLOBALS['sugar_config']['cache_dir']}diagnostic/{$guid}/diagnostic{$time}.zip"; -$filesize = filesize($path); -ob_clean(); -header('Content-Description: File Transfer'); -header('Content-type: application/octet-stream'); + +$filesize = filesize(getcwd()."/{$GLOBALS['sugar_config']['cache_dir']}diagnostic/".$_REQUEST['file'].".zip"); + +header('Content-type: application/zip'); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); -header("Content-Disposition: attachment; filename=$guid.zip"); +header("Cache-Control: private",false); +header("Content-Disposition: attachment; filename=".$_REQUEST['file'].".zip"); header("Content-Transfer-Encoding: binary"); header("Content-Length: $filesize"); -readfile($path); +readfile(getcwd().'/'.$GLOBALS['sugar_config']['cache_dir'].'diagnostic/'.$_REQUEST['file'].'.zip'); ?> diff --git a/modules/Administration/DiagnosticRun.php b/modules/Administration/DiagnosticRun.php index 6b1ff387..1d5b66c2 100644 --- a/modules/Administration/DiagnosticRun.php +++ b/modules/Administration/DiagnosticRun.php @@ -41,10 +41,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once( 'include/utils/progress_bar_utils.php' ); require_once( 'include/utils/zip_utils.php' ); -global $current_user; - - -if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); global $skip_md5_diff; @@ -263,7 +259,7 @@ function prepareDiag() "{$mod_strings['LBL_MODULE_NAME']}", translate('LBL_DIAGNOSTIC_TITLE') ), - false + true ); echo "
    "; echo $mod_strings['LBL_DIAGNOSTIC_EXECUTING']; @@ -735,9 +731,8 @@ function finishDiag(){ chdir(RETURN_FROM_DIAG_DIR); deleteDir($cacheDir); - - - print "".$mod_strings['LBL_DIAGNOSTIC_DOWNLOADLINK']."
    "; + + print "".$mod_strings['LBL_DIAGNOSTIC_DOWNLOADLINK']."
    "; print "".$mod_strings['LBL_DIAGNOSTIC_DELETELINK']."
    "; diff --git a/modules/Administration/DstFix.php b/modules/Administration/DstFix.php index 99a23075..1d506ae7 100644 --- a/modules/Administration/DstFix.php +++ b/modules/Administration/DstFix.php @@ -50,20 +50,20 @@ if ($db->dbType == 'oci8') { echo "
    "; echo "

    ".$mod_strings['ERR_NOT_FOR_ORACLE']."

    "; echo "
    "; - sugar_die(''); + sugar_die(''); } if ($db->dbType == 'mssql') { echo "
    "; echo "

    ".$mod_strings['ERR_NOT_FOR_MSSQL']."

    "; echo "
    "; - sugar_die(''); + sugar_die(''); } $display = ''; if(empty($db)) { - + $db = DBManagerFactory::getInstance(); } @@ -86,7 +86,7 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) { // blowaway vCal server cache $qvCal = "TRUNCATE vcals"; $rvCal = $db->query($qvCal); - + // disable refresh double-ups $rDblCheck = $db->query($qDone); $rowsDblCheck = $db->getRowCount($rDblCheck); @@ -113,23 +113,24 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) { 'send_date_time'=>'datetime', ) ); - + $zone = $_REQUEST['server_timezone']; + $td = new TimeDate(); $startyear = 2004; $maxyear = 2014; - $date_modified = $timedate->nowDb(); + $date_modified = gmdate($GLOBALS['timedate']->get_db_date_time_format()); $display = ''; - + foreach($tables as $table_name =>$table) { - + //$display .= ''. $table_name . '
    '; $year = $startyear; - + for($year = $startyear; $year <= $maxyear; $year++) { - $range = $timedate->getDSTRange($year,$timezones[$zone]); + $range = $td->getDSTRange($year,$timezones[$zone]); $startDateTime = explode(' ',$range['start']); $endDateTime = explode(' ',$range['end']); - + if($range) { if( strtotime($range['start']) < strtotime($range['end'])) { foreach($table as $date=>$time) { @@ -144,99 +145,104 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) { $field = "$table_name.$date + ' ' + $table_name.$time"; } $updateBase= "UPDATE $table_name SET date_modified='$date_modified', $table_name.$date=LEFT($field $interval,10),"; - $updateBase .= " $table_name.$time=RIGHT($field $interval,8)"; - + $updateBase .= " $table_name.$time=RIGHT($field $interval,8)"; + }else{ $field = "$table_name.$date"; $updateBase = "UPDATE $table_name SET date_modified='$date_modified', $table_name.$date = $table_name.$date $interval"; } - //BEGIN DATE MODIFIED IN DST WITH DATE OUT DST + //BEGIN DATE MODIFIED IN DST WITH DATE OUT DST $update = str_replace('PLUSMINUS', '+', $updateBase); $queryInDST = $update ." - WHERE + WHERE $table_name.date_modified >= '{$range['start']}' AND $table_name.date_modified < '{$range['end']}' AND ( $field < '{$range['start']}' OR $field >= '{$range['end']}' )"; - - $result = $db->query($queryInDST); + + $result = $db->query($queryInDST); $count = $db->getAffectedRowCount(); - //$display .= "$year - Records updated with date modified in DST with date out of DST: $count
    "; - //BEGIN DATE MODIFIED OUT DST WITH DATE IN DST + //$display .= "$year - Records updated with date modified in DST with date out of DST: $count
    "; + //BEGIN DATE MODIFIED OUT DST WITH DATE IN DST $update = str_replace('PLUSMINUS', '-', $updateBase); $queryOutDST = $update ." - WHERE + WHERE ( $table_name.date_modified < '{$range['start']}' OR $table_name.date_modified >= '{$range['end']}' ) AND $field >= '{$range['start']}' AND $field < '{$range['end']}' "; - - $result = $db->query($queryOutDST); + + $result = $db->query($queryOutDST); $count = $db->getAffectedRowCount(); - //$display .= "$year - Records updated with date modified out of DST with date in DST: $count
    "; + //$display .= "$year - Records updated with date modified out of DST with date in DST: $count
    "; } }else{ - + foreach($table as $date=>$time){ $interval='PLUSMINUS INTERVAL 3600 second'; if($time != 'datetime'){ - + if ( ( $this->db->dbType == 'mysql' ) or ( $this->db->dbType == 'oci8' ) ) { $field = "CONCAT($table_name.$date,' ', $table_name.$time)"; } - if ( $this->db->dbType == 'mssql' ) + if ( $this->db->dbType == 'mssql' ) { $field = "$table_name.$date + ' ' + $table_name.$time"; } $updateBase= "UPDATE $table_name SET $table_name.$date=LEFT($field $interval,10),"; - $updateBase .= " $table_name.$time=RIGHT($field $interval,8)"; - + $updateBase .= " $table_name.$time=RIGHT($field $interval,8)"; + }else{ $field = "$table_name.$date"; $updateBase = "UPDATE $table_name SET $table_name.$date = $table_name.$date $interval"; } - - - //BEGIN DATE MODIFIED IN DST WITH DATE OUT OF DST + + + //BEGIN DATE MODIFIED IN DST WITH DATE OUT OF DST $update = str_replace('PLUSMINUS', '+', $updateBase); - $queryInDST = $update ." - WHERE + $queryInDST = $update ." + WHERE ($table_name.date_modified >= '{$range['start']}' OR $table_name.date_modified < '{$range['end']}' ) AND $field < '{$range['start']}' AND $field >= '{$range['end']}'"; - - $result = $db->query($queryInDST); + + $result = $db->query($queryInDST); $count = $db->getAffectedRowCount(); - //$display .= "$year - Records updated with date modified in DST with date out of DST: $count
    "; - - //BEGIN DATE MODIFIED OUT DST WITH DATE IN DST + //$display .= "$year - Records updated with date modified in DST with date out of DST: $count
    "; + + //BEGIN DATE MODIFIED OUT DST WITH DATE IN DST $update = str_replace('PLUSMINUS', '-', $updateBase); - $queryOutDST = $update ." - WHERE + $queryOutDST = $update ." + WHERE ($table_name.date_modified < '{$range['start']}' AND $table_name.date_modified >= '{$range['end']}' ) - AND + AND ($field >= '{$range['start']}' OR $field < '{$range['end']}' )"; - - - + + + } - - $result = $db->query($queryOutDST); + + $result = $db->query($queryOutDST); $count = $db->getAffectedRowCount(); - //$display .= "$year - Records updated with date modified out of DST with date in DST: $count
    "; + //$display .= "$year - Records updated with date modified out of DST with date in DST: $count
    "; } } } // end outer forloop }// end foreach loop - + } $display .= "
    ".$mod_strings['LBL_DST_FIX_DONE_DESC'].""; } elseif(!$done) { // show primary screen $disabled = ""; $confirmed = 'true'; + if(empty($timedate)) { + + $timedate = new TimeDate(); + } + require_once('include/timezone/timezones.php'); global $timezones; $timezoneOptions = ''; ksort($timezones); if(!isset($defaultServerZone)){ - $defaultServerZone = TimeDate::guessTimezone(0); + $defaultServerZone = lookupTimezone(0); } foreach($timezones as $key => $value) { if(!empty($value['dstOffset'])) { @@ -255,10 +261,10 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) { } $timezoneOptions .= ""; } - + // descriptions and assumptions $display = " - + - +
    {$mod_strings['LBL_DBCONF_TITLE']}
    {$mod_strings['LBL_DBCONF_DB_USER']} - {$_SESSION['setup_db_sugarsales_user']} + {$_SESSION['setup_db_sugarsales_user']}
    {$mod_strings['LBL_HIDDEN']} - +
    {$mod_strings['LBL_SITECFG_ADMIN_Name']} - Admin + Admin
    {$mod_strings['LBL_HIDDEN']} - +
    '.$mod_strings['LBL_SYSTEM_ENV'].'
    '.$mod_strings['LBL_SYSTEM_ENV'].'
    '.$mod_strings['LBL_CHECKSYS_PHPVER'].' '.constant('PHP_VERSION').'
    '.$mod_strings['LBL_CHECKSYS_XML'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_MBSTRING'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_CONFIG'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_CUSTOM'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_MODULE'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_DATA'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_CACHE'].''.$mod_strings['LBL_CHECKSYS_CACHE'].' '.$mod_strings['LBL_CHECKSYS_OK'].'
    '.$mod_strings['LBL_CHECKSYS_MEM'].' '.$memory_msg.'
    '.$mod_strings['LBL_CHECKSYS_ZLIB'].''.$mod_strings['LBL_CHECKSYS_ZLIB'].' '.$zlibStatus.'
    '.$mod_strings['LBL_CHECKSYS_ZIP'].''.$zipStatus.'
    '.$mod_strings['LBL_CHECKSYS_IMAP'].''.$mod_strings['LBL_CHECKSYS_IMAP'].' '.$imapStatus.'
    '.$mod_strings['LBL_CHECKSYS_CURL'].''.$mod_strings['LBL_CHECKSYS_CURL'].' '.$curlStatus.'
    '.$mod_strings['LBL_UPLOAD_MAX_FILESIZE_TITLE'].''.$mod_strings['LBL_UPLOAD_MAX_FILESIZE_TITLE'].' '.$fileMaxStatus.'
    '.$mod_strings['LBL_CHECKSYS_PHP_INI'].' '.$phpIniLocation.'
    -  

    '; } } - + // PHP VERSION $php_version = constant('PHP_VERSION'); $check_php_version_result = check_php_version($php_version); @@ -206,14 +206,6 @@ if(!function_exists('mb_strlen')) { installLog("MBString Support Found"); } -// zip -if(!class_exists('ZipArchive')) { - $zipStatus = "{$mod_strings['ERR_CHECKSYS_ZIP']}"; - installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_ZIP']}"); -}else{ - installLog("ZIP Support Found"); -} - // config.php if(file_exists('./config.php') && (!(make_writable('./config.php')) || !(is_writable('./config.php')))) { installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_CONFIG_NOT_WRITABLE']}"); diff --git a/install/install_utils.php b/install/install_utils.php index 9d8e0d6e..10381838 100644 --- a/install/install_utils.php +++ b/install/install_utils.php @@ -208,7 +208,7 @@ function commitLanguagePack($uninstall=false) { function commitPatch($unlink = false, $type = 'patch'){ require_once('ModuleInstall/ModuleInstaller.php'); require_once('include/entryPoint.php'); - + global $mod_strings; global $base_upgrade_dir; @@ -277,7 +277,7 @@ function commitPatch($unlink = false, $type = 'patch'){ function commitModules($unlink = false, $type = 'module'){ require_once('ModuleInstall/ModuleInstaller.php'); require_once('include/entryPoint.php'); - + global $mod_strings; global $base_upgrade_dir; @@ -755,24 +755,24 @@ function handleDbCreateSugarUser() { function displayMssqlErrors($driver_type, $query) { global $sugar_config; if($driver_type =='mssqlsrv' && ($errors = sqlsrv_errors(SQLSRV_ERR_ALL) ) != null) - { + { foreach( $errors as $error) { - + echo "
    "; echo "An error occured when performing the folloing query:
    "; echo "$query
    "; - echo "
    "; - installLog("An error occured when performing the query:".$query." SQLSTATE: ".$error[ 'SQLSTATE']." message: ".$error[ 'message']); + echo ""; + installLog("An error occured when performing the query:".$query." SQLSTATE: ".$error[ 'SQLSTATE']." message: ".$error[ 'message']); } } if($driver_type =='mssql') - { + { echo "
    "; echo "An error occured when performing the folloing query:
    "; echo "$query
    "; - echo "
    "; - installLog("An error occured when performing the query:".$query." message: ".mssql_get_last_message()); + echo ""; + installLog("An error occured when performing the query:".$query." message: ".mssql_get_last_message()); } } /** @@ -792,11 +792,11 @@ function handleDbCharsetCollation() { $host_name = getHostPortFromString($setup_db_host_name); if(empty($host_name)){ $link = @mysqli_connect($setup_db_host_name, $setup_db_admin_user_name, $setup_db_admin_password); - + }else{ $link = @mysqli_connect($host_name[0], $setup_db_admin_user_name, $setup_db_admin_password,null,$host_name[1]); } - + $q1 = "ALTER DATABASE `{$setup_db_database_name}` DEFAULT CHARACTER SET utf8"; $q2 = "ALTER DATABASE `{$setup_db_database_name}` DEFAULT COLLATE utf8_general_ci"; @mysqli_query($link, $q1); @@ -833,8 +833,8 @@ function handleDbCreateDatabase() { $host_name = getHostPortFromString($setup_db_host_name); if(empty($host_name)){ $link = @mysqli_connect($setup_db_host_name, $setup_db_admin_user_name, $setup_db_admin_password); - }else{ - $link = @mysqli_connect($host_name[0], $setup_db_admin_user_name, $setup_db_admin_password,null,$host_name[1]); + }else{ + $link = @mysqli_connect($host_name[0], $setup_db_admin_user_name, $setup_db_admin_password,null,$host_name[1]); } $drop = 'DROP DATABASE IF EXISTS '.$setup_db_database_name; @mysqli_query($link, $drop); @@ -916,6 +916,18 @@ function handleDbCreateDatabase() { */ function handleLog4Php() { return; +/* global $setup_site_log_dir; + global $setup_site_log_file; + + if(is_writable("log4php.properties") && ($fh = @ sugar_fopen("log4php.properties", "r+"))) { + $props = fread($fh, filesize("log4php.properties")); + $props = preg_replace('/(log4php.appender.A2.File=).*\n/', "$1" . $setup_site_log_dir . "/" . $setup_site_log_file . "\n", $props); + rewind( $fh ); + fwrite( $fh, $props ); + ftruncate( $fh, ftell($fh) ); + fclose( $fh ); + } + */ } function installLog($entry) { @@ -1028,7 +1040,7 @@ function handleSugarConfig() { $sugar_config['sugar_version'] = $setup_sugar_version; $sugar_config['tmp_dir'] = $cache_dir.'xml/'; $sugar_config['upload_dir'] = $cache_dir.'upload/'; -// $sugar_config['use_php_code_json'] = returnPhpJsonStatus(); // true on error + $sugar_config['use_php_code_json'] = returnPhpJsonStatus(); // true on error if( isset($_SESSION['setup_site_sugarbeet_anonymous_stats']) ){ $sugar_config['sugarbeet'] = $_SESSION['setup_site_sugarbeet_anonymous_stats']; } @@ -1056,7 +1068,7 @@ function handleSugarConfig() { include('install/lang.config.php'); if(!empty($config['languages'])){ foreach($config['languages'] as $lang=>$label){ - $sugar_config['languages'][$lang] = $label; + $sugar_config['languages'][$lang] = $label; } } } @@ -1079,15 +1091,6 @@ function handleSugarConfig() { $bottle[] = $mod_strings['ERR_PERFORM_CONFIG_PHP_4']; } - - //Now merge the config_si.php settings into config.php - if(file_exists('config.php') && file_exists('config_si.php')) - { - require_once('modules/UpgradeWizard/uw_utils.php'); - merge_config_si_settings(false, 'config.php', 'config_si.php'); - } - - //// END $sugar_config /////////////////////////////////////////////////////////////////////////////// return $bottle; @@ -1098,17 +1101,16 @@ function handleSugarConfig() { function handleHtaccess(){ global $mod_strings; $ignoreCase = (substr_count(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache/2') > 0)?'(?i)':''; -$htaccess_file = getcwd() . "/.htaccess"; +$htaccess_file = getcwd() . "/.htaccess"; $contents = ''; $restrict_str = <<{$mod_strings['ERR_PERFORM_HTACCESS_1']}{$htaccess_file} {$mod_strings['ERR_PERFORM_HTACCESS_2']}

    \n"; echo "

    {$mod_strings['ERR_PERFORM_HTACCESS_3']}

    \n"; @@ -1134,16 +1136,11 @@ EOQ; /** * (re)write the web.config file to prevent browser access to the log file */ -function handleWebConfig() -{ - if ( !isset($_SERVER['IIS_UrlRewriteModule']) ) { - return; - } - +function handleWebConfig() { global $setup_site_log_dir; global $setup_site_log_file; global $sugar_config; - + // Bug 36968 - Fallback to using $sugar_config values when we are not calling this from the installer if (empty($setup_site_log_file)) { $setup_site_log_file = $sugar_config['log_file']; @@ -1157,10 +1154,10 @@ function handleWebConfig() $setup_site_log_dir = '.'; } } - + $prefix = $setup_site_log_dir.empty($setup_site_log_dir)?'':'/'; - - + + $config_array = array( array('1'=> $prefix.str_replace('.','\\.',$setup_site_log_file).'\\.*' ,'2'=>'log_file_restricted.html'), array('1'=> $prefix.'install.log' ,'2'=>'log_file_restricted.html'), @@ -1180,9 +1177,9 @@ function handleWebConfig() array('1'=>'emailmandelivery.php' ,'2'=>'index.php'), array('1'=>'cron.php' ,'2'=>'index.php'), array('1'=> $sugar_config['upload_dir'].'.*' ,'2'=>'index.php'), - ); - - + ); + + $xmldoc = new XMLWriter(); $xmldoc->openURI('web.config'); $xmldoc->setIndent(true); @@ -1197,7 +1194,7 @@ function handleWebConfig() $xmldoc->writeAttribute('name', "redirect$i"); $xmldoc->writeAttribute('stopProcessing', 'true'); $xmldoc->startElement('match'); - $xmldoc->writeAttribute('url', $config_array[$i]['1']); + $xmldoc->writeAttribute('url', $config_array[$i]['1']); $xmldoc->endElement(); $xmldoc->startElement('action'); $xmldoc->writeAttribute('type', 'Redirect'); @@ -1259,8 +1256,6 @@ function create_default_users(){ global $setup_site_admin_user_name; global $create_default_user; global $sugar_config; - - require_once('install/UserDemoData.php'); //Create default admin user $user = new User(); @@ -1276,9 +1271,8 @@ function create_default_users(){ //$user->user_password = $user->encrypt_password($setup_site_admin_password); $user->user_hash = strtolower(md5($setup_site_admin_password)); $user->email = ''; - $user->picture = UserDemoData::_copy_user_image($user->id); $user->save(); - + // echo 'Creating RSS Feeds'; //$feed = new Feed(); //$feed->createRSSHomePage($user->id); @@ -1342,12 +1336,12 @@ function insert_default_settings(){ $db->query("INSERT INTO config (category, name, value) VALUES ('portal', 'on', '0')"); - - //insert default tracker settings + + //insert default tracker settings $db->query("INSERT INTO config (category, name, value) VALUES ('tracker', 'Tracker', '1')"); + - - + $db->query( "INSERT INTO config (category, name, value) VALUES ( 'system', 'skypeout_on', '1')" ); } @@ -1601,7 +1595,7 @@ function validate_siteConfig($type){ if($_SESSION['setup_site_admin_user_name'] == '') { $errors[] = "".$mod_strings['ERR_ADMIN_USER_NAME_BLANK'].""; } - + if($_SESSION['setup_site_admin_password'] == ''){ $errors[] = "".$mod_strings['ERR_ADMIN_PASS_BLANK'].""; } @@ -1653,7 +1647,7 @@ function pullSilentInstallVarsIntoSession() { global $mod_strings; global $sugar_config; - + if( file_exists('config_si.php') ){ require_once('config_si.php'); } @@ -2086,20 +2080,22 @@ function getHostPortFromString($hostname=''){ $pos=strpos($hostname,':'); if($pos === false){ //no need to process as string is empty or does not contain ':' delimiter - return ''; + return ''; } $hostArr = explode(':', $hostname); return $hostArr; - + } function getLicenseContents($filename) { $license_file = ''; if(file_exists($filename) && filesize($filename) >0){ - $license_file = file_get_contents($filename); + $fh = sugar_fopen( $filename, 'r' ) or die( "License file not found!" ); + $license_file = fread( $fh, filesize( $filename ) ); + fclose( $fh ); } return $license_file; } @@ -2187,36 +2183,39 @@ function create_phone_number() { return $phone; } -function create_date($year=null,$mnth=null,$day=null) -{ +function create_date($year=null,$mnth=null,$day=null) { global $timedate; - $now = $timedate->getNow(); - if ($day==null) $day=$now->day+mt_rand(0,365); - return $timedate->asDbDate($now->get_day_begin($day, $mnth, $year)); + + if ($mnth ==null) $mnth=date("m"); + if ($day==null) $day=date("d")+mt_rand(0,365); + if ($year==null) $year=date("Y"); + + $date = date($timedate->get_db_date_format(), mktime(0, 0, 0, $mnth, $day, $year)); + return $date; } -function create_current_date_time() -{ +function create_current_date_time() { global $timedate; - return $timedate->nowDb(); + + $time=date($timedate->get_db_date_format() . ' ' . $timedate->get_db_date_format(),mktime()); + return $time; } -function create_time($hr=null,$min=null,$sec=null) -{ +function create_time($hr=null,$min=null,$sec=null) { global $timedate; - $date = TimeDate::fromTimestamp(0); if ($hr==null) $hr=mt_rand(6,19); if ($min==null) $min=(mt_rand(0,3)*15); if ($sec==null) $sec=0; - return $timedate->asDbTime($date->setDate(2007, 10, 7)->setTime($hr, $min, $sec)); + + $time=date($timedate->get_db_time_format(),mktime($hr, $min, $sec, 7, 10, 2007)); + return $time; } -function create_past_date() -{ +function create_past_date() { global $timedate; - $now = $timedate->getNow(true); - $day=$now->day-mt_rand(1, 365); - return $timedate->asUserDate($now->get_day_begin($day)); + + $date = date($timedate->get_date_format(), mktime(0, 0, 0, date("m"), date("d")+mt_rand(-365,-1), date("Y"))); + return $date; } /** @@ -2267,8 +2266,8 @@ return $password; function addDefaultRoles($defaultRoles = array()) { global $db; - - + + foreach($defaultRoles as $roleName=>$role){ $ACLField = new ACLField(); $role1= new ACLRole(); @@ -2301,9 +2300,7 @@ function enableSugarFeeds() { $admin = new Administration(); $admin->saveSetting('sugarfeed','enabled','1'); - + foreach ( SugarFeed::getAllFeedModules() as $module ) SugarFeed::activateModuleFeed($module); - - check_logic_hook_file('Users','after_login', array(1, 'SugarFeed old feed entry remover', 'modules/SugarFeed/SugarFeedFlush.php', 'SugarFeedFlush', 'flushStaleEntries')); } diff --git a/install/language/en_us.lang.php b/install/language/en_us.lang.php index 3f623bef..59e43b76 100644 --- a/install/language/en_us.lang.php +++ b/install/language/en_us.lang.php @@ -91,8 +91,7 @@ $mod_strings = array( 'ERR_CHECKSYS_FILES_NOT_WRITABLE' => "The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 766), or to right click on the parent directory and uncheck the 'read only' option and apply it to all subfolders.", //'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (please disable in php.ini)', 'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (you may wish to disable in php.ini)', - 'ERR_CHECKSYS_ZLIB' => 'ZLib support not found: SugarCRM reaps enormous performance benefits with zlib compression.', - 'ERR_CHECKSYS_ZIP' => 'ZIP support not found: SugarCRM needs ZIP support in order to process compressed files.', + 'ERR_CHECKSYS_ZLIB' => 'Not Found: SugarCRM reaps enormous performance benefits with zlib compression.', 'ERR_DB_ADMIN' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. (Error: ', 'ERR_DB_ADMIN_MSSQL' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password.', 'ERR_DB_EXISTS_NOT' => 'The specified database does not exist.', @@ -194,8 +193,7 @@ $mod_strings = array( 'LBL_CHECKSYS_VER' => 'Found: ( ver ', 'LBL_CHECKSYS_XML' => 'XML Parsing', 'LBL_CHECKSYS_ZLIB' => 'ZLIB Compression Module', - 'LBL_CHECKSYS_ZIP' => 'ZIP Handling Module', - 'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:', + 'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:', 'LBL_CHECKSYS_FIX_MODULE_FILES' => 'Please fix the following module directories and the files under them before proceeding:', 'LBL_CLOSE' => 'Close', 'LBL_THREE' => '3', @@ -530,35 +528,6 @@ $mod_strings = array( 'LBL_YOUR_PHP_VERSION' => '(Your current php version is ', 'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)', 'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further', - - 'advanced_password_new_account_email' => array( - 'subject' => 'New account information', - 'description' => 'This template is used when the System Administrator sends a new password to a user.', - 'body' => '
    - + @@ -558,17 +546,17 @@ function togglePass(){ if(document.getElementById('show_site_admin_pass').style.display == ''){ document.getElementById('show_pass_button').value = "{$mod_strings['LBL_SHOW_PASS']}"; document.getElementById('hide_site_admin_pass').style.display = ''; - document.getElementById('hide_db_admin_pass').style.display = ''; + document.getElementById('hide_db_admin_pass').style.display = ''; document.getElementById('show_site_admin_pass').style.display = 'none'; - document.getElementById('show_db_admin_pass').style.display = 'none'; + document.getElementById('show_db_admin_pass').style.display = 'none'; }else{ document.getElementById('show_pass_button').value = "{$mod_strings['LBL_HIDE_PASS']}"; document.getElementById('show_site_admin_pass').style.display = ''; document.getElementById('show_db_admin_pass').style.display = ''; document.getElementById('hide_site_admin_pass').style.display = 'none'; - document.getElementById('hide_db_admin_pass').style.display = 'none'; - + document.getElementById('hide_db_admin_pass').style.display = 'none'; + } } diff --git a/install/dbConfig_a.php b/install/dbConfig_a.php index eb62a20d..c066ca3e 100644 --- a/install/dbConfig_a.php +++ b/install/dbConfig_a.php @@ -228,7 +228,7 @@ EOQ2; // 'zh_cn' => '简体中文', // 'ja_jp' => 'Japanese - 日本語', //); -$demoDD = ""; //foreach($supported_demodata as $key => $v){ // // mssql is broken for mbcs // if( ($_SESSION['setup_db_type'] == 'mssql') && ($key != 'en_us')) diff --git a/install/demoData.en_us.php b/install/demoData.en_us.php index 77f0d164..444db9b6 100644 --- a/install/demoData.en_us.php +++ b/install/demoData.en_us.php @@ -21377,7 +21377,8 @@ $sugar_demodata['city_array'] = array( "Persistance", "Alabama", "Kansas City", -); + ); + //cases demodata $sugar_demodata['case_seed_names'] = array( @@ -21423,6 +21424,7 @@ $sugar_demodata['titles'] = array( "Senior Product Manager" ); + //tasks $sugar_demodata['task_seed_data_names'] = array( 'Assemble catalogs', @@ -21446,6 +21448,7 @@ $sugar_demodata['task_seed_data_names'] = array( 'Send local user group information', 'Add to mailing list', ); +$sugar_demodata['meeting_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; //meetings $sugar_demodata['meeting_seed_data_names'] = array( @@ -21456,7 +21459,7 @@ $sugar_demodata['meeting_seed_data_names'] = array( 'Demo', 'Introduce all players', ); -$sugar_demodata['meeting_seed_data_descriptions'] = 'Meeting to discuss project plan and hash out the details of implementation'; +$sugar_demodata['meeting_seed_data_descriptions'] = ''; //emails $sugar_demodata['email_seed_data_subjects'] = array( @@ -21475,6 +21478,7 @@ $sugar_demodata['billing_address_state']['east'] = 'NY'; $sugar_demodata['billing_address_state']['west'] = 'CA'; $sugar_demodata['primary_address_country'] = 'USA'; + //manufacturers $sugar_demodata['manufacturer_seed_data_names'] = array( 'TekWare Inc.', @@ -21490,6 +21494,7 @@ $sugar_demodata['shipper_seed_data_names'] = array( //productcategories $sugar_demodata['category_ext_name'] = ' Widgets'; $sugar_demodata['product_ext_name'] = ' Gadget'; + $sugar_demodata['productcategory_seed_data_names'] = array( 'Desktops', 'Laptops', @@ -21590,6 +21595,23 @@ $sugar_demodata['producttemplate_seed_data'][] = array( 'qty_in_stock' => '65', ); +/* +$sugar_demodata['emailtemplates_seed_data'][] = array( + 'name' => 'Demo data email', + 'subject' => 'New demo data information', + 'description' => 'This template is used when the System Administrator sends a new password to a user.', + 'body' => '

    Here is your account username and temporary password:

    Username : $contact_user_user_name

    Password : $contact_user_user_hash


    '.$GLOBALS['sugar_config']['site_url'].'/index.php


    After you log in using the above password, you may be required to reset the password to one of your own choice.

    ', + 'text_body' => +' +Here is your account username and temporary password: +Username : $contact_user_user_name +Password : $contact_user_user_hash + +'.$GLOBALS['sugar_config']['site_url'].'/index.php + +After you log in using the above password, you may be required to reset the password to one of your own choice.', +); +*/ $sugar_demodata['contract_seed_data'][] = array( 'name' => 'IT Tech Support for UK Datacenter', @@ -21624,8 +21646,8 @@ $sugar_demodata['project_seed_data']['audit'] = array( $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( 'name' => 'Communicate with internal stakeholders', - 'date_start' => '2010-11-1', - 'date_finish' => '2010-11-8', + 'date_start' => '2010/11/1', + 'date_finish' => '2010/11/8', 'description' => 'Schedule individual meetings with Will, Max, and Sarah.', 'duration' => '6', 'duration_unit' => 'Days', @@ -21634,8 +21656,8 @@ $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( 'name' => 'Create draft of the plan', - 'date_start' => '2010-11-5', - 'date_finish' => '2010-11-20', + 'date_start' => '2010/11/5', + 'date_finish' => '2010/11/20', 'description' => 'Start new plan document, including all of the information from the initial discussion meetings.', 'duration' => '12', 'duration_unit' => 'Days', @@ -21644,8 +21666,8 @@ $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( 'name' => 'Perform field studies to collect data', - 'date_start' => '2010-11-5', - 'date_finish' => '2010-11-13', + 'date_start' => '2010/11/5', + 'date_finish' => '2010/11/13', 'description' => 'Obtain approval from all stakeholders of the plan.', 'duration' => '17', 'duration_unit' => 'Days', @@ -21654,8 +21676,8 @@ $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( 'name' => 'Update draft of the plan', - 'date_start' => '2010-11-12', - 'date_finish' => '2010-11-19', + 'date_start' => '2010/11/12', + 'date_finish' => '2010/11/19', 'description' => 'Schedule a meeting with the heads of the business units to review the plan.', 'duration' => '6', 'duration_unit' => 'Days', @@ -21664,8 +21686,8 @@ $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( $sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( 'name' => 'Gather data from meetings', - 'date_start' => '2010-11-20', - 'date_finish' => '2010-11-20', + 'date_start' => '2010/11/20', + 'date_finish' => '2010/11/20', 'description' => 'Need to organize the data and create charts to represent the data.', 'duration' => '1', 'duration_unit' => 'Days', diff --git a/install/installSystemCheck.php b/install/installSystemCheck.php index 9ab64c1e..8d0950d3 100644 --- a/install/installSystemCheck.php +++ b/install/installSystemCheck.php @@ -59,8 +59,8 @@ $error_txt = ''; // check IIS and FastCGI $server_software = $_SERVER["SERVER_SOFTWARE"]; -if ((strpos($_SERVER["SERVER_SOFTWARE"],'Microsoft-IIS') !== false) - && php_sapi_name() == 'cgi-fcgi' +if ((strpos($_SERVER["SERVER_SOFTWARE"],'Microsoft-IIS') !== false) + && php_sapi_name() == 'cgi-fcgi' && ini_get('fastcgi.logging') != '0') { installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']); @@ -111,7 +111,7 @@ if(strpos($server_software,'Microsoft-IIS') !== false)

    Here is your account username and temporary password:

    Username : $contact_user_user_name

    Password : $contact_user_user_hash


    $config_site_url


    After you log in using the above password, you may be required to reset the password to one of your own choice.

    ', - 'txt_body' => -' -Here is your account username and temporary password: -Username : $contact_user_user_name -Password : $contact_user_user_hash - -$config_site_url - -After you log in using the above password, you may be required to reset the password to one of your own choice.', - 'name' => 'System-generated password email', - ), - 'advanced_password_forgot_password_email' => array( - 'subject' => 'Reset your account password', - 'description' => "This template is used to send a user a link to click to reset the user's account password.", - 'body' => '

    You recently requested on $contact_user_pwd_last_changed to be able to reset your account password.

    Click on the link below to reset your password:

    $contact_user_link_guid

    ', - 'txt_body' => -' -You recently requested on $contact_user_pwd_last_changed to be able to reset your account password. - -Click on the link below to reset your password: - -$contact_user_link_guid', - 'name' => 'Forgot Password email', - ), ); ?> diff --git a/install/performSetup.php b/install/performSetup.php index 8228424e..c6ca1f4a 100644 --- a/install/performSetup.php +++ b/install/performSetup.php @@ -503,17 +503,11 @@ FP; $enabled_tabs[] = 'Contacts'; $enabled_tabs[] = 'Opportunities'; $enabled_tabs[] = 'Leads'; - $enabled_tabs[] = 'Calendar'; + $enabled_tabs[] = 'Activities'; $enabled_tabs[] = 'Documents'; $enabled_tabs[] = 'Emails'; $enabled_tabs[] = 'Campaigns'; - $enabled_tabs[] = 'Calls'; - $enabled_tabs[] = 'Meetings'; - $enabled_tabs[] = 'Tasks'; - $enabled_tabs[] = 'Notes'; $enabled_tabs[] = 'Cases'; - $enabled_tabs[] = 'Prospects'; - $enabled_tabs[] = 'ProspectLists'; require_once('modules/MySettings/TabController.php'); diff --git a/install/populateSeedData.php b/install/populateSeedData.php index fa3fd741..af426524 100644 --- a/install/populateSeedData.php +++ b/install/populateSeedData.php @@ -38,25 +38,23 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -// load the correct demo data and main application language file depending upon the installer language selected; if -// it's not found fall back on en_us -if(file_exists("include/language/{$current_language}.lang.php")){ - require_once("include/language/{$current_language}.lang.php"); -} -else { - require_once("include/language/en_us.lang.php"); -} -require_once('install/UserDemoData.php'); -require_once('install/TeamDemoData.php'); -global $sugar_demodata; -if(file_exists("install/demoData.{$current_language}.php")){ - require_once("install/demoData.{$current_language}.php"); -} -else { - require_once("install/demoData.en_us.php"); -} + +require_once('include/language/en_us.lang.php'); + +require_once('install/UserDemoData.php'); +require_once('install/TeamDemoData.php'); +require_once('install/seed_data/basicSeedData.php'); +if(isset($sugar_config['i18n_test']) && $sugar_config['i18n_test'] == true) + require_once('modules/Contacts/contactSeedData_jp.php'); +else + require_once('modules/Contacts/contactSeedData.php'); + if(file_exists("install/demoData.$_SESSION[demoData].php")){ + require_once("install/demoData.$_SESSION[demoData].php"); + }else{ + require_once("install/demoData.en_us.php"); + } $last_name_count = count($sugar_demodata['last_name_array']); $first_name_count = count($sugar_demodata['first_name_array']); $company_name_count = count($sugar_demodata['company_name_array']); @@ -74,7 +72,7 @@ if(empty($app_list_strings)) { */ mt_srand(93285903); $db = DBManagerFactory::getInstance(); -$timedate = TimeDate::getInstance(); +$timedate = new TimeDate(); // Set the max time to one hour (helps Windows load the seed data) ini_set("max_execution_time", "3600"); // ensure we have enough memory @@ -197,7 +195,7 @@ for($i = 0; $i < $number_companies; $i++) { $case->assigned_user_id = $account->assigned_user_id; $case->assigned_user_name = $account->assigned_user_name; $case->save(); - + // Create a bug for the account $bug = new Bug(); $bug->account_id = $account->id; @@ -397,7 +395,7 @@ for($i=0; $i<$number_leads; $i++) $leads_account = $accounts[$account_number]; $lead->primary_address_state = $leads_account->billing_address_state; $lead->status = array_rand($app_list_strings['lead_status_dom']); - $lead->lead_source = array_rand($app_list_strings['lead_source_dom']); + $lead->lead_source = array_rand($app_list_strings['lead_source_dom']); if($i % 3 == 1) { $lead->billing_address_state = $sugar_demodata['billing_address_state']['east']; @@ -443,8 +441,8 @@ for($i=0; $i<$number_leads; $i++) $assigned_team = $team_demo_data->get_random_team(); $lead->assigned_user_name = $assigned_team; } else { - } - } + } + } $lead->primary_address_postalcode = mt_rand(10000,99999); $lead->primary_address_country = $sugar_demodata['primary_address_country']; $lead->save(); @@ -483,21 +481,33 @@ $project->estimated_end_date = $sugar_demodata['project_seed_data']['audit']['es $project->status = $sugar_demodata['project_seed_data']['audit']['status']; $project->priority = $sugar_demodata['project_seed_data']['audit']['priority']; $audit_plan_id = $project->save(); - +$sugar_demodata['project_seed_data']['audit']['project_tasks'][] = array( + 'name' => 'Gather data from meetings', + 'date_start' => '2007/11/20', + 'date_finish' => '2007/11/20', + 'description' => 'Need to organize the data and put it in the right spreadsheet.', + 'duration' => '1', + 'duration_unit' => 'Days', + 'percent_complete' => 0, +); foreach($sugar_demodata['project_seed_data']['audit']['project_tasks'] as $v){ $project_task = new ProjectTask(); $project_task->assigned_user_id = 1; $project_task->name = $v['name']; - $project_task->date_start = $v['date_start']; - $project_task->date_finish = $v['date_finish']; + list($year, $month, $day) = $v['date_start']; + $project_task->date_start = create_date($year, $month, $day); + //$project_task->time_start = create_time(8,0,0); + list($year, $month, $day) = $v['date_start']; + $project_task->date_finish = create_date($year, $month, $day); + //$project_task->time_finish = create_time(8,0,0); $project_task->project_id = $audit_plan_id; $project_task->project_task_id = '1'; $project_task->description = $v['description']; $project_task->duration = $v['duration']; $project_task->duration_unit = $v['duration_unit']; $project_task->percent_complete = $v['percent_complete']; - $communicate_stakeholders_id = $project_task->save(); + $communicate_stakeholders_id = $project_task->save(); } - -?> + +?> \ No newline at end of file diff --git a/install/seed_data/Advanced_Password_SeedData.php b/install/seed_data/Advanced_Password_SeedData.php index 089e800c..549bc7a4 100644 --- a/install/seed_data/Advanced_Password_SeedData.php +++ b/install/seed_data/Advanced_Password_SeedData.php @@ -39,35 +39,34 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require('config.php'); global $sugar_config; global $timedate; -global $mod_strings; //Sent when the admin generate a new password $EmailTemp = new EmailTemplate(); -$EmailTemp->name = $mod_strings['advanced_password_new_account_email']['name']; -$EmailTemp->description = $mod_strings['advanced_password_new_account_email']['description']; -$EmailTemp->subject = $mod_strings['advanced_password_new_account_email']['subject']; -$EmailTemp->body = $mod_strings['advanced_password_new_account_email']['txt_body']; -$EmailTemp->body_html = $mod_strings['advanced_password_new_account_email']['body']; -$EmailTemp->deleted = 0; -$EmailTemp->published = 'off'; -$EmailTemp->text_only = 0; -$id =$EmailTemp->save(); -$sugar_config['passwordsetting']['generatepasswordtmpl'] = $id; +$subj ='New account information'; +$desc = 'This template is used when the System Administrator sends a new password to a user.'; +$body = '

    Here is your account username and temporary password:

    Username : $contact_user_user_name

    Password : $contact_user_user_hash


    '.$GLOBALS['sugar_config']['site_url'].'/index.php


    After you log in using the above password, you may be required to reset the password to one of your own choice.

    '; +$txt_body = +' +Here is your account username and temporary password: +Username : $contact_user_user_name +Password : $contact_user_user_hash -//User generate a link to set a new password -$EmailTemp = new EmailTemplate(); -$EmailTemp->name = $mod_strings['advanced_password_forgot_password_email']['name']; -$EmailTemp->description = $mod_strings['advanced_password_forgot_password_email']['description']; -$EmailTemp->subject = $mod_strings['advanced_password_forgot_password_email']['subject']; -$EmailTemp->body = $mod_strings['advanced_password_forgot_password_email']['txt_body']; -$EmailTemp->body_html = $mod_strings['advanced_password_forgot_password_email']['body']; +'.$GLOBALS['sugar_config']['site_url'].'/index.php + +After you log in using the above password, you may be required to reset the password to one of your own choice.'; +$name = 'System-generated password email'; + +$EmailTemp->name = $name; +$EmailTemp->description = $desc; +$EmailTemp->subject = $subj; +$EmailTemp->body = $txt_body; +$EmailTemp->body_html = $body; $EmailTemp->deleted = 0; $EmailTemp->published = 'off'; $EmailTemp->text_only = 0; $id =$EmailTemp->save(); -$sugar_config['passwordsetting']['lostpasswordtmpl'] = $id; -// set all other default settings +$sugar_config['passwordsetting']['generatepasswordtmpl'] = $id; $sugar_config['passwordsetting']['forgotpasswordON'] = true; $sugar_config['passwordsetting']['SystemGeneratedPasswordON'] = true; $sugar_config['passwordsetting']['systexpirationtime'] = 7; @@ -80,4 +79,37 @@ $sugar_config['passwordsetting']['oneupper'] = true; $sugar_config['passwordsetting']['onelower'] = true; $sugar_config['passwordsetting']['onenumber'] = true; -write_array_to_file( "sugar_config", $sugar_config, "config.php"); \ No newline at end of file +$result = $EmailTemp->db->query("INSERT INTO config (value, category, name) VALUES ('$id','password', 'System-generated password email')"); + + +//User generate a link to set a new password +$EmailTemp = new EmailTemplate(); +$subj ='Reset your account password'; +$desc = "This template is used to send a user a link to click to reset the user's account password."; +$body = '

    You recently requested on $contact_user_pwd_last_changed to be able to reset your account password.

    Click on the link below to reset your password:

    $contact_user_link_guid

    '; +$txt_body = +' +You recently requested on $contact_user_pwd_last_changed to be able to reset your account password. + +Click on the link below to reset your password: + +$contact_user_link_guid'; +$name = 'Forgot Password email'; + +$EmailTemp->name = $name; +$EmailTemp->description = $desc; +$EmailTemp->subject = $subj; +$EmailTemp->body = $txt_body; +$EmailTemp->body_html = $body; +$EmailTemp->deleted = 0; +$EmailTemp->published = 'off'; +$EmailTemp->text_only = 0; +$id =$EmailTemp->save(); +$sugar_config['passwordsetting']['lostpasswordtmpl'] = $id; + +$result = $EmailTemp->db->query("INSERT INTO config (value, category, name) VALUES ('$id','password', 'Forgot Password email')"); + +//rebuildConfigFile($sugar_config, $sugar_config['sugar_version']); +write_array_to_file( "sugar_config", $sugar_config, "config.php"); + +?> \ No newline at end of file diff --git a/include/SugarCharts/SugarChartFactory.php b/install/seed_data/basicSeedData.php similarity index 51% rename from include/SugarCharts/SugarChartFactory.php rename to install/seed_data/basicSeedData.php index 196ab1b0..25392b76 100644 --- a/include/SugarCharts/SugarChartFactory.php +++ b/install/seed_data/basicSeedData.php @@ -37,57 +37,51 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); /********************************************************************************* -* Description: This file generates the appropriate manager for the database -* -* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. -* All Rights Reserved. -* Contributor(s): ______________________________________.. -********************************************************************************/ - - -class SugarChartFactory -{ - /** - * Returns a reference to the ChartEngine object for instance $chartEngine, or the default - * instance if one is not specified - * - * @param string $chartEngine optional, name of the chart engine from $sugar_config['chartEngine'] - * @param string $module optional, name of module extension for chart engine (see JitReports or SugarFlashReports) - * @return object ChartEngine instance - */ - public static function getInstance( - $chartEngine = '', - $module = '' - ) - { - global $sugar_config; - $defaultEngine = "Jit"; - //fall back to the default Js Engine if config is not defined - if(empty($sugar_config['chartEngine'])){ - $sugar_config['chartEngine'] = $defaultEngine; - } - - if(empty($chartEngine)){ - $chartEngine = $sugar_config['chartEngine']; - } - - $file = "include/SugarCharts/".$chartEngine."/".$chartEngine.$module.".php"; - - if(file_exists('custom/' . $file)) - { - require_once('custom/' . $file); - } else if(file_exists($file)) { - require_once($file); - } else { - $GLOBALS['log']->debug("using default engine include/SugarCharts/".$defaultEngine."/".$defaultEngine.$module.".php"); - require_once("include/SugarCharts/".$defaultEngine."/".$defaultEngine.$module.".php"); - } - - $className = $chartEngine.$module; - return new $className(); - - } + * Description: + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights + * Reserved. Contributor(s): ______________________________________.. + * *******************************************************************************/ +if(isset($sugar_config['i18n_test']) && $sugar_config['i18n_test'] == true && $_SESSION['setup_db_type'] != 'mssql') { + $case_seed_names = array( + 'プラグが差し込めません', + 'システムが異常に高速に動作中', + 'カスタマイズの支援について', + '追加ライセンスの購入について', + '間違ったブラウザを使用する場合の警告メッセージ' + ); + $note_seed_names_and_Descriptions = array( + array('お客様情報の追加','3,000人のお客様にコンタクトすること'), + array('コール情報','再コールにより電話。いい話になった。'), + array('誕生日','担当者は10月生まれ'), + array('お歳暮','お歳暮は歓迎される。来年のためにリスト化すること。') + ); + $call_seed_data_names = array( + '提案について詳細情報を得ること', + 'メッセージを残した', + '都合が悪いとのこと。掛けなおし', + 'レビュープロセスの討議' + ); +} else { + $case_seed_names = array( + 'Having Trouble Plugging It In', + 'System is Performing Too Fast', + 'Need assistance with large customization', + 'Need to Purchase Additional Licenses', + 'Warning message when using the wrong browser' + ); + $note_seed_names_and_Descriptions = array( + array('More Account Information','This could turn into a 3,000 user opportunity'), + array('Call Information','We had a call. The call went well.'), + array('Birthday Information','The Owner was born in October'), + array('Holliday Gift','The holliday gift was appreciated. Put them on the list for next year as well.') + ); + $call_seed_data_names = array( + 'Get More information on the proposed deal', + 'Left a message', + 'Bad time, will call back', + 'Discuss Review Process' + ); } ?> diff --git a/modules/Meetings/action_view_map.php b/install/seed_data/index.html similarity index 97% rename from modules/Meetings/action_view_map.php rename to install/seed_data/index.html index 4c48d890..7735656c 100644 --- a/modules/Meetings/action_view_map.php +++ b/install/seed_data/index.html @@ -1,4 +1,4 @@ - + + +

    keep me

    + + diff --git a/jscalendar/calendar-setup_3.js b/jscalendar/calendar-setup_3.js new file mode 100644 index 00000000..3fd5be2e --- /dev/null +++ b/jscalendar/calendar-setup_3.js @@ -0,0 +1,51 @@ +/* + + Modification information for LGPL compliance + + r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + + r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + + r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + + r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + + r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + + r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + + r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + + r27708 - 2007-10-05 15:45:31 -0700 (Fri, 05 Oct 2007) - julian - Fix for bug #13416: jscalendar does not honor 'First Day of Week' value in I18N files (CONTRIBUTED CODE) + + r25053 - 2007-08-03 09:24:58 -0700 (Fri, 03 Aug 2007) - clee - Fix to accomodate for ifFormat parameter that is used by modules when calling Calendar.setup code in Javascript. + + r24533 - 2007-07-23 01:35:36 -0700 (Mon, 23 Jul 2007) - clee - Added fixes for IE javascript errors where calendar selection causes other form fields to be disabled/readonly. + + + */ +Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputFieldObj",null);param_default("displayAreaObj",null);param_default("buttonObj",null);param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("firstDay",isNaN(Calendar._FD)?0:Calendar._FD);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onOpen",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);var tmp=["inputField","displayArea","button"];for(var i in tmp) +{if(params[tmp[i]+'Obj']==null&&typeof params[tmp[i]]=="string") +{params[tmp[i]]=document.getElementById(params[tmp[i]]);} +else +{params[tmp[i]]=params[tmp[i]+'Obj'];}} +if(!(params.flat||params.inputField||params.displayArea||params.button)){return false;} +function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.flat){if(typeof p.flatCallback=="function") +p.flatCallback(cal);else +alert("No flatCallback given -- doing nothing.");return false;} +if(update&&p.inputField){val=cal.date.print(p.daFormat);val=val.substring(0,10);p.inputField.value=val;if(typeof p.inputField.onchange=="function") +p.inputField.onchange();} +if(update&&p.displayArea) +p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&p.singleClick&&cal.dateClicked) +cal.callCloseHandler();if(update&&typeof p.onUpdate=="function") +p.onUpdate(cal);};if(params.flat!=null){if(typeof params.flat=="string") +params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n Flat specified but can't find parent.");return false;} +var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.create(params.flat);cal.show();return false;} +var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){if(params.onOpen){params.onOpen();} +var dateEl=params.inputField||params.displayArea;var dateFmt=((typeof params.ifFormat!="undefined")&¶ms.ifFormat!="%Y/%m/%d")?params.ifFormat:params.daFormat;params.daFormat=dateFmt;if(dateFmt.indexOf(" ")>-1){dateFmt=dateFmt.substring(0,dateFmt.indexOf(" "));} +var mustCreate=false;var cal=window.calendar;if(!(cal&¶ms.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();},params.inputField);cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date) +cal.setDate(params.date);cal.hide();} +cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.setDateFormat(dateFmt);if(mustCreate) +cal.create();cal.parseDate(dateEl.value||dateEl.innerHTML);cal.refresh();if(!params.position) +cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else +cal.showAt(params.position[0],params.position[1]);return false;};}; \ No newline at end of file diff --git a/jscalendar/calendar-win2k-cold-1.css b/jscalendar/calendar-win2k-cold-1.css new file mode 100644 index 00000000..54199133 --- /dev/null +++ b/jscalendar/calendar-win2k-cold-1.css @@ -0,0 +1,291 @@ +/* + +Modification information for LGPL compliance + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r24077 - 2007-07-06 14:12:57 -0700 (Fri, 06 Jul 2007) - clee - Updates to match new date + time field conversions. + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +/* The main calendar widget. DIV containing a table. */ + +.calendar { + position: relative; + display: none; + border-top: 2px solid #fff; + border-right: 2px solid #000; + border-bottom: 2px solid #000; + border-left: 2px solid #fff; + font-size: 11px; + color: #000; + cursor: default; + background: #c8d0d4; + font-family: tahoma,verdana,sans-serif; +} + +.calendar table { + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; + font-size: 11px; + color: #000; + cursor: default; + background: #c8d0d4; + font-family: tahoma,verdana,sans-serif; +} + +/* Header part -- contains navigation buttons and day names. */ + +.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ + text-align: center; + padding: 1px; + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; +} + +.calendar .nav { + background: transparent url(menuarrow.gif) no-repeat 100% 100%; +} + +.calendar thead .title { /* This holds the current "month, year" */ + font-weight: bold; + padding: 1px; + border: 1px solid #000; + background: #788084; + color: #fff; + text-align: center; +} + +.calendar thead .headrow { /* Row
    containing the day names */ + border-bottom: 1px solid #000; + padding: 2px; + text-align: center; + background: #e8f0f4; +} + +.calendar thead .weekend { /* How a weekend day name shows in header */ + color: #f00; +} + +.calendar thead .hilite { /* How do the buttons in header appear when hover */ + border-top: 2px solid #fff; + border-right: 2px solid #000; + border-bottom: 2px solid #000; + border-left: 2px solid #fff; + padding: 0px; + background-color: #d8e0e4; +} + +.calendar thead .active { /* Active (pressed) buttons in header */ + padding: 2px 0px 0px 2px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; + background-color: #b8c0c4; +} + +/* The body part -- contains all the days in month. */ + +.calendar tbody .day { /* Cells containing month days dates */ + width: 2em; + text-align: right; + padding: 2px 4px 2px 2px; +} +.calendar tbody .day.othermonth { + font-size: 80%; + color: #aaa; +} +.calendar tbody .day.othermonth.oweekend { + color: #faa; +} + +.calendar table .wn { + padding: 2px 3px 2px 2px; + border-right: 1px solid #000; + background: #e8f4f0; +} + +.calendar tbody .rowhilite td { + background: #d8e4e0; +} + +.calendar tbody .rowhilite td.wn { + background: #c8d4d0; +} + +.calendar tbody td.hilite { /* Hovered cells */ + padding: 1px 3px 1px 1px; + border: 1px solid; + border-color: #fff #000 #000 #fff; +} + +.calendar tbody td.active { /* Active (pressed) cells */ + padding: 2px 2px 0px 2px; + border: 1px solid; + border-color: #000 #fff #fff #000; +} + +.calendar tbody td.selected { /* Cell showing selected date */ + font-weight: bold; + padding: 2px 2px 0px 2px; + border: 1px solid; + border-color: #000 #fff #fff #000; + background: #d8e0e4; +} + +.calendar tbody td.weekend { /* Cells showing weekend days */ + color: #f00; +} + +.calendar tbody td.today { /* Cell showing today date */ + font-weight: bold; + color: #00f; +} + +.calendar tbody .disabled { color: #999; } + +.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ + //visibility: hidden; +} + +.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ + display: none; +} + +/* The footer part -- status bar and "Close" button */ + +.calendar tfoot .footrow { /* The
    */ + background: #e8f0f4; + padding: 1px; + border: 1px solid #000; + background: #788084; + color: #fff; + text-align: center; +} + +.calendar tfoot .hilite { /* Hover style for buttons in footer */ + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; + padding: 1px; + background: #d8e0e4; +} + +.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ + padding: 2px 0px 0px 2px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; +} + +/* Combo boxes (menus that display months/years for direct selection) */ + +.calendar .combo { + position: absolute; + display: none; + width: 4em; + top: 0px; + left: 0px; + cursor: default; + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; + background: #d8e0e4; + font-size: 90%; + padding: 1px; +} + +.calendar .combo .label, +.calendar .combo .label-IEfix { + text-align: center; + padding: 1px; +} + +.calendar .combo .label-IEfix { + width: 4em; +} + +.calendar .combo .active { + background: #c8d0d4; + padding: 0px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; +} + +.calendar .combo .hilite { + background: #048; + color: #aef; +} + +.calendar td.time { + border-top: 1px solid #000; + padding: 1px 0px; + text-align: center; + background-color: #e8f0f4; + visibility: visible; +} + +.calendar td.time .hour, +.calendar td.time .minute, +.calendar td.time .ampm { + padding: 0px 3px 0px 4px; + border: 1px solid #889; + font-weight: bold; + background-color: #fff; +} + +.calendar td.time .ampm { + text-align: center; +} + +.calendar td.time .colon { + padding: 0px 2px 0px 3px; + font-weight: bold; +} + +.calendar td.time span.hilite { + border-color: #000; + background-color: #667; + color: #fff; +} + +.calendar td.time span.active { + border-color: #f00; + background-color: #000; + color: #0f0; +} + diff --git a/jscalendar/calendar.js b/jscalendar/calendar.js new file mode 100644 index 00000000..944025b6 --- /dev/null +++ b/jscalendar/calendar.js @@ -0,0 +1,202 @@ +/* + + Modification information for LGPL compliance + + r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + + r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + + r56972 - 2010-06-15 19:49:32 -0700 (Tue, 15 Jun 2010) - sadek - Bug 37984: Workaround for a Google chrome bug. Still works in other browsers, and now in chrome too. See http://code.google.com/p/chromium/issues/detail?id=38641 + + r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + + r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + + r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + + r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + + r47729 - 2009-05-29 14:12:28 -0700 (Fri, 29 May 2009) - dwheeler - 30560: Fixed a bug in calendar.js where it referenced the depreciated IE variable document.body.scrollTop which has been replaced by document.documentElement.scrollTop in IE7. + + r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + + r40171 - 2008-09-30 15:25:06 -0700 (Tue, 30 Sep 2008) - rob - Adds a shortcut to some old code that was working around a bug in very old browsers (NN4, IE5), left it alone for IE (so it would catch IE5) + FIXED: 25076, 25249, 25150 + + r26391 - 2007-09-04 18:50:23 -0700 (Tue, 04 Sep 2007) - dwheeler - Bug 14707: + Modified datetime field JSCalendar to be compatible with the YUI overlay panel. + + r24533 - 2007-07-23 01:35:36 -0700 (Mon, 23 Jul 2007) - clee - Added fixes for IE javascript errors where calendar selection causes other form fields to be disabled/readonly. + + + */ +Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose,inputField){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=firstDayOfWeek;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;this.inputField=inputField||null;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined") +Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);} +Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined") +Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);} +Calendar._SMN=ar;}};Calendar._C=null;if(typeof jscal_today!='undefined'){;Calendar.dateToday=jscal_today;} +Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft) +SL=el.scrollLeft;if(is_div&&el.scrollTop) +ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;} +return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}} +while(related){if(related==el){return true;} +related=related.parentNode;} +return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;} +var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}} +el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){if(Calendar.is_ie){return window.event.srcElement;}else{return ev.currentTarget;}};Calendar.getTargetElement=function(ev){if(Calendar.is_ie){return window.event.srcElement;}else{return ev.target;}};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();} +return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);} +if(typeof parent!="undefined"){parent.appendChild(el);} +return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;} +return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;} +return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;} +var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");} +if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");} +var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0) +s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined") +mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";} +s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;} +var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");} +if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");} +cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.firstChild.data=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";} +yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;} +if(show){var s=yc.style;s.display="block";if(cd.navtype<0) +s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined") +ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";} +s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;} +if(cal.timeout){clearTimeout(cal.timeout);} +var el=cal.activeDiv;if(!el){return false;} +var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);} +var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}} +with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;} +var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2))) +Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");} +ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else +dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;) +if(range[i]==current) +break;while(count-->0) +if(decrease){if(--i<0) +i=range.length-1;}else if(++i>=range.length) +i=0;var newval=range[i];el.firstChild.data=newval;cal.onUpdateTime();} +var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");} +Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");} +var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");} +Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}} +return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;} +var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;} +cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;} +cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);} +cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;} +var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.firstChild.data;addEvent(document,"mousemove",tableMouseOver);}else +addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);} +if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;} +return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;} +if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);} +el.calendar.tooltips.firstChild.data=el.ttip;} +if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}} +return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled){return false;} +removeClass(el,"hilite");if(el.caldate){removeClass(el.parentNode,"rowhilite");} +el.calendar.tooltips.firstChild.data=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;} +cal.date=new Date(el.caldate);date=cal.date;newdate=true;if(!(cal.dateClicked=!el.otherMonth)) +cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;} +if(el.navtype==0){if(typeof Calendar.dateToday!='undefined')date=new Date(parseFloat(Calendar.dateToday));else date=new Date();} +else{date=new Date(cal.date);} +cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);} +date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";} +alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);} +break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);} +break;case 1:if(mon<11){setMonth(mon+1);}else if(year=0;) +if(range[i]==current) +break;if(ev&&ev.shiftKey){if(--i<0) +i=range.length-1;}else if(++i>=range.length) +i=0;var newval=range[i];el.firstChild.data=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;} +break;} +if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}} +if(newdate){cal.callHandler();} +if(closing){Calendar.removeClass(el,"hilite");cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;} +if(this.dateStr)this.date=new Date(this.dateStr) +else if(typeof Calendar.dateToday=='undefined')this.date=new Date();else this.date=new Date(Calendar.dateToday);var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";div.style.zIndex=12000;} +div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2) +cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;if(text.substr(0,1)!="&"){cell.appendChild(document.createTextNode(text));} +else{cell.innerHTML=text;} +return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];} +row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.appendChild(document.createTextNode(Calendar._TT["WK"]));} +for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}} +this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));} +for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));cell.calendar=this;Calendar._add_evs(cell);}} +if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.appendChild(document.createTextNode(init));part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number") +part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}} +Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.appendChild(document.createTextNode(":"));span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12) +AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else +cell.innerHTML=" ";cal.onSetTime=function(){var hrs=this.date.getHours();var mins=this.date.getMinutes();var pm=(hrs>12);if(pm&&t12)hrs-=12;H.firstChild.data=(hrs<10)?("0"+hrs):hrs;M.firstChild.data=(mins<10)?("0"+mins):mins;if(t12) +AP.firstChild.data=pm?"pm":"am";};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.firstChild.data,10);if(t12){if(/pm/i.test(AP.firstChild.data)&&h<12) +h+=12;else if(/am/i.test(AP.firstChild.data)&&h==12) +h=0;} +var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.firstChild.data,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};} +var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";} +this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";yr.appendChild(document.createTextNode(""));div.appendChild(yr);} +this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){if(!window.calendar){return false;} +(Calendar.is_ie)&&(ev=window.event);var cal=window.calendar;var act=(Calendar.is_ie||ev.type=="keypress");if(ev.ctrlKey){switch(ev.keyCode){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(ev.keyCode){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var date=cal.date.getDate()-1;var el=cal.currentDateEl;var ne=null;var prev=(ev.keyCode==37)||(ev.keyCode==38);switch(ev.keyCode){case 37:(--date>=0)&&(ne=cal.ar_days[date]);break;case 38:date-=7;(date>=0)&&(ne=cal.ar_days[date]);break;case 39:(++datethis.maxYear){year=this.maxYear;date.setFullYear(year);} +this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0) +day1+=7;date.setDate(-day1||0);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.firstChild.data=date.getWeekNumber();cell=cell.nextSibling;} +row.className="daysrow";var hasdays=false;for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(date.getDate()+1)){var iday=date.getDate();var wday=date.getDay();cell.className="day";var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;} +cell.disabled=false;cell.firstChild.data=iday;if(typeof this.getDateStatus=="function"){var status=this.getDateStatus(date,year,month,iday);if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status)) +cell.disabled=true;cell.className+=" "+status;}} +if(!cell.disabled){ar_days[ar_days.length]=cell;cell.caldate=new Date(date);cell.ttip="_";if(current_month&&iday==mday){cell.className+=" selected";this.currentDateEl=cell;} +if(date.getFullYear()==today.getFullYear()&&date.getMonth()==today.getMonth()&&iday==today.getDate()){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];} +if(weekend.indexOf(wday.toString())!=-1){cell.className+=cell.otherMonth?" oweekend":" weekend";}}} +if(!(hasdays||this.showsOtherMonths)) +row.className="emptyrow";} +this.ar_days=ar_days;this.title.firstChild.data=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);} +this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window.calendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){if(!window.calendar){return false;} +var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window.calendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){if(this.inputField!=null&&!this.inputField.readOnly) +{var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}} +this.element.style.display="block";this.hidden=false;if(this.isPopup){window.calendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);} +this.hideShowCovered();}};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);} +this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;} +function fixPosition(box){if(box.x<0) +box.x=0;if(box.y<0) +box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=Math.max(document.body.scrollTop,document.documentElement.scrollTop);br.x+=Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);}else{br.y+=window.scrollY;br.x+=window.scrollX;} +var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);} +switch(valign){case"T":p.y-=h;break;case"B":p.y+=el.offsetHeight;break;case"C":p.y+=(el.offsetHeight-h)/2;break;case"t":p.y+=el.offsetHeight-h;break;case"b":break;} +switch(halign){case"L":p.x-=w;break;case"R":p.x+=el.offsetWidth;break;case"C":p.x+=(el.offsetWidth-w)/2;break;case"r":p.x+=el.offsetWidth-w;break;case"l":break;} +p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml) +setTimeout("Calendar.continuation_for_the_khtml_browser()",10);else +Calendar.continuation_for_the_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){var y=0;var m=-1;var d=0;var a=str.split(/\W+/);if(!fmt){fmt=this.dateFormat;} +var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}} +break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12) +hr+=12;break;case"%M":min=parseInt(a[i],10);break;}} +if(y!=0&&m!=-1&&d!=0){this.setDate(new Date(y,m,d,hr,min,0));return;} +y=0;m=-1;d=0;for(i=0;i31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}} +if(y==0){var today=new Date();y=today.getFullYear();} +if(m!=-1&&d!=0){this.setDate(new Date(y,m,d,hr,min,0));}};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie){return;} +var self=this;Calendar.continuation_for_the_khtml_browser=function(){function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml) +value=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");else +value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else +value='';} +return value;};var tags=new Array("applet","iframe","select");var el=self.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(self.hidden||(CX1>EX2)||(CX2EY2)||(CY2=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0) +ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;var isSafari=navigator.userAgent.toLowerCase().indexOf("safari")!=-1;if(!Calendar.is_ie5&&!isSafari) +return str.replace(re,function(par){return s[par]||par;}) +var a=str.match(re);for(var i=0;iRraL#2QrIhnCSD|Y2rlx_xwxq&h@fcKZs#?v!0&(grG%|C?d}R)U zD^^qZLqwz(8AZb2F@n7Ht1*~)C_QN;j~*1;!-N#FcEOM(A3fUjg#2vzUPlb`OU3Tk Fe*i=yIHv#r literal 0 HcmV?d00001 diff --git a/jscalendar/lang/calendar-af.js b/jscalendar/lang/calendar-af.js new file mode 100644 index 00000000..0716d92d --- /dev/null +++ b/jscalendar/lang/calendar-af.js @@ -0,0 +1,65 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N Afrikaans +Calendar._DN = new Array +("Sondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag", + "Sondag"); +Calendar._MN = new Array +("Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Verander eerste dag van die week"; +Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)"; +Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)"; +Calendar._TT["GO_TODAY"] = "Gaan na vandag"; +Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)"; +Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)"; +Calendar._TT["SEL_DATE"] = "Kies datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif"; +Calendar._TT["PART_TODAY"] = " (vandag)"; +Calendar._TT["MON_FIRST"] = "Vertoon Maandag eerste"; +Calendar._TT["SUN_FIRST"] = "Display Sunday first"; +Calendar._TT["CLOSE"] = "Close"; +Calendar._TT["TODAY"] = "Today"; diff --git a/jscalendar/lang/calendar-bg.js b/jscalendar/lang/calendar-bg.js new file mode 100644 index 00000000..683a116f --- /dev/null +++ b/jscalendar/lang/calendar-bg.js @@ -0,0 +1,134 @@ +/* + +Modification information for LGPL compliance + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + + +*/ + +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Encoding: any +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat", + "Sun"); + +// full month names +Calendar._MN = new Array +("January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "About the calendar"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; +Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; +Calendar._TT["GO_TODAY"] = "Go Today"; +Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; +Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; +Calendar._TT["SEL_DATE"] = "Select date and time"; +Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; +Calendar._TT["PART_TODAY"] = " (today)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "Display %s first"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Close"; +Calendar._TT["TODAY"] = "Today"; +//Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; +Calendar._TT["TIME_PART"] = "Drag mouse or use arrows to change"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + +Calendar._TT["WK"] = "wk"; +Calendar._TT["TIME"] = "Time:"; diff --git a/jscalendar/lang/calendar-br.js b/jscalendar/lang/calendar-br.js new file mode 100644 index 00000000..250ecd2d --- /dev/null +++ b/jscalendar/lang/calendar-br.js @@ -0,0 +1,73 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado", + "Domingo"); +Calendar._MN = new Array +("Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Altera primeiro dia da semana"; +Calendar._TT["PREV_YEAR"] = "Ano anterior(hold for menu)"; +Calendar._TT["PREV_MONTH"] = "Mês anterior (hold for menu)"; +Calendar._TT["GO_TODAY"] = "Hoje"; +Calendar._TT["NEXT_MONTH"] = "Mês seguinte (hold for menu)"; +Calendar._TT["NEXT_YEAR"] = "ano seguinte (hold for menu)"; +Calendar._TT["SEL_DATE"] = "Seleciona uma data"; +Calendar._TT["DRAG_TO_MOVE"] = "Arrasta calendário"; +Calendar._TT["PART_TODAY"] = " (hoje)"; +Calendar._TT["MON_FIRST"] = "Inicia na segunda-feira"; +Calendar._TT["SUN_FIRST"] = "Inicia no domingo"; +Calendar._TT["CLOSE"] = "Fechar"; +Calendar._TT["TODAY"] = "Hoje"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; + +Calendar._TT["WK"] = "sem"; diff --git a/jscalendar/lang/calendar-ca.js b/jscalendar/lang/calendar-ca.js new file mode 100644 index 00000000..69b0f634 --- /dev/null +++ b/jscalendar/lang/calendar-ca.js @@ -0,0 +1,73 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Diumenge", + "Dilluns", + "Dimarts", + "Dimecres", + "Dijous", + "Divendres", + "Dissabte", + "Diumenge"); +Calendar._MN = new Array +("Gener", + "Febrer", + "Març", + "Abril", + "Maig", + "Juny", + "Juliol", + "Agost", + "Setembre", + "Octubre", + "Novembre", + "Desembre"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Canvia el primer dia de la setmana"; +Calendar._TT["PREV_YEAR"] = "Any anterior (mantenir per a menu)"; +Calendar._TT["PREV_MONTH"] = "Mes anterior (mantenir per a menu)"; +Calendar._TT["GO_TODAY"] = "Anar a avui"; +Calendar._TT["NEXT_MONTH"] = "Mes següent (mantenir per a menu)"; +Calendar._TT["NEXT_YEAR"] = "Any següent (mantenir per a menu)"; +Calendar._TT["SEL_DATE"] = "Seleccionar data"; +Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per a moure"; +Calendar._TT["PART_TODAY"] = " (avui)"; +Calendar._TT["MON_FIRST"] = "Mostrar dilluns primer"; +Calendar._TT["SUN_FIRST"] = "Mostrar diumenge primer"; +Calendar._TT["CLOSE"] = "Tancar"; +Calendar._TT["TODAY"] = "Avui"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e"; + +Calendar._TT["WK"] = "sem"; diff --git a/jscalendar/lang/calendar-cs-win.js b/jscalendar/lang/calendar-cs-win.js new file mode 100644 index 00000000..5dd4983a --- /dev/null +++ b/jscalendar/lang/calendar-cs-win.js @@ -0,0 +1,62 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +/* + calendar-cs-win.js + language: Czech + encoding: utf-8 + author: Lubos Jerabek (xnet@seznam.cz) +*/ + +// ** I18N +Calendar._DN = new Array('Ned¨§le','Pond¨§l¨ª','¨²tery','St?eda','?tvrtek','P¨¢tek','Sobota','Ned¨§le'); +Calendar._SDN = new Array('Ne','Po','¨²t','St','?t','P¨¢','So','Ne'); +Calendar._MN = new Array('Leden','¨²nor','B?ezen','Duben','Kv¨§ten','?erven','?ervenec','Srpen','Z¨¢?¨ª','?¨ªjen','Listopad','Prosinec'); +Calendar._SMN = new Array('Led','¨²no','B?e','Dub','Kv¨§','?rv','?vc','Srp','Z¨¢?','?¨ªj','Lis','Pro'); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Zm¨§na prvn¨ªho dne v tydnu"; +Calendar._TT["PREV_YEAR"] = "P?edchoz¨ª rok (p?idr? pro menu)"; +Calendar._TT["PREV_MONTH"] = "P?edchoz¨ª m¨§s¨ªc (p?idr? pro menu)"; +Calendar._TT["GO_TODAY"] = "Dne?n¨ª datum"; +Calendar._TT["NEXT_MONTH"] = "Dal?¨ª m¨§s¨ªc (p?idr? pro menu)"; +Calendar._TT["NEXT_YEAR"] = "Dal?¨ª rok (p?idr? pro menu)"; +Calendar._TT["SEL_DATE"] = "Vyber datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Chy? a t¨¢hni, pro p?esun"; +Calendar._TT["PART_TODAY"] = " (dnes)"; +Calendar._TT["MON_FIRST"] = "Uka? jako prvn¨ª Pond¨§l¨ª"; +Calendar._TT["SUN_FIRST"] = "Uka? jako prvn¨ª Ned¨§li"; +Calendar._TT["CLOSE"] = "Zav?¨ªt"; +Calendar._TT["TODAY"] = "Dnes"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %e.%B"; + +Calendar._TT["WK"] = "wk"; diff --git a/jscalendar/lang/calendar-da.js b/jscalendar/lang/calendar-da.js new file mode 100644 index 00000000..ab555b11 --- /dev/null +++ b/jscalendar/lang/calendar-da.js @@ -0,0 +1,91 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag", + "Søndag"); +Calendar._MN = new Array +("January", + "Februar", + "Marts", + "April", + "Maj", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "December"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Om Kalenderen"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"For den seneste version besøg: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." + +"\n\n" + +"Valg af dato:\n" + +"- Brug \xab, \xbb knapperne for at vælge Ã¥r\n" + +"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge mÃ¥ned\n" + +"- Hold knappen pÃ¥ musen nede pÃ¥ knapperne ovenfor for hurtigere valg."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Valg af tid:\n" + +"- Klik pÃ¥ en vilkÃ¥rlig del for større værdi\n" + +"- eller Shift-klik for for mindre værdi\n" + +"- eller klik og træk for hurtigere valg."; + +Calendar._TT["TOGGLE"] = "Skift første ugedag"; +Calendar._TT["PREV_YEAR"] = "Ét Ã¥r tilbage (hold for menu)"; +Calendar._TT["PREV_MONTH"] = "Én mÃ¥ned tilbage (hold for menu)"; +Calendar._TT["GO_TODAY"] = "GÃ¥ til i dag"; +Calendar._TT["NEXT_MONTH"] = "Én mÃ¥ned frem (hold for menu)"; +Calendar._TT["NEXT_YEAR"] = "Ét Ã¥r frem (hold for menu)"; +Calendar._TT["SEL_DATE"] = "Vælg dag"; +Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet"; +Calendar._TT["PART_TODAY"] = " (i dag)"; +Calendar._TT["MON_FIRST"] = "Vis mandag først"; +Calendar._TT["SUN_FIRST"] = "Vis søndag først"; +Calendar._TT["CLOSE"] = "Luk vinduet"; +Calendar._TT["TODAY"] = "I dag"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy"; +Calendar._TT["TT_DATE_FORMAT"] = "%d. %b, %Y"; + +Calendar._TT["WK"] = "wk"; diff --git a/jscalendar/lang/calendar-de.js b/jscalendar/lang/calendar-de.js new file mode 100644 index 00000000..6609db55 --- /dev/null +++ b/jscalendar/lang/calendar-de.js @@ -0,0 +1,131 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// Author: Hartwig Weinkauf h_weinkauf@gmx.de +// �erarbeitet und fehlende Texte hinzugefgt von Gerhard Neinert (gerhard at neinert punkt de) +// Feel free to use / redistribute under the GNU LGPL. +// ** I18N + +// short day names +Calendar._SDN = new Array +("So", + "Mo", + "Di", + "Mi", + "Do", + "Fr", + "Sa", + "So"); + +// full day names +Calendar._DN = new Array +("Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag", + "Sonntag"); + +// short day names only use 2 letters instead of 3 +Calendar._SDN_len = 2; + +// full month names +Calendar._MN = new Array +("Januar", + "Februar", + "M\u00e4rz", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "M\u00e4r", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; + + +Calendar._TT["ABOUT"] = +"DHTML Datum/Zeit Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Donwload neueste Version: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Datumsauswahl:\n" + +"- Jahr ausw\u00e4hlen mit \xab und \xbb\n" + +"- Monat ausw\u00e4hlen mit " + String.fromCharCode(0x2039) + " und " + String.fromCharCode(0x203a) + "\n" + +"- Fr Auswahl aus Liste Maustaste gedr\u00fcckt halten."; + +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Zeit w\u00e4hlen:\n" + +"- Stunde/Minute weiter mit Mausklick\n" + +"- Stunde/Minute zurck mit Shift-Mausklick\n" + +"- oder f\u00fcr schnellere Auswahl nach links oder rechts ziehen."; + + +Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen"; +Calendar._TT["PREV_YEAR"] = "Jahr zur\u00fcck (halten -> Auswahlmen\u00fc)"; +Calendar._TT["PREV_MONTH"] = "Monat zur\u00fcck (halten -> Auswahlmen\u00fc)"; +Calendar._TT["GO_TODAY"] = "Gehe zum heutigen Datum"; +Calendar._TT["NEXT_MONTH"] = "Monat vor (halten -> Auswahlmen\u00fc)"; +Calendar._TT["NEXT_YEAR"] = "Jahr vor (halten -> Auswahlmen\u00fc)"; +Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen"; +Calendar._TT["DRAG_TO_MOVE"] = "Klicken und halten um zu verschieben"; +Calendar._TT["PART_TODAY"] = " (heute)"; +Calendar._TT["MON_FIRST"] = "Wochenanzeige mit Montag beginnen"; +Calendar._TT["SUN_FIRST"] = "Wochenanzeige mit Sonntag beginnen"; +Calendar._TT["CLOSE"] = "Schlie\u00dfen"; +Calendar._TT["TODAY"] = "Heute"; +Calendar._TT["WEEKEND"] = "0,6"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + +Calendar._TT["WK"] = "KW"; diff --git a/jscalendar/lang/calendar-du.js b/jscalendar/lang/calendar-du.js new file mode 100644 index 00000000..92d88c61 --- /dev/null +++ b/jscalendar/lang/calendar-du.js @@ -0,0 +1,71 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Zondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag", + "Zondag"); +Calendar._MN = new Array +("Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Toggle startdag van de week"; +Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)"; +Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)"; +Calendar._TT["GO_TODAY"] = "Naar Vandaag"; +Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)"; +Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)"; +Calendar._TT["SEL_DATE"] = "Selecteer datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen"; +Calendar._TT["PART_TODAY"] = " (vandaag)"; +Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; +Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; +Calendar._TT["CLOSE"] = "Sluiten"; +Calendar._TT["TODAY"] = "Vandaag"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e"; + +Calendar._TT["WK"] = "wk"; diff --git a/jscalendar/lang/calendar-el.js b/jscalendar/lang/calendar-el.js new file mode 100644 index 00000000..abb9eb24 --- /dev/null +++ b/jscalendar/lang/calendar-el.js @@ -0,0 +1,117 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Κυριακή", + "Δευτέρα", + "Τρίτη", + "Τετάρτη", + "Πέμπτη", + "Παρασκευή", + "Σάββατο", + "Κυριακή"); + +Calendar._SDN = new Array +("Κυ", + "Δε", + "Tρ", + "Τε", + "Πε", + "Πα", + "Σα", + "Κυ"); + +Calendar._MN = new Array +("Ιανουάριος", + "Φεβρουάριος", + "Μάρτιος", + "Απρίλιος", + "Μάϊος", + "Ιούνιος", + "Ιούλιος", + "Αύγουστος", + "Σεπτέμβριος", + "Οκτώβριος", + "Νοέμβριος", + "Δεκέμβριος"); + +Calendar._SMN = new Array +("Ιαν", + "Φεβ", + "Μαρ", + "Απρ", + "Μαι", + "Ιουν", + "Ιουλ", + "Αυγ", + "Σεπ", + "Οκτ", + "Νοε", + "Δεκ"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Για το ημερολόγιο"; + +Calendar._TT["ABOUT"] = +"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Για τελευταία έκδοση: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Επιλογή ημερομηνίας:\n" + +"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" + +"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" + +"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Επιλογή ώρας:\n" + +"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" + +"- ή Shift-κλικ για μείωση\n" + +"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή."; +Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας"; +Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)"; +Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)"; +Calendar._TT["GO_TODAY"] = "Σήμερα"; +Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)"; +Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)"; +Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία"; +Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε"; +Calendar._TT["PART_TODAY"] = " (σήμερα)"; +Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα"; +Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα"; +Calendar._TT["CLOSE"] = "Κλείσιμο"; +Calendar._TT["TODAY"] = "Σήμερα"; +Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; + +Calendar._TT["WK"] = "εβδ"; + diff --git a/jscalendar/lang/calendar-en.js b/jscalendar/lang/calendar-en.js new file mode 100644 index 00000000..d65c4b3d --- /dev/null +++ b/jscalendar/lang/calendar-en.js @@ -0,0 +1,149 @@ +/* + +Modification information for LGPL compliance + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r24077 - 2007-07-06 14:12:57 -0700 (Fri, 06 Jul 2007) - clee - Updates to match new date + time field conversions. + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Encoding: any +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat", + "Sun"); + +// full month names +Calendar._MN = new Array +("January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "About the calendar"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; +Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; +Calendar._TT["GO_TODAY"] = "Go Today"; +Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; +Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; +Calendar._TT["SEL_DATE"] = "Select date and time"; +Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; +Calendar._TT["PART_TODAY"] = " (today)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "Display %s first"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Close"; +Calendar._TT["TODAY"] = "Today"; +//Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; +Calendar._TT["TIME_PART"] = "Drag mouse or use arrows to change"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + +Calendar._TT["WK"] = "wk"; +Calendar._TT["TIME"] = "Time:"; diff --git a/jscalendar/lang/calendar-es.js b/jscalendar/lang/calendar-es.js new file mode 100644 index 00000000..0c984159 --- /dev/null +++ b/jscalendar/lang/calendar-es.js @@ -0,0 +1,160 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r27707 - 2007-10-05 15:43:08 -0700 (Fri, 05 Oct 2007) - julian - Fix for bug #13415: jscalendar Spanish translation incorrect (CONTRIBUTED CODE) + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar ES (spanish) language +// Author: Mihai Bazon, +// Updater: Servilio Afre Puentes +// Update: Alberto Serrano +// Updated: 2006-10-16 +// Encoding: utf-8 +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Domingo", + "Lunes", + "Martes", + "Miércoles", + "Jueves", + "Viernes", + "Sábado", + "Domingo"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Dom", + "Lun", + "Mar", + "Mié", + "Jue", + "Vie", + "Sáb", + "Dom"); + +// First day of the week. "0" means display Sunday first, "1" means display +// Monday first, etc. +Calendar._FD = 1; + +// full month names +Calendar._MN = new Array +("Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre"); + +// short month names +Calendar._SMN = new Array +("Ene", + "Feb", + "Mar", + "Abr", + "May", + "Jun", + "Jul", + "Ago", + "Sep", + "Oct", + "Nov", + "Dic"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Acerca del calendario"; + +Calendar._TT["ABOUT"] = +"Selector DHTML de Fecha/Hora\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"Para conseguir la última versión visite: http://www.dynarch.com/projects/calendar/\n" + +"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para más detalles." + +"\n\n" + +"Selección de fecha:\n" + +"- Use los botones \xab, \xbb para seleccionar el a?o\n" + +"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + +"- Mantenga pulsado el ratón en cualquiera de estos botones para una selección rápida."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Selección de hora:\n" + +"- Pulse en cualquiera de las partes de la hora para incrementarla\n" + +"- o pulse las mayúsculas mientras hace clic para decrementarla\n" + +"- o haga clic y arrastre el ratón para una selección más rápida."; + +Calendar._TT["PREV_YEAR"] = "A?o anterior (mantener para menú)"; +Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para menú)"; +Calendar._TT["GO_TODAY"] = "Ir a hoy"; +Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para menú)"; +Calendar._TT["NEXT_YEAR"] = "A?o siguiente (mantener para menú)"; +Calendar._TT["SEL_DATE"] = "Seleccionar fecha"; +Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover"; +Calendar._TT["PART_TODAY"] = " (hoy)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "Hacer %s primer día de la semana"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Cerrar"; +Calendar._TT["TODAY"] = "Hoy"; +Calendar._TT["TIME_PART"] = "(Mayúscula-)Clic o arrastre para cambiar valor"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; + +Calendar._TT["WK"] = "sem"; +Calendar._TT["TIME"] = "Hora:"; \ No newline at end of file diff --git a/jscalendar/lang/calendar-fi.js b/jscalendar/lang/calendar-fi.js new file mode 100644 index 00000000..c09b4430 --- /dev/null +++ b/jscalendar/lang/calendar-fi.js @@ -0,0 +1,126 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar FI language (Finnish, Suomi) +// Author: Jarno Käyhkö, +// Encoding: UTF-8 +// Distributed under the same terms as the calendar itself. + +// full day names +Calendar._DN = new Array +("Sunnuntai", + "Maanantai", + "Tiistai", + "Keskiviikko", + "Torstai", + "Perjantai", + "Lauantai", + "Sunnuntai"); + +// short day names +Calendar._SDN = new Array +("Su", + "Ma", + "Ti", + "Ke", + "To", + "Pe", + "La", + "Su"); + +// full month names +Calendar._MN = new Array +("Tammikuu", + "Helmikuu", + "Maaliskuu", + "Huhtikuu", + "Toukokuu", + "Kesäkuu", + "Heinäkuu", + "Elokuu", + "Syyskuu", + "Lokakuu", + "Marraskuu", + "Joulukuu"); + +// short month names +Calendar._SMN = new Array +("Tam", + "Hel", + "Maa", + "Huh", + "Tou", + "Kes", + "Hei", + "Elo", + "Syy", + "Lok", + "Mar", + "Jou"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Tietoja kalenterista"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Uusin versio osoitteessa: http://dynarch.com/mishoo/calendar.epl\n" + +"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" + +"\n\n" + +"Päivämäärä valinta:\n" + +"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" + +"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" + +"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Ajan valinta:\n" + +"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" + +"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" + +"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin."; + +Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)"; +Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)"; +Calendar._TT["GO_TODAY"] = "Siirry tähän päivään"; +Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)"; +Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)"; +Calendar._TT["SEL_DATE"] = "Valitse päivämäärä"; +Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa"; +Calendar._TT["PART_TODAY"] = " (tänään)"; +Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä"; +Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä"; +Calendar._TT["CLOSE"] = "Sulje"; +Calendar._TT["TODAY"] = "Tänään"; +Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y"; + +Calendar._TT["WK"] = "Vko"; diff --git a/jscalendar/lang/calendar-fr.js b/jscalendar/lang/calendar-fr.js new file mode 100644 index 00000000..7bef051c --- /dev/null +++ b/jscalendar/lang/calendar-fr.js @@ -0,0 +1,152 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r30416 - 2007-12-12 16:11:11 -0800 (Wed, 12 Dec 2007) - max - Updated french calendar language pack from Synolia. + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Dimanche", + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi", + "Dimanche"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Dim", + "Lun", + "Mar", + "Mer", + "Jeu", + "Ven", + "Sam", + "Dim"); + +// First day of the week. "0" means display Sunday first, "1" means display +// Monday first, etc. +Calendar._FD = 1; + +// full month names +Calendar._MN = new Array +("Janvier", + "Février", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Août", + "Septembre", + "Octobre", + "Novembre", + "Décembre"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Fév", + "Mar", + "Avr", + "Mai", + "Juin", + "Juil", + "Août", + "Sep", + "Oct", + "Nov", + "Déc"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "A propos du calendrier"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Heure Selecteur\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this ;-) +"Pour la derniere version visitez: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribue par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." + +"\n\n" + +"Selection de la date :\n" + +"- Utiliser les boutons \xab, \xbb pour sélectionner l\'année\n" + +"- Utiliser les boutons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" + +"- Garder la souris sur n'importe quel bouton pour une sélection plus rapide"; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Sélection de l\'heure:\n" + +"- Cliquer sur heures ou minutes pour incrémenter\n" + +"- ou Maj-clic pour décrémenter\n" + +"- ou clic et glisser déplacer pour une sélection plus rapide"; + +Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)"; +Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)"; +Calendar._TT["GO_TODAY"] = "Atteindre date du jour"; +Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; +Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)"; +Calendar._TT["SEL_DATE"] = "Choisir une date"; +Calendar._TT["DRAG_TO_MOVE"] = "Déplacer"; +Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "%s en premier"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Fermer"; +Calendar._TT["TODAY"] = "Aujourd'hui"; +Calendar._TT["TIME_PART"] = "(Shift-)Click ou deplacer pour changer la valeur"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%y"; +Calendar._TT["TT_DATE_FORMAT"] = " %A %e %B %Y"; + +Calendar._TT["WK"] = "sem"; +Calendar._TT["TIME"] = "Heure:"; diff --git a/jscalendar/lang/calendar-hr-utf8.js b/jscalendar/lang/calendar-hr-utf8.js new file mode 100644 index 00000000..786b066d --- /dev/null +++ b/jscalendar/lang/calendar-hr-utf8.js @@ -0,0 +1,75 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +/* Croatian language file for the DHTML Calendar version 0.9.2 +* Author Krunoslav Zubrinic , June 2003. +* Feel free to use this script under the terms of the GNU Lesser General +* Public License, as long as you do not remove or alter this notice. +*/ +Calendar._DN = new Array +("Nedjelja", + "Ponedjeljak", + "Utorak", + "Srijeda", + "Četvrtak", + "Petak", + "Subota", + "Nedjelja"); +Calendar._MN = new Array +("Siječanj", + "Veljača", + "Ožujak", + "Travanj", + "Svibanj", + "Lipanj", + "Srpanj", + "Kolovoz", + "Rujan", + "Listopad", + "Studeni", + "Prosinac"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan"; +Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; +Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; +Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; +Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; +Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; +Calendar._TT["SEL_DATE"] = "Izaberite datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; +Calendar._TT["PART_TODAY"] = " (today)"; +Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; +Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; +Calendar._TT["CLOSE"] = "Zatvori"; +Calendar._TT["TODAY"] = "Danas"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %d.%m.%Y"; + +Calendar._TT["WK"] = "Tje"; diff --git a/jscalendar/lang/calendar-hr.js b/jscalendar/lang/calendar-hr.js new file mode 100644 index 00000000..29ecca87 --- /dev/null +++ b/jscalendar/lang/calendar-hr.js @@ -0,0 +1,77 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +/* Croatian language file for the DHTML Calendar version 0.9.2 +* Author Krunoslav Zubrinic , June 2003. +* Feel free to use this script under the terms of the GNU Lesser General +* Public License, as long as you do not remove or alter this notice. +*/ +Calendar._DN = new Array +("Nedjelja", + "Ponedjeljak", + "Utorak", + "Srijeda", + "Četvrtak", + "Petak", + "Subota", + "Nedjelja"); +Calendar._MN = new Array +("Siječanj", + "Veljača", + "Ožujak", + "Travanj", + "Svibanj", + "Lipanj", + "Srpanj", + "Kolovoz", + "Rujan", + "Listopad", + "Studeni", + "Prosinac"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan"; +Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; +Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; +Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; +Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; +Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; +Calendar._TT["SEL_DATE"] = "Izaberite datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; +Calendar._TT["PART_TODAY"] = " (today)"; +Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; +Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; +Calendar._TT["CLOSE"] = "Zatvori"; +Calendar._TT["TODAY"] = "Danas"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %d.%m.%Y"; + +Calendar._TT["WK"] = "Tje"; diff --git a/jscalendar/lang/calendar-hu.js b/jscalendar/lang/calendar-hu.js new file mode 100644 index 00000000..6843d5aa --- /dev/null +++ b/jscalendar/lang/calendar-hu.js @@ -0,0 +1,73 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Vasárnap", + "Hétfõ", + "Kedd", + "Szerda", + "Csütörtök", + "Péntek", + "Szombat", + "Vasárnap"); +Calendar._MN = new Array +("január", + "február", + "március", + "április", + "május", + "június", + "július", + "augusztus", + "szeptember", + "október", + "november", + "december"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "A hét elsõ napjának beállítása"; +Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)"; +Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)"; +Calendar._TT["GO_TODAY"] = "Mai napra ugrás"; +Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)"; +Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)"; +Calendar._TT["SEL_DATE"] = "Válasszon dátumot"; +Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz"; +Calendar._TT["PART_TODAY"] = " (ma)"; +Calendar._TT["MON_FIRST"] = "Hétfõ legyen a hét elsõ napja"; +Calendar._TT["SUN_FIRST"] = "Vasárnap legyen a hét elsõ napja"; +Calendar._TT["CLOSE"] = "Bezár"; +Calendar._TT["TODAY"] = "Ma"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; +Calendar._TT["TT_DATE_FORMAT"] = "%B %e, %A"; + +Calendar._TT["WK"] = "hét"; diff --git a/jscalendar/lang/calendar-it.js b/jscalendar/lang/calendar-it.js new file mode 100644 index 00000000..975e63ef --- /dev/null +++ b/jscalendar/lang/calendar-it.js @@ -0,0 +1,110 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Domenica", + "Lunedì", + "Martedì", + "Mercoledì", + "Giovedì", + "Venerdì", + "Sabato", + "Domenica"); +Calendar._MN = new Array +("Gennaio", + "Febbraio", + "Marzo", + "Aprile", + "Maggio", + "Giugno", + "Luglio", + "Agosto", + "Settembre", + "Ottobre", + "Novembre", + "Dicembre"); + +// short month names +Calendar._SMN = new Array +("Gen", + "Feb", + "Mar", + "Apr", + "Mag", + "Giu", + "Lug", + "Ago", + "Set", + "Ott", + "Nov", + "Dic"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "a proposito del calendario"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Per le ultime versioni vai a: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribuito su licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." + +"\n\n" + +"selezione della data:\n" + +"- Usa i bottoni \xab, \xbb per selezionare l'anno\n" + +"- Usa i bottoni " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per selezionare il mese\n" + +"- Utilizza il mouse per una selezione rapida."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"selezione dell'ora:\n" + +"- Clicca sull'ora visualizzata per aumentarla\n" + +"- o Shift-click per diminuirla\n" + +"- o click a trascina per la selezione rapida."; + + +Calendar._TT["TOGGLE"] = "Modifica il primo giorno della settimana"; +Calendar._TT["PREV_YEAR"] = "Anno prec. (tieni premuto per menu)"; +Calendar._TT["PREV_MONTH"] = "Mese prec. (tieni premuto per menu)"; +Calendar._TT["GO_TODAY"] = "Vai a oggi"; +Calendar._TT["NEXT_MONTH"] = "Mese succ. (tieni premuto per menu)"; +Calendar._TT["NEXT_YEAR"] = "Anno succ. (tieni premuto per menu)"; +Calendar._TT["SEL_DATE"] = "Seleziona data"; +Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostare"; +Calendar._TT["PART_TODAY"] = " (oggi)"; +Calendar._TT["MON_FIRST"] = "Parti da lunedì"; +Calendar._TT["SUN_FIRST"] = "Parti da domenica"; +Calendar._TT["CLOSE"] = "Chiudi"; +Calendar._TT["TODAY"] = "Oggi"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b "; + +Calendar._TT["WK"] = "Setti"; diff --git a/jscalendar/lang/calendar-ja.js b/jscalendar/lang/calendar-ja.js new file mode 100644 index 00000000..33403b59 --- /dev/null +++ b/jscalendar/lang/calendar-ja.js @@ -0,0 +1,114 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + + +*/ + +// ** I18N +Calendar._DN = new Array +("日曜日", + "月曜日", + "火曜日", + "水曜日", + "木曜日", + "金曜日", + "土曜日", + "日曜日"); + +// short day names +Calendar._SDN = new Array +("日", + "月", + "火", + "æ°´", + "木", + "金", + "土", + "日"); + + +Calendar._MN = new Array +("1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月"); +// short month names +Calendar._SMN = new Array +("1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月"); + +// tooltips + +Calendar._TT["INFO"] = "カレンダーについて"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = "前年"; +Calendar._TT["PREV_MONTH"] = "前月"; +Calendar._TT["GO_TODAY"] = "今日へ"; +Calendar._TT["NEXT_MONTH"] = "翌月"; +Calendar._TT["NEXT_YEAR"] = "翌年"; +Calendar._TT["SEL_DATE"] = "日付選択"; +Calendar._TT["DRAG_TO_MOVE"] = "ウィンドウの移動"; +Calendar._TT["PART_TODAY"] = " (今日)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "%sを最初に表示"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "閉じる"; +Calendar._TT["TODAY"] = "今日"; +Calendar._TT["TIME_PART"] = "(Shift-)クリックかドラッグで変更"; + +// date formats +//Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +//Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; +Calendar._TT["TT_DATE_FORMAT"] = "%b %e日 %a曜日"; + +Calendar._TT["WK"] = "週"; +Calendar._TT["TIME"] = "時間:"; diff --git a/jscalendar/lang/calendar-jp.js b/jscalendar/lang/calendar-jp.js new file mode 100644 index 00000000..d49a4aa9 --- /dev/null +++ b/jscalendar/lang/calendar-jp.js @@ -0,0 +1,134 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r13449 - 2006-05-24 14:08:37 -0700 (Wed, 24 May 2006) - chris - Bug 5447: i18n fix for JScalendar +Touched: +jscalendar/lang/calendar-jp.js + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("日曜日", + "月曜日", + "火曜日", + "水曜日", + "木曜日", + "金曜日", + "土曜日", + "日曜日"); + +// short day names +Calendar._SDN = new Array +("日", + "月", + "火", + "æ°´", + "木", + "金", + "土", + "日"); + + +Calendar._MN = new Array +("1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月"); +// short month names +Calendar._SMN = new Array +("1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "カレンダーについて"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = "前年"; +Calendar._TT["PREV_MONTH"] = "前月"; +Calendar._TT["GO_TODAY"] = "今日へ"; +Calendar._TT["NEXT_MONTH"] = "翌月"; +Calendar._TT["NEXT_YEAR"] = "翌年"; +Calendar._TT["SEL_DATE"] = "日付選択"; +Calendar._TT["DRAG_TO_MOVE"] = "ウィンドウの移動"; +Calendar._TT["PART_TODAY"] = " (今日)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "%sを最初に表示"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "閉じる"; +Calendar._TT["TODAY"] = "今日"; +Calendar._TT["TIME_PART"] = "(Shift-)クリックかドラッグで変更"; + +// date formats +//Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +//Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; +Calendar._TT["TT_DATE_FORMAT"] = "%b %e日 %a曜日"; + +Calendar._TT["WK"] = "週"; +Calendar._TT["TIME"] = "時間:"; diff --git a/jscalendar/lang/calendar-ko-utf8.js b/jscalendar/lang/calendar-ko-utf8.js new file mode 100644 index 00000000..26d05923 --- /dev/null +++ b/jscalendar/lang/calendar-ko-utf8.js @@ -0,0 +1,146 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Translation: Yourim Yi +// Encoding: EUC-KR +// lang : ko +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names + +Calendar._DN = new Array +("일요일", + "월요일", + "화요일", + "수요일", + "목요일", + "금요일", + "토요일", + "일요일"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("일", + "월", + "화", + "수", + "목", + "금", + "토", + "일"); + +// full month names +Calendar._MN = new Array +("1월", + "2월", + "3월", + "4월", + "5월", + "6월", + "7월", + "8월", + "9월", + "10월", + "11월", + "12월"); + +// short month names +Calendar._SMN = new Array +("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "calendar 에 대해서"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"\n"+ +"최신 버전을 받으시려면 http://dynarch.com/mishoo/calendar.epl 에 방문하세요\n" + +"\n"+ +"GNU LGPL 라이센스로 배포됩니다. \n"+ +"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." + +"\n\n" + +"날짜 선택:\n" + +"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" + +"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" + +"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"시간 선택:\n" + +"- 마우스로 누르면 시간이 증가합니다\n" + +"- Shift 키와 함께 누르면 감소합니다\n" + +"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n"; + +Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)"; +Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)"; +Calendar._TT["GO_TODAY"] = "오늘 날짜로"; +Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)"; +Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)"; +Calendar._TT["SEL_DATE"] = "날짜를 선택하세요"; +Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요"; +Calendar._TT["PART_TODAY"] = " (오늘)"; +Calendar._TT["MON_FIRST"] = "월요일을 한 주의 시작 요일로"; +Calendar._TT["SUN_FIRST"] = "일요일을 한 주의 시작 요일로"; +Calendar._TT["CLOSE"] = "닫기"; +Calendar._TT["TODAY"] = "오늘"; +Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; + +Calendar._TT["WK"] = "주"; diff --git a/jscalendar/lang/calendar-ko.js b/jscalendar/lang/calendar-ko.js new file mode 100644 index 00000000..f612e7a4 --- /dev/null +++ b/jscalendar/lang/calendar-ko.js @@ -0,0 +1,148 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Translation: Yourim Yi +// Encoding: UTF-8 +// lang : ko +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names + +Calendar._DN = new Array +("일요일", + "월요일", + "화요일", + "수요일", + "목요일", + "금요일", + "토요일", + "일요일"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("일", + "월", + "화", + "수", + "목", + "금", + "토", + "일"); + +// full month names +Calendar._MN = new Array +("1월", + "2월", + "3월", + "4월", + "5월", + "6월", + "7월", + "8월", + "9월", + "10월", + "11월", + "12월"); + +// short month names +Calendar._SMN = new Array +("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "calendar 에 대해서"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"\n"+ +"최신 버전을 받으시려면 http://dynarch.com/mishoo/calendar.epl 에 방문하세요\n" + +"\n"+ +"GNU LGPL 라이센스로 배포됩니다. \n"+ +"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." + +"\n\n" + +"날짜 선택:\n" + +"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" + +"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" + +"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"시간 선택:\n" + +"- 마우스로 누르면 시간이 증가합니다\n" + +"- Shift 키와 함께 누르면 감소합니다\n" + +"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n"; + +Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)"; +Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)"; +Calendar._TT["GO_TODAY"] = "오늘 날짜로"; +Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)"; +Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)"; +Calendar._TT["SEL_DATE"] = "날짜를 선택하세요"; +Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요"; +Calendar._TT["PART_TODAY"] = " (오늘)"; +Calendar._TT["MON_FIRST"] = "월요일을 한 주의 시작 요일로"; +Calendar._TT["SUN_FIRST"] = "일요일을 한 주의 시작 요일로"; +Calendar._TT["CLOSE"] = "닫기"; +Calendar._TT["TODAY"] = "오늘"; +Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; + +Calendar._TT["WK"] = "주"; diff --git a/jscalendar/lang/calendar-lt-utf8.js b/jscalendar/lang/calendar-lt-utf8.js new file mode 100644 index 00000000..fa2f9c59 --- /dev/null +++ b/jscalendar/lang/calendar-lt-utf8.js @@ -0,0 +1,140 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar LT language +// Author: Martynas Majeris, +// Encoding: UTF-8 +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Sekmadienis", + "Pirmadienis", + "Antradienis", + "Trečiadienis", + "Ketvirtadienis", + "Pentadienis", + "Å eÅ¡tadienis", + "Sekmadienis"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Sek", + "Pir", + "Ant", + "Tre", + "Ket", + "Pen", + "Å eÅ¡", + "Sek"); + +// full month names +Calendar._MN = new Array +("Sausis", + "Vasaris", + "Kovas", + "Balandis", + "Gegužė", + "Birželis", + "Liepa", + "RugpjÅ«tis", + "Rugsėjis", + "Spalis", + "Lapkritis", + "Gruodis"); + +// short month names +Calendar._SMN = new Array +("Sau", + "Vas", + "Kov", + "Bal", + "Geg", + "Bir", + "Lie", + "Rgp", + "Rgs", + "Spa", + "Lap", + "Gru"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Apie kalendorių"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Naujausią versiją rasite: http://dynarch.com/mishoo/calendar.epl\n" + +"Platinamas pagal GNU LGPL licenciją. Aplankykite http://gnu.org/licenses/lgpl.html" + +"\n\n" + +"Datos pasirinkimas:\n" + +"- Metų pasirinkimas: \xab, \xbb\n" + +"- Mėnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + +"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Laiko pasirinkimas:\n" + +"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" + +"- Jei spausite kartu su Shift, skaičius sumažės.\n" + +"- Greitam pasirinkimui spustelkite ir pajudinkite pelę."; + +Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; +Calendar._TT["PREV_MONTH"] = "Ankstesnis mėnuo (laikykite, jei norite meniu)"; +Calendar._TT["GO_TODAY"] = "Pasirinkti Å¡iandieną"; +Calendar._TT["NEXT_MONTH"] = "Kitas mėnuo (laikykite, jei norite meniu)"; +Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; +Calendar._TT["SEL_DATE"] = "Pasirinkite datą"; +Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; +Calendar._TT["PART_TODAY"] = " (Å¡iandien)"; +Calendar._TT["MON_FIRST"] = "Pirma savaitės diena - pirmadienis"; +Calendar._TT["SUN_FIRST"] = "Pirma savaitės diena - sekmadienis"; +Calendar._TT["CLOSE"] = "Uždaryti"; +Calendar._TT["TODAY"] = "Å iandien"; +Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; + +Calendar._TT["WK"] = "sav"; diff --git a/jscalendar/lang/calendar-lt.js b/jscalendar/lang/calendar-lt.js new file mode 100644 index 00000000..c28883a7 --- /dev/null +++ b/jscalendar/lang/calendar-lt.js @@ -0,0 +1,142 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar LT language +// Author: Martynas Majeris, +// Encoding: UTF-8 +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Sekmadienis", + "Pirmadienis", + "Antradienis", + "Trečiadienis", + "Ketvirtadienis", + "Pentadienis", + "Å eÅ¡tadienis", + "Sekmadienis"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Sek", + "Pir", + "Ant", + "Tre", + "Ket", + "Pen", + "Å eÅ¡", + "Sek"); + +// full month names +Calendar._MN = new Array +("Sausis", + "Vasaris", + "Kovas", + "Balandis", + "Gegužė", + "Birželis", + "Liepa", + "RugpjÅ«tis", + "Rugsėjis", + "Spalis", + "Lapkritis", + "Gruodis"); + +// short month names +Calendar._SMN = new Array +("Sau", + "Vas", + "Kov", + "Bal", + "Geg", + "Bir", + "Lie", + "Rgp", + "Rgs", + "Spa", + "Lap", + "Gru"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Apie kalendorių"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Naujausią versiją rasite: http://dynarch.com/mishoo/calendar.epl\n" + +"Platinamas pagal GNU LGPL licenciją. Aplankykite http://gnu.org/licenses/lgpl.html" + +"\n\n" + +"Datos pasirinkimas:\n" + +"- Metų pasirinkimas: \xab, \xbb\n" + +"- Mėnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + +"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Laiko pasirinkimas:\n" + +"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" + +"- Jei spausite kartu su Shift, skaičius sumažės.\n" + +"- Greitam pasirinkimui spustelkite ir pajudinkite pelę."; + +Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; +Calendar._TT["PREV_MONTH"] = "Ankstesnis mėnuo (laikykite, jei norite meniu)"; +Calendar._TT["GO_TODAY"] = "Pasirinkti Å¡iandieną"; +Calendar._TT["NEXT_MONTH"] = "Kitas mėnuo (laikykite, jei norite meniu)"; +Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; +Calendar._TT["SEL_DATE"] = "Pasirinkite datą"; +Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; +Calendar._TT["PART_TODAY"] = " (Å¡iandien)"; +Calendar._TT["MON_FIRST"] = "Pirma savaitės diena - pirmadienis"; +Calendar._TT["SUN_FIRST"] = "Pirma savaitės diena - sekmadienis"; +Calendar._TT["CLOSE"] = "Uždaryti"; +Calendar._TT["TODAY"] = "Å iandien"; +Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; + +Calendar._TT["WK"] = "sav"; diff --git a/jscalendar/lang/calendar-nl.js b/jscalendar/lang/calendar-nl.js new file mode 100644 index 00000000..c7856eef --- /dev/null +++ b/jscalendar/lang/calendar-nl.js @@ -0,0 +1,71 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Zondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag", + "Zondag"); +Calendar._MN = new Array +("Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; +Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; +Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; +Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; +Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; +Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; +Calendar._TT["SEL_DATE"] = "Selecteer datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; +Calendar._TT["PART_TODAY"] = " (vandaag)"; +Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; +Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; +Calendar._TT["CLOSE"] = "Sluiten"; +Calendar._TT["TODAY"] = "Vandaag"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; + +Calendar._TT["WK"] = "wk"; diff --git a/jscalendar/lang/calendar-no.js b/jscalendar/lang/calendar-no.js new file mode 100644 index 00000000..328b3dee --- /dev/null +++ b/jscalendar/lang/calendar-no.js @@ -0,0 +1,73 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag", + "Søndag"); +Calendar._MN = new Array +("Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Skift første ukedag"; +Calendar._TT["PREV_YEAR"] = "Et Ã¥r tilbake (hold for meny)"; +Calendar._TT["PREV_MONTH"] = "En mÃ¥ned tilbake (hold for meny)"; +Calendar._TT["GO_TODAY"] = "GÃ¥ til i dag"; +Calendar._TT["NEXT_MONTH"] = "En mÃ¥ned fram (hold for meny)"; +Calendar._TT["NEXT_YEAR"] = "Et Ã¥r fram (hold for meny)"; +Calendar._TT["SEL_DATE"] = "Velg dag"; +Calendar._TT["DRAG_TO_MOVE"] = "Dra vinduet"; +Calendar._TT["PART_TODAY"] = " (i dag)"; +Calendar._TT["MON_FIRST"] = "Vis mandag først"; +Calendar._TT["SUN_FIRST"] = "Vis søndag først"; +Calendar._TT["CLOSE"] = "Lukk vinduet"; +Calendar._TT["TODAY"] = "I dag"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; +Calendar._TT["TT_DATE_FORMAT"] = "%A %e. %B, %Y"; + +Calendar._TT["WK"] = "wk"; diff --git a/jscalendar/lang/calendar-pl-utf8.js b/jscalendar/lang/calendar-pl-utf8.js new file mode 100644 index 00000000..8c6d6881 --- /dev/null +++ b/jscalendar/lang/calendar-pl-utf8.js @@ -0,0 +1,119 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar PL language +// Author: Dariusz Pietrzak, +// Author: Janusz Piwowarski, +// Encoding: utf-8 +// Distributed under the same terms as the calendar itself. + +Calendar._DN = new Array +("Niedziela", + "Poniedziałek", + "Wtorek", + "Środa", + "Czwartek", + "Piątek", + "Sobota", + "Niedziela"); +Calendar._SDN = new Array +("Nie", + "Pn", + "Wt", + "Śr", + "Cz", + "Pt", + "So", + "Nie"); +Calendar._MN = new Array +("Styczeń", + "Luty", + "Marzec", + "Kwiecień", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpień", + "Wrzesień", + "Październik", + "Listopad", + "Grudzień"); +Calendar._SMN = new Array +("Sty", + "Lut", + "Mar", + "Kwi", + "Maj", + "Cze", + "Lip", + "Sie", + "Wrz", + "Paź", + "Lis", + "Gru"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "O kalendarzu"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Aby pobrać najnowszą wersję, odwiedź: http://dynarch.com/mishoo/calendar.epl\n" + +"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." + +"\n\n" + +"Wybór daty:\n" + +"- Użyj przycisków \xab, \xbb by wybrać rok\n" + +"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiąc\n" + +"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Wybór czasu:\n" + +"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n" + +"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n" + +"- lub kliknij i przeciągnij dla szybszego wyboru."; + +//Calendar._TT["TOGGLE"] = "Zmień pierwszy dzień tygodnia"; +Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)"; +Calendar._TT["PREV_MONTH"] = "Poprzedni miesiąc (przytrzymaj dla menu)"; +Calendar._TT["GO_TODAY"] = "Idź do dzisiaj"; +Calendar._TT["NEXT_MONTH"] = "Następny miesiąc (przytrzymaj dla menu)"; +Calendar._TT["NEXT_YEAR"] = "Następny rok (przytrzymaj dla menu)"; +Calendar._TT["SEL_DATE"] = "Wybierz datę"; +Calendar._TT["DRAG_TO_MOVE"] = "Przeciągnij by przesunąć"; +Calendar._TT["PART_TODAY"] = " (dzisiaj)"; +Calendar._TT["MON_FIRST"] = "Wyświetl poniedziałek jako pierwszy"; +Calendar._TT["SUN_FIRST"] = "Wyświetl niedzielę jako pierwszą"; +Calendar._TT["CLOSE"] = "Zamknij"; +Calendar._TT["TODAY"] = "Dzisiaj"; +Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciągnij by zmienić wartość"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A"; + +Calendar._TT["WK"] = "ty"; diff --git a/jscalendar/lang/calendar-pl.js b/jscalendar/lang/calendar-pl.js new file mode 100644 index 00000000..2ae44485 --- /dev/null +++ b/jscalendar/lang/calendar-pl.js @@ -0,0 +1,82 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +// Calendar PL language +// Author: Artur Filipiak, +// January, 2004 +// Encoding: UTF-8 +Calendar._DN = new Array +("Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"); + +Calendar._SDN = new Array +("N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"); + +Calendar._MN = new Array +("Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"); + +Calendar._SMN = new Array +("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "O kalendarzu"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Wybór daty:\n" + +"- aby wybrać rok użyj przycisków \xab, \xbb\n" + +"- aby wybrać miesiąc użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + +"- aby przyspieszyć wybór przytrzymaj wciśnięty przycisk myszy nad ww. przyciskami."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Wybór czasu:\n" + +"- aby zwiększyć wartość kliknij na dowolnym elemencie selekcji czasu\n" + +"- aby zmniejszyć wartość użyj dodatkowo klawisza Shift\n" + +"- możesz również poruszać myszkę w lewo i prawo wraz z wciśniętym lewym klawiszem."; + +Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)"; +Calendar._TT["PREV_MONTH"] = "Poprz. miesiąc (przytrzymaj dla menu)"; +Calendar._TT["GO_TODAY"] = "Pokaż dziś"; +Calendar._TT["NEXT_MONTH"] = "Nast. miesiąc (przytrzymaj dla menu)"; +Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)"; +Calendar._TT["SEL_DATE"] = "Wybierz datę"; +Calendar._TT["DRAG_TO_MOVE"] = "Przesuń okienko"; +Calendar._TT["PART_TODAY"] = " (dziś)"; +Calendar._TT["MON_FIRST"] = "Pokaż Poniedziałek jako pierwszy"; +Calendar._TT["SUN_FIRST"] = "Pokaż Niedzielę jako pierwszą"; +Calendar._TT["CLOSE"] = "Zamknij"; +Calendar._TT["TODAY"] = "Dziś"; +Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmienić wartość"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + +Calendar._TT["WK"] = "wk"; \ No newline at end of file diff --git a/jscalendar/lang/calendar-pt.js b/jscalendar/lang/calendar-pt.js new file mode 100644 index 00000000..7adaf869 --- /dev/null +++ b/jscalendar/lang/calendar-pt.js @@ -0,0 +1,76 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado", + "Domingo"); +Calendar._MN = new Array +("Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Trocar o primeiro dia da semana"; +Calendar._TT["PREV_YEAR"] = "Ano Anterior (mantenha para menu)"; +Calendar._TT["PREV_MONTH"] = "Mês Anterior (mantenha para menu)"; +Calendar._TT["GO_TODAY"] = "Ir para hoje"; +Calendar._TT["NEXT_MONTH"] = "Próximo Mês (mantenha para menu)"; +Calendar._TT["NEXT_YEAR"] = "Próximo Ano (mantenha para menu)"; +Calendar._TT["SEL_DATE"] = "Escolha Data"; +Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover"; +Calendar._TT["PART_TODAY"] = " (hoje)"; +Calendar._TT["MON_FIRST"] = "Mostrar Segunda primeiro"; +Calendar._TT["SUN_FIRST"] = "Mostrar Domingo primeiro"; +Calendar._TT["CLOSE"] = "Fechar"; +Calendar._TT["TODAY"] = "Hoje"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "a-mm-dd"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e"; + +Calendar._TT["WK"] = "sm"; diff --git a/jscalendar/lang/calendar-ro.js b/jscalendar/lang/calendar-ro.js new file mode 100644 index 00000000..0aad7889 --- /dev/null +++ b/jscalendar/lang/calendar-ro.js @@ -0,0 +1,92 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Duminică", + "Luni", + "MarÅ£i", + "Miercuri", + "Joi", + "Vineri", + "Sâmbătă", + "Duminică"); +Calendar._SDN_len = 2; +Calendar._MN = new Array +("Ianuarie", + "Februarie", + "Martie", + "Aprilie", + "Mai", + "Iunie", + "Iulie", + "August", + "Septembrie", + "Octombrie", + "Noiembrie", + "Decembrie"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; + +Calendar._TT["INFO"] = "Despre calendar"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Pentru ultima versiune vizitaÅ£i: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"SelecÅ£ia datei:\n" + +"- FolosiÅ£i butoanele \xab, \xbb pentru a selecta anul\n" + +"- FolosiÅ£i butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" + +"- TineÅ£i butonul mouse-ului apăsat pentru selecÅ£ie mai rapidă."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"SelecÅ£ia orei:\n" + +"- Click pe ora sau minut pentru a mări valoarea cu 1\n" + +"- Sau Shift-Click pentru a micşora valoarea cu 1\n" + +"- Sau Click şi drag pentru a selecta mai repede."; + +Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; +Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)"; +Calendar._TT["GO_TODAY"] = "Data de azi"; +Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)"; +Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)"; +Calendar._TT["SEL_DATE"] = "Selectează data"; +Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a mişca"; +Calendar._TT["PART_TODAY"] = " (astăzi)"; +Calendar._TT["DAY_FIRST"] = "Afişează %s prima zi"; +Calendar._TT["WEEKEND"] = "0,6"; +Calendar._TT["CLOSE"] = "Închide"; +Calendar._TT["TODAY"] = "Astăzi"; +Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; + +Calendar._TT["WK"] = "spt"; +Calendar._TT["TIME"] = "Ora:"; diff --git a/jscalendar/lang/calendar-ru.js b/jscalendar/lang/calendar-ru.js new file mode 100644 index 00000000..7e9d1cbe --- /dev/null +++ b/jscalendar/lang/calendar-ru.js @@ -0,0 +1,101 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r58354 - 2010-09-29 14:39:04 -0700 (Wed, 29 Sep 2010) - kjing - Author: Majed Itani + fixes issues where language pack calendars were not compatible + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Воскресенье", + "Понедельник", + "Вторник", + "Среда", + "Четверг", + "Пятница", + "Суббота", + "Воскресенье"); +Calendar._SDN = new Array +("Вс", + "Пн", + "Вт", + "Ср", + "Чт", + "Пт", + "Сб", + "Вс"); +Calendar._SDN_len = 2; + +Calendar._MN = new Array +("Январь", + "Февраль", + "Март", + "Апрель", + "Май", + "Июнь", + "Июль", + "Август", + "Сентябрь", + "Октябрь", + "Ноябрь", + "Декабрь"); +Calendar._SMN = new Array +("Янв", + "Фев", + "Мар", + "Апр", + "Мая", + "Июн", + "Июл", + "Авг", + "Сен", + "Окт", + "Ноя", + "Дек"); + +// tooltips +if(Calendar._TT == undefined) if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Сменить день начала недели (ПН/ВС)"; +Calendar._TT["PREV_YEAR"] = "Пред. год (удерживать для меню)"; +Calendar._TT["PREV_MONTH"] = "Пред. месяц (удерживать для меню)"; +Calendar._TT["GO_TODAY"] = "На сегодня"; +Calendar._TT["NEXT_MONTH"] = "След. месяц (удерживать для меню)"; +Calendar._TT["NEXT_YEAR"] = "След. год (удерживать для меню)"; +Calendar._TT["SEL_DATE"] = "Выбрать дату"; +Calendar._TT["DRAG_TO_MOVE"] = "Перетащить"; +Calendar._TT["PART_TODAY"] = " (сегодня)"; +Calendar._TT["MON_FIRST"] = "Показать понедельник первым"; +Calendar._TT["SUN_FIRST"] = "Показать воскресенье первым"; +Calendar._TT["DAY_FIRST"] = "Показать %s первым"; +Calendar._TT["CLOSE"] = "Закрыть"; +Calendar._TT["TODAY"] = "Сегодня"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; + +Calendar._TT["WK"] = "нед"; diff --git a/jscalendar/lang/calendar-si.js b/jscalendar/lang/calendar-si.js new file mode 100644 index 00000000..2983a6da --- /dev/null +++ b/jscalendar/lang/calendar-si.js @@ -0,0 +1,120 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +/* Slovenian language file for the DHTML Calendar version 0.9.2 +* Author David Milost , January 2004. +* Feel free to use this script under the terms of the GNU Lesser General +* Public License, as long as you do not remove or alter this notice. +*/ + // full day names +Calendar._DN = new Array +("Nedelja", + "Ponedeljek", + "Torek", + "Sreda", + "Četrtek", + "Petek", + "Sobota", + "Nedelja"); + // short day names + Calendar._SDN = new Array +("Ned", + "Pon", + "Tor", + "Sre", + "Čet", + "Pet", + "Sob", + "Ned"); +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "Maj", + "Jun", + "Jul", + "Avg", + "Sep", + "Okt", + "Nov", + "Dec"); + // full month names +Calendar._MN = new Array +("Januar", + "Februar", + "Marec", + "April", + "Maj", + "Junij", + "Julij", + "Avgust", + "September", + "Oktober", + "November", + "December"); + +// tooltips +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "O koledarju"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Za zadnjo verzijo pojdine na naslov: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." + +"\n\n" + +"Izbor datuma:\n" + +"- Uporabite \xab, \xbb gumbe za izbor leta\n" + +"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" + +"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Izbor ćasa:\n" + +"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" + +"- ali Shift-click za zmanj. le-tega\n" + +"- ali kliknite in povlecite za hiter izbor."; + +Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden"; +Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)"; +Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)"; +Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan"; +Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)"; +Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)"; +Calendar._TT["SEL_DATE"] = "Izberite datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije"; +Calendar._TT["PART_TODAY"] = " (danes)"; +Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan"; +Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan"; +Calendar._TT["CLOSE"] = "Zapri"; +Calendar._TT["TODAY"] = "Danes"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + +Calendar._TT["WK"] = "Ted"; \ No newline at end of file diff --git a/jscalendar/lang/calendar-sk.js b/jscalendar/lang/calendar-sk.js new file mode 100644 index 00000000..10086ed2 --- /dev/null +++ b/jscalendar/lang/calendar-sk.js @@ -0,0 +1,125 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar SK language +// Author: Peter Valach (pvalach@gmx.net) +// Encoding: utf-8 +// Last update: 2003/10/29 +// Distributed under the same terms as the calendar itself. + +// full day names +Calendar._DN = new Array +("NedeÄľa", + "Pondelok", + "Utorok", + "Streda", + "Ĺ tvrtok", + "Piatok", + "Sobota", + "NedeÄľa"); + +// short day names +Calendar._SDN = new Array +("Ned", + "Pon", + "Uto", + "Str", + "Ĺ tv", + "Pia", + "Sob", + "Ned"); + +// full month names +Calendar._MN = new Array +("Január", + "Február", + "Marec", + "AprĂ­l", + "Máj", + "JĂşn", + "JĂşl", + "August", + "September", + "OktĂłber", + "November", + "December"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "Máj", + "JĂşn", + "JĂşl", + "Aug", + "Sep", + "Okt", + "Nov", + "Dec"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "O kalendári"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + +"PoslednĂş verziu nájdete na: http://dynarch.com/mishoo/calendar.epl\n" + +"DistribuovanĂ© pod GNU LGPL. ViÄŹ http://gnu.org/licenses/lgpl.html pre detaily." + +"\n\n" + +"VĂ˝ber dátumu:\n" + +"- PouĹľite tlaÄŤidlá \xab, \xbb pre vĂ˝ber roku\n" + +"- PouĹľite tlaÄŤidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre vĂ˝ber mesiaca\n" + +"- Ak ktorĂ©koÄľvek z tĂ˝chto tlaÄŤidiel podržíte dlhšie, zobrazĂ­ sa rĂ˝chly vĂ˝ber."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"VĂ˝ber ÄŤasu:\n" + +"- Kliknutie na niektorĂş poloĹľku ÄŤasu ju zvýši\n" + +"- Shift-klik ju znĂ­Ĺľi\n" + +"- Ak podržíte tlaÄŤĂ­tko stlaÄŤenĂ©, posĂşvanĂ­m menĂ­te hodnotu."; + +Calendar._TT["PREV_YEAR"] = "PredošlĂ˝ rok (podrĹľte pre menu)"; +Calendar._TT["PREV_MONTH"] = "PredošlĂ˝ mesiac (podrĹľte pre menu)"; +Calendar._TT["GO_TODAY"] = "PrejsĹĄ na dnešok"; +Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)"; +Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)"; +Calendar._TT["SEL_DATE"] = "ZvoÄľte dátum"; +Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂ­m tlaÄŤĂ­tka zmenĂ­te polohu"; +Calendar._TT["PART_TODAY"] = " (dnes)"; +Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvĂ˝"; +Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvĂş"; +Calendar._TT["CLOSE"] = "ZavrieĹĄ"; +Calendar._TT["TODAY"] = "Dnes"; +Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ­ hodnotu"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; + +Calendar._TT["WK"] = "týž"; diff --git a/jscalendar/lang/calendar-sp.js b/jscalendar/lang/calendar-sp.js new file mode 100644 index 00000000..8634fc5f --- /dev/null +++ b/jscalendar/lang/calendar-sp.js @@ -0,0 +1,91 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N +Calendar._DN = new Array +("Domingo", + "Lunes", + "Martes", + "Miercoles", + "Jueves", + "Viernes", + "Sabado", + "Domingo"); +Calendar._MN = new Array +("Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Información del Calendario"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"Nuevas versiones en: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." + +"\n\n" + +"Selección de Fechas:\n" + +"- Use \xab, \xbb para seleccionar el año\n" + +"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + +"- Mantenga presionado el botón del ratón en cualquiera de las opciones superiores para un acceso rapido ."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Selección del Reloj:\n" + +"- Seleccione la hora para cambiar el reloj\n" + +"- o presione Shift-click para disminuirlo\n" + +"- o presione click y arrastre del ratón para una selección rapida."; + +Calendar._TT["TOGGLE"] = "Primer dia de la semana"; +Calendar._TT["PREV_YEAR"] = "Año anterior (Presione para menu)"; +Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)"; +Calendar._TT["GO_TODAY"] = "Ir a Hoy"; +Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)"; +Calendar._TT["NEXT_YEAR"] = "Año Siguiente (Presione para menu)"; +Calendar._TT["SEL_DATE"] = "Seleccione fecha"; +Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva"; +Calendar._TT["PART_TODAY"] = " (Hoy)"; +Calendar._TT["MON_FIRST"] = "Lunes Primero"; +Calendar._TT["SUN_FIRST"] = "Domingo Primero"; +Calendar._TT["CLOSE"] = "Cerrar"; +Calendar._TT["TODAY"] = "Hoy"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; + +Calendar._TT["WK"] = "Smn"; diff --git a/jscalendar/lang/calendar-sv.js b/jscalendar/lang/calendar-sv.js new file mode 100644 index 00000000..ba96ee0a --- /dev/null +++ b/jscalendar/lang/calendar-sv.js @@ -0,0 +1,121 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar SV language (Swedish, svenska) +// Author: Mihai Bazon, +// Translation team: +// Translator: Leonard NorrgÃ¥rd +// Last translator: Leonard NorrgÃ¥rd +// Encoding: UTF-8 +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("söndag", + "mÃ¥ndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "lördag", + "söndag"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. +Calendar._SDN_len = 2; +Calendar._SMN_len = 3; + +// full month names +Calendar._MN = new Array +("januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "Om kalendern"; + +Calendar._TT["ABOUT"] = +"DHTML Datum/tid-väljare\n" + +"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) +"För senaste version gÃ¥ till: http://dynarch.com/mishoo/calendar.epl\n" + +"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html för detaljer." + +"\n\n" + +"Val av datum:\n" + +"- Använd knapparna \xab, \xbb för att välja Ã¥r\n" + +"- Använd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " för att välja mÃ¥nad\n" + +"- HÃ¥ll musknappen nedtryckt pÃ¥ nÃ¥gon av ovanstÃ¥ende knappar för snabbare val."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Val av tid:\n" + +"- Klicka pÃ¥ en del av tiden för att öka den delen\n" + +"- eller skift-klicka för att minska den\n" + +"- eller klicka och drag för snabbare val."; + +Calendar._TT["PREV_YEAR"] = "FöregÃ¥ende Ã¥r (hÃ¥ll för menu)"; +Calendar._TT["PREV_MONTH"] = "FöregÃ¥ende mÃ¥nad (hÃ¥ll för menu)"; +Calendar._TT["GO_TODAY"] = "GÃ¥ till dagens datum"; +Calendar._TT["NEXT_MONTH"] = "Följande mÃ¥nad (hÃ¥ll för menu)"; +Calendar._TT["NEXT_YEAR"] = "Följande Ã¥r (hÃ¥ll för menu)"; +Calendar._TT["SEL_DATE"] = "Välj datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Drag för att flytta"; +Calendar._TT["PART_TODAY"] = " (idag)"; +Calendar._TT["MON_FIRST"] = "Visa mÃ¥ndag först"; +Calendar._TT["SUN_FIRST"] = "Visa söndag först"; +Calendar._TT["CLOSE"] = "Stäng"; +Calendar._TT["TODAY"] = "Idag"; +Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag för att ändra tid"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y"; + +Calendar._TT["WK"] = "vecka"; diff --git a/jscalendar/lang/calendar-tr.js b/jscalendar/lang/calendar-tr.js new file mode 100644 index 00000000..328ad7d2 --- /dev/null +++ b/jscalendar/lang/calendar-tr.js @@ -0,0 +1,86 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r48025 - 2009-06-03 21:56:58 -0700 (Wed, 03 Jun 2009) - weidong - 27345, change the langfiles to be utf-8 no BOM + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +////////////////////////////////////////////////////////////////////////////////////////////// +// Turkish Translation by Nuri AKMAN +// Location: Ankara/TURKEY +// e-mail : nuriakman@hotmail.com +// Date : April, 9 2003 +// +// Note: if Turkish Characters does not shown on you screen +// please include falowing line your html code: +// +// +// +////////////////////////////////////////////////////////////////////////////////////////////// + +// ** I18N +Calendar._DN = new Array +("Pazar", + "Pazartesi", + "Salı", + "Çarşamba", + "Perşembe", + "Cuma", + "Cumartesi", + "Pazar"); +Calendar._MN = new Array +("Ocak", + "Şubat", + "Mart", + "Nisan", + "Mayıs", + "Haziran", + "Temmuz", + "Ağustos", + "Eylül", + "Ekim", + "Kasım", + "Aralık"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Haftanın ilk gününü kaydır"; +Calendar._TT["PREV_YEAR"] = "Önceki Yıl (Menü için basılı tutunuz)"; +Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basılı tutunuz)"; +Calendar._TT["GO_TODAY"] = "Bugün'e git"; +Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basılı tutunuz)"; +Calendar._TT["NEXT_YEAR"] = "Sonraki Yıl (Menü için basılı tutunuz)"; +Calendar._TT["SEL_DATE"] = "Tarih seçiniz"; +Calendar._TT["DRAG_TO_MOVE"] = "Taşımak için sürükleyiniz"; +Calendar._TT["PART_TODAY"] = " (bugün)"; +Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden başlasın"; +Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden başlasın"; +Calendar._TT["CLOSE"] = "Kapat"; +Calendar._TT["TODAY"] = "Bugün"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "%e %B %Y, %A"; + +Calendar._TT["WK"] = "Hafta"; diff --git a/jscalendar/lang/calendar-zh.js b/jscalendar/lang/calendar-zh.js new file mode 100644 index 00000000..d2239e4e --- /dev/null +++ b/jscalendar/lang/calendar-zh.js @@ -0,0 +1,152 @@ +/* + +Modification information for LGPL compliance + +r58364 - 2010-09-29 22:39:05 -0700 (Wed, 29 Sep 2010) - kjing - Author: Stanislav Malyshev + Fix languages in JS calendar + +r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync + +r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover + +r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex + +r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system + +r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development + +r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372 + +r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm + +r42645 - 2008-12-18 13:41:08 -0800 (Thu, 18 Dec 2008) - awu - merging maint_5_2_0 rev41336:HEAD to trunk + +r38591 - 2008-08-05 16:42:14 -0700 (Tue, 05 Aug 2008) - awu - Bug 20740: Fixing date selector issue for chinese language pack. +Merging sugarchina rev37057 to trunk +Touched: +- jscalendar/lang/calendar-zh.js + +r550 - 2004-09-03 15:39:17 -0700 (Fri, 03 Sep 2004) - jostrow - Calendar feature + + +*/ + +// ** I18N + +// Calendar ZH language +// Author: muziq, +// Encoding: UTF8 +// Distributed under the same terms as the calendar itself. + +// full day names +Calendar._DN = new Array +("星期日", + "星期一", + "星期二", + "星期三", + "星期四", + "星期五", + "星期六", + "星期日"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("日", + "一", + "二", + "三", + "四", + "五", + "六", + "日"); + +// full month names +Calendar._MN = new Array +("一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月"); + +// short month names +Calendar._SMN = new Array +("一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月"); + +// tooltips +if(Calendar._TT == undefined) Calendar._TT = {}; +Calendar._TT["INFO"] = "帮助"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"选择日期:\n" + +"- 点击 \xab, \xbb 按钮选择年份\n" + +"- 点击 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按钮选择月份\n" + +"- 长按以上按钮可从菜单中快速选择年份或月份"; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"选择时间:\n" + +"- 点击小时或分钟可使改数值加一\n" + +"- 按住Shift键点击小时或分钟可使改数值减一\n" + +"- 点击拖动鼠标可进行快速选择"; + +Calendar._TT["PREV_YEAR"] = "上一年 (按住出菜单)"; +Calendar._TT["PREV_MONTH"] = "上一月 (按住出菜单)"; +Calendar._TT["GO_TODAY"] = "转到今日"; +Calendar._TT["NEXT_MONTH"] = "下一月 (按住出菜单)"; +Calendar._TT["NEXT_YEAR"] = "下一年 (按住出菜单)"; +Calendar._TT["SEL_DATE"] = "选择日期"; +Calendar._TT["DRAG_TO_MOVE"] = "拖动"; +Calendar._TT["PART_TODAY"] = " (今日)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "最左边显示%s"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "关闭"; +Calendar._TT["TODAY"] = "今日"; +Calendar._TT["TIME_PART"] = "(Shift-)点击鼠标或拖动改变值"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %e日"; + +Calendar._TT["WK"] = "周"; +Calendar._TT["TIME"] = "时间:"; diff --git a/jscalendar/license.txt b/jscalendar/license.txt new file mode 100644 index 00000000..3ae51c9b --- /dev/null +++ b/jscalendar/license.txt @@ -0,0 +1,461 @@ + + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/jscalendar/menuarrow.gif b/jscalendar/menuarrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..ed2dee0e6368d201bf5d32833884c7c1da6c7424 GIT binary patch literal 68 zcmZ?wbhEHbWM^Py_{hZ2(9rPi-LwDy|1&T!DE?$&WME)o&;ha;K=KSsqAVN&i(DE6 VRJ~d>0vEY-3aNTcS;53$4FHxP5xxKb literal 0 HcmV?d00001 diff --git a/jscalendar/menuarrow2.gif b/jscalendar/menuarrow2.gif new file mode 100644 index 0000000000000000000000000000000000000000..40c0aadfc6e62e7cdf4a0dc4a3a3d735c6995b76 GIT binary patch literal 49 zcmZ?wbhEHbWM^PyXkcV;a&r3r|G(l-7DfgJMg|=QAOOiQFmbfVR-Qb-pUlW$4FDM} B3akJC literal 0 HcmV?d00001 diff --git a/json_server.php b/json_server.php index f97ede8d..9c4d4066 100644 --- a/json_server.php +++ b/json_server.php @@ -50,9 +50,9 @@ $SUPPORTED_METHODS = array( 'retrieve', 'query', 'set_accept_status', - 'get_user_array', - 'get_objects_from_module', - 'email', + 'get_user_array', + 'get_objects_from_module', + 'email', 'get_full_list' ); @@ -63,7 +63,7 @@ function json_retrieve($request_id, $params) { global $current_user; global $beanFiles,$beanList; $json = getJSONobj(); - + $record = $params[0]['record']; require_once($beanFiles[$beanList[$params[0]['module']]]); @@ -84,34 +84,34 @@ function json_query($request_id, $params) { global $response, $sugar_config; global $beanFiles, $beanList; $json = getJSONobj(); - + if($sugar_config['list_max_entries_per_page'] < 31) // override query limits $sugar_config['list_max_entries_per_page'] = 31; $args = $params[0]; - + //decode condition parameter values.. if(is_array($args['conditions'])) { - foreach($args['conditions'] as $key=>$condition) { + foreach($args['conditions'] as $key=>$condition) { if(!empty($condition['value'])) { $where = $json->decode(utf8_encode($condition['value'])); // cn: bug 12693 - API change due to CSRF security changes. $where = empty($where) ? $condition['value'] : $where; $args['conditions'][$key]['value'] = $where; - } + } } } $list_return = array(); - + if(! empty($args['module'])) { $args['modules'] = array($args['module']); } - + foreach($args['modules'] as $module) { require_once($beanFiles[$beanList[$module]]); $focus = new $beanList[$module]; - + $query_orderby = ''; if(!empty($args['order'])) { $query_orderby = $args['order']; @@ -128,30 +128,30 @@ function json_query($request_id, $params) { $list_return = array_merge($list_return,$curlist['list']); } } - + $app_list_strings = null; for($i = 0;$i < count($list_return);$i++) { if(isset($list_return[$i]->emailAddress) && is_object($list_return[$i]->emailAddress)) { $list_return[$i]->emailAddress->handleLegacyRetrieve($list_return[$i]); } - + $list_arr[$i]= array(); $list_arr[$i]['fields']= array(); $list_arr[$i]['module']= $list_return[$i]->object_name; - + foreach($args['field_list'] as $field) { // handle enums - if( (isset($list_return[$i]->field_name_map[$field]['type']) && $list_return[$i]->field_name_map[$field]['type'] == 'enum') || + if( (isset($list_return[$i]->field_name_map[$field]['type']) && $list_return[$i]->field_name_map[$field]['type'] == 'enum') || (isset($list_return[$i]->field_name_map[$field]['custom_type']) && $list_return[$i]->field_name_map[$field]['custom_type'] == 'enum')) { - + // get fields to match enum vals if(empty($app_list_strings)) { if(isset($_SESSION['authenticated_user_language']) && $_SESSION['authenticated_user_language'] != '') $current_language = $_SESSION['authenticated_user_language']; else $current_language = $sugar_config['default_language']; $app_list_strings = return_app_list_strings_language($current_language); } - + // match enum vals to text vals in language pack for return if(!empty($app_list_strings[$list_return[$i]->field_name_map[$field]['options']])) { $list_return[$i]->$field = $app_list_strings[$list_return[$i]->field_name_map[$field]['options']][$list_return[$i]->$field]; @@ -175,12 +175,12 @@ function json_set_accept_status($request_id, $params) { global $beanFiles,$beanList; $json = getJSONobj(); require_once($beanFiles[$beanList[$params[0]['module']]]); - + $focus = new $beanList[$params[0]['module']]; $focus->id = $params[0]['record']; - + $test = $focus->set_accept_status($current_user,$params[0]['accept_status']); - + $response = array(); $response['id'] = $request_id; $response['result'] = array("status"=>"success","record"=>$params[0]['record'],'accept_status'=>$params[0]['accept_status']); @@ -195,27 +195,27 @@ function json_set_accept_status($request_id, $params) { function json_get_user_array($request_id, $params) { $json = getJSONobj(); $args = $params[0]; - + //decode condition parameter values.. if(is_array($args['conditions'])) { - foreach($args['conditions'] as $key=>$condition) { + foreach($args['conditions'] as $key=>$condition) { if(!empty($condition['value'])) { $args['conditions'][$key]['value']=$json->decode($condition['value']); } } } - + $response = array(); $response['id'] = $request_id; $response['result'] = array(); $response['result']['list'] = array(); - + if(showFullName()) { $user_array = getUserArrayFromFullName($args['conditions'][0]['value']); } else { $user_array = get_user_array(false, "Active", $focus->assigned_user_id, false, $args['conditions'][0]['value']); } - + foreach($user_array as $id=>$name) { array_push($response['result']['list'], array('fields' => array('id' => $id, 'user_name' => $name), 'module' => 'Users')); } @@ -226,16 +226,16 @@ function json_get_user_array($request_id, $params) { function json_get_objects_from_module($request_id, $params) { global $beanList, $beanFiles, $current_user; $json = getJSONobj(); - + $module_name = $params[0]['module']; $offset = intval($params[0]['offset']); $where = $params[0]['where']; $max = $params[0]['max']; $order_by = $params[0]['order_by']; $using_cp = false; - + if($module_name == 'CampaignProspects'){ - $module_name = 'Prospects'; + $module_name = 'Prospects'; $using_cp = true; } @@ -259,7 +259,7 @@ function json_get_objects_from_module($request_id, $params) { }else{ $response = $seed->get_list($order_by, $where, $offset,-1,$max,$deleted); } - + $list = $response['list']; $row_count = $response['row_count']; @@ -270,7 +270,7 @@ function json_get_objects_from_module($request_id, $params) { } $response = array(); $response['id'] = $request_id; - + $response['result'] = array('result_count'=>$row_count,'entry_list'=>$output_list); $json_response = $json->encode($response, true); print $json_response; @@ -283,7 +283,7 @@ function json_email($request_id, $params) { global $response, $sugar_config; global $beanFiles,$beanList; $json = getJSONobj(); - + $args = $params[0]; if($sugar_config['list_max_entries_per_page'] < 50) // override query limits @@ -298,7 +298,7 @@ function json_email($request_id, $params) { foreach($args['modules'] as $module) { require_once($beanFiles[$beanList[$module]]); $focus = new $beanList[$module]; - + $query_orderby = ''; if(!empty($args['order'])) { $query_orderby = $args['order']; @@ -309,7 +309,7 @@ function json_email($request_id, $params) { } $query_where = construct_where($args,$focus->table_name); $list_arr = array(); - + $curlist = $focus->get_list($query_orderby, $query_where, 0, $query_limit, -1, 0); $list_return = array_merge($list_return,$curlist['list']); } @@ -318,7 +318,7 @@ function json_email($request_id, $params) { $list_arr[$i]= array(); $list_arr[$i]['fields']= array(); $list_arr[$i]['module']= $list_return[$i]->object_name; - + foreach($args['field_list'] as $field) { $list_arr[$i]['fields'][$field] = $list_return[$i]->$field; } @@ -340,17 +340,17 @@ function json_get_full_list($request_id, $params) { $where = str_replace('\\','', rawurldecode($params[0]['where'])); $order = str_replace('\\','', rawurldecode($params[0]['order'])); $focus = new $beanList[$params[0]['module']]; - + $fullList = $focus->get_full_list($order, $where, ''); $all_fields = array_merge($focus->column_fields,$focus->additional_column_fields); $js_fields_arr = array(); if(isset($fullList) && !empty($fullList)) { // json error if this isn't defensive - $i=0; + $i=0; foreach($fullList as $note) { $js_fields_arr[$i] = array(); - + foreach($all_fields as $field) { if(isset($note->$field)) { $note->$field = from_html($note->$field); @@ -362,11 +362,11 @@ function json_get_full_list($request_id, $params) { $i++; } } - + $fin['id'] = $request_id; $fin['result'] = $js_fields_arr; $out = $json->encode($fin, true); - + print($out); } //// END SUPPORTED METHODS @@ -390,18 +390,18 @@ function meeting_retrieve($module,$record) { require_once($beanFiles[$beanList[$module]]); $focus = new $beanList[$module]; $json = getJSONobj(); - + if(empty($module) || empty($record)) { $response['error'] = array("error_msg"=>"method: retrieve: missing module or record as parameters"); print $json->encode($response, true); - + } $focus->retrieve($record); - + $GLOBALS['log']->debug("JSON_SERVER:retrieved meeting:"); - + $module_arr = populateBean($focus); if($module == 'Meetings') @@ -438,7 +438,7 @@ function meeting_retrieve($module,$record) { // HAS MEETING SPECIFIC CODE: function populateBean(&$focus) { - $all_fields = $focus->column_fields; + $all_fields = $focus->list_fields; // MEETING SPECIFIC $all_fields = array_merge($all_fields,array('required','accept_status','name')); // need name field for contacts and users //$all_fields = array_merge($focus->column_fields,$focus->additional_column_fields); @@ -480,8 +480,8 @@ function getUserJSON() { function getUserConfigJSON() { require_once('include/TimeDate.php'); - $timedate = TimeDate::getInstance(); - global $current_user,$global_registry_var_name,$json,$sugar_config; + $td = new TimeDate(); + global $current_user,$global_registry_var_name,$json,$_SESSION,$sugar_config; if(isset($_SESSION['authenticated_user_theme']) && $_SESSION['authenticated_user_theme'] != '') { @@ -500,7 +500,11 @@ function getUserConfigJSON() { $user_arr['fields']['first_name'] = $current_user->first_name; $user_arr['fields']['last_name'] = $current_user->last_name; $user_arr['fields']['email'] = $current_user->email1; - $user_arr['fields']['gmt_offset'] = $timedate->getUserUTCOffset(); + $userTz = $td->getUserTimeZone(); + $dstRange = $td->getDSTRange(date('Y'), $userTz); + $user_arr['fields']['dst_start'] = $dstRange['start']; + $user_arr['fields']['dst_end'] = $dstRange['end']; + $user_arr['fields']['gmt_offset'] = $userTz['gmtOffset']; $str = "\n".$global_registry_var_name.".current_user = ".$json->encode($user_arr, true).";\n"; return $str; @@ -564,7 +568,7 @@ function construct_where(&$query_obj, $table='',$module=null) { $email1_condition = " {$table}id in ( SELECT er.bean_id AS id FROM email_addr_bean_rel er, " . "email_addresses ea WHERE ea.id = er.email_address_id " . "AND ea.deleted = 0 AND er.deleted = 0 AND er.bean_module = '{$module}' AND email_address_caps LIKE '%{$email1_value}%' )"; - + array_push($cond_arr,$email1_condition); } else { @@ -582,26 +586,26 @@ function construct_where(&$query_obj, $table='',$module=null) { } } } - + if($table == 'users.') { $cond_arr[] = $table."status='Active'"; } - + return implode(" {$query_obj['group']} ",$cond_arr); } function getAppMetaJSON() { global $global_registry_var_name, $sugar_config; $json = getJSONobj(); - + $str = "\nvar ".$global_registry_var_name." = new Object();\n"; $str .= "\n".$global_registry_var_name.".config = {\"site_url\":\"".getJavascriptSiteURL()."\"};\n"; - + $str .= $global_registry_var_name.".meta = new Object();\n"; $str .= $global_registry_var_name.".meta.modules = new Object();\n"; $modules_arr = array('Meetings','Calls'); $meta_modules = array(); - + global $beanFiles,$beanList; //header('Content-type: text/xml'); foreach($modules_arr as $module) { @@ -610,7 +614,7 @@ function getAppMetaJSON() { $meta_modules[$module] = array(); $meta_modules[$module]['field_defs'] = $focus->field_defs; } - + $str .= $global_registry_var_name.".meta.modules.Meetings = ". $json->encode($meta_modules['Meetings'], true)."\n"; $str .= $global_registry_var_name.".meta.modules.Calls = ". $json->encode($meta_modules['Calls'], true)."\n"; return $str; @@ -619,7 +623,7 @@ function getAppMetaJSON() { function getFocusData() { global $global_registry_var_name; $json = getJSONobj(); - + if(empty($_REQUEST['module']) ) return ''; elseif(empty($_REQUEST['record'] ) ) @@ -634,14 +638,14 @@ function getStringsJSON() { global $current_language; global $global_registry_var_name; $json = getJSONobj(); - + $currentModule = 'Calendar'; $mod_list_strings = return_mod_list_strings_language($current_language,$currentModule); $str = "\n".$global_registry_var_name."['calendar_strings'] = {\"dom_cal_month_long\":". $json->encode($mod_list_strings['dom_cal_month_long']).",\"dom_cal_weekdays_long\":". $json->encode($mod_list_strings['dom_cal_weekdays_long'])."}\n"; - + if(empty($_REQUEST['module'])) $_REQUEST['module'] = 'Home'; - + $currentModule = $_REQUEST['module']; $mod_strings = return_module_language($current_language,$currentModule); return $str . "\n".$global_registry_var_name."['meeting_strings'] = ". $json->encode($mod_strings, true)."\n"; @@ -685,15 +689,15 @@ $GLOBALS['log']->debug("JSON_SERVER: current_language:".$current_language); // if this is a get, than this is spitting out static javascript as if it was a file // wp: DO NOT USE THIS. Include the javascript inline using include/json_config.php // using does not cache properly on some browsers -// resulting in 2 or more server hits per page load. Very bad for SSL. +// resulting in 2 or more server hits per page load. Very bad for SSL. if(strtolower($_SERVER['REQUEST_METHOD'])== 'get') { echo "alert('DEPRECATED API\nPlease report as a bug.');"; /** * Deprecated for security reasons. - * + * * DO NOT USE. - * - * + * + * $current_user = authenticate(); if(empty($current_user)) { $GLOBALS['log']->debug("JSON_SERVER: current_user isn't set"); @@ -703,14 +707,14 @@ if(strtolower($_SERVER['REQUEST_METHOD'])== 'get') { $str = ''; $str .= getAppMetaJSON(); $GLOBALS['log']->debug("JSON_SERVER:getAppMetaJSON"); - + if($_GET['module'] != '_configonly') { $str .= getFocusData(); $GLOBALS['log']->debug("JSON_SERVER: getFocusData"); $str .= getStringsJSON(); $GLOBALS['log']->debug("JSON_SERVER:getStringsJSON"); } - + $str .= getUserConfigJSON(); $GLOBALS['log']->debug("JSON_SERVER:getUserConfigJSON"); print $str; @@ -736,8 +740,8 @@ if(strtolower($_SERVER['REQUEST_METHOD'])== 'get') { $request = $json->decode($GLOBALS['HTTP_RAW_POST_DATA'], true); else $request = $json->decode(file_get_contents("php://input"), true); - - + + if(!is_array($request)) { $response['error'] = array("error_msg"=>"malformed request"); print $json->encode($response, true); @@ -748,7 +752,7 @@ if(strtolower($_SERVER['REQUEST_METHOD'])== 'get') { $response['error'] = array("error_msg"=>"missing parameters"); print $json->encode($response, true); } - + $response['id'] = $request['id']; if(in_array($request['method'], $SUPPORTED_METHODS)) { diff --git a/jssource/JSGroupings.php b/jssource/JSGroupings.php index d2fef50b..5e112624 100644 --- a/jssource/JSGroupings.php +++ b/jssource/JSGroupings.php @@ -51,7 +51,9 @@ 'include/javascript/sugar_3.js' => 'include/javascript/sugar_grp1.js', 'include/javascript/cookie.js' => 'include/javascript/sugar_grp1.js', 'include/javascript/menu.js' => 'include/javascript/sugar_grp1.js', - 'include/javascript/calendar.js' => 'include/javascript/sugar_grp1.js', + 'jscalendar/calendar.js' => 'include/javascript/sugar_grp1.js', + 'jscalendar/lang/calendar-en.js' => 'include/javascript/sugar_grp1.js', + 'jscalendar/calendar-setup_3.js' => 'include/javascript/sugar_grp1.js', 'include/javascript/quickCompose.js' => 'include/javascript/sugar_grp1.js', 'include/javascript/yui/build/yuiloader/yuiloader-min.js' => 'include/javascript/sugar_grp1.js', ), @@ -79,8 +81,6 @@ 'include/javascript/quicksearch.js' => 'include/javascript/sugar_grp1_yui.js', 'include/javascript/yui/build/menu/menu-min.js' => 'include/javascript/sugar_grp1_yui.js', 'include/javascript/sugar_connection_event_listener.js' => 'include/javascript/sugar_grp1_yui.js', - 'include/javascript/yui/build/calendar/calendar.js' => 'include/javascript/sugar_grp1_yui.js', - ), $sugar_grp_yui_widgets = array( @@ -90,7 +90,6 @@ 'include/javascript/yui/build/tabview/tabview-min.js' => 'include/javascript/sugar_grp_yui_widgets.js', 'include/javascript/yui/build/treeview/treeview-min.js' => 'include/javascript/sugar_grp_yui_widgets.js', 'include/javascript/yui/build/button/button-min.js' => 'include/javascript/sugar_grp_yui_widgets.js', - 'include/javascript/yui/build/calendar/calendar-min.js' => 'include/javascript/sugar_grp_yui_widgets.js', 'include/javascript/sugarwidgets/SugarYUIWidgets.js' => 'include/javascript/sugar_grp_yui_widgets.js', ), @@ -104,8 +103,6 @@ => 'include/javascript/sugar_grp_yui_widgets.css', "include/javascript/yui/build/button/assets/skins/sam/button.css" => 'include/javascript/sugar_grp_yui_widgets.css', - "include/javascript/yui/build/calendar/assets/skins/sam/calendar.css" - => 'include/javascript/sugar_grp_yui_widgets.css', ), $sugar_grp_yui2 = array( diff --git a/jssource/minify_utils.php b/jssource/minify_utils.php index dd2f942c..102b2b4d 100644 --- a/jssource/minify_utils.php +++ b/jssource/minify_utils.php @@ -59,6 +59,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $prefix.'include/javascript/ext-1.1.1' => 'include/javascript/ext-1.1.1', $prefix.'include/javascript/ext-2.0' => 'include/javascript/ext-2.0', $prefix.'include/javascript/tiny_mce' => 'include/javascript/tiny_mce', + $prefix.'jscalendar/lang' => 'jscalendar/lang', $prefix.'modules/Emails' => 'modules/Emails', $prefix.'jssource' => 'jssource', $prefix.'modules/ModuleBuilder' => 'modules/ModuleBuilder', diff --git a/jssource/src_files/include/JSON.js b/jssource/src_files/include/JSON.js index 575ac930..8b8bc4d4 100644 --- a/jssource/src_files/include/JSON.js +++ b/jssource/src_files/include/JSON.js @@ -119,7 +119,7 @@ var JSON = function () { v = f(v); if (typeof v === 'string') { // cn: bug 12274 - add a security envelope to protect against CSRF - var securityEnvelope = '{"asynchronous_key": "' + asynchronous_key +'", "jsonObject": '+ v +'}'; + var securityEnvelope = "{asynchronous_key:'" + asynchronous_key +"', jsonObject:" + v + "}"; return securityEnvelope; } } diff --git a/jssource/src_files/include/MySugar/javascript/MySugar.js b/jssource/src_files/include/MySugar/javascript/MySugar.js index 8244bd0e..5fb63935 100644 --- a/jssource/src_files/include/MySugar/javascript/MySugar.js +++ b/jssource/src_files/include/MySugar/javascript/MySugar.js @@ -69,6 +69,42 @@ SUGAR.mySugar = function() { + clearChartsArray: function(){ + charts[activeTab] = new Object(); + }, + + addToChartsArray: function(name, xmlFile, width, height, styleSheet, colorScheme, langFile){ + + if (charts[activeTab] == null){ + charts[activeTab] = new Object(); + } + charts[activeTab][name] = new Object(); + charts[activeTab][name]['name'] = name; + charts[activeTab][name]['xmlFile'] = xmlFile; + charts[activeTab][name]['width'] = width; + charts[activeTab][name]['height'] = height; + charts[activeTab][name]['styleSheet'] = styleSheet; + charts[activeTab][name]['colorScheme'] = colorScheme; + charts[activeTab][name]['langFile'] = langFile; + }, + + loadSugarChart: function(name, xmlFile, width, height, styleSheet, colorScheme, langFile){ + loadChartSWF(name, xmlFile, width, height, styleSheet, colorScheme, langFile); + }, + + loadSugarCharts: function(){ + for (id in charts[activeTab]){ + if(id != 'undefined'){ + SUGAR.mySugar.loadSugarChart(charts[activeTab][id]['name'], + charts[activeTab][id]['xmlFile'], + charts[activeTab][id]['width'], + charts[activeTab][id]['height'], + charts[activeTab][id]['styleSheet'], + charts[activeTab][id]['colorScheme'], + charts[activeTab][id]['langFile']); + } + } + }, @@ -110,7 +146,7 @@ SUGAR.mySugar = function() { newLayout = SUGAR.mySugar.getLayout(true); if(originalLayout != newLayout) { // only save if the layout has changed SUGAR.mySugar.saveLayout(newLayout); - SUGAR.mySugar.sugarCharts.loadSugarCharts(); // called safely because there is a check to be sure the array exists + SUGAR.mySugar.loadSugarCharts(); // called safely because there is a check to be sure the array exists } }, @@ -212,7 +248,7 @@ SUGAR.mySugar = function() { ajaxStatus.hideStatus(); if(data) { - SUGAR.mySugar.currentDashlet.innerHTML = data.responseText; + SUGAR.mySugar.currentDashlet.innerHTML = data.responseText; } SUGAR.util.evalScript(data.responseText); @@ -220,9 +256,14 @@ SUGAR.mySugar = function() { var processChartScript = function(scriptData){ SUGAR.util.evalScript(scriptData.responseText); - //custom chart code - SUGAR.mySugar.sugarCharts.loadSugarCharts(activePage); + SUGAR.mySugar.loadSugarChart(charts[activeTab][id]['name'], + charts[activeTab][id]['xmlFile'], + charts[activeTab][id]['width'], + charts[activeTab][id]['height'], + charts[activeTab][id]['styleSheet'], + charts[activeTab][id]['colorScheme'], + charts[activeTab][id]['langFile']); } if(typeof(is_chart_dashlet)=='undefined'){ is_chart_dashlet = false; @@ -235,7 +276,7 @@ SUGAR.mySugar = function() { SUGAR.mySugar.currentDashlet = document.getElementById('dashlet_entire_' + id); var cObj = YAHOO.util.Connect.asyncRequest('GET', url, - {success: fillInDashlet, failure: fillInDashlet}, null); + {success: fillInDashlet, failure: fillInDashlet}, null); return false; }, @@ -312,6 +353,13 @@ SUGAR.mySugar = function() { ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_ADDING_DASHLET')); var success = function(data) { + //check to see if a user preference error occurred + if(data.responseText == 'userpref_error'){ + //user preference error occured, close the dashlet dialog, flash the error message and exit processing + SUGAR.mySugar.closeDashletsDialog(); + ajaxStatus.flashStatus(SUGAR.language.get('app_strings', 'ERROR_USER_PREFS_DASH'),7000); + return; + } colZero = document.getElementById('col_'+activeTab+'_0'); newDashlet = document.createElement('li'); // build the list item newDashlet.id = 'dashlet_' + data.responseText; diff --git a/jssource/src_files/include/SubPanel/SubPanelTiles.js b/jssource/src_files/include/SubPanel/SubPanelTiles.js index 6ff808de..8a1ee350 100644 --- a/jssource/src_files/include/SubPanel/SubPanelTiles.js +++ b/jssource/src_files/include/SubPanel/SubPanelTiles.js @@ -595,8 +595,7 @@ SUGAR.subpanelUtils = function() { for(group_sp in SUGAR.subpanelUtils.subpanelGroups[group]){ if ( typeof(SUGAR.subpanelUtils.subpanelGroups[group][group_sp]) != 'string' ) continue; var cur = document.getElementById('whole_subpanel_'+SUGAR.subpanelUtils.subpanelGroups[group][group_sp]); - if (cur != null) - cur.style.display = 'block'; + cur.style.display = 'block'; /* use YDD swapNodes this and first, second, etc. */ try{ YAHOO.util.DDM.swapNode(cur, sp_list.getElementsByTagName('LI')[group_sp]); diff --git a/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js b/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js deleted file mode 100644 index 00ea13e0..00000000 --- a/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * canvas2png.js - * - * Copyright (c) 2010-2011 Shinya Muramatsu - * Released under the MIT License - * http://flashcanvas.net/ - */ - -(function(doc) { - -var scripts = doc.getElementsByTagName("script"); -var script = scripts[scripts.length - 1]; -var url = script.getAttribute("src").replace(/[^\/]+$/, "save.php"); - -window.canvas2png = function(canvas) { - var tagName = canvas.tagName.toLowerCase(); - if (tagName !== "canvas") { - return; - } - - if (typeof FlashCanvas !== "undefined") { - FlashCanvas.saveImage(canvas); - } else { - var form = doc.createElement("form"); - var input = doc.createElement("input"); - - form.setAttribute("action", url); - form.setAttribute("method", "post"); - - input.setAttribute("type", "hidden"); - input.setAttribute("name", "dataurl"); - input.setAttribute("value", canvas.toDataURL()); - - doc.body.appendChild(form); - form.appendChild(input); - form.submit(); - form.removeChild(input); - doc.body.removeChild(form); - } -} - -})(document); diff --git a/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js b/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js deleted file mode 100644 index dc0eee00..00000000 --- a/jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * FlashCanvas - * - * Copyright (c) 2009 Tim Cameron Ryan - * Copyright (c) 2009-2011 FlashCanvas Project - * Released under the MIT/X License - */ -window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(h,j){function D(a){this.code=a;this.message=T[a]}function U(a){this.width=a}function E(a){this.id=a.C++}function t(a){this.G=a;this.id=a.C++}function u(a,b){this.canvas=a;this.B=b;this.d=a.uniqueID;this.D();this.C=0;this.t="";var c=this;setInterval(function(){n[c.d]===0&&c.e()},30)}function A(){if(j.readyState==="complete"){j.detachEvent(F,A);for(var a=j.getElementsByTagName(r),b=0,c=a.length;b=8?a.src:a.getAttribute("src",4)}function v(a){return(""+a).replace(/&/g,"&").replace(/0)return eval(this.B.CallFunction(''+a.join("�")+""))},I:function(a,b){this.e();this.D();if(a>0)this.B.width=a;if(b>0)this.B.height=b;this.a.push(e.resize,a,b)}};t.prototype={addColorStop:function(a,b){if(isNaN(a)||a<0||a>1)i(1);this.G.a.push(e.addColorStop,this.id,a,b)}};D.prototype=Error();var T={1:"INDEX_SIZE_ERR",9:"NOT_SUPPORTED_ERR",11:"INVALID_STATE_ERR", -12:"SYNTAX_ERR",17:"TYPE_MISMATCH_ERR",18:"SECURITY_ERR"},B={initElement:function(a){if(a.getContext)return a;var b=a.uniqueID,c="external"+b;x[b]=false;n[b]=1;Q(a);a.innerHTML=''; -s[b]=a;var d=a.firstChild;y[b]=a.lastChild;var f=j.body.contains;if(f(a))d.movie=w;else var g=setInterval(function(){if(f(a)){clearInterval(g);d.movie=w}},0);if(j.compatMode==="BackCompat"||!h.XMLHttpRequest)y[b].style.overflow="hidden";var o=new u(a,d);a.getContext=function(l){return l==="2d"?o:k};a.toDataURL=function(l,z){(""+l).replace(/[A-Z]+/g,W)==="image/jpeg"?o.a.push(e.toDataURL,l,typeof z==="number"?z:""):o.a.push(e.toDataURL,l);return o.e()};d.attachEvent(K,G);return a},saveImage:function(a){a.firstChild.saveImage()}, -setOptions:function(){},trigger:function(a,b){s[a].fireEvent("on"+b)},unlock:function(a,b){n[a]&&--n[a];if(b){var c=s[a],d=c.firstChild,f,g;Q(c);f=c.width;g=c.height;c.style.width=f+"px";c.style.height=g+"px";if(f>0)d.width=f;if(g>0)d.height=g;d.resize(f,g);c.attachEvent(L,H);x[a]=true}}};j.createElement(r);j.createStyleSheet().cssText=r+"{display:inline-block;overflow:hidden;width:300px;height:150px}";j.readyState==="complete"?A():j.attachEvent(F,A);h.attachEvent(J,I);if(w.indexOf(location.protocol+ -"//"+location.host+"/")===0){var S=new ActiveXObject("Microsoft.XMLHTTP");S.open("GET",w,false);S.send(k)}h[M]=u;h[N]=t;h[O]=E;h[C]=B;h[P]={init:function(){},init_:function(){},initElement:B.initElement};keep=u.measureText}(window,document); diff --git a/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js b/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js deleted file mode 100644 index 2a82bddf..00000000 --- a/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js +++ /dev/null @@ -1,20674 +0,0 @@ -/* - Copyright (c) 2010, Nicolas Garcia Belmonte - All rights reserved - - > Redistribution and use in source and binary forms, with or without - > modification, are permitted provided that the following conditions are met: - > * Redistributions of source code must retain the above copyright - > notice, this list of conditions and the following disclaimer. - > * Redistributions in binary form must reproduce the above copyright - > notice, this list of conditions and the following disclaimer in the - > documentation and/or other materials provided with the distribution. - > * Neither the name of the organization nor the - > names of its contributors may be used to endorse or promote products - > derived from this software without specific prior written permission. - > - > THIS SOFTWARE IS PROVIDED BY NICOLAS GARCIA BELMONTE ``AS IS'' AND ANY - > EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - > DISCLAIMED. IN NO EVENT SHALL NICOLAS GARCIA BELMONTE BE LIABLE FOR ANY - > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - > (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - > LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - > ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - > (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - > SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - /** Lam Huynh on 10/10/2010 added funnel,guage charts **/ - /** Lam Huynh on 02/27/2011 added image exporting **/ - /** Lam Huynh on 02/23/2011 added line charts **/ - - (function () { - -/* - File: Core.js - - */ - -/* - Object: $jit - - Defines the namespace for all library Classes and Objects. - This variable is the *only* global variable defined in the Toolkit. - There are also other interesting properties attached to this variable described below. - */ -window.$jit = function(w) { - w = w || window; - for(var k in $jit) { - if($jit[k].$extend) { - w[k] = $jit[k]; - } - } -}; - -$jit.version = '2.0.0b'; -/* - Object: $jit.id - - Works just like *document.getElementById* - - Example: - (start code js) - var element = $jit.id('elementId'); - (end code) - -*/ - -/* - Object: $jit.util - - Contains utility functions. - - Some of the utility functions and the Class system were based in the MooTools Framework - . Copyright (c) 2006-2010 Valerio Proietti, . - MIT license . - - These methods are generally also implemented in DOM manipulation frameworks like JQuery, MooTools and Prototype. - I'd suggest you to use the functions from those libraries instead of using these, since their functions - are widely used and tested in many different platforms/browsers. Use these functions only if you have to. - - */ -var $ = function(d) { - return document.getElementById(d); -}; - -$.empty = function() { -}; - -function pad(number, length) { - - var str = '' + number; - while (str.length < length) { - str = str + '0'; - } - - return str; - -}; - -var Url = { - - // public method for url encoding - encode : function (string) { - return escape(this._utf8_encode(string)); - }, - - // public method for url decoding - decode : function (string) { - return this._utf8_decode(unescape(string)); - }, - - // private method for UTF-8 encoding - _utf8_encode : function (string) { - string = string.replace(/\r\n/g,"\n"); - var utftext = ""; - - for (var n = 0; n < string.length; n++) { - - var c = string.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - - } - - return utftext; - }, - - // private method for UTF-8 decoding - _utf8_decode : function (utftext) { - var string = ""; - var i = 0; - var c = c1 = c2 = 0; - - while ( i < utftext.length ) { - - c = utftext.charCodeAt(i); - - if (c < 128) { - string += String.fromCharCode(c); - i++; - } - else if((c > 191) && (c < 224)) { - c2 = utftext.charCodeAt(i+1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } - else { - c2 = utftext.charCodeAt(i+1); - c3 = utftext.charCodeAt(i+2); - string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - i += 3; - } - - } - - return string; - } - -}; - -Array.prototype.sum = function() { - return (! this.length) ? 0 : this.slice(1).sum() + - ((typeof this[0] == 'number') ? this[0] : 0); -}; - -function array_match(needle, haystack) { - var length = haystack.length; - var indexValue = new Array(); - for(var i = 0, count = 0; i < length; i++) { - if(haystack[i] == needle) { - indexValue[count] = i; - count++; - } - } - return new Array(count,indexValue); -}; - -$.roundedRect = function (ctx,x,y,width,height,radius,fillType){ - ctx.beginPath(); - ctx.moveTo(x,y+radius); - ctx.lineTo(x,y+height-radius); - ctx.quadraticCurveTo(x,y+height,x+radius,y+height); - ctx.lineTo(x+width-radius,y+height); - ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius); - ctx.lineTo(x+width,y+radius); - ctx.quadraticCurveTo(x+width,y,x+width-radius,y); - ctx.lineTo(x+radius,y); - ctx.quadraticCurveTo(x,y,x,y+radius); - if(fillType=="fill") { - ctx.fill(); - } else { - ctx.stroke(); - } -}; - -$.saveImageFile = function (id,jsonfilename,imageExt) { - var parts = jsonfilename.split("/"); - var filename = parts[2].replace(".js","."+imageExt); - var oCanvas = document.getElementById(id+"-canvas"); - - if(oCanvas) { - if(imageExt == "jpg") { - var strDataURI = oCanvas.toDataURL("image/jpeg"); - } else { - var strDataURI = oCanvas.toDataURL("image/png"); - } - var handleFailure = function(o){ - alert('failed to write image' + filename); - } - var handleSuccess = function(o){ - } - var callback = - { - success:handleSuccess, - failure:handleFailure, - argument: { foo:'foo', bar:''} - }; - var path = "index.php?action=DynamicAction&DynamicAction=saveImage&module=Charts&to_pdf=1"; - var postData = "imageStr=" + strDataURI + "&filename=" + filename; - var request = YAHOO.util.Connect.asyncRequest('POST', path, callback, postData); - } -}; - -$.saveImageTest = function (id,jsonfilename,imageExt) { - if(typeof FlashCanvas != "undefined") { - setTimeout(function(){$.saveImageFile(id,jsonfilename,imageExt)},10000); - } else { - $.saveImageFile(id,jsonfilename,imageExt); - } - }; -/* - Method: extend - - Augment an object by appending another object's properties. - - Parameters: - - original - (object) The object to be extended. - extended - (object) An object which properties are going to be appended to the original object. - - Example: - (start code js) - $jit.util.extend({ 'a': 1, 'b': 2 }, { 'b': 3, 'c': 4 }); //{ 'a':1, 'b': 3, 'c': 4 } - (end code) -*/ -$.extend = function(original, extended) { - for ( var key in (extended || {})) - original[key] = extended[key]; - return original; -}; - -$.lambda = function(value) { - return (typeof value == 'function') ? value : function() { - return value; - }; -}; - -$.time = Date.now || function() { - return +new Date; -}; - -/* - Method: splat - - Returns an array wrapping *obj* if *obj* is not an array. Returns *obj* otherwise. - - Parameters: - - obj - (mixed) The object to be wrapped in an array. - - Example: - (start code js) - $jit.util.splat(3); //[3] - $jit.util.splat([3]); //[3] - (end code) -*/ -$.splat = function(obj) { - var type = $.type(obj); - return type ? ((type != 'array') ? [ obj ] : obj) : []; -}; - -$.type = function(elem) { - var type = $.type.s.call(elem).match(/^\[object\s(.*)\]$/)[1].toLowerCase(); - if(type != 'object') return type; - if(elem && elem.$$family) return elem.$$family; - return (elem && elem.nodeName && elem.nodeType == 1)? 'element' : type; -}; -$.type.s = Object.prototype.toString; - -/* - Method: each - - Iterates through an iterable applying *f*. - - Parameters: - - iterable - (array) The original array. - fn - (function) The function to apply to the array elements. - - Example: - (start code js) - $jit.util.each([3, 4, 5], function(n) { alert('number ' + n); }); - (end code) -*/ -$.each = function(iterable, fn) { - var type = $.type(iterable); - if (type == 'object') { - for ( var key in iterable) - fn(iterable[key], key); - } else { - for ( var i = 0, l = iterable.length; i < l; i++) - fn(iterable[i], i); - } -}; - -$.indexOf = function(array, item) { - if(Array.indexOf) return array.indexOf(item); - for(var i=0,l=array.length; i> 16, hex >> 8 & 0xff, hex & 0xff ]; - } -}; - -$.destroy = function(elem) { - $.clean(elem); - if (elem.parentNode) - elem.parentNode.removeChild(elem); - if (elem.clearAttributes) - elem.clearAttributes(); -}; - -$.clean = function(elem) { - for (var ch = elem.childNodes, i = 0, l = ch.length; i < l; i++) { - $.destroy(ch[i]); - } -}; - -/* - Method: addEvent - - Cross-browser add event listener. - - Parameters: - - obj - (obj) The Element to attach the listener to. - type - (string) The listener type. For example 'click', or 'mousemove'. - fn - (function) The callback function to be used when the event is fired. - - Example: - (start code js) - $jit.util.addEvent(elem, 'click', function(){ alert('hello'); }); - (end code) -*/ -$.addEvent = function(obj, type, fn) { - if (obj.addEventListener) - obj.addEventListener(type, fn, false); - else - obj.attachEvent('on' + type, fn); -}; - -$.addEvents = function(obj, typeObj) { - for(var type in typeObj) { - $.addEvent(obj, type, typeObj[type]); - } -}; - -$.hasClass = function(obj, klass) { - return (' ' + obj.className + ' ').indexOf(' ' + klass + ' ') > -1; -}; - -$.addClass = function(obj, klass) { - if (!$.hasClass(obj, klass)) - obj.className = (obj.className + " " + klass); -}; - -$.removeClass = function(obj, klass) { - obj.className = obj.className.replace(new RegExp( - '(^|\\s)' + klass + '(?:\\s|$)'), '$1'); -}; - -$.getPos = function(elem) { - var offset = getOffsets(elem); - var scroll = getScrolls(elem); - return { - x: offset.x - scroll.x, - y: offset.y - scroll.y - }; - - function getOffsets(elem) { - var position = { - x: 0, - y: 0 - }; - while (elem && !isBody(elem)) { - position.x += elem.offsetLeft; - position.y += elem.offsetTop; - elem = elem.offsetParent; - } - return position; - } - - function getScrolls(elem) { - var position = { - x: 0, - y: 0 - }; - while (elem && !isBody(elem)) { - position.x += elem.scrollLeft; - position.y += elem.scrollTop; - elem = elem.parentNode; - } - return position; - } - - function isBody(element) { - return (/^(?:body|html)$/i).test(element.tagName); - } -}; - -$.event = { - get: function(e, win) { - win = win || window; - return e || win.event; - }, - getWheel: function(e) { - return e.wheelDelta? e.wheelDelta / 120 : -(e.detail || 0) / 3; - }, - isRightClick: function(e) { - return (e.which == 3 || e.button == 2); - }, - getPos: function(e, win) { - // get mouse position - win = win || window; - e = e || win.event; - var doc = win.document; - doc = doc.documentElement || doc.body; - //TODO(nico): make touch event handling better - if(e.touches && e.touches.length) { - e = e.touches[0]; - } - var page = { - x: e.pageX || (e.clientX + doc.scrollLeft), - y: e.pageY || (e.clientY + doc.scrollTop) - }; - return page; - }, - stop: function(e) { - if (e.stopPropagation) e.stopPropagation(); - e.cancelBubble = true; - if (e.preventDefault) e.preventDefault(); - else e.returnValue = false; - } -}; - -$jit.util = $jit.id = $; - -var Class = function(properties) { - properties = properties || {}; - var klass = function() { - for ( var key in this) { - if (typeof this[key] != 'function') - this[key] = $.unlink(this[key]); - } - this.constructor = klass; - if (Class.prototyping) - return this; - var instance = this.initialize ? this.initialize.apply(this, arguments) - : this; - //typize - this.$$family = 'class'; - return instance; - }; - - for ( var mutator in Class.Mutators) { - if (!properties[mutator]) - continue; - properties = Class.Mutators[mutator](properties, properties[mutator]); - delete properties[mutator]; - } - - $.extend(klass, this); - klass.constructor = Class; - klass.prototype = properties; - return klass; -}; - -Class.Mutators = { - - Implements: function(self, klasses) { - $.each($.splat(klasses), function(klass) { - Class.prototyping = klass; - var instance = (typeof klass == 'function') ? new klass : klass; - for ( var prop in instance) { - if (!(prop in self)) { - self[prop] = instance[prop]; - } - } - delete Class.prototyping; - }); - return self; - } - -}; - -$.extend(Class, { - - inherit: function(object, properties) { - for ( var key in properties) { - var override = properties[key]; - var previous = object[key]; - var type = $.type(override); - if (previous && type == 'function') { - if (override != previous) { - Class.override(object, key, override); - } - } else if (type == 'object') { - object[key] = $.merge(previous, override); - } else { - object[key] = override; - } - } - return object; - }, - - override: function(object, name, method) { - var parent = Class.prototyping; - if (parent && object[name] != parent[name]) - parent = null; - var override = function() { - var previous = this.parent; - this.parent = parent ? parent[name] : object[name]; - var value = method.apply(this, arguments); - this.parent = previous; - return value; - }; - object[name] = override; - } - -}); - -Class.prototype.implement = function() { - var proto = this.prototype; - $.each(Array.prototype.slice.call(arguments || []), function(properties) { - Class.inherit(proto, properties); - }); - return this; -}; - -$jit.Class = Class; - -/* - Object: $jit.json - - Provides JSON utility functions. - - Most of these functions are JSON-tree traversal and manipulation functions. -*/ -$jit.json = { - /* - Method: prune - - Clears all tree nodes having depth greater than maxLevel. - - Parameters: - - tree - (object) A JSON tree object. For more information please see . - maxLevel - (number) An integer specifying the maximum level allowed for this tree. All nodes having depth greater than max level will be deleted. - - */ - prune: function(tree, maxLevel) { - this.each(tree, function(elem, i) { - if (i == maxLevel && elem.children) { - delete elem.children; - elem.children = []; - } - }); - }, - /* - Method: getParent - - Returns the parent node of the node having _id_ as id. - - Parameters: - - tree - (object) A JSON tree object. See also . - id - (string) The _id_ of the child node whose parent will be returned. - - Returns: - - A tree JSON node if any, or false otherwise. - - */ - getParent: function(tree, id) { - if (tree.id == id) - return false; - var ch = tree.children; - if (ch && ch.length > 0) { - for ( var i = 0; i < ch.length; i++) { - if (ch[i].id == id) - return tree; - else { - var ans = this.getParent(ch[i], id); - if (ans) - return ans; - } - } - } - return false; - }, - /* - Method: getSubtree - - Returns the subtree that matches the given id. - - Parameters: - - tree - (object) A JSON tree object. See also . - id - (string) A node *unique* identifier. - - Returns: - - A subtree having a root node matching the given id. Returns null if no subtree matching the id is found. - - */ - getSubtree: function(tree, id) { - if (tree.id == id) - return tree; - for ( var i = 0, ch = tree.children; i < ch.length; i++) { - var t = this.getSubtree(ch[i], id); - if (t != null) - return t; - } - return null; - }, - /* - Method: eachLevel - - Iterates on tree nodes with relative depth less or equal than a specified level. - - Parameters: - - tree - (object) A JSON tree or subtree. See also . - initLevel - (number) An integer specifying the initial relative level. Usually zero. - toLevel - (number) An integer specifying a top level. This method will iterate only through nodes with depth less than or equal this number. - action - (function) A function that receives a node and an integer specifying the actual level of the node. - - Example: - (start code js) - $jit.json.eachLevel(tree, 0, 3, function(node, depth) { - alert(node.name + ' ' + depth); - }); - (end code) - */ - eachLevel: function(tree, initLevel, toLevel, action) { - if (initLevel <= toLevel) { - action(tree, initLevel); - if(!tree.children) return; - for ( var i = 0, ch = tree.children; i < ch.length; i++) { - this.eachLevel(ch[i], initLevel + 1, toLevel, action); - } - } - }, - /* - Method: each - - A JSON tree iterator. - - Parameters: - - tree - (object) A JSON tree or subtree. See also . - action - (function) A function that receives a node. - - Example: - (start code js) - $jit.json.each(tree, function(node) { - alert(node.name); - }); - (end code) - - */ - each: function(tree, action) { - this.eachLevel(tree, 0, Number.MAX_VALUE, action); - } -}; - - -/* - An object containing multiple type of transformations. -*/ - -$jit.Trans = { - $extend: true, - - linear: function(p){ - return p; - } -}; - -var Trans = $jit.Trans; - -(function(){ - - var makeTrans = function(transition, params){ - params = $.splat(params); - return $.extend(transition, { - easeIn: function(pos){ - return transition(pos, params); - }, - easeOut: function(pos){ - return 1 - transition(1 - pos, params); - }, - easeInOut: function(pos){ - return (pos <= 0.5)? transition(2 * pos, params) / 2 : (2 - transition( - 2 * (1 - pos), params)) / 2; - } - }); - }; - - var transitions = { - - Pow: function(p, x){ - return Math.pow(p, x[0] || 6); - }, - - Expo: function(p){ - return Math.pow(2, 8 * (p - 1)); - }, - - Circ: function(p){ - return 1 - Math.sin(Math.acos(p)); - }, - - Sine: function(p){ - return 1 - Math.sin((1 - p) * Math.PI / 2); - }, - - Back: function(p, x){ - x = x[0] || 1.618; - return Math.pow(p, 2) * ((x + 1) * p - x); - }, - - Bounce: function(p){ - var value; - for ( var a = 0, b = 1; 1; a += b, b /= 2) { - if (p >= (7 - 4 * a) / 11) { - value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2); - break; - } - } - return value; - }, - - Elastic: function(p, x){ - return Math.pow(2, 10 * --p) - * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3); - } - - }; - - $.each(transitions, function(val, key){ - Trans[key] = makeTrans(val); - }); - - $.each( [ - 'Quad', 'Cubic', 'Quart', 'Quint' - ], function(elem, i){ - Trans[elem] = makeTrans(function(p){ - return Math.pow(p, [ - i + 2 - ]); - }); - }); - -})(); - -/* - A Class that can perform animations for generic objects. - - If you are looking for animation transitions please take a look at the object. - - Used by: - - - - Based on: - - The Animation class is based in the MooTools Framework . Copyright (c) 2006-2009 Valerio Proietti, . MIT license . - -*/ - -var Animation = new Class( { - - initialize: function(options){ - this.setOptions(options); - }, - - setOptions: function(options){ - var opt = { - duration: 2500, - fps: 40, - transition: Trans.Quart.easeInOut, - compute: $.empty, - complete: $.empty, - link: 'ignore' - }; - this.opt = $.merge(opt, options || {}); - return this; - }, - - step: function(){ - var time = $.time(), opt = this.opt; - if (time < this.time + opt.duration) { - var delta = opt.transition((time - this.time) / opt.duration); - opt.compute(delta); - } else { - this.timer = clearInterval(this.timer); - opt.compute(1); - opt.complete(); - } - }, - - start: function(){ - if (!this.check()) - return this; - this.time = 0; - this.startTimer(); - return this; - }, - - startTimer: function(){ - var that = this, fps = this.opt.fps; - if (this.timer) - return false; - this.time = $.time() - this.time; - this.timer = setInterval((function(){ - that.step(); - }), Math.round(1000 / fps)); - return true; - }, - - pause: function(){ - this.stopTimer(); - return this; - }, - - resume: function(){ - this.startTimer(); - return this; - }, - - stopTimer: function(){ - if (!this.timer) - return false; - this.time = $.time() - this.time; - this.timer = clearInterval(this.timer); - return true; - }, - - check: function(){ - if (!this.timer) - return true; - if (this.opt.link == 'cancel') { - this.stopTimer(); - return true; - } - return false; - } -}); - - -var Options = function() { - var args = arguments; - for(var i=0, l=args.length, ans={}; i options. - Other options included in the AreaChart are , , , and . - - Syntax: - - (start code js) - - Options.AreaChart = { - animate: true, - labelOffset: 3, - type: 'stacked', - selectOnHover: true, - showAggregates: true, - showLabels: true, - filterOnClick: false, - restoreOnRightClick: false - }; - - (end code) - - Example: - - (start code js) - - var areaChart = new $jit.AreaChart({ - animate: true, - type: 'stacked:gradient', - selectOnHover: true, - filterOnClick: true, - restoreOnRightClick: true - }); - - (end code) - - Parameters: - - animate - (boolean) Default's *true*. Whether to add animated transitions when filtering/restoring stacks. - labelOffset - (number) Default's *3*. Adds margin between the label and the default place where it should be drawn. - type - (string) Default's *'stacked'*. Stack style. Posible values are 'stacked', 'stacked:gradient' to add gradients. - selectOnHover - (boolean) Default's *true*. If true, it will add a mark to the hovered stack. - showAggregates - (boolean) Default's *true*. Display the sum of the values of the different stacks. - showLabels - (boolean) Default's *true*. Display the name of the slots. - filterOnClick - (boolean) Default's *true*. Select the clicked stack by hiding all other stacks. - restoreOnRightClick - (boolean) Default's *true*. Show all stacks by right clicking. - -*/ - -Options.AreaChart = { - $extend: true, - - animate: true, - labelOffset: 3, // label offset - type: 'stacked', // gradient - Tips: { - enable: false, - onShow: $.empty, - onHide: $.empty - }, - Events: { - enable: false, - onClick: $.empty - }, - selectOnHover: true, - showAggregates: true, - showLabels: true, - filterOnClick: false, - restoreOnRightClick: false -}; - -/* - * File: Options.Margin.js - * -*/ - -/* - Object: Options.Margin - - Canvas drawing margins. - - Syntax: - - (start code js) - - Options.Margin = { - top: 0, - left: 0, - right: 0, - bottom: 0 - }; - - (end code) - - Example: - - (start code js) - - var viz = new $jit.Viz({ - Margin: { - right: 10, - bottom: 20 - } - }); - - (end code) - - Parameters: - - top - (number) Default's *0*. Top margin. - left - (number) Default's *0*. Left margin. - right - (number) Default's *0*. Right margin. - bottom - (number) Default's *0*. Bottom margin. - -*/ - -Options.Margin = { - $extend: false, - - top: 0, - left: 0, - right: 0, - bottom: 0 -}; - -/* - * File: Options.Canvas.js - * -*/ - -/* - Object: Options.Canvas - - These are Canvas general options, like where to append it in the DOM, its dimensions, background, - and other more advanced options. - - Syntax: - - (start code js) - - Options.Canvas = { - injectInto: 'id', - width: false, - height: false, - useCanvas: false, - withLabels: true, - background: false - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - injectInto: 'someContainerId', - width: 500, - height: 700 - }); - (end code) - - Parameters: - - injectInto - *required* (string|element) The id of the DOM container for the visualization. It can also be an Element provided that it has an id. - width - (number) Default's to the *container's offsetWidth*. The width of the canvas. - height - (number) Default's to the *container's offsetHeight*. The height of the canvas. - useCanvas - (boolean|object) Default's *false*. You can pass another instance to be used by the visualization. - withLabels - (boolean) Default's *true*. Whether to use a label container for the visualization. - background - (boolean|object) Default's *false*. An object containing information about the rendering of a background canvas. -*/ - -Options.Canvas = { - $extend: true, - - injectInto: 'id', - width: false, - height: false, - useCanvas: false, - withLabels: true, - background: false, - colorStop1: 'rgba(255,255,255,1)', - colorStop2: 'rgba(255,255,255,0)' -}; - -/* - * File: Options.Tree.js - * -*/ - -/* - Object: Options.Tree - - Options related to (strict) Tree layout algorithms. These options are used by the visualization. - - Syntax: - - (start code js) - Options.Tree = { - orientation: "left", - subtreeOffset: 8, - siblingOffset: 5, - indent:10, - multitree: false, - align:"center" - }; - (end code) - - Example: - - (start code js) - var st = new $jit.ST({ - orientation: 'left', - subtreeOffset: 1, - siblingOFfset: 5, - multitree: true - }); - (end code) - - Parameters: - - subtreeOffset - (number) Default's 8. Separation offset between subtrees. - siblingOffset - (number) Default's 5. Separation offset between siblings. - orientation - (string) Default's 'left'. Tree orientation layout. Possible values are 'left', 'top', 'right', 'bottom'. - align - (string) Default's *center*. Whether the tree alignment is 'left', 'center' or 'right'. - indent - (number) Default's 10. Used when *align* is left or right and shows an indentation between parent and children. - multitree - (boolean) Default's *false*. Used with the node $orn data property for creating multitrees. - -*/ -Options.Tree = { - $extend: true, - - orientation: "left", - subtreeOffset: 8, - siblingOffset: 5, - indent:10, - multitree: false, - align:"center" -}; - - -/* - * File: Options.Node.js - * -*/ - -/* - Object: Options.Node - - Provides Node rendering options for Tree and Graph based visualizations. - - Syntax: - - (start code js) - Options.Node = { - overridable: false, - type: 'circle', - color: '#ccb', - alpha: 1, - dim: 3, - height: 20, - width: 90, - autoHeight: false, - autoWidth: false, - lineWidth: 1, - transform: true, - align: "center", - angularWidth:1, - span:1, - CanvasStyles: {} - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - Node: { - overridable: true, - width: 30, - autoHeight: true, - type: 'rectangle' - } - }); - (end code) - - Parameters: - - overridable - (boolean) Default's *false*. Determine whether or not general node properties can be overridden by a particular . - type - (string) Default's *circle*. Node's shape. Node built-in types include 'circle', 'rectangle', 'square', 'ellipse', 'triangle', 'star'. The default Node type might vary in each visualization. You can also implement (non built-in) custom Node types into your visualizations. - color - (string) Default's *#ccb*. Node color. - alpha - (number) Default's *1*. The Node's alpha value. *1* is for full opacity. - dim - (number) Default's *3*. An extra parameter used by other node shapes such as circle or square, to determine the shape's diameter. - height - (number) Default's *20*. Used by 'rectangle' and 'ellipse' node types. The height of the node shape. - width - (number) Default's *90*. Used by 'rectangle' and 'ellipse' node types. The width of the node shape. - autoHeight - (boolean) Default's *false*. Whether to set an auto height for the node depending on the content of the Node's label. - autoWidth - (boolean) Default's *false*. Whether to set an auto width for the node depending on the content of the Node's label. - lineWidth - (number) Default's *1*. Used only by some Node shapes. The line width of the strokes of a node. - transform - (boolean) Default's *true*. Only used by the visualization. Whether to scale the nodes according to the moebius transformation. - align - (string) Default's *center*. Possible values are 'center', 'left' or 'right'. Used only by the visualization, these parameters are used for aligning nodes when some of they dimensions vary. - angularWidth - (number) Default's *1*. Used in radial layouts (like or visualizations). The amount of relative 'space' set for a node. - span - (number) Default's *1*. Used in radial layouts (like or visualizations). The angle span amount set for a node. - CanvasStyles - (object) Default's an empty object (i.e. {}). Attach any other canvas specific property that you'd set to the canvas context before plotting a Node. - -*/ -Options.Node = { - $extend: false, - - overridable: false, - type: 'circle', - color: '#ccb', - alpha: 1, - dim: 3, - height: 20, - width: 90, - autoHeight: false, - autoWidth: false, - lineWidth: 1, - transform: true, - align: "center", - angularWidth:1, - span:1, - //Raw canvas styles to be - //applied to the context instance - //before plotting a node - CanvasStyles: {} -}; - - -/* - * File: Options.Edge.js - * -*/ - -/* - Object: Options.Edge - - Provides Edge rendering options for Tree and Graph based visualizations. - - Syntax: - - (start code js) - Options.Edge = { - overridable: false, - type: 'line', - color: '#ccb', - lineWidth: 1, - dim:15, - alpha: 1, - CanvasStyles: {} - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - Edge: { - overridable: true, - type: 'line', - color: '#fff', - CanvasStyles: { - shadowColor: '#ccc', - shadowBlur: 10 - } - } - }); - (end code) - - Parameters: - - overridable - (boolean) Default's *false*. Determine whether or not general edges properties can be overridden by a particular . - type - (string) Default's 'line'. Edge styles include 'line', 'hyperline', 'arrow'. The default Edge type might vary in each visualization. You can also implement custom Edge types. - color - (string) Default's '#ccb'. Edge color. - lineWidth - (number) Default's *1*. Line/Edge width. - alpha - (number) Default's *1*. The Edge's alpha value. *1* is for full opacity. - dim - (number) Default's *15*. An extra parameter used by other complex shapes such as quadratic, bezier or arrow, to determine the shape's diameter. - epsilon - (number) Default's *7*. Only used when using *enableForEdges* in . This dimension is used to create an area for the line where the contains method for the edge returns *true*. - CanvasStyles - (object) Default's an empty object (i.e. {}). Attach any other canvas specific property that you'd set to the canvas context before plotting an Edge. - - See also: - - If you want to know more about how to customize Node/Edge data per element, in the JSON or programmatically, take a look at this article. -*/ -Options.Edge = { - $extend: false, - - overridable: false, - type: 'line', - color: '#ccb', - lineWidth: 1, - dim:15, - alpha: 1, - epsilon: 7, - - //Raw canvas styles to be - //applied to the context instance - //before plotting an edge - CanvasStyles: {} -}; - - -/* - * File: Options.Fx.js - * -*/ - -/* - Object: Options.Fx - - Provides animation options like duration of the animations, frames per second and animation transitions. - - Syntax: - - (start code js) - Options.Fx = { - fps:40, - duration: 2500, - transition: $jit.Trans.Quart.easeInOut, - clearCanvas: true - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - duration: 1000, - fps: 35, - transition: $jit.Trans.linear - }); - (end code) - - Parameters: - - clearCanvas - (boolean) Default's *true*. Whether to clear the frame/canvas when the viz is plotted or animated. - duration - (number) Default's *2500*. Duration of the animation in milliseconds. - fps - (number) Default's *40*. Frames per second. - transition - (object) Default's *$jit.Trans.Quart.easeInOut*. The transition used for the animations. See below for a more detailed explanation. - - Object: $jit.Trans - - This object is used for specifying different animation transitions in all visualizations. - - There are many different type of animation transitions. - - linear: - - Displays a linear transition - - >Trans.linear - - (see Linear.png) - - Quad: - - Displays a Quadratic transition. - - >Trans.Quad.easeIn - >Trans.Quad.easeOut - >Trans.Quad.easeInOut - - (see Quad.png) - - Cubic: - - Displays a Cubic transition. - - >Trans.Cubic.easeIn - >Trans.Cubic.easeOut - >Trans.Cubic.easeInOut - - (see Cubic.png) - - Quart: - - Displays a Quartetic transition. - - >Trans.Quart.easeIn - >Trans.Quart.easeOut - >Trans.Quart.easeInOut - - (see Quart.png) - - Quint: - - Displays a Quintic transition. - - >Trans.Quint.easeIn - >Trans.Quint.easeOut - >Trans.Quint.easeInOut - - (see Quint.png) - - Expo: - - Displays an Exponential transition. - - >Trans.Expo.easeIn - >Trans.Expo.easeOut - >Trans.Expo.easeInOut - - (see Expo.png) - - Circ: - - Displays a Circular transition. - - >Trans.Circ.easeIn - >Trans.Circ.easeOut - >Trans.Circ.easeInOut - - (see Circ.png) - - Sine: - - Displays a Sineousidal transition. - - >Trans.Sine.easeIn - >Trans.Sine.easeOut - >Trans.Sine.easeInOut - - (see Sine.png) - - Back: - - >Trans.Back.easeIn - >Trans.Back.easeOut - >Trans.Back.easeInOut - - (see Back.png) - - Bounce: - - Bouncy transition. - - >Trans.Bounce.easeIn - >Trans.Bounce.easeOut - >Trans.Bounce.easeInOut - - (see Bounce.png) - - Elastic: - - Elastic curve. - - >Trans.Elastic.easeIn - >Trans.Elastic.easeOut - >Trans.Elastic.easeInOut - - (see Elastic.png) - - Based on: - - Easing and Transition animation methods are based in the MooTools Framework . Copyright (c) 2006-2010 Valerio Proietti, . MIT license . - - -*/ -Options.Fx = { - $extend: true, - - fps:40, - duration: 2500, - transition: $jit.Trans.Quart.easeInOut, - clearCanvas: true -}; - -/* - * File: Options.Label.js - * -*/ -/* - Object: Options.Label - - Provides styling for Labels such as font size, family, etc. Also sets Node labels as HTML, SVG or Native canvas elements. - - Syntax: - - (start code js) - Options.Label = { - overridable: false, - type: 'HTML', //'SVG', 'Native' - style: ' ', - size: 10, - family: 'sans-serif', - textAlign: 'center', - textBaseline: 'alphabetic', - color: '#fff' - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - Label: { - type: 'Native', - size: 11, - color: '#ccc' - } - }); - (end code) - - Parameters: - - overridable - (boolean) Default's *false*. Determine whether or not general label properties can be overridden by a particular . - type - (string) Default's *HTML*. The type for the labels. Can be 'HTML', 'SVG' or 'Native' canvas labels. - style - (string) Default's *empty string*. Can be 'italic' or 'bold'. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use methods to style individual labels. - size - (number) Default's *10*. The font's size. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use methods to style individual labels. - family - (string) Default's *sans-serif*. The font's family. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use methods to style individual labels. - color - (string) Default's *#fff*. The font's color. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use methods to style individual labels. -*/ -Options.Label = { - $extend: false, - - overridable: false, - type: 'HTML', //'SVG', 'Native' - style: ' ', - size: 10, - family: 'sans-serif', - textAlign: 'center', - textBaseline: 'alphabetic', - color: '#fff' -}; - - -/* - * File: Options.Tips.js - * - */ - -/* - Object: Options.Tips - - Tips options - - Syntax: - - (start code js) - Options.Tips = { - enable: false, - type: 'auto', - offsetX: 20, - offsetY: 20, - onShow: $.empty, - onHide: $.empty - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - Tips: { - enable: true, - type: 'Native', - offsetX: 10, - offsetY: 10, - onShow: function(tip, node) { - tip.innerHTML = node.name; - } - } - }); - (end code) - - Parameters: - - enable - (boolean) Default's *false*. If *true*, a tooltip will be shown when a node is hovered. The tooltip is a div DOM element having "tip" as CSS class. - type - (string) Default's *auto*. Defines where to attach the MouseEnter/Leave tooltip events. Possible values are 'Native' to attach them to the canvas or 'HTML' to attach them to DOM label elements (if defined). 'auto' sets this property to the value of 's *type* property. - offsetX - (number) Default's *20*. An offset added to the current tooltip x-position (which is the same as the current mouse position). Default's 20. - offsetY - (number) Default's *20*. An offset added to the current tooltip y-position (which is the same as the current mouse position). Default's 20. - onShow(tip, node) - This callack is used right before displaying a tooltip. The first formal parameter is the tip itself (which is a DivElement). The second parameter may be a for graph based visualizations or an object with label, value properties for charts. - onHide() - This callack is used when hiding a tooltip. - -*/ -Options.Tips = { - $extend: false, - - enable: false, - type: 'auto', - offsetX: 20, - offsetY: 20, - force: false, - onShow: $.empty, - onHide: $.empty -}; - - -/* - * File: Options.NodeStyles.js - * - */ - -/* - Object: Options.NodeStyles - - Apply different styles when a node is hovered or selected. - - Syntax: - - (start code js) - Options.NodeStyles = { - enable: false, - type: 'auto', - stylesHover: false, - stylesClick: false - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - NodeStyles: { - enable: true, - type: 'Native', - stylesHover: { - dim: 30, - color: '#fcc' - }, - duration: 600 - } - }); - (end code) - - Parameters: - - enable - (boolean) Default's *false*. Whether to enable this option. - type - (string) Default's *auto*. Use this to attach the hover/click events in the nodes or the nodes labels (if they have been defined as DOM elements: 'HTML' or 'SVG', see for more details). The default 'auto' value will set NodeStyles to the same type defined for . - stylesHover - (boolean|object) Default's *false*. An object with node styles just like the ones defined for or *false* otherwise. - stylesClick - (boolean|object) Default's *false*. An object with node styles just like the ones defined for or *false* otherwise. -*/ - -Options.NodeStyles = { - $extend: false, - - enable: false, - type: 'auto', - stylesHover: false, - stylesClick: false -}; - - -/* - * File: Options.Events.js - * -*/ - -/* - Object: Options.Events - - Configuration for adding mouse/touch event handlers to Nodes. - - Syntax: - - (start code js) - Options.Events = { - enable: false, - enableForEdges: false, - type: 'auto', - onClick: $.empty, - onRightClick: $.empty, - onMouseMove: $.empty, - onMouseEnter: $.empty, - onMouseLeave: $.empty, - onDragStart: $.empty, - onDragMove: $.empty, - onDragCancel: $.empty, - onDragEnd: $.empty, - onTouchStart: $.empty, - onTouchMove: $.empty, - onTouchEnd: $.empty, - onTouchCancel: $.empty, - onMouseWheel: $.empty - }; - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - Events: { - enable: true, - onClick: function(node, eventInfo, e) { - viz.doSomething(); - }, - onMouseEnter: function(node, eventInfo, e) { - viz.canvas.getElement().style.cursor = 'pointer'; - }, - onMouseLeave: function(node, eventInfo, e) { - viz.canvas.getElement().style.cursor = ''; - } - } - }); - (end code) - - Parameters: - - enable - (boolean) Default's *false*. Whether to enable the Event system. - enableForEdges - (boolean) Default's *false*. Whether to track events also in arcs. If *true* the same callbacks -described below- are used for nodes *and* edges. A simple duck type check for edges is to check for *node.nodeFrom*. - type - (string) Default's 'auto'. Whether to attach the events onto the HTML labels (via event delegation) or to use the custom 'Native' canvas Event System of the library. 'auto' is set when you let the *type* parameter decide this. - onClick(node, eventInfo, e) - Triggered when a user performs a click in the canvas. *node* is the clicked or false if no node has been clicked. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onRightClick(node, eventInfo, e) - Triggered when a user performs a right click in the canvas. *node* is the right clicked or false if no node has been clicked. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onMouseMove(node, eventInfo, e) - Triggered when the user moves the mouse. *node* is the under the cursor as it's moving over the canvas or false if no node has been clicked. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onMouseEnter(node, eventInfo, e) - Triggered when a user moves the mouse over a node. *node* is the that the mouse just entered. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onMouseLeave(node, eventInfo, e) - Triggered when the user mouse-outs a node. *node* is the 'mouse-outed'. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onDragStart(node, eventInfo, e) - Triggered when the user mouse-downs over a node. *node* is the being pressed. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onDragMove(node, eventInfo, e) - Triggered when a user, after pressing the mouse button over a node, moves the mouse around. *node* is the being dragged. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onDragEnd(node, eventInfo, e) - Triggered when a user finished dragging a node. *node* is the being dragged. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onDragCancel(node, eventInfo, e) - Triggered when the user releases the mouse button over a that wasn't dragged (i.e. the user didn't perform any mouse movement after pressing the mouse button). *node* is the being dragged. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. - onTouchStart(node, eventInfo, e) - Behaves just like onDragStart. - onTouchMove(node, eventInfo, e) - Behaves just like onDragMove. - onTouchEnd(node, eventInfo, e) - Behaves just like onDragEnd. - onTouchCancel(node, eventInfo, e) - Behaves just like onDragCancel. - onMouseWheel(delta, e) - Triggered when the user uses the mouse scroll over the canvas. *delta* is 1 or -1 depending on the sense of the mouse scroll. -*/ - -Options.Events = { - $extend: false, - - enable: false, - enableForEdges: false, - type: 'auto', - onClick: $.empty, - onRightClick: $.empty, - onMouseMove: $.empty, - onMouseEnter: $.empty, - onMouseLeave: $.empty, - onDragStart: $.empty, - onDragMove: $.empty, - onDragCancel: $.empty, - onDragEnd: $.empty, - onTouchStart: $.empty, - onTouchMove: $.empty, - onTouchEnd: $.empty, - onMouseWheel: $.empty -}; - -/* - * File: Options.Navigation.js - * -*/ - -/* - Object: Options.Navigation - - Panning and zooming options for Graph/Tree based visualizations. These options are implemented - by all visualizations except charts (, and ). - - Syntax: - - (start code js) - - Options.Navigation = { - enable: false, - type: 'auto', - panning: false, //true, 'avoid nodes' - zooming: false - }; - - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - Navigation: { - enable: true, - panning: 'avoid nodes', - zooming: 20 - } - }); - (end code) - - Parameters: - - enable - (boolean) Default's *false*. Whether to enable Navigation capabilities. - panning - (boolean|string) Default's *false*. Set this property to *true* if you want to add Drag and Drop panning support to the visualization. You can also set this parameter to 'avoid nodes' to enable DnD panning but disable it if the DnD is taking place over a node. This is useful when some other events like Drag & Drop for nodes are added to . - zooming - (boolean|number) Default's *false*. Set this property to a numeric value to turn mouse-scroll zooming on. The number will be proportional to the mouse-scroll sensitivity. - -*/ - -Options.Navigation = { - $extend: false, - - enable: false, - type: 'auto', - panning: false, //true | 'avoid nodes' - zooming: false -}; - -/* - * File: Options.Controller.js - * -*/ - -/* - Object: Options.Controller - - Provides controller methods. Controller methods are callback functions that get called at different stages - of the animation, computing or plotting of the visualization. - - Implemented by: - - All visualizations except charts (, and ). - - Syntax: - - (start code js) - - Options.Controller = { - onBeforeCompute: $.empty, - onAfterCompute: $.empty, - onCreateLabel: $.empty, - onPlaceLabel: $.empty, - onComplete: $.empty, - onBeforePlotLine:$.empty, - onAfterPlotLine: $.empty, - onBeforePlotNode:$.empty, - onAfterPlotNode: $.empty, - request: false - }; - - (end code) - - Example: - - (start code js) - var viz = new $jit.Viz({ - onBeforePlotNode: function(node) { - if(node.selected) { - node.setData('color', '#ffc'); - } else { - node.removeData('color'); - } - }, - onBeforePlotLine: function(adj) { - if(adj.nodeFrom.selected && adj.nodeTo.selected) { - adj.setData('color', '#ffc'); - } else { - adj.removeData('color'); - } - }, - onAfterCompute: function() { - alert("computed!"); - } - }); - (end code) - - Parameters: - - onBeforeCompute(node) - This method is called right before performing all computations and animations. The selected is passed as parameter. - onAfterCompute() - This method is triggered after all animations or computations ended. - onCreateLabel(domElement, node) - This method receives a new label DIV element as first parameter, and the corresponding as second parameter. This method will only be called once for each label. This method is useful when adding events or styles to the labels used by the JIT. - onPlaceLabel(domElement, node) - This method receives a label DIV element as first parameter and the corresponding as second parameter. This method is called each time a label has been placed in the visualization, for example at each step of an animation, and thus it allows you to update the labels properties, such as size or position. Note that onPlaceLabel will be triggered after updating the labels positions. That means that, for example, the left and top css properties are already updated to match the nodes positions. Width and height properties are not set however. - onBeforePlotNode(node) - This method is triggered right before plotting each . This method is useful for changing a node style right before plotting it. - onAfterPlotNode(node) - This method is triggered right after plotting each . - onBeforePlotLine(adj) - This method is triggered right before plotting a . This method is useful for adding some styles to a particular edge before being plotted. - onAfterPlotLine(adj) - This method is triggered right after plotting a . - - *Used in , and visualizations* - - request(nodeId, level, onComplete) - This method is used for buffering information into the visualization. When clicking on an empty node, the visualization will make a request for this node's subtrees, specifying a given level for this subtree (defined by _levelsToShow_). Once the request is completed, the onComplete callback should be called with the given result. This is useful to provide on-demand information into the visualizations withought having to load the entire information from start. The parameters used by this method are _nodeId_, which is the id of the root of the subtree to request, _level_ which is the depth of the subtree to be requested (0 would mean just the root node). _onComplete_ is an object having the callback method _onComplete.onComplete(json)_ that should be called once the json has been retrieved. - - */ -Options.Controller = { - $extend: true, - - onBeforeCompute: $.empty, - onAfterCompute: $.empty, - onCreateLabel: $.empty, - onPlaceLabel: $.empty, - onComplete: $.empty, - onBeforePlotLine:$.empty, - onAfterPlotLine: $.empty, - onBeforePlotNode:$.empty, - onAfterPlotNode: $.empty, - request: false -}; - - -/* - * File: Extras.js - * - * Provides Extras such as Tips and Style Effects. - * - * Description: - * - * Provides the and classes and functions. - * - */ - -/* - * Manager for mouse events (clicking and mouse moving). - * - * This class is used for registering objects implementing onClick - * and onMousemove methods. These methods are called when clicking or - * moving the mouse around the Canvas. - * For now, and are classes implementing these methods. - * - */ -var ExtrasInitializer = { - initialize: function(className, viz) { - this.viz = viz; - this.canvas = viz.canvas; - this.config = viz.config[className]; - this.nodeTypes = viz.fx.nodeTypes; - var type = this.config.type; - this.dom = type == 'auto'? (viz.config.Label.type != 'Native') : (type != 'Native'); - this.labelContainer = this.dom && viz.labels.getLabelContainer(); - this.isEnabled() && this.initializePost(); - }, - initializePost: $.empty, - setAsProperty: $.lambda(false), - isEnabled: function() { - return this.config.enable; - }, - isLabel: function(e, win) { - e = $.event.get(e, win); - var labelContainer = this.labelContainer, - target = e.target || e.srcElement; - if(target && target.parentNode == labelContainer) - return target; - return false; - } -}; - -var EventsInterface = { - onMouseUp: $.empty, - onMouseDown: $.empty, - onMouseMove: $.empty, - onMouseOver: $.empty, - onMouseOut: $.empty, - onMouseWheel: $.empty, - onTouchStart: $.empty, - onTouchMove: $.empty, - onTouchEnd: $.empty, - onTouchCancel: $.empty -}; - -var MouseEventsManager = new Class({ - initialize: function(viz) { - this.viz = viz; - this.canvas = viz.canvas; - this.node = false; - this.edge = false; - this.registeredObjects = []; - this.attachEvents(); - }, - - attachEvents: function() { - var htmlCanvas = this.canvas.getElement(), - that = this; - htmlCanvas.oncontextmenu = $.lambda(false); - $.addEvents(htmlCanvas, { - 'mouseup': function(e, win) { - var event = $.event.get(e, win); - that.handleEvent('MouseUp', e, win, - that.makeEventObject(e, win), - $.event.isRightClick(event)); - }, - 'mousedown': function(e, win) { - var event = $.event.get(e, win); - that.handleEvent('MouseDown', e, win, that.makeEventObject(e, win), - $.event.isRightClick(event)); - }, - 'mousemove': function(e, win) { - that.handleEvent('MouseMove', e, win, that.makeEventObject(e, win)); - }, - 'mouseover': function(e, win) { - that.handleEvent('MouseOver', e, win, that.makeEventObject(e, win)); - }, - 'mouseout': function(e, win) { - that.handleEvent('MouseOut', e, win, that.makeEventObject(e, win)); - }, - 'touchstart': function(e, win) { - that.handleEvent('TouchStart', e, win, that.makeEventObject(e, win)); - }, - 'touchmove': function(e, win) { - that.handleEvent('TouchMove', e, win, that.makeEventObject(e, win)); - }, - 'touchend': function(e, win) { - that.handleEvent('TouchEnd', e, win, that.makeEventObject(e, win)); - } - }); - //attach mousewheel event - var handleMouseWheel = function(e, win) { - var event = $.event.get(e, win); - var wheel = $.event.getWheel(event); - that.handleEvent('MouseWheel', e, win, wheel); - }; - //TODO(nico): this is a horrible check for non-gecko browsers! - if(!document.getBoxObjectFor && window.mozInnerScreenX == null) { - $.addEvent(htmlCanvas, 'mousewheel', handleMouseWheel); - } else { - htmlCanvas.addEventListener('DOMMouseScroll', handleMouseWheel, false); - } - }, - - register: function(obj) { - this.registeredObjects.push(obj); - }, - - handleEvent: function() { - var args = Array.prototype.slice.call(arguments), - type = args.shift(); - for(var i=0, regs=this.registeredObjects, l=regs.length; i and implemented - * by all main visualizations. - * - */ -var Extras = { - initializeExtras: function() { - var mem = new MouseEventsManager(this), that = this; - $.each(['NodeStyles', 'Tips', 'Navigation', 'Events'], function(k) { - var obj = new Extras.Classes[k](k, that); - if(obj.isEnabled()) { - mem.register(obj); - } - if(obj.setAsProperty()) { - that[k.toLowerCase()] = obj; - } - }); - } -}; - -Extras.Classes = {}; -/* - Class: Events - - This class defines an Event API to be accessed by the user. - The methods implemented are the ones defined in the object. -*/ - -Extras.Classes.Events = new Class({ - Implements: [ExtrasInitializer, EventsInterface], - - initializePost: function() { - this.fx = this.viz.fx; - this.ntypes = this.viz.fx.nodeTypes; - this.etypes = this.viz.fx.edgeTypes; - - this.hovered = false; - this.pressed = false; - this.touched = false; - - this.touchMoved = false; - this.moved = false; - - }, - - setAsProperty: $.lambda(true), - - onMouseUp: function(e, win, event, isRightClick) { - var evt = $.event.get(e, win); - if(!this.moved) { - if(isRightClick) { - this.config.onRightClick(this.hovered, event, evt); - } else { - this.config.onClick(this.pressed, event, evt); - } - } - if(this.pressed) { - if(this.moved) { - this.config.onDragEnd(this.pressed, event, evt); - } else { - this.config.onDragCancel(this.pressed, event, evt); - } - this.pressed = this.moved = false; - } - }, - - onMouseOut: function(e, win, event) { - //mouseout a label - var evt = $.event.get(e, win), label; - if(this.dom && (label = this.isLabel(e, win))) { - this.config.onMouseLeave(this.viz.graph.getNode(label.id), - event, evt); - this.hovered = false; - return; - } - //mouseout canvas - var rt = evt.relatedTarget, - canvasWidget = this.canvas.getElement(); - while(rt && rt.parentNode) { - if(canvasWidget == rt.parentNode) return; - rt = rt.parentNode; - } - if(this.hovered) { - this.config.onMouseLeave(this.hovered, - event, evt); - this.hovered = false; - } - }, - - onMouseOver: function(e, win, event) { - //mouseover a label - var evt = $.event.get(e, win), label; - if(this.dom && (label = this.isLabel(e, win))) { - this.hovered = this.viz.graph.getNode(label.id); - this.config.onMouseEnter(this.hovered, - event, evt); - } - }, - - onMouseMove: function(e, win, event) { - var label, evt = $.event.get(e, win); - if(this.pressed) { - this.moved = true; - this.config.onDragMove(this.pressed, event, evt); - return; - } - if(this.dom) { - this.config.onMouseMove(this.hovered, - event, evt); - } else { - if(this.hovered) { - var hn = this.hovered; - var geom = hn.nodeFrom? this.etypes[hn.getData('type')] : this.ntypes[hn.getData('type')]; - var contains = geom && geom.contains - && geom.contains.call(this.fx, hn, event.getPos()); - if(contains) { - this.config.onMouseMove(hn, event, evt); - return; - } else { - this.config.onMouseLeave(hn, event, evt); - this.hovered = false; - } - } - if(this.hovered = (event.getNode() || (this.config.enableForEdges && event.getEdge()))) { - this.config.onMouseEnter(this.hovered, event, evt); - } else { - this.config.onMouseMove(false, event, evt); - } - } - }, - - onMouseWheel: function(e, win, delta) { - this.config.onMouseWheel(delta, $.event.get(e, win)); - }, - - onMouseDown: function(e, win, event) { - var evt = $.event.get(e, win); - this.pressed = event.getNode() || (this.config.enableForEdges && event.getEdge()); - this.config.onDragStart(this.pressed, event, evt); - }, - - onTouchStart: function(e, win, event) { - var evt = $.event.get(e, win); - this.touched = event.getNode() || (this.config.enableForEdges && event.getEdge()); - this.config.onTouchStart(this.touched, event, evt); - }, - - onTouchMove: function(e, win, event) { - var evt = $.event.get(e, win); - if(this.touched) { - this.touchMoved = true; - this.config.onTouchMove(this.touched, event, evt); - } - }, - - onTouchEnd: function(e, win, event) { - var evt = $.event.get(e, win); - if(this.touched) { - if(this.touchMoved) { - this.config.onTouchEnd(this.touched, event, evt); - } else { - this.config.onTouchCancel(this.touched, event, evt); - } - this.touched = this.touchMoved = false; - } - } -}); - -/* - Class: Tips - - A class containing tip related functions. This class is used internally. - - Used by: - - , , , , , , - - See also: - - -*/ - -Extras.Classes.Tips = new Class({ - Implements: [ExtrasInitializer, EventsInterface], - - initializePost: function() { - //add DOM tooltip - if(document.body) { - var tip = $('_tooltip') || document.createElement('div'); - tip.id = '_tooltip'; - tip.className = 'tip'; - $.extend(tip.style, { - position: 'absolute', - display: 'none', - zIndex: 13000 - }); - document.body.appendChild(tip); - this.tip = tip; - this.node = false; - } - }, - - setAsProperty: $.lambda(true), - - onMouseOut: function(e, win) { - //mouseout a label - if(this.dom && this.isLabel(e, win)) { - this.hide(true); - return; - } - //mouseout canvas - var rt = e.relatedTarget, - canvasWidget = this.canvas.getElement(); - while(rt && rt.parentNode) { - if(canvasWidget == rt.parentNode) return; - rt = rt.parentNode; - } - this.hide(false); - }, - - onMouseOver: function(e, win) { - //mouseover a label - var label; - if(this.dom && (label = this.isLabel(e, win))) { - this.node = this.viz.graph.getNode(label.id); - this.config.onShow(this.tip, this.node, label); - } - }, - - onMouseMove: function(e, win, opt) { - if(this.dom && this.isLabel(e, win)) { - this.setTooltipPosition($.event.getPos(e, win)); - } - if(!this.dom) { - var node = opt.getNode(); - if(!node) { - this.hide(true); - return; - } - if(this.config.force || !this.node || this.node.id != node.id) { - this.node = node; - this.config.onShow(this.tip, node, opt.getContains()); - } - this.setTooltipPosition($.event.getPos(e, win)); - } - }, - - setTooltipPosition: function(pos) { - var tip = this.tip, - style = tip.style, - cont = this.config; - style.display = ''; - //get window dimensions - var win = { - 'height': document.body.clientHeight, - 'width': document.body.clientWidth - }; - //get tooltip dimensions - var obj = { - 'width': tip.offsetWidth, - 'height': tip.offsetHeight - }; - //set tooltip position - var x = cont.offsetX, y = cont.offsetY; - style.top = ((pos.y + y + obj.height > win.height)? - (pos.y - obj.height - y) : pos.y + y) + 'px'; - style.left = ((pos.x + obj.width + x > win.width)? - (pos.x - obj.width - x) : pos.x + x) + 'px'; - }, - - hide: function(triggerCallback) { - if(!SUGAR.util.isTouchScreen()) { - this.tip.style.display = 'none'; - } - triggerCallback && this.config.onHide(); - } -}); - -/* - Class: NodeStyles - - Change node styles when clicking or hovering a node. This class is used internally. - - Used by: - - , , , , , , - - See also: - - -*/ -Extras.Classes.NodeStyles = new Class({ - Implements: [ExtrasInitializer, EventsInterface], - - initializePost: function() { - this.fx = this.viz.fx; - this.types = this.viz.fx.nodeTypes; - this.nStyles = this.config; - this.nodeStylesOnHover = this.nStyles.stylesHover; - this.nodeStylesOnClick = this.nStyles.stylesClick; - this.hoveredNode = false; - this.fx.nodeFxAnimation = new Animation(); - - this.down = false; - this.move = false; - }, - - onMouseOut: function(e, win) { - this.down = this.move = false; - if(!this.hoveredNode) return; - //mouseout a label - if(this.dom && this.isLabel(e, win)) { - this.toggleStylesOnHover(this.hoveredNode, false); - } - //mouseout canvas - var rt = e.relatedTarget, - canvasWidget = this.canvas.getElement(); - while(rt && rt.parentNode) { - if(canvasWidget == rt.parentNode) return; - rt = rt.parentNode; - } - this.toggleStylesOnHover(this.hoveredNode, false); - this.hoveredNode = false; - }, - - onMouseOver: function(e, win) { - //mouseover a label - var label; - if(this.dom && (label = this.isLabel(e, win))) { - var node = this.viz.graph.getNode(label.id); - if(node.selected) return; - this.hoveredNode = node; - this.toggleStylesOnHover(this.hoveredNode, true); - } - }, - - onMouseDown: function(e, win, event, isRightClick) { - if(isRightClick) return; - var label; - if(this.dom && (label = this.isLabel(e, win))) { - this.down = this.viz.graph.getNode(label.id); - } else if(!this.dom) { - this.down = event.getNode(); - } - this.move = false; - }, - - onMouseUp: function(e, win, event, isRightClick) { - if(isRightClick) return; - if(!this.move) { - this.onClick(event.getNode()); - } - this.down = this.move = false; - }, - - getRestoredStyles: function(node, type) { - var restoredStyles = {}, - nStyles = this['nodeStylesOn' + type]; - for(var prop in nStyles) { - restoredStyles[prop] = node.styles['$' + prop]; - } - return restoredStyles; - }, - - toggleStylesOnHover: function(node, set) { - if(this.nodeStylesOnHover) { - this.toggleStylesOn('Hover', node, set); - } - }, - - toggleStylesOnClick: function(node, set) { - if(this.nodeStylesOnClick) { - this.toggleStylesOn('Click', node, set); - } - }, - - toggleStylesOn: function(type, node, set) { - var viz = this.viz; - var nStyles = this.nStyles; - if(set) { - var that = this; - if(!node.styles) { - node.styles = $.merge(node.data, {}); - } - for(var s in this['nodeStylesOn' + type]) { - var $s = '$' + s; - if(!($s in node.styles)) { - node.styles[$s] = node.getData(s); - } - } - viz.fx.nodeFx($.extend({ - 'elements': { - 'id': node.id, - 'properties': that['nodeStylesOn' + type] - }, - transition: Trans.Quart.easeOut, - duration:300, - fps:40 - }, this.config)); - } else { - var restoredStyles = this.getRestoredStyles(node, type); - viz.fx.nodeFx($.extend({ - 'elements': { - 'id': node.id, - 'properties': restoredStyles - }, - transition: Trans.Quart.easeOut, - duration:300, - fps:40 - }, this.config)); - } - }, - - onClick: function(node) { - if(!node) return; - var nStyles = this.nodeStylesOnClick; - if(!nStyles) return; - //if the node is selected then unselect it - if(node.selected) { - this.toggleStylesOnClick(node, false); - delete node.selected; - } else { - //unselect all selected nodes... - this.viz.graph.eachNode(function(n) { - if(n.selected) { - for(var s in nStyles) { - n.setData(s, n.styles['$' + s], 'end'); - } - delete n.selected; - } - }); - //select clicked node - this.toggleStylesOnClick(node, true); - node.selected = true; - delete node.hovered; - this.hoveredNode = false; - } - }, - - onMouseMove: function(e, win, event) { - //if mouse button is down and moving set move=true - if(this.down) this.move = true; - //already handled by mouseover/out - if(this.dom && this.isLabel(e, win)) return; - var nStyles = this.nodeStylesOnHover; - if(!nStyles) return; - - if(!this.dom) { - if(this.hoveredNode) { - var geom = this.types[this.hoveredNode.getData('type')]; - var contains = geom && geom.contains && geom.contains.call(this.fx, - this.hoveredNode, event.getPos()); - if(contains) return; - } - var node = event.getNode(); - //if no node is being hovered then just exit - if(!this.hoveredNode && !node) return; - //if the node is hovered then exit - if(node.hovered) return; - //select hovered node - if(node && !node.selected) { - //check if an animation is running and exit it - this.fx.nodeFxAnimation.stopTimer(); - //unselect all hovered nodes... - this.viz.graph.eachNode(function(n) { - if(n.hovered && !n.selected) { - for(var s in nStyles) { - n.setData(s, n.styles['$' + s], 'end'); - } - delete n.hovered; - } - }); - //select hovered node - node.hovered = true; - this.hoveredNode = node; - this.toggleStylesOnHover(node, true); - } else if(this.hoveredNode && !this.hoveredNode.selected) { - //check if an animation is running and exit it - this.fx.nodeFxAnimation.stopTimer(); - //unselect hovered node - this.toggleStylesOnHover(this.hoveredNode, false); - delete this.hoveredNode.hovered; - this.hoveredNode = false; - } - } - } -}); - -Extras.Classes.Navigation = new Class({ - Implements: [ExtrasInitializer, EventsInterface], - - initializePost: function() { - this.pos = false; - this.pressed = false; - }, - - onMouseWheel: function(e, win, scroll) { - if(!this.config.zooming) return; - $.event.stop($.event.get(e, win)); - var val = this.config.zooming / 1000, - ans = 1 + scroll * val; - this.canvas.scale(ans, ans); - }, - - onMouseDown: function(e, win, eventInfo) { - if(!this.config.panning) return; - if(this.config.panning == 'avoid nodes' && eventInfo.getNode()) return; - this.pressed = true; - this.pos = eventInfo.getPos(); - var canvas = this.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY; - this.pos.x *= sx; - this.pos.x += ox; - this.pos.y *= sy; - this.pos.y += oy; - }, - - onMouseMove: function(e, win, eventInfo) { - if(!this.config.panning) return; - if(!this.pressed) return; - if(this.config.panning == 'avoid nodes' && eventInfo.getNode()) return; - var thispos = this.pos, - currentPos = eventInfo.getPos(), - canvas = this.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY; - currentPos.x *= sx; - currentPos.y *= sy; - currentPos.x += ox; - currentPos.y += oy; - var x = currentPos.x - thispos.x, - y = currentPos.y - thispos.y; - this.pos = currentPos; - this.canvas.translate(x * 1/sx, y * 1/sy); - }, - - onMouseUp: function(e, win, eventInfo, isRightClick) { - if(!this.config.panning) return; - this.pressed = false; - } -}); - - -/* - * File: Canvas.js - * - */ - -/* - Class: Canvas - - A canvas widget used by all visualizations. The canvas object can be accessed by doing *viz.canvas*. If you want to - know more about options take a look at . - - A canvas widget is a set of DOM elements that wrap the native canvas DOM Element providing a consistent API and behavior - across all browsers. It can also include Elements to add DOM (SVG or HTML) label support to all visualizations. - - Example: - - Suppose we have this HTML - - (start code xml) -
    - (end code) - - Now we create a new Visualization - - (start code js) - var viz = new $jit.Viz({ - //Where to inject the canvas. Any div container will do. - 'injectInto':'infovis', - //width and height for canvas. - //Default's to the container offsetWidth and Height. - 'width': 900, - 'height':500 - }); - (end code) - - The generated HTML will look like this - - (start code xml) -
    -
    - -
    -
    -
    -
    - (end code) - - As you can see, the generated HTML consists of a canvas DOM Element of id *infovis-canvas* and a div label container - of id *infovis-label*, wrapped in a main div container of id *infovis-canvaswidget*. - */ - -var Canvas; -(function() { - //check for native canvas support - var canvasType = typeof HTMLCanvasElement, - supportsCanvas = (canvasType == 'object' || canvasType == 'function'); - //create element function - function $E(tag, props) { - var elem = document.createElement(tag); - for(var p in props) { - if(typeof props[p] == "object") { - $.extend(elem[p], props[p]); - } else { - elem[p] = props[p]; - } - } - if (tag == "canvas" && !supportsCanvas && G_vmlCanvasManager) { - elem = G_vmlCanvasManager.initElement(elem); - } - return elem; - } - //canvas widget which we will call just Canvas - $jit.Canvas = Canvas = new Class({ - canvases: [], - pos: false, - element: false, - labelContainer: false, - translateOffsetX: 0, - translateOffsetY: 0, - scaleOffsetX: 1, - scaleOffsetY: 1, - - initialize: function(viz, opt) { - this.viz = viz; - this.opt = opt; - var id = $.type(opt.injectInto) == 'string'? - opt.injectInto:opt.injectInto.id, - idLabel = id + "-label", - wrapper = $(id), - width = opt.width || wrapper.offsetWidth, - height = opt.height || wrapper.offsetHeight; - this.id = id; - //canvas options - var canvasOptions = { - injectInto: id, - width: width, - height: height - }; - //create main wrapper - this.element = $E('div', { - 'id': id + '-canvaswidget', - 'style': { - 'position': 'relative', - 'width': width + 'px', - 'height': height + 'px' - } - }); - //create label container - this.labelContainer = this.createLabelContainer(opt.Label.type, - idLabel, canvasOptions); - //create primary canvas - this.canvases.push(new Canvas.Base({ - config: $.extend({idSuffix: '-canvas'}, canvasOptions), - plot: function(base) { - viz.fx.plot(); - }, - resize: function() { - viz.refresh(); - } - })); - //create secondary canvas - var back = opt.background; - if(back) { - var backCanvas = new Canvas.Background[back.type](viz, $.extend(back, canvasOptions)); - this.canvases.push(new Canvas.Base(backCanvas)); - } - //insert canvases - var len = this.canvases.length; - while(len--) { - this.element.appendChild(this.canvases[len].canvas); - if(len > 0) { - this.canvases[len].plot(); - } - } - this.element.appendChild(this.labelContainer); - wrapper.appendChild(this.element); - //Update canvas position when the page is scrolled. - var timer = null, that = this; - $.addEvent(window, 'scroll', function() { - clearTimeout(timer); - timer = setTimeout(function() { - that.getPos(true); //update canvas position - }, 500); - }); - $.addEvent(window, 'click', function() { - clearTimeout(timer); - timer = setTimeout(function() { - that.getPos(true); //update canvas position - }, 500); - }); - sb = document.getElementById('sb'+id); - $.addEvent(sb, 'scroll', function() { - clearTimeout(timer); - timer = setTimeout(function() { - that.getPos(true); //update canvas position - }, 500); - }); - }, - /* - Method: getCtx - - Returns the main canvas context object - - Example: - - (start code js) - var ctx = canvas.getCtx(); - //Now I can use the native canvas context - //and for example change some canvas styles - ctx.globalAlpha = 1; - (end code) - */ - getCtx: function(i) { - return this.canvases[i || 0].getCtx(); - }, - /* - Method: getConfig - - Returns the current Configuration for this Canvas Widget. - - Example: - - (start code js) - var config = canvas.getConfig(); - (end code) - */ - getConfig: function() { - return this.opt; - }, - /* - Method: getElement - - Returns the main Canvas DOM wrapper - - Example: - - (start code js) - var wrapper = canvas.getElement(); - //Returns
    ...
    as element - (end code) - */ - getElement: function() { - return this.element; - }, - /* - Method: getSize - - Returns canvas dimensions. - - Returns: - - An object with *width* and *height* properties. - - Example: - (start code js) - canvas.getSize(); //returns { width: 900, height: 500 } - (end code) - */ - getSize: function(i) { - return this.canvases[i || 0].getSize(); - }, - /* - Method: resize - - Resizes the canvas. - - Parameters: - - width - New canvas width. - height - New canvas height. - - Example: - - (start code js) - canvas.resize(width, height); - (end code) - - */ - resize: function(width, height) { - this.getPos(true); - this.translateOffsetX = this.translateOffsetY = 0; - this.scaleOffsetX = this.scaleOffsetY = 1; - for(var i=0, l=this.canvases.length; i class. - * - * Description: - * - * The class, just like the class, is used by the , and as a 2D point representation. - * - * See also: - * - * - * -*/ - -/* - Class: Polar - - A multi purpose polar representation. - - Description: - - The class, just like the class, is used by the , and as a 2D point representation. - - See also: - - - - Parameters: - - theta - An angle. - rho - The norm. -*/ - -var Polar = function(theta, rho) { - this.theta = theta; - this.rho = rho; -}; - -$jit.Polar = Polar; - -Polar.prototype = { - /* - Method: getc - - Returns a complex number. - - Parameters: - - simple - _optional_ If *true*, this method will return only an object holding x and y properties and not a instance. Default's *false*. - - Returns: - - A complex number. - */ - getc: function(simple) { - return this.toComplex(simple); - }, - - /* - Method: getp - - Returns a representation. - - Returns: - - A variable in polar coordinates. - */ - getp: function() { - return this; - }, - - - /* - Method: set - - Sets a number. - - Parameters: - - v - A or instance. - - */ - set: function(v) { - v = v.getp(); - this.theta = v.theta; this.rho = v.rho; - }, - - /* - Method: setc - - Sets a number. - - Parameters: - - x - A number real part. - y - A number imaginary part. - - */ - setc: function(x, y) { - this.rho = Math.sqrt(x * x + y * y); - this.theta = Math.atan2(y, x); - if(this.theta < 0) this.theta += Math.PI * 2; - }, - - /* - Method: setp - - Sets a polar number. - - Parameters: - - theta - A number angle property. - rho - A number rho property. - - */ - setp: function(theta, rho) { - this.theta = theta; - this.rho = rho; - }, - - /* - Method: clone - - Returns a copy of the current object. - - Returns: - - A copy of the real object. - */ - clone: function() { - return new Polar(this.theta, this.rho); - }, - - /* - Method: toComplex - - Translates from polar to cartesian coordinates and returns a new instance. - - Parameters: - - simple - _optional_ If *true* this method will only return an object with x and y properties (and not the whole instance). Default's *false*. - - Returns: - - A new instance. - */ - toComplex: function(simple) { - var x = Math.cos(this.theta) * this.rho; - var y = Math.sin(this.theta) * this.rho; - if(simple) return { 'x': x, 'y': y}; - return new Complex(x, y); - }, - - /* - Method: add - - Adds two instances. - - Parameters: - - polar - A number. - - Returns: - - A new Polar instance. - */ - add: function(polar) { - return new Polar(this.theta + polar.theta, this.rho + polar.rho); - }, - - /* - Method: scale - - Scales a polar norm. - - Parameters: - - number - A scale factor. - - Returns: - - A new Polar instance. - */ - scale: function(number) { - return new Polar(this.theta, this.rho * number); - }, - - /* - Method: equals - - Comparison method. - - Returns *true* if the theta and rho properties are equal. - - Parameters: - - c - A number. - - Returns: - - *true* if the theta and rho parameters for these objects are equal. *false* otherwise. - */ - equals: function(c) { - return this.theta == c.theta && this.rho == c.rho; - }, - - /* - Method: $add - - Adds two instances affecting the current object. - - Paramters: - - polar - A instance. - - Returns: - - The changed object. - */ - $add: function(polar) { - this.theta = this.theta + polar.theta; this.rho += polar.rho; - return this; - }, - - /* - Method: $madd - - Adds two instances affecting the current object. The resulting theta angle is modulo 2pi. - - Parameters: - - polar - A instance. - - Returns: - - The changed object. - */ - $madd: function(polar) { - this.theta = (this.theta + polar.theta) % (Math.PI * 2); this.rho += polar.rho; - return this; - }, - - - /* - Method: $scale - - Scales a polar instance affecting the object. - - Parameters: - - number - A scaling factor. - - Returns: - - The changed object. - */ - $scale: function(number) { - this.rho *= number; - return this; - }, - - /* - Method: interpolate - - Calculates a polar interpolation between two points at a given delta moment. - - Parameters: - - elem - A instance. - delta - A delta factor ranging [0, 1]. - - Returns: - - A new instance representing an interpolation between _this_ and _elem_ - */ - interpolate: function(elem, delta) { - var pi = Math.PI, pi2 = pi * 2; - var ch = function(t) { - var a = (t < 0)? (t % pi2) + pi2 : t % pi2; - return a; - }; - var tt = this.theta, et = elem.theta; - var sum, diff = Math.abs(tt - et); - if(diff == pi) { - if(tt > et) { - sum = ch((et + ((tt - pi2) - et) * delta)) ; - } else { - sum = ch((et - pi2 + (tt - (et)) * delta)); - } - } else if(diff >= pi) { - if(tt > et) { - sum = ch((et + ((tt - pi2) - et) * delta)) ; - } else { - sum = ch((et - pi2 + (tt - (et - pi2)) * delta)); - } - } else { - sum = ch((et + (tt - et) * delta)) ; - } - var r = (this.rho - elem.rho) * delta + elem.rho; - return { - 'theta': sum, - 'rho': r - }; - } -}; - - -var $P = function(a, b) { return new Polar(a, b); }; - -Polar.KER = $P(0, 0); - - - -/* - * File: Complex.js - * - * Defines the class. - * - * Description: - * - * The class, just like the class, is used by the , and as a 2D point representation. - * - * See also: - * - * - * -*/ - -/* - Class: Complex - - A multi-purpose Complex Class with common methods. - - Description: - - The class, just like the class, is used by the , and as a 2D point representation. - - See also: - - - - Parameters: - - x - _optional_ A Complex number real part. - y - _optional_ A Complex number imaginary part. - -*/ - -var Complex = function(x, y) { - this.x = x; - this.y = y; -}; - -$jit.Complex = Complex; - -Complex.prototype = { - /* - Method: getc - - Returns a complex number. - - Returns: - - A complex number. - */ - getc: function() { - return this; - }, - - /* - Method: getp - - Returns a representation of this number. - - Parameters: - - simple - _optional_ If *true*, this method will return only an object holding theta and rho properties and not a instance. Default's *false*. - - Returns: - - A variable in coordinates. - */ - getp: function(simple) { - return this.toPolar(simple); - }, - - - /* - Method: set - - Sets a number. - - Parameters: - - c - A or instance. - - */ - set: function(c) { - c = c.getc(true); - this.x = c.x; - this.y = c.y; - }, - - /* - Method: setc - - Sets a complex number. - - Parameters: - - x - A number Real part. - y - A number Imaginary part. - - */ - setc: function(x, y) { - this.x = x; - this.y = y; - }, - - /* - Method: setp - - Sets a polar number. - - Parameters: - - theta - A number theta property. - rho - A number rho property. - - */ - setp: function(theta, rho) { - this.x = Math.cos(theta) * rho; - this.y = Math.sin(theta) * rho; - }, - - /* - Method: clone - - Returns a copy of the current object. - - Returns: - - A copy of the real object. - */ - clone: function() { - return new Complex(this.x, this.y); - }, - - /* - Method: toPolar - - Transforms cartesian to polar coordinates. - - Parameters: - - simple - _optional_ If *true* this method will only return an object with theta and rho properties (and not the whole instance). Default's *false*. - - Returns: - - A new instance. - */ - - toPolar: function(simple) { - var rho = this.norm(); - var atan = Math.atan2(this.y, this.x); - if(atan < 0) atan += Math.PI * 2; - if(simple) return { 'theta': atan, 'rho': rho }; - return new Polar(atan, rho); - }, - /* - Method: norm - - Calculates a number norm. - - Returns: - - A real number representing the complex norm. - */ - norm: function () { - return Math.sqrt(this.squaredNorm()); - }, - - /* - Method: squaredNorm - - Calculates a number squared norm. - - Returns: - - A real number representing the complex squared norm. - */ - squaredNorm: function () { - return this.x*this.x + this.y*this.y; - }, - - /* - Method: add - - Returns the result of adding two complex numbers. - - Does not alter the original object. - - Parameters: - - pos - A instance. - - Returns: - - The result of adding two complex numbers. - */ - add: function(pos) { - return new Complex(this.x + pos.x, this.y + pos.y); - }, - - /* - Method: prod - - Returns the result of multiplying two numbers. - - Does not alter the original object. - - Parameters: - - pos - A instance. - - Returns: - - The result of multiplying two complex numbers. - */ - prod: function(pos) { - return new Complex(this.x*pos.x - this.y*pos.y, this.y*pos.x + this.x*pos.y); - }, - - /* - Method: conjugate - - Returns the conjugate of this number. - - Does not alter the original object. - - Returns: - - The conjugate of this number. - */ - conjugate: function() { - return new Complex(this.x, -this.y); - }, - - - /* - Method: scale - - Returns the result of scaling a instance. - - Does not alter the original object. - - Parameters: - - factor - A scale factor. - - Returns: - - The result of scaling this complex to a factor. - */ - scale: function(factor) { - return new Complex(this.x * factor, this.y * factor); - }, - - /* - Method: equals - - Comparison method. - - Returns *true* if both real and imaginary parts are equal. - - Parameters: - - c - A instance. - - Returns: - - A boolean instance indicating if both numbers are equal. - */ - equals: function(c) { - return this.x == c.x && this.y == c.y; - }, - - /* - Method: $add - - Returns the result of adding two numbers. - - Alters the original object. - - Parameters: - - pos - A instance. - - Returns: - - The result of adding two complex numbers. - */ - $add: function(pos) { - this.x += pos.x; this.y += pos.y; - return this; - }, - - /* - Method: $prod - - Returns the result of multiplying two numbers. - - Alters the original object. - - Parameters: - - pos - A instance. - - Returns: - - The result of multiplying two complex numbers. - */ - $prod:function(pos) { - var x = this.x, y = this.y; - this.x = x*pos.x - y*pos.y; - this.y = y*pos.x + x*pos.y; - return this; - }, - - /* - Method: $conjugate - - Returns the conjugate for this . - - Alters the original object. - - Returns: - - The conjugate for this complex. - */ - $conjugate: function() { - this.y = -this.y; - return this; - }, - - /* - Method: $scale - - Returns the result of scaling a instance. - - Alters the original object. - - Parameters: - - factor - A scale factor. - - Returns: - - The result of scaling this complex to a factor. - */ - $scale: function(factor) { - this.x *= factor; this.y *= factor; - return this; - }, - - /* - Method: $div - - Returns the division of two numbers. - - Alters the original object. - - Parameters: - - pos - A number. - - Returns: - - The result of scaling this complex to a factor. - */ - $div: function(pos) { - var x = this.x, y = this.y; - var sq = pos.squaredNorm(); - this.x = x * pos.x + y * pos.y; this.y = y * pos.x - x * pos.y; - return this.$scale(1 / sq); - } -}; - -var $C = function(a, b) { return new Complex(a, b); }; - -Complex.KER = $C(0, 0); - - - -/* - * File: Graph.js - * -*/ - -/* - Class: Graph - - A Graph Class that provides useful manipulation functions. You can find more manipulation methods in the object. - - An instance of this class can be accessed by using the *graph* parameter of any tree or graph visualization. - - Example: - - (start code js) - //create new visualization - var viz = new $jit.Viz(options); - //load JSON data - viz.loadJSON(json); - //access model - viz.graph; // instance - (end code) - - Implements: - - The following methods are implemented in - - - - - - - - - - - - - - - - -*/ - -$jit.Graph = new Class({ - - initialize: function(opt, Node, Edge, Label) { - var innerOptions = { - 'complex': false, - 'Node': {} - }; - this.Node = Node; - this.Edge = Edge; - this.Label = Label; - this.opt = $.merge(innerOptions, opt || {}); - this.nodes = {}; - this.edges = {}; - - //add nodeList methods - var that = this; - this.nodeList = {}; - for(var p in Accessors) { - that.nodeList[p] = (function(p) { - return function() { - var args = Array.prototype.slice.call(arguments); - that.eachNode(function(n) { - n[p].apply(n, args); - }); - }; - })(p); - } - - }, - -/* - Method: getNode - - Returns a by *id*. - - Parameters: - - id - (string) A id. - - Example: - - (start code js) - var node = graph.getNode('nodeId'); - (end code) -*/ - getNode: function(id) { - if(this.hasNode(id)) return this.nodes[id]; - return false; - }, - - /* - Method: getByName - - Returns a by *name*. - - Parameters: - - name - (string) A name. - - Example: - - (start code js) - var node = graph.getByName('someName'); - (end code) - */ - getByName: function(name) { - for(var id in this.nodes) { - var n = this.nodes[id]; - if(n.name == name) return n; - } - return false; - }, - -/* - Method: getAdjacence - - Returns a object connecting nodes with ids *id* and *id2*. - - Parameters: - - id - (string) A id. - id2 - (string) A id. -*/ - getAdjacence: function (id, id2) { - if(id in this.edges) { - return this.edges[id][id2]; - } - return false; - }, - - /* - Method: addNode - - Adds a node. - - Parameters: - - obj - An object with the properties described below - - id - (string) A node id - name - (string) A node's name - data - (object) A node's data hash - - See also: - - - */ - addNode: function(obj) { - if(!this.nodes[obj.id]) { - var edges = this.edges[obj.id] = {}; - this.nodes[obj.id] = new Graph.Node($.extend({ - 'id': obj.id, - 'name': obj.name, - 'data': $.merge(obj.data || {}, {}), - 'adjacencies': edges - }, this.opt.Node), - this.opt.complex, - this.Node, - this.Edge, - this.Label); - } - return this.nodes[obj.id]; - }, - - /* - Method: addAdjacence - - Connects nodes specified by *obj* and *obj2*. If not found, nodes are created. - - Parameters: - - obj - (object) A object. - obj2 - (object) Another object. - data - (object) A data object. Used to store some extra information in the object created. - - See also: - - , - */ - addAdjacence: function (obj, obj2, data) { - if(!this.hasNode(obj.id)) { this.addNode(obj); } - if(!this.hasNode(obj2.id)) { this.addNode(obj2); } - obj = this.nodes[obj.id]; obj2 = this.nodes[obj2.id]; - if(!obj.adjacentTo(obj2)) { - var adjsObj = this.edges[obj.id] = this.edges[obj.id] || {}; - var adjsObj2 = this.edges[obj2.id] = this.edges[obj2.id] || {}; - adjsObj[obj2.id] = adjsObj2[obj.id] = new Graph.Adjacence(obj, obj2, data, this.Edge, this.Label); - return adjsObj[obj2.id]; - } - return this.edges[obj.id][obj2.id]; - }, - - /* - Method: removeNode - - Removes a matching the specified *id*. - - Parameters: - - id - (string) A node's id. - - */ - removeNode: function(id) { - if(this.hasNode(id)) { - delete this.nodes[id]; - var adjs = this.edges[id]; - for(var to in adjs) { - delete this.edges[to][id]; - } - delete this.edges[id]; - } - }, - -/* - Method: removeAdjacence - - Removes a matching *id1* and *id2*. - - Parameters: - - id1 - (string) A id. - id2 - (string) A id. -*/ - removeAdjacence: function(id1, id2) { - delete this.edges[id1][id2]; - delete this.edges[id2][id1]; - }, - - /* - Method: hasNode - - Returns a boolean indicating if the node belongs to the or not. - - Parameters: - - id - (string) Node id. - */ - hasNode: function(id) { - return id in this.nodes; - }, - - /* - Method: empty - - Empties the Graph - - */ - empty: function() { this.nodes = {}; this.edges = {};} - -}); - -var Graph = $jit.Graph; - -/* - Object: Accessors - - Defines a set of methods for data, canvas and label styles manipulation implemented by and instances. - - */ -var Accessors; - -(function () { - var getDataInternal = function(prefix, prop, type, force, prefixConfig) { - var data; - type = type || 'current'; - prefix = "$" + (prefix ? prefix + "-" : ""); - - if(type == 'current') { - data = this.data; - } else if(type == 'start') { - data = this.startData; - } else if(type == 'end') { - data = this.endData; - } - - var dollar = prefix + prop; - - if(force) { - return data[dollar]; - } - - if(!this.Config.overridable) - return prefixConfig[prop] || 0; - - return (dollar in data) ? - data[dollar] : ((dollar in this.data) ? this.data[dollar] : (prefixConfig[prop] || 0)); - } - - var setDataInternal = function(prefix, prop, value, type) { - type = type || 'current'; - prefix = '$' + (prefix ? prefix + '-' : ''); - - var data; - - if(type == 'current') { - data = this.data; - } else if(type == 'start') { - data = this.startData; - } else if(type == 'end') { - data = this.endData; - } - - data[prefix + prop] = value; - } - - var removeDataInternal = function(prefix, properties) { - prefix = '$' + (prefix ? prefix + '-' : ''); - var that = this; - $.each(properties, function(prop) { - var pref = prefix + prop; - delete that.data[pref]; - delete that.endData[pref]; - delete that.startData[pref]; - }); - } - - Accessors = { - /* - Method: getData - - Returns the specified data value property. - This is useful for querying special/reserved data properties - (i.e dollar prefixed properties). - - Parameters: - - prop - (string) The name of the property. The dollar sign is not needed. For - example *getData(width)* will return *data.$width*. - type - (string) The type of the data property queried. Default's "current". You can access *start* and *end* - data properties also. These properties are used when making animations. - force - (boolean) Whether to obtain the true value of the property (equivalent to - *data.$prop*) or to check for *node.overridable = true* first. - - Returns: - - The value of the dollar prefixed property or the global Node/Edge property - value if *overridable=false* - - Example: - (start code js) - node.getData('width'); //will return node.data.$width if Node.overridable=true; - (end code) - */ - getData: function(prop, type, force) { - return getDataInternal.call(this, "", prop, type, force, this.Config); - }, - - - /* - Method: setData - - Sets the current data property with some specific value. - This method is only useful for reserved (dollar prefixed) properties. - - Parameters: - - prop - (string) The name of the property. The dollar sign is not necessary. For - example *setData(width)* will set *data.$width*. - value - (mixed) The value to store. - type - (string) The type of the data property to store. Default's "current" but - can also be "start" or "end". - - Example: - - (start code js) - node.setData('width', 30); - (end code) - - If we were to make an animation of a node/edge width then we could do - - (start code js) - var node = viz.getNode('nodeId'); - //set start and end values - node.setData('width', 10, 'start'); - node.setData('width', 30, 'end'); - //will animate nodes width property - viz.fx.animate({ - modes: ['node-property:width'], - duration: 1000 - }); - (end code) - */ - setData: function(prop, value, type) { - setDataInternal.call(this, "", prop, value, type); - }, - - /* - Method: setDataset - - Convenience method to set multiple data values at once. - - Parameters: - - types - (array|string) A set of 'current', 'end' or 'start' values. - obj - (object) A hash containing the names and values of the properties to be altered. - - Example: - (start code js) - node.setDataset(['current', 'end'], { - 'width': [100, 5], - 'color': ['#fff', '#ccc'] - }); - //...or also - node.setDataset('end', { - 'width': 5, - 'color': '#ccc' - }); - (end code) - - See also: - - - - */ - setDataset: function(types, obj) { - types = $.splat(types); - for(var attr in obj) { - for(var i=0, val = $.splat(obj[attr]), l=types.length; i canvas style data properties (i.e. - dollar prefixed properties that match with $canvas-). - - Parameters: - - prop - (string) The name of the property. The dollar sign is not needed. For - example *getCanvasStyle(shadowBlur)* will return *data[$canvas-shadowBlur]*. - type - (string) The type of the data property queried. Default's *current*. You can access *start* and *end* - data properties also. - - Example: - (start code js) - node.getCanvasStyle('shadowBlur'); - (end code) - - See also: - - - */ - getCanvasStyle: function(prop, type, force) { - return getDataInternal.call( - this, 'canvas', prop, type, force, this.Config.CanvasStyles); - }, - - /* - Method: setCanvasStyle - - Sets the canvas style data property with some specific value. - This method is only useful for reserved (dollar prefixed) properties. - - Parameters: - - prop - (string) Name of the property. Can be any canvas property like 'shadowBlur', 'shadowColor', 'strokeStyle', etc. - value - (mixed) The value to set to the property. - type - (string) Default's *current*. Whether to set *start*, *current* or *end* type properties. - - Example: - - (start code js) - node.setCanvasStyle('shadowBlur', 30); - (end code) - - If we were to make an animation of a node/edge shadowBlur canvas style then we could do - - (start code js) - var node = viz.getNode('nodeId'); - //set start and end values - node.setCanvasStyle('shadowBlur', 10, 'start'); - node.setCanvasStyle('shadowBlur', 30, 'end'); - //will animate nodes canvas style property for nodes - viz.fx.animate({ - modes: ['node-style:shadowBlur'], - duration: 1000 - }); - (end code) - - See also: - - . - */ - setCanvasStyle: function(prop, value, type) { - setDataInternal.call(this, 'canvas', prop, value, type); - }, - - /* - Method: setCanvasStyles - - Convenience method to set multiple styles at once. - - Parameters: - - types - (array|string) A set of 'current', 'end' or 'start' values. - obj - (object) A hash containing the names and values of the properties to be altered. - - See also: - - . - */ - setCanvasStyles: function(types, obj) { - types = $.splat(types); - for(var attr in obj) { - for(var i=0, val = $.splat(obj[attr]), l=types.length; i. - */ - removeCanvasStyle: function() { - removeDataInternal.call(this, 'canvas', Array.prototype.slice.call(arguments)); - }, - - /* - Method: getLabelData - - Returns the specified label data value property. This is useful for - querying special/reserved label options (i.e. - dollar prefixed properties that match with $label-). - - Parameters: - - prop - (string) The name of the property. The dollar sign prefix is not needed. For - example *getLabelData(size)* will return *data[$label-size]*. - type - (string) The type of the data property queried. Default's *current*. You can access *start* and *end* - data properties also. - - See also: - - . - */ - getLabelData: function(prop, type, force) { - return getDataInternal.call( - this, 'label', prop, type, force, this.Label); - }, - - /* - Method: setLabelData - - Sets the current label data with some specific value. - This method is only useful for reserved (dollar prefixed) properties. - - Parameters: - - prop - (string) Name of the property. Can be any canvas property like 'shadowBlur', 'shadowColor', 'strokeStyle', etc. - value - (mixed) The value to set to the property. - type - (string) Default's *current*. Whether to set *start*, *current* or *end* type properties. - - Example: - - (start code js) - node.setLabelData('size', 30); - (end code) - - If we were to make an animation of a node label size then we could do - - (start code js) - var node = viz.getNode('nodeId'); - //set start and end values - node.setLabelData('size', 10, 'start'); - node.setLabelData('size', 30, 'end'); - //will animate nodes label size - viz.fx.animate({ - modes: ['label-property:size'], - duration: 1000 - }); - (end code) - - See also: - - . - */ - setLabelData: function(prop, value, type) { - setDataInternal.call(this, 'label', prop, value, type); - }, - - /* - Method: setLabelDataset - - Convenience function to set multiple label data at once. - - Parameters: - - types - (array|string) A set of 'current', 'end' or 'start' values. - obj - (object) A hash containing the names and values of the properties to be altered. - - See also: - - . - */ - setLabelDataset: function(types, obj) { - types = $.splat(types); - for(var attr in obj) { - for(var i=0, val = $.splat(obj[attr]), l=types.length; i. - */ - removeLabelData: function() { - removeDataInternal.call(this, 'label', Array.prototype.slice.call(arguments)); - } - }; -})(); - -/* - Class: Graph.Node - - A node. - - Implements: - - methods. - - The following methods are implemented by - - - - - - - - - - - - - - - - - -*/ -Graph.Node = new Class({ - - initialize: function(opt, complex, Node, Edge, Label) { - var innerOptions = { - 'id': '', - 'name': '', - 'data': {}, - 'startData': {}, - 'endData': {}, - 'adjacencies': {}, - - 'selected': false, - 'drawn': false, - 'exist': false, - - 'angleSpan': { - 'begin': 0, - 'end' : 0 - }, - - 'pos': (complex && $C(0, 0)) || $P(0, 0), - 'startPos': (complex && $C(0, 0)) || $P(0, 0), - 'endPos': (complex && $C(0, 0)) || $P(0, 0) - }; - - $.extend(this, $.extend(innerOptions, opt)); - this.Config = this.Node = Node; - this.Edge = Edge; - this.Label = Label; - }, - - /* - Method: adjacentTo - - Indicates if the node is adjacent to the node specified by id - - Parameters: - - id - (string) A node id. - - Example: - (start code js) - node.adjacentTo('nodeId') == true; - (end code) - */ - adjacentTo: function(node) { - return node.id in this.adjacencies; - }, - - /* - Method: getAdjacency - - Returns a object connecting the current and the node having *id* as id. - - Parameters: - - id - (string) A node id. - */ - getAdjacency: function(id) { - return this.adjacencies[id]; - }, - - /* - Method: getPos - - Returns the position of the node. - - Parameters: - - type - (string) Default's *current*. Possible values are "start", "end" or "current". - - Returns: - - A or instance. - - Example: - (start code js) - var pos = node.getPos('end'); - (end code) - */ - getPos: function(type) { - type = type || "current"; - if(type == "current") { - return this.pos; - } else if(type == "end") { - return this.endPos; - } else if(type == "start") { - return this.startPos; - } - }, - /* - Method: setPos - - Sets the node's position. - - Parameters: - - value - (object) A or instance. - type - (string) Default's *current*. Possible values are "start", "end" or "current". - - Example: - (start code js) - node.setPos(new $jit.Complex(0, 0), 'end'); - (end code) - */ - setPos: function(value, type) { - type = type || "current"; - var pos; - if(type == "current") { - pos = this.pos; - } else if(type == "end") { - pos = this.endPos; - } else if(type == "start") { - pos = this.startPos; - } - pos.set(value); - } -}); - -Graph.Node.implement(Accessors); - -/* - Class: Graph.Adjacence - - A adjacence (or edge) connecting two . - - Implements: - - methods. - - See also: - - , - - Properties: - - nodeFrom - A connected by this edge. - nodeTo - Another connected by this edge. - data - Node data property containing a hash (i.e {}) with custom options. -*/ -Graph.Adjacence = new Class({ - - initialize: function(nodeFrom, nodeTo, data, Edge, Label) { - this.nodeFrom = nodeFrom; - this.nodeTo = nodeTo; - this.data = data || {}; - this.startData = {}; - this.endData = {}; - this.Config = this.Edge = Edge; - this.Label = Label; - } -}); - -Graph.Adjacence.implement(Accessors); - -/* - Object: Graph.Util - - traversal and processing utility object. - - Note: - - For your convenience some of these methods have also been appended to and classes. -*/ -Graph.Util = { - /* - filter - - For internal use only. Provides a filtering function based on flags. - */ - filter: function(param) { - if(!param || !($.type(param) == 'string')) return function() { return true; }; - var props = param.split(" "); - return function(elem) { - for(var i=0; i by *id*. - - Also implemented by: - - - - Parameters: - - graph - (object) A instance. - id - (string) A id. - - Example: - - (start code js) - $jit.Graph.Util.getNode(graph, 'nodeid'); - //or... - graph.getNode('nodeid'); - (end code) - */ - getNode: function(graph, id) { - return graph.nodes[id]; - }, - - /* - Method: eachNode - - Iterates over nodes performing an *action*. - - Also implemented by: - - . - - Parameters: - - graph - (object) A instance. - action - (function) A callback function having a as first formal parameter. - - Example: - (start code js) - $jit.Graph.Util.eachNode(graph, function(node) { - alert(node.name); - }); - //or... - graph.eachNode(function(node) { - alert(node.name); - }); - (end code) - */ - eachNode: function(graph, action, flags) { - var filter = this.filter(flags); - for(var i in graph.nodes) { - if(filter(graph.nodes[i])) action(graph.nodes[i]); - } - }, - - /* - Method: eachAdjacency - - Iterates over adjacencies applying the *action* function. - - Also implemented by: - - . - - Parameters: - - node - (object) A . - action - (function) A callback function having as first formal parameter. - - Example: - (start code js) - $jit.Graph.Util.eachAdjacency(node, function(adj) { - alert(adj.nodeTo.name); - }); - //or... - node.eachAdjacency(function(adj) { - alert(adj.nodeTo.name); - }); - (end code) - */ - eachAdjacency: function(node, action, flags) { - var adj = node.adjacencies, filter = this.filter(flags); - for(var id in adj) { - var a = adj[id]; - if(filter(a)) { - if(a.nodeFrom != node) { - var tmp = a.nodeFrom; - a.nodeFrom = a.nodeTo; - a.nodeTo = tmp; - } - action(a, id); - } - } - }, - - /* - Method: computeLevels - - Performs a BFS traversal setting the correct depth for each node. - - Also implemented by: - - . - - Note: - - The depth of each node can then be accessed by - >node._depth - - Parameters: - - graph - (object) A . - id - (string) A starting node id for the BFS traversal. - startDepth - (optional|number) A minimum depth value. Default's 0. - - */ - computeLevels: function(graph, id, startDepth, flags) { - startDepth = startDepth || 0; - var filter = this.filter(flags); - this.eachNode(graph, function(elem) { - elem._flag = false; - elem._depth = -1; - }, flags); - var root = graph.getNode(id); - root._depth = startDepth; - var queue = [root]; - while(queue.length != 0) { - var node = queue.pop(); - node._flag = true; - this.eachAdjacency(node, function(adj) { - var n = adj.nodeTo; - if(n._flag == false && filter(n)) { - if(n._depth < 0) n._depth = node._depth + 1 + startDepth; - queue.unshift(n); - } - }, flags); - } - }, - - /* - Method: eachBFS - - Performs a BFS traversal applying *action* to each . - - Also implemented by: - - . - - Parameters: - - graph - (object) A . - id - (string) A starting node id for the BFS traversal. - action - (function) A callback function having a as first formal parameter. - - Example: - (start code js) - $jit.Graph.Util.eachBFS(graph, 'mynodeid', function(node) { - alert(node.name); - }); - //or... - graph.eachBFS('mynodeid', function(node) { - alert(node.name); - }); - (end code) - */ - eachBFS: function(graph, id, action, flags) { - var filter = this.filter(flags); - this.clean(graph); - var queue = [graph.getNode(id)]; - while(queue.length != 0) { - var node = queue.pop(); - node._flag = true; - action(node, node._depth); - this.eachAdjacency(node, function(adj) { - var n = adj.nodeTo; - if(n._flag == false && filter(n)) { - n._flag = true; - queue.unshift(n); - } - }, flags); - } - }, - - /* - Method: eachLevel - - Iterates over a node's subgraph applying *action* to the nodes of relative depth between *levelBegin* and *levelEnd*. - - Also implemented by: - - . - - Parameters: - - node - (object) A . - levelBegin - (number) A relative level value. - levelEnd - (number) A relative level value. - action - (function) A callback function having a as first formal parameter. - - */ - eachLevel: function(node, levelBegin, levelEnd, action, flags) { - var d = node._depth, filter = this.filter(flags), that = this; - levelEnd = levelEnd === false? Number.MAX_VALUE -d : levelEnd; - (function loopLevel(node, levelBegin, levelEnd) { - var d = node._depth; - if(d >= levelBegin && d <= levelEnd && filter(node)) action(node, d); - if(d < levelEnd) { - that.eachAdjacency(node, function(adj) { - var n = adj.nodeTo; - if(n._depth > d) loopLevel(n, levelBegin, levelEnd); - }); - } - })(node, levelBegin + d, levelEnd + d); - }, - - /* - Method: eachSubgraph - - Iterates over a node's children recursively. - - Also implemented by: - - . - - Parameters: - node - (object) A . - action - (function) A callback function having a as first formal parameter. - - Example: - (start code js) - $jit.Graph.Util.eachSubgraph(node, function(node) { - alert(node.name); - }); - //or... - node.eachSubgraph(function(node) { - alert(node.name); - }); - (end code) - */ - eachSubgraph: function(node, action, flags) { - this.eachLevel(node, 0, false, action, flags); - }, - - /* - Method: eachSubnode - - Iterates over a node's children (without deeper recursion). - - Also implemented by: - - . - - Parameters: - node - (object) A . - action - (function) A callback function having a as first formal parameter. - - Example: - (start code js) - $jit.Graph.Util.eachSubnode(node, function(node) { - alert(node.name); - }); - //or... - node.eachSubnode(function(node) { - alert(node.name); - }); - (end code) - */ - eachSubnode: function(node, action, flags) { - this.eachLevel(node, 1, 1, action, flags); - }, - - /* - Method: anySubnode - - Returns *true* if any subnode matches the given condition. - - Also implemented by: - - . - - Parameters: - node - (object) A . - cond - (function) A callback function returning a Boolean instance. This function has as first formal parameter a . - - Example: - (start code js) - $jit.Graph.Util.anySubnode(node, function(node) { return node.name == "mynodename"; }); - //or... - node.anySubnode(function(node) { return node.name == 'mynodename'; }); - (end code) - */ - anySubnode: function(node, cond, flags) { - var flag = false; - cond = cond || $.lambda(true); - var c = $.type(cond) == 'string'? function(n) { return n[cond]; } : cond; - this.eachSubnode(node, function(elem) { - if(c(elem)) flag = true; - }, flags); - return flag; - }, - - /* - Method: getSubnodes - - Collects all subnodes for a specified node. - The *level* parameter filters nodes having relative depth of *level* from the root node. - - Also implemented by: - - . - - Parameters: - node - (object) A . - level - (optional|number) Default's *0*. A starting relative depth for collecting nodes. - - Returns: - An array of nodes. - - */ - getSubnodes: function(node, level, flags) { - var ans = [], that = this; - level = level || 0; - var levelStart, levelEnd; - if($.type(level) == 'array') { - levelStart = level[0]; - levelEnd = level[1]; - } else { - levelStart = level; - levelEnd = Number.MAX_VALUE - node._depth; - } - this.eachLevel(node, levelStart, levelEnd, function(n) { - ans.push(n); - }, flags); - return ans; - }, - - - /* - Method: getParents - - Returns an Array of which are parents of the given node. - - Also implemented by: - - . - - Parameters: - node - (object) A . - - Returns: - An Array of . - - Example: - (start code js) - var pars = $jit.Graph.Util.getParents(node); - //or... - var pars = node.getParents(); - - if(pars.length > 0) { - //do stuff with parents - } - (end code) - */ - getParents: function(node) { - var ans = []; - this.eachAdjacency(node, function(adj) { - var n = adj.nodeTo; - if(n._depth < node._depth) ans.push(n); - }); - return ans; - }, - - /* - Method: isDescendantOf - - Returns a boolean indicating if some node is descendant of the node with the given id. - - Also implemented by: - - . - - - Parameters: - node - (object) A . - id - (string) A id. - - Example: - (start code js) - $jit.Graph.Util.isDescendantOf(node, "nodeid"); //true|false - //or... - node.isDescendantOf('nodeid');//true|false - (end code) - */ - isDescendantOf: function(node, id) { - if(node.id == id) return true; - var pars = this.getParents(node), ans = false; - for ( var i = 0; !ans && i < pars.length; i++) { - ans = ans || this.isDescendantOf(pars[i], id); - } - return ans; - }, - - /* - Method: clean - - Cleans flags from nodes. - - Also implemented by: - - . - - Parameters: - graph - A instance. - */ - clean: function(graph) { this.eachNode(graph, function(elem) { elem._flag = false; }); }, - - /* - Method: getClosestNodeToOrigin - - Returns the closest node to the center of canvas. - - Also implemented by: - - . - - Parameters: - - graph - (object) A instance. - prop - (optional|string) Default's 'current'. A position property. Possible properties are 'start', 'current' or 'end'. - - */ - getClosestNodeToOrigin: function(graph, prop, flags) { - return this.getClosestNodeToPos(graph, Polar.KER, prop, flags); - }, - - /* - Method: getClosestNodeToPos - - Returns the closest node to the given position. - - Also implemented by: - - . - - Parameters: - - graph - (object) A instance. - pos - (object) A or instance. - prop - (optional|string) Default's *current*. A position property. Possible properties are 'start', 'current' or 'end'. - - */ - getClosestNodeToPos: function(graph, pos, prop, flags) { - var node = null; - prop = prop || 'current'; - pos = pos && pos.getc(true) || Complex.KER; - var distance = function(a, b) { - var d1 = a.x - b.x, d2 = a.y - b.y; - return d1 * d1 + d2 * d2; - }; - this.eachNode(graph, function(elem) { - node = (node == null || distance(elem.getPos(prop).getc(true), pos) < distance( - node.getPos(prop).getc(true), pos)) ? elem : node; - }, flags); - return node; - } -}; - -//Append graph methods to -$.each(['getNode', 'eachNode', 'computeLevels', 'eachBFS', 'clean', 'getClosestNodeToPos', 'getClosestNodeToOrigin'], function(m) { - Graph.prototype[m] = function() { - return Graph.Util[m].apply(Graph.Util, [this].concat(Array.prototype.slice.call(arguments))); - }; -}); - -//Append node methods to -$.each(['eachAdjacency', 'eachLevel', 'eachSubgraph', 'eachSubnode', 'anySubnode', 'getSubnodes', 'getParents', 'isDescendantOf'], function(m) { - Graph.Node.prototype[m] = function() { - return Graph.Util[m].apply(Graph.Util, [this].concat(Array.prototype.slice.call(arguments))); - }; -}); - -/* - * File: Graph.Op.js - * -*/ - -/* - Object: Graph.Op - - Perform operations like adding/removing or , - morphing a into another , contracting or expanding subtrees, etc. - -*/ -Graph.Op = { - - options: { - type: 'nothing', - duration: 2000, - hideLabels: true, - fps:30 - }, - - initialize: function(viz) { - this.viz = viz; - }, - - /* - Method: removeNode - - Removes one or more from the visualization. - It can also perform several animations like fading sequentially, fading concurrently, iterating or replotting. - - Parameters: - - node - (string|array) The node's id. Can also be an array having many ids. - opt - (object) Animation options. It's an object with optional properties described below - type - (string) Default's *nothing*. Type of the animation. Can be "nothing", "replot", "fade:seq", "fade:con" or "iter". - duration - Described in . - fps - Described in . - transition - Described in . - hideLabels - (boolean) Default's *true*. Hide labels during the animation. - - Example: - (start code js) - var viz = new $jit.Viz(options); - viz.op.removeNode('nodeId', { - type: 'fade:seq', - duration: 1000, - hideLabels: false, - transition: $jit.Trans.Quart.easeOut - }); - //or also - viz.op.removeNode(['someId', 'otherId'], { - type: 'fade:con', - duration: 1500 - }); - (end code) - */ - - removeNode: function(node, opt) { - var viz = this.viz; - var options = $.merge(this.options, viz.controller, opt); - var n = $.splat(node); - var i, that, nodeObj; - switch(options.type) { - case 'nothing': - for(i=0; i from the visualization. - It can also perform several animations like fading sequentially, fading concurrently, iterating or replotting. - - Parameters: - - vertex - (array) An array having two strings which are the ids of the nodes connected by this edge (i.e ['id1', 'id2']). Can also be a two dimensional array holding many edges (i.e [['id1', 'id2'], ['id3', 'id4'], ...]). - opt - (object) Animation options. It's an object with optional properties described below - type - (string) Default's *nothing*. Type of the animation. Can be "nothing", "replot", "fade:seq", "fade:con" or "iter". - duration - Described in . - fps - Described in . - transition - Described in . - hideLabels - (boolean) Default's *true*. Hide labels during the animation. - - Example: - (start code js) - var viz = new $jit.Viz(options); - viz.op.removeEdge(['nodeId', 'otherId'], { - type: 'fade:seq', - duration: 1000, - hideLabels: false, - transition: $jit.Trans.Quart.easeOut - }); - //or also - viz.op.removeEdge([['someId', 'otherId'], ['id3', 'id4']], { - type: 'fade:con', - duration: 1500 - }); - (end code) - - */ - removeEdge: function(vertex, opt) { - var viz = this.viz; - var options = $.merge(this.options, viz.controller, opt); - var v = ($.type(vertex[0]) == 'string')? [vertex] : vertex; - var i, that, adj; - switch(options.type) { - case 'nothing': - for(i=0; i - - Parameters: - - json - (object) A json tree or graph structure. See also . - opt - (object) Animation options. It's an object with optional properties described below - type - (string) Default's *nothing*. Type of the animation. Can be "nothing", "replot", "fade:seq", "fade:con". - duration - Described in . - fps - Described in . - transition - Described in . - hideLabels - (boolean) Default's *true*. Hide labels during the animation. - - Example: - (start code js) - //...json contains a tree or graph structure... - - var viz = new $jit.Viz(options); - viz.op.sum(json, { - type: 'fade:seq', - duration: 1000, - hideLabels: false, - transition: $jit.Trans.Quart.easeOut - }); - //or also - viz.op.sum(json, { - type: 'fade:con', - duration: 1500 - }); - (end code) - - */ - sum: function(json, opt) { - var viz = this.viz; - var options = $.merge(this.options, viz.controller, opt), root = viz.root; - var graph; - viz.root = opt.id || viz.root; - switch(options.type) { - case 'nothing': - graph = viz.construct(json); - graph.eachNode(function(elem) { - elem.eachAdjacency(function(adj) { - viz.graph.addAdjacence(adj.nodeFrom, adj.nodeTo, adj.data); - }); - }); - break; - - case 'replot': - viz.refresh(true); - this.sum(json, { type: 'nothing' }); - viz.refresh(true); - break; - - case 'fade:seq': case 'fade': case 'fade:con': - that = this; - graph = viz.construct(json); - - //set alpha to 0 for nodes to add. - var fadeEdges = this.preprocessSum(graph); - var modes = !fadeEdges? ['node-property:alpha'] : ['node-property:alpha', 'edge-property:alpha']; - viz.reposition(); - if(options.type != 'fade:con') { - viz.fx.animate($.merge(options, { - modes: ['linear'], - onComplete: function() { - viz.fx.animate($.merge(options, { - modes: modes, - onComplete: function() { - options.onComplete(); - } - })); - } - })); - } else { - viz.graph.eachNode(function(elem) { - if (elem.id != root && elem.pos.getp().equals(Polar.KER)) { - elem.pos.set(elem.endPos); elem.startPos.set(elem.endPos); - } - }); - viz.fx.animate($.merge(options, { - modes: ['linear'].concat(modes) - })); - } - break; - - default: this.doError(); - } - }, - - /* - Method: morph - - This method will transform the current visualized graph into the new JSON representation passed in the method. - The JSON object must at least have the root node in common with the current visualized graph. - - Parameters: - - json - (object) A json tree or graph structure. See also . - opt - (object) Animation options. It's an object with optional properties described below - type - (string) Default's *nothing*. Type of the animation. Can be "nothing", "replot", "fade:con". - duration - Described in . - fps - Described in . - transition - Described in . - hideLabels - (boolean) Default's *true*. Hide labels during the animation. - id - (string) The shared id between both graphs. - - extraModes - (optional|object) When morphing with an animation, dollar prefixed data parameters are added to - *endData* and not *data* itself. This way you can animate dollar prefixed parameters during your morphing operation. - For animating these extra-parameters you have to specify an object that has animation groups as keys and animation - properties as values, just like specified in . - - Example: - (start code js) - //...json contains a tree or graph structure... - - var viz = new $jit.Viz(options); - viz.op.morph(json, { - type: 'fade', - duration: 1000, - hideLabels: false, - transition: $jit.Trans.Quart.easeOut - }); - //or also - viz.op.morph(json, { - type: 'fade', - duration: 1500 - }); - //if the json data contains dollar prefixed params - //like $width or $height these too can be animated - viz.op.morph(json, { - type: 'fade', - duration: 1500 - }, { - 'node-property': ['width', 'height'] - }); - (end code) - - */ - morph: function(json, opt, extraModes) { - var viz = this.viz; - var options = $.merge(this.options, viz.controller, opt), root = viz.root; - var graph; - //TODO(nico) this hack makes morphing work with the Hypertree. - //Need to check if it has been solved and this can be removed. - viz.root = opt.id || viz.root; - switch(options.type) { - case 'nothing': - graph = viz.construct(json); - graph.eachNode(function(elem) { - var nodeExists = viz.graph.hasNode(elem.id); - elem.eachAdjacency(function(adj) { - var adjExists = !!viz.graph.getAdjacence(adj.nodeFrom.id, adj.nodeTo.id); - viz.graph.addAdjacence(adj.nodeFrom, adj.nodeTo, adj.data); - //Update data properties if the node existed - if(adjExists) { - var addedAdj = viz.graph.getAdjacence(adj.nodeFrom.id, adj.nodeTo.id); - for(var prop in (adj.data || {})) { - addedAdj.data[prop] = adj.data[prop]; - } - } - }); - //Update data properties if the node existed - if(nodeExists) { - var addedNode = viz.graph.getNode(elem.id); - for(var prop in (elem.data || {})) { - addedNode.data[prop] = elem.data[prop]; - } - } - }); - viz.graph.eachNode(function(elem) { - elem.eachAdjacency(function(adj) { - if(!graph.getAdjacence(adj.nodeFrom.id, adj.nodeTo.id)) { - viz.graph.removeAdjacence(adj.nodeFrom.id, adj.nodeTo.id); - } - }); - if(!graph.hasNode(elem.id)) viz.graph.removeNode(elem.id); - }); - - break; - - case 'replot': - viz.labels.clearLabels(true); - this.morph(json, { type: 'nothing' }); - viz.refresh(true); - viz.refresh(true); - break; - - case 'fade:seq': case 'fade': case 'fade:con': - that = this; - graph = viz.construct(json); - //preprocessing for nodes to delete. - //get node property modes to interpolate - var nodeModes = extraModes && ('node-property' in extraModes) - && $.map($.splat(extraModes['node-property']), - function(n) { return '$' + n; }); - viz.graph.eachNode(function(elem) { - var graphNode = graph.getNode(elem.id); - if(!graphNode) { - elem.setData('alpha', 1); - elem.setData('alpha', 1, 'start'); - elem.setData('alpha', 0, 'end'); - elem.ignore = true; - } else { - //Update node data information - var graphNodeData = graphNode.data; - for(var prop in graphNodeData) { - if(nodeModes && ($.indexOf(nodeModes, prop) > -1)) { - elem.endData[prop] = graphNodeData[prop]; - } else { - elem.data[prop] = graphNodeData[prop]; - } - } - } - }); - viz.graph.eachNode(function(elem) { - if(elem.ignore) return; - elem.eachAdjacency(function(adj) { - if(adj.nodeFrom.ignore || adj.nodeTo.ignore) return; - var nodeFrom = graph.getNode(adj.nodeFrom.id); - var nodeTo = graph.getNode(adj.nodeTo.id); - if(!nodeFrom.adjacentTo(nodeTo)) { - var adj = viz.graph.getAdjacence(nodeFrom.id, nodeTo.id); - fadeEdges = true; - adj.setData('alpha', 1); - adj.setData('alpha', 1, 'start'); - adj.setData('alpha', 0, 'end'); - } - }); - }); - //preprocessing for adding nodes. - var fadeEdges = this.preprocessSum(graph); - - var modes = !fadeEdges? ['node-property:alpha'] : - ['node-property:alpha', - 'edge-property:alpha']; - //Append extra node-property animations (if any) - modes[0] = modes[0] + ((extraModes && ('node-property' in extraModes))? - (':' + $.splat(extraModes['node-property']).join(':')) : ''); - //Append extra edge-property animations (if any) - modes[1] = (modes[1] || 'edge-property:alpha') + ((extraModes && ('edge-property' in extraModes))? - (':' + $.splat(extraModes['edge-property']).join(':')) : ''); - //Add label-property animations (if any) - if(extraModes && ('label-property' in extraModes)) { - modes.push('label-property:' + $.splat(extraModes['label-property']).join(':')) - } - viz.reposition(); - viz.graph.eachNode(function(elem) { - if (elem.id != root && elem.pos.getp().equals(Polar.KER)) { - elem.pos.set(elem.endPos); elem.startPos.set(elem.endPos); - } - }); - viz.fx.animate($.merge(options, { - modes: ['polar'].concat(modes), - onComplete: function() { - viz.graph.eachNode(function(elem) { - if(elem.ignore) viz.graph.removeNode(elem.id); - }); - viz.graph.eachNode(function(elem) { - elem.eachAdjacency(function(adj) { - if(adj.ignore) viz.graph.removeAdjacence(adj.nodeFrom.id, adj.nodeTo.id); - }); - }); - options.onComplete(); - } - })); - break; - - default:; - } - }, - - - /* - Method: contract - - Collapses the subtree of the given node. The node will have a _collapsed=true_ property. - - Parameters: - - node - (object) A . - opt - (object) An object containing options described below - type - (string) Whether to 'replot' or 'animate' the contraction. - - There are also a number of Animation options. For more information see . - - Example: - (start code js) - var viz = new $jit.Viz(options); - viz.op.contract(node, { - type: 'animate', - duration: 1000, - hideLabels: true, - transition: $jit.Trans.Quart.easeOut - }); - (end code) - - */ - contract: function(node, opt) { - var viz = this.viz; - if(node.collapsed || !node.anySubnode($.lambda(true))) return; - opt = $.merge(this.options, viz.config, opt || {}, { - 'modes': ['node-property:alpha:span', 'linear'] - }); - node.collapsed = true; - (function subn(n) { - n.eachSubnode(function(ch) { - ch.ignore = true; - ch.setData('alpha', 0, opt.type == 'animate'? 'end' : 'current'); - subn(ch); - }); - })(node); - if(opt.type == 'animate') { - viz.compute('end'); - if(viz.rotated) { - viz.rotate(viz.rotated, 'none', { - 'property':'end' - }); - } - (function subn(n) { - n.eachSubnode(function(ch) { - ch.setPos(node.getPos('end'), 'end'); - subn(ch); - }); - })(node); - viz.fx.animate(opt); - } else if(opt.type == 'replot'){ - viz.refresh(); - } - }, - - /* - Method: expand - - Expands the previously contracted subtree. The given node must have the _collapsed=true_ property. - - Parameters: - - node - (object) A . - opt - (object) An object containing options described below - type - (string) Whether to 'replot' or 'animate'. - - There are also a number of Animation options. For more information see . - - Example: - (start code js) - var viz = new $jit.Viz(options); - viz.op.expand(node, { - type: 'animate', - duration: 1000, - hideLabels: true, - transition: $jit.Trans.Quart.easeOut - }); - (end code) - - */ - expand: function(node, opt) { - if(!('collapsed' in node)) return; - var viz = this.viz; - opt = $.merge(this.options, viz.config, opt || {}, { - 'modes': ['node-property:alpha:span', 'linear'] - }); - delete node.collapsed; - (function subn(n) { - n.eachSubnode(function(ch) { - delete ch.ignore; - ch.setData('alpha', 1, opt.type == 'animate'? 'end' : 'current'); - subn(ch); - }); - })(node); - if(opt.type == 'animate') { - viz.compute('end'); - if(viz.rotated) { - viz.rotate(viz.rotated, 'none', { - 'property':'end' - }); - } - viz.fx.animate(opt); - } else if(opt.type == 'replot'){ - viz.refresh(); - } - }, - - preprocessSum: function(graph) { - var viz = this.viz; - graph.eachNode(function(elem) { - if(!viz.graph.hasNode(elem.id)) { - viz.graph.addNode(elem); - var n = viz.graph.getNode(elem.id); - n.setData('alpha', 0); - n.setData('alpha', 0, 'start'); - n.setData('alpha', 1, 'end'); - } - }); - var fadeEdges = false; - graph.eachNode(function(elem) { - elem.eachAdjacency(function(adj) { - var nodeFrom = viz.graph.getNode(adj.nodeFrom.id); - var nodeTo = viz.graph.getNode(adj.nodeTo.id); - if(!nodeFrom.adjacentTo(nodeTo)) { - var adj = viz.graph.addAdjacence(nodeFrom, nodeTo, adj.data); - if(nodeFrom.startAlpha == nodeFrom.endAlpha - && nodeTo.startAlpha == nodeTo.endAlpha) { - fadeEdges = true; - adj.setData('alpha', 0); - adj.setData('alpha', 0, 'start'); - adj.setData('alpha', 1, 'end'); - } - } - }); - }); - return fadeEdges; - } -}; - - - -/* - File: Helpers.js - - Helpers are objects that contain rendering primitives (like rectangles, ellipses, etc), for plotting nodes and edges. - Helpers also contain implementations of the *contains* method, a method returning a boolean indicating whether the mouse - position is over the rendered shape. - - Helpers are very useful when implementing new NodeTypes, since you can access them through *this.nodeHelper* and - *this.edgeHelper* properties, providing you with simple primitives and mouse-position check functions. - - Example: - (start code js) - //implement a new node type - $jit.Viz.Plot.NodeTypes.implement({ - 'customNodeType': { - 'render': function(node, canvas) { - this.nodeHelper.circle.render ... - }, - 'contains': function(node, pos) { - this.nodeHelper.circle.contains ... - } - } - }); - //implement an edge type - $jit.Viz.Plot.EdgeTypes.implement({ - 'customNodeType': { - 'render': function(node, canvas) { - this.edgeHelper.circle.render ... - }, - //optional - 'contains': function(node, pos) { - this.edgeHelper.circle.contains ... - } - } - }); - (end code) - -*/ - -/* - Object: NodeHelper - - Contains rendering and other type of primitives for simple shapes. - */ -var NodeHelper = { - 'none': { - 'render': $.empty, - 'contains': $.lambda(false) - }, - /* - Object: NodeHelper.circle - */ - 'circle': { - /* - Method: render - - Renders a circle into the canvas. - - Parameters: - - type - (string) Possible options are 'fill' or 'stroke'. - pos - (object) An *x*, *y* object with the position of the center of the circle. - radius - (number) The radius of the circle to be rendered. - canvas - (object) A instance. - - Example: - (start code js) - NodeHelper.circle.render('fill', { x: 10, y: 30 }, 30, viz.canvas); - (end code) - */ - 'render': function(type, pos, radius, canvas){ - var ctx = canvas.getCtx(); - ctx.beginPath(); - ctx.arc(pos.x, pos.y, radius, 0, Math.PI * 2, true); - ctx.closePath(); - ctx[type](); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - npos - (object) An *x*, *y* object with the position. - pos - (object) An *x*, *y* object with the position to check. - radius - (number) The radius of the rendered circle. - - Example: - (start code js) - NodeHelper.circle.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30); //true - (end code) - */ - 'contains': function(npos, pos, radius){ - var diffx = npos.x - pos.x, - diffy = npos.y - pos.y, - diff = diffx * diffx + diffy * diffy; - return diff <= radius * radius; - } - }, - /* - Object: NodeHelper.ellipse - */ - 'ellipse': { - /* - Method: render - - Renders an ellipse into the canvas. - - Parameters: - - type - (string) Possible options are 'fill' or 'stroke'. - pos - (object) An *x*, *y* object with the position of the center of the ellipse. - width - (number) The width of the ellipse. - height - (number) The height of the ellipse. - canvas - (object) A instance. - - Example: - (start code js) - NodeHelper.ellipse.render('fill', { x: 10, y: 30 }, 30, 40, viz.canvas); - (end code) - */ - 'render': function(type, pos, width, height, canvas){ - var ctx = canvas.getCtx(); - height /= 2; - width /= 2; - ctx.save(); - ctx.scale(width / height, height / width); - ctx.beginPath(); - ctx.arc(pos.x * (height / width), pos.y * (width / height), height, 0, - Math.PI * 2, true); - ctx.closePath(); - ctx[type](); - ctx.restore(); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - npos - (object) An *x*, *y* object with the position. - pos - (object) An *x*, *y* object with the position to check. - width - (number) The width of the rendered ellipse. - height - (number) The height of the rendered ellipse. - - Example: - (start code js) - NodeHelper.ellipse.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30, 40); - (end code) - */ - 'contains': function(npos, pos, width, height){ - // TODO(nico): be more precise... - width /= 2; - height /= 2; - var dist = (width + height) / 2, - diffx = npos.x - pos.x, - diffy = npos.y - pos.y, - diff = diffx * diffx + diffy * diffy; - return diff <= dist * dist; - } - }, - /* - Object: NodeHelper.square - */ - 'square': { - /* - Method: render - - Renders a square into the canvas. - - Parameters: - - type - (string) Possible options are 'fill' or 'stroke'. - pos - (object) An *x*, *y* object with the position of the center of the square. - dim - (number) The radius (or half-diameter) of the square. - canvas - (object) A instance. - - Example: - (start code js) - NodeHelper.square.render('stroke', { x: 10, y: 30 }, 40, viz.canvas); - (end code) - */ - 'render': function(type, pos, dim, canvas){ - canvas.getCtx()[type + "Rect"](pos.x - dim, pos.y - dim, 2*dim, 2*dim); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - npos - (object) An *x*, *y* object with the position. - pos - (object) An *x*, *y* object with the position to check. - dim - (number) The radius (or half-diameter) of the square. - - Example: - (start code js) - NodeHelper.square.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30); - (end code) - */ - 'contains': function(npos, pos, dim){ - return Math.abs(pos.x - npos.x) <= dim && Math.abs(pos.y - npos.y) <= dim; - } - }, - /* - Object: NodeHelper.rectangle - */ - 'rectangle': { - /* - Method: render - - Renders a rectangle into the canvas. - - Parameters: - - type - (string) Possible options are 'fill' or 'stroke'. - pos - (object) An *x*, *y* object with the position of the center of the rectangle. - width - (number) The width of the rectangle. - height - (number) The height of the rectangle. - canvas - (object) A instance. - - Example: - (start code js) - NodeHelper.rectangle.render('fill', { x: 10, y: 30 }, 30, 40, viz.canvas); - (end code) - */ - 'render': function(type, pos, width, height, canvas){ - canvas.getCtx()[type + "Rect"](pos.x - width / 2, pos.y - height / 2, - width, height); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - npos - (object) An *x*, *y* object with the position. - pos - (object) An *x*, *y* object with the position to check. - width - (number) The width of the rendered rectangle. - height - (number) The height of the rendered rectangle. - - Example: - (start code js) - NodeHelper.rectangle.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30, 40); - (end code) - */ - 'contains': function(npos, pos, width, height){ - return Math.abs(pos.x - npos.x) <= width / 2 - && Math.abs(pos.y - npos.y) <= height / 2; - } - }, - /* - Object: NodeHelper.triangle - */ - 'triangle': { - /* - Method: render - - Renders a triangle into the canvas. - - Parameters: - - type - (string) Possible options are 'fill' or 'stroke'. - pos - (object) An *x*, *y* object with the position of the center of the triangle. - dim - (number) The dimension of the triangle. - canvas - (object) A instance. - - Example: - (start code js) - NodeHelper.triangle.render('stroke', { x: 10, y: 30 }, 40, viz.canvas); - (end code) - */ - 'render': function(type, pos, dim, canvas){ - var ctx = canvas.getCtx(), - c1x = pos.x, - c1y = pos.y - dim, - c2x = c1x - dim, - c2y = pos.y + dim, - c3x = c1x + dim, - c3y = c2y; - ctx.beginPath(); - ctx.moveTo(c1x, c1y); - ctx.lineTo(c2x, c2y); - ctx.lineTo(c3x, c3y); - ctx.closePath(); - ctx[type](); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - npos - (object) An *x*, *y* object with the position. - pos - (object) An *x*, *y* object with the position to check. - dim - (number) The dimension of the shape. - - Example: - (start code js) - NodeHelper.triangle.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30); - (end code) - */ - 'contains': function(npos, pos, dim) { - return NodeHelper.circle.contains(npos, pos, dim); - } - }, - /* - Object: NodeHelper.star - */ - 'star': { - /* - Method: render - - Renders a star into the canvas. - - Parameters: - - type - (string) Possible options are 'fill' or 'stroke'. - pos - (object) An *x*, *y* object with the position of the center of the star. - dim - (number) The dimension of the star. - canvas - (object) A instance. - - Example: - (start code js) - NodeHelper.star.render('stroke', { x: 10, y: 30 }, 40, viz.canvas); - (end code) - */ - 'render': function(type, pos, dim, canvas){ - var ctx = canvas.getCtx(), - pi5 = Math.PI / 5; - ctx.save(); - ctx.translate(pos.x, pos.y); - ctx.beginPath(); - ctx.moveTo(dim, 0); - for (var i = 0; i < 9; i++) { - ctx.rotate(pi5); - if (i % 2 == 0) { - ctx.lineTo((dim / 0.525731) * 0.200811, 0); - } else { - ctx.lineTo(dim, 0); - } - } - ctx.closePath(); - ctx[type](); - ctx.restore(); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - npos - (object) An *x*, *y* object with the position. - pos - (object) An *x*, *y* object with the position to check. - dim - (number) The dimension of the shape. - - Example: - (start code js) - NodeHelper.star.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30); - (end code) - */ - 'contains': function(npos, pos, dim) { - return NodeHelper.circle.contains(npos, pos, dim); - } - } -}; - -/* - Object: EdgeHelper - - Contains rendering primitives for simple edge shapes. -*/ -var EdgeHelper = { - /* - Object: EdgeHelper.line - */ - 'line': { - /* - Method: render - - Renders a line into the canvas. - - Parameters: - - from - (object) An *x*, *y* object with the starting position of the line. - to - (object) An *x*, *y* object with the ending position of the line. - canvas - (object) A instance. - - Example: - (start code js) - EdgeHelper.line.render({ x: 10, y: 30 }, { x: 10, y: 50 }, viz.canvas); - (end code) - */ - 'render': function(from, to, canvas){ - var ctx = canvas.getCtx(); - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - posFrom - (object) An *x*, *y* object with a position. - posTo - (object) An *x*, *y* object with a position. - pos - (object) An *x*, *y* object with the position to check. - epsilon - (number) The dimension of the shape. - - Example: - (start code js) - EdgeHelper.line.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, { x: 15, y: 35 }, 30); - (end code) - */ - 'contains': function(posFrom, posTo, pos, epsilon) { - var min = Math.min, - max = Math.max, - minPosX = min(posFrom.x, posTo.x), - maxPosX = max(posFrom.x, posTo.x), - minPosY = min(posFrom.y, posTo.y), - maxPosY = max(posFrom.y, posTo.y); - - if(pos.x >= minPosX && pos.x <= maxPosX - && pos.y >= minPosY && pos.y <= maxPosY) { - if(Math.abs(posTo.x - posFrom.x) <= epsilon) { - return true; - } - var dist = (posTo.y - posFrom.y) / (posTo.x - posFrom.x) * (pos.x - posFrom.x) + posFrom.y; - return Math.abs(dist - pos.y) <= epsilon; - } - return false; - } - }, - /* - Object: EdgeHelper.arrow - */ - 'arrow': { - /* - Method: render - - Renders an arrow into the canvas. - - Parameters: - - from - (object) An *x*, *y* object with the starting position of the arrow. - to - (object) An *x*, *y* object with the ending position of the arrow. - dim - (number) The dimension of the arrow. - swap - (boolean) Whether to set the arrow pointing to the starting position or the ending position. - canvas - (object) A instance. - - Example: - (start code js) - EdgeHelper.arrow.render({ x: 10, y: 30 }, { x: 10, y: 50 }, 13, false, viz.canvas); - (end code) - */ - 'render': function(from, to, dim, swap, canvas){ - var ctx = canvas.getCtx(); - // invert edge direction - if (swap) { - var tmp = from; - from = to; - to = tmp; - } - var vect = new Complex(to.x - from.x, to.y - from.y); - vect.$scale(dim / vect.norm()); - var intermediatePoint = new Complex(to.x - vect.x, to.y - vect.y), - normal = new Complex(-vect.y / 2, vect.x / 2), - v1 = intermediatePoint.add(normal), - v2 = intermediatePoint.$add(normal.$scale(-1)); - - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); - ctx.beginPath(); - ctx.moveTo(v1.x, v1.y); - ctx.lineTo(v2.x, v2.y); - ctx.lineTo(to.x, to.y); - ctx.closePath(); - ctx.fill(); - }, - /* - Method: contains - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - posFrom - (object) An *x*, *y* object with a position. - posTo - (object) An *x*, *y* object with a position. - pos - (object) An *x*, *y* object with the position to check. - epsilon - (number) The dimension of the shape. - - Example: - (start code js) - EdgeHelper.arrow.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, { x: 15, y: 35 }, 30); - (end code) - */ - 'contains': function(posFrom, posTo, pos, epsilon) { - return EdgeHelper.line.contains(posFrom, posTo, pos, epsilon); - } - }, - /* - Object: EdgeHelper.hyperline - */ - 'hyperline': { - /* - Method: render - - Renders a hyperline into the canvas. A hyperline are the lines drawn for the visualization. - - Parameters: - - from - (object) An *x*, *y* object with the starting position of the hyperline. *x* and *y* must belong to [0, 1). - to - (object) An *x*, *y* object with the ending position of the hyperline. *x* and *y* must belong to [0, 1). - r - (number) The scaling factor. - canvas - (object) A instance. - - Example: - (start code js) - EdgeHelper.hyperline.render({ x: 10, y: 30 }, { x: 10, y: 50 }, 100, viz.canvas); - (end code) - */ - 'render': function(from, to, r, canvas){ - var ctx = canvas.getCtx(); - var centerOfCircle = computeArcThroughTwoPoints(from, to); - if (centerOfCircle.a > 1000 || centerOfCircle.b > 1000 - || centerOfCircle.ratio < 0) { - ctx.beginPath(); - ctx.moveTo(from.x * r, from.y * r); - ctx.lineTo(to.x * r, to.y * r); - ctx.stroke(); - } else { - var angleBegin = Math.atan2(to.y - centerOfCircle.y, to.x - - centerOfCircle.x); - var angleEnd = Math.atan2(from.y - centerOfCircle.y, from.x - - centerOfCircle.x); - var sense = sense(angleBegin, angleEnd); - ctx.beginPath(); - ctx.arc(centerOfCircle.x * r, centerOfCircle.y * r, centerOfCircle.ratio - * r, angleBegin, angleEnd, sense); - ctx.stroke(); - } - /* - Calculates the arc parameters through two points. - - More information in - - Parameters: - - p1 - A instance. - p2 - A instance. - scale - The Disk's diameter. - - Returns: - - An object containing some arc properties. - */ - function computeArcThroughTwoPoints(p1, p2){ - var aDen = (p1.x * p2.y - p1.y * p2.x), bDen = aDen; - var sq1 = p1.squaredNorm(), sq2 = p2.squaredNorm(); - // Fall back to a straight line - if (aDen == 0) - return { - x: 0, - y: 0, - ratio: -1 - }; - - var a = (p1.y * sq2 - p2.y * sq1 + p1.y - p2.y) / aDen; - var b = (p2.x * sq1 - p1.x * sq2 + p2.x - p1.x) / bDen; - var x = -a / 2; - var y = -b / 2; - var squaredRatio = (a * a + b * b) / 4 - 1; - // Fall back to a straight line - if (squaredRatio < 0) - return { - x: 0, - y: 0, - ratio: -1 - }; - var ratio = Math.sqrt(squaredRatio); - var out = { - x: x, - y: y, - ratio: ratio > 1000? -1 : ratio, - a: a, - b: b - }; - - return out; - } - /* - Sets angle direction to clockwise (true) or counterclockwise (false). - - Parameters: - - angleBegin - Starting angle for drawing the arc. - angleEnd - The HyperLine will be drawn from angleBegin to angleEnd. - - Returns: - - A Boolean instance describing the sense for drawing the HyperLine. - */ - function sense(angleBegin, angleEnd){ - return (angleBegin < angleEnd)? ((angleBegin + Math.PI > angleEnd)? false - : true) : ((angleEnd + Math.PI > angleBegin)? true : false); - } - }, - /* - Method: contains - - Not Implemented - - Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise. - - Parameters: - - posFrom - (object) An *x*, *y* object with a position. - posTo - (object) An *x*, *y* object with a position. - pos - (object) An *x*, *y* object with the position to check. - epsilon - (number) The dimension of the shape. - - Example: - (start code js) - EdgeHelper.hyperline.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, { x: 15, y: 35 }, 30); - (end code) - */ - 'contains': $.lambda(false) - } -}; - - -/* - * File: Graph.Plot.js - */ - -/* - Object: Graph.Plot - - rendering and animation methods. - - Properties: - - nodeHelper - object. - edgeHelper - object. -*/ -Graph.Plot = { - //Default intializer - initialize: function(viz, klass){ - this.viz = viz; - this.config = viz.config; - this.node = viz.config.Node; - this.edge = viz.config.Edge; - this.animation = new Animation; - this.nodeTypes = new klass.Plot.NodeTypes; - this.edgeTypes = new klass.Plot.EdgeTypes; - this.labels = viz.labels; - }, - - //Add helpers - nodeHelper: NodeHelper, - edgeHelper: EdgeHelper, - - Interpolator: { - //node/edge property parsers - 'map': { - 'border': 'color', - 'color': 'color', - 'width': 'number', - 'height': 'number', - 'dim': 'number', - 'alpha': 'number', - 'lineWidth': 'number', - 'angularWidth':'number', - 'span':'number', - 'valueArray':'array-number', - 'dimArray':'array-number' - //'colorArray':'array-color' - }, - - //canvas specific parsers - 'canvas': { - 'globalAlpha': 'number', - 'fillStyle': 'color', - 'strokeStyle': 'color', - 'lineWidth': 'number', - 'shadowBlur': 'number', - 'shadowColor': 'color', - 'shadowOffsetX': 'number', - 'shadowOffsetY': 'number', - 'miterLimit': 'number' - }, - - //label parsers - 'label': { - 'size': 'number', - 'color': 'color' - }, - - //Number interpolator - 'compute': function(from, to, delta) { - return from + (to - from) * delta; - }, - - //Position interpolators - 'moebius': function(elem, props, delta, vector) { - var v = vector.scale(-delta); - if(v.norm() < 1) { - var x = v.x, y = v.y; - var ans = elem.startPos - .getc().moebiusTransformation(v); - elem.pos.setc(ans.x, ans.y); - v.x = x; v.y = y; - } - }, - - 'linear': function(elem, props, delta) { - var from = elem.startPos.getc(true); - var to = elem.endPos.getc(true); - elem.pos.setc(this.compute(from.x, to.x, delta), - this.compute(from.y, to.y, delta)); - }, - - 'polar': function(elem, props, delta) { - var from = elem.startPos.getp(true); - var to = elem.endPos.getp(); - var ans = to.interpolate(from, delta); - elem.pos.setp(ans.theta, ans.rho); - }, - - //Graph's Node/Edge interpolators - 'number': function(elem, prop, delta, getter, setter) { - var from = elem[getter](prop, 'start'); - var to = elem[getter](prop, 'end'); - elem[setter](prop, this.compute(from, to, delta)); - }, - - 'color': function(elem, prop, delta, getter, setter) { - var from = $.hexToRgb(elem[getter](prop, 'start')); - var to = $.hexToRgb(elem[getter](prop, 'end')); - var comp = this.compute; - var val = $.rgbToHex([parseInt(comp(from[0], to[0], delta)), - parseInt(comp(from[1], to[1], delta)), - parseInt(comp(from[2], to[2], delta))]); - - elem[setter](prop, val); - }, - - 'array-number': function(elem, prop, delta, getter, setter) { - var from = elem[getter](prop, 'start'), - to = elem[getter](prop, 'end'), - cur = []; - for(var i=0, l=from.length; i, - - */ - prepare: function(modes) { - var graph = this.viz.graph, - accessors = { - 'node-property': { - 'getter': 'getData', - 'setter': 'setData' - }, - 'edge-property': { - 'getter': 'getData', - 'setter': 'setData' - }, - 'node-style': { - 'getter': 'getCanvasStyle', - 'setter': 'setCanvasStyle' - }, - 'edge-style': { - 'getter': 'getCanvasStyle', - 'setter': 'setCanvasStyle' - } - }; - - //parse modes - var m = {}; - if($.type(modes) == 'array') { - for(var i=0, len=modes.length; i < len; i++) { - var elems = modes[i].split(':'); - m[elems.shift()] = elems; - } - } else { - for(var p in modes) { - if(p == 'position') { - m[modes.position] = []; - } else { - m[p] = $.splat(modes[p]); - } - } - } - - graph.eachNode(function(node) { - node.startPos.set(node.pos); - $.each(['node-property', 'node-style'], function(p) { - if(p in m) { - var prop = m[p]; - for(var i=0, l=prop.length; i < l; i++) { - node[accessors[p].setter](prop[i], node[accessors[p].getter](prop[i]), 'start'); - } - } - }); - $.each(['edge-property', 'edge-style'], function(p) { - if(p in m) { - var prop = m[p]; - node.eachAdjacency(function(adj) { - for(var i=0, l=prop.length; i < l; i++) { - adj[accessors[p].setter](prop[i], adj[accessors[p].getter](prop[i]), 'start'); - } - }); - } - }); - }); - return m; - }, - - /* - Method: animate - - Animates a by interpolating some , or properties. - - Parameters: - - opt - (object) Animation options. The object properties are described below - duration - (optional) Described in . - fps - (optional) Described in . - hideLabels - (optional|boolean) Whether to hide labels during the animation. - modes - (required|object) An object with animation modes (described below). - - Animation modes: - - Animation modes are strings representing different node/edge and graph properties that you'd like to animate. - They are represented by an object that has as keys main categories of properties to animate and as values a list - of these specific properties. The properties are described below - - position - Describes the way nodes' positions must be interpolated. Possible values are 'linear', 'polar' or 'moebius'. - node-property - Describes which Node properties will be interpolated. These properties can be any of the ones defined in . - edge-property - Describes which Edge properties will be interpolated. These properties can be any the ones defined in . - label-property - Describes which Label properties will be interpolated. These properties can be any of the ones defined in like color or size. - node-style - Describes which Node Canvas Styles will be interpolated. These are specific canvas properties like fillStyle, strokeStyle, lineWidth, shadowBlur, shadowColor, shadowOffsetX, shadowOffsetY, etc. - edge-style - Describes which Edge Canvas Styles will be interpolated. These are specific canvas properties like fillStyle, strokeStyle, lineWidth, shadowBlur, shadowColor, shadowOffsetX, shadowOffsetY, etc. - - Example: - (start code js) - var viz = new $jit.Viz(options); - //...tweak some Data, CanvasStyles or LabelData properties... - viz.fx.animate({ - modes: { - 'position': 'linear', - 'node-property': ['width', 'height'], - 'node-style': 'shadowColor', - 'label-property': 'size' - }, - hideLabels: false - }); - //...can also be written like this... - viz.fx.animate({ - modes: ['linear', - 'node-property:width:height', - 'node-style:shadowColor', - 'label-property:size'], - hideLabels: false - }); - (end code) - */ - animate: function(opt, versor) { - opt = $.merge(this.viz.config, opt || {}); - var that = this, - viz = this.viz, - graph = viz.graph, - interp = this.Interpolator, - animation = opt.type === 'nodefx'? this.nodeFxAnimation : this.animation; - //prepare graph values - var m = this.prepare(opt.modes); - - //animate - if(opt.hideLabels) this.labels.hideLabels(true); - animation.setOptions($.merge(opt, { - $animating: false, - compute: function(delta) { - graph.eachNode(function(node) { - for(var p in m) { - interp[p](node, m[p], delta, versor); - } - }); - that.plot(opt, this.$animating, delta); - this.$animating = true; - }, - complete: function() { - if(opt.hideLabels) that.labels.hideLabels(false); - that.plot(opt); - opt.onComplete(); - opt.onAfterCompute(); - } - })).start(); - }, - - /* - nodeFx - - Apply animation to node properties like color, width, height, dim, etc. - - Parameters: - - options - Animation options. This object properties is described below - elements - The Elements to be transformed. This is an object that has a properties - - (start code js) - 'elements': { - //can also be an array of ids - 'id': 'id-of-node-to-transform', - //properties to be modified. All properties are optional. - 'properties': { - 'color': '#ccc', //some color - 'width': 10, //some width - 'height': 10, //some height - 'dim': 20, //some dim - 'lineWidth': 10 //some line width - } - } - (end code) - - - _reposition_ Whether to recalculate positions and add a motion animation. - This might be used when changing _width_ or _height_ properties in a like layout. Default's *false*. - - - _onComplete_ A method that is called when the animation completes. - - ...and all other options like _duration_, _fps_, _transition_, etc. - - Example: - (start code js) - var rg = new RGraph(canvas, config); //can be also Hypertree or ST - rg.fx.nodeFx({ - 'elements': { - 'id':'mynodeid', - 'properties': { - 'color':'#ccf' - }, - 'transition': Trans.Quart.easeOut - } - }); - (end code) - */ - nodeFx: function(opt) { - var viz = this.viz, - graph = viz.graph, - animation = this.nodeFxAnimation, - options = $.merge(this.viz.config, { - 'elements': { - 'id': false, - 'properties': {} - }, - 'reposition': false - }); - opt = $.merge(options, opt || {}, { - onBeforeCompute: $.empty, - onAfterCompute: $.empty - }); - //check if an animation is running - animation.stopTimer(); - var props = opt.elements.properties; - //set end values for nodes - if(!opt.elements.id) { - graph.eachNode(function(n) { - for(var prop in props) { - n.setData(prop, props[prop], 'end'); - } - }); - } else { - var ids = $.splat(opt.elements.id); - $.each(ids, function(id) { - var n = graph.getNode(id); - if(n) { - for(var prop in props) { - n.setData(prop, props[prop], 'end'); - } - } - }); - } - //get keys - var propnames = []; - for(var prop in props) propnames.push(prop); - //add node properties modes - var modes = ['node-property:' + propnames.join(':')]; - //set new node positions - if(opt.reposition) { - modes.push('linear'); - viz.compute('end'); - } - //animate - this.animate($.merge(opt, { - modes: modes, - type: 'nodefx' - })); - }, - - - /* - Method: plot - - Plots a . - - Parameters: - - opt - (optional) Plotting options. Most of them are described in . - - Example: - - (start code js) - var viz = new $jit.Viz(options); - viz.fx.plot(); - (end code) - - */ - plot: function(opt, animating) { - var viz = this.viz, - aGraph = viz.graph, - canvas = viz.canvas, - id = viz.root, - that = this, - ctx = canvas.getCtx(), - min = Math.min, - opt = opt || this.viz.controller; - opt.clearCanvas && canvas.clear(); - - var root = aGraph.getNode(id); - if(!root) return; - - var T = !!root.visited; - aGraph.eachNode(function(node) { - var nodeAlpha = node.getData('alpha'); - node.eachAdjacency(function(adj) { - var nodeTo = adj.nodeTo; - if(!!nodeTo.visited === T && node.drawn && nodeTo.drawn) { - !animating && opt.onBeforePlotLine(adj); - ctx.save(); - ctx.globalAlpha = min(nodeAlpha, - nodeTo.getData('alpha'), - adj.getData('alpha')); - that.plotLine(adj, canvas, animating); - ctx.restore(); - !animating && opt.onAfterPlotLine(adj); - } - }); - ctx.save(); - if(node.drawn) { - !animating && opt.onBeforePlotNode(node); - that.plotNode(node, canvas, animating); - !animating && opt.onAfterPlotNode(node); - } - if(!that.labelsHidden && opt.withLabels) { - if(node.drawn && nodeAlpha >= 0.95) { - that.labels.plotLabel(canvas, node, opt); - } else { - that.labels.hideLabel(node, false); - } - } - ctx.restore(); - node.visited = !T; - }); - }, - - /* - Plots a Subtree. - */ - plotTree: function(node, opt, animating) { - var that = this, - viz = this.viz, - canvas = viz.canvas, - config = this.config, - ctx = canvas.getCtx(); - var nodeAlpha = node.getData('alpha'); - node.eachSubnode(function(elem) { - if(opt.plotSubtree(node, elem) && elem.exist && elem.drawn) { - var adj = node.getAdjacency(elem.id); - !animating && opt.onBeforePlotLine(adj); - ctx.globalAlpha = Math.min(nodeAlpha, elem.getData('alpha')); - that.plotLine(adj, canvas, animating); - !animating && opt.onAfterPlotLine(adj); - that.plotTree(elem, opt, animating); - } - }); - if(node.drawn) { - !animating && opt.onBeforePlotNode(node); - this.plotNode(node, canvas, animating); - !animating && opt.onAfterPlotNode(node); - if(!opt.hideLabels && opt.withLabels && nodeAlpha >= 0.95) - this.labels.plotLabel(canvas, node, opt); - else - this.labels.hideLabel(node, false); - } else { - this.labels.hideLabel(node, true); - } - }, - - /* - Method: plotNode - - Plots a . - - Parameters: - - node - (object) A . - canvas - (object) A element. - - */ - plotNode: function(node, canvas, animating) { - var f = node.getData('type'), - ctxObj = this.node.CanvasStyles; - if(f != 'none') { - var width = node.getData('lineWidth'), - color = node.getData('color'), - alpha = node.getData('alpha'), - ctx = canvas.getCtx(); - - ctx.lineWidth = width; - ctx.fillStyle = ctx.strokeStyle = color; - ctx.globalAlpha = alpha; - - for(var s in ctxObj) { - ctx[s] = node.getCanvasStyle(s); - } - - this.nodeTypes[f].render.call(this, node, canvas, animating); - } - }, - - /* - Method: plotLine - - Plots a . - - Parameters: - - adj - (object) A . - canvas - (object) A instance. - - */ - plotLine: function(adj, canvas, animating) { - var f = adj.getData('type'), - ctxObj = this.edge.CanvasStyles; - if(f != 'none') { - var width = adj.getData('lineWidth'), - color = adj.getData('color'), - ctx = canvas.getCtx(); - - ctx.lineWidth = width; - ctx.fillStyle = ctx.strokeStyle = color; - - for(var s in ctxObj) { - ctx[s] = adj.getCanvasStyle(s); - } - - this.edgeTypes[f].render.call(this, adj, canvas, animating); - } - } - -}; - - - -/* - * File: Graph.Label.js - * -*/ - -/* - Object: Graph.Label - - An interface for plotting/hiding/showing labels. - - Description: - - This is a generic interface for plotting/hiding/showing labels. - The interface is implemented in multiple ways to provide - different label types. - - For example, the Graph.Label interface is implemented as to provide - HTML label elements. Also we provide the interface for SVG type labels. - The interface implements these methods with the native Canvas text rendering functions. - - All subclasses (, and ) implement the method plotLabel. -*/ - -Graph.Label = {}; - -/* - Class: Graph.Label.Native - - Implements labels natively, using the Canvas text API. -*/ -Graph.Label.Native = new Class({ - /* - Method: plotLabel - - Plots a label for a given node. - - Parameters: - - canvas - (object) A instance. - node - (object) A . - controller - (object) A configuration object. - - Example: - - (start code js) - var viz = new $jit.Viz(options); - var node = viz.graph.getNode('nodeId'); - viz.labels.plotLabel(viz.canvas, node, viz.config); - (end code) - */ - plotLabel: function(canvas, node, controller) { - var ctx = canvas.getCtx(); - var pos = node.pos.getc(true); - - ctx.font = node.getLabelData('style') + ' ' + node.getLabelData('size') + 'px ' + node.getLabelData('family'); - ctx.textAlign = node.getLabelData('textAlign'); - ctx.fillStyle = ctx.strokeStyle = node.getLabelData('color'); - ctx.textBaseline = node.getLabelData('textBaseline'); - - this.renderLabel(canvas, node, controller); - }, - - /* - renderLabel - - Does the actual rendering of the label in the canvas. The default - implementation renders the label close to the position of the node, this - method should be overriden to position the labels differently. - - Parameters: - - canvas - A instance. - node - A . - controller - A configuration object. See also , , . - */ - renderLabel: function(canvas, node, controller) { - var ctx = canvas.getCtx(); - var pos = node.pos.getc(true); - ctx.fillText(node.name, pos.x, pos.y + node.getData("height") / 2); - }, - - hideLabel: $.empty, - hideLabels: $.empty -}); - -/* - Class: Graph.Label.DOM - - Abstract Class implementing some DOM label methods. - - Implemented by: - - and . - -*/ -Graph.Label.DOM = new Class({ - //A flag value indicating if node labels are being displayed or not. - labelsHidden: false, - //Label container - labelContainer: false, - //Label elements hash. - labels: {}, - - /* - Method: getLabelContainer - - Lazy fetcher for the label container. - - Returns: - - The label container DOM element. - - Example: - - (start code js) - var viz = new $jit.Viz(options); - var labelContainer = viz.labels.getLabelContainer(); - alert(labelContainer.innerHTML); - (end code) - */ - getLabelContainer: function() { - return this.labelContainer ? - this.labelContainer : - this.labelContainer = document.getElementById(this.viz.config.labelContainer); - }, - - /* - Method: getLabel - - Lazy fetcher for the label element. - - Parameters: - - id - (string) The label id (which is also a id). - - Returns: - - The label element. - - Example: - - (start code js) - var viz = new $jit.Viz(options); - var label = viz.labels.getLabel('someid'); - alert(label.innerHTML); - (end code) - - */ - getLabel: function(id) { - return (id in this.labels && this.labels[id] != null) ? - this.labels[id] : - this.labels[id] = document.getElementById(id); - }, - - /* - Method: hideLabels - - Hides all labels (by hiding the label container). - - Parameters: - - hide - (boolean) A boolean value indicating if the label container must be hidden or not. - - Example: - (start code js) - var viz = new $jit.Viz(options); - rg.labels.hideLabels(true); - (end code) - - */ - hideLabels: function (hide) { - var container = this.getLabelContainer(); - if(hide) - container.style.display = 'none'; - else - container.style.display = ''; - this.labelsHidden = hide; - }, - - /* - Method: clearLabels - - Clears the label container. - - Useful when using a new visualization with the same canvas element/widget. - - Parameters: - - force - (boolean) Forces deletion of all labels. - - Example: - (start code js) - var viz = new $jit.Viz(options); - viz.labels.clearLabels(); - (end code) - */ - clearLabels: function(force) { - for(var id in this.labels) { - if (force || !this.viz.graph.hasNode(id)) { - this.disposeLabel(id); - delete this.labels[id]; - } - } - }, - - /* - Method: disposeLabel - - Removes a label. - - Parameters: - - id - (string) A label id (which generally is also a id). - - Example: - (start code js) - var viz = new $jit.Viz(options); - viz.labels.disposeLabel('labelid'); - (end code) - */ - disposeLabel: function(id) { - var elem = this.getLabel(id); - if(elem && elem.parentNode) { - elem.parentNode.removeChild(elem); - } - }, - - /* - Method: hideLabel - - Hides the corresponding label. - - Parameters: - - node - (object) A . Can also be an array of . - show - (boolean) If *true*, nodes will be shown. Otherwise nodes will be hidden. - - Example: - (start code js) - var rg = new $jit.Viz(options); - viz.labels.hideLabel(viz.graph.getNode('someid'), false); - (end code) - */ - hideLabel: function(node, show) { - node = $.splat(node); - var st = show ? "" : "none", lab, that = this; - $.each(node, function(n) { - var lab = that.getLabel(n.id); - if (lab) { - lab.style.display = st; - } - }); - }, - - /* - fitsInCanvas - - Returns _true_ or _false_ if the label for the node is contained in the canvas dom element or not. - - Parameters: - - pos - A instance (I'm doing duck typing here so any object with _x_ and _y_ parameters will do). - canvas - A instance. - - Returns: - - A boolean value specifying if the label is contained in the DOM element or not. - - */ - fitsInCanvas: function(pos, canvas) { - var size = canvas.getSize(); - if(pos.x >= size.width || pos.x < 0 - || pos.y >= size.height || pos.y < 0) return false; - return true; - } -}); - -/* - Class: Graph.Label.HTML - - Implements HTML labels. - - Extends: - - All methods. - -*/ -Graph.Label.HTML = new Class({ - Implements: Graph.Label.DOM, - - /* - Method: plotLabel - - Plots a label for a given node. - - Parameters: - - canvas - (object) A instance. - node - (object) A . - controller - (object) A configuration object. - - Example: - - (start code js) - var viz = new $jit.Viz(options); - var node = viz.graph.getNode('nodeId'); - viz.labels.plotLabel(viz.canvas, node, viz.config); - (end code) - - - */ - plotLabel: function(canvas, node, controller) { - var id = node.id, tag = this.getLabel(id); - - if(!tag && !(tag = document.getElementById(id))) { - tag = document.createElement('div'); - var container = this.getLabelContainer(); - tag.id = id; - tag.className = 'node'; - tag.style.position = 'absolute'; - controller.onCreateLabel(tag, node); - container.appendChild(tag); - this.labels[node.id] = tag; - } - - this.placeLabel(tag, node, controller); - } -}); - -/* - Class: Graph.Label.SVG - - Implements SVG labels. - - Extends: - - All methods. -*/ -Graph.Label.SVG = new Class({ - Implements: Graph.Label.DOM, - - /* - Method: plotLabel - - Plots a label for a given node. - - Parameters: - - canvas - (object) A instance. - node - (object) A . - controller - (object) A configuration object. - - Example: - - (start code js) - var viz = new $jit.Viz(options); - var node = viz.graph.getNode('nodeId'); - viz.labels.plotLabel(viz.canvas, node, viz.config); - (end code) - - - */ - plotLabel: function(canvas, node, controller) { - var id = node.id, tag = this.getLabel(id); - if(!tag && !(tag = document.getElementById(id))) { - var ns = 'http://www.w3.org/2000/svg'; - tag = document.createElementNS(ns, 'svg:text'); - var tspan = document.createElementNS(ns, 'svg:tspan'); - tag.appendChild(tspan); - var container = this.getLabelContainer(); - tag.setAttribute('id', id); - tag.setAttribute('class', 'node'); - container.appendChild(tag); - controller.onCreateLabel(tag, node); - this.labels[node.id] = tag; - } - this.placeLabel(tag, node, controller); - } -}); - - - -Graph.Geom = new Class({ - - initialize: function(viz) { - this.viz = viz; - this.config = viz.config; - this.node = viz.config.Node; - this.edge = viz.config.Edge; - }, - /* - Applies a translation to the tree. - - Parameters: - - pos - A number specifying translation vector. - prop - A position property ('pos', 'start' or 'end'). - - Example: - - (start code js) - st.geom.translate(new Complex(300, 100), 'end'); - (end code) - */ - translate: function(pos, prop) { - prop = $.splat(prop); - this.viz.graph.eachNode(function(elem) { - $.each(prop, function(p) { elem.getPos(p).$add(pos); }); - }); - }, - /* - Hides levels of the tree until it properly fits in canvas. - */ - setRightLevelToShow: function(node, canvas, callback) { - var level = this.getRightLevelToShow(node, canvas), - fx = this.viz.labels, - opt = $.merge({ - execShow:true, - execHide:true, - onHide: $.empty, - onShow: $.empty - }, callback || {}); - node.eachLevel(0, this.config.levelsToShow, function(n) { - var d = n._depth - node._depth; - if(d > level) { - opt.onHide(n); - if(opt.execHide) { - n.drawn = false; - n.exist = false; - fx.hideLabel(n, false); - } - } else { - opt.onShow(n); - if(opt.execShow) { - n.exist = true; - } - } - }); - node.drawn= true; - }, - /* - Returns the right level to show for the current tree in order to fit in canvas. - */ - getRightLevelToShow: function(node, canvas) { - var config = this.config; - var level = config.levelsToShow; - var constrained = config.constrained; - if(!constrained) return level; - while(!this.treeFitsInCanvas(node, canvas, level) && level > 1) { level-- ; } - return level; - } -}); - -/* - * File: Loader.js - * - */ - -/* - Object: Loader - - Provides methods for loading and serving JSON data. -*/ -var Loader = { - construct: function(json) { - var isGraph = ($.type(json) == 'array'); - var ans = new Graph(this.graphOptions, this.config.Node, this.config.Edge, this.config.Label); - if(!isGraph) - //make tree - (function (ans, json) { - ans.addNode(json); - if(json.children) { - for(var i=0, ch = json.children; i will override the general value for that option with that particular value. For this to work - however, you do have to set *overridable = true* in . - - The same thing is true for JSON adjacencies. Dollar prefixed data properties will alter values set in - if has *overridable = true*. - - When loading JSON data into TreeMaps, the *data* property must contain a value for the *$area* key, - since this is the value which will be taken into account when creating the layout. - The same thing goes for the *$color* parameter. - - In JSON Nodes you can use also *$label-* prefixed properties to refer to properties. For example, - *$label-size* will refer to size property. Also, in JSON nodes and adjacencies you can set - canvas specific properties individually by using the *$canvas-* prefix. For example, *$canvas-shadowBlur* will refer - to the *shadowBlur* property. - - These properties can also be accessed after loading the JSON data from and - by using . For more information take a look at the and documentation. - - Finally, these properties can also be used to create advanced animations like with . For more - information about creating animations please take a look at the and documentation. - - loadJSON Parameters: - - json - A JSON Tree or Graph structure. - i - For Graph structures only. Sets the indexed node as root for the visualization. - - */ - loadJSON: function(json, i) { - this.json = json; - //if they're canvas labels erase them. - if(this.labels && this.labels.clearLabels) { - this.labels.clearLabels(true); - } - this.graph = this.construct(json); - if($.type(json) != 'array'){ - this.root = json.id; - } else { - this.root = json[i? i : 0].id; - } - }, - - /* - Method: toJSON - - Returns a JSON tree/graph structure from the visualization's . - See for the graph formats available. - - See also: - - - - Parameters: - - type - (string) Default's "tree". The type of the JSON structure to be returned. - Possible options are "tree" or "graph". - */ - toJSON: function(type) { - type = type || "tree"; - if(type == 'tree') { - var ans = {}; - var rootNode = this.graph.getNode(this.root); - var ans = (function recTree(node) { - var ans = {}; - ans.id = node.id; - ans.name = node.name; - ans.data = node.data; - var ch =[]; - node.eachSubnode(function(n) { - ch.push(recTree(n)); - }); - ans.children = ch; - return ans; - })(rootNode); - return ans; - } else { - var ans = []; - var T = !!this.graph.getNode(this.root).visited; - this.graph.eachNode(function(node) { - var ansNode = {}; - ansNode.id = node.id; - ansNode.name = node.name; - ansNode.data = node.data; - var adjs = []; - node.eachAdjacency(function(adj) { - var nodeTo = adj.nodeTo; - if(!!nodeTo.visited === T) { - var ansAdj = {}; - ansAdj.nodeTo = nodeTo.id; - ansAdj.data = adj.data; - adjs.push(ansAdj); - } - }); - ansNode.adjacencies = adjs; - ans.push(ansNode); - node.visited = !T; - }); - return ans; - } - } -}; - - - -/* - * File: Layouts.js - * - * Implements base Tree and Graph layouts. - * - * Description: - * - * Implements base Tree and Graph layouts like Radial, Tree, etc. - * - */ - -/* - * Object: Layouts - * - * Parent object for common layouts. - * - */ -var Layouts = $jit.Layouts = {}; - - -//Some util shared layout functions are defined here. -var NodeDim = { - label: null, - - compute: function(graph, prop, opt) { - this.initializeLabel(opt); - var label = this.label, style = label.style; - graph.eachNode(function(n) { - var autoWidth = n.getData('autoWidth'), - autoHeight = n.getData('autoHeight'); - if(autoWidth || autoHeight) { - //delete dimensions since these are - //going to be overridden now. - delete n.data.$width; - delete n.data.$height; - delete n.data.$dim; - - var width = n.getData('width'), - height = n.getData('height'); - //reset label dimensions - style.width = autoWidth? 'auto' : width + 'px'; - style.height = autoHeight? 'auto' : height + 'px'; - - //TODO(nico) should let the user choose what to insert here. - label.innerHTML = n.name; - - var offsetWidth = label.offsetWidth, - offsetHeight = label.offsetHeight; - var type = n.getData('type'); - if($.indexOf(['circle', 'square', 'triangle', 'star'], type) === -1) { - n.setData('width', offsetWidth); - n.setData('height', offsetHeight); - } else { - var dim = offsetWidth > offsetHeight? offsetWidth : offsetHeight; - n.setData('width', dim); - n.setData('height', dim); - n.setData('dim', dim); - } - } - }); - }, - - initializeLabel: function(opt) { - if(!this.label) { - this.label = document.createElement('div'); - document.body.appendChild(this.label); - } - this.setLabelStyles(opt); - }, - - setLabelStyles: function(opt) { - $.extend(this.label.style, { - 'visibility': 'hidden', - 'position': 'absolute', - 'width': 'auto', - 'height': 'auto' - }); - this.label.className = 'jit-autoadjust-label'; - } -}; - - -/* - * Class: Layouts.Tree - * - * Implements a Tree Layout. - * - * Implemented By: - * - * - * - * Inspired by: - * - * Drawing Trees (Andrew J. Kennedy) - * - */ -Layouts.Tree = (function() { - //Layout functions - var slice = Array.prototype.slice; - - /* - Calculates the max width and height nodes for a tree level - */ - function getBoundaries(graph, config, level, orn, prop) { - var dim = config.Node; - var multitree = config.multitree; - if (dim.overridable) { - var w = -1, h = -1; - graph.eachNode(function(n) { - if (n._depth == level - && (!multitree || ('$orn' in n.data) && n.data.$orn == orn)) { - var dw = n.getData('width', prop); - var dh = n.getData('height', prop); - w = (w < dw) ? dw : w; - h = (h < dh) ? dh : h; - } - }); - return { - 'width' : w < 0 ? dim.width : w, - 'height' : h < 0 ? dim.height : h - }; - } else { - return dim; - } - } - - - function movetree(node, prop, val, orn) { - var p = (orn == "left" || orn == "right") ? "y" : "x"; - node.getPos(prop)[p] += val; - } - - - function moveextent(extent, val) { - var ans = []; - $.each(extent, function(elem) { - elem = slice.call(elem); - elem[0] += val; - elem[1] += val; - ans.push(elem); - }); - return ans; - } - - - function merge(ps, qs) { - if (ps.length == 0) - return qs; - if (qs.length == 0) - return ps; - var p = ps.shift(), q = qs.shift(); - return [ [ p[0], q[1] ] ].concat(merge(ps, qs)); - } - - - function mergelist(ls, def) { - def = def || []; - if (ls.length == 0) - return def; - var ps = ls.pop(); - return mergelist(ls, merge(ps, def)); - } - - - function fit(ext1, ext2, subtreeOffset, siblingOffset, i) { - if (ext1.length <= i || ext2.length <= i) - return 0; - - var p = ext1[i][1], q = ext2[i][0]; - return Math.max(fit(ext1, ext2, subtreeOffset, siblingOffset, ++i) - + subtreeOffset, p - q + siblingOffset); - } - - - function fitlistl(es, subtreeOffset, siblingOffset) { - function $fitlistl(acc, es, i) { - if (es.length <= i) - return []; - var e = es[i], ans = fit(acc, e, subtreeOffset, siblingOffset, 0); - return [ ans ].concat($fitlistl(merge(acc, moveextent(e, ans)), es, ++i)); - } - ; - return $fitlistl( [], es, 0); - } - - - function fitlistr(es, subtreeOffset, siblingOffset) { - function $fitlistr(acc, es, i) { - if (es.length <= i) - return []; - var e = es[i], ans = -fit(e, acc, subtreeOffset, siblingOffset, 0); - return [ ans ].concat($fitlistr(merge(moveextent(e, ans), acc), es, ++i)); - } - ; - es = slice.call(es); - var ans = $fitlistr( [], es.reverse(), 0); - return ans.reverse(); - } - - - function fitlist(es, subtreeOffset, siblingOffset, align) { - var esl = fitlistl(es, subtreeOffset, siblingOffset), esr = fitlistr(es, - subtreeOffset, siblingOffset); - - if (align == "left") - esr = esl; - else if (align == "right") - esl = esr; - - for ( var i = 0, ans = []; i < esl.length; i++) { - ans[i] = (esl[i] + esr[i]) / 2; - } - return ans; - } - - - function design(graph, node, prop, config, orn) { - var multitree = config.multitree; - var auxp = [ 'x', 'y' ], auxs = [ 'width', 'height' ]; - var ind = +(orn == "left" || orn == "right"); - var p = auxp[ind], notp = auxp[1 - ind]; - - var cnode = config.Node; - var s = auxs[ind], nots = auxs[1 - ind]; - - var siblingOffset = config.siblingOffset; - var subtreeOffset = config.subtreeOffset; - var align = config.align; - - function $design(node, maxsize, acum) { - var sval = node.getData(s, prop); - var notsval = maxsize - || (node.getData(nots, prop)); - - var trees = [], extents = [], chmaxsize = false; - var chacum = notsval + config.levelDistance; - node.eachSubnode(function(n) { - if (n.exist - && (!multitree || ('$orn' in n.data) && n.data.$orn == orn)) { - - if (!chmaxsize) - chmaxsize = getBoundaries(graph, config, n._depth, orn, prop); - - var s = $design(n, chmaxsize[nots], acum + chacum); - trees.push(s.tree); - extents.push(s.extent); - } - }); - var positions = fitlist(extents, subtreeOffset, siblingOffset, align); - for ( var i = 0, ptrees = [], pextents = []; i < trees.length; i++) { - movetree(trees[i], prop, positions[i], orn); - pextents.push(moveextent(extents[i], positions[i])); - } - var resultextent = [ [ -sval / 2, sval / 2 ] ] - .concat(mergelist(pextents)); - node.getPos(prop)[p] = 0; - - if (orn == "top" || orn == "left") { - node.getPos(prop)[notp] = acum; - } else { - node.getPos(prop)[notp] = -acum; - } - - return { - tree : node, - extent : resultextent - }; - } - - $design(node, false, 0); - } - - - return new Class({ - /* - Method: compute - - Computes nodes' positions. - - */ - compute : function(property, computeLevels) { - var prop = property || 'start'; - var node = this.graph.getNode(this.root); - $.extend(node, { - 'drawn' : true, - 'exist' : true, - 'selected' : true - }); - NodeDim.compute(this.graph, prop, this.config); - if (!!computeLevels || !("_depth" in node)) { - this.graph.computeLevels(this.root, 0, "ignore"); - } - - this.computePositions(node, prop); - }, - - computePositions : function(node, prop) { - var config = this.config; - var multitree = config.multitree; - var align = config.align; - var indent = align !== 'center' && config.indent; - var orn = config.orientation; - var orns = multitree ? [ 'top', 'right', 'bottom', 'left' ] : [ orn ]; - var that = this; - $.each(orns, function(orn) { - //calculate layout - design(that.graph, node, prop, that.config, orn, prop); - var i = [ 'x', 'y' ][+(orn == "left" || orn == "right")]; - //absolutize - (function red(node) { - node.eachSubnode(function(n) { - if (n.exist - && (!multitree || ('$orn' in n.data) && n.data.$orn == orn)) { - - n.getPos(prop)[i] += node.getPos(prop)[i]; - if (indent) { - n.getPos(prop)[i] += align == 'left' ? indent : -indent; - } - red(n); - } - }); - })(node); - }); - } - }); - -})(); - -/* - * File: Spacetree.js - */ - -/* - Class: ST - - A Tree layout with advanced contraction and expansion animations. - - Inspired by: - - SpaceTree: Supporting Exploration in Large Node Link Tree, Design Evolution and Empirical Evaluation (Catherine Plaisant, Jesse Grosjean, Benjamin B. Bederson) - - - Drawing Trees (Andrew J. Kennedy) - - Note: - - This visualization was built and engineered from scratch, taking only the papers as inspiration, and only shares some features with the visualization described in those papers. - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - - - Additionally, there are other parameters and some default values changed - - constrained - (boolean) Default's *true*. Whether to show the entire tree when loaded or just the number of levels specified by _levelsToShow_. - levelsToShow - (number) Default's *2*. The number of levels to show for a subtree. This number is relative to the selected node. - levelDistance - (number) Default's *30*. The distance between two consecutive levels of the tree. - Node.type - Described in . Default's set to *rectangle*. - offsetX - (number) Default's *0*. The x-offset distance from the selected node to the center of the canvas. - offsetY - (number) Default's *0*. The y-offset distance from the selected node to the center of the canvas. - duration - Described in . It's default value has been changed to *700*. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. - - */ - -$jit.ST= (function() { - // Define some private methods first... - // Nodes in path - var nodesInPath = []; - // Nodes to contract - function getNodesToHide(node) { - node = node || this.clickedNode; - if(!this.config.constrained) { - return []; - } - var Geom = this.geom; - var graph = this.graph; - var canvas = this.canvas; - var level = node._depth, nodeArray = []; - graph.eachNode(function(n) { - if(n.exist && !n.selected) { - if(n.isDescendantOf(node.id)) { - if(n._depth <= level) nodeArray.push(n); - } else { - nodeArray.push(n); - } - } - }); - var leafLevel = Geom.getRightLevelToShow(node, canvas); - node.eachLevel(leafLevel, leafLevel, function(n) { - if(n.exist && !n.selected) nodeArray.push(n); - }); - - for (var i = 0; i < nodesInPath.length; i++) { - var n = this.graph.getNode(nodesInPath[i]); - if(!n.isDescendantOf(node.id)) { - nodeArray.push(n); - } - } - return nodeArray; - }; - // Nodes to expand - function getNodesToShow(node) { - var nodeArray = [], config = this.config; - node = node || this.clickedNode; - this.clickedNode.eachLevel(0, config.levelsToShow, function(n) { - if(config.multitree && !('$orn' in n.data) - && n.anySubnode(function(ch){ return ch.exist && !ch.drawn; })) { - nodeArray.push(n); - } else if(n.drawn && !n.anySubnode("drawn")) { - nodeArray.push(n); - } - }); - return nodeArray; - }; - // Now define the actual class. - return new Class({ - - Implements: [Loader, Extras, Layouts.Tree], - - initialize: function(controller) { - var $ST = $jit.ST; - - var config= { - levelsToShow: 2, - levelDistance: 30, - constrained: true, - Node: { - type: 'rectangle' - }, - duration: 700, - offsetX: 0, - offsetY: 0 - }; - - this.controller = this.config = $.merge( - Options("Canvas", "Fx", "Tree", "Node", "Edge", "Controller", - "Tips", "NodeStyles", "Events", "Navigation", "Label"), config, controller); - - var canvasConfig = this.config; - if(canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - if(canvasConfig.background) { - canvasConfig.background = $.merge({ - type: 'Fade', - colorStop1: this.config.colorStop1, - colorStop2: this.config.colorStop2 - }, canvasConfig.background); - } - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': true - }; - this.graph = new Graph(this.graphOptions, this.config.Node, this.config.Edge); - this.labels = new $ST.Label[canvasConfig.Label.type](this); - this.fx = new $ST.Plot(this, $ST); - this.op = new $ST.Op(this); - this.group = new $ST.Group(this); - this.geom = new $ST.Geom(this); - this.clickedNode= null; - // initialize extras - this.initializeExtras(); - }, - - /* - Method: plot - - Plots the . This is a shortcut to *fx.plot*. - - */ - plot: function() { this.fx.plot(this.controller); }, - - - /* - Method: switchPosition - - Switches the tree orientation. - - Parameters: - - pos - (string) The new tree orientation. Possible values are "top", "left", "right" and "bottom". - method - (string) Set this to "animate" if you want to animate the tree when switching its position. You can also set this parameter to "replot" to just replot the subtree. - onComplete - (optional|object) This callback is called once the "switching" animation is complete. - - Example: - - (start code js) - st.switchPosition("right", "animate", { - onComplete: function() { - alert('completed!'); - } - }); - (end code) - */ - switchPosition: function(pos, method, onComplete) { - var Geom = this.geom, Plot = this.fx, that = this; - if(!Plot.busy) { - Plot.busy = true; - this.contract({ - onComplete: function() { - Geom.switchOrientation(pos); - that.compute('end', false); - Plot.busy = false; - if(method == 'animate') { - that.onClick(that.clickedNode.id, onComplete); - } else if(method == 'replot') { - that.select(that.clickedNode.id, onComplete); - } - } - }, pos); - } - }, - - /* - Method: switchAlignment - - Switches the tree alignment. - - Parameters: - - align - (string) The new tree alignment. Possible values are "left", "center" and "right". - method - (string) Set this to "animate" if you want to animate the tree after aligning its position. You can also set this parameter to "replot" to just replot the subtree. - onComplete - (optional|object) This callback is called once the "switching" animation is complete. - - Example: - - (start code js) - st.switchAlignment("right", "animate", { - onComplete: function() { - alert('completed!'); - } - }); - (end code) - */ - switchAlignment: function(align, method, onComplete) { - this.config.align = align; - if(method == 'animate') { - this.select(this.clickedNode.id, onComplete); - } else if(method == 'replot') { - this.onClick(this.clickedNode.id, onComplete); - } - }, - - /* - Method: addNodeInPath - - Adds a node to the current path as selected node. The selected node will be visible (as in non-collapsed) at all times. - - - Parameters: - - id - (string) A id. - - Example: - - (start code js) - st.addNodeInPath("nodeId"); - (end code) - */ - addNodeInPath: function(id) { - nodesInPath.push(id); - this.select((this.clickedNode && this.clickedNode.id) || this.root); - }, - - /* - Method: clearNodesInPath - - Removes all nodes tagged as selected by the method. - - See also: - - - - Example: - - (start code js) - st.clearNodesInPath(); - (end code) - */ - clearNodesInPath: function(id) { - nodesInPath.length = 0; - this.select((this.clickedNode && this.clickedNode.id) || this.root); - }, - - /* - Method: refresh - - Computes positions and plots the tree. - - */ - refresh: function() { - this.reposition(); - this.select((this.clickedNode && this.clickedNode.id) || this.root); - }, - - reposition: function() { - this.graph.computeLevels(this.root, 0, "ignore"); - this.geom.setRightLevelToShow(this.clickedNode, this.canvas); - this.graph.eachNode(function(n) { - if(n.exist) n.drawn = true; - }); - this.compute('end'); - }, - - requestNodes: function(node, onComplete) { - var handler = $.merge(this.controller, onComplete), - lev = this.config.levelsToShow; - if(handler.request) { - var leaves = [], d = node._depth; - node.eachLevel(0, lev, function(n) { - if(n.drawn && - !n.anySubnode()) { - leaves.push(n); - n._level = lev - (n._depth - d); - } - }); - this.group.requestNodes(leaves, handler); - } - else - handler.onComplete(); - }, - - contract: function(onComplete, switched) { - var orn = this.config.orientation; - var Geom = this.geom, Group = this.group; - if(switched) Geom.switchOrientation(switched); - var nodes = getNodesToHide.call(this); - if(switched) Geom.switchOrientation(orn); - Group.contract(nodes, $.merge(this.controller, onComplete)); - }, - - move: function(node, onComplete) { - this.compute('end', false); - var move = onComplete.Move, offset = { - 'x': move.offsetX, - 'y': move.offsetY - }; - if(move.enable) { - this.geom.translate(node.endPos.add(offset).$scale(-1), "end"); - } - this.fx.animate($.merge(this.controller, { modes: ['linear'] }, onComplete)); - }, - - expand: function (node, onComplete) { - var nodeArray = getNodesToShow.call(this, node); - this.group.expand(nodeArray, $.merge(this.controller, onComplete)); - }, - - selectPath: function(node) { - var that = this; - this.graph.eachNode(function(n) { n.selected = false; }); - function path(node) { - if(node == null || node.selected) return; - node.selected = true; - $.each(that.group.getSiblings([node])[node.id], - function(n) { - n.exist = true; - n.drawn = true; - }); - var parents = node.getParents(); - parents = (parents.length > 0)? parents[0] : null; - path(parents); - }; - for(var i=0, ns = [node.id].concat(nodesInPath); i < ns.length; i++) { - path(this.graph.getNode(ns[i])); - } - }, - - /* - Method: setRoot - - Switches the current root node. Changes the topology of the Tree. - - Parameters: - id - (string) The id of the node to be set as root. - method - (string) Set this to "animate" if you want to animate the tree after adding the subtree. You can also set this parameter to "replot" to just replot the subtree. - onComplete - (optional|object) An action to perform after the animation (if any). - - Example: - - (start code js) - st.setRoot('nodeId', 'animate', { - onComplete: function() { - alert('complete!'); - } - }); - (end code) - */ - setRoot: function(id, method, onComplete) { - if(this.busy) return; - this.busy = true; - var that = this, canvas = this.canvas; - var rootNode = this.graph.getNode(this.root); - var clickedNode = this.graph.getNode(id); - function $setRoot() { - if(this.config.multitree && clickedNode.data.$orn) { - var orn = clickedNode.data.$orn; - var opp = { - 'left': 'right', - 'right': 'left', - 'top': 'bottom', - 'bottom': 'top' - }[orn]; - rootNode.data.$orn = opp; - (function tag(rootNode) { - rootNode.eachSubnode(function(n) { - if(n.id != id) { - n.data.$orn = opp; - tag(n); - } - }); - })(rootNode); - delete clickedNode.data.$orn; - } - this.root = id; - this.clickedNode = clickedNode; - this.graph.computeLevels(this.root, 0, "ignore"); - this.geom.setRightLevelToShow(clickedNode, canvas, { - execHide: false, - onShow: function(node) { - if(!node.drawn) { - node.drawn = true; - node.setData('alpha', 1, 'end'); - node.setData('alpha', 0); - node.pos.setc(clickedNode.pos.x, clickedNode.pos.y); - } - } - }); - this.compute('end'); - this.busy = true; - this.fx.animate({ - modes: ['linear', 'node-property:alpha'], - onComplete: function() { - that.busy = false; - that.onClick(id, { - onComplete: function() { - onComplete && onComplete.onComplete(); - } - }); - } - }); - } - - // delete previous orientations (if any) - delete rootNode.data.$orns; - - if(method == 'animate') { - $setRoot.call(this); - that.selectPath(clickedNode); - } else if(method == 'replot') { - $setRoot.call(this); - this.select(this.root); - } - }, - - /* - Method: addSubtree - - Adds a subtree. - - Parameters: - subtree - (object) A JSON Tree object. See also . - method - (string) Set this to "animate" if you want to animate the tree after adding the subtree. You can also set this parameter to "replot" to just replot the subtree. - onComplete - (optional|object) An action to perform after the animation (if any). - - Example: - - (start code js) - st.addSubtree(json, 'animate', { - onComplete: function() { - alert('complete!'); - } - }); - (end code) - */ - addSubtree: function(subtree, method, onComplete) { - if(method == 'replot') { - this.op.sum(subtree, $.extend({ type: 'replot' }, onComplete || {})); - } else if (method == 'animate') { - this.op.sum(subtree, $.extend({ type: 'fade:seq' }, onComplete || {})); - } - }, - - /* - Method: removeSubtree - - Removes a subtree. - - Parameters: - id - (string) The _id_ of the subtree to be removed. - removeRoot - (boolean) Default's *false*. Remove the root of the subtree or only its subnodes. - method - (string) Set this to "animate" if you want to animate the tree after removing the subtree. You can also set this parameter to "replot" to just replot the subtree. - onComplete - (optional|object) An action to perform after the animation (if any). - - Example: - - (start code js) - st.removeSubtree('idOfSubtreeToBeRemoved', false, 'animate', { - onComplete: function() { - alert('complete!'); - } - }); - (end code) - - */ - removeSubtree: function(id, removeRoot, method, onComplete) { - var node = this.graph.getNode(id), subids = []; - node.eachLevel(+!removeRoot, false, function(n) { - subids.push(n.id); - }); - if(method == 'replot') { - this.op.removeNode(subids, $.extend({ type: 'replot' }, onComplete || {})); - } else if (method == 'animate') { - this.op.removeNode(subids, $.extend({ type: 'fade:seq'}, onComplete || {})); - } - }, - - /* - Method: select - - Selects a node in the without performing an animation. Useful when selecting - nodes which are currently hidden or deep inside the tree. - - Parameters: - id - (string) The id of the node to select. - onComplete - (optional|object) an onComplete callback. - - Example: - (start code js) - st.select('mynodeid', { - onComplete: function() { - alert('complete!'); - } - }); - (end code) - */ - select: function(id, onComplete) { - var group = this.group, geom = this.geom; - var node= this.graph.getNode(id), canvas = this.canvas; - var root = this.graph.getNode(this.root); - var complete = $.merge(this.controller, onComplete); - var that = this; - - complete.onBeforeCompute(node); - this.selectPath(node); - this.clickedNode= node; - this.requestNodes(node, { - onComplete: function(){ - group.hide(group.prepare(getNodesToHide.call(that)), complete); - geom.setRightLevelToShow(node, canvas); - that.compute("current"); - that.graph.eachNode(function(n) { - var pos = n.pos.getc(true); - n.startPos.setc(pos.x, pos.y); - n.endPos.setc(pos.x, pos.y); - n.visited = false; - }); - var offset = { x: complete.offsetX, y: complete.offsetY }; - that.geom.translate(node.endPos.add(offset).$scale(-1), ["start", "current", "end"]); - group.show(getNodesToShow.call(that)); - that.plot(); - complete.onAfterCompute(that.clickedNode); - complete.onComplete(); - } - }); - }, - - /* - Method: onClick - - Animates the to center the node specified by *id*. - - Parameters: - - id - (string) A node id. - options - (optional|object) A group of options and callbacks described below. - onComplete - (object) An object callback called when the animation finishes. - Move - (object) An object that has as properties _offsetX_ or _offsetY_ for adding some offset position to the centered node. - - Example: - - (start code js) - st.onClick('mynodeid', { - Move: { - enable: true, - offsetX: 30, - offsetY: 5 - }, - onComplete: function() { - alert('yay!'); - } - }); - (end code) - - */ - onClick: function (id, options) { - var canvas = this.canvas, that = this, Geom = this.geom, config = this.config; - var innerController = { - Move: { - enable: true, - offsetX: config.offsetX || 0, - offsetY: config.offsetY || 0 - }, - setRightLevelToShowConfig: false, - onBeforeRequest: $.empty, - onBeforeContract: $.empty, - onBeforeMove: $.empty, - onBeforeExpand: $.empty - }; - var complete = $.merge(this.controller, innerController, options); - - if(!this.busy) { - this.busy = true; - var node = this.graph.getNode(id); - this.selectPath(node, this.clickedNode); - this.clickedNode = node; - complete.onBeforeCompute(node); - complete.onBeforeRequest(node); - this.requestNodes(node, { - onComplete: function() { - complete.onBeforeContract(node); - that.contract({ - onComplete: function() { - Geom.setRightLevelToShow(node, canvas, complete.setRightLevelToShowConfig); - complete.onBeforeMove(node); - that.move(node, { - Move: complete.Move, - onComplete: function() { - complete.onBeforeExpand(node); - that.expand(node, { - onComplete: function() { - that.busy = false; - complete.onAfterCompute(id); - complete.onComplete(); - } - }); // expand - } - }); // move - } - });// contract - } - });// request - } - } - }); - -})(); - -$jit.ST.$extend = true; - -/* - Class: ST.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - -*/ -$jit.ST.Op = new Class({ - - Implements: Graph.Op - -}); - -/* - - Performs operations on group of nodes. - -*/ -$jit.ST.Group = new Class({ - - initialize: function(viz) { - this.viz = viz; - this.canvas = viz.canvas; - this.config = viz.config; - this.animation = new Animation; - this.nodes = null; - }, - - /* - - Calls the request method on the controller to request a subtree for each node. - */ - requestNodes: function(nodes, controller) { - var counter = 0, len = nodes.length, nodeSelected = {}; - var complete = function() { controller.onComplete(); }; - var viz = this.viz; - if(len == 0) complete(); - for(var i=0; i= b._depth); }); - for(var i=0; i 0 - && n.drawn) { - n.drawn = false; - nds[node.id].push(n); - } else if((!root || !orns) && n.drawn) { - n.drawn = false; - nds[node.id].push(n); - } - }); - node.drawn = true; - } - // plot the whole (non-scaled) tree - if(nodes.length > 0) viz.fx.plot(); - // show nodes that were previously hidden - for(i in nds) { - $.each(nds[i], function(n) { n.drawn = true; }); - } - // plot each scaled subtree - for(i=0; i method - (end code) - -*/ - -$jit.ST.Geom = new Class({ - Implements: Graph.Geom, - /* - Changes the tree current orientation to the one specified. - - You should usually use instead. - */ - switchOrientation: function(orn) { - this.config.orientation = orn; - }, - - /* - Makes a value dispatch according to the current layout - Works like a CSS property, either _top-right-bottom-left_ or _top|bottom - left|right_. - */ - dispatch: function() { - // TODO(nico) should store Array.prototype.slice.call somewhere. - var args = Array.prototype.slice.call(arguments); - var s = args.shift(), len = args.length; - var val = function(a) { return typeof a == 'function'? a() : a; }; - if(len == 2) { - return (s == "top" || s == "bottom")? val(args[0]) : val(args[1]); - } else if(len == 4) { - switch(s) { - case "top": return val(args[0]); - case "right": return val(args[1]); - case "bottom": return val(args[2]); - case "left": return val(args[3]); - } - } - return undefined; - }, - - /* - Returns label height or with, depending on the tree current orientation. - */ - getSize: function(n, invert) { - var data = n.data, config = this.config; - var siblingOffset = config.siblingOffset; - var s = (config.multitree - && ('$orn' in data) - && data.$orn) || config.orientation; - var w = n.getData('width') + siblingOffset; - var h = n.getData('height') + siblingOffset; - if(!invert) - return this.dispatch(s, h, w); - else - return this.dispatch(s, w, h); - }, - - /* - Calculates a subtree base size. This is an utility function used by _getBaseSize_ - */ - getTreeBaseSize: function(node, level, leaf) { - var size = this.getSize(node, true), baseHeight = 0, that = this; - if(leaf(level, node)) return size; - if(level === 0) return 0; - node.eachSubnode(function(elem) { - baseHeight += that.getTreeBaseSize(elem, level -1, leaf); - }); - return (size > baseHeight? size : baseHeight) + this.config.subtreeOffset; - }, - - - /* - getEdge - - Returns a Complex instance with the begin or end position of the edge to be plotted. - - Parameters: - - node - A that is connected to this edge. - type - Returns the begin or end edge position. Possible values are 'begin' or 'end'. - - Returns: - - A number specifying the begin or end position. - */ - getEdge: function(node, type, s) { - var $C = function(a, b) { - return function(){ - return node.pos.add(new Complex(a, b)); - }; - }; - var dim = this.node; - var w = node.getData('width'); - var h = node.getData('height'); - - if(type == 'begin') { - if(dim.align == "center") { - return this.dispatch(s, $C(0, h/2), $C(-w/2, 0), - $C(0, -h/2),$C(w/2, 0)); - } else if(dim.align == "left") { - return this.dispatch(s, $C(0, h), $C(0, 0), - $C(0, 0), $C(w, 0)); - } else if(dim.align == "right") { - return this.dispatch(s, $C(0, 0), $C(-w, 0), - $C(0, -h),$C(0, 0)); - } else throw "align: not implemented"; - - - } else if(type == 'end') { - if(dim.align == "center") { - return this.dispatch(s, $C(0, -h/2), $C(w/2, 0), - $C(0, h/2), $C(-w/2, 0)); - } else if(dim.align == "left") { - return this.dispatch(s, $C(0, 0), $C(w, 0), - $C(0, h), $C(0, 0)); - } else if(dim.align == "right") { - return this.dispatch(s, $C(0, -h),$C(0, 0), - $C(0, 0), $C(-w, 0)); - } else throw "align: not implemented"; - } - }, - - /* - Adjusts the tree position due to canvas scaling or translation. - */ - getScaledTreePosition: function(node, scale) { - var dim = this.node; - var w = node.getData('width'); - var h = node.getData('height'); - var s = (this.config.multitree - && ('$orn' in node.data) - && node.data.$orn) || this.config.orientation; - - var $C = function(a, b) { - return function(){ - return node.pos.add(new Complex(a, b)).$scale(1 - scale); - }; - }; - if(dim.align == "left") { - return this.dispatch(s, $C(0, h), $C(0, 0), - $C(0, 0), $C(w, 0)); - } else if(dim.align == "center") { - return this.dispatch(s, $C(0, h / 2), $C(-w / 2, 0), - $C(0, -h / 2),$C(w / 2, 0)); - } else if(dim.align == "right") { - return this.dispatch(s, $C(0, 0), $C(-w, 0), - $C(0, -h),$C(0, 0)); - } else throw "align: not implemented"; - }, - - /* - treeFitsInCanvas - - Returns a Boolean if the current subtree fits in canvas. - - Parameters: - - node - A which is the current root of the subtree. - canvas - The object. - level - The depth of the subtree to be considered. - */ - treeFitsInCanvas: function(node, canvas, level) { - var csize = canvas.getSize(); - var s = (this.config.multitree - && ('$orn' in node.data) - && node.data.$orn) || this.config.orientation; - - var size = this.dispatch(s, csize.width, csize.height); - var baseSize = this.getTreeBaseSize(node, level, function(level, node) { - return level === 0 || !node.anySubnode(); - }); - return (baseSize < size); - } -}); - -/* - Class: ST.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - -*/ -$jit.ST.Plot = new Class({ - - Implements: Graph.Plot, - - /* - Plots a subtree from the spacetree. - */ - plotSubtree: function(node, opt, scale, animating) { - var viz = this.viz, canvas = viz.canvas, config = viz.config; - scale = Math.min(Math.max(0.001, scale), 1); - if(scale >= 0) { - node.drawn = false; - var ctx = canvas.getCtx(); - var diff = viz.geom.getScaledTreePosition(node, scale); - ctx.translate(diff.x, diff.y); - ctx.scale(scale, scale); - } - this.plotTree(node, $.merge(opt, { - 'withLabels': true, - 'hideLabels': !!scale, - 'plotSubtree': function(n, ch) { - var root = config.multitree && !('$orn' in node.data); - var orns = root && node.getData('orns'); - return !root || orns.indexOf(elem.getData('orn')) > -1; - } - }), animating); - if(scale >= 0) node.drawn = true; - }, - - /* - Method: getAlignedPos - - Returns a *x, y* object with the position of the top/left corner of a node. - - Parameters: - - pos - (object) A position. - width - (number) The width of the node. - height - (number) The height of the node. - - */ - getAlignedPos: function(pos, width, height) { - var nconfig = this.node; - var square, orn; - if(nconfig.align == "center") { - square = { - x: pos.x - width / 2, - y: pos.y - height / 2 - }; - } else if (nconfig.align == "left") { - orn = this.config.orientation; - if(orn == "bottom" || orn == "top") { - square = { - x: pos.x - width / 2, - y: pos.y - }; - } else { - square = { - x: pos.x, - y: pos.y - height / 2 - }; - } - } else if(nconfig.align == "right") { - orn = this.config.orientation; - if(orn == "bottom" || orn == "top") { - square = { - x: pos.x - width / 2, - y: pos.y - height - }; - } else { - square = { - x: pos.x - width, - y: pos.y - height / 2 - }; - } - } else throw "align: not implemented"; - - return square; - }, - - getOrientation: function(adj) { - var config = this.config; - var orn = config.orientation; - - if(config.multitree) { - var nodeFrom = adj.nodeFrom; - var nodeTo = adj.nodeTo; - orn = (('$orn' in nodeFrom.data) - && nodeFrom.data.$orn) - || (('$orn' in nodeTo.data) - && nodeTo.data.$orn); - } - - return orn; - } -}); - -/* - Class: ST.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - */ -$jit.ST.Label = {}; - -/* - ST.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - -*/ -$jit.ST.Label.Native = new Class({ - Implements: Graph.Label.Native, - - renderLabel: function(canvas, node, controller) { - var ctx = canvas.getCtx(); - var coord = node.pos.getc(true); - ctx.fillText(node.name, coord.x, coord.y); - } -}); - -$jit.ST.Label.DOM = new Class({ - Implements: Graph.Label.DOM, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.getc(true), - config = this.viz.config, - dim = config.Node, - canvas = this.viz.canvas, - w = node.getData('width'), - h = node.getData('height'), - radius = canvas.getSize(), - labelPos, orn; - - var ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - posx = pos.x * sx + ox, - posy = pos.y * sy + oy; - - if(dim.align == "center") { - labelPos= { - x: Math.round(posx - w / 2 + radius.width/2), - y: Math.round(posy - h / 2 + radius.height/2) - }; - } else if (dim.align == "left") { - orn = config.orientation; - if(orn == "bottom" || orn == "top") { - labelPos= { - x: Math.round(posx - w / 2 + radius.width/2), - y: Math.round(posy + radius.height/2) - }; - } else { - labelPos= { - x: Math.round(posx + radius.width/2), - y: Math.round(posy - h / 2 + radius.height/2) - }; - } - } else if(dim.align == "right") { - orn = config.orientation; - if(orn == "bottom" || orn == "top") { - labelPos= { - x: Math.round(posx - w / 2 + radius.width/2), - y: Math.round(posy - h + radius.height/2) - }; - } else { - labelPos= { - x: Math.round(posx - w + radius.width/2), - y: Math.round(posy - h / 2 + radius.height/2) - }; - } - } else throw "align: not implemented"; - - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.display = this.fitsInCanvas(labelPos, canvas)? '' : 'none'; - controller.onPlaceLabel(tag, node); - } -}); - -/* - ST.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - -*/ -$jit.ST.Label.SVG = new Class({ - Implements: [$jit.ST.Label.DOM, Graph.Label.SVG], - - initialize: function(viz) { - this.viz = viz; - } -}); - -/* - ST.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - -*/ -$jit.ST.Label.HTML = new Class({ - Implements: [$jit.ST.Label.DOM, Graph.Label.HTML], - - initialize: function(viz) { - this.viz = viz; - } -}); - - -/* - Class: ST.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'circle', 'rectangle', 'ellipse' and 'square'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - ST.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - -*/ -$jit.ST.Plot.NodeTypes = new Class({ - 'none': { - 'render': $.empty, - 'contains': $.lambda(false) - }, - 'circle': { - 'render': function(node, canvas) { - var dim = node.getData('dim'), - pos = this.getAlignedPos(node.pos.getc(true), dim, dim), - dim2 = dim/2; - this.nodeHelper.circle.render('fill', {x:pos.x+dim2, y:pos.y+dim2}, dim2, canvas); - }, - 'contains': function(node, pos) { - var dim = node.getData('dim'), - npos = this.getAlignedPos(node.pos.getc(true), dim, dim), - dim2 = dim/2; - this.nodeHelper.circle.contains({x:npos.x+dim2, y:npos.y+dim2}, dim2); - } - }, - 'square': { - 'render': function(node, canvas) { - var dim = node.getData('dim'), - dim2 = dim/2, - pos = this.getAlignedPos(node.pos.getc(true), dim, dim); - this.nodeHelper.square.render('fill', {x:pos.x+dim2, y:pos.y+dim2}, dim2, canvas); - }, - 'contains': function(node, pos) { - var dim = node.getData('dim'), - npos = this.getAlignedPos(node.pos.getc(true), dim, dim), - dim2 = dim/2; - this.nodeHelper.square.contains({x:npos.x+dim2, y:npos.y+dim2}, dim2); - } - }, - 'ellipse': { - 'render': function(node, canvas) { - var width = node.getData('width'), - height = node.getData('height'), - pos = this.getAlignedPos(node.pos.getc(true), width, height); - this.nodeHelper.ellipse.render('fill', {x:pos.x+width/2, y:pos.y+height/2}, width, height, canvas); - }, - 'contains': function(node, pos) { - var width = node.getData('width'), - height = node.getData('height'), - npos = this.getAlignedPos(node.pos.getc(true), width, height); - this.nodeHelper.ellipse.contains({x:npos.x+width/2, y:npos.y+height/2}, width, height, canvas); - } - }, - 'rectangle': { - 'render': function(node, canvas) { - var width = node.getData('width'), - height = node.getData('height'), - pos = this.getAlignedPos(node.pos.getc(true), width, height); - this.nodeHelper.rectangle.render('fill', {x:pos.x+width/2, y:pos.y+height/2}, width, height, canvas); - }, - 'contains': function(node, pos) { - var width = node.getData('width'), - height = node.getData('height'), - npos = this.getAlignedPos(node.pos.getc(true), width, height); - this.nodeHelper.rectangle.contains({x:npos.x+width/2, y:npos.y+height/2}, width, height, canvas); - } - } -}); - -/* - Class: ST.Plot.EdgeTypes - - This class contains a list of built-in types. - Edge types implemented are 'none', 'line', 'arrow', 'quadratic:begin', 'quadratic:end', 'bezier'. - - You can add your custom edge types, customizing your visualization to the extreme. - - Example: - - (start code js) - ST.Plot.EdgeTypes.implement({ - 'mySpecialType': { - 'render': function(adj, canvas) { - //print your custom edge to canvas - }, - //optional - 'contains': function(adj, pos) { - //return true if pos is inside the arc or false otherwise - } - } - }); - (end code) - -*/ -$jit.ST.Plot.EdgeTypes = new Class({ - 'none': $.empty, - 'line': { - 'render': function(adj, canvas) { - var orn = this.getOrientation(adj), - nodeFrom = adj.nodeFrom, - nodeTo = adj.nodeTo, - rel = nodeFrom._depth < nodeTo._depth, - from = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin', orn), - to = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn); - this.edgeHelper.line.render(from, to, canvas); - }, - 'contains': function(adj, pos) { - var orn = this.getOrientation(adj), - nodeFrom = adj.nodeFrom, - nodeTo = adj.nodeTo, - rel = nodeFrom._depth < nodeTo._depth, - from = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin', orn), - to = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn); - return this.edgeHelper.line.contains(from, to, pos, this.edge.epsilon); - } - }, - 'arrow': { - 'render': function(adj, canvas) { - var orn = this.getOrientation(adj), - node = adj.nodeFrom, - child = adj.nodeTo, - dim = adj.getData('dim'), - from = this.viz.geom.getEdge(node, 'begin', orn), - to = this.viz.geom.getEdge(child, 'end', orn), - direction = adj.data.$direction, - inv = (direction && direction.length>1 && direction[0] != node.id); - this.edgeHelper.arrow.render(from, to, dim, inv, canvas); - }, - 'contains': function(adj, pos) { - var orn = this.getOrientation(adj), - nodeFrom = adj.nodeFrom, - nodeTo = adj.nodeTo, - rel = nodeFrom._depth < nodeTo._depth, - from = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin', orn), - to = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn); - return this.edgeHelper.arrow.contains(from, to, pos, this.edge.epsilon); - } - }, - 'quadratic:begin': { - 'render': function(adj, canvas) { - var orn = this.getOrientation(adj); - var nodeFrom = adj.nodeFrom, - nodeTo = adj.nodeTo, - rel = nodeFrom._depth < nodeTo._depth, - begin = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin', orn), - end = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn), - dim = adj.getData('dim'), - ctx = canvas.getCtx(); - ctx.beginPath(); - ctx.moveTo(begin.x, begin.y); - switch(orn) { - case "left": - ctx.quadraticCurveTo(begin.x + dim, begin.y, end.x, end.y); - break; - case "right": - ctx.quadraticCurveTo(begin.x - dim, begin.y, end.x, end.y); - break; - case "top": - ctx.quadraticCurveTo(begin.x, begin.y + dim, end.x, end.y); - break; - case "bottom": - ctx.quadraticCurveTo(begin.x, begin.y - dim, end.x, end.y); - break; - } - ctx.stroke(); - } - }, - 'quadratic:end': { - 'render': function(adj, canvas) { - var orn = this.getOrientation(adj); - var nodeFrom = adj.nodeFrom, - nodeTo = adj.nodeTo, - rel = nodeFrom._depth < nodeTo._depth, - begin = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin', orn), - end = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn), - dim = adj.getData('dim'), - ctx = canvas.getCtx(); - ctx.beginPath(); - ctx.moveTo(begin.x, begin.y); - switch(orn) { - case "left": - ctx.quadraticCurveTo(end.x - dim, end.y, end.x, end.y); - break; - case "right": - ctx.quadraticCurveTo(end.x + dim, end.y, end.x, end.y); - break; - case "top": - ctx.quadraticCurveTo(end.x, end.y - dim, end.x, end.y); - break; - case "bottom": - ctx.quadraticCurveTo(end.x, end.y + dim, end.x, end.y); - break; - } - ctx.stroke(); - } - }, - 'bezier': { - 'render': function(adj, canvas) { - var orn = this.getOrientation(adj), - nodeFrom = adj.nodeFrom, - nodeTo = adj.nodeTo, - rel = nodeFrom._depth < nodeTo._depth, - begin = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin', orn), - end = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn), - dim = adj.getData('dim'), - ctx = canvas.getCtx(); - ctx.beginPath(); - ctx.moveTo(begin.x, begin.y); - switch(orn) { - case "left": - ctx.bezierCurveTo(begin.x + dim, begin.y, end.x - dim, end.y, end.x, end.y); - break; - case "right": - ctx.bezierCurveTo(begin.x - dim, begin.y, end.x + dim, end.y, end.x, end.y); - break; - case "top": - ctx.bezierCurveTo(begin.x, begin.y + dim, end.x, end.y - dim, end.x, end.y); - break; - case "bottom": - ctx.bezierCurveTo(begin.x, begin.y - dim, end.x, end.y + dim, end.x, end.y); - break; - } - ctx.stroke(); - } - } -}); - - -Options.LineChart = { - $extend: true, - - animate: false, - labelOffset: 3, // label offset - type: 'basic', // gradient - dataPointSize: 10, - Tips: { - enable: false, - onShow: $.empty, - onHide: $.empty - }, - Ticks: { - enable: false, - segments: 4, - color: '#000000' - }, - Events: { - enable: false, - onClick: $.empty - }, - selectOnHover: true, - showAggregates: true, - showLabels: true, - filterOnClick: false, - restoreOnRightClick: false -}; - - -/* - * File: LineChart.js - * -*/ - -$jit.ST.Plot.NodeTypes.implement({ - 'linechart-basic' : { - 'render' : function(node, canvas) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x + width/2 , y = algnPos.y, - stringArray = node.getData('stringArray'), - lastNode = node.getData('lastNode'), - dimArray = node.getData('dimArray'), - valArray = node.getData('valueArray'), - colorArray = node.getData('colorArray'), - colorLength = colorArray.length, - config = node.getData('config'), - gradient = node.getData('gradient'), - showLabels = config.showLabels, - aggregates = config.showAggregates, - label = config.Label, - prev = node.getData('prev'), - dataPointSize = config.dataPointSize; - - var ctx = canvas.getCtx(), border = node.getData('border'); - if (colorArray && dimArray && stringArray) { - - for (var i=0, l=dimArray.length, acumLeft=0, acumRight=0, valAcum=0; i x + dataPointMidPoint) { - return false; - } - //deep check - for(var i=0, l=dimArray.length; i= x - dataPointMidPoint && mpos.x <= x + dataPointMidPoint && mpos.y >= y - dimi[0] - dataPointMidPoint && mpos.y <= y - dimi[0] + dataPointMidPoint) { - var valArrayCur = node.getData('valArrayCur'); - var results = array_match(valArrayCur[i],valArrayCur); - var matches = results[0]; - var indexValues = results[1]; - if(matches > 1) { - var names = new Array(), - values = new Array(), - percentages = new Array(), - linksArr = new Array(); - for(var j=0, il=indexValues.length; j. - -*/ -$jit.LineChart = new Class({ - st: null, - colors: ["#416D9C", "#70A35E", "#EBB056", "#C74243", "#83548B", "#909291", "#557EAA"], - selected: {}, - busy: false, - - initialize: function(opt) { - this.controller = this.config = - $.merge(Options("Canvas", "Margin", "Label", "LineChart"), { - Label: { type: 'Native' } - }, opt); - //set functions for showLabels and showAggregates - var showLabels = this.config.showLabels, - typeLabels = $.type(showLabels), - showAggregates = this.config.showAggregates, - typeAggregates = $.type(showAggregates); - this.config.showLabels = typeLabels == 'function'? showLabels : $.lambda(showLabels); - this.config.showAggregates = typeAggregates == 'function'? showAggregates : $.lambda(showAggregates); - Options.Fx.clearCanvas = false; - this.initializeViz(); - }, - - initializeViz: function() { - var config = this.config, - that = this, - nodeType = config.type.split(":")[0], - nodeLabels = {}; - - var st = new $jit.ST({ - injectInto: config.injectInto, - orientation: "bottom", - backgroundColor: config.backgroundColor, - renderBackground: config.renderBackground, - levelDistance: 0, - siblingOffset: 0, - subtreeOffset: 0, - withLabels: config.Label.type != 'Native', - useCanvas: config.useCanvas, - Label: { - type: config.Label.type - }, - Node: { - overridable: true, - type: 'linechart-' + nodeType, - align: 'left', - width: 1, - height: 1 - }, - Edge: { - type: 'none' - }, - Tips: { - enable: config.Tips.enable, - type: 'Native', - force: true, - onShow: function(tip, node, contains) { - var elem = contains; - config.Tips.onShow(tip, elem, node); - } - }, - Events: { - enable: true, - type: 'Native', - onClick: function(node, eventInfo, evt) { - if(!config.filterOnClick && !config.Events.enable) return; - var elem = eventInfo.getContains(); - if(elem) config.filterOnClick && that.filter(elem.name); - config.Events.enable && config.Events.onClick(elem, eventInfo, evt); - }, - onRightClick: function(node, eventInfo, evt) { - if(!config.restoreOnRightClick) return; - that.restore(); - }, - onMouseMove: function(node, eventInfo, evt) { - if(!config.selectOnHover) return; - if(node) { - var elem = eventInfo.getContains(); - that.select(node.id, elem.name, elem.index); - } else { - that.select(false, false, false); - } - } - }, - onCreateLabel: function(domElement, node) { - var labelConf = config.Label, - valueArray = node.getData('valueArray'), - acumLeft = $.reduce(valueArray, function(x, y) { return x + y[0]; }, 0), - acumRight = $.reduce(valueArray, function(x, y) { return x + y[1]; }, 0); - if(node.getData('prev')) { - var nlbs = { - wrapper: document.createElement('div'), - aggregate: document.createElement('div'), - label: document.createElement('div') - }; - var wrapper = nlbs.wrapper, - label = nlbs.label, - aggregate = nlbs.aggregate, - wrapperStyle = wrapper.style, - labelStyle = label.style, - aggregateStyle = aggregate.style; - //store node labels - nodeLabels[node.id] = nlbs; - //append labels - wrapper.appendChild(label); - wrapper.appendChild(aggregate); - if(!config.showLabels(node.name, acumLeft, acumRight, node)) { - label.style.display = 'none'; - } - if(!config.showAggregates(node.name, acumLeft, acumRight, node)) { - aggregate.style.display = 'none'; - } - wrapperStyle.position = 'relative'; - wrapperStyle.overflow = 'visible'; - wrapperStyle.fontSize = labelConf.size + 'px'; - wrapperStyle.fontFamily = labelConf.family; - wrapperStyle.color = labelConf.color; - wrapperStyle.textAlign = 'center'; - aggregateStyle.position = labelStyle.position = 'absolute'; - - domElement.style.width = node.getData('width') + 'px'; - domElement.style.height = node.getData('height') + 'px'; - label.innerHTML = node.name; - - domElement.appendChild(wrapper); - } - }, - onPlaceLabel: function(domElement, node) { - if(!node.getData('prev')) return; - var labels = nodeLabels[node.id], - wrapperStyle = labels.wrapper.style, - labelStyle = labels.label.style, - aggregateStyle = labels.aggregate.style, - width = node.getData('width'), - height = node.getData('height'), - dimArray = node.getData('dimArray'), - valArray = node.getData('valueArray'), - acumLeft = $.reduce(valArray, function(x, y) { return x + y[0]; }, 0), - acumRight = $.reduce(valArray, function(x, y) { return x + y[1]; }, 0), - font = parseInt(wrapperStyle.fontSize, 10), - domStyle = domElement.style; - - if(dimArray && valArray) { - if(config.showLabels(node.name, acumLeft, acumRight, node)) { - labelStyle.display = ''; - } else { - labelStyle.display = 'none'; - } - if(config.showAggregates(node.name, acumLeft, acumRight, node)) { - aggregateStyle.display = ''; - } else { - aggregateStyle.display = 'none'; - } - wrapperStyle.width = aggregateStyle.width = labelStyle.width = domElement.style.width = width + 'px'; - aggregateStyle.left = labelStyle.left = -width/2 + 'px'; - for(var i=0, l=valArray.length, acum=0, leftAcum=0; i 0) { - acum+= valArray[i][0]; - leftAcum+= dimArray[i][0]; - } - } - aggregateStyle.top = (-font - config.labelOffset) + 'px'; - labelStyle.top = (config.labelOffset + leftAcum) + 'px'; - domElement.style.top = parseInt(domElement.style.top, 10) - leftAcum + 'px'; - domElement.style.height = wrapperStyle.height = leftAcum + 'px'; - labels.aggregate.innerHTML = acum; - } - } - }); - - var size = st.canvas.getSize(), - margin = config.Margin; - st.config.offsetY = -size.height/2 + margin.bottom - + (config.showLabels && (config.labelOffset + config.Label.size)); - st.config.offsetX = (margin.right - margin.left - config.labelOffset - config.Label.size)/2; - this.st = st; - this.canvas = this.st.canvas; - }, - - renderTitle: function() { - var canvas = this.canvas, - size = canvas.getSize(), - config = this.config, - margin = config.Margin, - label = config.Label, - title = config.Title; - ctx = canvas.getCtx(); - ctx.fillStyle = title.color; - ctx.textAlign = 'left'; - ctx.textBaseline = 'top'; - ctx.font = label.style + ' bold ' +' ' + title.size + 'px ' + label.family; - if(label.type == 'Native') { - ctx.fillText(title.text, -size.width/2+margin.left, -size.height/2+margin.top); - } - }, - - renderTicks: function() { - - var canvas = this.canvas, - size = canvas.getSize(), - config = this.config, - margin = config.Margin, - ticks = config.Ticks, - title = config.Title, - subtitle = config.Subtitle, - label = config.Label, - maxValue = this.maxValue, - maxTickValue = Math.ceil(maxValue*.1)*10; - if(maxTickValue == maxValue) { - var length = maxTickValue.toString().length; - maxTickValue = maxTickValue + parseInt(pad(1,length)); - } - - - labelValue = 0, - labelIncrement = maxTickValue/ticks.segments, - ctx = canvas.getCtx(); - ctx.strokeStyle = ticks.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textAlign = 'center'; - ctx.textBaseline = 'middle'; - - idLabel = canvas.id + "-label"; - labelDim = 100; - container = document.getElementById(idLabel); - - - var axis = (size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text? subtitle.size+subtitle.offset:0)), - htmlOrigin = size.height - (margin.bottom+config.labelOffset+label.size+(subtitle.text? subtitle.size+subtitle.offset:0)), - grid = -size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text? title.size+title.offset:0)+(subtitle.text? subtitle.size+subtitle.offset:0)), - segmentLength = grid/ticks.segments; - ctx.fillStyle = ticks.color; - ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1, -(size.height/2)+margin.top+(title.text? title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text? title.size+title.offset:0)-(subtitle.text? subtitle.size+subtitle.offset:0)); - - while(axis>=grid) { - ctx.save(); - ctx.translate(-(size.width/2)+margin.left, Math.round(axis)); - ctx.rotate(Math.PI / 2); - ctx.fillStyle = label.color; - if(config.showLabels) { - if(label.type == 'Native') { - ctx.fillText(labelValue, 0, 0); - } else { - //html labels on y axis - labelDiv = document.createElement('div'); - labelDiv.innerHTML = labelValue; - labelDiv.className = "rotatedLabel"; -// labelDiv.class = "rotatedLabel"; - labelDiv.style.top = (htmlOrigin - (labelDim/2)) + "px"; - labelDiv.style.left = margin.left + "px"; - labelDiv.style.width = labelDim + "px"; - labelDiv.style.height = labelDim + "px"; - labelDiv.style.textAlign = "center"; - labelDiv.style.verticalAlign = "middle"; - labelDiv.style.position = "absolute"; - container.appendChild(labelDiv); - } - } - ctx.restore(); - ctx.fillStyle = ticks.color; - ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size, Math.round(axis), size.width-margin.right-margin.left-config.labelOffset-label.size,1 ); - htmlOrigin += segmentLength; - axis += segmentLength; - labelValue += labelIncrement; - } - - - - - - - }, - - renderBackground: function() { - var canvas = this.canvas, - config = this.config, - backgroundColor = config.backgroundColor, - size = canvas.getSize(), - ctx = canvas.getCtx(); - //ctx.globalCompositeOperation = "destination-over"; - ctx.fillStyle = backgroundColor; - ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height); - }, - - - /* - Method: loadJSON - - Loads JSON data into the visualization. - - Parameters: - - json - The JSON data format. This format is described in . - - Example: - (start code js) - var areaChart = new $jit.AreaChart(options); - areaChart.loadJSON(json); - (end code) - */ - loadJSON: function(json) { - var prefix = $.time(), - ch = [], - st = this.st, - name = $.splat(json.label), - color = $.splat(json.color || this.colors), - config = this.config, - ticks = config.Ticks, - renderBackground = config.renderBackground, - gradient = !!config.type.split(":")[1], - animate = config.animate, - title = config.Title, - groupTotalValue = 0; - - var valArrayAll = new Array(); - - for(var i=0, values=json.values, l=values.length; i. - onComplete - (object) A callback object to be called when the animation transition when updating the data end. - - Example: - - (start code js) - areaChart.updateJSON(json, { - onComplete: function() { - alert('update complete!'); - } - }); - (end code) - */ - updateJSON: function(json, onComplete) { - if(this.busy) return; - this.busy = true; - - var st = this.st, - graph = st.graph, - labels = json.label && $.splat(json.label), - values = json.values, - animate = this.config.animate, - that = this; - $.each(values, function(v) { - var n = graph.getByName(v.label); - if(n) { - v.values = $.splat(v.values); - var stringArray = n.getData('stringArray'), - valArray = n.getData('valueArray'); - $.each(valArray, function(a, i) { - a[0] = v.values[i]; - if(labels) stringArray[i] = labels[i]; - }); - n.setData('valueArray', valArray); - var prev = n.getData('prev'), - next = n.getData('next'), - nextNode = graph.getByName(next); - if(prev) { - var p = graph.getByName(prev); - if(p) { - var valArray = p.getData('valueArray'); - $.each(valArray, function(a, i) { - a[1] = v.values[i]; - }); - } - } - if(!nextNode) { - var valArray = n.getData('valueArray'); - $.each(valArray, function(a, i) { - a[1] = v.values[i]; - }); - } - } - }); - this.normalizeDims(); - st.compute(); - - st.select(st.root); - if(animate) { - st.fx.animate({ - modes: ['node-property:height:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } - }, - -/* - Method: filter - - Filter selected stacks, collapsing all other stacks. You can filter multiple stacks at the same time. - - Parameters: - - Variable strings arguments with the name of the stacks. - - Example: - - (start code js) - areaChart.filter('label A', 'label C'); - (end code) - - See also: - - . - */ - filter: function() { - if(this.busy) return; - this.busy = true; - if(this.config.Tips.enable) this.st.tips.hide(); - this.select(false, false, false); - var args = Array.prototype.slice.call(arguments); - var rt = this.st.graph.getNode(this.st.root); - var that = this; - rt.eachAdjacency(function(adj) { - var n = adj.nodeTo, - dimArray = n.getData('dimArray'), - stringArray = n.getData('stringArray'); - n.setData('dimArray', $.map(dimArray, function(d, i) { - return ($.indexOf(args, stringArray[i]) > -1)? d:[0, 0]; - }), 'end'); - }); - this.st.fx.animate({ - modes: ['node-property:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - } - }); - }, - - /* - Method: restore - - Sets all stacks that could have been filtered visible. - - Example: - - (start code js) - areaChart.restore(); - (end code) - - See also: - - . - */ - restore: function() { - if(this.busy) return; - this.busy = true; - if(this.config.Tips.enable) this.st.tips.hide(); - this.select(false, false, false); - this.normalizeDims(); - var that = this; - this.st.fx.animate({ - modes: ['node-property:height:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - } - }); - }, - //adds the little brown bar when hovering the node - select: function(id, name, index) { - if(!this.config.selectOnHover) return; - var s = this.selected; - if(s.id != id || s.name != name - || s.index != index) { - s.id = id; - s.name = name; - s.index = index; - this.st.graph.eachNode(function(n) { - n.setData('border', false); - }); - if(id) { - var n = this.st.graph.getNode(id); - n.setData('border', s); - var link = index === 0? 'prev':'next'; - link = n.getData(link); - if(link) { - n = this.st.graph.getByName(link); - if(n) { - n.setData('border', { - name: name, - index: 1-index - }); - } - } - } - this.st.plot(); - } - }, - - /* - Method: getLegend - - Returns an object containing as keys the legend names and as values hex strings with color values. - - Example: - - (start code js) - var legend = areaChart.getLegend(); - (end code) - */ - getLegend: function() { - var legend = new Array(); - var name = new Array(); - var color = new Array(); - var n; - this.st.graph.getNode(this.st.root).eachAdjacency(function(adj) { - n = adj.nodeTo; - }); - var colors = n.getData('colorArray'), - len = colors.length; - $.each(n.getData('stringArray'), function(s, i) { - color[i] = colors[i % len]; - name[i] = s; - }); - legend['name'] = name; - legend['color'] = color; - return legend; - }, - - /* - Method: getMaxValue - - Returns the maximum accumulated value for the stacks. This method is used for normalizing the graph heights according to the canvas height. - - Example: - - (start code js) - var ans = areaChart.getMaxValue(); - (end code) - - In some cases it could be useful to override this method to normalize heights for a group of AreaCharts, like when doing small multiples. - - Example: - - (start code js) - //will return 100 for all AreaChart instances, - //displaying all of them with the same scale - $jit.AreaChart.implement({ - 'getMaxValue': function() { - return 100; - } - }); - (end code) - -*/ - - normalizeDims: function() { - //number of elements - var root = this.st.graph.getNode(this.st.root), l=0; - root.eachAdjacency(function() { - l++; - }); - - - var maxValue = this.maxValue || 1, - size = this.st.canvas.getSize(), - config = this.config, - margin = config.Margin, - labelOffset = config.labelOffset + config.Label.size, - fixedDim = (size.width - (margin.left + margin.right + labelOffset )) / (l-1), - animate = config.animate, - ticks = config.Ticks, - height = size.height - (margin.top + margin.bottom) - (config.showAggregates && labelOffset) - - (config.showLabels && labelOffset); - - - var maxTickValue = Math.ceil(maxValue*.1)*10; - if(maxTickValue == maxValue) { - var length = maxTickValue.toString().length; - maxTickValue = maxTickValue + parseInt(pad(1,length)); - } - - - - this.st.graph.eachNode(function(n) { - var acumLeft = 0, acumRight = 0, animateValue = []; - $.each(n.getData('valueArray'), function(v) { - acumLeft += +v[0]; - acumRight += +v[1]; - animateValue.push([0, 0]); - }); - var acum = acumRight>acumLeft? acumRight:acumLeft; - - n.setData('width', fixedDim); - if(animate) { - n.setData('height', acum * height / maxValue, 'end'); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return [n[0] * height / maxValue, n[1] * height / maxValue]; - }), 'end'); - var dimArray = n.getData('dimArray'); - if(!dimArray) { - n.setData('dimArray', animateValue); - } - } else { - - if(ticks.enable) { - n.setData('height', acum * height / maxValue); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return [n[0] * height / maxTickValue, n[1] * height / maxTickValue]; - })); - } else { - n.setData('height', acum * height / maxValue); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return [n[0] * height / maxValue, n[1] * height / maxValue]; - })); - } - - - } - }); - } -}); - - - - - -/* - * File: AreaChart.js - * -*/ - -$jit.ST.Plot.NodeTypes.implement({ - 'areachart-stacked' : { - 'render' : function(node, canvas) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - stringArray = node.getData('stringArray'), - dimArray = node.getData('dimArray'), - valArray = node.getData('valueArray'), - valLeft = $.reduce(valArray, function(x, y) { return x + y[0]; }, 0), - valRight = $.reduce(valArray, function(x, y) { return x + y[1]; }, 0), - colorArray = node.getData('colorArray'), - colorLength = colorArray.length, - config = node.getData('config'), - gradient = node.getData('gradient'), - showLabels = config.showLabels, - aggregates = config.showAggregates, - label = config.Label, - prev = node.getData('prev'); - - var ctx = canvas.getCtx(), border = node.getData('border'); - if (colorArray && dimArray && stringArray) { - for (var i=0, l=dimArray.length, acumLeft=0, acumRight=0, valAcum=0; i 0 || dimArray[i][1] > 0)) { - var h1 = acumLeft + dimArray[i][0], - h2 = acumRight + dimArray[i][1], - alpha = Math.atan((h2 - h1) / width), - delta = 55; - var linear = ctx.createLinearGradient(x + width/2, - y - (h1 + h2)/2, - x + width/2 + delta * Math.sin(alpha), - y - (h1 + h2)/2 + delta * Math.cos(alpha)); - var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), - function(v) { return (v * 0.85) >> 0; })); - linear.addColorStop(0, colorArray[i % colorLength]); - linear.addColorStop(1, color); - ctx.fillStyle = linear; - } - ctx.beginPath(); - ctx.moveTo(x, y - acumLeft); - ctx.lineTo(x + width, y - acumRight); - ctx.lineTo(x + width, y - acumRight - dimArray[i][1]); - ctx.lineTo(x, y - acumLeft - dimArray[i][0]); - ctx.lineTo(x, y - acumLeft); - ctx.fill(); - ctx.restore(); - if(border) { - var strong = border.name == stringArray[i]; - var perc = strong? 0.7 : 0.8; - var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), - function(v) { return (v * perc) >> 0; })); - ctx.strokeStyle = color; - ctx.lineWidth = strong? 4 : 1; - ctx.save(); - ctx.beginPath(); - if(border.index === 0) { - ctx.moveTo(x, y - acumLeft); - ctx.lineTo(x, y - acumLeft - dimArray[i][0]); - } else { - ctx.moveTo(x + width, y - acumRight); - ctx.lineTo(x + width, y - acumRight - dimArray[i][1]); - } - ctx.stroke(); - ctx.restore(); - } - acumLeft += (dimArray[i][0] || 0); - acumRight += (dimArray[i][1] || 0); - - if(dimArray[i][0] > 0) - valAcum += (valArray[i][0] || 0); - } - if(prev && label.type == 'Native') { - ctx.save(); - ctx.beginPath(); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textAlign = 'center'; - ctx.textBaseline = 'middle'; - if(aggregates(node.name, valLeft, valRight, node)) { - ctx.fillText(valAcum, x, y - acumLeft - config.labelOffset - label.size/2, width); - } - if(showLabels(node.name, valLeft, valRight, node)) { - ctx.fillText(node.name, x, y + label.size/2 + config.labelOffset); - } - ctx.restore(); - } - } - }, - 'contains': function(node, mpos) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - rx = mpos.x - x; - //bounding box check - if(mpos.x < x || mpos.x > x + width - || mpos.y > y || mpos.y < y - height) { - return false; - } - //deep check - for(var i=0, l=dimArray.length, lAcum=y, rAcum=y; i= intersec) { - var index = +(rx > width/2); - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i][index], - 'index': index - }; - } - } - return false; - } - } -}); - -/* - Class: AreaChart - - A visualization that displays stacked area charts. - - Constructor Options: - - See . - -*/ -$jit.AreaChart = new Class({ - st: null, - colors: ["#416D9C", "#70A35E", "#EBB056", "#C74243", "#83548B", "#909291", "#557EAA"], - selected: {}, - busy: false, - - initialize: function(opt) { - this.controller = this.config = - $.merge(Options("Canvas", "Margin", "Label", "AreaChart"), { - Label: { type: 'Native' } - }, opt); - //set functions for showLabels and showAggregates - var showLabels = this.config.showLabels, - typeLabels = $.type(showLabels), - showAggregates = this.config.showAggregates, - typeAggregates = $.type(showAggregates); - this.config.showLabels = typeLabels == 'function'? showLabels : $.lambda(showLabels); - this.config.showAggregates = typeAggregates == 'function'? showAggregates : $.lambda(showAggregates); - - this.initializeViz(); - }, - - initializeViz: function() { - var config = this.config, - that = this, - nodeType = config.type.split(":")[0], - nodeLabels = {}; - - var st = new $jit.ST({ - injectInto: config.injectInto, - orientation: "bottom", - levelDistance: 0, - siblingOffset: 0, - subtreeOffset: 0, - withLabels: config.Label.type != 'Native', - useCanvas: config.useCanvas, - Label: { - type: config.Label.type - }, - Node: { - overridable: true, - type: 'areachart-' + nodeType, - align: 'left', - width: 1, - height: 1 - }, - Edge: { - type: 'none' - }, - Tips: { - enable: config.Tips.enable, - type: 'Native', - force: true, - onShow: function(tip, node, contains) { - var elem = contains; - config.Tips.onShow(tip, elem, node); - } - }, - Events: { - enable: true, - type: 'Native', - onClick: function(node, eventInfo, evt) { - if(!config.filterOnClick && !config.Events.enable) return; - var elem = eventInfo.getContains(); - if(elem) config.filterOnClick && that.filter(elem.name); - config.Events.enable && config.Events.onClick(elem, eventInfo, evt); - }, - onRightClick: function(node, eventInfo, evt) { - if(!config.restoreOnRightClick) return; - that.restore(); - }, - onMouseMove: function(node, eventInfo, evt) { - if(!config.selectOnHover) return; - if(node) { - var elem = eventInfo.getContains(); - that.select(node.id, elem.name, elem.index); - } else { - that.select(false, false, false); - } - } - }, - onCreateLabel: function(domElement, node) { - var labelConf = config.Label, - valueArray = node.getData('valueArray'), - acumLeft = $.reduce(valueArray, function(x, y) { return x + y[0]; }, 0), - acumRight = $.reduce(valueArray, function(x, y) { return x + y[1]; }, 0); - if(node.getData('prev')) { - var nlbs = { - wrapper: document.createElement('div'), - aggregate: document.createElement('div'), - label: document.createElement('div') - }; - var wrapper = nlbs.wrapper, - label = nlbs.label, - aggregate = nlbs.aggregate, - wrapperStyle = wrapper.style, - labelStyle = label.style, - aggregateStyle = aggregate.style; - //store node labels - nodeLabels[node.id] = nlbs; - //append labels - wrapper.appendChild(label); - wrapper.appendChild(aggregate); - if(!config.showLabels(node.name, acumLeft, acumRight, node)) { - label.style.display = 'none'; - } - if(!config.showAggregates(node.name, acumLeft, acumRight, node)) { - aggregate.style.display = 'none'; - } - wrapperStyle.position = 'relative'; - wrapperStyle.overflow = 'visible'; - wrapperStyle.fontSize = labelConf.size + 'px'; - wrapperStyle.fontFamily = labelConf.family; - wrapperStyle.color = labelConf.color; - wrapperStyle.textAlign = 'center'; - aggregateStyle.position = labelStyle.position = 'absolute'; - - domElement.style.width = node.getData('width') + 'px'; - domElement.style.height = node.getData('height') + 'px'; - label.innerHTML = node.name; - - domElement.appendChild(wrapper); - } - }, - onPlaceLabel: function(domElement, node) { - if(!node.getData('prev')) return; - var labels = nodeLabels[node.id], - wrapperStyle = labels.wrapper.style, - labelStyle = labels.label.style, - aggregateStyle = labels.aggregate.style, - width = node.getData('width'), - height = node.getData('height'), - dimArray = node.getData('dimArray'), - valArray = node.getData('valueArray'), - acumLeft = $.reduce(valArray, function(x, y) { return x + y[0]; }, 0), - acumRight = $.reduce(valArray, function(x, y) { return x + y[1]; }, 0), - font = parseInt(wrapperStyle.fontSize, 10), - domStyle = domElement.style; - - if(dimArray && valArray) { - if(config.showLabels(node.name, acumLeft, acumRight, node)) { - labelStyle.display = ''; - } else { - labelStyle.display = 'none'; - } - if(config.showAggregates(node.name, acumLeft, acumRight, node)) { - aggregateStyle.display = ''; - } else { - aggregateStyle.display = 'none'; - } - wrapperStyle.width = aggregateStyle.width = labelStyle.width = domElement.style.width = width + 'px'; - aggregateStyle.left = labelStyle.left = -width/2 + 'px'; - for(var i=0, l=valArray.length, acum=0, leftAcum=0; i 0) { - acum+= valArray[i][0]; - leftAcum+= dimArray[i][0]; - } - } - aggregateStyle.top = (-font - config.labelOffset) + 'px'; - labelStyle.top = (config.labelOffset + leftAcum) + 'px'; - domElement.style.top = parseInt(domElement.style.top, 10) - leftAcum + 'px'; - domElement.style.height = wrapperStyle.height = leftAcum + 'px'; - labels.aggregate.innerHTML = acum; - } - } - }); - - var size = st.canvas.getSize(), - margin = config.Margin; - st.config.offsetY = -size.height/2 + margin.bottom - + (config.showLabels && (config.labelOffset + config.Label.size)); - st.config.offsetX = (margin.right - margin.left)/2; - this.st = st; - this.canvas = this.st.canvas; - }, - - /* - Method: loadJSON - - Loads JSON data into the visualization. - - Parameters: - - json - The JSON data format. This format is described in . - - Example: - (start code js) - var areaChart = new $jit.AreaChart(options); - areaChart.loadJSON(json); - (end code) - */ - loadJSON: function(json) { - var prefix = $.time(), - ch = [], - st = this.st, - name = $.splat(json.label), - color = $.splat(json.color || this.colors), - config = this.config, - gradient = !!config.type.split(":")[1], - animate = config.animate; - - for(var i=0, values=json.values, l=values.length; i. - onComplete - (object) A callback object to be called when the animation transition when updating the data end. - - Example: - - (start code js) - areaChart.updateJSON(json, { - onComplete: function() { - alert('update complete!'); - } - }); - (end code) - */ - updateJSON: function(json, onComplete) { - if(this.busy) return; - this.busy = true; - - var st = this.st, - graph = st.graph, - labels = json.label && $.splat(json.label), - values = json.values, - animate = this.config.animate, - that = this; - $.each(values, function(v) { - var n = graph.getByName(v.label); - if(n) { - v.values = $.splat(v.values); - var stringArray = n.getData('stringArray'), - valArray = n.getData('valueArray'); - $.each(valArray, function(a, i) { - a[0] = v.values[i]; - if(labels) stringArray[i] = labels[i]; - }); - n.setData('valueArray', valArray); - var prev = n.getData('prev'), - next = n.getData('next'), - nextNode = graph.getByName(next); - if(prev) { - var p = graph.getByName(prev); - if(p) { - var valArray = p.getData('valueArray'); - $.each(valArray, function(a, i) { - a[1] = v.values[i]; - }); - } - } - if(!nextNode) { - var valArray = n.getData('valueArray'); - $.each(valArray, function(a, i) { - a[1] = v.values[i]; - }); - } - } - }); - this.normalizeDims(); - st.compute(); - st.select(st.root); - if(animate) { - st.fx.animate({ - modes: ['node-property:height:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } - }, - -/* - Method: filter - - Filter selected stacks, collapsing all other stacks. You can filter multiple stacks at the same time. - - Parameters: - - Variable strings arguments with the name of the stacks. - - Example: - - (start code js) - areaChart.filter('label A', 'label C'); - (end code) - - See also: - - . - */ - filter: function() { - if(this.busy) return; - this.busy = true; - if(this.config.Tips.enable) this.st.tips.hide(); - this.select(false, false, false); - var args = Array.prototype.slice.call(arguments); - var rt = this.st.graph.getNode(this.st.root); - var that = this; - rt.eachAdjacency(function(adj) { - var n = adj.nodeTo, - dimArray = n.getData('dimArray'), - stringArray = n.getData('stringArray'); - n.setData('dimArray', $.map(dimArray, function(d, i) { - return ($.indexOf(args, stringArray[i]) > -1)? d:[0, 0]; - }), 'end'); - }); - this.st.fx.animate({ - modes: ['node-property:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - } - }); - }, - - /* - Method: restore - - Sets all stacks that could have been filtered visible. - - Example: - - (start code js) - areaChart.restore(); - (end code) - - See also: - - . - */ - restore: function() { - if(this.busy) return; - this.busy = true; - if(this.config.Tips.enable) this.st.tips.hide(); - this.select(false, false, false); - this.normalizeDims(); - var that = this; - this.st.fx.animate({ - modes: ['node-property:height:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - } - }); - }, - //adds the little brown bar when hovering the node - select: function(id, name, index) { - if(!this.config.selectOnHover) return; - var s = this.selected; - if(s.id != id || s.name != name - || s.index != index) { - s.id = id; - s.name = name; - s.index = index; - this.st.graph.eachNode(function(n) { - n.setData('border', false); - }); - if(id) { - var n = this.st.graph.getNode(id); - n.setData('border', s); - var link = index === 0? 'prev':'next'; - link = n.getData(link); - if(link) { - n = this.st.graph.getByName(link); - if(n) { - n.setData('border', { - name: name, - index: 1-index - }); - } - } - } - this.st.plot(); - } - }, - - /* - Method: getLegend - - Returns an object containing as keys the legend names and as values hex strings with color values. - - Example: - - (start code js) - var legend = areaChart.getLegend(); - (end code) - */ - getLegend: function() { - var legend = {}; - var n; - this.st.graph.getNode(this.st.root).eachAdjacency(function(adj) { - n = adj.nodeTo; - }); - var colors = n.getData('colorArray'), - len = colors.length; - $.each(n.getData('stringArray'), function(s, i) { - legend[s] = colors[i % len]; - }); - return legend; - }, - - /* - Method: getMaxValue - - Returns the maximum accumulated value for the stacks. This method is used for normalizing the graph heights according to the canvas height. - - Example: - - (start code js) - var ans = areaChart.getMaxValue(); - (end code) - - In some cases it could be useful to override this method to normalize heights for a group of AreaCharts, like when doing small multiples. - - Example: - - (start code js) - //will return 100 for all AreaChart instances, - //displaying all of them with the same scale - $jit.AreaChart.implement({ - 'getMaxValue': function() { - return 100; - } - }); - (end code) - -*/ - getMaxValue: function() { - var maxValue = 0; - this.st.graph.eachNode(function(n) { - var valArray = n.getData('valueArray'), - acumLeft = 0, acumRight = 0; - $.each(valArray, function(v) { - acumLeft += +v[0]; - acumRight += +v[1]; - }); - var acum = acumRight>acumLeft? acumRight:acumLeft; - maxValue = maxValue>acum? maxValue:acum; - }); - return maxValue; - }, - - normalizeDims: function() { - //number of elements - var root = this.st.graph.getNode(this.st.root), l=0; - root.eachAdjacency(function() { - l++; - }); - var maxValue = this.getMaxValue() || 1, - size = this.st.canvas.getSize(), - config = this.config, - margin = config.Margin, - labelOffset = config.labelOffset + config.Label.size, - fixedDim = (size.width - (margin.left + margin.right)) / l, - animate = config.animate, - height = size.height - (margin.top + margin.bottom) - (config.showAggregates && labelOffset) - - (config.showLabels && labelOffset); - this.st.graph.eachNode(function(n) { - var acumLeft = 0, acumRight = 0, animateValue = []; - $.each(n.getData('valueArray'), function(v) { - acumLeft += +v[0]; - acumRight += +v[1]; - animateValue.push([0, 0]); - }); - var acum = acumRight>acumLeft? acumRight:acumLeft; - n.setData('width', fixedDim); - if(animate) { - n.setData('height', acum * height / maxValue, 'end'); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return [n[0] * height / maxValue, n[1] * height / maxValue]; - }), 'end'); - var dimArray = n.getData('dimArray'); - if(!dimArray) { - n.setData('dimArray', animateValue); - } - } else { - n.setData('height', acum * height / maxValue); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return [n[0] * height / maxValue, n[1] * height / maxValue]; - })); - } - }); - } -}); - -/* - * File: Options.BarChart.js - * -*/ - -/* - Object: Options.BarChart - - options. - Other options included in the BarChart are , , , and . - - Syntax: - - (start code js) - - Options.BarChart = { - animate: true, - labelOffset: 3, - barsOffset: 0, - type: 'stacked', - hoveredColor: '#9fd4ff', - orientation: 'horizontal', - showAggregates: true, - showLabels: true - }; - - (end code) - - Example: - - (start code js) - - var barChart = new $jit.BarChart({ - animate: true, - barsOffset: 10, - type: 'stacked:gradient' - }); - - (end code) - - Parameters: - - animate - (boolean) Default's *true*. Whether to add animated transitions when filtering/restoring stacks. - offset - (number) Default's *25*. Adds margin between the visualization and the canvas. - labelOffset - (number) Default's *3*. Adds margin between the label and the default place where it should be drawn. - barsOffset - (number) Default's *0*. Separation between bars. - type - (string) Default's *'stacked'*. Stack or grouped styles. Posible values are 'stacked', 'grouped', 'stacked:gradient', 'grouped:gradient' to add gradients. - hoveredColor - (boolean|string) Default's *'#9fd4ff'*. Sets the selected color for a hovered bar stack. - orientation - (string) Default's 'horizontal'. Sets the direction of the bars. Possible options are 'vertical' or 'horizontal'. - showAggregates - (boolean) Default's *true*. Display the sum of the values of the different stacks. - showLabels - (boolean) Default's *true*. Display the name of the slots. - -*/ - -Options.BarChart = { - $extend: true, - - animate: true, - type: 'stacked', //stacked, grouped, : gradient - labelOffset: 3, //label offset - barsOffset: 0, //distance between bars - nodeCount: 0, //number of bars - hoveredColor: '#9fd4ff', - background: false, - renderBackground: false, - orientation: 'horizontal', - showAggregates: true, - showLabels: true, - Ticks: { - enable: false, - segments: 4, - color: '#000000' - }, - Tips: { - enable: false, - onShow: $.empty, - onHide: $.empty - }, - Events: { - enable: false, - onClick: $.empty - } -}; - -/* - * File: BarChart.js - * -*/ - -$jit.ST.Plot.NodeTypes.implement({ - 'barchart-stacked' : { - 'render' : function(node, canvas) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - stringArray = node.getData('stringArray'), - linkArray = node.getData('linkArray'), - gvl = node.getData('gvl'), - colorArray = node.getData('colorArray'), - colorLength = colorArray.length, - nodeCount = node.getData('nodeCount'); - var ctx = canvas.getCtx(), - canvasSize = canvas.getSize(), - opt = {}, - border = node.getData('border'), - gradient = node.getData('gradient'), - config = node.getData('config'), - horz = config.orientation == 'horizontal', - aggregates = config.showAggregates, - showLabels = config.showLabels, - label = config.Label, - margin = config.Margin; - - - if (colorArray && dimArray && stringArray) { - for (var i=0, l=dimArray.length, acum=0, valAcum=0; i> 0; })); - linear.addColorStop(0, color); - linear.addColorStop(0.3, colorArray[i % colorLength]); - linear.addColorStop(0.7, colorArray[i % colorLength]); - linear.addColorStop(1, color); - ctx.fillStyle = linear; - } - if(horz) { - ctx.fillRect(x + acum, y, dimArray[i], height); - } else { - ctx.fillRect(x, y - acum - dimArray[i], width, dimArray[i]); - } - if(border && border.name == stringArray[i]) { - opt.acum = acum; - opt.dimValue = dimArray[i]; - } - acum += (dimArray[i] || 0); - valAcum += (valueArray[i] || 0); - } - if(border) { - ctx.save(); - ctx.lineWidth = 2; - ctx.strokeStyle = border.color; - if(horz) { - ctx.strokeRect(x + opt.acum + 1, y + 1, opt.dimValue -2, height - 2); - } else { - ctx.strokeRect(x + 1, y - opt.acum - opt.dimValue + 1, width -2, opt.dimValue -2); - } - ctx.restore(); - } - if(label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textBaseline = 'middle'; - if(gvl) { - acumValueLabel = gvl; - } else { - acumValueLabel = valAcum; - } - if(aggregates(node.name, valAcum)) { - if(!horz) { - ctx.textAlign = 'center'; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - //background box - ctx.save(); - gridHeight = canvasSize.height - (margin.top + margin.bottom + (config.Title.text ? config.Title.size + config.Title.offset : 0) + - (config.Subtitle.text ? config.Subtitle.size + config.Subtitle.offset : 0) + - (label ? label.size + config.labelOffset : 0)); - mtxt = ctx.measureText(acumValueLabel); - boxWidth = mtxt.width+10; - inset = 10; - boxHeight = label.size+6; - - if(boxHeight + acum + config.labelOffset > gridHeight) { - bottomPadding = acum - config.labelOffset - boxHeight; - } else { - bottomPadding = acum + config.labelOffset + inset; - } - - - ctx.translate(x + width/2 - (mtxt.width/2) , y - bottomPadding); - cornerRadius = 4; - boxX = -inset/2; - boxY = -boxHeight/2; - - ctx.rotate(0 * Math.PI / 180); - ctx.fillStyle = "rgba(255,255,255,.8)"; - if(boxHeight + acum + config.labelOffset > gridHeight) { - $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill"); - } - //$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"stroke"); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.fillText(acumValueLabel, mtxt.width/2, 0); - ctx.restore(); - - } - } - if(showLabels(node.name, valAcum, node)) { - if(horz) { - - - //background box - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - inset = 10; - - gridWidth = canvasSize.width - (config.Margin.left + config.Margin.right); - mtxt = ctx.measureText(node.name + ": " + acumValueLabel); - boxWidth = mtxt.width+10; - inset = 10; - - if(acum + boxWidth + config.labelOffset + inset > gridWidth) { - leftPadding = acum - config.labelOffset - boxWidth - inset; - } else { - leftPadding = acum + config.labelOffset; - } - - - ctx.textAlign = 'left'; - ctx.translate(x + inset + leftPadding, y + height/2); - boxHeight = label.size+6; - boxX = -inset/2; - boxY = -boxHeight/2; - ctx.fillStyle = "rgba(255,255,255,.8)"; - cornerRadius = 4; - if(acum + boxWidth + config.labelOffset + inset > gridWidth) { - $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill"); - } - //$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"stroke"); - - ctx.fillStyle = label.color; - ctx.rotate(0 * Math.PI / 180); - ctx.fillText(node.name + ": " + acumValueLabel, 0, 0); - - - } else { - ctx.textAlign = 'center'; - ctx.fillText(node.name, x + width/2, y + label.size/2 + config.labelOffset); - } - } - ctx.restore(); - } - } - }, - 'contains': function(node, mpos) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - config = node.getData('config'), - rx = mpos.x - x, - horz = config.orientation == 'horizontal'; - //bounding box check - if(horz) { - if(mpos.x < x || mpos.x > x + width - || mpos.y > y + height || mpos.y < y) { - return false; - } - } else { - if(mpos.x < x || mpos.x > x + width - || mpos.y > y || mpos.y < y - height) { - return false; - } - } - //deep check - for(var i=0, l=dimArray.length, acum=(horz? x:y); i= intersec) { - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i], - 'valuelabel': node.getData('valuelabelArray')[i], - 'percentage': ((node.getData('valueArray')[i]/node.getData('barTotalValue')) * 100).toFixed(1), - 'link': url, - 'label': node.name - }; - } - } - } - return false; - } - }, - 'barchart-grouped' : { - 'render' : function(node, canvas) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - valuelabelArray = node.getData('valuelabelArray'), - linkArray = node.getData('linkArray'), - valueLength = valueArray.length, - colorArray = node.getData('colorArray'), - colorLength = colorArray.length, - stringArray = node.getData('stringArray'); - - var ctx = canvas.getCtx(), - canvasSize = canvas.getSize(), - opt = {}, - border = node.getData('border'), - gradient = node.getData('gradient'), - config = node.getData('config'), - horz = config.orientation == 'horizontal', - aggregates = config.showAggregates, - showLabels = config.showLabels, - label = config.Label, - shadow = config.shadow, - margin = config.Margin, - fixedDim = (horz? height : width) / valueLength; - - //drop shadow - - maxValue = Math.max.apply(null, dimArray); - - - - ctx.fillStyle = "rgba(0,0,0,.2)"; - if (colorArray && dimArray && stringArray && shadow.enable) { - shadowThickness = shadow.size; - - for (var i=0, l=valueLength, acum=0, valAcum=0; i dimArray[i]) { - ctx.fillRect((x - shadowThickness) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim, dimArray[i]+ shadowThickness); - } else if (nextBar && nextBar < dimArray[i]){ - ctx.fillRect((x - shadowThickness) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim + shadowThickness*2, dimArray[i]+ shadowThickness); - } else { - ctx.fillRect((x - shadowThickness) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim + shadowThickness, dimArray[i]+ shadowThickness); - } - } else if (i> 0 && i dimArray[i]) { - ctx.fillRect((x - ((prevBar < dimArray[i]) ? shadowThickness : 0)) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim, dimArray[i]+ shadowThickness); - } else if (nextBar && nextBar < dimArray[i]){ - ctx.fillRect((x - ((prevBar < dimArray[i]) ? shadowThickness : 0)) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim + shadowThickness*2, dimArray[i]+ shadowThickness); - } else { - ctx.fillRect((x - ((prevBar < dimArray[i]) ? shadowThickness : 0)) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim + shadowThickness, dimArray[i]+ shadowThickness); - } - } else if (i == l-1) { - ctx.fillRect((x - ((prevBar < dimArray[i]) ? shadowThickness : 0)) + fixedDim * i, y - dimArray[i] - shadowThickness, fixedDim + shadowThickness*2, dimArray[i]+ shadowThickness); - } - - - } - } - - } - - - if (colorArray && dimArray && stringArray) { - for (var i=0, l=valueLength, acum=0, valAcum=0; i> 0; })); - linear.addColorStop(0, color); - linear.addColorStop(0.3, colorArray[i % colorLength]); - linear.addColorStop(0.7, colorArray[i % colorLength]); - linear.addColorStop(1, color); - ctx.fillStyle = linear; - } - if(horz) { - ctx.fillRect(x, y + fixedDim * i, dimArray[i], fixedDim); - } else { - ctx.fillRect(x + fixedDim * i, y - dimArray[i], fixedDim, dimArray[i]); - } - if(border && border.name == stringArray[i]) { - opt.acum = fixedDim * i; - opt.dimValue = dimArray[i]; - } - acum += (dimArray[i] || 0); - valAcum += (valueArray[i] || 0); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - - inset = 10; - if(aggregates(node.name, valAcum) && label.type == 'Native') { - if(valuelabelArray[i]) { - acumValueLabel = valuelabelArray[i]; - } else { - acumValueLabel = valueArray[i]; - } - if(horz) { - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textAlign = 'left'; - ctx.textBaseline = 'top'; - ctx.fillStyle = "rgba(255,255,255,.8)"; - //background box - gridWidth = canvasSize.width - (margin.left + margin.right + config.labeloffset + label.size); - mtxt = ctx.measureText(acumValueLabel); - boxWidth = mtxt.width+10; - - if(boxWidth + dimArray[i] + config.labelOffset > gridWidth) { - leftPadding = dimArray[i] - config.labelOffset - boxWidth - inset; - } else { - leftPadding = dimArray[i] + config.labelOffset + inset; - } - boxHeight = label.size+6; - boxX = x + leftPadding; - boxY = y + i*fixedDim + (fixedDim/2) - boxHeight/2; - cornerRadius = 4; - - - if(boxWidth + dimArray[i] + config.labelOffset > gridWidth) { - $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill"); - } - // $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"stroke"); - - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.fillText(acumValueLabel, x + inset/2 + leftPadding, y + i*fixedDim + (fixedDim/2) - (label.size/2)); - - - - - } else { - - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.save(); - ctx.textAlign = 'center'; - - //background box - gridHeight = canvasSize.height - (margin.top + margin.bottom + (config.Title.text ? config.Title.size + config.Title.offset : 0) + - (config.Subtitle.text ? config.Subtitle.size + config.Subtitle.offset : 0) + - (label ? label.size + config.labelOffset : 0)); - - mtxt = ctx.measureText(acumValueLabel); - boxWidth = mtxt.width+10; - boxHeight = label.size+6; - if(boxHeight + dimArray[i] + config.labelOffset > gridHeight) { - bottomPadding = dimArray[i] - config.labelOffset - boxHeight - inset; - } else { - bottomPadding = dimArray[i] + config.labelOffset + inset; - } - - - ctx.translate(x + (i*fixedDim) + (fixedDim/2) , y - bottomPadding); - - boxX = -boxWidth/2; - boxY = -boxHeight/2; - ctx.fillStyle = "rgba(255,255,255,.8)"; - - cornerRadius = 4; - - //ctx.rotate(270* Math.PI / 180); - if(boxHeight + dimArray[i] + config.labelOffset > gridHeight) { - $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill"); - } - //$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"stroke"); - - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.fillText(acumValueLabel, 0,0); - ctx.restore(); - - } - } - } - if(border) { - ctx.save(); - ctx.lineWidth = 2; - ctx.strokeStyle = border.color; - if(horz) { - ctx.strokeRect(x + 1, y + opt.acum + 1, opt.dimValue -2, fixedDim - 2); - } else { - ctx.strokeRect(x + opt.acum + 1, y - opt.dimValue + 1, fixedDim -2, opt.dimValue -2); - } - ctx.restore(); - } - if(label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textBaseline = 'middle'; - - if(showLabels(node.name, valAcum, node)) { - if(horz) { - ctx.textAlign = 'center'; - ctx.translate(x - config.labelOffset - label.size/2, y + height/2); - ctx.rotate(Math.PI / 2); - ctx.fillText(node.name, 0, 0); - } else { - ctx.textAlign = 'center'; - ctx.fillText(node.name, x + width/2, y + label.size/2 + config.labelOffset); - } - } - ctx.restore(); - } - } - }, - 'contains': function(node, mpos) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - len = dimArray.length, - config = node.getData('config'), - rx = mpos.x - x, - horz = config.orientation == 'horizontal', - fixedDim = (horz? height : width) / len; - //bounding box check - if(horz) { - if(mpos.x < x || mpos.x > x + width - || mpos.y > y + height || mpos.y < y) { - return false; - } - } else { - if(mpos.x < x || mpos.x > x + width - || mpos.y > y || mpos.y < y - height) { - return false; - } - } - //deep check - for(var i=0, l=dimArray.length; i= limit && mpos.y <= limit + fixedDim) { - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i], - 'valuelabel': node.getData('valuelabelArray')[i], - 'title': node.getData('titleArray')[i], - 'percentage': ((node.getData('valueArray')[i]/node.getData('barTotalValue')) * 100).toFixed(1), - 'link': url, - 'label': node.name - }; - } - } else { - var limit = x + fixedDim * i; - if(mpos.x >= limit && mpos.x <= limit + fixedDim && mpos.y >= y - dimi) { - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i], - 'valuelabel': node.getData('valuelabelArray')[i], - 'title': node.getData('titleArray')[i], - 'percentage': ((node.getData('valueArray')[i]/node.getData('barTotalValue')) * 100).toFixed(1), - 'link': url, - 'label': node.name - }; - } - } - } - return false; - } - }, - 'barchart-basic' : { - 'render' : function(node, canvas) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - valuelabelArray = node.getData('valuelabelArray'), - linkArray = node.getData('linkArray'), - valueLength = valueArray.length, - colorArray = node.getData('colorMono'), - colorLength = colorArray.length, - stringArray = node.getData('stringArray'); - - var ctx = canvas.getCtx(), - canvasSize = canvas.getSize(), - opt = {}, - border = node.getData('border'), - gradient = node.getData('gradient'), - config = node.getData('config'), - horz = config.orientation == 'horizontal', - aggregates = config.showAggregates, - showLabels = config.showLabels, - label = config.Label, - fixedDim = (horz? height : width) / valueLength, - margin = config.Margin; - - if (colorArray && dimArray && stringArray) { - for (var i=0, l=valueLength, acum=0, valAcum=0; i> 0; })); - linear.addColorStop(0, color); - linear.addColorStop(0.3, colorArray[i % colorLength]); - linear.addColorStop(0.7, colorArray[i % colorLength]); - linear.addColorStop(1, color); - ctx.fillStyle = linear; - } - if(horz) { - ctx.fillRect(x, y + fixedDim * i, dimArray[i], fixedDim); - } else { - ctx.fillRect(x + fixedDim * i, y - dimArray[i], fixedDim, dimArray[i]); - } - if(border && border.name == stringArray[i]) { - opt.acum = fixedDim * i; - opt.dimValue = dimArray[i]; - } - acum += (dimArray[i] || 0); - valAcum += (valueArray[i] || 0); - - if(label.type == 'Native') { - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - if(aggregates(node.name, valAcum)) { - if(valuelabelArray[i]) { - acumValueLabel = valuelabelArray[i]; - } else { - acumValueLabel = valueArray[i]; - } - if(!horz) { - ctx.textAlign = 'center'; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - //background box - ctx.save(); - gridHeight = canvasSize.height - (margin.top + margin.bottom + (config.Title.text ? config.Title.size + config.Title.offset : 0) + - (config.Subtitle.text ? config.Subtitle.size + config.Subtitle.offset : 0) + - (label ? label.size + config.labelOffset : 0)); - mtxt = ctx.measureText(acumValueLabel); - boxWidth = mtxt.width+10; - inset = 10; - boxHeight = label.size+6; - - if(boxHeight + dimArray[i] + config.labelOffset > gridHeight) { - bottomPadding = dimArray[i] - config.labelOffset - inset; - } else { - bottomPadding = dimArray[i] + config.labelOffset + inset; - } - - - ctx.translate(x + width/2 - (mtxt.width/2) , y - bottomPadding); - cornerRadius = 4; - boxX = -inset/2; - boxY = -boxHeight/2; - - //ctx.rotate(270* Math.PI / 180); - ctx.fillStyle = "rgba(255,255,255,.6)"; - if(boxHeight + dimArray[i] + config.labelOffset > gridHeight) { - $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill"); - } - // $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"stroke"); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.fillText(acumValueLabel, mtxt.width/2, 0); - ctx.restore(); - } - } - } - } - if(border) { - ctx.save(); - ctx.lineWidth = 2; - ctx.strokeStyle = border.color; - if(horz) { - ctx.strokeRect(x + 1, y + opt.acum + 1, opt.dimValue -2, fixedDim - 2); - } else { - ctx.strokeRect(x + opt.acum + 1, y - opt.dimValue + 1, fixedDim -2, opt.dimValue -2); - } - ctx.restore(); - } - if(label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textBaseline = 'middle'; - if(showLabels(node.name, valAcum, node)) { - if(horz) { - - //background box - gridWidth = canvasSize.width - (config.Margin.left + config.Margin.right); - mtxt = ctx.measureText(node.name + ": " + valAcum); - boxWidth = mtxt.width+10; - inset = 10; - - if(acum + boxWidth + config.labelOffset + inset > gridWidth) { - leftPadding = acum - config.labelOffset - boxWidth - inset; - } else { - leftPadding = acum + config.labelOffset; - } - - - ctx.textAlign = 'left'; - ctx.translate(x + inset + leftPadding, y + height/2); - boxHeight = label.size+6; - boxX = -inset/2; - boxY = -boxHeight/2; - ctx.fillStyle = "rgba(255,255,255,.8)"; - - cornerRadius = 4; - if(acum + boxWidth + config.labelOffset + inset > gridWidth) { - $.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"fill"); - } - //$.roundedRect(ctx,boxX,boxY,boxWidth,boxHeight,cornerRadius,"stroke"); - - - ctx.fillStyle = label.color; - ctx.fillText(node.name + ": " + valAcum, 0, 0); - - } else { - - if(stringArray.length > 8) { - ctx.textAlign = 'left'; - ctx.translate(x + width/2, y + label.size/2 + config.labelOffset); - ctx.rotate(45* Math.PI / 180); - ctx.fillText(node.name, 0, 0); - } else { - ctx.textAlign = 'center'; - ctx.fillText(node.name, x + width/2, y + label.size/2 + config.labelOffset); - } - - } - } - ctx.restore(); - } - } - }, - 'contains': function(node, mpos) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - config = node.getData('config'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y , - dimArray = node.getData('dimArray'), - len = dimArray.length, - rx = mpos.x - x, - horz = config.orientation == 'horizontal', - fixedDim = (horz? height : width) / len; - - //bounding box check - if(horz) { - if(mpos.x < x || mpos.x > x + width - || mpos.y > y + height || mpos.y < y) { - return false; - } - } else { - if(mpos.x < x || mpos.x > x + width - || mpos.y > y || mpos.y < y - height) { - return false; - } - } - //deep check - for(var i=0, l=dimArray.length; i= limit && mpos.y <= limit + fixedDim) { - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i], - 'valuelabel': node.getData('valuelabelArray')[i], - 'percentage': ((node.getData('valueArray')[i]/node.getData('groupTotalValue')) * 100).toFixed(1), - 'link': url, - 'label': node.name - }; - } - } else { - var limit = x + fixedDim * i; - if(mpos.x >= limit && mpos.x <= limit + fixedDim && mpos.y >= y - dimi) { - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i], - 'valuelabel': node.getData('valuelabelArray')[i], - 'percentage': ((node.getData('valueArray')[i]/node.getData('groupTotalValue')) * 100).toFixed(1), - 'link': url, - 'label': node.name - }; - } - } - } - return false; - } - } -}); - -/* - Class: BarChart - - A visualization that displays stacked bar charts. - - Constructor Options: - - See . - -*/ -$jit.BarChart = new Class({ - st: null, - colors: ["#004b9c", "#9c0079", "#9c0033", "#28009c", "#9c0000", "#7d009c", "#001a9c","#00809c","#009c80","#009c42","#009c07","#469c00","#799c00","#9c9600","#9c5c00"], - selected: {}, - busy: false, - - initialize: function(opt) { - this.controller = this.config = - $.merge(Options("Canvas", "Margin", "Label", "BarChart"), { - Label: { type: 'Native' } - }, opt); - //set functions for showLabels and showAggregates - var showLabels = this.config.showLabels, - typeLabels = $.type(showLabels), - showAggregates = this.config.showAggregates, - typeAggregates = $.type(showAggregates); - this.config.showLabels = typeLabels == 'function'? showLabels : $.lambda(showLabels); - this.config.showAggregates = typeAggregates == 'function'? showAggregates : $.lambda(showAggregates); - Options.Fx.clearCanvas = false; - this.initializeViz(); - }, - - initializeViz: function() { - var config = this.config, that = this; - var nodeType = config.type.split(":")[0], - horz = config.orientation == 'horizontal', - nodeLabels = {}; - var st = new $jit.ST({ - injectInto: config.injectInto, - orientation: horz? 'left' : 'bottom', - background: config.background, - renderBackground: config.renderBackground, - backgroundColor: config.backgroundColor, - colorStop1: config.colorStop1, - colorStop2: config.colorStop2, - levelDistance: 0, - nodeCount: config.nodeCount, - siblingOffset: config.barsOffset, - subtreeOffset: 0, - withLabels: config.Label.type != 'Native', - useCanvas: config.useCanvas, - Label: { - type: config.Label.type - }, - Node: { - overridable: true, - type: 'barchart-' + nodeType, - align: 'left', - width: 1, - height: 1 - }, - Edge: { - type: 'none' - }, - Tips: { - enable: config.Tips.enable, - type: 'Native', - force: true, - onShow: function(tip, node, contains) { - var elem = contains; - config.Tips.onShow(tip, elem, node); - if(elem.link != 'undefined' && elem.link != '') { - document.body.style.cursor = 'pointer'; - } - }, - onHide: function(call) { - document.body.style.cursor = 'default'; - - } - }, - Events: { - enable: true, - type: 'Native', - onClick: function(node, eventInfo, evt) { - if(!config.Events.enable) return; - var elem = eventInfo.getContains(); - config.Events.onClick(elem, eventInfo, evt); - }, - onMouseMove: function(node, eventInfo, evt) { - if(!config.hoveredColor) return; - if(node) { - var elem = eventInfo.getContains(); - that.select(node.id, elem.name, elem.index); - } else { - that.select(false, false, false); - } - } - }, - onCreateLabel: function(domElement, node) { - var labelConf = config.Label, - valueArray = node.getData('valueArray'), - acum = $.reduce(valueArray, function(x, y) { return x + y; }, 0), - grouped = config.type.split(':')[0] == 'grouped', - horz = config.orientation == 'horizontal'; - var nlbs = { - wrapper: document.createElement('div'), - aggregate: document.createElement('div'), - label: document.createElement('div') - }; - - var wrapper = nlbs.wrapper, - label = nlbs.label, - aggregate = nlbs.aggregate, - wrapperStyle = wrapper.style, - labelStyle = label.style, - aggregateStyle = aggregate.style; - //store node labels - nodeLabels[node.id] = nlbs; - //append labels - wrapper.appendChild(label); - wrapper.appendChild(aggregate); - if(!config.showLabels(node.name, acum, node)) { - labelStyle.display = 'none'; - } - if(!config.showAggregates(node.name, acum, node)) { - aggregateStyle.display = 'none'; - } - wrapperStyle.position = 'relative'; - wrapperStyle.overflow = 'visible'; - wrapperStyle.fontSize = labelConf.size + 'px'; - wrapperStyle.fontFamily = labelConf.family; - wrapperStyle.color = labelConf.color; - wrapperStyle.textAlign = 'center'; - aggregateStyle.position = labelStyle.position = 'absolute'; - - domElement.style.width = node.getData('width') + 'px'; - domElement.style.height = node.getData('height') + 'px'; - aggregateStyle.left = "0px"; - labelStyle.left = config.labelOffset + 'px'; - labelStyle.whiteSpace = "nowrap"; - label.innerHTML = node.name; - - domElement.appendChild(wrapper); - }, - onPlaceLabel: function(domElement, node) { - if(!nodeLabels[node.id]) return; - var labels = nodeLabels[node.id], - wrapperStyle = labels.wrapper.style, - labelStyle = labels.label.style, - aggregateStyle = labels.aggregate.style, - grouped = config.type.split(':')[0] == 'grouped', - horz = config.orientation == 'horizontal', - dimArray = node.getData('dimArray'), - valArray = node.getData('valueArray'), - nodeCount = node.getData('nodeCount'), - valueLength = valArray.length; - valuelabelArray = node.getData('valuelabelArray'), - stringArray = node.getData('stringArray'), - width = (grouped && horz)? Math.max.apply(null, dimArray) : node.getData('width'), - height = (grouped && !horz)? Math.max.apply(null, dimArray) : node.getData('height'), - font = parseInt(wrapperStyle.fontSize, 10), - domStyle = domElement.style, - fixedDim = (horz? height : width) / valueLength; - - - if(dimArray && valArray) { - wrapperStyle.width = aggregateStyle.width = labelStyle.width = domElement.style.width = width + 'px'; - - aggregateStyle.width = width - config.labelOffset + "px"; - for(var i=0, l=valArray.length, acum=0; i 0) { - acum+= valArray[i]; - } - } - if(config.showLabels(node.name, acum, node)) { - labelStyle.display = ''; - } else { - labelStyle.display = 'none'; - } - if(config.showAggregates(node.name, acum, node)) { - aggregateStyle.display = ''; - } else { - aggregateStyle.display = 'none'; - } - if(config.orientation == 'horizontal') { - aggregateStyle.textAlign = 'right'; - labelStyle.textAlign = 'left'; - labelStyle.textIndex = aggregateStyle.textIndent = config.labelOffset + 'px'; - aggregateStyle.top = labelStyle.top = (height-font)/2 + 'px'; - domElement.style.height = wrapperStyle.height = height + 'px'; - } else { - aggregateStyle.top = (-font - config.labelOffset) + 'px'; - labelStyle.top = (config.labelOffset + height) + 'px'; - domElement.style.top = parseInt(domElement.style.top, 10) - height + 'px'; - domElement.style.height = wrapperStyle.height = height + 'px'; - if(stringArray.length > 8) { - labels.label.className = "rotatedLabelReverse"; - labelStyle.textAlign = "left"; - labelStyle.top = config.labelOffset + height + width/2 + "px"; - } - } - - if(horz) { - - labels.label.innerHTML = labels.label.innerHTML + ": " + acum; - labels.aggregate.innerHTML = ""; - - } else { - - if(grouped) { - maxValue = Math.max.apply(null,dimArray); - for (var i=0, l=valArray.length, acum=0, valAcum=0; i 40) ? 40 : fixedDim; - whiteSpace = size.width - (marginWidth + (fixedDim * l)); - - //if not a grouped chart and is a vertical chart, adjust bar spacing to fix canvas width. - if(!grouped && !horz) { - st.config.siblingOffset = whiteSpace/(l+1); - } - - - - //Bars offset - if(horz) { - st.config.offsetX = size.width/2 - margin.left - (grouped && config.Label ? config.labelOffset + config.Label.size : 0); - if(config.Ticks.enable) { - st.config.offsetY = ((margin.bottom+config.Label.size+config.labelOffset+(subtitle.text? subtitle.size+subtitle.offset:0)) - (margin.top + (title.text? title.size+title.offset:0))) /2; - } else { - st.config.offsetY = (margin.bottom - margin.top - (title.text? title.size+title.offset:0) - (subtitle.text? subtitle.size+subtitle.offset:0))/2; - } - } else { - st.config.offsetY = -size.height/2 + margin.bottom - + (config.showLabels && (config.labelOffset + config.Label.size)) + (subtitle.text? subtitle.size+subtitle.offset:0); - if(config.Ticks.enable) { - st.config.offsetX = ((margin.right-config.Label.size-config.labelOffset) - margin.left)/2; - } else { - st.config.offsetX = (margin.right - margin.left)/2; - } - } - this.st = st; - this.canvas = this.st.canvas; - }, - - renderTitle: function() { - var canvas = this.canvas, - size = canvas.getSize(), - config = this.config, - margin = config.Margin, - label = config.Label, - title = config.Title; - ctx = canvas.getCtx(); - ctx.fillStyle = title.color; - ctx.textAlign = 'left'; - ctx.font = label.style + ' bold ' +' ' + title.size + 'px ' + label.family; - if(label.type == 'Native') { - ctx.fillText(title.text, -size.width/2+margin.left, -size.height/2+margin.top); - } - }, - - renderSubtitle: function() { - var canvas = this.canvas, - size = canvas.getSize(), - config = this.config, - margin = config.Margin, - label = config.Label, - subtitle = config.Subtitle; - ctx = canvas.getCtx(); - ctx.fillStyle = title.color; - ctx.textAlign = 'left'; - ctx.font = label.style + ' ' + subtitle.size + 'px ' + label.family; - if(label.type == 'Native') { - ctx.fillText(subtitle.text, -size.width/2+margin.left, size.height/2-margin.bottom-subtitle.size); - } - }, - - renderScrollNote: function() { - var canvas = this.canvas, - size = canvas.getSize(), - config = this.config, - margin = config.Margin, - label = config.Label, - note = config.ScrollNote; - ctx = canvas.getCtx(); - ctx.fillStyle = title.color; - title = config.Title; - ctx.textAlign = 'center'; - ctx.font = label.style + ' bold ' +' ' + note.size + 'px ' + label.family; - if(label.type == 'Native') { - ctx.fillText(note.text, 0, -size.height/2+margin.top+title.size); - } - }, - - renderTicks: function() { - - var canvas = this.canvas, - size = canvas.getSize(), - config = this.config, - margin = config.Margin, - ticks = config.Ticks, - title = config.Title, - subtitle = config.Subtitle, - label = config.Label, - shadow = config.shadow; - horz = config.orientation == 'horizontal', - maxValue = this.getMaxValue(), - maxTickValue = Math.ceil(maxValue*.1)*10; - if(maxTickValue == maxValue) { - var length = maxTickValue.toString().length; - maxTickValue = maxTickValue + parseInt(pad(1,length)); - } - grouped = config.type.split(':')[0] == 'grouped', - labelValue = 0, - labelIncrement = maxTickValue/ticks.segments, - ctx = canvas.getCtx(); - ctx.strokeStyle = ticks.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - - ctx.textAlign = 'center'; - ctx.textBaseline = 'middle'; - - idLabel = canvas.id + "-label"; - labelDim = 100; - container = document.getElementById(idLabel); - - - if(horz) { - var axis = -(size.width/2)+margin.left + (grouped && config.Label ? config.labelOffset + label.size : 0), - grid = size.width-(margin.left + margin.right + (grouped && config.Label ? config.labelOffset + label.size : 0)), - segmentLength = grid/ticks.segments; - ctx.fillStyle = ticks.color; - ctx.fillRect(axis, - (size.height/2)-margin.bottom-config.labelOffset-label.size - (subtitle.text? subtitle.size+subtitle.offset:0) + (shadow.enable ? shadow.size : 0), - size.width - margin.left - margin.right - (grouped && config.Label ? config.labelOffset + label.size : 0), - 1); - while(axis<=grid) { - ctx.fillStyle = ticks.color; - lineHeight = size.height-margin.bottom-margin.top-config.labelOffset-label.size-(title.text? title.size+title.offset:0)-(subtitle.text? subtitle.size+subtitle.offset:0); - ctx.fillRect(Math.round(axis), -(size.height/2)+margin.top+(title.text? title.size+title.offset:0) - (shadow.enable ? shadow.size : 0), 1, lineHeight + (shadow.enable ? shadow.size * 2: 0)); - ctx.fillStyle = label.color; - - if(label.type == 'Native' && config.showLabels) { - ctx.fillText(labelValue, Math.round(axis), -(size.height/2)+margin.top+(title.text? title.size+title.offset:0)+config.labelOffset+lineHeight+label.size); - } - axis += segmentLength; - labelValue += labelIncrement; - } - - } else { - - var axis = (size.height/2)-(margin.bottom+config.labelOffset+label.size+(subtitle.text? subtitle.size+subtitle.offset:0)), - htmlOrigin = size.height - (margin.bottom+config.labelOffset+label.size+(subtitle.text? subtitle.size+subtitle.offset:0)), - grid = -size.height+(margin.bottom+config.labelOffset+label.size+margin.top+(title.text? title.size+title.offset:0)+(subtitle.text? subtitle.size+subtitle.offset:0)), - segmentLength = grid/ticks.segments; - ctx.fillStyle = ticks.color; - ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size-1, -(size.height/2)+margin.top+(title.text? title.size+title.offset:0),1,size.height-margin.top-margin.bottom-label.size-config.labelOffset-(title.text? title.size+title.offset:0)-(subtitle.text? subtitle.size+subtitle.offset:0)); - - while(axis>=grid) { - ctx.save(); - ctx.translate(-(size.width/2)+margin.left, Math.round(axis)); - ctx.rotate(0 * Math.PI / 180 ); - ctx.fillStyle = label.color; - if(config.showLabels) { - if(label.type == 'Native') { - ctx.fillText(labelValue, 0, 0); - } else { - //html labels on y axis - labelDiv = document.createElement('div'); - labelDiv.innerHTML = labelValue; - labelDiv.className = "rotatedLabel"; -// labelDiv.class = "rotatedLabel"; - labelDiv.style.top = (htmlOrigin - (labelDim/2)) + "px"; - labelDiv.style.left = margin.left + "px"; - labelDiv.style.width = labelDim + "px"; - labelDiv.style.height = labelDim + "px"; - labelDiv.style.textAlign = "center"; - labelDiv.style.verticalAlign = "middle"; - labelDiv.style.position = "absolute"; - container.appendChild(labelDiv); - } - } - ctx.restore(); - ctx.fillStyle = ticks.color; - ctx.fillRect(-(size.width/2)+margin.left+config.labelOffset+label.size, Math.round(axis), size.width-margin.right-margin.left-config.labelOffset-label.size,1 ); - htmlOrigin += segmentLength; - axis += segmentLength; - labelValue += labelIncrement; - } - } - - - - - }, - - renderBackground: function() { - var canvas = this.canvas, - config = this.config, - backgroundColor = config.backgroundColor, - size = canvas.getSize(), - ctx = canvas.getCtx(); - ctx.fillStyle = backgroundColor; - ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height); - }, - /* - Method: loadJSON - - Loads JSON data into the visualization. - - Parameters: - - json - The JSON data format. This format is described in . - - Example: - (start code js) - var barChart = new $jit.BarChart(options); - barChart.loadJSON(json); - (end code) - */ - loadJSON: function(json) { - if(this.busy) return; - this.busy = true; - - var prefix = $.time(), - ch = [], - st = this.st, - name = $.splat(json.label), - color = $.splat(json.color || this.colors), - config = this.config, - gradient = !!config.type.split(":")[1], - renderBackground = config.renderBackground, - animate = config.animate, - ticks = config.Ticks, - title = config.Title, - note = config.ScrollNote, - subtitle = config.Subtitle, - horz = config.orientation == 'horizontal', - that = this, - colorLength = color.length, - nameLength = name.length; - groupTotalValue = 0; - for(var i=0, values=json.values, l=values.length; i. - onComplete - (object) A callback object to be called when the animation transition when updating the data end. - - Example: - - (start code js) - barChart.updateJSON(json, { - onComplete: function() { - alert('update complete!'); - } - }); - (end code) - */ - updateJSON: function(json, onComplete) { - if(this.busy) return; - this.busy = true; - - var st = this.st; - var graph = st.graph; - var values = json.values; - var animate = this.config.animate; - var that = this; - var horz = this.config.orientation == 'horizontal'; - $.each(values, function(v) { - var n = graph.getByName(v.label); - if(n) { - n.setData('valueArray', $.splat(v.values)); - if(json.label) { - n.setData('stringArray', $.splat(json.label)); - } - } - }); - this.normalizeDims(); - st.compute(); - st.select(st.root); - if(animate) { - if(horz) { - st.fx.animate({ - modes: ['node-property:width:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } else { - st.fx.animate({ - modes: ['node-property:height:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } - } - }, - - //adds the little brown bar when hovering the node - select: function(id, name) { - - if(!this.config.hoveredColor) return; - var s = this.selected; - if(s.id != id || s.name != name) { - s.id = id; - s.name = name; - s.color = this.config.hoveredColor; - this.st.graph.eachNode(function(n) { - if(id == n.id) { - n.setData('border', s); - } else { - n.setData('border', false); - } - }); - this.st.plot(); - } - }, - - /* - Method: getLegend - - Returns an object containing as keys the legend names and as values hex strings with color values. - - Example: - - (start code js) - var legend = barChart.getLegend(); - (end code) - */ - getLegend: function() { - var legend = new Array(); - var name = new Array(); - var color = new Array(); - var n; - this.st.graph.getNode(this.st.root).eachAdjacency(function(adj) { - n = adj.nodeTo; - }); - var colors = n.getData('colorArray'), - len = colors.length; - $.each(n.getData('stringArray'), function(s, i) { - color[i] = colors[i % len]; - name[i] = s; - }); - legend['name'] = name; - legend['color'] = color; - return legend; - }, - - /* - Method: getMaxValue - - Returns the maximum accumulated value for the stacks. This method is used for normalizing the graph heights according to the canvas height. - - Example: - - (start code js) - var ans = barChart.getMaxValue(); - (end code) - - In some cases it could be useful to override this method to normalize heights for a group of BarCharts, like when doing small multiples. - - Example: - - (start code js) - //will return 100 for all BarChart instances, - //displaying all of them with the same scale - $jit.BarChart.implement({ - 'getMaxValue': function() { - return 100; - } - }); - (end code) - - */ - getMaxValue: function() { - var maxValue = 0, stacked = this.config.type.split(':')[0] == 'stacked'; - this.st.graph.eachNode(function(n) { - var valArray = n.getData('valueArray'), - acum = 0; - if(!valArray) return; - if(stacked) { - $.each(valArray, function(v) { - acum += +v; - }); - } else { - acum = Math.max.apply(null, valArray); - } - maxValue = maxValue>acum? maxValue:acum; - }); - return maxValue; - }, - - setBarType: function(type) { - this.config.type = type; - this.st.config.Node.type = 'barchart-' + type.split(':')[0]; - }, - - normalizeDims: function() { - //number of elements - var root = this.st.graph.getNode(this.st.root), l=0; - root.eachAdjacency(function() { - l++; - }); - var maxValue = this.getMaxValue() || 1, - size = this.st.canvas.getSize(), - config = this.config, - margin = config.Margin, - ticks = config.Ticks, - title = config.Title, - subtitle = config.Subtitle, - grouped = config.type.split(':')[0] == 'grouped', - marginWidth = margin.left + margin.right + (config.Label && grouped ? config.Label.size + config.labelOffset: 0), - marginHeight = (title.text? title.size + title.offset : 0) + (subtitle.text? subtitle.size + subtitle.offset : 0) + margin.top + margin.bottom, - horz = config.orientation == 'horizontal', - fixedDim = (size[horz? 'height':'width'] - (horz? marginHeight:marginWidth) - (ticks.enable? config.Label.size + config.labelOffset : 0) - (l -1) * config.barsOffset) / l, - animate = config.animate, - height = size[horz? 'width':'height'] - (horz? marginWidth:marginHeight) - - - ((config.showLabels && !horz) ? (config.Label.size + config.labelOffset) : 0), - dim1 = horz? 'height':'width', - dim2 = horz? 'width':'height', - basic = config.type.split(':')[0] == 'basic'; - - - var maxTickValue = Math.ceil(maxValue*.1)*10; - if(maxTickValue == maxValue) { - var length = maxTickValue.toString().length; - maxTickValue = maxTickValue + parseInt(pad(1,length)); - } - - fixedDim = fixedDim > 40 ? 40 : fixedDim; - - - this.st.graph.eachNode(function(n) { - var acum = 0, animateValue = []; - $.each(n.getData('valueArray'), function(v) { - acum += +v; - animateValue.push(0); - }); - - if(grouped) { - fixedDim = animateValue.length * 40; - } - n.setData(dim1, fixedDim); - - - if(animate) { - n.setData(dim2, acum * height / maxValue, 'end'); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return n * height / maxValue; - }), 'end'); - var dimArray = n.getData('dimArray'); - if(!dimArray) { - n.setData('dimArray', animateValue); - } - } else { - - - if(ticks.enable) { - n.setData(dim2, acum * height / maxTickValue); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return n * height / maxTickValue; - })); - } else { - n.setData(dim2, acum * height / maxValue); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return n * height / maxValue; - })); - } - } - }); - } -}); - -//funnel chart options - - -Options.FunnelChart = { - $extend: true, - - animate: true, - type: 'stacked', //stacked, grouped, : gradient - labelOffset: 3, //label offset - barsOffset: 0, //distance between bars - hoveredColor: '#9fd4ff', - orientation: 'vertical', - showAggregates: true, - showLabels: true, - Tips: { - enable: false, - onShow: $.empty, - onHide: $.empty - }, - Events: { - enable: false, - onClick: $.empty - } -}; - -$jit.ST.Plot.NodeTypes.implement({ - 'funnelchart-basic' : { - 'render' : function(node, canvas) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - valuelabelArray = node.getData('valuelabelArray'), - linkArray = node.getData('linkArray'), - colorArray = node.getData('colorArray'), - colorLength = colorArray.length, - stringArray = node.getData('stringArray'); - var ctx = canvas.getCtx(), - opt = {}, - border = node.getData('border'), - gradient = node.getData('gradient'), - config = node.getData('config'), - horz = config.orientation == 'horizontal', - aggregates = config.showAggregates, - showLabels = config.showLabels, - label = config.Label, - size = canvas.getSize(), - labelOffset = config.labelOffset + 10; - minWidth = width * .25; - ratio = .65; - - if (colorArray && dimArray && stringArray) { - - - // horizontal lines - for (var i=0, l=dimArray.length, acum=0, valAcum=0; i 0) ? dimArray[i - 1] : 100; - var labelOffsetHeight = (previousElementHeight < label.size && i > 0) ? ((dimArray[i] > label.size) ? (dimArray[i]/2) - (label.size/2) : label.size) : 0; - var topWidth = minWidth + ((acum + dimArray[i]) * ratio); - var bottomWidth = minWidth + ((acum) * ratio); - var bottomWidthLabel = minWidth + ((acum + labelOffsetHeight) * ratio); - var labelOffsetRight = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mV.width + 20 : 0) : 0; - var labelOffsetLeft = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mVL.width + 20 : 0) : 0; -// ctx.fillRect((-bottomWidth/2) - mVL.width - config.labelOffset , y - acum, bottomWidth + mVL.width + mV.width + (config.labelOffset*2), 1); - - //right lines - ctx.beginPath(); - ctx.moveTo(bottomWidth/2,y - acum); // - ctx.lineTo(bottomWidthLabel/2 + (labelOffset-10),y - acum - labelOffsetHeight); // top right - ctx.lineTo(bottomWidthLabel/2 + (labelOffset) + labelOffsetRight + mV.width,y - acum - labelOffsetHeight); // bottom right - ctx.stroke(); - //left lines - ctx.beginPath(); - ctx.moveTo(-bottomWidth/2,y - acum); // - ctx.lineTo(-bottomWidthLabel/2 - (labelOffset-10),y - acum - labelOffsetHeight); // top right - ctx.lineTo(-bottomWidthLabel/2 - (labelOffset) - labelOffsetLeft -mVL.width,y - acum - labelOffsetHeight); // bottom right - ctx.stroke(); - } - } - - acum += (dimArray[i] || 0); - valAcum += (valueArray[i] || 0); - - - } - - - - //funnel segments and labels - for (var i=0, l=dimArray.length, acum=0, valAcum=0; i 0) ? dimArray[i - 1] : 100; - var labelOffsetHeight = (previousElementHeight < label.size && i > 0) ? ((dimArray[i] > label.size) ? (dimArray[i]/2) - (label.size/2) : label.size) : 0; - var labelOffsetRight = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mV.width + 20 : 0) : 0; - var labelOffsetLeft = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mVL.width + 20 : 0) : 0; - - var topWidth = minWidth + ((acum + dimArray[i]) * ratio); - var bottomWidth = minWidth + ((acum) * ratio); - var bottomWidthLabel = minWidth + ((acum + labelOffsetHeight) * ratio); - - - if(gradient) { - var linear; - linear = ctx.createLinearGradient(-topWidth/2, y - acum - dimArray[i]/2, topWidth/2, y - acum- dimArray[i]/2); - var colorRgb = $.hexToRgb(colori); - var color = $.map($.hexToRgb(colorArray[i % colorLength].slice(1)), - function(v) { return (v * .5) >> 0; }); - linear.addColorStop(0, 'rgba('+color+',1)'); - linear.addColorStop(0.5, 'rgba('+colorRgb+',1)'); - linear.addColorStop(1, 'rgba('+color+',1)'); - ctx.fillStyle = linear; - } - - ctx.beginPath(); - ctx.moveTo(-topWidth/2,y - acum - dimArray[i]); //top left - ctx.lineTo(topWidth/2,y - acum - dimArray[i]); // top right - ctx.lineTo(bottomWidth/2,y - acum); // bottom right - ctx.lineTo(-bottomWidth/2,y - acum); // bottom left - ctx.closePath(); - ctx.fill(); - - - if(border && border.name == stringArray[i]) { - opt.acum = acum; - opt.dimValue = dimArray[i]; - } - - - if(border) { - ctx.save(); - ctx.lineWidth = 2; - ctx.strokeStyle = border.color; - - //ctx.strokeRect(x + 1, y - opt.acum - opt.dimValue + 1, minWidth -2, opt.dimValue -2); - - ctx.restore(); - } - if(label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textBaseline = 'middle'; - - acumValueLabel = valAcum; - - if(showLabels(node.name, valAcum, node)) { - - - ctx.textAlign = 'left'; - ctx.fillText(stringArray[i],(bottomWidthLabel/2) + labelOffset + labelOffsetRight, y - acum - labelOffsetHeight - label.size/2); - ctx.textAlign = 'right'; - ctx.fillText(valuelabelArray[i],(-bottomWidthLabel/2) - labelOffset - labelOffsetLeft, y - acum - labelOffsetHeight - label.size/2); - } - ctx.restore(); - } - - acum += (dimArray[i] || 0); - valAcum += (valueArray[i] || 0); - - } - - } - }, - 'contains': function(node, mpos) { - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - algnPos = this.getAlignedPos(pos, width, height), - x = algnPos.x, y = algnPos.y, - dimArray = node.getData('dimArray'), - config = node.getData('config'), - st = node.getData('st'), - rx = mpos.x - x, - horz = config.orientation == 'horizontal', - minWidth = width * .25; - ratio = .65, - canvas = node.getData('canvas'), - size = canvas.getSize(), - offsetY = st.config.offsetY; - //bounding box check - - if(mpos.y > y || mpos.y < y - height) { - return false; - } - - var newY = Math.abs(mpos.y + offsetY); - var bound = minWidth + (newY * ratio); - var boundLeft = -bound/2; - var boundRight = bound/2; - if(mpos.x < boundLeft || mpos.x > boundRight ) { - return false; - } - - - //deep check - for(var i=0, l=dimArray.length, acum=(horz? x:y); i= intersec) { - return { - 'name': node.getData('stringArray')[i], - 'color': node.getData('colorArray')[i], - 'value': node.getData('valueArray')[i], - 'percentage': node.getData('percentageArray')[i], - 'valuelabel': node.getData('valuelabelArray')[i], - 'link': url, - 'label': node.name - }; - } - - } - return false; - } - } -}); - -/* - Class: FunnelChart - - A visualization that displays funnel charts. - - Constructor Options: - - See . - -*/ -$jit.FunnelChart = new Class({ - st: null, - colors: ["#004b9c", "#9c0079", "#9c0033", "#28009c", "#9c0000", "#7d009c", "#001a9c","#00809c","#009c80","#009c42","#009c07","#469c00","#799c00","#9c9600","#9c5c00"], - selected: {}, - busy: false, - - initialize: function(opt) { - this.controller = this.config = - $.merge(Options("Canvas", "Margin", "Label", "BarChart"), { - Label: { type: 'Native' } - }, opt); - //set functions for showLabels and showAggregates - var showLabels = this.config.showLabels, - typeLabels = $.type(showLabels), - showAggregates = this.config.showAggregates, - typeAggregates = $.type(showAggregates); - this.config.showLabels = typeLabels == 'function'? showLabels : $.lambda(showLabels); - this.config.showAggregates = typeAggregates == 'function'? showAggregates : $.lambda(showAggregates); - Options.Fx.clearCanvas = false; - this.initializeViz(); - }, - - initializeViz: function() { - var config = this.config, that = this; - var nodeType = config.type.split(":")[0], - horz = config.orientation == 'horizontal', - nodeLabels = {}; - var st = new $jit.ST({ - injectInto: config.injectInto, - orientation: horz? 'left' : 'bottom', - levelDistance: 0, - background: config.background, - renderBackground: config.renderBackground, - backgroundColor: config.backgroundColor, - colorStop1: config.colorStop1, - colorStop2: config.colorStop2, - siblingOffset: config.segmentOffset, - subtreeOffset: 0, - withLabels: config.Label.type != 'Native', - useCanvas: config.useCanvas, - Label: { - type: config.Label.type - }, - Node: { - overridable: true, - type: 'funnelchart-' + nodeType, - align: 'left', - width: 1, - height: 1 - }, - Edge: { - type: 'none' - }, - Tips: { - enable: config.Tips.enable, - type: 'Native', - force: true, - onShow: function(tip, node, contains) { - var elem = contains; - config.Tips.onShow(tip, elem, node); - if(elem.link != 'undefined' && elem.link != '') { - document.body.style.cursor = 'pointer'; - } - }, - onHide: function(call) { - document.body.style.cursor = 'default'; - - } - }, - Events: { - enable: true, - type: 'Native', - onClick: function(node, eventInfo, evt) { - if(!config.Events.enable) return; - var elem = eventInfo.getContains(); - config.Events.onClick(elem, eventInfo, evt); - }, - onMouseMove: function(node, eventInfo, evt) { - if(!config.hoveredColor) return; - if(node) { - var elem = eventInfo.getContains(); - that.select(node.id, elem.name, elem.index); - } else { - that.select(false, false, false); - } - } - }, - onCreateLabel: function(domElement, node) { - var labelConf = config.Label, - valueArray = node.getData('valueArray'), - idArray = node.getData('idArray'), - valuelabelArray = node.getData('valuelabelArray'), - stringArray = node.getData('stringArray'); - size = st.canvas.getSize() - prefix = $.time(); - - for(var i=0, l=valueArray.length; i. - onComplete - (object) A callback object to be called when the animation transition when updating the data end. - - Example: - - (start code js) - barChart.updateJSON(json, { - onComplete: function() { - alert('update complete!'); - } - }); - (end code) - */ - updateJSON: function(json, onComplete) { - if(this.busy) return; - this.busy = true; - - var st = this.st; - var graph = st.graph; - var values = json.values; - var animate = this.config.animate; - var that = this; - var horz = this.config.orientation == 'horizontal'; - $.each(values, function(v) { - var n = graph.getByName(v.label); - if(n) { - n.setData('valueArray', $.splat(v.values)); - if(json.label) { - n.setData('stringArray', $.splat(json.label)); - } - } - }); - this.normalizeDims(); - st.compute(); - st.select(st.root); - if(animate) { - if(horz) { - st.fx.animate({ - modes: ['node-property:width:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } else { - st.fx.animate({ - modes: ['node-property:height:dimArray'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } - } - }, - - //adds the little brown bar when hovering the node - select: function(id, name) { - - if(!this.config.hoveredColor) return; - var s = this.selected; - if(s.id != id || s.name != name) { - s.id = id; - s.name = name; - s.color = this.config.hoveredColor; - this.st.graph.eachNode(function(n) { - if(id == n.id) { - n.setData('border', s); - } else { - n.setData('border', false); - } - }); - this.st.plot(); - } - }, - - /* - Method: getLegend - - Returns an object containing as keys the legend names and as values hex strings with color values. - - Example: - - (start code js) - var legend = barChart.getLegend(); - (end code) - */ - getLegend: function() { - var legend = new Array(); - var name = new Array(); - var color = new Array(); - var n; - this.st.graph.getNode(this.st.root).eachAdjacency(function(adj) { - n = adj.nodeTo; - }); - var colors = n.getData('colorArray'), - len = colors.length; - $.each(n.getData('stringArray'), function(s, i) { - color[i] = colors[i % len]; - name[i] = s; - }); - legend['name'] = name; - legend['color'] = color; - return legend; - }, - - /* - Method: getMaxValue - - Returns the maximum accumulated value for the stacks. This method is used for normalizing the graph heights according to the canvas height. - - Example: - - (start code js) - var ans = barChart.getMaxValue(); - (end code) - - In some cases it could be useful to override this method to normalize heights for a group of BarCharts, like when doing small multiples. - - Example: - - (start code js) - //will return 100 for all BarChart instances, - //displaying all of them with the same scale - $jit.BarChart.implement({ - 'getMaxValue': function() { - return 100; - } - }); - (end code) - - */ - getMaxValue: function() { - var maxValue = 0, stacked = true; - this.st.graph.eachNode(function(n) { - var valArray = n.getData('valueArray'), - acum = 0; - if(!valArray) return; - if(stacked) { - $.each(valArray, function(v) { - acum += +v; - }); - } else { - acum = Math.max.apply(null, valArray); - } - maxValue = maxValue>acum? maxValue:acum; - }); - return maxValue; - }, - - setBarType: function(type) { - this.config.type = type; - this.st.config.Node.type = 'funnelchart-' + type.split(':')[0]; - }, - - normalizeDims: function() { - //number of elements - var root = this.st.graph.getNode(this.st.root), l=0; - root.eachAdjacency(function() { - l++; - }); - var maxValue = this.getMaxValue() || 1, - size = this.st.canvas.getSize(), - config = this.config, - margin = config.Margin, - title = config.Title, - subtitle = config.Subtitle, - marginWidth = margin.left + margin.right, - marginHeight = (title.text? title.size + title.offset : 0) + (subtitle.text? subtitle.size + subtitle.offset : 0) + margin.top + margin.bottom, - horz = config.orientation == 'horizontal', - animate = config.animate, - height = size[horz? 'width':'height'] - (horz? marginWidth:marginHeight) - - - (config.showLabels && (config.Label.size + config.labelOffset)), - dim1 = horz? 'height':'width', - dim2 = horz? 'width':'height'; - - - minWidth = size.width/8; - - - - this.st.graph.eachNode(function(n) { - var acum = 0, animateValue = []; - $.each(n.getData('valueArray'), function(v) { - acum += +v; - animateValue.push(0); - }); - n.setData(dim1, minWidth); - - if(animate) { - n.setData(dim2, acum * height / maxValue, 'end'); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return n * height / maxValue; - }), 'end'); - var dimArray = n.getData('dimArray'); - if(!dimArray) { - n.setData('dimArray', animateValue); - } - } else { - n.setData(dim2, acum * height / maxValue); - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return n * height / maxValue; - })); - } - - }); - } -}); - - - -/* - * File: Options.PieChart.js - * -*/ -/* - Object: Options.PieChart - - options. - Other options included in the PieChart are , , and . - - Syntax: - - (start code js) - - Options.PieChart = { - animate: true, - offset: 25, - sliceOffset:0, - labelOffset: 3, - type: 'stacked', - hoveredColor: '#9fd4ff', - showLabels: true, - resizeLabels: false, - updateHeights: false - }; - - (end code) - - Example: - - (start code js) - - var pie = new $jit.PieChart({ - animate: true, - sliceOffset: 5, - type: 'stacked:gradient' - }); - - (end code) - - Parameters: - - animate - (boolean) Default's *true*. Whether to add animated transitions when plotting/updating the visualization. - offset - (number) Default's *25*. Adds margin between the visualization and the canvas. - sliceOffset - (number) Default's *0*. Separation between the center of the canvas and each pie slice. - labelOffset - (number) Default's *3*. Adds margin between the label and the default place where it should be drawn. - type - (string) Default's *'stacked'*. Stack style. Posible values are 'stacked', 'stacked:gradient' to add gradients. - hoveredColor - (boolean|string) Default's *'#9fd4ff'*. Sets the selected color for a hovered pie stack. - showLabels - (boolean) Default's *true*. Display the name of the slots. - resizeLabels - (boolean|number) Default's *false*. Resize the pie labels according to their stacked values. Set a number for *resizeLabels* to set a font size minimum. - updateHeights - (boolean) Default's *false*. Only for mono-valued (most common) pie charts. Resize the height of the pie slices according to their current values. - -*/ -Options.PieChart = { - $extend: true, - - animate: true, - offset: 25, // page offset - sliceOffset:0, - labelOffset: 3, // label offset - type: 'stacked', // gradient - labelType: 'name', - hoveredColor: '#9fd4ff', - Events: { - enable: false, - onClick: $.empty - }, - Tips: { - enable: false, - onShow: $.empty, - onHide: $.empty - }, - showLabels: true, - resizeLabels: false, - - //only valid for mono-valued datasets - updateHeights: false -}; - -/* - * Class: Layouts.Radial - * - * Implements a Radial Layout. - * - * Implemented By: - * - * , - * - */ -Layouts.Radial = new Class({ - - /* - * Method: compute - * - * Computes nodes' positions. - * - * Parameters: - * - * property - _optional_ A position property to store the new - * positions. Possible values are 'pos', 'end' or 'start'. - * - */ - compute : function(property) { - var prop = $.splat(property || [ 'current', 'start', 'end' ]); - NodeDim.compute(this.graph, prop, this.config); - this.graph.computeLevels(this.root, 0, "ignore"); - var lengthFunc = this.createLevelDistanceFunc(); - this.computeAngularWidths(prop); - this.computePositions(prop, lengthFunc); - }, - - /* - * computePositions - * - * Performs the main algorithm for computing node positions. - */ - computePositions : function(property, getLength) { - var propArray = property; - var graph = this.graph; - var root = graph.getNode(this.root); - var parent = this.parent; - var config = this.config; - - for ( var i=0, l=propArray.length; i < l; i++) { - var pi = propArray[i]; - root.setPos($P(0, 0), pi); - root.setData('span', Math.PI * 2, pi); - } - - root.angleSpan = { - begin : 0, - end : 2 * Math.PI - }; - - graph.eachBFS(this.root, function(elem) { - var angleSpan = elem.angleSpan.end - elem.angleSpan.begin; - var angleInit = elem.angleSpan.begin; - var len = getLength(elem); - //Calculate the sum of all angular widths - var totalAngularWidths = 0, subnodes = [], maxDim = {}; - elem.eachSubnode(function(sib) { - totalAngularWidths += sib._treeAngularWidth; - //get max dim - for ( var i=0, l=propArray.length; i < l; i++) { - var pi = propArray[i], dim = sib.getData('dim', pi); - maxDim[pi] = (pi in maxDim)? (dim > maxDim[pi]? dim : maxDim[pi]) : dim; - } - subnodes.push(sib); - }, "ignore"); - //Maintain children order - //Second constraint for - if (parent && parent.id == elem.id && subnodes.length > 0 - && subnodes[0].dist) { - subnodes.sort(function(a, b) { - return (a.dist >= b.dist) - (a.dist <= b.dist); - }); - } - //Calculate nodes positions. - for (var k = 0, ls=subnodes.length; k < ls; k++) { - var child = subnodes[k]; - if (!child._flag) { - var angleProportion = child._treeAngularWidth / totalAngularWidths * angleSpan; - var theta = angleInit + angleProportion / 2; - - for ( var i=0, l=propArray.length; i < l; i++) { - var pi = propArray[i]; - child.setPos($P(theta, len), pi); - child.setData('span', angleProportion, pi); - child.setData('dim-quotient', child.getData('dim', pi) / maxDim[pi], pi); - } - - child.angleSpan = { - begin : angleInit, - end : angleInit + angleProportion - }; - angleInit += angleProportion; - } - } - }, "ignore"); - }, - - /* - * Method: setAngularWidthForNodes - * - * Sets nodes angular widths. - */ - setAngularWidthForNodes : function(prop) { - this.graph.eachBFS(this.root, function(elem, i) { - var diamValue = elem.getData('angularWidth', prop[0]) || 5; - elem._angularWidth = diamValue / i; - }, "ignore"); - }, - - /* - * Method: setSubtreesAngularWidth - * - * Sets subtrees angular widths. - */ - setSubtreesAngularWidth : function() { - var that = this; - this.graph.eachNode(function(elem) { - that.setSubtreeAngularWidth(elem); - }, "ignore"); - }, - - /* - * Method: setSubtreeAngularWidth - * - * Sets the angular width for a subtree. - */ - setSubtreeAngularWidth : function(elem) { - var that = this, nodeAW = elem._angularWidth, sumAW = 0; - elem.eachSubnode(function(child) { - that.setSubtreeAngularWidth(child); - sumAW += child._treeAngularWidth; - }, "ignore"); - elem._treeAngularWidth = Math.max(nodeAW, sumAW); - }, - - /* - * Method: computeAngularWidths - * - * Computes nodes and subtrees angular widths. - */ - computeAngularWidths : function(prop) { - this.setAngularWidthForNodes(prop); - this.setSubtreesAngularWidth(); - } - -}); - - -/* - * File: Sunburst.js - */ - -/* - Class: Sunburst - - A radial space filling tree visualization. - - Inspired by: - - Sunburst . - - Note: - - This visualization was built and engineered from scratch, taking only the paper as inspiration, and only shares some features with the visualization described in the paper. - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - Additionally, there are other parameters and some default values changed - - interpolation - (string) Default's *linear*. Describes the way nodes are interpolated. Possible values are 'linear' and 'polar'. - levelDistance - (number) Default's *100*. The distance between levels of the tree. - Node.type - Described in . Default's to *multipie*. - Node.height - Described in . Default's *0*. - Edge.type - Described in . Default's *none*. - Label.textAlign - Described in . Default's *start*. - Label.textBaseline - Described in . Default's *middle*. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. - -*/ - -$jit.Sunburst = new Class({ - - Implements: [ Loader, Extras, Layouts.Radial ], - - initialize: function(controller) { - var $Sunburst = $jit.Sunburst; - - var config = { - interpolation: 'linear', - levelDistance: 100, - Node: { - 'type': 'multipie', - 'height':0 - }, - Edge: { - 'type': 'none' - }, - Label: { - textAlign: 'start', - textBaseline: 'middle' - } - }; - - this.controller = this.config = $.merge(Options("Canvas", "Node", "Edge", - "Fx", "Tips", "NodeStyles", "Events", "Navigation", "Controller", "Label"), config, controller); - - var canvasConfig = this.config; - if(canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - if(canvasConfig.background) { - canvasConfig.background = $.merge({ - type: 'Fade', - colorStop1: this.config.colorStop1, - colorStop2: this.config.colorStop2 - }, canvasConfig.background); - } - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': false, - 'Node': { - 'selected': false, - 'exist': true, - 'drawn': true - } - }; - this.graph = new Graph(this.graphOptions, this.config.Node, - this.config.Edge); - this.labels = new $Sunburst.Label[canvasConfig.Label.type](this); - this.fx = new $Sunburst.Plot(this, $Sunburst); - this.op = new $Sunburst.Op(this); - this.json = null; - this.root = null; - this.rotated = null; - this.busy = false; - // initialize extras - this.initializeExtras(); - }, - - /* - - createLevelDistanceFunc - - Returns the levelDistance function used for calculating a node distance - to its origin. This function returns a function that is computed - per level and not per node, such that all nodes with the same depth will have the - same distance to the origin. The resulting function gets the - parent node as parameter and returns a float. - - */ - createLevelDistanceFunc: function() { - var ld = this.config.levelDistance; - return function(elem) { - return (elem._depth + 1) * ld; - }; - }, - - /* - Method: refresh - - Computes positions and plots the tree. - - */ - refresh: function() { - this.compute(); - this.plot(); - }, - - /* - reposition - - An alias for computing new positions to _endPos_ - - See also: - - - - */ - reposition: function() { - this.compute('end'); - }, - - /* - Method: rotate - - Rotates the graph so that the selected node is horizontal on the right. - - Parameters: - - node - (object) A . - method - (string) Whether to perform an animation or just replot the graph. Possible values are "replot" or "animate". - opt - (object) Configuration options merged with this visualization configuration options. - - See also: - - - - */ - rotate: function(node, method, opt) { - var theta = node.getPos(opt.property || 'current').getp(true).theta; - this.rotated = node; - this.rotateAngle(-theta, method, opt); - }, - - /* - Method: rotateAngle - - Rotates the graph of an angle theta. - - Parameters: - - node - (object) A . - method - (string) Whether to perform an animation or just replot the graph. Possible values are "replot" or "animate". - opt - (object) Configuration options merged with this visualization configuration options. - - See also: - - - - */ - rotateAngle: function(theta, method, opt) { - var that = this; - var options = $.merge(this.config, opt || {}, { - modes: [ 'polar' ] - }); - var prop = opt.property || (method === "animate" ? 'end' : 'current'); - if(method === 'animate') { - this.fx.animation.pause(); - } - this.graph.eachNode(function(n) { - var p = n.getPos(prop); - p.theta += theta; - if (p.theta < 0) { - p.theta += Math.PI * 2; - } - }); - if (method == 'animate') { - this.fx.animate(options); - } else if (method == 'replot') { - this.fx.plot(); - this.busy = false; - } - }, - - /* - Method: plot - - Plots the Sunburst. This is a shortcut to *fx.plot*. - */ - plot: function() { - this.fx.plot(); - } -}); - -$jit.Sunburst.$extend = true; - -(function(Sunburst) { - - /* - Class: Sunburst.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Sunburst.Op = new Class( { - - Implements: Graph.Op - - }); - - /* - Class: Sunburst.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Sunburst.Plot = new Class( { - - Implements: Graph.Plot - - }); - - /* - Class: Sunburst.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - - */ - Sunburst.Label = {}; - - /* - Sunburst.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - - */ - Sunburst.Label.Native = new Class( { - Implements: Graph.Label.Native, - - initialize: function(viz) { - this.viz = viz; - this.label = viz.config.Label; - this.config = viz.config; - }, - - renderLabel: function(canvas, node, controller) { - var span = node.getData('span'); - if(span < Math.PI /2 && Math.tan(span) * - this.config.levelDistance * node._depth < 10) { - return; - } - var ctx = canvas.getCtx(); - var measure = ctx.measureText(node.name); - if (node.id == this.viz.root) { - var x = -measure.width / 2, y = 0, thetap = 0; - var ld = 0; - } else { - var indent = 5; - var ld = controller.levelDistance - indent; - var clone = node.pos.clone(); - clone.rho += indent; - var p = clone.getp(true); - var ct = clone.getc(true); - var x = ct.x, y = ct.y; - // get angle in degrees - var pi = Math.PI; - var cond = (p.theta > pi / 2 && p.theta < 3 * pi / 2); - var thetap = cond ? p.theta + pi : p.theta; - if (cond) { - x -= Math.abs(Math.cos(p.theta) * measure.width); - y += Math.sin(p.theta) * measure.width; - } else if (node.id == this.viz.root) { - x -= measure.width / 2; - } - } - ctx.save(); - ctx.translate(x, y); - ctx.rotate(thetap); - ctx.fillText(node.name, 0, 0); - ctx.restore(); - } - }); - - /* - Sunburst.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Sunburst.Label.SVG = new Class( { - Implements: Graph.Label.SVG, - - initialize: function(viz) { - this.viz = viz; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.getc(true), viz = this.viz, canvas = this.viz.canvas; - var radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x + radius.width / 2), - y: Math.round(pos.y + radius.height / 2) - }; - tag.setAttribute('x', labelPos.x); - tag.setAttribute('y', labelPos.y); - - var bb = tag.getBBox(); - if (bb) { - // center the label - var x = tag.getAttribute('x'); - var y = tag.getAttribute('y'); - // get polar coordinates - var p = node.pos.getp(true); - // get angle in degrees - var pi = Math.PI; - var cond = (p.theta > pi / 2 && p.theta < 3 * pi / 2); - if (cond) { - tag.setAttribute('x', x - bb.width); - tag.setAttribute('y', y - bb.height); - } else if (node.id == viz.root) { - tag.setAttribute('x', x - bb.width / 2); - } - - var thetap = cond ? p.theta + pi : p.theta; - if(node._depth) - tag.setAttribute('transform', 'rotate(' + thetap * 360 / (2 * pi) + ' ' + x - + ' ' + y + ')'); - } - - controller.onPlaceLabel(tag, node); -} - }); - - /* - Sunburst.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - - */ - Sunburst.Label.HTML = new Class( { - Implements: Graph.Label.HTML, - - initialize: function(viz) { - this.viz = viz; - }, - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.clone(), - canvas = this.viz.canvas, - height = node.getData('height'), - ldist = ((height || node._depth == 0)? height : this.viz.config.levelDistance) /2, - radius = canvas.getSize(); - pos.rho += ldist; - pos = pos.getc(true); - - var labelPos = { - x: Math.round(pos.x + radius.width / 2), - y: Math.round(pos.y + radius.height / 2) - }; - - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.display = this.fitsInCanvas(labelPos, canvas) ? '' : 'none'; - - controller.onPlaceLabel(tag, node); - } - }); - - /* - Class: Sunburst.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'pie', 'multipie', 'gradient-pie' and 'gradient-multipie'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - Sunburst.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - - */ - Sunburst.Plot.NodeTypes = new Class( { - 'none': { - 'render': $.empty, - 'contains': $.lambda(false), - 'anglecontains': function(node, pos) { - var span = node.getData('span') / 2, theta = node.pos.theta; - var begin = theta - span, end = theta + span; - if (begin < 0) - begin += Math.PI * 2; - var atan = Math.atan2(pos.y, pos.x); - if (atan < 0) - atan += Math.PI * 2; - if (begin > end) { - return (atan > begin && atan <= Math.PI * 2) || atan < end; - } else { - return atan > begin && atan < end; - } - }, - 'anglecontainsgauge': function(node, pos) { - var span = node.getData('span') / 2, theta = node.pos.theta; - var config = node.getData('config'); - var ld = this.config.levelDistance; - var yOffset = pos.y-(ld/2); - var begin = ((theta - span)/2)+Math.PI, - end = ((theta + span)/2)+Math.PI; - - if (begin < 0) - begin += Math.PI * 2; - var atan = Math.atan2(yOffset, pos.x); - - - if (atan < 0) - atan += Math.PI * 2; - - - if (begin > end) { - return (atan > begin && atan <= Math.PI * 2) || atan < end; - } else { - return atan > begin && atan < end; - } - } - }, - - 'pie': { - 'render': function(node, canvas) { - var span = node.getData('span') / 2, theta = node.pos.theta; - var begin = theta - span, end = theta + span; - var polarNode = node.pos.getp(true); - var polar = new Polar(polarNode.rho, begin); - var p1coord = polar.getc(true); - polar.theta = end; - var p2coord = polar.getc(true); - - var ctx = canvas.getCtx(); - ctx.beginPath(); - ctx.moveTo(0, 0); - ctx.lineTo(p1coord.x, p1coord.y); - ctx.moveTo(0, 0); - ctx.lineTo(p2coord.x, p2coord.y); - ctx.moveTo(0, 0); - ctx.arc(0, 0, polarNode.rho * node.getData('dim-quotient'), begin, end, - false); - ctx.fill(); - }, - 'contains': function(node, pos) { - if (this.nodeTypes['none'].anglecontains.call(this, node, pos)) { - var rho = Math.sqrt(pos.x * pos.x + pos.y * pos.y); - var ld = this.config.levelDistance, d = node._depth; - return (rho <= ld * d); - } - return false; - } - }, - 'multipie': { - 'render': function(node, canvas) { - var height = node.getData('height'); - var ldist = height? height : this.config.levelDistance; - var span = node.getData('span') / 2, theta = node.pos.theta; - var begin = theta - span, end = theta + span; - var polarNode = node.pos.getp(true); - - var polar = new Polar(polarNode.rho, begin); - var p1coord = polar.getc(true); - - polar.theta = end; - var p2coord = polar.getc(true); - - polar.rho += ldist; - var p3coord = polar.getc(true); - - polar.theta = begin; - var p4coord = polar.getc(true); - - var ctx = canvas.getCtx(); - ctx.moveTo(0, 0); - ctx.beginPath(); - ctx.arc(0, 0, polarNode.rho, begin, end, false); - ctx.arc(0, 0, polarNode.rho + ldist, end, begin, true); - ctx.moveTo(p1coord.x, p1coord.y); - ctx.lineTo(p4coord.x, p4coord.y); - ctx.moveTo(p2coord.x, p2coord.y); - ctx.lineTo(p3coord.x, p3coord.y); - ctx.fill(); - - if (node.collapsed) { - ctx.save(); - ctx.lineWidth = 2; - ctx.moveTo(0, 0); - ctx.beginPath(); - ctx.arc(0, 0, polarNode.rho + ldist + 5, end - 0.01, begin + 0.01, - true); - ctx.stroke(); - ctx.restore(); - } - }, - 'contains': function(node, pos) { - if (this.nodeTypes['none'].anglecontains.call(this, node, pos)) { - var rho = Math.sqrt(pos.x * pos.x + pos.y * pos.y); - var height = node.getData('height'); - var ldist = height? height : this.config.levelDistance; - var ld = this.config.levelDistance, d = node._depth; - return (rho >= ld * d) && (rho <= (ld * d + ldist)); - } - return false; - } - }, - - 'gradient-multipie': { - 'render': function(node, canvas) { - var ctx = canvas.getCtx(); - var height = node.getData('height'); - var ldist = height? height : this.config.levelDistance; - var radialGradient = ctx.createRadialGradient(0, 0, node.getPos().rho, - 0, 0, node.getPos().rho + ldist); - - var colorArray = $.hexToRgb(node.getData('color')), ans = []; - $.each(colorArray, function(i) { - ans.push(parseInt(i * 0.5, 10)); - }); - var endColor = $.rgbToHex(ans); - radialGradient.addColorStop(0, endColor); - radialGradient.addColorStop(1, node.getData('color')); - ctx.fillStyle = radialGradient; - this.nodeTypes['multipie'].render.call(this, node, canvas); - }, - 'contains': function(node, pos) { - return this.nodeTypes['multipie'].contains.call(this, node, pos); - } - }, - - 'gradient-pie': { - 'render': function(node, canvas) { - var ctx = canvas.getCtx(); - var radialGradient = ctx.createRadialGradient(0, 0, 0, 0, 0, node - .getPos().rho); - - var colorArray = $.hexToRgb(node.getData('color')), ans = []; - $.each(colorArray, function(i) { - ans.push(parseInt(i * 0.5, 10)); - }); - var endColor = $.rgbToHex(ans); - radialGradient.addColorStop(1, endColor); - radialGradient.addColorStop(0, node.getData('color')); - ctx.fillStyle = radialGradient; - this.nodeTypes['pie'].render.call(this, node, canvas); - }, - 'contains': function(node, pos) { - return this.nodeTypes['pie'].contains.call(this, node, pos); - } - } - }); - - /* - Class: Sunburst.Plot.EdgeTypes - - This class contains a list of built-in types. - Edge types implemented are 'none', 'line' and 'arrow'. - - You can add your custom edge types, customizing your visualization to the extreme. - - Example: - - (start code js) - Sunburst.Plot.EdgeTypes.implement({ - 'mySpecialType': { - 'render': function(adj, canvas) { - //print your custom edge to canvas - }, - //optional - 'contains': function(adj, pos) { - //return true if pos is inside the arc or false otherwise - } - } - }); - (end code) - - */ - Sunburst.Plot.EdgeTypes = new Class({ - 'none': $.empty, - 'line': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - this.edgeHelper.line.render(from, to, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - return this.edgeHelper.line.contains(from, to, pos, this.edge.epsilon); - } - }, - 'arrow': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - dim = adj.getData('dim'), - direction = adj.data.$direction, - inv = (direction && direction.length>1 && direction[0] != adj.nodeFrom.id); - this.edgeHelper.arrow.render(from, to, dim, inv, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - return this.edgeHelper.arrow.contains(from, to, pos, this.edge.epsilon); - } - }, - 'hyperline': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(), - to = adj.nodeTo.pos.getc(), - dim = Math.max(from.norm(), to.norm()); - this.edgeHelper.hyperline.render(from.$scale(1/dim), to.$scale(1/dim), dim, canvas); - }, - 'contains': $.lambda(false) //TODO(nico): Implement this! - } - }); - -})($jit.Sunburst); - - -/* - * File: PieChart.js - * -*/ - -$jit.Sunburst.Plot.NodeTypes.implement({ - 'piechart-stacked' : { - 'render' : function(node, canvas) { - var pos = node.pos.getp(true), - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - colorArray = node.getData('colorArray'), - colorLength = colorArray.length, - stringArray = node.getData('stringArray'), - span = node.getData('span') / 2, - theta = node.pos.theta, - begin = theta - span, - end = theta + span, - polar = new Polar; - - var ctx = canvas.getCtx(), - opt = {}, - gradient = node.getData('gradient'), - border = node.getData('border'), - config = node.getData('config'), - showLabels = config.showLabels, - resizeLabels = config.resizeLabels, - label = config.Label; - - var xpos = config.sliceOffset * Math.cos((begin + end) /2); - var ypos = config.sliceOffset * Math.sin((begin + end) /2); - - if (colorArray && dimArray && stringArray) { - for (var i=0, l=dimArray.length, acum=0, valAcum=0; i> 0; }), - endColor = $.rgbToHex(ans); - - radialGradient.addColorStop(0, colori); - radialGradient.addColorStop(0.5, colori); - radialGradient.addColorStop(1, endColor); - ctx.fillStyle = radialGradient; - } - - polar.rho = acum + config.sliceOffset; - polar.theta = begin; - var p1coord = polar.getc(true); - polar.theta = end; - var p2coord = polar.getc(true); - polar.rho += dimi; - var p3coord = polar.getc(true); - polar.theta = begin; - var p4coord = polar.getc(true); - - ctx.beginPath(); - //fixing FF arc method + fill - ctx.arc(xpos, ypos, acum + .01, begin, end, false); - ctx.arc(xpos, ypos, acum + dimi + .01, end, begin, true); - ctx.fill(); - if(border && border.name == stringArray[i]) { - opt.acum = acum; - opt.dimValue = dimArray[i]; - opt.begin = begin; - opt.end = end; - } - acum += (dimi || 0); - valAcum += (valueArray[i] || 0); - } - if(border) { - ctx.save(); - ctx.globalCompositeOperation = "source-over"; - ctx.lineWidth = 2; - ctx.strokeStyle = border.color; - var s = begin < end? 1 : -1; - ctx.beginPath(); - //fixing FF arc method + fill - ctx.arc(xpos, ypos, opt.acum + .01 + 1, opt.begin, opt.end, false); - ctx.arc(xpos, ypos, opt.acum + opt.dimValue + .01 - 1, opt.end, opt.begin, true); - ctx.closePath(); - ctx.stroke(); - ctx.restore(); - } - if(showLabels && label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - var scale = resizeLabels? node.getData('normalizedDim') : 1, - fontSize = (label.size * scale) >> 0; - fontSize = fontSize < +resizeLabels? +resizeLabels : fontSize; - - ctx.font = label.style + ' ' + fontSize + 'px ' + label.family; - ctx.textBaseline = 'middle'; - ctx.textAlign = 'center'; - - polar.rho = acum + config.labelOffset + config.sliceOffset; - polar.theta = node.pos.theta; - var cart = polar.getc(true); - - ctx.fillText(node.name, cart.x, cart.y); - ctx.restore(); - } - } - }, - 'contains': function(node, pos) { - if (this.nodeTypes['none'].anglecontains.call(this, node, pos)) { - var rho = Math.sqrt(pos.x * pos.x + pos.y * pos.y); - var ld = this.config.levelDistance, d = node._depth; - var config = node.getData('config'); - if(rho <=ld * d + config.sliceOffset) { - var dimArray = node.getData('dimArray'); - for(var i=0,l=dimArray.length,acum=config.sliceOffset; i= acum && rho <= acum + dimi) { - return { - name: node.getData('stringArray')[i], - color: node.getData('colorArray')[i], - value: node.getData('valueArray')[i], - label: node.name - }; - } - acum += dimi; - } - } - return false; - - } - return false; - } - }, - 'piechart-basic' : { - 'render' : function(node, canvas) { - var pos = node.pos.getp(true), - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - colorArray = node.getData('colorMono'), - colorLength = colorArray.length, - stringArray = node.getData('stringArray'), - percentage = node.getData('percentage'), - span = node.getData('span') / 2, - theta = node.pos.theta, - begin = theta - span, - end = theta + span, - polar = new Polar; - - var ctx = canvas.getCtx(), - opt = {}, - gradient = node.getData('gradient'), - border = node.getData('border'), - config = node.getData('config'), - showLabels = config.showLabels, - resizeLabels = config.resizeLabels, - label = config.Label; - - var xpos = config.sliceOffset * Math.cos((begin + end) /2); - var ypos = config.sliceOffset * Math.sin((begin + end) /2); - - if (colorArray && dimArray && stringArray) { - for (var i=0, l=dimArray.length, acum=0, valAcum=0; i> 0; }), - endColor2 = $.map(colorRgb, function(i) { return (i * 0.7) >> 0; }); - - radialGradient.addColorStop(0, 'rgba('+colorRgb+',1)'); - radialGradient.addColorStop(.7, 'rgba('+colorRgb+',1)'); - radialGradient.addColorStop(.98, 'rgba('+endColor+',1)'); - radialGradient.addColorStop(1, 'rgba('+endColor2+',1)'); - ctx.fillStyle = radialGradient; - } - } - - - //fixing FF arc method + fill - ctx.beginPath(); - ctx.arc(xpos, ypos, acum + .01, begin, end, false); - ctx.arc(xpos, ypos, acum + dimi + .01, end, begin, true); - ctx.fill(); - if(border && border.name == stringArray[i]) { - opt.acum = acum; - opt.dimValue = dimArray[i]; - opt.begin = begin; - opt.end = end; - opt.sliceValue = valueArray[i]; - } - acum += (dimi || 0); - valAcum += (valueArray[i] || 0); - } - if(border) { - ctx.save(); - ctx.globalCompositeOperation = "source-over"; - ctx.lineWidth = 2; - ctx.strokeStyle = border.color; - var s = begin < end? 1 : -1; - ctx.beginPath(); - //fixing FF arc method + fill - ctx.arc(xpos, ypos, opt.acum + .01 + 1, opt.begin, opt.end, false); - ctx.arc(xpos, ypos, opt.acum + opt.dimValue + .01 - 1, opt.end, opt.begin, true); - ctx.closePath(); - ctx.stroke(); - ctx.restore(); - } - if(showLabels && label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - var scale = resizeLabels? node.getData('normalizedDim') : 1, - fontSize = (label.size * scale) >> 0; - fontSize = fontSize < +resizeLabels? +resizeLabels : fontSize; - - ctx.font = label.style + ' ' + fontSize + 'px ' + label.family; - ctx.textBaseline = 'middle'; - ctx.textAlign = 'center'; - pi = Math.PI; - angle = theta * 360 / (2 * pi); - polar.rho = acum + config.labelOffset + config.sliceOffset; - polar.theta = node.pos.theta; - var cart = polar.getc(true); - if(((angle >= 225 && angle <= 315) || (angle <= 135 && angle >= 45)) && percentage <= 5) { - - } else { - if(config.labelType == 'name') { - ctx.fillText(node.name, cart.x, cart.y); - } else { - ctx.fillText(node.data.valuelabel, cart.x, cart.y); - } - } - ctx.restore(); - } - } - }, - 'contains': function(node, pos) { - if (this.nodeTypes['none'].anglecontains.call(this, node, pos)) { - var rho = Math.sqrt(pos.x * pos.x + pos.y * pos.y); - var ld = this.config.levelDistance, d = node._depth; - var config = node.getData('config'); - - if(rho <=ld * d + config.sliceOffset) { - var dimArray = node.getData('dimArray'); - for(var i=0,l=dimArray.length,acum=config.sliceOffset; i= acum && rho <= acum + dimi) { - var url = Url.decode(node.getData('linkArray')[i]); - return { - name: node.getData('stringArray')[i], - link: url, - color: node.getData('colorArray')[i], - value: node.getData('valueArray')[i], - percentage: node.getData('percentage'), - valuelabel: node.getData('valuelabelsArray')[i], - label: node.name - }; - } - acum += dimi; - } - } - return false; - - } - return false; - } - } -}); - -/* - Class: PieChart - - A visualization that displays stacked bar charts. - - Constructor Options: - - See . - -*/ -$jit.PieChart = new Class({ - sb: null, - colors: ["#416D9C", "#70A35E", "#EBB056", "#C74243", "#83548B", "#909291", "#557EAA"], - selected: {}, - busy: false, - - initialize: function(opt) { - this.controller = this.config = - $.merge(Options("Canvas", "PieChart", "Label"), { - Label: { type: 'Native' } - }, opt); - this.initializeViz(); - }, - - initializeViz: function() { - var config = this.config, that = this; - var nodeType = config.type.split(":")[0]; - var sb = new $jit.Sunburst({ - injectInto: config.injectInto, - useCanvas: config.useCanvas, - withLabels: config.Label.type != 'Native', - background: config.background, - renderBackground: config.renderBackground, - backgroundColor: config.backgroundColor, - colorStop1: config.colorStop1, - colorStop2: config.colorStop2, - Label: { - type: config.Label.type - }, - Node: { - overridable: true, - type: 'piechart-' + nodeType, - width: 1, - height: 1 - }, - Edge: { - type: 'none' - }, - Tips: { - enable: config.Tips.enable, - type: 'Native', - force: true, - onShow: function(tip, node, contains) { - var elem = contains; - config.Tips.onShow(tip, elem, node); - if(elem.link != 'undefined' && elem.link != '') { - document.body.style.cursor = 'pointer'; - } - }, - onHide: function() { - document.body.style.cursor = 'default'; - } - }, - Events: { - enable: true, - type: 'Native', - onClick: function(node, eventInfo, evt) { - if(!config.Events.enable) return; - var elem = eventInfo.getContains(); - config.Events.onClick(elem, eventInfo, evt); - }, - onMouseMove: function(node, eventInfo, evt) { - if(!config.hoveredColor) return; - if(node) { - var elem = eventInfo.getContains(); - that.select(node.id, elem.name, elem.index); - } else { - that.select(false, false, false); - } - } - }, - onCreateLabel: function(domElement, node) { - var labelConf = config.Label; - if(config.showLabels) { - var style = domElement.style; - style.fontSize = labelConf.size + 'px'; - style.fontFamily = labelConf.family; - style.color = labelConf.color; - style.textAlign = 'center'; - if(config.labelType == 'name') { - domElement.innerHTML = node.name; - } else { - domElement.innerHTML = (node.data.valuelabel != undefined) ? node.data.valuelabel : ""; - } - domElement.style.width = '400px'; - } - }, - onPlaceLabel: function(domElement, node) { - if(!config.showLabels) return; - var pos = node.pos.getp(true), - dimArray = node.getData('dimArray'), - span = node.getData('span') / 2, - theta = node.pos.theta, - begin = theta - span, - end = theta + span, - polar = new Polar; - - var showLabels = config.showLabels, - resizeLabels = config.resizeLabels, - label = config.Label; - - if (dimArray) { - for (var i=0, l=dimArray.length, acum=0; i> 0; - fontSize = fontSize < +resizeLabels? +resizeLabels : fontSize; - domElement.style.fontSize = fontSize + 'px'; - polar.rho = acum + config.labelOffset + config.sliceOffset; - polar.theta = (begin + end) / 2; - var pos = polar.getc(true); - var radius = that.canvas.getSize(); - var labelPos = { - x: Math.round(pos.x + radius.width / 2), - y: Math.round(pos.y + radius.height / 2) - }; - domElement.style.left = (labelPos.x - 200) + 'px'; - domElement.style.top = labelPos.y + 'px'; - } - } - }); - - var size = sb.canvas.getSize(), - min = Math.min; - sb.config.levelDistance = min(size.width, size.height)/2 - - config.offset - config.sliceOffset; - this.sb = sb; - this.canvas = this.sb.canvas; - this.canvas.getCtx().globalCompositeOperation = 'lighter'; - }, - renderBackground: function() { - var canvas = this.canvas, - config = this.config, - backgroundColor = config.backgroundColor, - size = canvas.getSize(), - ctx = canvas.getCtx(); - ctx.globalCompositeOperation = "destination-over"; - ctx.fillStyle = backgroundColor; - ctx.fillRect(-size.width/2,-size.height/2,size.width,size.height); - }, - /* - Method: loadJSON - - Loads JSON data into the visualization. - - Parameters: - - json - The JSON data format. This format is described in . - - Example: - (start code js) - var pieChart = new $jit.PieChart(options); - pieChart.loadJSON(json); - (end code) - */ - loadJSON: function(json) { - var prefix = $.time(), - ch = [], - sb = this.sb, - name = $.splat(json.label), - nameLength = name.length, - color = $.splat(json.color || this.colors), - colorLength = color.length, - config = this.config, - renderBackground = config.renderBackground, - gradient = !!config.type.split(":")[1], - animate = config.animate, - mono = nameLength == 1; - totalValue = 0; - for(var i=0, values=json.values, l=values.length; i. - onComplete - (object) A callback object to be called when the animation transition when updating the data end. - - Example: - - (start code js) - pieChart.updateJSON(json, { - onComplete: function() { - alert('update complete!'); - } - }); - (end code) - */ - updateJSON: function(json, onComplete) { - if(this.busy) return; - this.busy = true; - - var sb = this.sb; - var graph = sb.graph; - var values = json.values; - var animate = this.config.animate; - var that = this; - $.each(values, function(v) { - var n = graph.getByName(v.label), - vals = $.splat(v.values); - if(n) { - n.setData('valueArray', vals); - n.setData('angularWidth', $.reduce(vals, function(x,y){return x+y;})); - if(json.label) { - n.setData('stringArray', $.splat(json.label)); - } - } - }); - this.normalizeDims(); - if(animate) { - sb.compute('end'); - sb.fx.animate({ - modes: ['node-property:dimArray:span', 'linear'], - duration:1500, - onComplete: function() { - that.busy = false; - onComplete && onComplete.onComplete(); - } - }); - } else { - sb.refresh(); - } - }, - - //adds the little brown bar when hovering the node - select: function(id, name) { - if(!this.config.hoveredColor) return; - var s = this.selected; - if(s.id != id || s.name != name) { - s.id = id; - s.name = name; - s.color = this.config.hoveredColor; - this.sb.graph.eachNode(function(n) { - if(id == n.id) { - n.setData('border', s); - } else { - n.setData('border', false); - } - }); - this.sb.plot(); - } - }, - - /* - Method: getLegend - - Returns an object containing as keys the legend names and as values hex strings with color values. - - Example: - - (start code js) - var legend = pieChart.getLegend(); - (end code) - */ - getLegend: function() { - var legend = new Array(); - var name = new Array(); - var color = new Array(); - var n; - this.sb.graph.getNode(this.sb.root).eachAdjacency(function(adj) { - n = adj.nodeTo; - }); - var colors = n.getData('colorArray'), - len = colors.length; - $.each(n.getData('stringArray'), function(s, i) { - color[i] = colors[i % len]; - name[i] = s; - }); - legend['name'] = name; - legend['color'] = color; - return legend; - }, - - /* - Method: getMaxValue - - Returns the maximum accumulated value for the stacks. This method is used for normalizing the graph heights according to the canvas height. - - Example: - - (start code js) - var ans = pieChart.getMaxValue(); - (end code) - - In some cases it could be useful to override this method to normalize heights for a group of PieCharts, like when doing small multiples. - - Example: - - (start code js) - //will return 100 for all PieChart instances, - //displaying all of them with the same scale - $jit.PieChart.implement({ - 'getMaxValue': function() { - return 100; - } - }); - (end code) - - */ - getMaxValue: function() { - var maxValue = 0; - this.sb.graph.eachNode(function(n) { - var valArray = n.getData('valueArray'), - acum = 0; - $.each(valArray, function(v) { - acum += +v; - }); - maxValue = maxValue>acum? maxValue:acum; - }); - return maxValue; - }, - - normalizeDims: function() { - //number of elements - var root = this.sb.graph.getNode(this.sb.root), l=0; - root.eachAdjacency(function() { - l++; - }); - var maxValue = this.getMaxValue() || 1, - config = this.config, - animate = config.animate, - rho = this.sb.config.levelDistance; - this.sb.graph.eachNode(function(n) { - var acum = 0, animateValue = []; - $.each(n.getData('valueArray'), function(v) { - acum += +v; - animateValue.push(1); - }); - var stat = (animateValue.length == 1) && !config.updateHeights; - if(animate) { - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return stat? rho: (n * rho / maxValue); - }), 'end'); - var dimArray = n.getData('dimArray'); - if(!dimArray) { - n.setData('dimArray', animateValue); - } - } else { - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return stat? rho : (n * rho / maxValue); - })); - } - n.setData('normalizedDim', acum / maxValue); - }); - } -}); - - -//Gauge Chart - -Options.GaugeChart = { - $extend: true, - - animate: true, - offset: 25, // page offset - sliceOffset:0, - labelOffset: 3, // label offset - type: 'stacked', // gradient - labelType: 'name', - hoveredColor: '#9fd4ff', - Events: { - enable: false, - onClick: $.empty - }, - Tips: { - enable: false, - onShow: $.empty, - onHide: $.empty - }, - showLabels: true, - resizeLabels: false, - - //only valid for mono-valued datasets - updateHeights: false -}; - - - -$jit.Sunburst.Plot.NodeTypes.implement({ - 'gaugechart-basic' : { - 'render' : function(node, canvas) { - var pos = node.pos.getp(true), - dimArray = node.getData('dimArray'), - valueArray = node.getData('valueArray'), - valuelabelsArray = node.getData('valuelabelsArray'), - gaugeTarget = node.getData('gaugeTarget'), - nodeIteration = node.getData('nodeIteration'), - nodeLength = node.getData('nodeLength'), - colorArray = node.getData('colorMono'), - colorLength = colorArray.length, - stringArray = node.getData('stringArray'), - span = node.getData('span') / 2, - theta = node.pos.theta, - begin = ((theta - span)/2)+Math.PI, - end = ((theta + span)/2)+Math.PI, - polar = new Polar; - - - var ctx = canvas.getCtx(), - opt = {}, - gradient = node.getData('gradient'), - border = node.getData('border'), - config = node.getData('config'), - showLabels = config.showLabels, - resizeLabels = config.resizeLabels, - label = config.Label; - - var xpos = Math.cos((begin + end) /2); - var ypos = Math.sin((begin + end) /2); - - if (colorArray && dimArray && stringArray && gaugeTarget != 0) { - for (var i=0, l=dimArray.length, acum=0, valAcum=0; i> 0; }), - endColor = $.rgbToHex(ans); - - radialGradient.addColorStop(0, 'rgba('+colorRgb+',1)'); - radialGradient.addColorStop(0.1, 'rgba('+colorRgb+',1)'); - radialGradient.addColorStop(0.85, 'rgba('+colorRgb+',1)'); - radialGradient.addColorStop(1, 'rgba('+ans+',1)'); - ctx.fillStyle = radialGradient; - } - - polar.rho = acum; - polar.theta = begin; - var p1coord = polar.getc(true); - polar.theta = end; - var p2coord = polar.getc(true); - polar.rho += dimi; - var p3coord = polar.getc(true); - polar.theta = begin; - var p4coord = polar.getc(true); - - - ctx.beginPath(); - //fixing FF arc method + fill - ctx.arc(xpos, (ypos + dimi/2), (acum + dimi + .01) * .8, begin, end, false); - ctx.arc(xpos, (ypos + dimi/2), (acum + dimi + .01), end, begin, true); - ctx.fill(); - - - acum += (dimi || 0); - valAcum += (valueArray[i] || 0); - } - - if(showLabels && label.type == 'Native') { - ctx.save(); - ctx.fillStyle = ctx.strokeStyle = label.color; - - - ctx.font = label.style + ' ' + label.size + 'px ' + label.family; - ctx.textBaseline = 'bottom'; - ctx.textAlign = 'center'; - - polar.rho = acum * .65; - polar.theta = begin; - var cart = polar.getc(true); - - //changes y pos of first label - if(nodeIteration == 1) { - textY = cart.y - (label.size/2) + acum /2; - } else { - textY = cart.y + acum/2; - } - - if(config.labelType == 'name') { - ctx.fillText(node.name, cart.x, textY); - } else { - ctx.fillText(valuelabelsArray[0], cart.x, textY); - } - - //adds final label - if(nodeIteration == nodeLength) { - polar.theta = end; - var cart = polar.getc(true); - if(config.labelType == 'name') { - ctx.fillText(node.name, cart.x, cart.x, cart.y - (label.size/2) + acum/2); - } else { - ctx.fillText(valuelabelsArray[1], cart.x, cart.y - (label.size/2) + acum/2); - } - - } - ctx.restore(); - } - - } - }, - 'contains': function(node, pos) { - - - - if (this.nodeTypes['none'].anglecontainsgauge.call(this, node, pos)) { - var config = node.getData('config'); - var ld = this.config.levelDistance , d = node._depth; - var yOffset = pos.y - (ld/2); - var xOffset = pos.x; - var rho = Math.sqrt(xOffset * xOffset + yOffset * yOffset); - if(rho <=parseInt(ld * d)) { - var dimArray = node.getData('dimArray'); - for(var i=0,l=dimArray.length,acum=config.sliceOffset; i= ld * .8 && rho <= acum + dimi) { - - var url = Url.decode(node.getData('linkArray')[i]); - return { - name: node.getData('stringArray')[i], - link: url, - color: node.getData('colorArray')[i], - value: node.getData('valueArray')[i], - valuelabel: node.getData('valuelabelsArray')[0] + " - " + node.getData('valuelabelsArray')[1], - label: node.name - }; - } - acum += dimi; - - - } - } - return false; - - } - return false; - } - } -}); - -/* - Class: GaugeChart - - A visualization that displays gauge charts - - Constructor Options: - - See . - -*/ -$jit.GaugeChart = new Class({ - sb: null, - colors: ["#416D9C", "#70A35E", "#EBB056", "#C74243", "#83548B", "#909291", "#557EAA"], - selected: {}, - busy: false, - - initialize: function(opt) { - this.controller = this.config = - $.merge(Options("Canvas", "GaugeChart", "Label"), { - Label: { type: 'Native' } - }, opt); - this.initializeViz(); - }, - - initializeViz: function() { - var config = this.config, that = this; - var nodeType = config.type.split(":")[0]; - var sb = new $jit.Sunburst({ - injectInto: config.injectInto, - useCanvas: config.useCanvas, - withLabels: config.Label.type != 'Native', - background: config.background, - renderBackground: config.renderBackground, - backgroundColor: config.backgroundColor, - colorStop1: config.colorStop1, - colorStop2: config.colorStop2, - Label: { - type: config.Label.type - }, - Node: { - overridable: true, - type: 'gaugechart-' + nodeType, - width: 1, - height: 1 - }, - Edge: { - type: 'none' - }, - Tips: { - enable: config.Tips.enable, - type: 'Native', - force: true, - onShow: function(tip, node, contains) { - var elem = contains; - config.Tips.onShow(tip, elem, node); - if(elem.link != 'undefined' && elem.link != '') { - document.body.style.cursor = 'pointer'; - } - }, - onHide: function() { - document.body.style.cursor = 'default'; - } - }, - Events: { - enable: true, - type: 'Native', - onClick: function(node, eventInfo, evt) { - if(!config.Events.enable) return; - var elem = eventInfo.getContains(); - config.Events.onClick(elem, eventInfo, evt); - } - }, - onCreateLabel: function(domElement, node) { - var labelConf = config.Label; - if(config.showLabels) { - var style = domElement.style; - style.fontSize = labelConf.size + 'px'; - style.fontFamily = labelConf.family; - style.color = labelConf.color; - style.textAlign = 'center'; - valuelabelsArray = node.getData('valuelabelsArray'), - nodeIteration = node.getData('nodeIteration'), - nodeLength = node.getData('nodeLength'), - canvas = sb.canvas, - prefix = $.time(); - - if(config.labelType == 'name') { - domElement.innerHTML = node.name; - } else { - domElement.innerHTML = (valuelabelsArray[0] != undefined) ? valuelabelsArray[0] : ""; - } - - domElement.style.width = '400px'; - - //adds final label - if(nodeIteration == nodeLength && nodeLength != 0) { - idLabel = canvas.id + "-label"; - container = document.getElementById(idLabel); - finalLabel = document.createElement('div'); - finalLabelStyle = finalLabel.style; - finalLabel.id = prefix + "finalLabel"; - finalLabelStyle.position = "absolute"; - finalLabelStyle.width = "400px"; - finalLabelStyle.left = "0px"; - container.appendChild(finalLabel); - if(config.labelType == 'name') { - finalLabel.innerHTML = node.name; - } else { - finalLabel.innerHTML = (valuelabelsArray[1] != undefined) ? valuelabelsArray[1] : ""; - } - - } - } - }, - onPlaceLabel: function(domElement, node) { - if(!config.showLabels) return; - var pos = node.pos.getp(true), - dimArray = node.getData('dimArray'), - nodeIteration = node.getData('nodeIteration'), - nodeLength = node.getData('nodeLength'), - span = node.getData('span') / 2, - theta = node.pos.theta, - begin = ((theta - span)/2)+Math.PI, - end = ((theta + span)/2)+Math.PI, - polar = new Polar; - - var showLabels = config.showLabels, - resizeLabels = config.resizeLabels, - label = config.Label, - radiusOffset = sb.config.levelDistance; - - if (dimArray) { - for (var i=0, l=dimArray.length, acum=0; i> 0; - fontSize = fontSize < +resizeLabels? +resizeLabels : fontSize; - domElement.style.fontSize = fontSize + 'px'; - polar.rho = acum * .65; - polar.theta = begin; - var pos = polar.getc(true); - var radius = that.canvas.getSize(); - var labelPos = { - x: Math.round(pos.x + radius.width / 2), - y: Math.round(pos.y + (radius.height / 2) + radiusOffset/2) - }; - - - - domElement.style.left = (labelPos.x - 200) + 'px'; - domElement.style.top = labelPos.y + 'px'; - - //reposition first label - if(nodeIteration == 1) { - domElement.style.top = labelPos.y - label.size + 'px'; - } - - - //position final label - if(nodeIteration == nodeLength && nodeLength != 0) { - polar.theta = end; - var final = polar.getc(true); - var finalPos = { - x: Math.round(final.x + radius.width / 2), - y: Math.round(final.y + (radius.height / 2) + radiusOffset/2) - }; - finalLabel.style.left = (finalPos.x - 200) + "px"; - finalLabel.style.top = finalPos.y - label.size + "px"; - } - - } - } - - }); - this.sb = sb; - this.canvas = this.sb.canvas; - var size = sb.canvas.getSize(), - min = Math.min; - sb.config.levelDistance = min(size.width, size.height)/2 - - config.offset - config.sliceOffset; - - - }, - - renderBackground: function() { - var canvas = this.sb.canvas, - config = this.config, - style = config.gaugeStyle, - ctx = canvas.getCtx(), - size = canvas.getSize(), - radius = this.sb.config.levelDistance, - startAngle = (Math.PI/180)*1, - endAngle = (Math.PI/180)*179; - - - //background border - ctx.fillStyle = style.borderColor; - ctx.beginPath(); - ctx.arc(0,radius/2,radius+4,startAngle,endAngle, true); - ctx.fill(); - - - var radialGradient = ctx.createRadialGradient(0,radius/2,0,0,radius/2,radius); - radialGradient.addColorStop(0, '#ffffff'); - radialGradient.addColorStop(0.3, style.backgroundColor); - radialGradient.addColorStop(0.6, style.backgroundColor); - radialGradient.addColorStop(1, '#FFFFFF'); - ctx.fillStyle = radialGradient; - - //background - startAngle = (Math.PI/180)*0; - endAngle = (Math.PI/180)*180; - ctx.beginPath(); - ctx.arc(0,radius/2,radius,startAngle,endAngle, true); - ctx.fill(); - - - - }, - - - renderNeedle: function(gaugePosition,target) { - var canvas = this.sb.canvas, - config = this.config, - style = config.gaugeStyle, - ctx = canvas.getCtx(), - size = canvas.getSize(), - radius = this.sb.config.levelDistance; - gaugeCenter = (radius/2); - startAngle = 0; - endAngle = (Math.PI/180)*180; - - - // needle - ctx.fillStyle = style.needleColor; - var segments = 180/target; - needleAngle = gaugePosition * segments; - ctx.translate(0, gaugeCenter); - ctx.save(); - ctx.rotate(needleAngle * Math.PI / 180); - ctx.beginPath(); - ctx.moveTo(0,0); - ctx.lineTo(0,-4); - ctx.lineTo(-radius*.9,-1); - ctx.lineTo(-radius*.9,1); - ctx.lineTo(0,4); - ctx.lineTo(0,0); - ctx.closePath(); - ctx.fill(); - ctx.restore(); - - - // stroke needle - ctx.lineWidth = 1; - ctx.strokeStyle = '#aa0000'; - ctx.save(); - ctx.rotate(needleAngle * Math.PI / 180); - ctx.beginPath(); - ctx.moveTo(0,0); - ctx.lineTo(0,-4); - ctx.lineTo(-radius*.8,-1); - ctx.lineTo(-radius*.8,1); - ctx.lineTo(0,4); - ctx.lineTo(0,0); - ctx.closePath(); - ctx.stroke(); - ctx.restore(); - - //needle cap - ctx.fillStyle = "#000000"; - ctx.lineWidth = style.borderSize; - ctx.strokeStyle = style.borderColor; - var radialGradient = ctx.createRadialGradient(0,style.borderSize,0,0,style.borderSize,radius*.2); - radialGradient.addColorStop(0, '#666666'); - radialGradient.addColorStop(0.8, '#444444'); - radialGradient.addColorStop(1, 'rgba(0,0,0,0)'); - ctx.fillStyle = radialGradient; - ctx.translate(0,5); - ctx.save(); - ctx.beginPath(); - ctx.arc(0,0,radius*.2,startAngle,endAngle, true); - ctx.fill(); - ctx.restore(); - - - }, - - renderTicks: function(values) { - var canvas = this.sb.canvas, - config = this.config, - style = config.gaugeStyle, - ctx = canvas.getCtx(), - size = canvas.getSize(), - radius = this.sb.config.levelDistance, - gaugeCenter = (radius/2); - - - ctx.strokeStyle = style.borderColor; - ctx.lineWidth = 5; - ctx.lineCap = "round"; - for(var i=0, total = 0, l=values.length; iacum? maxValue:acum; - }); - return maxValue; - }, - - normalizeDims: function() { - //number of elements - var root = this.sb.graph.getNode(this.sb.root), l=0; - root.eachAdjacency(function() { - l++; - }); - var maxValue = this.getMaxValue() || 1, - config = this.config, - animate = config.animate, - rho = this.sb.config.levelDistance; - this.sb.graph.eachNode(function(n) { - var acum = 0, animateValue = []; - $.each(n.getData('valueArray'), function(v) { - acum += +v; - animateValue.push(1); - }); - var stat = (animateValue.length == 1) && !config.updateHeights; - if(animate) { - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return stat? rho: (n * rho / maxValue); - }), 'end'); - var dimArray = n.getData('dimArray'); - if(!dimArray) { - n.setData('dimArray', animateValue); - } - } else { - n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { - return stat? rho : (n * rho / maxValue); - })); - } - n.setData('normalizedDim', acum / maxValue); - }); - } -}); - - -/* - * Class: Layouts.TM - * - * Implements TreeMaps layouts (SliceAndDice, Squarified, Strip). - * - * Implemented By: - * - * - * - */ -Layouts.TM = {}; - -Layouts.TM.SliceAndDice = new Class({ - compute: function(prop) { - var root = this.graph.getNode(this.clickedNode && this.clickedNode.id || this.root); - this.controller.onBeforeCompute(root); - var size = this.canvas.getSize(), - config = this.config, - width = size.width, - height = size.height; - this.graph.computeLevels(this.root, 0, "ignore"); - //set root position and dimensions - root.getPos(prop).setc(-width/2, -height/2); - root.setData('width', width, prop); - root.setData('height', height + config.titleHeight, prop); - this.computePositions(root, root, this.layout.orientation, prop); - this.controller.onAfterCompute(root); - }, - - computePositions: function(par, ch, orn, prop) { - //compute children areas - var totalArea = 0; - par.eachSubnode(function(n) { - totalArea += n.getData('area', prop); - }); - - var config = this.config, - offst = config.offset, - width = par.getData('width', prop), - height = par.getData('height', prop) - config.titleHeight, - fact = par == ch? 1: (ch.getData('area', prop) / totalArea); - - var otherSize, size, dim, pos, pos2, posth, pos2th; - var horizontal = (orn == "h"); - if(horizontal) { - orn = 'v'; - otherSize = height; - size = width * fact; - dim = 'height'; - pos = 'y'; - pos2 = 'x'; - posth = config.titleHeight; - pos2th = 0; - } else { - orn = 'h'; - otherSize = height * fact; - size = width; - dim = 'width'; - pos = 'x'; - pos2 = 'y'; - posth = 0; - pos2th = config.titleHeight; - } - var cpos = ch.getPos(prop); - ch.setData('width', size, prop); - ch.setData('height', otherSize, prop); - var offsetSize = 0, tm = this; - ch.eachSubnode(function(n) { - var p = n.getPos(prop); - p[pos] = offsetSize + cpos[pos] + posth; - p[pos2] = cpos[pos2] + pos2th; - tm.computePositions(ch, n, orn, prop); - offsetSize += n.getData(dim, prop); - }); - } - -}); - -Layouts.TM.Area = { - /* - Method: compute - - Called by loadJSON to calculate recursively all node positions and lay out the tree. - - Parameters: - - json - A JSON tree. See also . - coord - A coordinates object specifying width, height, left and top style properties. - */ - compute: function(prop) { - prop = prop || "current"; - var root = this.graph.getNode(this.clickedNode && this.clickedNode.id || this.root); - this.controller.onBeforeCompute(root); - var config = this.config, - size = this.canvas.getSize(), - width = size.width, - height = size.height, - offst = config.offset, - offwdth = width - offst, - offhght = height - offst; - this.graph.computeLevels(this.root, 0, "ignore"); - //set root position and dimensions - root.getPos(prop).setc(-width/2, -height/2); - root.setData('width', width, prop); - root.setData('height', height, prop); - //create a coordinates object - var coord = { - 'top': -height/2 + config.titleHeight, - 'left': -width/2, - 'width': offwdth, - 'height': offhght - config.titleHeight - }; - this.computePositions(root, coord, prop); - this.controller.onAfterCompute(root); - }, - - /* - Method: computeDim - - Computes dimensions and positions of a group of nodes - according to a custom layout row condition. - - Parameters: - - tail - An array of nodes. - initElem - An array of nodes (containing the initial node to be laid). - w - A fixed dimension where nodes will be layed out. - coord - A coordinates object specifying width, height, left and top style properties. - comp - A custom comparison function - */ - computeDim: function(tail, initElem, w, coord, comp, prop) { - if(tail.length + initElem.length == 1) { - var l = (tail.length == 1)? tail : initElem; - this.layoutLast(l, w, coord, prop); - return; - } - if(tail.length >= 2 && initElem.length == 0) { - initElem = [tail.shift()]; - } - if(tail.length == 0) { - if(initElem.length > 0) this.layoutRow(initElem, w, coord, prop); - return; - } - var c = tail[0]; - if(comp(initElem, w) >= comp([c].concat(initElem), w)) { - this.computeDim(tail.slice(1), initElem.concat([c]), w, coord, comp, prop); - } else { - var newCoords = this.layoutRow(initElem, w, coord, prop); - this.computeDim(tail, [], newCoords.dim, newCoords, comp, prop); - } - }, - - - /* - Method: worstAspectRatio - - Calculates the worst aspect ratio of a group of rectangles. - - See also: - - - - Parameters: - - ch - An array of nodes. - w - The fixed dimension where rectangles are being laid out. - - Returns: - - The worst aspect ratio. - - - */ - worstAspectRatio: function(ch, w) { - if(!ch || ch.length == 0) return Number.MAX_VALUE; - var areaSum = 0, maxArea = 0, minArea = Number.MAX_VALUE; - for(var i=0, l=ch.length; i area? maxArea : area; - } - var sqw = w * w, sqAreaSum = areaSum * areaSum; - return Math.max(sqw * maxArea / sqAreaSum, - sqAreaSum / (sqw * minArea)); - }, - - /* - Method: avgAspectRatio - - Calculates the average aspect ratio of a group of rectangles. - - See also: - - - - Parameters: - - ch - An array of nodes. - w - The fixed dimension where rectangles are being laid out. - - Returns: - - The average aspect ratio. - - - */ - avgAspectRatio: function(ch, w) { - if(!ch || ch.length == 0) return Number.MAX_VALUE; - var arSum = 0; - for(var i=0, l=ch.length; i h? w / h : h / w; - } - return arSum / l; - }, - - /* - layoutLast - - Performs the layout of the last computed sibling. - - Parameters: - - ch - An array of nodes. - w - A fixed dimension where nodes will be layed out. - coord - A coordinates object specifying width, height, left and top style properties. - */ - layoutLast: function(ch, w, coord, prop) { - var child = ch[0]; - child.getPos(prop).setc(coord.left, coord.top); - child.setData('width', coord.width, prop); - child.setData('height', coord.height, prop); - } -}; - - -Layouts.TM.Squarified = new Class({ - Implements: Layouts.TM.Area, - - computePositions: function(node, coord, prop) { - var config = this.config; - - if (coord.width >= coord.height) - this.layout.orientation = 'h'; - else - this.layout.orientation = 'v'; - - var ch = node.getSubnodes([1, 1], "ignore"); - if(ch.length > 0) { - this.processChildrenLayout(node, ch, coord, prop); - for(var i=0, l=ch.length; i. - coord - A coordinates object specifying width, height, left and top style properties. - */ - computePositions: function(node, coord, prop) { - var ch = node.getSubnodes([1, 1], "ignore"), config = this.config; - if(ch.length > 0) { - this.processChildrenLayout(node, ch, coord, prop); - for(var i=0, l=ch.length; i - * - */ - -Layouts.Icicle = new Class({ - /* - * Method: compute - * - * Called by loadJSON to calculate all node positions. - * - * Parameters: - * - * posType - The nodes' position to compute. Either "start", "end" or - * "current". Defaults to "current". - */ - compute: function(posType) { - posType = posType || "current"; - var root = this.graph.getNode(this.root), - config = this.config, - size = this.canvas.getSize(), - width = size.width, - height = size.height, - offset = config.offset, - levelsToShow = config.constrained ? config.levelsToShow : Number.MAX_VALUE; - - this.controller.onBeforeCompute(root); - - Graph.Util.computeLevels(this.graph, root.id, 0, "ignore"); - - var treeDepth = 0; - - Graph.Util.eachLevel(root, 0, false, function (n, d) { if(d > treeDepth) treeDepth = d; }); - - var startNode = this.graph.getNode(this.clickedNode && this.clickedNode.id || root.id); - var maxDepth = Math.min(treeDepth, levelsToShow-1); - var initialDepth = startNode._depth; - if(this.layout.horizontal()) { - this.computeSubtree(startNode, -width/2, -height/2, width/(maxDepth+1), height, initialDepth, maxDepth, posType); - } else { - this.computeSubtree(startNode, -width/2, -height/2, width, height/(maxDepth+1), initialDepth, maxDepth, posType); - } - }, - - computeSubtree: function (root, x, y, width, height, initialDepth, maxDepth, posType) { - root.getPos(posType).setc(x, y); - root.setData('width', width, posType); - root.setData('height', height, posType); - - var nodeLength, prevNodeLength = 0, totalDim = 0; - var children = Graph.Util.getSubnodes(root, [1, 1]); // next level from this node - - if(!children.length) - return; - - $.each(children, function(e) { totalDim += e.getData('dim'); }); - - for(var i=0, l=children.length; i < l; i++) { - if(this.layout.horizontal()) { - nodeLength = height * children[i].getData('dim') / totalDim; - this.computeSubtree(children[i], x+width, y, width, nodeLength, initialDepth, maxDepth, posType); - y += nodeLength; - } else { - nodeLength = width * children[i].getData('dim') / totalDim; - this.computeSubtree(children[i], x, y+height, nodeLength, height, initialDepth, maxDepth, posType); - x += nodeLength; - } - } - } -}); - - - -/* - * File: Icicle.js - * -*/ - -/* - Class: Icicle - - Icicle space filling visualization. - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - Additionally, there are other parameters and some default values changed - - orientation - (string) Default's *h*. Whether to set horizontal or vertical layouts. Possible values are 'h' and 'v'. - offset - (number) Default's *2*. Boxes offset. - constrained - (boolean) Default's *false*. Whether to show the entire tree when loaded or just the number of levels specified by _levelsToShow_. - levelsToShow - (number) Default's *3*. The number of levels to show for a subtree. This number is relative to the selected node. - animate - (boolean) Default's *false*. Whether to animate transitions. - Node.type - Described in . Default's *rectangle*. - Label.type - Described in . Default's *Native*. - duration - Described in . Default's *700*. - fps - Described in . Default's *45*. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. - -*/ - -$jit.Icicle = new Class({ - Implements: [ Loader, Extras, Layouts.Icicle ], - - layout: { - orientation: "h", - vertical: function(){ - return this.orientation == "v"; - }, - horizontal: function(){ - return this.orientation == "h"; - }, - change: function(){ - this.orientation = this.vertical()? "h" : "v"; - } - }, - - initialize: function(controller) { - var config = { - animate: false, - orientation: "h", - offset: 2, - levelsToShow: Number.MAX_VALUE, - constrained: false, - Node: { - type: 'rectangle', - overridable: true - }, - Edge: { - type: 'none' - }, - Label: { - type: 'Native' - }, - duration: 700, - fps: 45 - }; - - var opts = Options("Canvas", "Node", "Edge", "Fx", "Tips", "NodeStyles", - "Events", "Navigation", "Controller", "Label"); - this.controller = this.config = $.merge(opts, config, controller); - this.layout.orientation = this.config.orientation; - - var canvasConfig = this.config; - if (canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': true, - 'Node': { - 'selected': false, - 'exist': true, - 'drawn': true - } - }; - - this.graph = new Graph( - this.graphOptions, this.config.Node, this.config.Edge, this.config.Label); - - this.labels = new $jit.Icicle.Label[this.config.Label.type](this); - this.fx = new $jit.Icicle.Plot(this, $jit.Icicle); - this.op = new $jit.Icicle.Op(this); - this.group = new $jit.Icicle.Group(this); - this.clickedNode = null; - - this.initializeExtras(); - }, - - /* - Method: refresh - - Computes positions and plots the tree. - */ - refresh: function(){ - var labelType = this.config.Label.type; - if(labelType != 'Native') { - var that = this; - this.graph.eachNode(function(n) { that.labels.hideLabel(n, false); }); - } - this.compute(); - this.plot(); - }, - - /* - Method: plot - - Plots the Icicle visualization. This is a shortcut to *fx.plot*. - - */ - plot: function(){ - this.fx.plot(this.config); - }, - - /* - Method: enter - - Sets the node as root. - - Parameters: - - node - (object) A . - - */ - enter: function (node) { - if (this.busy) - return; - this.busy = true; - - var that = this, - config = this.config; - - var callback = { - onComplete: function() { - //compute positions of newly inserted nodes - if(config.request) - that.compute(); - - if(config.animate) { - that.graph.nodeList.setDataset(['current', 'end'], { - 'alpha': [1, 0] //fade nodes - }); - - Graph.Util.eachSubgraph(node, function(n) { - n.setData('alpha', 1, 'end'); - }, "ignore"); - - that.fx.animate({ - duration: 500, - modes:['node-property:alpha'], - onComplete: function() { - that.clickedNode = node; - that.compute('end'); - - that.fx.animate({ - modes:['linear', 'node-property:width:height'], - duration: 1000, - onComplete: function() { - that.busy = false; - that.clickedNode = node; - } - }); - } - }); - } else { - that.clickedNode = node; - that.busy = false; - that.refresh(); - } - } - }; - - if(config.request) { - this.requestNodes(clickedNode, callback); - } else { - callback.onComplete(); - } - }, - - /* - Method: out - - Sets the parent node of the current selected node as root. - - */ - out: function(){ - if(this.busy) - return; - - var that = this, - GUtil = Graph.Util, - config = this.config, - graph = this.graph, - parents = GUtil.getParents(graph.getNode(this.clickedNode && this.clickedNode.id || this.root)), - parent = parents[0], - clickedNode = parent, - previousClickedNode = this.clickedNode; - - this.busy = true; - this.events.hoveredNode = false; - - if(!parent) { - this.busy = false; - return; - } - - //final plot callback - callback = { - onComplete: function() { - that.clickedNode = parent; - if(config.request) { - that.requestNodes(parent, { - onComplete: function() { - that.compute(); - that.plot(); - that.busy = false; - } - }); - } else { - that.compute(); - that.plot(); - that.busy = false; - } - } - }; - - //animate node positions - if(config.animate) { - this.clickedNode = clickedNode; - this.compute('end'); - //animate the visible subtree only - this.clickedNode = previousClickedNode; - this.fx.animate({ - modes:['linear', 'node-property:width:height'], - duration: 1000, - onComplete: function() { - //animate the parent subtree - that.clickedNode = clickedNode; - //change nodes alpha - graph.nodeList.setDataset(['current', 'end'], { - 'alpha': [0, 1] - }); - GUtil.eachSubgraph(previousClickedNode, function(node) { - node.setData('alpha', 1); - }, "ignore"); - that.fx.animate({ - duration: 500, - modes:['node-property:alpha'], - onComplete: function() { - callback.onComplete(); - } - }); - } - }); - } else { - callback.onComplete(); - } - }, - requestNodes: function(node, onComplete){ - var handler = $.merge(this.controller, onComplete), - levelsToShow = this.config.constrained ? this.config.levelsToShow : Number.MAX_VALUE; - - if (handler.request) { - var leaves = [], d = node._depth; - Graph.Util.eachLevel(node, 0, levelsToShow, function(n){ - if (n.drawn && !Graph.Util.anySubnode(n)) { - leaves.push(n); - n._level = n._depth - d; - if (this.config.constrained) - n._level = levelsToShow - n._level; - - } - }); - this.group.requestNodes(leaves, handler); - } else { - handler.onComplete(); - } - } -}); - -/* - Class: Icicle.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ -$jit.Icicle.Op = new Class({ - - Implements: Graph.Op - -}); - -/* - * Performs operations on group of nodes. - */ -$jit.Icicle.Group = new Class({ - - initialize: function(viz){ - this.viz = viz; - this.canvas = viz.canvas; - this.config = viz.config; - }, - - /* - * Calls the request method on the controller to request a subtree for each node. - */ - requestNodes: function(nodes, controller){ - var counter = 0, len = nodes.length, nodeSelected = {}; - var complete = function(){ - controller.onComplete(); - }; - var viz = this.viz; - if (len == 0) - complete(); - for(var i = 0; i < len; i++) { - nodeSelected[nodes[i].id] = nodes[i]; - controller.request(nodes[i].id, nodes[i]._level, { - onComplete: function(nodeId, data){ - if (data && data.children) { - data.id = nodeId; - viz.op.sum(data, { - type: 'nothing' - }); - } - if (++counter == len) { - Graph.Util.computeLevels(viz.graph, viz.root, 0); - complete(); - } - } - }); - } - } -}); - -/* - Class: Icicle.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ -$jit.Icicle.Plot = new Class({ - Implements: Graph.Plot, - - plot: function(opt, animating){ - opt = opt || this.viz.controller; - var viz = this.viz, - graph = viz.graph, - root = graph.getNode(viz.clickedNode && viz.clickedNode.id || viz.root), - initialDepth = root._depth; - - viz.canvas.clear(); - this.plotTree(root, $.merge(opt, { - 'withLabels': true, - 'hideLabels': false, - 'plotSubtree': function(root, node) { - return !viz.config.constrained || - (node._depth - initialDepth < viz.config.levelsToShow); - } - }), animating); - } -}); - -/* - Class: Icicle.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - - */ -$jit.Icicle.Label = {}; - -/* - Icicle.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ -$jit.Icicle.Label.Native = new Class({ - Implements: Graph.Label.Native, - - renderLabel: function(canvas, node, controller) { - var ctx = canvas.getCtx(), - width = node.getData('width'), - height = node.getData('height'), - size = node.getLabelData('size'), - m = ctx.measureText(node.name); - - // Guess as much as possible if the label will fit in the node - if(height < (size * 1.5) || width < m.width) - return; - - var pos = node.pos.getc(true); - ctx.fillText(node.name, - pos.x + width / 2, - pos.y + height / 2); - } -}); - -/* - Icicle.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - -*/ -$jit.Icicle.Label.SVG = new Class( { - Implements: Graph.Label.SVG, - - initialize: function(viz){ - this.viz = viz; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - */ - placeLabel: function(tag, node, controller){ - var pos = node.pos.getc(true), canvas = this.viz.canvas; - var radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x + radius.width / 2), - y: Math.round(pos.y + radius.height / 2) - }; - tag.setAttribute('x', labelPos.x); - tag.setAttribute('y', labelPos.y); - - controller.onPlaceLabel(tag, node); - } -}); - -/* - Icicle.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - - */ -$jit.Icicle.Label.HTML = new Class( { - Implements: Graph.Label.HTML, - - initialize: function(viz){ - this.viz = viz; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - */ - placeLabel: function(tag, node, controller){ - var pos = node.pos.getc(true), canvas = this.viz.canvas; - var radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x + radius.width / 2), - y: Math.round(pos.y + radius.height / 2) - }; - - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.display = ''; - - controller.onPlaceLabel(tag, node); - } -}); - -/* - Class: Icicle.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'rectangle'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - Icicle.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - - */ -$jit.Icicle.Plot.NodeTypes = new Class( { - 'none': { - 'render': $.empty - }, - - 'rectangle': { - 'render': function(node, canvas, animating) { - var config = this.viz.config; - var offset = config.offset; - var width = node.getData('width'); - var height = node.getData('height'); - var border = node.getData('border'); - var pos = node.pos.getc(true); - var posx = pos.x + offset / 2, posy = pos.y + offset / 2; - var ctx = canvas.getCtx(); - - if(width - offset < 2 || height - offset < 2) return; - - if(config.cushion) { - var color = node.getData('color'); - var lg = ctx.createRadialGradient(posx + (width - offset)/2, - posy + (height - offset)/2, 1, - posx + (width-offset)/2, posy + (height-offset)/2, - width < height? height : width); - var colorGrad = $.rgbToHex($.map($.hexToRgb(color), - function(r) { return r * 0.3 >> 0; })); - lg.addColorStop(0, color); - lg.addColorStop(1, colorGrad); - ctx.fillStyle = lg; - } - - if (border) { - ctx.strokeStyle = border; - ctx.lineWidth = 3; - } - - ctx.fillRect(posx, posy, Math.max(0, width - offset), Math.max(0, height - offset)); - border && ctx.strokeRect(pos.x, pos.y, width, height); - }, - - 'contains': function(node, pos) { - if(this.viz.clickedNode && !$jit.Graph.Util.isDescendantOf(node, this.viz.clickedNode.id)) return false; - var npos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - return this.nodeHelper.rectangle.contains({x: npos.x + width/2, y: npos.y + height/2}, pos, width, height); - } - } -}); - -$jit.Icicle.Plot.EdgeTypes = new Class( { - 'none': $.empty -}); - - - -/* - * File: Layouts.ForceDirected.js - * -*/ - -/* - * Class: Layouts.ForceDirected - * - * Implements a Force Directed Layout. - * - * Implemented By: - * - * - * - * Credits: - * - * Marcus Cobden - * - */ -Layouts.ForceDirected = new Class({ - - getOptions: function(random) { - var s = this.canvas.getSize(); - var w = s.width, h = s.height; - //count nodes - var count = 0; - this.graph.eachNode(function(n) { - count++; - }); - var k2 = w * h / count, k = Math.sqrt(k2); - var l = this.config.levelDistance; - - return { - width: w, - height: h, - tstart: w * 0.1, - nodef: function(x) { return k2 / (x || 1); }, - edgef: function(x) { return /* x * x / k; */ k * (x - l); } - }; - }, - - compute: function(property, incremental) { - var prop = $.splat(property || ['current', 'start', 'end']); - var opt = this.getOptions(); - NodeDim.compute(this.graph, prop, this.config); - this.graph.computeLevels(this.root, 0, "ignore"); - this.graph.eachNode(function(n) { - $.each(prop, function(p) { - var pos = n.getPos(p); - if(pos.equals(Complex.KER)) { - pos.x = opt.width/5 * (Math.random() - 0.5); - pos.y = opt.height/5 * (Math.random() - 0.5); - } - //initialize disp vector - n.disp = {}; - $.each(prop, function(p) { - n.disp[p] = $C(0, 0); - }); - }); - }); - this.computePositions(prop, opt, incremental); - }, - - computePositions: function(property, opt, incremental) { - var times = this.config.iterations, i = 0, that = this; - if(incremental) { - (function iter() { - for(var total=incremental.iter, j=0; j= times) { - incremental.onComplete(); - return; - } - } - incremental.onStep(Math.round(i / (times -1) * 100)); - setTimeout(iter, 1); - })(); - } else { - for(; i < times; i++) { - opt.t = opt.tstart * (1 - i/(times -1)); - this.computePositionStep(property, opt); - } - } - }, - - computePositionStep: function(property, opt) { - var graph = this.graph; - var min = Math.min, max = Math.max; - var dpos = $C(0, 0); - //calculate repulsive forces - graph.eachNode(function(v) { - //initialize disp - $.each(property, function(p) { - v.disp[p].x = 0; v.disp[p].y = 0; - }); - graph.eachNode(function(u) { - if(u.id != v.id) { - $.each(property, function(p) { - var vp = v.getPos(p), up = u.getPos(p); - dpos.x = vp.x - up.x; - dpos.y = vp.y - up.y; - var norm = dpos.norm() || 1; - v.disp[p].$add(dpos - .$scale(opt.nodef(norm) / norm)); - }); - } - }); - }); - //calculate attractive forces - var T = !!graph.getNode(this.root).visited; - graph.eachNode(function(node) { - node.eachAdjacency(function(adj) { - var nodeTo = adj.nodeTo; - if(!!nodeTo.visited === T) { - $.each(property, function(p) { - var vp = node.getPos(p), up = nodeTo.getPos(p); - dpos.x = vp.x - up.x; - dpos.y = vp.y - up.y; - var norm = dpos.norm() || 1; - node.disp[p].$add(dpos.$scale(-opt.edgef(norm) / norm)); - nodeTo.disp[p].$add(dpos.$scale(-1)); - }); - } - }); - node.visited = !T; - }); - //arrange positions to fit the canvas - var t = opt.t, w2 = opt.width / 2, h2 = opt.height / 2; - graph.eachNode(function(u) { - $.each(property, function(p) { - var disp = u.disp[p]; - var norm = disp.norm() || 1; - var p = u.getPos(p); - p.$add($C(disp.x * min(Math.abs(disp.x), t) / norm, - disp.y * min(Math.abs(disp.y), t) / norm)); - p.x = min(w2, max(-w2, p.x)); - p.y = min(h2, max(-h2, p.y)); - }); - }); - } -}); - -/* - * File: ForceDirected.js - */ - -/* - Class: ForceDirected - - A visualization that lays graphs using a Force-Directed layout algorithm. - - Inspired by: - - Force-Directed Drawing Algorithms (Stephen G. Kobourov) - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - Additionally, there are two parameters - - levelDistance - (number) Default's *50*. The natural length desired for the edges. - iterations - (number) Default's *50*. The number of iterations for the spring layout simulation. Depending on the browser's speed you could set this to a more 'interesting' number, like *200*. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. - -*/ - -$jit.ForceDirected = new Class( { - - Implements: [ Loader, Extras, Layouts.ForceDirected ], - - initialize: function(controller) { - var $ForceDirected = $jit.ForceDirected; - - var config = { - iterations: 50, - levelDistance: 50 - }; - - this.controller = this.config = $.merge(Options("Canvas", "Node", "Edge", - "Fx", "Tips", "NodeStyles", "Events", "Navigation", "Controller", "Label"), config, controller); - - var canvasConfig = this.config; - if(canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - if(canvasConfig.background) { - canvasConfig.background = $.merge({ - type: 'Circles' - }, canvasConfig.background); - } - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': true, - 'Node': { - 'selected': false, - 'exist': true, - 'drawn': true - } - }; - this.graph = new Graph(this.graphOptions, this.config.Node, - this.config.Edge); - this.labels = new $ForceDirected.Label[canvasConfig.Label.type](this); - this.fx = new $ForceDirected.Plot(this, $ForceDirected); - this.op = new $ForceDirected.Op(this); - this.json = null; - this.busy = false; - // initialize extras - this.initializeExtras(); - }, - - /* - Method: refresh - - Computes positions and plots the tree. - */ - refresh: function() { - this.compute(); - this.plot(); - }, - - reposition: function() { - this.compute('end'); - }, - -/* - Method: computeIncremental - - Performs the Force Directed algorithm incrementally. - - Description: - - ForceDirected algorithms can perform many computations and lead to JavaScript taking too much time to complete. - This method splits the algorithm into smaller parts allowing the user to track the evolution of the algorithm and - avoiding browser messages such as "This script is taking too long to complete". - - Parameters: - - opt - (object) The object properties are described below - - iter - (number) Default's *20*. Split the algorithm into pieces of _iter_ iterations. For example, if the _iterations_ configuration property - of your class is 100, then you could set _iter_ to 20 to split the main algorithm into 5 smaller pieces. - - property - (string) Default's *end*. Whether to update starting, current or ending node positions. Possible values are 'end', 'start', 'current'. - You can also set an array of these properties. If you'd like to keep the current node positions but to perform these - computations for final animation positions then you can just choose 'end'. - - onStep - (function) A callback function called when each "small part" of the algorithm completed. This function gets as first formal - parameter a percentage value. - - onComplete - A callback function called when the algorithm completed. - - Example: - - In this example I calculate the end positions and then animate the graph to those positions - - (start code js) - var fd = new $jit.ForceDirected(...); - fd.computeIncremental({ - iter: 20, - property: 'end', - onStep: function(perc) { - Log.write("loading " + perc + "%"); - }, - onComplete: function() { - Log.write("done"); - fd.animate(); - } - }); - (end code) - - In this example I calculate all positions and (re)plot the graph - - (start code js) - var fd = new ForceDirected(...); - fd.computeIncremental({ - iter: 20, - property: ['end', 'start', 'current'], - onStep: function(perc) { - Log.write("loading " + perc + "%"); - }, - onComplete: function() { - Log.write("done"); - fd.plot(); - } - }); - (end code) - - */ - computeIncremental: function(opt) { - opt = $.merge( { - iter: 20, - property: 'end', - onStep: $.empty, - onComplete: $.empty - }, opt || {}); - - this.config.onBeforeCompute(this.graph.getNode(this.root)); - this.compute(opt.property, opt); - }, - - /* - Method: plot - - Plots the ForceDirected graph. This is a shortcut to *fx.plot*. - */ - plot: function() { - this.fx.plot(); - }, - - /* - Method: animate - - Animates the graph from the current positions to the 'end' node positions. - */ - animate: function(opt) { - this.fx.animate($.merge( { - modes: [ 'linear' ] - }, opt || {})); - } -}); - -$jit.ForceDirected.$extend = true; - -(function(ForceDirected) { - - /* - Class: ForceDirected.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - ForceDirected.Op = new Class( { - - Implements: Graph.Op - - }); - - /* - Class: ForceDirected.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - ForceDirected.Plot = new Class( { - - Implements: Graph.Plot - - }); - - /* - Class: ForceDirected.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - - */ - ForceDirected.Label = {}; - - /* - ForceDirected.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - ForceDirected.Label.Native = new Class( { - Implements: Graph.Label.Native - }); - - /* - ForceDirected.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - ForceDirected.Label.SVG = new Class( { - Implements: Graph.Label.SVG, - - initialize: function(viz) { - this.viz = viz; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x * sx + ox + radius.width / 2), - y: Math.round(pos.y * sy + oy + radius.height / 2) - }; - tag.setAttribute('x', labelPos.x); - tag.setAttribute('y', labelPos.y); - - controller.onPlaceLabel(tag, node); - } - }); - - /* - ForceDirected.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - - */ - ForceDirected.Label.HTML = new Class( { - Implements: Graph.Label.HTML, - - initialize: function(viz) { - this.viz = viz; - }, - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x * sx + ox + radius.width / 2), - y: Math.round(pos.y * sy + oy + radius.height / 2) - }; - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.display = this.fitsInCanvas(labelPos, canvas) ? '' : 'none'; - - controller.onPlaceLabel(tag, node); - } - }); - - /* - Class: ForceDirected.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'circle', 'triangle', 'rectangle', 'star', 'ellipse' and 'square'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - ForceDirected.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - - */ - ForceDirected.Plot.NodeTypes = new Class({ - 'none': { - 'render': $.empty, - 'contains': $.lambda(false) - }, - 'circle': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.circle.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.circle.contains(npos, pos, dim); - } - }, - 'ellipse': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - this.nodeHelper.ellipse.render('fill', pos, width, height, canvas); - }, - // TODO(nico): be more precise... - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - return this.nodeHelper.ellipse.contains(npos, pos, width, height); - } - }, - 'square': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.square.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.square.contains(npos, pos, dim); - } - }, - 'rectangle': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - this.nodeHelper.rectangle.render('fill', pos, width, height, canvas); - }, - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - return this.nodeHelper.rectangle.contains(npos, pos, width, height); - } - }, - 'triangle': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.triangle.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos) { - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.triangle.contains(npos, pos, dim); - } - }, - 'star': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.star.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos) { - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.star.contains(npos, pos, dim); - } - } - }); - - /* - Class: ForceDirected.Plot.EdgeTypes - - This class contains a list of built-in types. - Edge types implemented are 'none', 'line' and 'arrow'. - - You can add your custom edge types, customizing your visualization to the extreme. - - Example: - - (start code js) - ForceDirected.Plot.EdgeTypes.implement({ - 'mySpecialType': { - 'render': function(adj, canvas) { - //print your custom edge to canvas - }, - //optional - 'contains': function(adj, pos) { - //return true if pos is inside the arc or false otherwise - } - } - }); - (end code) - - */ - ForceDirected.Plot.EdgeTypes = new Class({ - 'none': $.empty, - 'line': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - this.edgeHelper.line.render(from, to, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - return this.edgeHelper.line.contains(from, to, pos, this.edge.epsilon); - } - }, - 'arrow': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - dim = adj.getData('dim'), - direction = adj.data.$direction, - inv = (direction && direction.length>1 && direction[0] != adj.nodeFrom.id); - this.edgeHelper.arrow.render(from, to, dim, inv, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - return this.edgeHelper.arrow.contains(from, to, pos, this.edge.epsilon); - } - } - }); - -})($jit.ForceDirected); - - -/* - * File: Treemap.js - * -*/ - -$jit.TM = {}; - -var TM = $jit.TM; - -$jit.TM.$extend = true; - -/* - Class: TM.Base - - Abstract class providing base functionality for , and visualizations. - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - Additionally, there are other parameters and some default values changed - - orientation - (string) Default's *h*. Whether to set horizontal or vertical layouts. Possible values are 'h' and 'v'. - titleHeight - (number) Default's *13*. The height of the title rectangle for inner (non-leaf) nodes. - offset - (number) Default's *2*. Boxes offset. - constrained - (boolean) Default's *false*. Whether to show the entire tree when loaded or just the number of levels specified by _levelsToShow_. - levelsToShow - (number) Default's *3*. The number of levels to show for a subtree. This number is relative to the selected node. - animate - (boolean) Default's *false*. Whether to animate transitions. - Node.type - Described in . Default's *rectangle*. - duration - Described in . Default's *700*. - fps - Described in . Default's *45*. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. - - Inspired by: - - Squarified Treemaps (Mark Bruls, Kees Huizing, and Jarke J. van Wijk) - - Tree visualization with tree-maps: 2-d space-filling approach (Ben Shneiderman) - - Note: - - This visualization was built and engineered from scratch, taking only the paper as inspiration, and only shares some features with the visualization described in the paper. - -*/ -TM.Base = { - layout: { - orientation: "h", - vertical: function(){ - return this.orientation == "v"; - }, - horizontal: function(){ - return this.orientation == "h"; - }, - change: function(){ - this.orientation = this.vertical()? "h" : "v"; - } - }, - - initialize: function(controller){ - var config = { - orientation: "h", - titleHeight: 13, - offset: 2, - levelsToShow: 0, - constrained: false, - animate: false, - Node: { - type: 'rectangle', - overridable: true, - //we all know why this is not zero, - //right, Firefox? - width: 3, - height: 3, - color: '#444' - }, - Label: { - textAlign: 'center', - textBaseline: 'top' - }, - Edge: { - type: 'none' - }, - duration: 700, - fps: 45 - }; - - this.controller = this.config = $.merge(Options("Canvas", "Node", "Edge", - "Fx", "Controller", "Tips", "NodeStyles", "Events", "Navigation", "Label"), config, controller); - this.layout.orientation = this.config.orientation; - - var canvasConfig = this.config; - if (canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - if(canvasConfig.background) { - canvasConfig.background = $.merge({ - type: 'Circles' - }, canvasConfig.background); - } - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': true, - 'Node': { - 'selected': false, - 'exist': true, - 'drawn': true - } - }; - this.graph = new Graph(this.graphOptions, this.config.Node, - this.config.Edge); - this.labels = new TM.Label[canvasConfig.Label.type](this); - this.fx = new TM.Plot(this); - this.op = new TM.Op(this); - this.group = new TM.Group(this); - this.geom = new TM.Geom(this); - this.clickedNode = null; - this.busy = false; - // initialize extras - this.initializeExtras(); - }, - - /* - Method: refresh - - Computes positions and plots the tree. - */ - refresh: function(){ - if(this.busy) return; - this.busy = true; - var that = this; - if(this.config.animate) { - this.compute('end'); - this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode - && this.clickedNode.id || this.root)); - this.fx.animate($.merge(this.config, { - modes: ['linear', 'node-property:width:height'], - onComplete: function() { - that.busy = false; - } - })); - } else { - var labelType = this.config.Label.type; - if(labelType != 'Native') { - var that = this; - this.graph.eachNode(function(n) { that.labels.hideLabel(n, false); }); - } - this.busy = false; - this.compute(); - this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode - && this.clickedNode.id || this.root)); - this.plot(); - } - }, - - /* - Method: plot - - Plots the TreeMap. This is a shortcut to *fx.plot*. - - */ - plot: function(){ - this.fx.plot(); - }, - - /* - Method: leaf - - Returns whether the node is a leaf. - - Parameters: - - n - (object) A . - - */ - leaf: function(n){ - return n.getSubnodes([ - 1, 1 - ], "ignore").length == 0; - }, - - /* - Method: enter - - Sets the node as root. - - Parameters: - - n - (object) A . - - */ - enter: function(n){ - if(this.busy) return; - this.busy = true; - - var that = this, - config = this.config, - graph = this.graph, - clickedNode = n, - previousClickedNode = this.clickedNode; - - var callback = { - onComplete: function() { - //ensure that nodes are shown for that level - if(config.levelsToShow > 0) { - that.geom.setRightLevelToShow(n); - } - //compute positions of newly inserted nodes - if(config.levelsToShow > 0 || config.request) that.compute(); - if(config.animate) { - //fade nodes - graph.nodeList.setData('alpha', 0, 'end'); - n.eachSubgraph(function(n) { - n.setData('alpha', 1, 'end'); - }, "ignore"); - that.fx.animate({ - duration: 500, - modes:['node-property:alpha'], - onComplete: function() { - //compute end positions - that.clickedNode = clickedNode; - that.compute('end'); - //animate positions - //TODO(nico) commenting this line didn't seem to throw errors... - that.clickedNode = previousClickedNode; - that.fx.animate({ - modes:['linear', 'node-property:width:height'], - duration: 1000, - onComplete: function() { - that.busy = false; - //TODO(nico) check comment above - that.clickedNode = clickedNode; - } - }); - } - }); - } else { - that.busy = false; - that.clickedNode = n; - that.refresh(); - } - } - }; - if(config.request) { - this.requestNodes(clickedNode, callback); - } else { - callback.onComplete(); - } - }, - - /* - Method: out - - Sets the parent node of the current selected node as root. - - */ - out: function(){ - if(this.busy) return; - this.busy = true; - this.events.hoveredNode = false; - var that = this, - config = this.config, - graph = this.graph, - parents = graph.getNode(this.clickedNode - && this.clickedNode.id || this.root).getParents(), - parent = parents[0], - clickedNode = parent, - previousClickedNode = this.clickedNode; - - //if no parents return - if(!parent) { - this.busy = false; - return; - } - //final plot callback - callback = { - onComplete: function() { - that.clickedNode = parent; - if(config.request) { - that.requestNodes(parent, { - onComplete: function() { - that.compute(); - that.plot(); - that.busy = false; - } - }); - } else { - that.compute(); - that.plot(); - that.busy = false; - } - } - }; - //prune tree - if (config.levelsToShow > 0) - this.geom.setRightLevelToShow(parent); - //animate node positions - if(config.animate) { - this.clickedNode = clickedNode; - this.compute('end'); - //animate the visible subtree only - this.clickedNode = previousClickedNode; - this.fx.animate({ - modes:['linear', 'node-property:width:height'], - duration: 1000, - onComplete: function() { - //animate the parent subtree - that.clickedNode = clickedNode; - //change nodes alpha - graph.eachNode(function(n) { - n.setDataset(['current', 'end'], { - 'alpha': [0, 1] - }); - }, "ignore"); - previousClickedNode.eachSubgraph(function(node) { - node.setData('alpha', 1); - }, "ignore"); - that.fx.animate({ - duration: 500, - modes:['node-property:alpha'], - onComplete: function() { - callback.onComplete(); - } - }); - } - }); - } else { - callback.onComplete(); - } - }, - - requestNodes: function(node, onComplete){ - var handler = $.merge(this.controller, onComplete), - lev = this.config.levelsToShow; - if (handler.request) { - var leaves = [], d = node._depth; - node.eachLevel(0, lev, function(n){ - var nodeLevel = lev - (n._depth - d); - if (n.drawn && !n.anySubnode() && nodeLevel > 0) { - leaves.push(n); - n._level = nodeLevel; - } - }); - this.group.requestNodes(leaves, handler); - } else { - handler.onComplete(); - } - } -}; - -/* - Class: TM.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ -TM.Op = new Class({ - Implements: Graph.Op, - - initialize: function(viz){ - this.viz = viz; - } -}); - -//extend level methods of Graph.Geom -TM.Geom = new Class({ - Implements: Graph.Geom, - - getRightLevelToShow: function() { - return this.viz.config.levelsToShow; - }, - - setRightLevelToShow: function(node) { - var level = this.getRightLevelToShow(), - fx = this.viz.labels; - node.eachLevel(0, level+1, function(n) { - var d = n._depth - node._depth; - if(d > level) { - n.drawn = false; - n.exist = false; - n.ignore = true; - fx.hideLabel(n, false); - } else { - n.drawn = true; - n.exist = true; - delete n.ignore; - } - }); - node.drawn = true; - delete node.ignore; - } -}); - -/* - -Performs operations on group of nodes. - -*/ -TM.Group = new Class( { - - initialize: function(viz){ - this.viz = viz; - this.canvas = viz.canvas; - this.config = viz.config; - }, - - /* - - Calls the request method on the controller to request a subtree for each node. - */ - requestNodes: function(nodes, controller){ - var counter = 0, len = nodes.length, nodeSelected = {}; - var complete = function(){ - controller.onComplete(); - }; - var viz = this.viz; - if (len == 0) - complete(); - for ( var i = 0; i < len; i++) { - nodeSelected[nodes[i].id] = nodes[i]; - controller.request(nodes[i].id, nodes[i]._level, { - onComplete: function(nodeId, data){ - if (data && data.children) { - data.id = nodeId; - viz.op.sum(data, { - type: 'nothing' - }); - } - if (++counter == len) { - viz.graph.computeLevels(viz.root, 0); - complete(); - } - } - }); - } - } -}); - -/* - Class: TM.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ -TM.Plot = new Class({ - - Implements: Graph.Plot, - - initialize: function(viz){ - this.viz = viz; - this.config = viz.config; - this.node = this.config.Node; - this.edge = this.config.Edge; - this.animation = new Animation; - this.nodeTypes = new TM.Plot.NodeTypes; - this.edgeTypes = new TM.Plot.EdgeTypes; - this.labels = viz.labels; - }, - - plot: function(opt, animating){ - var viz = this.viz, - graph = viz.graph; - viz.canvas.clear(); - this.plotTree(graph.getNode(viz.clickedNode && viz.clickedNode.id || viz.root), $.merge(viz.config, opt || {}, { - 'withLabels': true, - 'hideLabels': false, - 'plotSubtree': function(n, ch){ - return n.anySubnode("exist"); - } - }), animating); - } -}); - -/* - Class: TM.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - -*/ -TM.Label = {}; - -/* - TM.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - -*/ -TM.Label.Native = new Class({ - Implements: Graph.Label.Native, - - initialize: function(viz) { - this.config = viz.config; - this.leaf = viz.leaf; - }, - - renderLabel: function(canvas, node, controller){ - if(!this.leaf(node) && !this.config.titleHeight) return; - var pos = node.pos.getc(true), - ctx = canvas.getCtx(), - width = node.getData('width'), - height = node.getData('height'), - x = pos.x + width/2, - y = pos.y; - - ctx.fillText(node.name, x, y, width); - } -}); - -/* - TM.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - -*/ -TM.Label.SVG = new Class( { - Implements: Graph.Label.SVG, - - initialize: function(viz){ - this.viz = viz; - this.leaf = viz.leaf; - this.config = viz.config; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller){ - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x * sx + ox + radius.width / 2), - y: Math.round(pos.y * sy + oy + radius.height / 2) - }; - tag.setAttribute('x', labelPos.x); - tag.setAttribute('y', labelPos.y); - - if(!this.leaf(node) && !this.config.titleHeight) { - tag.style.display = 'none'; - } - controller.onPlaceLabel(tag, node); - } -}); - -/* - TM.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - -*/ -TM.Label.HTML = new Class( { - Implements: Graph.Label.HTML, - - initialize: function(viz){ - this.viz = viz; - this.leaf = viz.leaf; - this.config = viz.config; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller){ - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x * sx + ox + radius.width / 2), - y: Math.round(pos.y * sy + oy + radius.height / 2) - }; - - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.width = node.getData('width') * sx + 'px'; - style.height = node.getData('height') * sy + 'px'; - style.zIndex = node._depth * 100; - style.display = ''; - - if(!this.leaf(node) && !this.config.titleHeight) { - tag.style.display = 'none'; - } - controller.onPlaceLabel(tag, node); - } -}); - -/* - Class: TM.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'rectangle'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - TM.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - -*/ -TM.Plot.NodeTypes = new Class( { - 'none': { - 'render': $.empty - }, - - 'rectangle': { - 'render': function(node, canvas, animating){ - var leaf = this.viz.leaf(node), - config = this.config, - offst = config.offset, - titleHeight = config.titleHeight, - pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'), - border = node.getData('border'), - ctx = canvas.getCtx(), - posx = pos.x + offst / 2, - posy = pos.y + offst / 2; - if(width <= offst || height <= offst) return; - if (leaf) { - if(config.cushion) { - var lg = ctx.createRadialGradient(posx + (width-offst)/2, posy + (height-offst)/2, 1, - posx + (width-offst)/2, posy + (height-offst)/2, width < height? height : width); - var color = node.getData('color'); - var colorGrad = $.rgbToHex($.map($.hexToRgb(color), - function(r) { return r * 0.2 >> 0; })); - lg.addColorStop(0, color); - lg.addColorStop(1, colorGrad); - ctx.fillStyle = lg; - } - ctx.fillRect(posx, posy, width - offst, height - offst); - if(border) { - ctx.save(); - ctx.strokeStyle = border; - ctx.strokeRect(posx, posy, width - offst, height - offst); - ctx.restore(); - } - } else if(titleHeight > 0){ - ctx.fillRect(pos.x + offst / 2, pos.y + offst / 2, width - offst, - titleHeight - offst); - if(border) { - ctx.save(); - ctx.strokeStyle = border; - ctx.strokeRect(pos.x + offst / 2, pos.y + offst / 2, width - offst, - height - offst); - ctx.restore(); - } - } - }, - 'contains': function(node, pos) { - if(this.viz.clickedNode && !node.isDescendantOf(this.viz.clickedNode.id) || node.ignore) return false; - var npos = node.pos.getc(true), - width = node.getData('width'), - leaf = this.viz.leaf(node), - height = leaf? node.getData('height') : this.config.titleHeight; - return this.nodeHelper.rectangle.contains({x: npos.x + width/2, y: npos.y + height/2}, pos, width, height); - } - } -}); - -TM.Plot.EdgeTypes = new Class( { - 'none': $.empty -}); - -/* - Class: TM.SliceAndDice - - A slice and dice TreeMap visualization. - - Implements: - - All methods and properties. -*/ -TM.SliceAndDice = new Class( { - Implements: [ - Loader, Extras, TM.Base, Layouts.TM.SliceAndDice - ] -}); - -/* - Class: TM.Squarified - - A squarified TreeMap visualization. - - Implements: - - All methods and properties. -*/ -TM.Squarified = new Class( { - Implements: [ - Loader, Extras, TM.Base, Layouts.TM.Squarified - ] -}); - -/* - Class: TM.Strip - - A strip TreeMap visualization. - - Implements: - - All methods and properties. -*/ -TM.Strip = new Class( { - Implements: [ - Loader, Extras, TM.Base, Layouts.TM.Strip - ] -}); - - -/* - * File: RGraph.js - * - */ - -/* - Class: RGraph - - A radial graph visualization with advanced animations. - - Inspired by: - - Animated Exploration of Dynamic Graphs with Radial Layout (Ka-Ping Yee, Danyel Fisher, Rachna Dhamija, Marti Hearst) - - Note: - - This visualization was built and engineered from scratch, taking only the paper as inspiration, and only shares some features with the visualization described in the paper. - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - Additionally, there are other parameters and some default values changed - - interpolation - (string) Default's *linear*. Describes the way nodes are interpolated. Possible values are 'linear' and 'polar'. - levelDistance - (number) Default's *100*. The distance between levels of the tree. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. -*/ - -$jit.RGraph = new Class( { - - Implements: [ - Loader, Extras, Layouts.Radial - ], - - initialize: function(controller){ - var $RGraph = $jit.RGraph; - - var config = { - interpolation: 'linear', - levelDistance: 100 - }; - - this.controller = this.config = $.merge(Options("Canvas", "Node", "Edge", - "Fx", "Controller", "Tips", "NodeStyles", "Events", "Navigation", "Label"), config, controller); - - var canvasConfig = this.config; - if(canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - if(canvasConfig.background) { - canvasConfig.background = $.merge({ - type: 'Circles' - }, canvasConfig.background); - } - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': false, - 'Node': { - 'selected': false, - 'exist': true, - 'drawn': true - } - }; - this.graph = new Graph(this.graphOptions, this.config.Node, - this.config.Edge); - this.labels = new $RGraph.Label[canvasConfig.Label.type](this); - this.fx = new $RGraph.Plot(this, $RGraph); - this.op = new $RGraph.Op(this); - this.json = null; - this.root = null; - this.busy = false; - this.parent = false; - // initialize extras - this.initializeExtras(); - }, - - /* - - createLevelDistanceFunc - - Returns the levelDistance function used for calculating a node distance - to its origin. This function returns a function that is computed - per level and not per node, such that all nodes with the same depth will have the - same distance to the origin. The resulting function gets the - parent node as parameter and returns a float. - - */ - createLevelDistanceFunc: function(){ - var ld = this.config.levelDistance; - return function(elem){ - return (elem._depth + 1) * ld; - }; - }, - - /* - Method: refresh - - Computes positions and plots the tree. - - */ - refresh: function(){ - this.compute(); - this.plot(); - }, - - reposition: function(){ - this.compute('end'); - }, - - /* - Method: plot - - Plots the RGraph. This is a shortcut to *fx.plot*. - */ - plot: function(){ - this.fx.plot(); - }, - /* - getNodeAndParentAngle - - Returns the _parent_ of the given node, also calculating its angle span. - */ - getNodeAndParentAngle: function(id){ - var theta = false; - var n = this.graph.getNode(id); - var ps = n.getParents(); - var p = (ps.length > 0)? ps[0] : false; - if (p) { - var posParent = p.pos.getc(), posChild = n.pos.getc(); - var newPos = posParent.add(posChild.scale(-1)); - theta = Math.atan2(newPos.y, newPos.x); - if (theta < 0) - theta += 2 * Math.PI; - } - return { - parent: p, - theta: theta - }; - }, - /* - tagChildren - - Enumerates the children in order to maintain child ordering (second constraint of the paper). - */ - tagChildren: function(par, id){ - if (par.angleSpan) { - var adjs = []; - par.eachAdjacency(function(elem){ - adjs.push(elem.nodeTo); - }, "ignore"); - var len = adjs.length; - for ( var i = 0; i < len && id != adjs[i].id; i++) - ; - for ( var j = (i + 1) % len, k = 0; id != adjs[j].id; j = (j + 1) % len) { - adjs[j].dist = k++; - } - } - }, - /* - Method: onClick - - Animates the to center the node specified by *id*. - - Parameters: - - id - A id. - opt - (optional|object) An object containing some extra properties described below - hideLabels - (boolean) Default's *true*. Hide labels when performing the animation. - - Example: - - (start code js) - rgraph.onClick('someid'); - //or also... - rgraph.onClick('someid', { - hideLabels: false - }); - (end code) - - */ - onClick: function(id, opt){ - if (this.root != id && !this.busy) { - this.busy = true; - this.root = id; - that = this; - this.controller.onBeforeCompute(this.graph.getNode(id)); - var obj = this.getNodeAndParentAngle(id); - - // second constraint - this.tagChildren(obj.parent, id); - this.parent = obj.parent; - this.compute('end'); - - // first constraint - var thetaDiff = obj.theta - obj.parent.endPos.theta; - this.graph.eachNode(function(elem){ - elem.endPos.set(elem.endPos.getp().add($P(thetaDiff, 0))); - }); - - var mode = this.config.interpolation; - opt = $.merge( { - onComplete: $.empty - }, opt || {}); - - this.fx.animate($.merge( { - hideLabels: true, - modes: [ - mode - ] - }, opt, { - onComplete: function(){ - that.busy = false; - opt.onComplete(); - } - })); - } - } -}); - -$jit.RGraph.$extend = true; - -(function(RGraph){ - - /* - Class: RGraph.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - RGraph.Op = new Class( { - - Implements: Graph.Op - - }); - - /* - Class: RGraph.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - RGraph.Plot = new Class( { - - Implements: Graph.Plot - - }); - - /* - Object: RGraph.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - - */ - RGraph.Label = {}; - - /* - RGraph.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - RGraph.Label.Native = new Class( { - Implements: Graph.Label.Native - }); - - /* - RGraph.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - RGraph.Label.SVG = new Class( { - Implements: Graph.Label.SVG, - - initialize: function(viz){ - this.viz = viz; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller){ - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x * sx + ox + radius.width / 2), - y: Math.round(pos.y * sy + oy + radius.height / 2) - }; - tag.setAttribute('x', labelPos.x); - tag.setAttribute('y', labelPos.y); - - controller.onPlaceLabel(tag, node); - } - }); - - /* - RGraph.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - - */ - RGraph.Label.HTML = new Class( { - Implements: Graph.Label.HTML, - - initialize: function(viz){ - this.viz = viz; - }, - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller){ - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(); - var labelPos = { - x: Math.round(pos.x * sx + ox + radius.width / 2), - y: Math.round(pos.y * sy + oy + radius.height / 2) - }; - - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.display = this.fitsInCanvas(labelPos, canvas)? '' : 'none'; - - controller.onPlaceLabel(tag, node); - } - }); - - /* - Class: RGraph.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'circle', 'triangle', 'rectangle', 'star', 'ellipse' and 'square'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - RGraph.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - - */ - RGraph.Plot.NodeTypes = new Class({ - 'none': { - 'render': $.empty, - 'contains': $.lambda(false) - }, - 'circle': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.circle.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.circle.contains(npos, pos, dim); - } - }, - 'ellipse': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - this.nodeHelper.ellipse.render('fill', pos, width, height, canvas); - }, - // TODO(nico): be more precise... - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - return this.nodeHelper.ellipse.contains(npos, pos, width, height); - } - }, - 'square': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.square.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.square.contains(npos, pos, dim); - } - }, - 'rectangle': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - this.nodeHelper.rectangle.render('fill', pos, width, height, canvas); - }, - 'contains': function(node, pos){ - var npos = node.pos.getc(true), - width = node.getData('width'), - height = node.getData('height'); - return this.nodeHelper.rectangle.contains(npos, pos, width, height); - } - }, - 'triangle': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.triangle.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos) { - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.triangle.contains(npos, pos, dim); - } - }, - 'star': { - 'render': function(node, canvas){ - var pos = node.pos.getc(true), - dim = node.getData('dim'); - this.nodeHelper.star.render('fill', pos, dim, canvas); - }, - 'contains': function(node, pos) { - var npos = node.pos.getc(true), - dim = node.getData('dim'); - return this.nodeHelper.star.contains(npos, pos, dim); - } - } - }); - - /* - Class: RGraph.Plot.EdgeTypes - - This class contains a list of built-in types. - Edge types implemented are 'none', 'line' and 'arrow'. - - You can add your custom edge types, customizing your visualization to the extreme. - - Example: - - (start code js) - RGraph.Plot.EdgeTypes.implement({ - 'mySpecialType': { - 'render': function(adj, canvas) { - //print your custom edge to canvas - }, - //optional - 'contains': function(adj, pos) { - //return true if pos is inside the arc or false otherwise - } - } - }); - (end code) - - */ - RGraph.Plot.EdgeTypes = new Class({ - 'none': $.empty, - 'line': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - this.edgeHelper.line.render(from, to, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - return this.edgeHelper.line.contains(from, to, pos, this.edge.epsilon); - } - }, - 'arrow': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - dim = adj.getData('dim'), - direction = adj.data.$direction, - inv = (direction && direction.length>1 && direction[0] != adj.nodeFrom.id); - this.edgeHelper.arrow.render(from, to, dim, inv, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true); - return this.edgeHelper.arrow.contains(from, to, pos, this.edge.epsilon); - } - } - }); - -})($jit.RGraph); - - -/* - * File: Hypertree.js - * -*/ - -/* - Complex - - A multi-purpose Complex Class with common methods. Extended for the Hypertree. - -*/ -/* - moebiusTransformation - - Calculates a moebius transformation for this point / complex. - For more information go to: - http://en.wikipedia.org/wiki/Moebius_transformation. - - Parameters: - - c - An initialized Complex instance representing a translation Vector. -*/ - -Complex.prototype.moebiusTransformation = function(c) { - var num = this.add(c); - var den = c.$conjugate().$prod(this); - den.x++; - return num.$div(den); -}; - -/* - moebiusTransformation - - Calculates a moebius transformation for the hyperbolic tree. - - - - Parameters: - - graph - A instance. - pos - A . - prop - A property array. - theta - Rotation angle. - startPos - _optional_ start position. -*/ -Graph.Util.moebiusTransformation = function(graph, pos, prop, startPos, flags) { - this.eachNode(graph, function(elem) { - for ( var i = 0; i < prop.length; i++) { - var p = pos[i].scale(-1), property = startPos ? startPos : prop[i]; - elem.getPos(prop[i]).set(elem.getPos(property).getc().moebiusTransformation(p)); - } - }, flags); -}; - -/* - Class: Hypertree - - A Hyperbolic Tree/Graph visualization. - - Inspired by: - - A Focus+Context Technique Based on Hyperbolic Geometry for Visualizing Large Hierarchies (John Lamping, Ramana Rao, and Peter Pirolli). - - - Note: - - This visualization was built and engineered from scratch, taking only the paper as inspiration, and only shares some features with the Hypertree described in the paper. - - Implements: - - All methods - - Constructor Options: - - Inherits options from - - - - - - - - - - - - - - - - - - - - - Additionally, there are other parameters and some default values changed - - radius - (string|number) Default's *auto*. The radius of the disc to plot the in. 'auto' will take the smaller value from the width and height canvas dimensions. You can also set this to a custom value, for example *250*. - offset - (number) Default's *0*. A number in the range [0, 1) that will be substracted to each node position to make a more compact . This will avoid placing nodes too far from each other when a there's a selected node. - fps - Described in . It's default value has been changed to *35*. - duration - Described in . It's default value has been changed to *1500*. - Edge.type - Described in . It's default value has been changed to *hyperline*. - - Instance Properties: - - canvas - Access a instance. - graph - Access a instance. - op - Access a instance. - fx - Access a instance. - labels - Access a interface implementation. - -*/ - -$jit.Hypertree = new Class( { - - Implements: [ Loader, Extras, Layouts.Radial ], - - initialize: function(controller) { - var $Hypertree = $jit.Hypertree; - - var config = { - radius: "auto", - offset: 0, - Edge: { - type: 'hyperline' - }, - duration: 1500, - fps: 35 - }; - this.controller = this.config = $.merge(Options("Canvas", "Node", "Edge", - "Fx", "Tips", "NodeStyles", "Events", "Navigation", "Controller", "Label"), config, controller); - - var canvasConfig = this.config; - if(canvasConfig.useCanvas) { - this.canvas = canvasConfig.useCanvas; - this.config.labelContainer = this.canvas.id + '-label'; - } else { - if(canvasConfig.background) { - canvasConfig.background = $.merge({ - type: 'Circles' - }, canvasConfig.background); - } - this.canvas = new Canvas(this, canvasConfig); - this.config.labelContainer = (typeof canvasConfig.injectInto == 'string'? canvasConfig.injectInto : canvasConfig.injectInto.id) + '-label'; - } - - this.graphOptions = { - 'complex': false, - 'Node': { - 'selected': false, - 'exist': true, - 'drawn': true - } - }; - this.graph = new Graph(this.graphOptions, this.config.Node, - this.config.Edge); - this.labels = new $Hypertree.Label[canvasConfig.Label.type](this); - this.fx = new $Hypertree.Plot(this, $Hypertree); - this.op = new $Hypertree.Op(this); - this.json = null; - this.root = null; - this.busy = false; - // initialize extras - this.initializeExtras(); - }, - - /* - - createLevelDistanceFunc - - Returns the levelDistance function used for calculating a node distance - to its origin. This function returns a function that is computed - per level and not per node, such that all nodes with the same depth will have the - same distance to the origin. The resulting function gets the - parent node as parameter and returns a float. - - */ - createLevelDistanceFunc: function() { - // get max viz. length. - var r = this.getRadius(); - // get max depth. - var depth = 0, max = Math.max, config = this.config; - this.graph.eachNode(function(node) { - depth = max(node._depth, depth); - }, "ignore"); - depth++; - // node distance generator - var genDistFunc = function(a) { - return function(node) { - node.scale = r; - var d = node._depth + 1; - var acum = 0, pow = Math.pow; - while (d) { - acum += pow(a, d--); - } - return acum - config.offset; - }; - }; - // estimate better edge length. - for ( var i = 0.51; i <= 1; i += 0.01) { - var valSeries = (1 - Math.pow(i, depth)) / (1 - i); - if (valSeries >= 2) { return genDistFunc(i - 0.01); } - } - return genDistFunc(0.75); - }, - - /* - Method: getRadius - - Returns the current radius of the visualization. If *config.radius* is *auto* then it - calculates the radius by taking the smaller size of the widget. - - See also: - - - - */ - getRadius: function() { - var rad = this.config.radius; - if (rad !== "auto") { return rad; } - var s = this.canvas.getSize(); - return Math.min(s.width, s.height) / 2; - }, - - /* - Method: refresh - - Computes positions and plots the tree. - - Parameters: - - reposition - (optional|boolean) Set this to *true* to force all positions (current, start, end) to match. - - */ - refresh: function(reposition) { - if (reposition) { - this.reposition(); - this.graph.eachNode(function(node) { - node.startPos.rho = node.pos.rho = node.endPos.rho; - node.startPos.theta = node.pos.theta = node.endPos.theta; - }); - } else { - this.compute(); - } - this.plot(); - }, - - /* - reposition - - Computes nodes' positions and restores the tree to its previous position. - - For calculating nodes' positions the root must be placed on its origin. This method does this - and then attemps to restore the hypertree to its previous position. - - */ - reposition: function() { - this.compute('end'); - var vector = this.graph.getNode(this.root).pos.getc().scale(-1); - Graph.Util.moebiusTransformation(this.graph, [ vector ], [ 'end' ], - 'end', "ignore"); - this.graph.eachNode(function(node) { - if (node.ignore) { - node.endPos.rho = node.pos.rho; - node.endPos.theta = node.pos.theta; - } - }); - }, - - /* - Method: plot - - Plots the . This is a shortcut to *fx.plot*. - - */ - plot: function() { - this.fx.plot(); - }, - - /* - Method: onClick - - Animates the to center the node specified by *id*. - - Parameters: - - id - A id. - opt - (optional|object) An object containing some extra properties described below - hideLabels - (boolean) Default's *true*. Hide labels when performing the animation. - - Example: - - (start code js) - ht.onClick('someid'); - //or also... - ht.onClick('someid', { - hideLabels: false - }); - (end code) - - */ - onClick: function(id, opt) { - var pos = this.graph.getNode(id).pos.getc(true); - this.move(pos, opt); - }, - - /* - Method: move - - Translates the tree to the given position. - - Parameters: - - pos - (object) A *x, y* coordinate object where x, y in [0, 1), to move the tree to. - opt - This object has been defined in - - Example: - - (start code js) - ht.move({ x: 0, y: 0.7 }, { - hideLabels: false - }); - (end code) - - */ - move: function(pos, opt) { - var versor = $C(pos.x, pos.y); - if (this.busy === false && versor.norm() < 1) { - this.busy = true; - var root = this.graph.getClosestNodeToPos(versor), that = this; - this.graph.computeLevels(root.id, 0); - this.controller.onBeforeCompute(root); - opt = $.merge( { - onComplete: $.empty - }, opt || {}); - this.fx.animate($.merge( { - modes: [ 'moebius' ], - hideLabels: true - }, opt, { - onComplete: function() { - that.busy = false; - opt.onComplete(); - } - }), versor); - } - } -}); - -$jit.Hypertree.$extend = true; - -(function(Hypertree) { - - /* - Class: Hypertree.Op - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Hypertree.Op = new Class( { - - Implements: Graph.Op - - }); - - /* - Class: Hypertree.Plot - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Hypertree.Plot = new Class( { - - Implements: Graph.Plot - - }); - - /* - Object: Hypertree.Label - - Custom extension of . - Contains custom , and extensions. - - Extends: - - All methods and subclasses. - - See also: - - , , , . - - */ - Hypertree.Label = {}; - - /* - Hypertree.Label.Native - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Hypertree.Label.Native = new Class( { - Implements: Graph.Label.Native, - - initialize: function(viz) { - this.viz = viz; - }, - - renderLabel: function(canvas, node, controller) { - var ctx = canvas.getCtx(); - var coord = node.pos.getc(true); - var s = this.viz.getRadius(); - ctx.fillText(node.name, coord.x * s, coord.y * s); - } - }); - - /* - Hypertree.Label.SVG - - Custom extension of . - - Extends: - - All methods - - See also: - - - - */ - Hypertree.Label.SVG = new Class( { - Implements: Graph.Label.SVG, - - initialize: function(viz) { - this.viz = viz; - }, - - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(), - r = this.viz.getRadius(); - var labelPos = { - x: Math.round((pos.x * sx) * r + ox + radius.width / 2), - y: Math.round((pos.y * sy) * r + oy + radius.height / 2) - }; - tag.setAttribute('x', labelPos.x); - tag.setAttribute('y', labelPos.y); - controller.onPlaceLabel(tag, node); - } - }); - - /* - Hypertree.Label.HTML - - Custom extension of . - - Extends: - - All methods. - - See also: - - - - */ - Hypertree.Label.HTML = new Class( { - Implements: Graph.Label.HTML, - - initialize: function(viz) { - this.viz = viz; - }, - /* - placeLabel - - Overrides abstract method placeLabel in . - - Parameters: - - tag - A DOM label element. - node - A . - controller - A configuration/controller object passed to the visualization. - - */ - placeLabel: function(tag, node, controller) { - var pos = node.pos.getc(true), - canvas = this.viz.canvas, - ox = canvas.translateOffsetX, - oy = canvas.translateOffsetY, - sx = canvas.scaleOffsetX, - sy = canvas.scaleOffsetY, - radius = canvas.getSize(), - r = this.viz.getRadius(); - var labelPos = { - x: Math.round((pos.x * sx) * r + ox + radius.width / 2), - y: Math.round((pos.y * sy) * r + oy + radius.height / 2) - }; - var style = tag.style; - style.left = labelPos.x + 'px'; - style.top = labelPos.y + 'px'; - style.display = this.fitsInCanvas(labelPos, canvas) ? '' : 'none'; - - controller.onPlaceLabel(tag, node); - } - }); - - /* - Class: Hypertree.Plot.NodeTypes - - This class contains a list of built-in types. - Node types implemented are 'none', 'circle', 'triangle', 'rectangle', 'star', 'ellipse' and 'square'. - - You can add your custom node types, customizing your visualization to the extreme. - - Example: - - (start code js) - Hypertree.Plot.NodeTypes.implement({ - 'mySpecialType': { - 'render': function(node, canvas) { - //print your custom node to canvas - }, - //optional - 'contains': function(node, pos) { - //return true if pos is inside the node or false otherwise - } - } - }); - (end code) - - */ - Hypertree.Plot.NodeTypes = new Class({ - 'none': { - 'render': $.empty, - 'contains': $.lambda(false) - }, - 'circle': { - 'render': function(node, canvas) { - var nconfig = this.node, - dim = node.getData('dim'), - p = node.pos.getc(); - dim = nconfig.transform? dim * (1 - p.squaredNorm()) : dim; - p.$scale(node.scale); - if (dim > 0.2) { - this.nodeHelper.circle.render('fill', p, dim, canvas); - } - }, - 'contains': function(node, pos) { - var dim = node.getData('dim'), - npos = node.pos.getc().$scale(node.scale); - return this.nodeHelper.circle.contains(npos, pos, dim); - } - }, - 'ellipse': { - 'render': function(node, canvas) { - var pos = node.pos.getc().$scale(node.scale), - width = node.getData('width'), - height = node.getData('height'); - this.nodeHelper.ellipse.render('fill', pos, width, height, canvas); - }, - 'contains': function(node, pos) { - var width = node.getData('width'), - height = node.getData('height'), - npos = node.pos.getc().$scale(node.scale); - return this.nodeHelper.circle.contains(npos, pos, width, height); - } - }, - 'square': { - 'render': function(node, canvas) { - var nconfig = this.node, - dim = node.getData('dim'), - p = node.pos.getc(); - dim = nconfig.transform? dim * (1 - p.squaredNorm()) : dim; - p.$scale(node.scale); - if (dim > 0.2) { - this.nodeHelper.square.render('fill', p, dim, canvas); - } - }, - 'contains': function(node, pos) { - var dim = node.getData('dim'), - npos = node.pos.getc().$scale(node.scale); - return this.nodeHelper.square.contains(npos, pos, dim); - } - }, - 'rectangle': { - 'render': function(node, canvas) { - var nconfig = this.node, - width = node.getData('width'), - height = node.getData('height'), - pos = node.pos.getc(); - width = nconfig.transform? width * (1 - pos.squaredNorm()) : width; - height = nconfig.transform? height * (1 - pos.squaredNorm()) : height; - pos.$scale(node.scale); - if (width > 0.2 && height > 0.2) { - this.nodeHelper.rectangle.render('fill', pos, width, height, canvas); - } - }, - 'contains': function(node, pos) { - var width = node.getData('width'), - height = node.getData('height'), - npos = node.pos.getc().$scale(node.scale); - return this.nodeHelper.square.contains(npos, pos, width, height); - } - }, - 'triangle': { - 'render': function(node, canvas) { - var nconfig = this.node, - dim = node.getData('dim'), - p = node.pos.getc(); - dim = nconfig.transform? dim * (1 - p.squaredNorm()) : dim; - p.$scale(node.scale); - if (dim > 0.2) { - this.nodeHelper.triangle.render('fill', p, dim, canvas); - } - }, - 'contains': function(node, pos) { - var dim = node.getData('dim'), - npos = node.pos.getc().$scale(node.scale); - return this.nodeHelper.triangle.contains(npos, pos, dim); - } - }, - 'star': { - 'render': function(node, canvas) { - var nconfig = this.node, - dim = node.getData('dim'), - p = node.pos.getc(); - dim = nconfig.transform? dim * (1 - p.squaredNorm()) : dim; - p.$scale(node.scale); - if (dim > 0.2) { - this.nodeHelper.star.render('fill', p, dim, canvas); - } - }, - 'contains': function(node, pos) { - var dim = node.getData('dim'), - npos = node.pos.getc().$scale(node.scale); - return this.nodeHelper.star.contains(npos, pos, dim); - } - } - }); - - /* - Class: Hypertree.Plot.EdgeTypes - - This class contains a list of built-in types. - Edge types implemented are 'none', 'line', 'arrow' and 'hyperline'. - - You can add your custom edge types, customizing your visualization to the extreme. - - Example: - - (start code js) - Hypertree.Plot.EdgeTypes.implement({ - 'mySpecialType': { - 'render': function(adj, canvas) { - //print your custom edge to canvas - }, - //optional - 'contains': function(adj, pos) { - //return true if pos is inside the arc or false otherwise - } - } - }); - (end code) - - */ - Hypertree.Plot.EdgeTypes = new Class({ - 'none': $.empty, - 'line': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - r = adj.nodeFrom.scale; - this.edgeHelper.line.render({x:from.x*r, y:from.y*r}, {x:to.x*r, y:to.y*r}, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - r = adj.nodeFrom.scale; - this.edgeHelper.line.contains({x:from.x*r, y:from.y*r}, {x:to.x*r, y:to.y*r}, pos, this.edge.epsilon); - } - }, - 'arrow': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - r = adj.nodeFrom.scale, - dim = adj.getData('dim'), - direction = adj.data.$direction, - inv = (direction && direction.length>1 && direction[0] != adj.nodeFrom.id); - this.edgeHelper.arrow.render({x:from.x*r, y:from.y*r}, {x:to.x*r, y:to.y*r}, dim, inv, canvas); - }, - 'contains': function(adj, pos) { - var from = adj.nodeFrom.pos.getc(true), - to = adj.nodeTo.pos.getc(true), - r = adj.nodeFrom.scale; - this.edgeHelper.arrow.contains({x:from.x*r, y:from.y*r}, {x:to.x*r, y:to.y*r}, pos, this.edge.epsilon); - } - }, - 'hyperline': { - 'render': function(adj, canvas) { - var from = adj.nodeFrom.pos.getc(), - to = adj.nodeTo.pos.getc(), - dim = this.viz.getRadius(); - this.edgeHelper.hyperline.render(from, to, dim, canvas); - }, - 'contains': $.lambda(false) - } - }); - -})($jit.Hypertree); - - - - - })(); \ No newline at end of file diff --git a/jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js b/jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js deleted file mode 100644 index 72be7fce..00000000 --- a/jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js +++ /dev/null @@ -1,117 +0,0 @@ -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - - - -SUGAR.mySugar.sugarCharts = function() { - -var activeTab = activePage, - charts = new Object(), - windowWidth = 0, - firstLoad = (SUGAR.isIE) ? true: false; - - return { - loadSugarCharts: function(activeTab) { - var chartFound = false; - for (id in charts[activeTab]){ - if(id != 'undefined'){ - chartFound = true; - //alert(charts[activeTab][id]['chartType']); - loadSugarChart( - charts[activeTab][id]['chartId'], - charts[activeTab][id]['jsonFilename'], - charts[activeTab][id]['css'], - charts[activeTab][id]['chartConfig'] - ); - } - } - //clear charts array - charts = new Object(); - - }, - - addToChartsArrayJson: function(json,activeTab) { - for (id in json) { - if(json[id]['supported'] == "true") { - SUGAR.mySugar.sugarCharts.addToChartsArray( - json[id]['chartId'], - json[id]['filename'], - json[id]['css'], - json[id]['chartConfig'], - activeTab); - } - } - }, - addToChartsArray: function(chartId,jsonFilename,css,chartConfig,activeTab) { - - if (charts[activeTab] == null){ - charts[activeTab] = new Object(); - } - charts[activeTab][chartId] = new Object(); - charts[activeTab][chartId]['chartId'] = chartId; - charts[activeTab][chartId]['jsonFilename'] = jsonFilename; - charts[activeTab][chartId]['css'] = css; - charts[activeTab][chartId]['chartConfig'] = chartConfig; - - }, - refreshPage: function() { - var newWidth = document.body.offsetWidth; - if(newWidth != windowWidth && !firstLoad){ - if(SUGAR.isIE) { - SUGAR.mySugar.loading.show(); - document.getElementById('loading_c').style.display = 'inline'; - setTimeout(function() {location.reload();}, 500); - - } else { - SUGAR.mySugar.retrievePage(activePage); - } - SUGAR.mySugar.sugarCharts.loadSugarCharts(activePage); - - } - firstLoad = false; - windowWidth = newWidth; - - }, - refreshGraphs: function() { - - setTimeout("SUGAR.mySugar.sugarCharts.refreshPage()", 1000); - } - - - } -}(); - -YAHOO.util.Event.addListener(window, 'resize', SUGAR.mySugar.sugarCharts.refreshGraphs); \ No newline at end of file diff --git a/jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js b/jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js deleted file mode 100644 index 8d276e04..00000000 --- a/jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js +++ /dev/null @@ -1,784 +0,0 @@ -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - - - -function loadSugarChart (chartId,jsonFilename,css,chartConfig) { - - var labelType, useGradients, nativeTextSupport, animate; - (function() { - var ua = navigator.userAgent, - typeOfCanvas = typeof HTMLCanvasElement, - nativeCanvasSupport = (typeOfCanvas == 'object' || typeOfCanvas == 'function'), - textSupport = nativeCanvasSupport - && (typeof document.createElement('canvas').getContext('2d').fillText == 'function'); - labelType = 'Native'; - nativeTextSupport = labelType == 'Native'; - useGradients = nativeCanvasSupport; - animate = false; - })(); - - - switch(chartConfig["chartType"]) { - case "barChart": - var handleFailure = function(o){ - alert('fail'); - if(o.responseText !== undefined){ - alert('failed'); - } - } - var handleSuccess = function(o){ - - if(o.responseText !== undefined && o.responseText != "No Data"){ - var json = eval('('+o.responseText+')'); - - var properties = $jit.util.splat(json.properties)[0]; - var marginBottom = (chartConfig["orientation"] == 'vertical' && json.values.length > 8) ? 20*4 : 20; - //init BarChart - var barChart = new $jit.BarChart({ - //id of the visualization container - injectInto: chartId, - //whether to add animations - animate: false, - nodeCount: json.values.length, - renderBackground: chartConfig['imageExportType'] == "jpg" ? true: false, - backgroundColor: 'rgb(255,255,255)', - colorStop1: 'rgba(255,255,255,.8)', - colorStop2: 'rgba(255,255,255,0)', - shadow: { - enable: true, - size: 2 - }, - //horizontal or vertical barcharts - orientation: chartConfig["orientation"], - hoveredColor: false, - Title: { - text: properties['title'], - size: 16, - color: '#444444', - offset: 20 - }, - Subtitle: { - text: properties['subtitle'], - size: 11, - color: css["color"], - offset: 20 - }, - Ticks: { - enable: true, - color: css["gridLineColor"] - }, - //bars separation - barsOffset: (chartConfig["orientation"] == "vertical") ? 30 : 20, - //visualization offset - Margin: { - top:20, - left: 30, - right: 20, - bottom: marginBottom - }, - ScrollNote: { - text: (chartConfig["scroll"] && SUGAR.util.isTouchScreen()) ? "Use two fingers to scroll" : "", - size: 12 - }, - Events: { - enable: true, - onClick: function(node) { - if(!node || SUGAR.util.isTouchScreen()) return; - if(node.link == 'undefined' || node.link == '') return; - window.location.href=node.link; - } - }, - //labels offset position - labelOffset: 5, - //bars style - type: useGradients? chartConfig["barType"]+':gradient' : chartConfig["barType"], - //whether to show the aggregation of the values - showAggregates:true, - //whether to show the labels for the bars - showLabels:true, - //labels style - Label: { - type: labelType, //Native or HTML - size: 12, - family: css["font-family"], - color: css["color"], - colorAlt: "#ffffff" - }, - //add tooltips - Tips: { - enable: true, - onShow: function(tip, elem) { - if(elem.link != 'undefined' && elem.link != '') { - drillDown = (SUGAR.util.isTouchScreen()) ? "
    Click to drilldown" : "
    Click to drilldown"; - } else { - drillDown = ""; - } - - if(elem.valuelabel != 'undefined' && elem.valuelabel != undefined && elem.valuelabel != '') { - value = "elem.valuelabel"; - } else { - value = "elem.value"; - } - eval("tip.innerHTML = '' + elem."+chartConfig["tip"]+" + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown"); - } - } - }); - //load JSON data. - barChart.loadJSON(json); - //end - - /* - var list = $jit.id('id-list'), - button = $jit.id('update'), - orn = $jit.id('switch-orientation'); - //update json on click 'Update Data' - $jit.util.addEvent(button, 'click', function() { - var util = $jit.util; - if(util.hasClass(button, 'gray')) return; - util.removeClass(button, 'white'); - util.addClass(button, 'gray'); - barChart.updateJSON(json2); - }); - */ - //dynamically add legend to list - var list = $jit.id('legend'+chartId); - var legend = barChart.getLegend(), - cols = (typeof SUGAR == 'undefined' || typeof SUGAR.mySugar == 'undefined') ? 8 : 4, - rows = Math.ceil(legend["name"].length/cols), - table = ""; - var j = 0; - for(i=0;i ' + legend["name"][j]; - } - - table += ''; - j++; - } - table += ""; - } - - table += "
    "; - list.innerHTML = table; - - - //save canvas to image for pdf consumption - $jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]); - - - } - } - - var callback = - { - success:handleSuccess, - failure:handleFailure, - argument: { foo:'foo', bar:''} - }; - - var request = YAHOO.util.Connect.asyncRequest('GET', jsonFilename + "?r=" + new Date().getTime(), callback); - break; - - case "lineChart": - var handleFailure = function(o){ - alert('fail'); - if(o.responseText !== undefined){ - alert('failed'); - } - } - var handleSuccess = function(o){ - - if(o.responseText !== undefined && o.responseText != "No Data"){ - var json = eval('('+o.responseText+')'); - - var properties = $jit.util.splat(json.properties)[0]; - //init Linecahrt - var lineChart = new $jit.LineChart({ - //id of the visualization container - injectInto: chartId, - //whether to add animations - animate: false, - renderBackground: chartConfig['imageExportType'] == "jpg" ? true: false, - backgroundColor: 'rgb(255,255,255)', - colorStop1: 'rgba(255,255,255,.8)', - colorStop2: 'rgba(255,255,255,0)', - selectOnHover: false, - Title: { - text: properties['title'], - size: 16, - color: '#444444', - offset: 20 - }, - Subtitle: { - text: properties['subtitle'], - size: 11, - color: css["color"], - offset: 20 - }, - Ticks: { - enable: true, - color: css["gridLineColor"] - }, - //visualization offset - Margin: { - top:20, - left: 40, - right: 40, - bottom: 20 - }, - Events: { - enable: true, - onClick: function(node) { - if(!node || SUGAR.util.isTouchScreen()) return; - if(node.link == 'undefined' || node.link == '') return; - window.location.href=node.link; - } - }, - //labels offset position - labelOffset: 5, - //bars style - type: useGradients? chartConfig["lineType"]+':gradient' : chartConfig["lineType"], - //whether to show the aggregation of the values - showAggregates:true, - //whether to show the labels for the bars - showLabels:true, - //labels style - Label: { - type: labelType, //Native or HTML - size: 12, - family: css["font-family"], - color: css["color"], - colorAlt: "#ffffff" - }, - //add tooltips - Tips: { - enable: true, - onShow: function(tip, elem) { - if(elem.link != 'undefined' && elem.link != '') { - drillDown = (SUGAR.util.isTouchScreen()) ? "
    Click to drilldown" : "
    Click to drilldown"; - } else { - drillDown = ""; - } - - if(elem.valuelabel != 'undefined' && elem.valuelabel != undefined && elem.valuelabel != '') { - var value = "elem.valuelabel"; - } else { - var value = "elem.value"; - } - - if(elem.collision) { - eval("var name = elem."+chartConfig["tip"]+";"); - var content = ''; - - for(var i=0; i:'; - } - content += '
    ' + elem.value[i] + ' - ' + elem.percentage[i] + '%' + '
    '; - tip.innerHTML = content; - } else { - eval("tip.innerHTML = '' + elem."+chartConfig["tip"]+" + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown"); - } - } - } - }); - //load JSON data. - lineChart.loadJSON(json); - //end - - /* - var list = $jit.id('id-list'), - button = $jit.id('update'), - orn = $jit.id('switch-orientation'); - //update json on click 'Update Data' - $jit.util.addEvent(button, 'click', function() { - var util = $jit.util; - if(util.hasClass(button, 'gray')) return; - util.removeClass(button, 'white'); - util.addClass(button, 'gray'); - barChart.updateJSON(json2); - }); - */ - //dynamically add legend to list - var list = $jit.id('legend'+chartId); - var legend = lineChart.getLegend(), - cols = (typeof SUGAR == 'undefined' || typeof SUGAR.mySugar == 'undefined') ? 8 : 4, - rows = Math.ceil(legend["name"].length/cols), - table = ""; - var j = 0; - for(i=0;i ' + legend["name"][j]; - } - - table += ''; - j++; - } - table += ""; - } - - table += "
    "; - list.innerHTML = table; - - - //save canvas to image for pdf consumption - $jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]); - - - } - } - - var callback = - { - success:handleSuccess, - failure:handleFailure, - argument: { foo:'foo', bar:''} - }; - - var request = YAHOO.util.Connect.asyncRequest('GET', jsonFilename + "?r=" + new Date().getTime(), callback); - break; - - - case "pieChart": - - var handleFailure = function(o){ - alert('fail'); - if(o.responseText !== undefined){ - alert('failed'); - } - } - var handleSuccess = function(o){ - - if(o.responseText !== undefined){ - var json = eval('('+o.responseText+')'); - var properties = $jit.util.splat(json.properties)[0]; - - //init BarChart - var pieChart = new $jit.PieChart({ - //id of the visualization container - injectInto: chartId, - //whether to add animations - animate: false, - renderBackground: chartConfig['imageExportType'] == "jpg" ? true: false, - backgroundColor: 'rgb(255,255,255)', - colorStop1: 'rgba(255,255,255,.8)', - colorStop2: 'rgba(255,255,255,0)', - labelType: properties['labels'], - hoveredColor: false, - //offsets - offset: 50, - sliceOffset: 0, - labelOffset: 30, - //slice style - type: useGradients? chartConfig["pieType"]+':gradient' : chartConfig["pieType"], - //whether to show the labels for the slices - showLabels:true, - Events: { - enable: true, - onClick: function(node) { - if(!node || SUGAR.util.isTouchScreen()) return; - if(node.link == 'undefined' || node.link == '') return; - window.location.href=node.link; - } - }, - //label styling - Label: { - type: labelType, //Native or HTML - size: 12, - family: css["font-family"], - color: css["color"] - }, - //enable tips - Tips: { - enable: true, - onShow: function(tip, elem) { - if(elem.link != 'undefined' && elem.link != '') { - drillDown = (SUGAR.util.isTouchScreen()) ? "
    Click to drilldown" : "
    Click to drilldown"; - } else { - drillDown = ""; - } - - if(elem.valuelabel != 'undefined' && elem.valuelabel != undefined && elem.valuelabel != '') { - value = "elem.valuelabel"; - } else { - value = "elem.value"; - } - eval("tip.innerHTML = '' + elem.label + ': ' + "+ value +" + ' - ' + elem.percentage + '%' + drillDown"); - } - } - }); - //load JSON data. - pieChart.loadJSON(json); - //end - //dynamically add legend to list - var list = $jit.id('legend'+chartId); - var legend = pieChart.getLegend(), - cols = (typeof SUGAR == 'undefined' || typeof SUGAR.mySugar == 'undefined') ? 8 : 4, - rows = Math.ceil(legend["name"].length/cols); - table = ""; - var j = 0; - for(i=0;i ' + legend["name"][j]; - } - - table += ''; - j++; - } - table += ""; - } - - table += "
    "; - list.innerHTML = table; - - - //save canvas to image for pdf consumption - $jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]); - } - } - - var callback = - { - success:handleSuccess, - failure:handleFailure, - argument: { foo:'foo', bar:''} - }; - - var request = YAHOO.util.Connect.asyncRequest('GET', jsonFilename + "?r=" + new Date().getTime(), callback); - - break; - - - case "funnelChart": - - var handleFailure = function(o){ - alert('fail'); - if(o.responseText !== undefined){ - alert('failed'); - } - } - var handleSuccess = function(o){ - - if(o.responseText !== undefined && o.responseText != "No Data"){ - var json = eval('('+o.responseText+')'); - - var properties = $jit.util.splat(json.properties)[0]; - - //init Funnel Chart - var funnelChart = new $jit.FunnelChart({ - //id of the visualization container - injectInto: chartId, - //whether to add animations - animate: false, - renderBackground: chartConfig['imageExportType'] == "jpg" ? true: false, - backgroundColor: 'rgb(255,255,255)', - colorStop1: 'rgba(255,255,255,.8)', - colorStop2: 'rgba(255,255,255,0)', - //orientation setting should not be changed - orientation: "vertical", - hoveredColor: false, - Title: { - text: properties['title'], - size: 16, - color: '#444444', - offset: 20 - }, - Subtitle: { - text: properties['subtitle'], - size: 11, - color: css["color"], - offset: 20 - }, - //segment separation - segmentOffset: 20, - //visualization offset - Margin: { - top:20, - left: 20, - right: 20, - bottom: 20 - }, - Events: { - enable: true, - onClick: function(node) { - if(!node || SUGAR.util.isTouchScreen()) return; - if(node.link == 'undefined' || node.link == '') return; - window.location.href=node.link; - } - }, - //labels offset position - labelOffset: 10, - //bars style - type: useGradients? chartConfig["funnelType"]+':gradient' : chartConfig["funnelType"], - //whether to show the aggregation of the values - showAggregates:true, - //whether to show the labels for the bars - showLabels:true, - //labels style - Label: { - type: labelType, //Native or HTML - size: 12, - family: css["font-family"], - color: css["color"], - colorAlt: "#ffffff" - }, - //add tooltips - Tips: { - enable: true, - onShow: function(tip, elem) { - if(elem.link != 'undefined' && elem.link != '') { - drillDown = (SUGAR.util.isTouchScreen()) ? "
    Click to drilldown" : "
    Click to drilldown"; - } else { - drillDown = ""; - } - - if(elem.valuelabel != 'undefined' && elem.valuelabel != undefined && elem.valuelabel != '') { - value = "elem.valuelabel"; - } else { - value = "elem.value"; - } - eval("tip.innerHTML = '' + elem."+chartConfig["tip"]+" + ': ' + "+value+" + ' - ' + elem.percentage + '%' + drillDown"); - } - } - }); - //load JSON data. - funnelChart.loadJSON(json); - //end - - /* - var list = $jit.id('id-list'), - button = $jit.id('update'), - orn = $jit.id('switch-orientation'); - //update json on click 'Update Data' - $jit.util.addEvent(button, 'click', function() { - var util = $jit.util; - if(util.hasClass(button, 'gray')) return; - util.removeClass(button, 'white'); - util.addClass(button, 'gray'); - barChart.updateJSON(json2); - }); - */ - //dynamically add legend to list - var list = $jit.id('legend'+chartId); - var legend = funnelChart.getLegend(), - cols = (typeof SUGAR == 'undefined' || typeof SUGAR.mySugar == 'undefined') ? 8 : 4, - rows = Math.ceil(legend["name"].length/cols); - table = ""; - var j = 0; - for(i=0;i ' + legend["name"][j]; - } - - table += ''; - j++; - } - table += ""; - } - - table += "
    "; - list.innerHTML = table; - - //save canvas to image for pdf consumption - $jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]); - } - } - - var callback = - { - success:handleSuccess, - failure:handleFailure, - argument: { foo:'foo', bar:''} - }; - - var request = YAHOO.util.Connect.asyncRequest('GET', jsonFilename + "?r=" + new Date().getTime(), callback); - break; - - - - case "gaugeChart": - - var handleFailure = function(o){ - alert('fail'); - if(o.responseText !== undefined){ - alert('failed'); - } - } - var handleSuccess = function(o){ - - if(o.responseText !== undefined){ - var json = eval('('+o.responseText+')'); - var properties = $jit.util.splat(json.properties)[0]; - - //init Gauge Chart - var gaugeChart = new $jit.GaugeChart({ - //id of the visualization container - injectInto: chartId, - //whether to add animations - animate: false, - renderBackground: chartConfig['imageExportType'] == "jpg" ? true: false, - backgroundColor: 'rgb(255,255,255)', - colorStop1: 'rgba(255,255,255,.8)', - colorStop2: 'rgba(255,255,255,0)', - labelType: properties['labels'], - hoveredColor: false, - Title: { - text: properties['title'], - size: 16, - color: '#444444', - offset: 20 - }, - Subtitle: { - text: properties['subtitle'], - size: 11, - color: css["color"], - offset: 5 - }, - //offsets - offset: 20, - gaugeStyle: { - backgroundColor: '#aaaaaa', - borderColor: '#999999', - needleColor: 'rgba(255,0,0,.8)', - borderSize: 4, - positionFontSize: 24, - positionOffset: 2 - }, - //slice style - type: useGradients? chartConfig["gaugeType"]+':gradient' : chartConfig["gaugeType"], - //whether to show the labels for the slices - showLabels:true, - Events: { - enable: true, - onClick: function(node) { - if(!node || SUGAR.util.isTouchScreen()) return; - if(node.link == 'undefined' || node.link == '') return; - window.location.href=node.link; - } - }, - //label styling - Label: { - type: labelType, //Native or HTML - size: 12, - family: css["font-family"], - color: css["color"] - }, - //enable tips - Tips: { - enable: true, - onShow: function(tip, elem) { - if(elem.link != 'undefined' && elem.link != '') { - drillDown = (SUGAR.util.isTouchScreen()) ? "
    Click to drilldown" : "
    Click to drilldown"; - } else { - drillDown = ""; - } - if(elem.valuelabel != 'undefined' && elem.valuelabel != undefined && elem.valuelabel != '') { - value = "elem.valuelabel"; - } else { - value = "elem.value"; - } - eval("tip.innerHTML = '' + elem.label + ': ' + "+ value +" + drillDown"); - } - } - }); - //load JSON data. - gaugeChart.loadJSON(json); - - - var list = $jit.id('legend'+chartId); - var legend = gaugeChart.getLegend(), - cols = (typeof SUGAR == 'undefined' || typeof SUGAR.mySugar == 'undefined') ? 8 : 4, - rows = Math.ceil(legend["name"].length/cols); - table = ""; - var j = 1; - for(i=0;i ' + legend["name"][j]; - } - - table += ''; - j++; - } - table += ""; - } - - table += "
    "; - list.innerHTML = table; - - - //save canvas to image for pdf consumption - $jit.util.saveImageTest(chartId,jsonFilename,chartConfig["imageExportType"]); - } - } - - var callback = - { - success:handleSuccess, - failure:handleFailure, - argument: { foo:'foo', bar:''} - }; - - var request = YAHOO.util.Connect.asyncRequest('GET', jsonFilename + "?r=" + new Date().getTime(), callback); - - break; - - } - } \ No newline at end of file diff --git a/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js b/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js index cc8e5e9e..809b0b9d 100644 --- a/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js +++ b/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js @@ -54,7 +54,7 @@ function Datetimecombo (datetime, field, timeformat, tabindex, showCheckbox, che this.datetime = datetime; this.allowEmptyHM = allowEmptyHM; if(typeof this.datetime == "undefined" || datetime == '' || trim(datetime).length < 10) { - this.datetime = ''; + this.datetime = ""; var d = new Date(); var month = d.getMonth(); var date = d.getDate(); @@ -65,14 +65,9 @@ function Datetimecombo (datetime, field, timeformat, tabindex, showCheckbox, che this.fieldname = field; //Get hours and minutes and adjust as necessary - - if(datetime != '') - { - parts = datetime.split(' '); - this.hrs = parseInt(parts[1].substring(0,2), 10); - this.mins = parseInt(parts[1].substring(3,5), 10); - } - + this.hrs = parseInt(datetime.substring(11,13), 10); + this.mins = parseInt(datetime.substring(14,16), 10); + //A safety scan to make sure hrs and minutes are formatted correctly if (this.mins > 0 && this.mins < 15) { this.mins = 15; @@ -116,13 +111,11 @@ function Datetimecombo (datetime, field, timeformat, tabindex, showCheckbox, che Datetimecombo.prototype.jsscript = function(callback) { //text = '\n

    ' . translate('LBL_NO_ACCESS', 'ACL') . '

    '; if($redirect_home)echo 'Redirect to Home in 3 seconds'; } - + } - - - + + + diff --git a/modules/ACL/install_actions.php b/modules/ACL/install_actions.php index b44c2b51..b1e2b244 100644 --- a/modules/ACL/install_actions.php +++ b/modules/ACL/install_actions.php @@ -46,30 +46,30 @@ $ACLbeanList=$beanList; if(is_admin($current_user)){ - foreach($ACLbeanList as $module=>$class){ + foreach($ACLbeanList as $module=>$class){ - if(empty($installed_classes[$class]) && isset($beanFiles[$class]) && file_exists($beanFiles[$class])){ - if($class == 'Tracker'){ - } else { - require_once($beanFiles[$class]); - $mod = new $class(); - $GLOBALS['log']->debug("DOING: $class"); - if($mod->bean_implements('ACL') && empty($mod->acl_display_only)){ - // BUG 10339: do not display messages for upgrade wizard - if(!isset($_REQUEST['upgradeWizard'])){ - echo translate('LBL_ADDING','ACL','') . $mod->module_dir . '
    '; - } - if(!empty($mod->acltype)){ - ACLAction::addActions($mod->getACLCategory(), $mod->acltype); - }else{ - ACLAction::addActions($mod->getACLCategory()); - } - - $installed_classes[$class] = true; - } - } - } - } + if(empty($installed_classes[$class]) && isset($beanFiles[$class]) && file_exists($beanFiles[$class])){ + if($class == 'Tracker'){ + } else { + require_once($beanFiles[$class]); + $mod = new $class(); + if($mod->bean_implements('ACL') && empty($mod->acl_display_only)){ + // BUG 10339: do not display messages for upgrade wizard + if(!isset($_REQUEST['upgradeWizard'])){ + echo translate('LBL_ADDING','ACL','') . $mod->module_dir . '
    '; + } + + if(!empty($mod->acltype)){ + ACLAction::addActions($mod->module_dir, $mod->acltype); + }else{ + ACLAction::addActions($mod->module_dir); + } + + $installed_classes[$class] = true; + } + } + } + } } diff --git a/modules/ACLActions/ACLAction.php b/modules/ACLActions/ACLAction.php index 138d9657..c2c4e2d0 100644 --- a/modules/ACLActions/ACLAction.php +++ b/modules/ACLActions/ACLAction.php @@ -37,117 +37,117 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('modules/ACLActions/actiondefs.php'); class ACLAction extends SugarBean{ - var $module_dir = 'ACLActions'; - var $object_name = 'ACLAction'; - var $table_name = 'acl_actions'; - var $new_schema = true; - var $disable_custom_fields = true; - function ACLAction(){ - parent::SugarBean(); - } - - /** - * static addActions($category, $type='module') - * Adds all default actions for a category/type - * - * @param STRING $category - the category (e.g module name - Accounts, Contacts) - * @param STRING $type - the type (e.g. 'module', 'field') - */ - function addActions($category, $type='module'){ - global $ACLActions; - $db = DBManagerFactory::getInstance(); - if(isset($ACLActions[$type])){ - foreach($ACLActions[$type]['actions'] as $action_name =>$action_def){ - - $action = new ACLAction(); - $query = "SELECT * FROM " . $action->table_name . " WHERE name='$action_name' AND category = '$category' AND acltype='$type' AND deleted=0 "; - $result = $db->query($query); - //only add if an action with that name and category don't exist - $row=$db->fetchByAssoc($result); - if ($row == null) { - $action->name = $action_name; - $action->category = $category; - $action->aclaccess = $action_def['default']; - $action->acltype = $type; - $action->modified_user_id = 1; - $action->created_by = 1; - $action->save(); - - } - } - - }else{ - sugar_die("FAILED TO ADD: $category - TYPE $type NOT DEFINED IN modules/ACLActions/actiondefs.php"); - } - - } - - /** - * static removeActions($category, $type='module') - * Removes all default actions for a category/type - * - * @param STRING $category - the category (e.g module name - Accounts, Contacts) - * @param STRING $type - the type (e.g. 'module', 'field') - */ - function removeActions($category, $type='module'){ - global $ACLActions; - $db = DBManagerFactory::getInstance(); - if(isset($ACLActions[$type])){ - foreach($ACLActions[$type]['actions'] as $action_name =>$action_def){ - - $action = new ACLAction(); - $query = "SELECT * FROM " . $action->table_name . " WHERE name='$action_name' AND category = '$category' AND acltype='$type' and deleted=0"; - $result = $db->query($query); - //only add if an action with that name and category don't exist - $row=$db->fetchByAssoc($result); - if ($row != null) { - $action->mark_deleted($row['id']); - } - } - }else{ - sugar_die("FAILED TO REMOVE: $category : $name - TYPE $type NOT DEFINED IN modules/ACLActions/actiondefs.php"); - } - } - - /** - * static AccessColor($access) - * - * returns the color associated with an access level - * these colors exist in the definitions in modules/ACLActions/actiondefs.php - * @param INT $access - the access level you want the color for - * @return the color either name or hex representation or false if the level does not exist - */ - function AccessColor($access){ - global $ACLActionAccessLevels; - if(isset($ACLActionAccessLevels[$access])){ - - return $ACLActionAccessLevels[$access]['color']; - } - return false; - - } - - /** - * static AccessName($access) - * - * returns the translated name associated with an access level - * these label definitions exist in the definitions in modules/ACLActions/actiondefs.php - * @param INT $access - the access level you want the color for - * @return the translated access level name or false if the level does not exist - */ - function AccessName($access){ - global $ACLActionAccessLevels; - if(isset($ACLActionAccessLevels[$access])){ - return translate($ACLActionAccessLevels[$access]['label'], 'ACLActions'); - } - return false; - - } - - /** + var $module_dir = 'ACLActions'; + var $object_name = 'ACLAction'; + var $table_name = 'acl_actions'; + var $new_schema = true; + + function ACLAction(){ + parent::SugarBean(); + } + + /** + * static addActions($category, $type='module') + * Adds all default actions for a category/type + * + * @param STRING $category - the category (e.g module name - Accounts, Contacts) + * @param STRING $type - the type (e.g. 'module', 'field') + */ + function addActions($category, $type='module'){ + global $ACLActions; + $db = DBManagerFactory::getInstance(); + if(isset($ACLActions[$type])){ + foreach($ACLActions[$type]['actions'] as $action_name =>$action_def){ + + $action = new ACLAction(); + $query = "SELECT * FROM " . $action->table_name . " WHERE name='$action_name' AND category = '$category' AND acltype='$type' AND deleted=0 "; + $result = $db->query($query); + //only add if an action with that name and category don't exist + $row=$db->fetchByAssoc($result); + if ($row == null) { + $action->name = $action_name; + $action->category = $category; + $action->aclaccess = $action_def['default']; + $action->acltype = $type; + $action->modified_user_id = 1; + $action->created_by = 1; + $action->save(); + + } + } + + }else{ + sugar_die("FAILED TO ADD: $category : $name - TYPE $type NOT DEFINED IN modules/ACLActions/actiondefs.php"); + } + + } + + /** + * static removeActions($category, $type='module') + * Removes all default actions for a category/type + * + * @param STRING $category - the category (e.g module name - Accounts, Contacts) + * @param STRING $type - the type (e.g. 'module', 'field') + */ + function removeActions($category, $type='module'){ + global $ACLActions; + $db = DBManagerFactory::getInstance(); + if(isset($ACLActions[$type])){ + foreach($ACLActions[$type]['actions'] as $action_name =>$action_def){ + + $action = new ACLAction(); + $query = "SELECT * FROM " . $action->table_name . " WHERE name='$action_name' AND category = '$category' AND acltype='$type' and deleted=0"; + $result = $db->query($query); + //only add if an action with that name and category don't exist + $row=$db->fetchByAssoc($result); + if ($row != null) { + $action->mark_deleted($row['id']); + } + } + }else{ + sugar_die("FAILED TO REMOVE: $category : $name - TYPE $type NOT DEFINED IN modules/ACLActions/actiondefs.php"); + } + } + + /** + * static AccessColor($access) + * + * returns the color associated with an access level + * these colors exist in the definitions in modules/ACLActions/actiondefs.php + * @param INT $access - the access level you want the color for + * @return the color either name or hex representation or false if the level does not exist + */ + function AccessColor($access){ + global $ACLActionAccessLevels; + if(isset($ACLActionAccessLevels[$access])){ + + return $ACLActionAccessLevels[$access]['color']; + } + return false; + + } + + /** + * static AccessName($access) + * + * returns the translated name associated with an access level + * these label definitions exist in the definitions in modules/ACLActions/actiondefs.php + * @param INT $access - the access level you want the color for + * @return the translated access level name or false if the level does not exist + */ + function AccessName($access){ + global $ACLActionAccessLevels; + if(isset($ACLActionAccessLevels[$access])){ + return translate($ACLActionAccessLevels[$access]['label'], 'ACLActions'); + } + return false; + + } + + /** * static AccessLabel($access) * - * returns the label associated with an access level + * returns the label associated with an access level * these label definitions exist in the definitions in modules/ACLActions/actiondefs.php * @param INT $access - the access level you want the color for * @return the access level label or false if the level does not exist @@ -157,287 +157,287 @@ class ACLAction extends SugarBean{ if(isset($ACLActionAccessLevels[$access])){ $label=preg_replace('/(LBL_ACCESS_)(.*)/', '$2', $ACLActionAccessLevels[$access]['label']); return strtolower($label); - + } return false; - + } - - /** - * static getAccessOptions() - * this is used for building select boxes - * @return array containg access levels (ints) as keys and access names as values - */ - function getAccessOptions( $action, $type='module'){ - global $ACLActions; - $options = array(); - - if(empty($ACLActions[$type]['actions'][$action]['aclaccess']))return $options; - foreach($ACLActions[$type]['actions'][$action]['aclaccess'] as $action){ - $options[$action] = ACLAction::AccessName($action); - } - return $options; - - } - - /** - * function static getDefaultActions() - * This function will return a list of acl actions with their default access levels - * - * - */ - function getDefaultActions($type='module', $action=''){ - $query = "SELECT * FROM acl_actions WHERE deleted=0 "; - if(!empty($type)){ - $query .= " AND acltype='$type'"; - } - if(!empty($action)){ - $query .= "AND name='$action'"; - } - $query .= " ORDER BY category"; - - $db = DBManagerFactory::getInstance(); - $result = $db->query($query); - $default_actions = array(); - while($row = $db->fetchByAssoc($result) ){ - $acl = new ACLAction(); - $acl->populateFromRow($row); - $default_actions[] = $acl; - } - return $default_actions; - } - - - /** - * static getUserActions($user_id,$refresh=false, $category='', $action='') - * returns a list of user actions - * @param GUID $user_id - * @param BOOLEAN $refresh - * @param STRING $category - * @param STRING $action - * @return ARRAY of ACLActionsArray - */ - - function getUserActions($user_id,$refresh=false, $category='',$type='', $action=''){ - //check in the session if we already have it loaded - if(!$refresh && !empty($_SESSION['ACL'][$user_id])){ - if(empty($category) && empty($action)){ - return $_SESSION['ACL'][$user_id]; - }else{ - if(!empty($category) && isset($_SESSION['ACL'][$user_id][$category])){ - if(empty($action)){ - if(empty($type)){ - return $_SESSION['ACL'][$user_id][$category]; - } - return $_SESSION['ACL'][$user_id][$category][$type]; - }else if(!empty($type) && isset($_SESSION['ACL'][$user_id][$category][$type][$action])){ - return $_SESSION['ACL'][$user_id][$category][$type][$action]; - } - } - } - } - //if we don't have it loaded then lets check against the db - $additional_where = ''; - $db = DBManagerFactory::getInstance(); - if(!empty($category)){ - $additional_where .= " AND $this->table_name.category = '$category' "; - } - if(!empty($action)){ - $additional_where .= " AND $this->table_name.name = '$action' "; - } - if(!empty($type)){ - $additional_where .= " AND $this->table_name.acltype = '$type' "; - } + + /** + * static getAccessOptions() + * this is used for building select boxes + * @return array containg access levels (ints) as keys and access names as values + */ + function getAccessOptions( $action, $type='module'){ + global $ACLActions; + $options = array(); + + if(empty($ACLActions[$type]['actions'][$action]['aclaccess']))return $options; + foreach($ACLActions[$type]['actions'][$action]['aclaccess'] as $action){ + $options[$action] = ACLAction::AccessName($action); + } + return $options; + + } + + /** + * function static getDefaultActions() + * This function will return a list of acl actions with their default access levels + * + * + */ + function getDefaultActions($type='module', $action=''){ + $query = "SELECT * FROM acl_actions WHERE deleted=0 "; + if(!empty($type)){ + $query .= " AND acltype='$type'"; + } + if(!empty($action)){ + $query .= "AND name='$action'"; + } + $query .= " ORDER BY category"; + + $db = DBManagerFactory::getInstance(); + $result = $db->query($query); + $default_actions = array(); + while($row = $db->fetchByAssoc($result) ){ + $acl = new ACLAction(); + $acl->populateFromRow($row); + $default_actions[] = $acl; + } + return $default_actions; + } + + + /** + * static getUserActions($user_id,$refresh=false, $category='', $action='') + * returns a list of user actions + * @param GUID $user_id + * @param BOOLEAN $refresh + * @param STRING $category + * @param STRING $action + * @return ARRAY of ACLActionsArray + */ + + function getUserActions($user_id,$refresh=false, $category='',$type='', $action=''){ + //check in the session if we already have it loaded + if(!$refresh && !empty($_SESSION['ACL'][$user_id])){ + if(empty($category) && empty($action)){ + return $_SESSION['ACL'][$user_id]; + }else{ + if(!empty($category) && isset($_SESSION['ACL'][$user_id][$category])){ + if(empty($action)){ + if(empty($type)){ + return $_SESSION['ACL'][$user_id][$category]; + } + return $_SESSION['ACL'][$user_id][$category][$type]; + }else if(!empty($type) && isset($_SESSION['ACL'][$user_id][$category][$type][$action])){ + return $_SESSION['ACL'][$user_id][$category][$type][$action]; + } + } + } + } + //if we don't have it loaded then lets check against the db + $additional_where = ''; + $db = DBManagerFactory::getInstance(); + if(!empty($category)){ + $additional_where .= " AND $this->table_name.category = '$category' "; + } + if(!empty($action)){ + $additional_where .= " AND $this->table_name.name = '$action' "; + } + if(!empty($type)){ + $additional_where .= " AND $this->table_name.acltype = '$type' "; + } $query=null; if ($db->dbType == 'oci8') { } if (empty($query)) { - $query = "SELECT acl_actions .*, acl_roles_actions.access_override - FROM acl_actions + $query = "SELECT acl_actions .*, acl_roles_actions.access_override + FROM acl_actions LEFT JOIN acl_roles_users ON acl_roles_users.user_id = '$user_id' AND acl_roles_users.deleted = 0 LEFT JOIN acl_roles_actions ON acl_roles_actions.role_id = acl_roles_users.role_id AND acl_roles_actions.action_id = acl_actions.id AND acl_roles_actions.deleted=0 WHERE acl_actions.deleted=0 $additional_where ORDER BY category,name"; } - $result = $db->query($query); - $selected_actions = array(); - while($row = $db->fetchByAssoc($result) ){ - $acl = new ACLAction(); - $isOverride = false; - $acl->populateFromRow($row); - if(!empty($row['access_override'])){ - $acl->aclaccess = $row['access_override']; - $isOverride = true; - } - if(!isset($selected_actions[$acl->category])){ - $selected_actions[$acl->category] = array(); - - } - if(!isset($selected_actions[$acl->category][$acl->acltype][$acl->name]) - || ($selected_actions[$acl->category][$acl->acltype][$acl->name]['aclaccess'] > $acl->aclaccess - && $isOverride - ) - || - (!empty($selected_actions[$acl->category][$acl->acltype][$acl->name]['isDefault']) - && $isOverride - ) - ) - { - - - $selected_actions[$acl->category][$acl->acltype][$acl->name] = $acl->toArray(); - $selected_actions[$acl->category][$acl->acltype][$acl->name]['isDefault'] = !$isOverride; - } - - } - - //only set the session variable if it was a full list; - if(empty($category) && empty($action)){ - if(!isset($_SESSION['ACL'])){ - $_SESSION['ACL'] = array(); - } - $_SESSION['ACL'][$user_id] = $selected_actions; - }else{ - if(empty($action) && !empty($category)){ - if(!empty($type)){ - $_SESSION['ACL'][$user_id][$category][$type] = $selected_actions[$category][$type];} - $_SESSION['ACL'][$user_id][$category] = $selected_actions[$category]; - }else{ - if(!empty($action) && !empty($category) && !empty($type)){ - $_SESSION['ACL'][$user_id][$category][$type][$action] = $selected_actions[$category][$action]; - - } - } - } - return $selected_actions; - } - /** - * (static/ non-static)function hasAccess($is_owner= false , $access = 0) - * checks if a user has access to this acl if the user is an owner it will check if owners have access - * - * This function may either be used statically or not. If used staticlly a user must pass in an access level not equal to zero - * @param boolean $is_owner - * @param int $access - * @return true or false - */ - function hasAccess($is_owner=false, $access = 0){ - - if($access != 0 && $access == ACL_ALLOW_ALL || ($is_owner && $access == ACL_ALLOW_OWNER))return true; - if(isset($this) && isset($this->aclaccess)){ - if($this->aclaccess == ACL_ALLOW_ALL || ($is_owner && $this->aclaccess == ACL_ALLOW_OWNER)) - return true; - } - return false; - } - - - - - - - - - - /** - * static function userHasAccess($user_id, $category, $action, $is_owner = false) - * - * @param GUID $user_id the user id who you want to check access for - * @param STRING $category the category you would like to check access for - * @param STRING $action the action of that category you would like to check access for - * @param BOOLEAN OPTIONAL $is_owner if the object is owned by the user you are checking access for - */ - function userHasAccess($user_id, $category, $action,$type='module', $is_owner = false){ - global $current_user; - if(is_admin_for_module($current_user,$category)&& !isset($_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess'])){ - return true; + $result = $db->query($query); + $selected_actions = array(); + while($row = $db->fetchByAssoc($result) ){ + $acl = new ACLAction(); + $isOverride = false; + $acl->populateFromRow($row); + if(!empty($row['access_override'])){ + $acl->aclaccess = $row['access_override']; + $isOverride = true; + } + if(!isset($selected_actions[$acl->category])){ + $selected_actions[$acl->category] = array(); + + } + if(!isset($selected_actions[$acl->category][$acl->acltype][$acl->name]) + || ($selected_actions[$acl->category][$acl->acltype][$acl->name]['aclaccess'] > $acl->aclaccess + && $isOverride + ) + || + (!empty($selected_actions[$acl->category][$acl->acltype][$acl->name]['isDefault']) + && $isOverride + ) + ) + { + + + $selected_actions[$acl->category][$acl->acltype][$acl->name] = $acl->toArray(); + $selected_actions[$acl->category][$acl->acltype][$acl->name]['isDefault'] = !$isOverride; + } + + } + + //only set the session variable if it was a full list; + if(empty($category) && empty($action)){ + if(!isset($_SESSION['ACL'])){ + $_SESSION['ACL'] = array(); + } + $_SESSION['ACL'][$user_id] = $selected_actions; + }else{ + if(empty($action) && !empty($category)){ + if(!empty($type)){ + $_SESSION['ACL'][$user_id][$category][$type] = $selected_actions[$category][$type];} + $_SESSION['ACL'][$user_id][$category] = $selected_actions[$category]; + }else{ + if(!empty($action) && !empty($category) && !empty($type)){ + $_SESSION['ACL'][$user_id][$category][$type][$action] = $selected_actions[$category][$action]; + + } + } + } + return $selected_actions; + } + /** + * (static/ non-static)function hasAccess($is_owner= false , $access = 0) + * checks if a user has access to this acl if the user is an owner it will check if owners have access + * + * This function may either be used statically or not. If used staticlly a user must pass in an access level not equal to zero + * @param boolean $is_owner + * @param int $access + * @return true or false + */ + function hasAccess($is_owner=false, $access = 0){ + + if($access != 0 && $access == ACL_ALLOW_ALL || ($is_owner && $access == ACL_ALLOW_OWNER))return true; + if(isset($this) && isset($this->aclaccess)){ + if($this->aclaccess == ACL_ALLOW_ALL || ($is_owner && $this->aclaccess == ACL_ALLOW_OWNER)) + return true; + } + return false; + } + + + + + + + + + + /** + * static function userHasAccess($user_id, $category, $action, $is_owner = false) + * + * @param GUID $user_id the user id who you want to check access for + * @param STRING $category the category you would like to check access for + * @param STRING $action the action of that category you would like to check access for + * @param BOOLEAN OPTIONAL $is_owner if the object is owned by the user you are checking access for + */ + function userHasAccess($user_id, $category, $action,$type='module', $is_owner = false){ + global $current_user; + if(is_admin_for_module($current_user,$category)&& !isset($_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess'])){ + return true; } //check if we don't have it set in the cache if not lets reload the cache - if(ACLAction::getUserAccessLevel($user_id, $category, 'access', $type) < ACL_ALLOW_ENABLED) return false; - if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ - ACLAction::getUserActions($user_id, false); - - } - - if(!empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ - return ACLAction::hasAccess($is_owner, $_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess']); - } - return false; - - } - /** - * function getUserAccessLevel($user_id, $category, $action,$type='module') - * returns the access level for a given category and action - * - * @param GUID $user_id - * @param STRING $category - * @param STRING $action - * @param STRING $type - * @return INT (ACCESS LEVEL) - */ - function getUserAccessLevel($user_id, $category, $action,$type='module'){ - if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ - ACLAction::getUserActions($user_id, false); - - } - if(!empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ - return $_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess']; - } - } - - /** - * STATIC function userNeedsOwnership($user_id, $category, $action,$type='module') - * checks if a user should have ownership to do an action - * - * @param GUID $user_id - * @param STRING $category - * @param STRING $action - * @param STRING $type - * @return boolean - */ - function userNeedsOwnership($user_id, $category, $action,$type='module'){ - //check if we don't have it set in the cache if not lets reload the cache - - if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ - ACLAction::getUserActions($user_id, false); - - } - - - if(!empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ - return $_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess'] == ACL_ALLOW_OWNER; - } - return false; - - } - /** - * - * static pass by ref setupCategoriesMatrix(&$categories) - * takes in an array of categories and modifes them adding display information - * - * @param unknown_type $categories - */ - function setupCategoriesMatrix(&$categories){ - global $ACLActions, $current_user; - $names = array(); - $disabled = array(); - foreach($categories as $cat_name=>$category){ + if(ACLAction::getUserAccessLevel($user_id, $category, 'access', $type) < ACL_ALLOW_ENABLED) return false; + if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ + ACLAction::getUserActions($user_id, false); + + } + + if(!empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ + return ACLAction::hasAccess($is_owner, $_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess']); + } + return false; + + } + /** + * function getUserAccessLevel($user_id, $category, $action,$type='module') + * returns the access level for a given category and action + * + * @param GUID $user_id + * @param STRING $category + * @param STRING $action + * @param STRING $type + * @return INT (ACCESS LEVEL) + */ + function getUserAccessLevel($user_id, $category, $action,$type='module'){ + if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ + ACLAction::getUserActions($user_id, false); + + } + if(!empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ + return $_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess']; + } + } + + /** + * STATIC function userNeedsOwnership($user_id, $category, $action,$type='module') + * checks if a user should have ownership to do an action + * + * @param GUID $user_id + * @param STRING $category + * @param STRING $action + * @param STRING $type + * @return boolean + */ + function userNeedsOwnership($user_id, $category, $action,$type='module'){ + //check if we don't have it set in the cache if not lets reload the cache + + if(empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ + ACLAction::getUserActions($user_id, false); + + } + + + if(!empty($_SESSION['ACL'][$user_id][$category][$type][$action])){ + return $_SESSION['ACL'][$user_id][$category][$type][$action]['aclaccess'] == ACL_ALLOW_OWNER; + } + return false; + + } + /** + * + * static pass by ref setupCategoriesMatrix(&$categories) + * takes in an array of categories and modifes them adding display information + * + * @param unknown_type $categories + */ + function setupCategoriesMatrix(&$categories){ + global $ACLActions, $current_user; + $names = array(); + $disabled = array(); + foreach($categories as $cat_name=>$category){ foreach($category as $type_name=>$type){ foreach($type as $act_name=>$action){ $names[$act_name] = translate($ACLActions[$type_name]['actions'][$act_name]['label'], 'ACLActions'); $categories[$cat_name][$type_name][$act_name]['accessColor'] = ACLAction::AccessColor($action['aclaccess']); if($type_name== 'module'){ - - if($act_name != 'aclaccess' && $categories[$cat_name]['module']['access']['aclaccess'] == ACL_ALLOW_DISABLED){ - $categories[$cat_name][$type_name][$act_name]['accessColor'] = 'darkgray'; - $disabled[] = $cat_name; - } - + + if($act_name != 'aclaccess' && $categories[$cat_name]['module']['access']['aclaccess'] == ACL_ALLOW_DISABLED){ + $categories[$cat_name][$type_name][$act_name]['accessColor'] = 'darkgray'; + $disabled[] = $cat_name; + } + } $categories[$cat_name][$type_name][$act_name]['accessName'] = ACLAction::AccessName($action['aclaccess']); $categories[$cat_name][$type_name][$act_name]['accessLabel'] = ACLAction::AccessLabel($action['aclaccess']); - + if($cat_name=='Users'&& $act_name=='admin'){ - $categories[$cat_name][$type_name][$act_name]['accessOptions'][ACL_ALLOW_DEFAULT]=ACLAction::AccessName(ACL_ALLOW_DEFAULT);; - $categories[$cat_name][$type_name][$act_name]['accessOptions'][ACL_ALLOW_DEV]=ACLAction::AccessName(ACL_ALLOW_DEV);; + $categories[$cat_name][$type_name][$act_name]['accessOptions'][ACL_ALLOW_DEFAULT]=ACLAction::AccessName(ACL_ALLOW_DEFAULT);; + $categories[$cat_name][$type_name][$act_name]['accessOptions'][ACL_ALLOW_DEV]=ACLAction::AccessName(ACL_ALLOW_DEV);; } else{ $categories[$cat_name][$type_name][$act_name]['accessOptions'] = ACLAction::getAccessOptions($act_name, $type_name); @@ -447,62 +447,62 @@ class ACLAction extends SugarBean{ } if(!is_admin($current_user)){ - foreach($disabled as $cat_name){ - unset($categories[$cat_name]); - } - } - return $names; - } - - - - /** - * function toArray() - * returns this acl as an array - * - * @return array of fields with id, name, access and category - */ - function toArray(){ - $array_fields = array('id', 'aclaccess'); - $arr = array(); - foreach($array_fields as $field){ - $arr[$field] = $this->$field; + foreach($disabled as $cat_name){ + unset($categories[$cat_name]); + } } - return $arr; - } - - /** - * function fromArray($arr) - * converts an array into an acl mapping name value pairs into files - * - * @param Array $arr - */ - function fromArray($arr){ - foreach($arr as $name=>$value){ - $this->$name = $value; - } - } - - /** - * function clearSessionCache() - * clears the session variable storing the cache information for acls - * - */ - function clearSessionCache(){ - unset($_SESSION['ACL']); - } - - - - - - - - - - - - + return $names; + } + + + + /** + * function toArray() + * returns this acl as an array + * + * @return array of fields with id, name, access and category + */ + function toArray(){ + $array_fields = array('id', 'aclaccess'); + $arr = array(); + foreach($array_fields as $field){ + $arr[$field] = $this->$field; + } + return $arr; + } + + /** + * function fromArray($arr) + * converts an array into an acl mapping name value pairs into files + * + * @param Array $arr + */ + function fromArray($arr){ + foreach($arr as $name=>$value){ + $this->$name = $value; + } + } + + /** + * function clearSessionCache() + * clears the session variable storing the cache information for acls + * + */ + function clearSessionCache(){ + unset($_SESSION['ACL']); + } + + + + + + + + + + + + } diff --git a/modules/ACLRoles/ACLRole.php b/modules/ACLRoles/ACLRole.php index 42fad02e..67873733 100644 --- a/modules/ACLRoles/ACLRole.php +++ b/modules/ACLRoles/ACLRole.php @@ -37,32 +37,31 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class ACLRole extends SugarBean{ - var $module_dir = 'ACLRoles'; - var $object_name = 'ACLRole'; - var $table_name = 'acl_roles'; - var $new_schema = true; - var $disable_row_level_security = true; - var $disable_custom_fields = true; - var $relationship_fields = array( - 'user_id'=>'users' - ); - - var $created_by; - - function ACLRole(){ - parent::SugarBean(); - } - - // bug 16790 - missing get_summary_text method led Tracker to display SugarBean's "base implementation" - function get_summary_text() - { - return "$this->name"; - } + var $module_dir = 'ACLRoles'; + var $object_name = 'ACLRole'; + var $table_name = 'acl_roles'; + var $new_schema = true; + var $disable_row_level_security = true; + var $relationship_fields = array( + 'user_id'=>'users' + ); + + var $created_by; + + function ACLRole(){ + parent::SugarBean(); + } + + // bug 16790 - missing get_summary_text method led Tracker to display SugarBean's "base implementation" + function get_summary_text() + { + return "$this->name"; + } /** * function setAction($role_id, $action_id, $access) - * + * * Sets the relationship between a role and an action and sets the access level of that relationship * * @param GUID $role_id - the role id @@ -70,9 +69,9 @@ class ACLRole extends SugarBean{ * @param int $access - the access level ACL_ALLOW_ALL ACL_ALLOW_NONE ACL_ALLOW_OWNER... */ function setAction($role_id, $action_id, $access){ - $relationship_data = array('role_id'=>$role_id, 'action_id'=>$action_id,); - $additional_data = array('access_override'=>$access); - $this->set_relationship('acl_roles_actions',$relationship_data,true, true,$additional_data); + $relationship_data = array('role_id'=>$role_id, 'action_id'=>$action_id,); + $additional_data = array('access_override'=>$access); + $this->set_relationship('acl_roles_actions',$relationship_data,true, true,$additional_data); } @@ -85,29 +84,29 @@ function setAction($role_id, $action_id, $access){ */ function getUserRoles($user_id, $getAsNameArray = true){ - //if we don't have it loaded then lets check against the db - $additional_where = ''; - $query = "SELECT acl_roles.* ". - "FROM acl_roles ". - "INNER JOIN acl_roles_users ON acl_roles_users.user_id = '$user_id' ". - "AND acl_roles_users.role_id = acl_roles.id AND acl_roles_users.deleted = 0 ". - "WHERE acl_roles.deleted=0 "; - - $result = $GLOBALS['db']->query($query); - $user_roles = array(); - - while($row = $GLOBALS['db']->fetchByAssoc($result) ){ - $role = new ACLRole(); - $role->populateFromRow($row); - if($getAsNameArray) - $user_roles[] = $role->name; - else - $user_roles[] = $role; - } - - return $user_roles; + //if we don't have it loaded then lets check against the db + $additional_where = ''; + $query = "SELECT acl_roles.* ". + "FROM acl_roles ". + "INNER JOIN acl_roles_users ON acl_roles_users.user_id = '$user_id' ". + "AND acl_roles_users.role_id = acl_roles.id AND acl_roles_users.deleted = 0 ". + "WHERE acl_roles.deleted=0 "; + + $result = $GLOBALS['db']->query($query); + $user_roles = array(); + + while($row = $GLOBALS['db']->fetchByAssoc($result) ){ + $role = new ACLRole(); + $role->populateFromRow($row); + if($getAsNameArray) + $user_roles[] = $role->name; + else + $user_roles[] = $role; + } + + return $user_roles; } - + /** * static getUserRoleNames($user_id) * returns a list of Role names for a given user id @@ -117,31 +116,31 @@ function getUserRoles($user_id, $getAsNameArray = true){ */ function getUserRoleNames($user_id){ - $user_roles = sugar_cache_retrieve("RoleMembershipNames_".$user_id); + $user_roles = sugar_cache_retrieve("RoleMembershipNames_".$user_id); - if(!$user_roles){ - //if we don't have it loaded then lets check against the db - $additional_where = ''; - $query = "SELECT acl_roles.* ". - "FROM acl_roles ". - "INNER JOIN acl_roles_users ON acl_roles_users.user_id = '$user_id' ". - "AND acl_roles_users.role_id = acl_roles.id AND acl_roles_users.deleted = 0 ". - "WHERE acl_roles.deleted=0 "; + if(!$user_roles){ + //if we don't have it loaded then lets check against the db + $additional_where = ''; + $query = "SELECT acl_roles.* ". + "FROM acl_roles ". + "INNER JOIN acl_roles_users ON acl_roles_users.user_id = '$user_id' ". + "AND acl_roles_users.role_id = acl_roles.id AND acl_roles_users.deleted = 0 ". + "WHERE acl_roles.deleted=0 "; - $result = $GLOBALS['db']->query($query); - $user_roles = array(); + $result = $GLOBALS['db']->query($query); + $user_roles = array(); - while($row = $GLOBALS['db']->fetchByAssoc($result) ){ - $user_roles[] = $row['name']; - } + while($row = $GLOBALS['db']->fetchByAssoc($result) ){ + $user_roles[] = $row['name']; + } - sugar_cache_put("RoleMembershipNames_".$user_id, $user_roles); - } + sugar_cache_put("RoleMembershipNames_".$user_id, $user_roles); + } - return $user_roles; + return $user_roles; } - - + + /** * static getAllRoles($returnAsArray = false) * @@ -149,126 +148,126 @@ function getUserRoleNames($user_id){ * @return either an array of array representations of acl roles or an array of ACLRoles */ function getAllRoles($returnAsArray = false){ - $db = DBManagerFactory::getInstance(); - $query = "SELECT acl_roles.* FROM acl_roles - WHERE acl_roles.deleted=0 ORDER BY name"; - - $result = $db->query($query); - $roles = array(); - - while($row = $db->fetchByAssoc($result) ){ - $role = new ACLRole(); - $role->populateFromRow($row); - if($returnAsArray){ - $roles[] = $role->toArray(); - }else{ - $roles[] = $role; - } - - } - return $roles; - + $db = DBManagerFactory::getInstance(); + $query = "SELECT acl_roles.* FROM acl_roles + WHERE acl_roles.deleted=0 ORDER BY name"; + + $result = $db->query($query); + $roles = array(); + + while($row = $db->fetchByAssoc($result) ){ + $role = new ACLRole(); + $role->populateFromRow($row); + if($returnAsArray){ + $roles[] = $role->toArray(); + }else{ + $roles[] = $role; + } + + } + return $roles; + } - + /** * static getRoleActions($role_id) - * + * * gets the actions of a given role * * @param GUID $role_id - * @return array of actions + * @return array of actions */ function getRoleActions($role_id, $type='module'){ - global $beanList; - //if we don't have it loaded then lets check against the db - $additional_where = ''; - $db = DBManagerFactory::getInstance(); - $query = "SELECT acl_actions.*"; - //only if we have a role id do we need to join the table otherwise lets use the ones defined in acl_actions as the defaults - if(!empty($role_id)){ - $query .=" ,acl_roles_actions.access_override "; - } - $query .=" FROM acl_actions "; - - if(!empty($role_id)){ - $query .= " LEFT JOIN acl_roles_actions ON acl_roles_actions.role_id = '$role_id' AND acl_roles_actions.action_id = acl_actions.id AND acl_roles_actions.deleted = 0"; - } - $query .= " WHERE acl_actions.deleted=0 ORDER BY acl_actions.category, acl_actions.name"; - $result = $db->query($query); - $role_actions = array(); - - while($row = $db->fetchByAssoc($result) ){ - $action = new ACLAction(); - $action->populateFromRow($row); - if(!empty($row['access_override'])){ - $action->aclaccess = $row['access_override']; - }else{ - $action->aclaccess = ACL_ALLOW_DEFAULT; - - } - //#27877 . If there is no this module in beanlist , we will not show them in UI, no matter this module was deleted or not in ACL_ACTIONS table. - if(empty($beanList[$action->category])){ - continue; - } - //end - - if(!isset($role_actions[$action->category])){ - $role_actions[$action->category] = array(); - } - - $role_actions[$action->category][$action->acltype][$action->name] = $action->toArray(); - - - } - return $role_actions; - - } + global $beanList; + //if we don't have it loaded then lets check against the db + $additional_where = ''; + $db = DBManagerFactory::getInstance(); + $query = "SELECT acl_actions.*"; + //only if we have a role id do we need to join the table otherwise lets use the ones defined in acl_actions as the defaults + if(!empty($role_id)){ + $query .=" ,acl_roles_actions.access_override "; + } + $query .=" FROM acl_actions "; + + if(!empty($role_id)){ + $query .= " LEFT JOIN acl_roles_actions ON acl_roles_actions.role_id = '$role_id' AND acl_roles_actions.action_id = acl_actions.id AND acl_roles_actions.deleted = 0"; + } + $query .= " WHERE acl_actions.deleted=0 ORDER BY acl_actions.category, acl_actions.name"; + $result = $db->query($query); + $role_actions = array(); + + while($row = $db->fetchByAssoc($result) ){ + $action = new ACLAction(); + $action->populateFromRow($row); + if(!empty($row['access_override'])){ + $action->aclaccess = $row['access_override']; + }else{ + $action->aclaccess = ACL_ALLOW_DEFAULT; + + } + //#27877 . If there is no this module in beanlist , we will not show them in UI, no matter this module was deleted or not in ACL_ACTIONS table. + if(empty($beanList[$action->category])){ + continue; + } + //end + + if(!isset($role_actions[$action->category])){ + $role_actions[$action->category] = array(); + } + + $role_actions[$action->category][$action->acltype][$action->name] = $action->toArray(); + + + } + return $role_actions; + + } /** * function mark_relationships_deleted($id) - * - * special case to delete acl_roles_actions relationship + * + * special case to delete acl_roles_actions relationship * * @param ACLRole GUID $id */ function mark_relationships_deleted($id){ - //we need to delete the actions relationship by hand (special case) - $date_modified = db_convert("'".TimeDate::getInstance()->nowDb()."'", 'datetime'); - $query = "UPDATE acl_roles_actions SET deleted=1 , date_modified=$date_modified WHERE role_id = '$id' AND deleted=0"; - $this->db->query($query); - parent::mark_relationships_deleted($id); + //we need to delete the actions relationship by hand (special case) + $date_modified = db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'", 'datetime'); + $query = "UPDATE acl_roles_actions SET deleted=1 , date_modified=$date_modified WHERE role_id = '$id' AND deleted=0"; + $this->db->query($query); + parent::mark_relationships_deleted($id); } /** * toArray() - * returns this role as an array - * - * @return array of fields with id, name, description - */ - function toArray(){ - $array_fields = array('id', 'name', 'description'); - $arr = array(); - foreach($array_fields as $field){ - if(isset($this->$field)){ - $arr[$field] = $this->$field; - }else{ - $arr[$field] = ''; - } - } - return $arr; - } - - /** - * fromArray($arr) - * converts an array into an role mapping name value pairs into files - * - * @param Array $arr - */ - function fromArray($arr){ - foreach($arr as $name=>$value){ - $this->$name = $value; - } - } + * returns this role as an array + * + * @return array of fields with id, name, description + */ + function toArray(){ + $array_fields = array('id', 'name', 'description'); + $arr = array(); + foreach($array_fields as $field){ + if(isset($this->$field)){ + $arr[$field] = $this->$field; + }else{ + $arr[$field] = ''; + } + } + return $arr; + } + + /** + * fromArray($arr) + * converts an array into an role mapping name value pairs into files + * + * @param Array $arr + */ + function fromArray($arr){ + foreach($arr as $name=>$value){ + $this->$name = $value; + } + } } ?> \ No newline at end of file diff --git a/modules/ACLRoles/DetailUserRole.php b/modules/ACLRoles/DetailUserRole.php index dcbc34a2..316b9390 100644 --- a/modules/ACLRoles/DetailUserRole.php +++ b/modules/ACLRoles/DetailUserRole.php @@ -44,49 +44,49 @@ $mod_strings = return_module_language($GLOBALS['current_language'], 'Users'); $focus = new User(); $focus->retrieve($_REQUEST['record']); -if ( !is_admin($focus) ) { - $sugar_smarty = new Sugar_Smarty(); - $sugar_smarty->assign('MOD', $mod_strings); - $sugar_smarty->assign('APP', $app_strings); - $sugar_smarty->assign('APP_LIST', $app_list_strings); - - $categories = ACLAction::getUserActions($_REQUEST['record'],true); - - //clear out any removed tabs from user display - if(!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Users')){ - $tabs = $focus->getPreference('display_tabs'); - global $modInvisList; - if(!empty($tabs)){ - foreach($categories as $key=>$value){ - if(!in_array($key, $tabs) && !in_array($key, $modInvisList) ){ - unset($categories[$key]); - - } - } - - } - } - - $names = array(); - $names = ACLAction::setupCategoriesMatrix($categories); - if(!empty($names))$tdwidth = 100 / sizeof($names); - $sugar_smarty->assign('APP', $app_list_strings); - $sugar_smarty->assign('CATEGORIES', $categories); - $sugar_smarty->assign('TDWIDTH', $tdwidth); - $sugar_smarty->assign('ACTION_NAMES', $names); - - $title = getClassicModuleTitle( '',array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_ROLES_SUBPANEL_TITLE']), ''); - - $sugar_smarty->assign('TITLE', $title); - $sugar_smarty->assign('USER_ID', $focus->id); - $sugar_smarty->assign('LAYOUT_DEF_KEY', 'UserRoles'); - echo $sugar_smarty->fetch('modules/ACLRoles/DetailViewUser.tpl'); - - - //this gets its layout_defs.php file from the user not from ACLRoles so look in modules/Users for the layout defs - require_once('include/SubPanel/SubPanelTiles.php'); - $modules_exempt_from_availability_check=array('Users'=>'Users','ACLRoles'=>'ACLRoles',); - $subpanel = new SubPanelTiles($focus, 'UserRoles'); - - echo $subpanel->display(true,true); + + +$sugar_smarty = new Sugar_Smarty(); +$sugar_smarty->assign('MOD', $mod_strings); +$sugar_smarty->assign('APP', $app_strings); +$sugar_smarty->assign('APP_LIST', $app_list_strings); + +$categories = ACLAction::getUserActions($_REQUEST['record'],true); + +//clear out any removed tabs from user display +if(!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Users')){ + $tabs = $focus->getPreference('display_tabs'); + global $modInvisList, $modInvisListActivities; + if(!empty($tabs)){ + foreach($categories as $key=>$value){ + if(!in_array($key, $tabs) && !in_array($key, $modInvisList) && !in_array($key, $modInvisListActivities) ){ + unset($categories[$key]); + + } + } + + } } + +$names = array(); +$names = ACLAction::setupCategoriesMatrix($categories); +if(!empty($names))$tdwidth = 100 / sizeof($names); +$sugar_smarty->assign('APP', $app_list_strings); +$sugar_smarty->assign('CATEGORIES', $categories); +$sugar_smarty->assign('TDWIDTH', $tdwidth); +$sugar_smarty->assign('ACTION_NAMES', $names); + +$title = get_module_title( '',$mod_strings['LBL_ROLES_SUBPANEL_TITLE'], ''); + +$sugar_smarty->assign('TITLE', $title); +$sugar_smarty->assign('USER_ID', $focus->id); +$sugar_smarty->assign('LAYOUT_DEF_KEY', 'UserRoles'); +echo $sugar_smarty->fetch('modules/ACLRoles/DetailViewUser.tpl'); + + +//this gets its layout_defs.php file from the user not from ACLRoles so look in modules/Users for the layout defs +require_once('include/SubPanel/SubPanelTiles.php'); +$modules_exempt_from_availability_check=array('Users'=>'Users','ACLRoles'=>'ACLRoles',); +$subpanel = new SubPanelTiles($focus, 'UserRoles'); + +echo $subpanel->display(true,true); diff --git a/modules/ACLRoles/EditAllBody.tpl b/modules/ACLRoles/EditAllBody.tpl index 48e7c200..3f9bee25 100644 --- a/modules/ACLRoles/EditAllBody.tpl +++ b/modules/ACLRoles/EditAllBody.tpl @@ -84,7 +84,7 @@ {if $ACTION_NAME==$ACTION_NAME_ACTIVE}
    ". +if($db->dbType != 'mysql'){ + $xtpl->assign("NO_MYSQL_MESSAGE", "
    ". $mod_strings['LBL_DIAGNOSTIC_NO_MYSQL']. "
     
    ".$mod_strings['LBL_DST_FIX_TARGET']." @@ -285,7 +291,7 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) {
    - + @@ -294,7 +300,7 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) { ".$mod_strings['LBL_DST_CURRENT_SERVER_TIME']." @@ -324,7 +330,7 @@ if(!empty($_REQUEST['confirmed']) && $_REQUEST['confirmed'] == true) { if(!empty($_POST['upgrade'])){ // enter row in versions table - $qDst = "INSERT INTO versions VALUES ('".create_guid()."', 0, '".$timedate->nowDB()."', '".$timedate->nowDB()."', '".$current_user->id."', '".$current_user->id."', 'DST Fix', '3.5.1b', '3.5.1b')"; + $qDst = "INSERT INTO versions VALUES ('".create_guid()."', 0, '".gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('now'))."', '".gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('now'))."', '".$current_user->id."', '".$current_user->id."', 'DST Fix', '3.5.1b', '3.5.1b')"; $qRes = $db->query($qDst); // record server's time zone locale for future upgrades $qSTZ = "INSERT INTO config VALUES ('Update', 'server_timezone', '".$_REQUEST['server_timezone']."')"; @@ -339,7 +345,7 @@ if(!empty($_POST['upgrade'])){ -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_APPLY_DST_FIX']), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_APPLY_DST_FIX'], true); if(empty($disabled)){ ?> @@ -352,7 +358,7 @@ if(empty($disabled)){ @@ -368,9 +374,9 @@ if(empty($disabled)){ } ?>
    - ".$timedate->to_display_time($timedate->nowDb(), true, false)." + ".$timedate->to_display_time(date($GLOBALS['timedate']->get_db_date_time_format(), strtotime('now')), true, false)."

    - ' onclick='document.location.href="index.php?module=Administration&action=updateTimezonePrefs"'> + ' onclick='document.location.href="index.php?module=Administration&action=updateTimezonePrefs"'>
    - - + - +
    @@ -388,7 +394,7 @@ echo $display; -"; }else{ diff --git a/modules/Administration/ExportCustomFieldStructure.php b/modules/Administration/ExportCustomFieldStructure.php index 098df41f..f0e18602 100644 --- a/modules/Administration/ExportCustomFieldStructure.php +++ b/modules/Administration/ExportCustomFieldStructure.php @@ -42,7 +42,7 @@ $fields = array(); $str = ''; while($row = $db->fetchByAssoc($result)){ foreach($row as $name=>$value){ - $str.= "$name:::$value\n"; + $str.= "$name:::$value\n"; } $str .= "DONE\n"; } @@ -51,7 +51,7 @@ ob_get_clean(); header("Content-Disposition: attachment; filename=CustomFieldStruct.sugar"); header("Content-Type: text/txt; charset={$app_strings['LBL_CHARSET']}"); header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); -header( "Last-Modified: " . TimeDate::httpTime() ); +header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); header( "Cache-Control: post-check=0, pre-check=0", false ); header("Content-Length: ".strlen($str)); echo $str; diff --git a/modules/Administration/Locale.php b/modules/Administration/Locale.php index 7193155c..3b78024c 100644 --- a/modules/Administration/Locale.php +++ b/modules/Administration/Locale.php @@ -41,7 +41,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights * Reserved. Contributor(s): ______________________________________.. * *******************************************************************************/ -global $current_user, $sugar_config; +global $current_user; if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); require_once('modules/Configurator/Configurator.php'); @@ -53,7 +53,7 @@ echo getClassicModuleTitle( "".translate('LBL_MODULE_NAME','Administration')."", $mod_strings['LBL_MANAGE_LOCALE'], ), - false + true ); $cfg = new Configurator(); diff --git a/modules/Administration/PasswordManager.php b/modules/Administration/PasswordManager.php index 88a206ff..f468f445 100644 --- a/modules/Administration/PasswordManager.php +++ b/modules/Administration/PasswordManager.php @@ -62,14 +62,11 @@ function clearPasswordSettings() { } require_once('modules/Administration/Forms.php'); -echo getClassicModuleTitle( - "Administration", - array( - "".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_MANAGE_PASSWORD_TITLE'], - ), - false - ); +echo get_module_title( + $mod_strings['LBL_MODULE_NAME'], + $mod_strings['LBL_MANAGE_PASSWORD_TITLE'], + true + ); require_once('modules/Configurator/Configurator.php'); $configurator = new Configurator(); $sugarConfig = SugarConfig::getInstance(); diff --git a/modules/Administration/QuickRepairAndRebuild.php b/modules/Administration/QuickRepairAndRebuild.php index 107293ec..4fc1f9c6 100644 --- a/modules/Administration/QuickRepairAndRebuild.php +++ b/modules/Administration/QuickRepairAndRebuild.php @@ -108,7 +108,6 @@ class RepairAndClear $this->clearThemeCache(); $this->clearXMLfiles(); $this->clearSearchCache(); - $this->clearExternalAPICache(); $this->rebuildExtensions(); $this->rebuildAuditTables(); $this->repairDatabase(); @@ -129,23 +128,21 @@ class RepairAndClear $hideModuleMenu = true; include_once('modules/Administration/repairDatabase.php'); } - + public function repairDatabaseSelectModules() { global $current_user, $mod_strings, $dictionary; set_time_limit(3600); - + include('include/modules.php'); //bug 15661 $db = DBManagerFactory::getInstance(); if (is_admin($current_user) || is_admin_for_any_module($current_user)) { $export = false; - if($this->show_output) echo getClassicModuleTitle($mod_strings['LBL_REPAIR_DATABASE'], array($mod_strings['LBL_REPAIR_DATABASE']), false); - if($this->show_output) { - echo "

    {$mod_strings['LBL_REPAIR_DATABASE_PROCESSING']}

    "; - ob_flush(); - } + if($this->show_output) echo get_module_title($mod_strings['LBL_REPAIR_DATABASE'], $mod_strings['LBL_REPAIR_DATABASE'], true); + if($this->show_output) echo "

    {$mod_strings['LBL_REPAIR_DATABASE_PROCESSING']}

    "; + ob_flush(); $sql = ''; if($this->module_list && !in_array($mod_strings['LBL_ALL_MODULES'],$this->module_list)) { @@ -161,20 +158,20 @@ class RepairAndClear require_once($beanFiles[$bean_name]); $GLOBALS['reload_vardefs'] = true; $focus = new $bean_name (); - #30273 + #30273 if($focus->disable_vardefs == false) { include('modules/' . $focus->module_dir . '/vardefs.php'); - - + + if($this->show_output) print_r("

    " .$mod_strings['LBL_REPAIR_DB_FOR'].' '. $bean_name . "

    "); $sql .= $db->repairTable($focus, $this->execute); } } } - + $GLOBALS['sugar_config']['developerMode'] = $dm; - + if ($this->show_output) echo ""; if (isset ($sql) && !empty ($sql)) { @@ -202,9 +199,9 @@ class RepairAndClear } else { sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } + } } - + public function rebuildExtensions() { global $mod_strings; @@ -213,31 +210,31 @@ class RepairAndClear require_once('ModuleInstall/ModuleInstaller.php'); $mi = new ModuleInstaller(); $mi->rebuild_all(!$this->show_output); - + // Remove the "Rebuild Extensions" red text message on admin logins - + if($this->show_output) echo $mod_strings['LBL_REBUILD_REL_UPD_WARNING']; - + // clear the database row if it exists (just to be sure) $query = "DELETE FROM versions WHERE name='Rebuild Extensions'"; $GLOBALS['log']->info($query); $GLOBALS['db']->query($query); - + // insert a new database row to show the rebuild extensions is done $id = create_guid(); - $gmdate = gmdate('Y-m-d H:i:s'); + $gmdate = gmdate($GLOBALS['timedate']->get_db_date_time_format()); $date_entered = db_convert("'$gmdate'", 'datetime'); $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' - . "VALUES ('$id', '0', $date_entered, $date_entered, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')"; + . "VALUES ('$id', '0', $date_entered, $date_entered, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')"; $GLOBALS['log']->info($query); $GLOBALS['db']->query($query); - + // unset the session variable so it is not picked up in DisplayWarnings.php if(isset($_SESSION['rebuild_extensions'])) { unset($_SESSION['rebuild_extensions']); } } - + //Cache Clear Methods public function clearSmarty() { @@ -250,15 +247,15 @@ class RepairAndClear global $mod_strings; if($this->show_output) echo "

    {$mod_strings['LBL_QR_XMLFILES']}

    "; $this->_clearCache($GLOBALS['sugar_config']['tmp_dir'], '.xml'); - + include('modules/Versions/ExpectedVersions.php'); - + global $expect_versions; - + if (isset($expect_versions['Chart Data Cache'])) { $version = new Version(); $version->retrieve_by_string_fields(array('name'=>'Chart Data Cache')); - + $version->name = $expect_versions['Chart Data Cache']['name']; $version->file_version = $expect_versions['Chart Data Cache']['file_version']; $version->db_version = $expect_versions['Chart Data Cache']['db_version']; @@ -281,10 +278,10 @@ class RepairAndClear { global $mod_strings; if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEARSUGARFEEDCACHE']}

    "; - + SugarFeed::flushBackendCache(); } - public function clearTpls() + public function clearTpls() { global $mod_strings; if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEARTEMPLATE']}

    "; @@ -296,7 +293,7 @@ class RepairAndClear else $this->_clearCache($GLOBALS['sugar_config']['cache_dir'].'modules', '.tpl'); } - public function clearVardefs() + public function clearVardefs() { global $mod_strings; if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEARVADEFS']}

    "; @@ -308,7 +305,7 @@ class RepairAndClear else $this->_clearCache($GLOBALS['sugar_config']['cache_dir'].'modules', 'vardefs.php'); } - public function clearJsFiles() + public function clearJsFiles() { global $mod_strings; if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEARJS']}

    "; @@ -323,7 +320,7 @@ class RepairAndClear $this->_clearCache($GLOBALS['sugar_config']['cache_dir'].'modules', '.js'); } - public function clearJsLangFiles() + public function clearJsLangFiles() { global $mod_strings; if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEARJSLANG']}

    "; @@ -338,10 +335,10 @@ class RepairAndClear /** * Remove the language cache files from cache/modules//language */ - public function clearLanguageCache() + public function clearLanguageCache() { global $mod_strings; - + if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEARLANG']}

    "; //clear cache using the list $module_list_from_cache if ( !empty($this->module_list) && is_array($this->module_list) ) { @@ -357,7 +354,7 @@ class RepairAndClear } /** - * Remove the cached unified_search_modules.php and unified_search_modules_display.php files + * Remove the cache/modules/unified_search_modules.php */ public function clearSearchCache() { global $mod_strings, $sugar_config; @@ -370,20 +367,9 @@ class RepairAndClear if(file_exists($src_file)) { unlink( "$src_file" ); } - - $src_file = $search_dir . 'modules/unified_search_modules_display.php'; - if(file_exists($src_file)) { - unlink( "$src_file" ); - } - } - public function clearExternalAPICache() - { - global $mod_strings, $sugar_config; - if($this->show_output) echo "

    {$mod_strings['LBL_QR_CLEAR_EXT_API']}

    "; - require_once('include/externalAPI/ExternalAPIFactory.php'); - ExternalAPIFactory::clearCache(); + } - + ////////////////////////////////////////////////////////////// /////REPAIR AUDIT TABLES public function rebuildAuditTables() @@ -414,11 +400,11 @@ class RepairAndClear private function _rebuildAuditTablesHelper($focus) { global $mod_strings; - + // skip if not a SugarBean object if ( !($focus instanceOf SugarBean) ) return; - + if ($focus->is_AuditEnabled()) { if (!$focus->db->tableExists($focus->get_audit_table_name())) { if($this->show_output) echo $mod_strings['LBL_QR_CREATING_TABLE']." ".$focus->get_audit_table_name().' '.$mod_strings['LBL_FOR'].' '. $focus->object_name.'.
    '; @@ -440,7 +426,7 @@ class RepairAndClear /////////////////////////////////////////////////////////////// //// Recursively unlink all files of the given $extension in the given $thedir. // - private function _clearCache($thedir, $extension) + private function _clearCache($thedir, $extension) { if ($current = @opendir($thedir)) { while (false !== ($children = readdir($current))) { diff --git a/modules/Administration/RebuildRelationship.php b/modules/Administration/RebuildRelationship.php index 879463a1..2ccca051 100644 --- a/modules/Administration/RebuildRelationship.php +++ b/modules/Administration/RebuildRelationship.php @@ -51,7 +51,7 @@ VardefManager::clearVardef () ; // loop through all of the modules and create entries in the Relationships table (the relationships metadata) for every standard relationship, that is, relationships defined in the /modules//vardefs.php // SugarBean::createRelationshipMeta just takes the relationship definition in a file and inserts it as is into the Relationships table -// It does not override or recreate existing relationships +// It does not override or recreate existing relationships foreach ( $GLOBALS['beanFiles'] as $bean => $file ) { if (strlen ( $file ) > 0 && file_exists ( $file )) @@ -75,7 +75,7 @@ foreach ( $GLOBALS['beanFiles'] as $bean => $file ) // do the same for custom relationships (true in the last parameter to SugarBean::createRelationshipMeta) - that is, relationships defined in the custom/modules//Ext/vardefs/ area foreach ( $GLOBALS['beanFiles'] as $bean => $file ) -{ +{ //skip this file if it does not exist if(!file_exists($file)) continue; @@ -107,7 +107,7 @@ foreach ( $GLOBALS['beanFiles'] as $bean => $file ) foreach ( $rel_dictionary as $rel_name => $rel_data ) { $table = $rel_data [ 'table' ] ; - + if (empty ( $_REQUEST [ 'silent' ] )) echo $mod_strings [ 'LBL_REBUILD_REL_PROC_C_META' ] . $rel_name . "..." ; SugarBean::createRelationshipMeta ( $rel_name, $db, $table, $rel_dictionary, '' ) ; @@ -126,7 +126,7 @@ Relationship::delete_cache () ; if (empty ( $_REQUEST [ 'silent' ] )) echo $mod_strings [ 'LBL_REBUILD_REL_UPD_WARNING' ] ; - + // clear the database row if it exists (just to be sure) $query = "DELETE FROM versions WHERE name='Rebuild Relationships'" ; $log->info ( $query ) ; @@ -134,7 +134,7 @@ $db->query ( $query ) ; // insert a new database row to show the rebuild relationships is done $id = create_guid () ; -$gmdate = gmdate('Y-m-d H:i:s'); +$gmdate = gmdate ($GLOBALS['timedate']->get_db_date_time_format()) ; $date_entered = db_convert ( "'$gmdate'", 'datetime' ) ; $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('$id', '0', $date_entered, $date_entered, '1', '1', 'Rebuild Relationships', '4.0.0', '4.0.0')" ; $log->info ( $query ) ; diff --git a/modules/Administration/RebuildSchedulers.php b/modules/Administration/RebuildSchedulers.php index eca72e2f..b2d56485 100644 --- a/modules/Administration/RebuildSchedulers.php +++ b/modules/Administration/RebuildSchedulers.php @@ -35,7 +35,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -echo getClassicModuleTitle('Administration', array($mod_strings['LBL_REBUILD_SCHEDULERS_TITLE']), false); +echo get_module_title('Administration', $mod_strings['LBL_REBUILD_SCHEDULERS_TITLE'].":", true); if(isset($_REQUEST['perform_rebuild']) && $_REQUEST['perform_rebuild'] == 'true') { diff --git a/modules/Administration/RepairActivities.php b/modules/Administration/RepairActivities.php index 55c045ba..4b7be308 100644 --- a/modules/Administration/RepairActivities.php +++ b/modules/Administration/RepairActivities.php @@ -37,15 +37,20 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); if(!is_admin($current_user)) sugar_die("Unauthorized access to administration."); +require_once('modules/Calendar/DateTimeUtil.php'); + global $timedate; $callBean = new Call(); $callQuery = "SELECT * FROM calls where calls.status != 'Held' and calls.deleted=0"; +//$callQuery = "SELECT * FROM calls where calls.name like '1' and calls.deleted=0"; $result = $callBean->db->query($callQuery, true, ""); $row = $callBean->db->fetchByAssoc($result); while ($row != null) { - $date_end = $timedate->fromDb($row['date_start'])->modify("+{$row['duration_hours']} hours {$row['duration_minutes']} mins")->asDb(); + $date_time_start =DateTimeUtil::get_time_start($row['date_start']); + $date_time_end =DateTimeUtil::get_time_end($date_time_start,$row['duration_hours'], $row['duration_minutes']); + $date_end = gmdate("Y-m-d", $date_time_end->ts); $updateQuery = "UPDATE calls set calls.date_end='{$date_end}' where calls.id='{$row['id']}'"; $call = new Call(); $call->db->query($updateQuery); @@ -54,11 +59,14 @@ while ($row != null) { $meetingBean = new Meeting(); $meetingQuery = "SELECT * FROM meetings where meetings.status != 'Held' and meetings.deleted=0"; +//$meetingQuery = "SELECT * FROM meetings where meetings.name like '1' and meetings.deleted=0"; $result = $meetingBean->db->query($meetingQuery, true, ""); $row = $meetingBean->db->fetchByAssoc($result); while ($row != null) { - $date_end = $timedate->fromDb($row['date_start'])->modify("+{$row['duration_hours']} hours {$row['duration_minutes']} mins")->asDb(); + $date_time_start =DateTimeUtil::get_time_start($row['date_start']); + $date_time_end =DateTimeUtil::get_time_end($date_time_start,$row['duration_hours'], $row['duration_minutes']); + $date_end = gmdate("Y-m-d", $date_time_end->ts); $updateQuery = "UPDATE meetings set meetings.date_end='{$date_end}' where meetings.id='{$row['id']}'"; $call = new Call(); $call->db->query($updateQuery); diff --git a/modules/Administration/RepairFieldCasing.php b/modules/Administration/RepairFieldCasing.php index 71ccd9eb..c1d4ad3b 100644 --- a/modules/Administration/RepairFieldCasing.php +++ b/modules/Administration/RepairFieldCasing.php @@ -102,13 +102,7 @@ if(is_admin($current_user)) { $repairClass->module_list[] = $module; foreach($views as $view) { - try{ - $parser = ParserFactory::getParser($view, $module); - } - catch(Exception $e){ - $GLOBALS['log']->fatal("Caught exception in RepairFieldCasing script: ".$e->getMessage()); - continue; - } + $parser = ParserFactory::getParser($view, $module); if(isset($parser->_viewdefs['panels'])) { foreach($parser->_viewdefs['panels'] as $panel_id=>$panel) { foreach($panel as $row_id=>$row) { @@ -149,4 +143,4 @@ if(is_admin($current_user)) { echo '
    '.$mod_strings['LBL_DIAGNOSTIC_DONE']; } -?> +?> \ No newline at end of file diff --git a/modules/Administration/RepairXSS.php b/modules/Administration/RepairXSS.php index 7eaf6f2b..2ad30607 100644 --- a/modules/Administration/RepairXSS.php +++ b/modules/Administration/RepairXSS.php @@ -79,7 +79,7 @@ if(isset($runSilent) && $runSilent == true) { $options = get_select_options_with_id($options, ''); $beanDropDown = ""; - echo getClassicModuleTitle('Administration', array($mod_strings['LBL_REPAIRXSS_TITLE']), false); + echo get_module_title('Administration', $mod_strings['LBL_REPAIRXSS_TITLE'].":", true); echo ""; $smarty = new Sugar_Smarty(); diff --git a/modules/Administration/SupportPortal.php b/modules/Administration/SupportPortal.php index 59e155d8..fbd88b9d 100644 --- a/modules/Administration/SupportPortal.php +++ b/modules/Administration/SupportPortal.php @@ -54,15 +54,9 @@ switch ($_REQUEST['view']) { $GLOBALS['log']->info("Administration SupportPortal"); $iframe_url = add_http("www.sugarcrm.com/network/redirect.php?tmpl=network"); - - echo getClassicModuleTitle( - "Administration", - array( - "".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_SUPPORT_TITLE'], - ), - false - ); + $mod_title = $mod_strings['LBL_SUPPORT_TITLE']; + + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_title, true); $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('iframeURL', $iframe_url); diff --git a/modules/Administration/Updater.html b/modules/Administration/Updater.html index 95c39012..3cacf481 100644 --- a/modules/Administration/Updater.html +++ b/modules/Administration/Updater.html @@ -46,14 +46,16 @@ - +
    {APP.LBL_REQUIRED_SYMBOL} {APP.NTC_REQUIRED}
    - +
    + +
    + @@ -94,5 +96,7 @@

    {MOD.LBL_UPDATE_TITLE}

    +
    diff --git a/modules/Administration/Updater.php b/modules/Administration/Updater.php index 10b9fe2d..a6ccd5fc 100644 --- a/modules/Administration/Updater.php +++ b/modules/Administration/Updater.php @@ -68,15 +68,7 @@ if (isset($_REQUEST['useraction']) && ($_REQUEST['useraction']=='Save' || $_REQU set_sugarbeat($beat); } } - -echo getClassicModuleTitle( - "Administration", - array( - "".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_SUGAR_UPDATE_TITLE'], - ), - false - ); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONFIGURE_UPDATER'], true); if (get_sugarbeat()) $xtpl->assign("SEND_STAT_CHECKED", "checked"); diff --git a/modules/Administration/Upgrade.php b/modules/Administration/Upgrade.php index 8913b6e5..2445a3db 100644 --- a/modules/Administration/Upgrade.php +++ b/modules/Administration/Upgrade.php @@ -45,7 +45,7 @@ global $currentModule; global $gridline; -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_UPGRADE_TITLE']), false); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_UPGRADE_TITLE'], true); $str1=""; if ($GLOBALS['db']->dbType=='oci8') { diff --git a/modules/Administration/UpgradeAccess.php b/modules/Administration/UpgradeAccess.php index 7286416a..1a202ac6 100644 --- a/modules/Administration/UpgradeAccess.php +++ b/modules/Administration/UpgradeAccess.php @@ -42,17 +42,16 @@ global $mod_strings; global $sugar_config; $ignoreCase = (substr_count(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache/2') > 0)?'(?i)':''; -$htaccess_file = getcwd() . "/.htaccess"; +$htaccess_file = getcwd() . "/.htaccess"; $contents = ''; $restrict_str = <<' . $mod_strings['LBL_HT_NO_WRITE'] . '$htaccess_file

    \n'; echo '

    ' . $mod_strings['LBL_HT_NO_WRITE_2'] . '

    \n'; @@ -103,7 +102,7 @@ eoq; if(file_exists($uploadHta) && filesize($uploadHta)) { // file exists, parse to make sure it is current if(is_writable($uploadHta) && ($fpUploadHta = @sugar_fopen($uploadHta, "r+"))) { - $oldHtaccess = file_get_contents($uploadHta); + $oldHtaccess = fread($fpUploadHta, filesize($uploadHta)); // use a different regex boundary b/c .htaccess uses the typicals if(!preg_match("=".$denyAll."=", $oldHtaccess)) { $oldHtaccess .= $denyAll; diff --git a/modules/Administration/UpgradeHistory.php b/modules/Administration/UpgradeHistory.php index 344198df..9d5064cb 100644 --- a/modules/Administration/UpgradeHistory.php +++ b/modules/Administration/UpgradeHistory.php @@ -42,41 +42,40 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); // The history of upgrades on the system class UpgradeHistory extends SugarBean { - var $new_schema = true; - var $module_dir = 'Administration'; - - // Stored fields - var $id; - var $filename; - var $md5sum; - var $type; - var $version; - var $status; - var $date_entered; + var $new_schema = true; + var $module_dir = 'Administration'; + + // Stored fields + var $id; + var $filename; + var $md5sum; + var $type; + var $version; + var $status; + var $date_entered; var $name; var $description; var $id_name; var $manifest; var $enabled; + + var $table_name = "upgrade_history"; + var $object_name = "UpgradeHistory"; + var $column_fields = Array( "id", "filename", "md5sum", "type", "version", "status", "date_entered" ); - var $table_name = "upgrade_history"; - var $object_name = "UpgradeHistory"; - var $column_fields = Array( "id", "filename", "md5sum", "type", "version", "status", "date_entered" ); - var $disable_custom_fields = true; - - function delete() - { - $this->dbManager->query( "delete from " . $this->table_name . " where id = '" . $this->id . "'" ); - } - - function UpgradeHistory() - { - parent::SugarBean(); + function delete() + { + $this->dbManager->query( "delete from " . $this->table_name . " where id = '" . $this->id . "'" ); + } + + function UpgradeHistory() + { + parent::SugarBean(); $this->disable_row_level_security = true; - } - + } + function getAllOrderBy($orderBy){ - $query = "SELECT id FROM " . $this->table_name . " ORDER BY ".$orderBy; + $query = "SELECT id FROM " . $this->table_name . " ORDER BY ".$orderBy; return $this->getList($query); } /** @@ -88,21 +87,21 @@ class UpgradeHistory extends SugarBean function checkForExisting($patch_to_check){ $uh = new UpgradeHistory(); if($patch_to_check != null){ - - if(empty($patch_to_check->id_name)){ - $where = " WHERE name = '$patch_to_check->name' "; + + if(empty($patch_to_check->id_name)){ + $where = " WHERE name = '$patch_to_check->name' "; }else{ - $where = " WHERE id_name = '$patch_to_check->id_name' "; + $where = " WHERE id_name = '$patch_to_check->id_name' "; } - + if(!empty($patch_to_check->id)){ - $where .= " AND id != '$patch_to_check->id' "; - }else{ - $where .= " AND id is not null "; - } - - $query = "SELECT id FROM " . $this->table_name . " ". $where; - + $where .= " AND id != '$patch_to_check->id' "; + }else{ + $where .= " AND id is not null "; + } + + $query = "SELECT id FROM " . $this->table_name . " ". $where; + $result = $uh->db->query($query); if(empty($result)){ return null; @@ -112,121 +111,121 @@ class UpgradeHistory extends SugarBean return null; } if(!empty($row['id'])){ - return $uh->retrieve($row['id']); + return $uh->retrieve($row['id']); } } return null; } - + /** * Check if this is an upgrade, if it is then return the latest version before this installation */ function determineIfUpgrade($id_name, $version){ - $query = "SELECT id, version FROM " . $this->table_name . " WHERE id_name = '$id_name' ORDER BY date_entered DESC"; - $result = $this->db->query($query); + $query = "SELECT id, version FROM " . $this->table_name . " WHERE id_name = '$id_name' ORDER BY date_entered DESC"; + $result = $this->db->query($query); if(empty($result)){ - return null; + return null; }else{ - $temp_version = 0; - $id = ''; - while($row = $this->db->fetchByAssoc($result)) - { - if(!$this->is_right_version_greater(explode('.', $row['version']), explode('.', $temp_version))){ - $temp_version = $row['version']; - $id = $row['id']; - } - }//end while - if($this->is_right_version_greater(explode('.', $temp_version), explode('.', $version), false)) - return array('id' => $id, 'version' => $temp_version); - else - return null; + $temp_version = 0; + $id = ''; + while($row = $this->db->fetchByAssoc($result)) + { + if(!$this->is_right_version_greater(explode('.', $row['version']), explode('.', $temp_version))){ + $temp_version = $row['version']; + $id = $row['id']; + } + }//end while + if($this->is_right_version_greater(explode('.', $temp_version), explode('.', $version), false)) + return array('id' => $id, 'version' => $temp_version); + else + return null; } } - function getAll() - { - $query = "SELECT id FROM " . $this->table_name . " ORDER BY date_entered desc"; - return $this->getList($query); - } - + function getAll() + { + $query = "SELECT id FROM " . $this->table_name . " ORDER BY date_entered desc"; + return $this->getList($query); + } + function getList($query){ - return( parent::build_related_list( $query, $this ) ); - } - - function findByMd5( $var_md5 ) - { - $query = "SELECT id FROM " . $this->table_name . " where md5sum = '$var_md5'"; - return( parent::build_related_list( $query, $this ) ); + return( parent::build_related_list( $query, $this ) ); } - - function UninstallAvailable($patch_list, $patch_to_check) - { + + function findByMd5( $var_md5 ) + { + $query = "SELECT id FROM " . $this->table_name . " where md5sum = '$var_md5'"; + return( parent::build_related_list( $query, $this ) ); + } + + function UninstallAvailable($patch_list, $patch_to_check) + { //before we even go through the list, let us try to see if we find a match. $history_object = $this->checkForExisting($patch_to_check); if($history_object != null){ - if((!empty($history_object->id_name) && !empty($patch_to_check->id_name) && strcmp($history_object->id_name, $patch_to_check->id_name) == 0) || strcmp($history_object->name, $patch_to_check->name) == 0){ + if((!empty($history_object->id_name) && !empty($patch_to_check->id_name) && strcmp($history_object->id_name, $patch_to_check->id_name) == 0) || strcmp($history_object->name, $patch_to_check->name) == 0){ //we have found a match //if the patch_to_check version is greater than the found version - return ($this->is_right_version_greater(explode('.', $history_object->version), explode('.', $patch_to_check->version))); + return ($this->is_right_version_greater(explode('.', $history_object->version), explode('.', $patch_to_check->version))); }else{ return true; - } + } } //we will only go through this loop if we have not found another UpgradeHistory object //with a matching unique_key in the database - foreach($patch_list as $more_recent_patch) - { - if($more_recent_patch->id == $patch_to_check->id) - break; - + foreach($patch_list as $more_recent_patch) + { + if($more_recent_patch->id == $patch_to_check->id) + break; + //we will only resort to checking the files if we cannot find the unique_keys //or the unique_keys do not match - $patch_to_check_backup_path = clean_path(remove_file_extension(from_html($patch_to_check->filename))).'-restore'; - $more_recent_patch_backup_path = clean_path(remove_file_extension(from_html($more_recent_patch->filename))).'-restore'; - if($this->foundConflict($patch_to_check_backup_path, $more_recent_patch_backup_path) && - ($more_recent_patch->date_entered >= $patch_to_check->date_entered)){ - return false; - } - } - - return true; - } - - function foundConflict($check_path, $recent_path) - { - if(is_file($check_path)) - { - if(file_exists($recent_path)) - return true; - else - return false; - } - elseif(is_dir($check_path)) - { - $status = false; - - $d = dir( $check_path ); - while( $f = $d->read() ) - { - if( $f == "." || $f == ".." ) - continue; - - $status = $this->foundConflict("$check_path/$f", "$recent_path/$f"); - - if($status) - break; - } - - $d->close(); - return( $status ); - } - - return false; - } + $patch_to_check_backup_path = clean_path(remove_file_extension(from_html($patch_to_check->filename))).'-restore'; + $more_recent_patch_backup_path = clean_path(remove_file_extension(from_html($more_recent_patch->filename))).'-restore'; + if($this->foundConflict($patch_to_check_backup_path, $more_recent_patch_backup_path) && + ($more_recent_patch->date_entered >= $patch_to_check->date_entered)){ + return false; + } + } + + return true; + } + function foundConflict($check_path, $recent_path) + { + if(is_file($check_path)) + { + if(file_exists($recent_path)) + return true; + else + return false; + } + elseif(is_dir($check_path)) + { + $status = false; + + $d = dir( $check_path ); + while( $f = $d->read() ) + { + if( $f == "." || $f == ".." ) + continue; + + $status = $this->foundConflict("$check_path/$f", "$recent_path/$f"); + + if($status) + break; + } + + $d->close(); + return( $status ); + } + + return false; + } + /** * Given a left version and a right version, determine if the right hand side is greater - * + * * @param left the client sugar version * @param right the server version * @@ -235,7 +234,7 @@ class UpgradeHistory extends SugarBean */ function is_right_version_greater($left, $right, $equals_is_greater = true){ if(count($left) == 0 && count($right) == 0){ - return $equals_is_greater; + return $equals_is_greater; } else if(count($left) == 0 || count($right) == 0){ return true; @@ -251,38 +250,38 @@ class UpgradeHistory extends SugarBean else return false; } - + /** * Given an array of id_names and versions, check if the dependencies are installed - * + * * @param dependencies an array of id_name, version to check if these dependencies are installed * on the system - * + * * @return not_found an array of id_names that were not found to be installed on the system */ function checkDependencies($dependencies = array()){ - $not_found = array(); - foreach($dependencies as $dependent){ - $found = false; - $query = "SELECT id FROM $this->table_name WHERE id_name = '".$dependent['id_name']."'"; - $matches = $this->getList($query); - if(0 != sizeof($matches)){ - foreach($matches as $match){ - if($this->is_right_version_greater(explode('.', $match->version), explode('.', $dependent['version']))){ - $found = true; - break; - }//fi - }//rof - }//fi - if(!$found){ - $not_found[] = $dependent['id_name']; - }//fi - }//rof - return $not_found; + $not_found = array(); + foreach($dependencies as $dependent){ + $found = false; + $query = "SELECT id FROM $this->table_name WHERE id_name = '".$dependent['id_name']."'"; + $matches = $this->getList($query); + if(0 != sizeof($matches)){ + foreach($matches as $match){ + if($this->is_right_version_greater(explode('.', $match->version), explode('.', $dependent['version']))){ + $found = true; + break; + }//fi + }//rof + }//fi + if(!$found){ + $not_found[] = $dependent['id_name']; + }//fi + }//rof + return $not_found; } function retrieve($id = -1, $encode=true,$deleted=true) { - return parent::retrieve($id,$encode,false); //ignore the deleted filter. the table does not have the deleted column in it. - } + return parent::retrieve($id,$encode,false); //ignore the deleted filter. the table does not have the deleted column in it. + } } ?> \ No newline at end of file diff --git a/modules/Administration/UpgradeWizard.php b/modules/Administration/UpgradeWizard.php index 1e8a3163..5a530b56 100644 --- a/modules/Administration/UpgradeWizard.php +++ b/modules/Administration/UpgradeWizard.php @@ -112,10 +112,9 @@ if( isset( $_REQUEST['run'] ) && ($_REQUEST['run'] != "") ){ echo $mod_strings['ERR_UW_NO_UPLOAD_FILE']; } else{ - $ext = end(explode(".", $_FILES['upgrade_zip']['name'])); - if($ext === $_FILES['upgrade_zip']['name'] || $ext != 'zip' || !move_uploaded_file($_FILES['upgrade_zip']['tmp_name'], getAbsolutePath($sugar_config['upload_dir'].$_FILES['upgrade_zip']['name'],true))) { + if(!move_uploaded_file($_FILES['upgrade_zip']['tmp_name'], getAbsolutePath($sugar_config['upload_dir'].$_FILES['upgrade_zip']['name'],true))) { unlinkTempFiles(); - sugar_die("Invalid Package"); + die($mod_strings['ERR_NOT_VALID_UPLOAD']); } else { $tempFile = getAbsolutePath($sugar_config['upload_dir'].$_FILES['upgrade_zip']['name'],true); $perform = true; @@ -220,10 +219,10 @@ if( isset( $_REQUEST['run'] ) && ($_REQUEST['run'] != "") ){ } if( $view == "module") { - print( getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_LOADER_TITLE']), false) ); + print( get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_LOADER_TITLE'], true) ); } else { - print( getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_UPGRADE_WIZARD_TITLE']), false) ); + print( get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_UPGRADE_WIZARD_TITLE'], true) ); } // upload link diff --git a/modules/Administration/UpgradeWizardCommon.php b/modules/Administration/UpgradeWizardCommon.php index b44b77fc..6005bc31 100644 --- a/modules/Administration/UpgradeWizardCommon.php +++ b/modules/Administration/UpgradeWizardCommon.php @@ -133,7 +133,6 @@ function getImageForType( $type ){ } function getLanguagePackName( $the_file ){ - global $app_list_strings; require_once( "$the_file" ); if( isset( $app_list_strings["language_pack_name"] ) ){ return( $app_list_strings["language_pack_name"] ); @@ -160,7 +159,6 @@ function getUITextForMode( $mode ){ function run_upgrade_wizard_sql( $script ){ global $unzip_dir; global $sugar_config; - global $mod_strings; $db_type = $sugar_config['dbconfig']['db_type']; $script = str_replace( "%db_type%", $db_type, $script ); diff --git a/modules/Administration/UpgradeWizard_commit.php b/modules/Administration/UpgradeWizard_commit.php index 89be3719..48f8755f 100644 --- a/modules/Administration/UpgradeWizard_commit.php +++ b/modules/Administration/UpgradeWizard_commit.php @@ -95,7 +95,7 @@ function UWrebuild() { // insert a new database row to show the rebuild extensions is done $id = create_guid(); - $gmdate = TimeDate::getInstance()->nowDb(); + $gmdate = gmdate($GLOBALS['timedate']->get_db_date_time_format()); $date_entered = db_convert("'$gmdate'", 'datetime'); $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) ' . "VALUES ('$id', '0', $date_entered, $date_entered, '1', '1', 'Rebuild Extensions', '4.0.0', '4.0.0')"; diff --git a/modules/Administration/UpgradeWizard_prepare.php b/modules/Administration/UpgradeWizard_prepare.php index 58bb0046..f45eca00 100644 --- a/modules/Administration/UpgradeWizard_prepare.php +++ b/modules/Administration/UpgradeWizard_prepare.php @@ -37,7 +37,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); - + require_once('modules/Administration/UpgradeWizardCommon.php'); @@ -53,7 +53,7 @@ if( !isset($_REQUEST['mode']) || ($_REQUEST['mode'] == "") ){ } $unzip_dir = mk_temp_dir( $base_tmp_upgrade_dir ); -$install_file = hashToFile($_REQUEST['install_file']); +$install_file = hashToFile($_REQUEST['install_file']); $hidden_fields = ""; $new_lang_name = ""; $new_lang_desc = ""; @@ -242,11 +242,15 @@ else { } echo '
    '; if($require_license){ - $contents = sugar_file_get_contents($license_file); + $fh = sugar_fopen($license_file, 'r'); + $contents = fread($fh, filesize($license_file)); + fclose($fh); $readme_contents = ''; if($found_readme){ if(file_exists($readme_file) && filesize($readme_file) > 0){ - $readme_contents = file_get_contents($readme_file); + $fh = sugar_fopen($readme_file, 'r'); + $readme_contents = fread($fh, filesize($readme_file)); + fclose($fh); }elseif(!empty($manifest['readme'])){ $readme_contents = $manifest['readme']; } @@ -274,14 +278,14 @@ if($require_license){
    {$mod_strings['LBL_ACCEPT']}  {$mod_strings['LBL_DENY']}
    @@ -339,10 +343,10 @@ switch( $mode ){ } -?> +?> - +
    '; echo '
    @@ -446,9 +450,9 @@ if($mode == "Disable" || $mode == "Enable"){ echo 'if(document.getElementById("radio_overwrite_files") != null && document.getElementById("radio_do_not_overwrite_files") != null){ var overwrite = false; if(document.getElementById("radio_overwrite_files").checked){ - overwrite = true - } - } + overwrite = true + } + } return true;'; }else{ echo 'return true;'; @@ -485,24 +489,24 @@ echo ''; - + $fileHash = fileToHash($install_file ); ?> @@ -526,7 +530,7 @@ echo '"; - + if (isset ($sql) && !empty ($sql)) { $qry_str = ""; @@ -172,5 +171,5 @@ if (is_admin($current_user) || isset ($from_sync_client) || is_admin_for_any_mod } } else { - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); + sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); } \ No newline at end of file diff --git a/modules/Administration/templates/ConfigureTabs.tpl b/modules/Administration/templates/ConfigureTabs.tpl index 61b4e0cc..9f0cadc8 100644 --- a/modules/Administration/templates/ConfigureTabs.tpl +++ b/modules/Administration/templates/ConfigureTabs.tpl @@ -36,7 +36,7 @@ *} - + {overlib_includes} diff --git a/modules/Administration/templates/GlobalSearchSettings.tpl b/modules/Administration/templates/GlobalSearchSettings.tpl deleted file mode 100644 index fe3c31cf..00000000 --- a/modules/Administration/templates/GlobalSearchSettings.tpl +++ /dev/null @@ -1,154 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} - - -
    - - - - - - - - -
    - - -
    - -
    - - - - - -
    -
    -
    -
    -
    -
    - - - - - -
    - - -
    -
    - - \ No newline at end of file diff --git a/modules/Administration/templates/Languages.tpl b/modules/Administration/templates/Languages.tpl deleted file mode 100644 index 6b645e97..00000000 --- a/modules/Administration/templates/Languages.tpl +++ /dev/null @@ -1,152 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} - - -{overlib_includes} - - - - - @@ -609,7 +609,6 @@ function changeEmailScreenDisplay(smtptype) break; } notify_setrequired(); - setDefaultSMTPPort(); } //changeEmailScreenDisplay("{/literal}{$mail_smtptype}{literal}"); @@ -775,19 +774,6 @@ function notify_setrequired() { return true; } notify_setrequired(); - -function setDefaultSMTPPort() -{ - useSSLPort = !document.getElementById("mail_smtpssl").options[0].selected; - - if ( useSSLPort && document.getElementById("mail_smtpport").value == '25' ) { - document.getElementById("mail_smtpport").value = '465'; - } - if ( !useSSLPort && document.getElementById("mail_smtpport").value == '465' ) { - document.getElementById("mail_smtpport").value = '25'; - } - -} {/literal} {$getNameJs} --> diff --git a/modules/Configurator/views/view.addfontresult.php b/modules/Configurator/views/view.addfontresult.php index baa7a7d8..74509dd3 100644 --- a/modules/Configurator/views/view.addfontresult.php +++ b/modules/Configurator/views/view.addfontresult.php @@ -56,9 +56,9 @@ class ConfiguratorViewAddFontResult extends SugarView { $error = $this->addFont(); $this->ss->assign("MODULE_TITLE", - getClassicModuleTitle( + get_module_title( $mod_strings['LBL_MODULE_ID'], - array($mod_strings['LBL_ADDFONTRESULT_TITLE']), + $mod_strings['LBL_ADDFONTRESULT_TITLE'], false ) ); diff --git a/modules/Configurator/views/view.addfontview.php b/modules/Configurator/views/view.addfontview.php index c55f5e35..7e65918a 100644 --- a/modules/Configurator/views/view.addfontview.php +++ b/modules/Configurator/views/view.addfontview.php @@ -55,9 +55,9 @@ class ConfiguratorViewAddFontView extends SugarView { sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); } $this->ss->assign("MODULE_TITLE", - getClassicModuleTitle( + get_module_title( $mod_strings['LBL_MODULE_ID'], - array($mod_strings['LBL_ADDFONT_TITLE']), + $mod_strings['LBL_ADDFONT_TITLE'], true ) ); diff --git a/modules/Configurator/views/view.edit.php b/modules/Configurator/views/view.edit.php index 11ac671c..6fc650a0 100644 --- a/modules/Configurator/views/view.edit.php +++ b/modules/Configurator/views/view.edit.php @@ -62,7 +62,7 @@ class ConfiguratorViewEdit extends ViewEdit /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; @@ -94,7 +94,7 @@ class ConfiguratorViewEdit extends ViewEdit $this->ss->assign('APP_LIST', $app_list_strings); $this->ss->assign('config', $configurator->config); $this->ss->assign('error', $configurator->errors); - $this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30)); + $this->ss->assign('THEMES', SugarThemeRegistry::availableThemes()); $this->ss->assign('LANGUAGES', get_languages()); $this->ss->assign("JAVASCRIPT",get_set_focus_js(). get_configsettings_js()); $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png')); @@ -121,7 +121,7 @@ class ConfiguratorViewEdit extends ViewEdit $this->ss->assign('filename_suffix', get_select_options_with_id( SugarLogger::$filename_suffix,'')); } - echo $this->getModuleTitle(false); + echo $this->getModuleTitle(); $this->ss->display('modules/Configurator/tpls/EditView.tpl'); diff --git a/modules/Configurator/views/view.fontmanager.php b/modules/Configurator/views/view.fontmanager.php index 7230b272..c56ac1a4 100644 --- a/modules/Configurator/views/view.fontmanager.php +++ b/modules/Configurator/views/view.fontmanager.php @@ -62,9 +62,9 @@ class ConfiguratorViewFontManager extends SugarView { } $this->ss->assign("MODULE_TITLE", - getClassicModuleTitle( + get_module_title( $mod_strings['LBL_MODULE_ID'], - array($mod_strings['LBL_FONTMANAGER_TITLE']), + $mod_strings['LBL_FONTMANAGER_TITLE'], false ) ); diff --git a/modules/Configurator/views/view.sugarpdfsettings.php b/modules/Configurator/views/view.sugarpdfsettings.php deleted file mode 100644 index 992185ce..00000000 --- a/modules/Configurator/views/view.sugarpdfsettings.php +++ /dev/null @@ -1,200 +0,0 @@ -".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_PDFMODULE_NAME'] - ); - } - - /** - * @see SugarView::display() - */ - public function display() - { - global $mod_strings, $app_strings, $app_list_strings; - - require_once("modules/Configurator/metadata/SugarpdfSettingsdefs.php"); - if(file_exists('custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php')){ - require_once('custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php'); - } - - if(!empty($_POST['save'])){ - // Save the logos - $error=$this->checkUploadImage(); - if(empty($error)){ - $focus = new Administration(); - foreach($SugarpdfSettings as $k=>$v){ - if($v['type'] == 'password'){ - if(isset($_POST[$k])){ - $_POST[$k] = blowfishEncode(blowfishGetKey($k), $_POST[$k]); - } - } - } - if(!empty($_POST["sugarpdf_pdf_class"]) && $_POST["sugarpdf_pdf_class"] != PDF_CLASS){ - // clear the cache for quotes detailview in order to switch the pdf class. - if(is_file($GLOBALS['sugar_config']['cache_dir'].'modules/Quotes/DetailView.tpl')) - unlink($GLOBALS['sugar_config']['cache_dir'].'modules/Quotes/DetailView.tpl'); - } - $focus->saveConfig(); - header('Location: index.php?module=Administration&action=index'); - } - } - - if(!empty($_POST['restore'])){ - $focus = new Administration(); - foreach($_POST as $key => $val) { - $prefix = $focus->get_config_prefix($key); - if(in_array($prefix[0], $focus->config_categories)) { - $result = $focus->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'"); - $row = $focus->db->fetchByAssoc( $result, -1, true ); - if( $row['the_count'] != 0){ - $focus->db->query("DELETE FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'"); - } - } - } - header('Location: index.php?module=Configurator&action=SugarpdfSettings'); - } - - echo getClassicModuleTitle( - "Administration", - array( - "".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_PDFMODULE_NAME'], - ), - false - ); - - $pdf_class = array("TCPDF"=>"TCPDF","EZPDF"=>"EZPDF"); - - $this->ss->assign('APP_LIST', $app_list_strings); - $this->ss->assign("JAVASCRIPT",get_set_focus_js()); - $this->ss->assign("SugarpdfSettings", $SugarpdfSettings); - $this->ss->assign("pdf_enable_ezpdf", PDF_ENABLE_EZPDF); - if(PDF_ENABLE_EZPDF == "0" && PDF_CLASS == "EZPDF"){ - $error = "ERR_EZPDF_DISABLE"; - $this->ss->assign("selected_pdf_class", "TCPDF"); - }else{ - $this->ss->assign("selected_pdf_class", PDF_CLASS); - } - $this->ss->assign("pdf_class", $pdf_class); - - if(!empty($error)){ - $this->ss->assign("error", $mod_strings[$error]); - } - if (!function_exists('imagecreatefrompng')) { - $this->ss->assign("GD_WARNING", 1); - } - else - $this->ss->assign("GD_WARNING", 0); - - $this->ss->display('modules/Configurator/tpls/SugarpdfSettings.tpl'); - - require_once("include/javascript/javascript.php"); - $javascript = new javascript(); - $javascript->setFormName("ConfigureSugarpdfSettings"); - foreach($SugarpdfSettings as $k=>$v){ - if(isset($v["required"]) && $v["required"] == true) - $javascript->addFieldGeneric($k, "varchar", $v['label'], TRUE, ""); - } - - echo $javascript->getScript(); - } - - private function checkUploadImage() - { - $error=""; - $files = array('sugarpdf_pdf_header_logo'=>$_FILES['new_header_logo'], 'sugarpdf_pdf_small_header_logo'=>$_FILES['new_small_header_logo']); - foreach($files as $k=>$v){ - if(empty($error) && isset($v) && !empty($v['name'])){ - $file_name = K_PATH_CUSTOM_IMAGES .'pdf_logo_'. basename($v['name']); - if(file_exists($file_name)) - rmdir_recursive($file_name); - if (!empty($v['error'])) - $error='ERR_ALERT_FILE_UPLOAD'; - if(!mkdir_recursive(K_PATH_CUSTOM_IMAGES)) - $error='ERR_ALERT_FILE_UPLOAD'; - if(empty($error)){ - if (!move_uploaded_file($v['tmp_name'], $file_name)) - die("Possible file upload attack!\n"); - if(file_exists($file_name) && is_file($file_name)){ - $img_size = getimagesize($file_name); - $filetype = $img_size['mime']; - if($filetype != 'image/jpeg' && !empty($_REQUEST['sugarpdf_pdf_class']) && $_REQUEST['sugarpdf_pdf_class'] == "EZPDF"){ - $error='LBL_ALERT_TYPE_IMAGE_EZPDF'; - } - else if($filetype != 'image/jpeg' && $filetype != 'image/png'){ - $error='LBL_ALERT_TYPE_IMAGE'; - }else{ - $test=$img_size[0]/$img_size[1]; - if (($test>10 || $test<1)){ - //$error='LBL_ALERT_SIZE_RATIO_QUOTES'; - } - } - if(!empty($error)){ - rmdir_recursive($file_name); - }else{ - $_POST[$k]='pdf_logo_'. basename($v['name']); - } - }else{ - $error='ERR_ALERT_FILE_UPLOAD'; - } - } - } - } - return $error; - } -} diff --git a/modules/Connectors/InstallDefaultConnectors.php b/modules/Connectors/InstallDefaultConnectors.php index d1fdac19..d8c480bc 100644 --- a/modules/Connectors/InstallDefaultConnectors.php +++ b/modules/Connectors/InstallDefaultConnectors.php @@ -36,16 +36,41 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ +$default_connectors = array ( + 'ext_rest_linkedin' => + array ( + 'id' => 'ext_rest_linkedin', + 'name' => 'LinkedIn©', + 'enabled' => true, + 'directory' => 'modules/Connectors/connectors/sources/ext/rest/linkedin', + 'modules' => + array ( + ), + ), + +); + +// Gather a list of the previous Connectors available for a potential merge +$previous_connectors = array(); +if(file_exists('custom/modules/Connectors/metadata/connectors.php')){ + require('custom/modules/Connectors/metadata/connectors.php'); + + foreach($connectors as $connector_array){ + $connector_id = $connector_array['id']; + $previous_connectors[$connector_id] = $connector_id; + } +} + $default_modules_sources = array ( - 'Accounts' => + 'Accounts' => array ( 'ext_rest_linkedin' => 'ext_rest_linkedin', ), - 'Contacts' => + 'Contacts' => array ( 'ext_rest_linkedin' => 'ext_rest_linkedin', ), - + 'Leads' => array ( 'ext_rest_linkedin' => 'ext_rest_linkedin', @@ -53,26 +78,16 @@ $default_modules_sources = array ( 'Prospects' => array ( 'ext_rest_linkedin' => 'ext_rest_linkedin', - + ), - + ); -$previous_connectors = array(); -if(file_exists('custom/modules/Connectors/metadata/connectors.php')){ - require('custom/modules/Connectors/metadata/connectors.php'); - - foreach($connectors as $connector_array){ - $connector_id = $connector_array['id']; - $previous_connectors[$connector_id] = $connector_id; - } -} - // Merge in old modules the customer added instead of overriding it completely with defaults // If they have customized their connectors modules if(file_exists('custom/modules/Connectors/metadata/display_config.php')){ require('custom/modules/Connectors/metadata/display_config.php'); - + // Remove the default settings from being copied over since they already existed foreach($default_modules_sources as $module => $sources){ foreach($sources as $source_key => $source){ @@ -83,17 +98,15 @@ if(file_exists('custom/modules/Connectors/metadata/display_config.php')){ } } } - + // Merge in the new connector default settings with the current settings - if ( isset($modules_sources) && is_array($modules_sources) ) { - foreach($modules_sources as $module => $sources){ - if(!empty($default_modules_sources[$module])){ - $merged = array_merge($modules_sources[$module], $default_modules_sources[$module]); - $default_modules_sources[$module] = $merged; - } - else{ - $default_modules_sources[$module] = $modules_sources[$module]; - } + foreach($modules_sources as $module => $sources){ + if(!empty($default_modules_sources[$module])){ + $merged = array_merge($modules_sources[$module], $default_modules_sources[$module]); + $default_modules_sources[$module] = $merged; + } + else{ + $default_modules_sources[$module] = $modules_sources[$module]; } } } @@ -102,15 +115,17 @@ if(!file_exists('custom/modules/Connectors/metadata')) { mkdir_recursive('custom/modules/Connectors/metadata'); } +if(!write_array_to_file('connectors', $default_connectors, 'custom/modules/Connectors/metadata/connectors.php')) { + $GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/connectors.php'); +} + if(!write_array_to_file('modules_sources', $default_modules_sources, 'custom/modules/Connectors/metadata/display_config.php')) { $GLOBALS['log']->fatal('Cannot write file custom/modules/Connectors/metadata/display_config.php'); } -/* require_once('include/connectors/utils/ConnectorUtils.php'); if(!ConnectorUtils::updateMetaDataFiles()) { - $GLOBALS['log']->fatal('Cannot update metadata files for connectors'); + $GLOBALS['log']->fatal('Cannot update metadata files for connectors'); } -*/ ?> diff --git a/modules/Connectors/controller.php b/modules/Connectors/controller.php index 5ff4057a..4c40df14 100644 --- a/modules/Connectors/controller.php +++ b/modules/Connectors/controller.php @@ -45,18 +45,18 @@ class ConnectorsController extends SugarController { var $admin_actions = array('ConnectorSettings', 'DisplayProperties', 'MappingProperties', 'ModifyMapping', 'ModifyDisplay', 'ModifyProperties', 'ModifySearch', 'SearchProperties', 'SourceProperties', 'SavedModifyDisplay', 'SaveModifyProperties', 'SaveModifySearch'); - - + + function process() { if(!is_admin($GLOBALS['current_user']) && in_array($this->action, $this->admin_actions)) { $this->hasAccess = false; } parent::process(); } - + /** - * When the user clicks the Search button, the form is posted back here and this action sets the + * When the user clicks the Search button, the form is posted back here and this action sets the * search parameters in the session. Once this call returns, the tabs will then call RetrieveSource to load * the data that was saved in the session. * @@ -65,8 +65,8 @@ class ConnectorsController extends SugarController { if(empty($_REQUEST)) { return; } - - $this->view = 'ajax'; + + $this->view = 'ajax'; require_once('include/connectors/utils/ConnectorUtils.php'); $searchdefs = ConnectorUtils::getSearchDefs(); $merge_module = $_REQUEST['merge_module']; @@ -74,7 +74,7 @@ class ConnectorsController extends SugarController { $searchDefs = isset($searchdefs) ? $searchdefs : array(); unset($_SESSION['searchDefs'][$merge_module][$record_id]); $sMap = array(); - + $search_source = $_REQUEST['source_id']; $source_instance = ConnectorFactory::getInstance($search_source); $source_map = $source_instance->getModuleMapping($merge_module); @@ -91,7 +91,7 @@ class ConnectorsController extends SugarController { $instance = ConnectorFactory::getInstance($source); $sMap[$source] = array_flip($instance->getModuleMapping($merge_module)); } - + if(!empty($sMap[$source][$search_term])){ $source_key = $sMap[$source][$search_term]; $_SESSION['searchDefs'][$merge_module][$record_id][$source][$source_key] = $val; @@ -108,29 +108,29 @@ class ConnectorsController extends SugarController { $this->view = 'ajax'; $source_id = $_REQUEST['source_id']; $record_id = $_REQUEST['record_id']; - + if(empty($source_id) || empty($record_id)) { //display error here return; } $source = ConnectorFactory::getInstance($source_id); $module = $_SESSION['merge_module']; - + $result = $source->fillBean(array('id' => $record_id), $module); require_once('include/connectors/utils/ConnectorUtils.php'); $connector_strings = ConnectorUtils::getConnectorStrings($source_id); - + $fields = $source->getModuleMapping($module); $fieldDefs = $source->getFieldDefs(); $str = ''; foreach($fields as $key=>$field){ - + $label = $field; if(isset($fieldDefs[$key])) { - $label = isset($connector_strings[$fieldDefs[$key]['vname']]) ? $connector_strings[$fieldDefs[$key]['vname']] : $label; + $label = isset($connector_strings[$fieldDefs[$key]['vname']]) ? $connector_strings[$fieldDefs[$key]['vname']] : $label; } - + $val = $result->$field; if(!empty($val)){ if(strlen($val) > 50) { @@ -142,34 +142,34 @@ class ConnectorsController extends SugarController { global $theme; $json = getJSONobj(); $retArray = array(); - + $retArray['body'] = !empty($str) ? str_replace(array("\rn", "\r", "\n"), array('','','
    '), $str) : $GLOBALS['mod_strings']['ERROR_NO_ADDITIONAL_DETAIL']; $retArray['caption'] = "
    {$GLOBALS['app_strings']['LBL_ADDITIONAL_DETAILS']}
    "; - $retArray['width'] = (empty($results['width']) ? '300' : $results['width']); + $retArray['width'] = (empty($results['width']) ? '300' : $results['width']); $retArray['theme'] = $theme; echo 'result = ' . $json->encode($retArray); } - - + + function action_GetSearchForm(){ $this->view = 'ajax'; if(!empty($_REQUEST['source_id'])){ //get the search fields and return the search form - + $ss = new Sugar_Smarty(); require_once('include/connectors/utils/ConnectorUtils.php'); $searchdefs = ConnectorUtils::getSearchDefs(); $merge_module = $_REQUEST['merge_module']; $seed = loadBean($merge_module); - $_searchDefs = isset($searchdefs) ? $searchdefs : array(); + $_searchDefs = isset($searchdefs) ? $searchdefs : array(); $_trueFields = array(); $source = $_REQUEST['source_id']; - + $searchLabels = ConnectorUtils::getConnectorStrings($source); $record = $_REQUEST['record']; $sourceObj = SourceFactory::getSource($source); $field_defs = $sourceObj->getFieldDefs(); - + if(!empty($_searchDefs[$source][$merge_module])) { foreach($_searchDefs[$source][$merge_module] as $key) { if(!empty($_SESSION['searchDefs'][$merge_module][$record][$source][$key])){ @@ -184,8 +184,8 @@ class ConnectorsController extends SugarController { } }//foreach }//fi - - $ss->assign('mod', $GLOBALS['mod_strings']); + + $ss->assign('mod', $GLOBALS['mod_strings']); $ss->assign('search_fields', $_trueFields); $ss->assign('source_id', $source); $ss->assign('fields', $seed->field_defs); @@ -204,7 +204,7 @@ class ConnectorsController extends SugarController { function action_CallRest() { $this->view = 'ajax'; - + if(false === ($result=@file_get_contents($_REQUEST['url']))) { echo ''; } else if(!empty($_REQUEST['xml'])){ @@ -213,12 +213,12 @@ class ConnectorsController extends SugarController { xml_parse_into_struct($p, $result, $values); xml_parser_free($p); $json = getJSONobj(); - echo $json->encode($values); + echo $json->encode($values); } else { echo $result; } } - + function action_CallSoap() { $this->view = 'ajax'; $source_id = $_REQUEST['source_id']; @@ -232,32 +232,32 @@ class ConnectorsController extends SugarController { $count = 0; foreach($beans as $bean) { foreach($return_params as $field) { - $results[$count][$field] = $bean->$field; + $results[$count][$field] = $bean->$field; } $count++; } $json = getJSONobj(); - echo $json->encode($results); + echo $json->encode($results); } else { echo ''; } } - - + + function action_DefaultSoapPopup() { $this->view = 'ajax'; $source_id = $_REQUEST['source_id']; $module = $_REQUEST['module_id']; $id = $_REQUEST['record_id']; $mapping = $_REQUEST['mapping']; - + $mapping = explode(',', $mapping); //Error checking - + //Load bean $bean = loadBean($module); $bean->retrieve($id); - + require_once('include/connectors/ConnectorFactory.php'); $component = ConnectorFactory::getInstance($source_id); //Create arguments @@ -275,18 +275,18 @@ class ConnectorsController extends SugarController { $count = 0; foreach($beans as $bean) { foreach($mapping as $field) { - $results[$count][$field] = $bean->$field; + $results[$count][$field] = $bean->$field; } $count++; } $json = getJSONobj(); - echo $json->encode($results); + echo $json->encode($results); } else { $GLOBALS['log']->error($GLOBALS['app_strings']['ERR_MISSING_MAPPING_ENTRY_FORM_MODULE']); echo ''; - } + } } - + function action_SaveModifyProperties() { require_once('include/connectors/sources/SourceFactory.php'); $sources = array(); @@ -307,7 +307,7 @@ class ConnectorsController extends SugarController { } } } - + require_once('include/connectors/utils/ConnectorUtils.php'); ConnectorUtils::updateMetaDataFiles(); // BEGIN SUGAR INT @@ -318,27 +318,24 @@ class ConnectorsController extends SugarController { } // END SUGAR INT } - + function action_SaveModifyDisplay() { if(empty($_REQUEST['display_sources'])) { return; } - - require_once('include/connectors/utils/ConnectorUtils.php'); + + require_once('include/connectors/utils/ConnectorUtils.php'); require_once('include/connectors/sources/SourceFactory.php'); - + $connectors = ConnectorUtils::getConnectors(); $connector_keys = array_keys($connectors); - + $modules_sources = ConnectorUtils::getDisplayConfig(); - if ( !is_array($modules_sources) ) { - $modules_sources = (array) $modules_sources; - } - + $sources = array(); $values = array(); $new_modules_sources = array(); - + if(!empty($_REQUEST['display_values'])) { $display_values = explode(',', $_REQUEST['display_values']); foreach($display_values as $value) { @@ -347,15 +344,15 @@ class ConnectorsController extends SugarController { } } - //These are the sources that were modified. + //These are the sources that were modified. //We only update entries for these sources that have been changed $display_sources = explode(',', $_REQUEST['display_sources']); foreach($display_sources as $source) { $sources[$source] = $source; - } //foreach - + } //foreach + $removedModules = array(); - + //Unset entries that have all sources removed foreach($modules_sources as $module=>$source_entries) { foreach($source_entries as $source_id) { @@ -371,7 +368,7 @@ class ConnectorsController extends SugarController { ConnectorUtils::cleanMetaDataFile($key); } } - + //Update based on new_modules_sources foreach($new_modules_sources as $module=>$enabled_sources) { //If the module is not in $modules_sources add it there @@ -385,15 +382,15 @@ class ConnectorsController extends SugarController { } //foreach } } //foreach - - //Should we just remove entries where all sources are disabled? + + //Should we just remove entries where all sources are disabled? $unset_modules = array(); foreach($modules_sources as $module=>$mapping) { if(empty($mapping)) { $unset_modules[] = $module; } } - + foreach($unset_modules as $mod) { unset($modules_sources[$mod]); } @@ -402,14 +399,14 @@ class ConnectorsController extends SugarController { //Log error and return empty array $GLOBALS['log']->fatal("Cannot write \$modules_sources to " . CONNECTOR_DISPLAY_CONFIG_FILE); } - + $sources_modules = array(); foreach($modules_sources as $module=>$source_entries) { foreach($source_entries as $id) { $sources_modules[$id][$module] = $module; } } - + //Now update the searchdefs and field mapping entries accordingly require('modules/Connectors/metadata/searchdefs.php'); @@ -421,8 +418,8 @@ class ConnectorsController extends SugarController { foreach($modules as $module) { $searchdefs[$source_id][$module] = !empty($connectorSearchDefs[$source_id][$module]) ? $connectorSearchDefs[$source_id][$module] : (!empty($originalSearchDefs[$source_id][$module]) ? $originalSearchDefs[$source_id][$module] : array()); } - } - + } + //Write the new searchdefs out if(!write_array_to_file('searchdefs', $searchdefs, 'custom/modules/Connectors/metadata/searchdefs.php')) { $GLOBALS['log']->fatal("Cannot write file custom/modules/Connectors/metadata/searchdefs.php"); @@ -434,7 +431,7 @@ class ConnectorsController extends SugarController { } - + //Clear mapping file if needed (this happens when all modules are removed from a source foreach($sources as $id) { if(empty($sources_modules[$source])) { @@ -443,31 +440,31 @@ class ConnectorsController extends SugarController { if(!preg_match('/^custom\//', $dir)) { $dir = 'custom/' . $dir; } - + if(!file_exists("{$dir}")) { mkdir_recursive("{$dir}"); } - + if(!write_array_to_file('mapping', array('beans'=>array()), "{$dir}/mapping.php")) { $GLOBALS['log']->fatal("Cannot write file {$dir}/mapping.php"); - } + } } //if } //foreach - + //Now update the field mapping entries foreach($sources_modules as $id=>$modules) { $source = SourceFactory::getSource($id); $mapping = $source->getMapping(); $mapped_modules = array_keys($mapping['beans']); - + foreach($mapped_modules as $module) { if(empty($sources_modules[$id][$module])) { unset($mapping['beans'][$module]); } - } - + } + //Remove modules from the mapping entries - foreach($modules as $module) { + foreach($modules as $module) { if(empty($mapping['beans'][$module])) { $originalMapping = $source->getOriginalMapping(); if(empty($originalMapping['beans'][$module])) { @@ -476,15 +473,15 @@ class ConnectorsController extends SugarController { $new_mapping_entry = array(); foreach($keys as $key) { $new_mapping_entry[$key] = ''; - } + } $mapping['beans'][$module] = $new_mapping_entry; } else { - $mapping['beans'][$module] = $originalMapping['beans'][$module]; + $mapping['beans'][$module] = $originalMapping['beans'][$module]; } } //if - + } //foreach - + //Now write the new mapping entry to the custom folder $dir = $connectors[$id]['directory']; if(!preg_match('/^custom\//', $dir)) { @@ -494,22 +491,13 @@ class ConnectorsController extends SugarController { if(!file_exists("{$dir}")) { mkdir_recursive("{$dir}"); } - + if(!write_array_to_file('mapping', $mapping, "{$dir}/mapping.php")) { $GLOBALS['log']->fatal("Cannot write file {$dir}/mapping.php"); } - - } //foreach - - // save eapm configs - foreach($connectors as $connector_name => $data) { - if(isset($sources[$connector_name]) && !empty($data["eapm"])) { - // if we touched it AND it has EAPM data - $connectors[$connector_name]["eapm"]["enabled"] = !empty($_REQUEST[$connector_name."_external"]); - } - } - ConnectorUtils::saveConnectors($connectors); - + + } //foreach + ConnectorUtils::updateMetaDataFiles(); // BEGIN SUGAR INT if(empty($_REQUEST['from_unit_test'])) { @@ -529,71 +517,71 @@ class ConnectorsController extends SugarController { function action_SaveModifyMapping() { $mapping_sources = !empty($_REQUEST['mapping_sources']) ? explode(',', $_REQUEST['mapping_sources']) : array(); $mapping_values = !empty($_REQUEST['mapping_values']) ? explode(',', $_REQUEST['mapping_values']) : array(); - + //Build the source->module->fields mapping $source_modules_fields = array(); foreach($mapping_values as $id) { $parts = explode(':', $id); - $key_vals = explode('=', $parts[2]); + $key_vals = explode('=', $parts[2]); //Note the strtolwer call... we are lowercasing the key values $source_modules_fields[$parts[0]][$parts[1]][strtolower($key_vals[0])] = $key_vals[1]; } //foreach - + foreach($mapping_sources as $source_id) { if(empty($source_modules_fields[$source_id])) { $source = SourceFactory::getSource($source_id); $mapping = $source->getMapping(); - foreach($mapping['beans'] as $module=>$entry) { + foreach($mapping['beans'] as $module=>$entry) { $source_modules_fields[$source_id][$module] = array(); } } } //foreach + - - + require_once('include/connectors/utils/ConnectorUtils.php'); $source_entries = ConnectorUtils::getConnectors(); - + require_once('include/connectors/sources/SourceFactory.php'); foreach($source_modules_fields as $id=>$mapping_entry) { //Insert the id mapping foreach($mapping_entry as $module=>$entry) { $mapping_entry[$module]['id'] = 'id'; } - + $source = SourceFactory::getSource($id); $mapping = $source->getMapping(); $mapping['beans'] = $mapping_entry; - + //Now write the new mapping entry to the custom folder $dir = $source_entries[$id]['directory']; if(!preg_match('/^custom\//', $dir)) { $dir = 'custom/' . $dir; - } - + } + if(!file_exists("{$dir}")) { mkdir_recursive("{$dir}"); } - + if(!write_array_to_file('mapping', $mapping, "{$dir}/mapping.php")) { $GLOBALS['log']->fatal("Cannot write file {$dir}/mapping.php"); - } + } } //Rewrite the metadata files ConnectorUtils::updateMetaDataFiles(); - + // BEGIN SUGAR INT if(empty($_REQUEST['from_unit_test'])) { - // END SUGAR INT + // END SUGAR INT header("Location: index.php?action=ConnectorSettings&module=Connectors"); // BEGIN SUGAR INT } - // END SUGAR INT - } - - + // END SUGAR INT + } + + function action_RunTest() { $this->view = 'ajax'; $source_id = $_REQUEST['source_id']; @@ -606,13 +594,12 @@ class ConnectorsController extends SugarController { } $source->setProperties($properties); $source->saveConfig(); - + //Call again and call init $source = SourceFactory::getSource($source_id); $source->init(); - + global $mod_strings; - try { if($source->isRequiredConfigFieldsForButtonSet() && $source->test()) { echo $mod_strings['LBL_TEST_SOURCE_SUCCESS']; @@ -624,16 +611,16 @@ class ConnectorsController extends SugarController { echo $ex->getMessage(); } } - - + + /** * action_RetrieveSources * Returns a JSON encoded format of the Connectors that are configured for the system - * + * */ function action_RetrieveSources() { require_once('include/connectors/utils/ConnectorUtils.php'); - $this->view = 'ajax'; + $this->view = 'ajax'; $sources = ConnectorUtils:: getConnectors(); $results = array(); foreach($sources as $id=>$entry) { @@ -642,6 +629,6 @@ class ConnectorsController extends SugarController { $json = getJSONobj(); echo $json->encode($results); } - + } ?> \ No newline at end of file diff --git a/modules/Connectors/language/en_us.lang.php b/modules/Connectors/language/en_us.lang.php index 9fa02eef..83516ae8 100644 --- a/modules/Connectors/language/en_us.lang.php +++ b/modules/Connectors/language/en_us.lang.php @@ -38,29 +38,28 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $mod_strings = array ( - 'LBL_ADD_MODULE' => 'Add', + 'LBL_ADD_MODULE' => 'Add', 'LBL_ADDRCITY' => 'City', 'LBL_ADDRCOUNTRY' => 'Country', 'LBL_ADDRCOUNTRY_ID' => 'Country Id', 'LBL_ADDRSTATEPROV' => 'State', 'LBL_ADMINISTRATION' => 'Connector Administration', - 'LBL_ADMINISTRATION_MAIN' => 'Connector Settings', + 'LBL_ADMINISTRATION_MAIN' => 'Connector Settings', 'LBL_AVAILABLE' => 'Available', 'LBL_BACK' => '< Back', 'LBL_COMPANY_ID' => 'Company Id', 'LBL_CONFIRM_CONTINUE_SAVE' => 'Some required fields have been left blank. Proceed to save changes?', 'LBL_CONNECTOR' => 'Connector', 'LBL_CONNECTOR_FIELDS' => 'Connector Fields', - 'LBL_DATA' => 'Data', + 'LBL_DATA' => 'Data', 'LBL_DEFAULT' => 'Default', 'LBL_DELETE_MAPPING_ENTRY' => 'Are you sure you want to delete this entry?', 'LBL_DISABLED' => 'Disabled', 'LBL_DUNS' => 'DUNS', 'LBL_EMPTY_BEANS' => 'No matches were found for your search criteria.', 'LBL_ENABLED' => 'Enabled', - 'LBL_EXTERNAL' => 'Enable users to create external account records to this connector. In order to use this connector, the properties should also be set in the Set Connector Properties settings page.', 'LBL_FINSALES' => 'Finsales', - 'LBL_MARKET_CAP' => 'Market Cap', + 'LBL_MARKET_CAP' => 'Market Cap', 'LBL_MERGE' => 'Merge', 'LBL_MODIFY_DISPLAY_TITLE' => 'Enable Connectors', 'LBL_MODIFY_DISPLAY_DESC' => 'Select which modules are enabled for each connector.', @@ -73,7 +72,7 @@ $mod_strings = array ( 'LBL_MODIFY_PROPERTIES_DESC' => 'Configure the properties for each connector, including URLs and API keys.', 'LBL_MODIFY_PROPERTIES_PAGE_TITLE' => 'Connector Settings: Set Connector Properties', 'LBL_MODIFY_SEARCH_TITLE' => 'Manage Connector Search', - 'LBL_MODIFY_SEARCH' => 'Search', + 'LBL_MODIFY_SEARCH' => 'Search', 'LBL_MODIFY_SEARCH_DESC' => 'Select the connector fields to use to search for data for each module.', 'LBL_MODIFY_SEARCH_PAGE_TITLE' => 'Connector Settings: Manage Connector Search', 'LBL_MODULE_NAME' => 'Connectors', @@ -81,11 +80,11 @@ $mod_strings = array ( 'LBL_PARENT_DUNS' => 'Parent DUNS', 'LBL_PREVIOUS' => '< Back', 'LBL_QUOTE' => 'Quote', - 'LBL_RECNAME' => 'Company Name', + 'LBL_RECNAME' => 'Company Name', 'LBL_RESET_TO_DEFAULT' => 'Reset to Default', 'LBL_RESET_TO_DEFAULT_CONFIRM' => 'Are you sure you want to reset to the default configuration?', 'LBL_RESET_BUTTON_TITLE' => 'Reset [Alt+R]', - 'LBL_RESULT_LIST' => 'Data List', + 'LBL_RESULT_LIST' => 'Data List', 'LBL_RUN_WIZARD' => 'Run Wizard', 'LBL_SAVE' => 'Save', 'LBL_SEARCHING_BUTTON_LABEL' => 'Searching...', @@ -93,14 +92,14 @@ $mod_strings = array ( 'LBL_SMART_COPY' => 'Smart Copy', 'LBL_SUMMARY' => 'Summary', 'LBL_STEP1' => 'Search and View Data', - 'LBL_STEP2' => 'Merge Records with', + 'LBL_STEP2' => 'Merge Records with', 'LBL_TEST_SOURCE' => 'Test Connector', 'LBL_TEST_SOURCE_FAILED' => 'Test Failed', 'LBL_TEST_SOURCE_RUNNING' => 'Performing Test...', 'LBL_TEST_SOURCE_SUCCESS' => 'Test Successful', - 'LBL_TITLE' => 'Data Merge', + 'LBL_TITLE' => 'Data Merge', 'LBL_ULTIMATE_PARENT_DUNS' => 'Ultimate Parent DUNS', - + 'ERROR_RECORD_NOT_SELECTED' => 'Error: Please select a record from the list before proceeding.', 'ERROR_EMPTY_WRAPPER' => 'Error: Unable to retrieve wrapper instance for the source [{$source_id}]', 'ERROR_EMPTY_SOURCE_ID' => 'Error: Source Id not specified or empty.', diff --git a/modules/Connectors/tpls/display_properties.tpl b/modules/Connectors/tpls/display_properties.tpl index 1b3be862..efc67efa 100644 --- a/modules/Connectors/tpls/display_properties.tpl +++ b/modules/Connectors/tpls/display_properties.tpl @@ -35,11 +35,6 @@ ********************************************************************************/ *} -{if !empty($external)} -
    -
    -{/if} -{if empty($externalOnly)}

    {$title}

    -{$MOD.LBL_CONFIG_LANGS_DESC} -

    - -
    - - - - - - - - - - - -
    - - -
    - -
    - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - -
    - - -
    -
    - - - \ No newline at end of file diff --git a/modules/Administration/templates/ShortcutBar.tpl b/modules/Administration/templates/ShortcutBar.tpl index a92b21c0..f65c83d8 100644 --- a/modules/Administration/templates/ShortcutBar.tpl +++ b/modules/Administration/templates/ShortcutBar.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} - + diff --git a/modules/Administration/templates/themeSettings.tpl b/modules/Administration/templates/themeSettings.tpl index b5def1b8..eaf9a8e6 100644 --- a/modules/Administration/templates/themeSettings.tpl +++ b/modules/Administration/templates/themeSettings.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} - +
    @@ -43,7 +43,7 @@ - +
    - @@ -267,7 +267,7 @@ echo "

    ".$this->gen_xml($datax, $dateXml[0], $dateXml[1], $ids, echo "

    ".$current_module_strings['LBL_SALES_STAGE_FORM_DESC']."

    "; if (file_exists($sugar_config['tmp_dir'].$cache_file_name)) { - $file_date = $timedate->asUser($timedate->fromTimestamp(filemtime($sugar_config['tmp_dir'].$cache_file_name))); + $file_date = date($timedate->get_date_format()." ".$timedate->get_time_format(), filemtime($sugar_config['tmp_dir'].$cache_file_name)); } else { $file_date = ''; @@ -293,9 +293,9 @@ echo get_validate_chart_js(); */ function gen_xml($datax=array('foo','bar'), $date_start='2071-10-15', $date_end='2071-10-15', $user_id=array('1'), $cache_file_name='a_file', $refresh=false,$chart_size='hBarF',$current_module_strings) { global $app_strings, $charset, $lang, $barChartColors, $current_user; - + $kDelim = $current_user->getPreference('num_grp_sep'); - + global $timedate; if (!file_exists($cache_file_name) || $refresh == true) { @@ -336,7 +336,7 @@ echo get_validate_chart_js(); } //build the where clause for the query that matches $date_start and $date_end - $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " + $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date') ; $where .= " AND opportunities.assigned_user_id = users.id AND opportunities.deleted=0 "; @@ -350,9 +350,9 @@ echo get_validate_chart_js(); FROM users,opportunities "; $query .= "WHERE " .$where; $query .= " GROUP BY opportunities.sales_stage,users.user_name,opportunities.assigned_user_id"; - - - + + + $result = $opp->db->query($query) or sugar_die("Error selecting sugarbean: ".mysql_error()); //build pipeline by sales stage data @@ -362,16 +362,16 @@ echo get_validate_chart_js(); $symbol = $sugar_config['default_currency_symbol']; global $current_user; if($current_user->getPreference('currency') ){ - + $currency = new Currency(); $currency->retrieve($current_user->getPreference('currency')); $div = $currency->conversion_rate; $symbol = $currency->symbol; } // cn: adding user-pref date handling - $dateStartDisplay = $timedate->asUserDate($timedate->fromString($date_start)); - $dateEndDisplay = $timedate->asUserDate($timedate->fromString($date_end)); - + $dateStartDisplay = date($timedate->get_date_format(), strtotime($date_start)); + $dateEndDisplay = date($timedate->get_date_format(), strtotime($date_end)); + $fileContents = ' '."\n"; $stageArr = array(); $usernameArr = array(); @@ -453,15 +453,15 @@ echo get_validate_chart_js(); $return = create_chart($chart_size,$cache_file_name,$width,$height); return $return; } - + function constructQuery(){ global $current_user; global $timedate; global $app_list_strings; - + //get the dates to display $user_date_start = $current_user->getPreference('pbss_date_start'); - + if (!empty($user_date_start) && !isset($_REQUEST['pbss_date_start'])) { $date_start = $timedate->to_display_date($user_date_start, false); $GLOBALS['log']->debug("USER PREFERENCES['pbss_date_start'] is:"); @@ -477,9 +477,9 @@ echo get_validate_chart_js(); $GLOBALS['log']->debug($current_user->getPreference('pbss_date_start')); } else { - $date_start = $timedate->nowDate(); + $date_start = date($timedate->get_date_format(), time()); } - + $user_date_end = $current_user->getPreference('pbss_date_end'); if (!empty($user_date_end) && !isset($_REQUEST['pbss_date_end'])) { $date_end = $timedate->to_display_date($user_date_end, false); @@ -496,10 +496,10 @@ echo get_validate_chart_js(); $GLOBALS['log']->debug( $current_user->getPreference('pbss_date_end')); } else { - $date_end = $timedate->asUserDate($timedate->fromString("2010-01-01")); + $date_end = date($timedate->get_date_format(), strtotime('2010-01-01')); $GLOBALS['log']->debug("USER PREFERENCES['pbss_date_end'] not found. Using: ".$date_end); } - + $tempx = array(); $datax = array(); $datax_selected= array(); @@ -532,16 +532,16 @@ else { } $GLOBALS['log']->debug("datax is:"); $GLOBALS['log']->debug($datax); - - - + + + $ids = array(); $new_ids = array(); $user_ids = $current_user->getPreference('pbss_ids'); //get list of user ids for which to display data if (!empty($user_ids) && count($user_ids) != 0 && !isset($_REQUEST['pbss_ids'])) { $ids = $user_ids; - + $GLOBALS['log']->debug("USER PREFERENCES['pbss_ids'] is:"); $GLOBALS['log']->debug($user_ids); } @@ -556,8 +556,8 @@ $GLOBALS['log']->debug($datax); else { $ids = get_user_array(false); $ids = array_keys($ids); - - } + + } $user_id = $ids; $opp = new Opportunity; @@ -590,7 +590,7 @@ $GLOBALS['log']->debug($datax); } //build the where clause for the query that matches $date_start and $date_end - $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " + $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date') ; $where .= " AND opportunities.assigned_user_id = users.id AND opportunities.deleted=0 "; @@ -607,7 +607,7 @@ $GLOBALS['log']->debug($datax); return $query; } - + function constructGroupBy(){ return array( 'sales_stage', 'user_name' ); } diff --git a/modules/Configurator/Configurator.php b/modules/Configurator/Configurator.php index 5e594f10..508e1ab9 100644 --- a/modules/Configurator/Configurator.php +++ b/modules/Configurator/Configurator.php @@ -42,7 +42,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class Configurator { var $config = ''; var $override = ''; - var $allow_undefined = array ('stack_trace_errors', 'export_delimiter', 'use_real_names', 'developerMode', 'default_module_favicon', 'authenticationClass', 'SAML_loginurl', 'SAML_X509Cert', 'dashlet_auto_refresh_min', 'show_download_tab'); + var $allow_undefined = array ('stack_trace_errors', 'export_delimiter', 'use_real_names', 'developerMode', 'default_module_favicon', 'authenticationClass', 'SAML_loginurl', 'SAML_X509Cert'); var $errors = array ('main' => ''); var $logger = NULL; var $previous_sugar_override_config_array = array(); @@ -76,7 +76,6 @@ class Configurator { }} } - } function handleOverride($fromParseLoggerSettings=false) { @@ -188,22 +187,7 @@ class Configurator { $this->saveCompanyLogo($_POST['company_logo']); } } - - function checkTempImage($path){ - $exists = false; - if(file_exists($path)){ - $supportedExtensions = array('jpg', 'png', 'jpeg'); - $img_size = getimagesize($path); - $filetype = $img_size['mime']; - $ext = end(explode(".", $path)); - $exists = true; - } - if(!$exists || substr_count('..', $path) > 0 || $ext === $path || !in_array($ext, $supportedExtensions) || ($filetype != 'image/jpeg' && $filetype != 'image/png') ){ - $GLOBALS['log']->fatal("A user ({$GLOBALS['current_user']->id}) attempted to use an invalid file for the logo - {$path}"); - sugar_die('Invalid File Type'); - } - return $path; - } + /** * Saves the company logo to the custom directory for the default theme, so all themes can use it * @@ -211,7 +195,6 @@ class Configurator { */ function saveCompanyLogo($path) { - $path = $this->checkTempImage($path); mkdir_recursive('custom/'.SugarThemeRegistry::current()->getDefaultImagePath(), true); copy($path,'custom/'. SugarThemeRegistry::current()->getDefaultImagePath(). '/company_logo.png'); sugar_cache_clear('company_logo_attributes'); diff --git a/modules/Configurator/SugarpdfSettings.php b/modules/Configurator/SugarpdfSettings.php new file mode 100644 index 00000000..02183640 --- /dev/null +++ b/modules/Configurator/SugarpdfSettings.php @@ -0,0 +1,178 @@ +$v){ + if($v['type'] == 'password'){ + if(isset($_POST[$k])){ + $_POST[$k] = blowfishEncode(blowfishGetKey($k), $_POST[$k]); + } + } + } + if(!empty($_POST["sugarpdf_pdf_class"]) && $_POST["sugarpdf_pdf_class"] != PDF_CLASS){ + // clear the cache for quotes detailview in order to switch the pdf class. + if(is_file($GLOBALS['sugar_config']['cache_dir'].'modules/Quotes/DetailView.tpl')) + unlink($GLOBALS['sugar_config']['cache_dir'].'modules/Quotes/DetailView.tpl'); + } + $focus->saveConfig(); + header('Location: index.php?module=Administration&action=index'); + } +} + +if(!empty($_POST['restore'])){ + $focus = new Administration(); + foreach($_POST as $key => $val) { + $prefix = $focus->get_config_prefix($key); + if(in_array($prefix[0], $focus->config_categories)) { + $result = $focus->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'"); + $row = $focus->db->fetchByAssoc( $result, -1, true ); + if( $row['the_count'] != 0){ + $focus->db->query("DELETE FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'"); + } + } + } + header('Location: index.php?module=Configurator&action=SugarpdfSettings'); +} + +echo getClassicModuleTitle( + "Administration", + array( + "".translate('LBL_MODULE_NAME','Administration')."", + $mod_strings['LBL_PDFMODULE_NAME'], + ), + true + ); + +$pdf_class = array("TCPDF"=>"TCPDF","EZPDF"=>"EZPDF"); + +require_once('include/Sugar_Smarty.php'); +$sugar_smarty = new Sugar_Smarty(); + +$sugar_smarty->assign('MOD', $mod_strings); +$sugar_smarty->assign('APP', $app_strings); +$sugar_smarty->assign('APP_LIST', $app_list_strings); +$sugar_smarty->assign("JAVASCRIPT",get_set_focus_js()); +$sugar_smarty->assign("SugarpdfSettings", $SugarpdfSettings); +$sugar_smarty->assign("pdf_enable_ezpdf", PDF_ENABLE_EZPDF); +if(PDF_ENABLE_EZPDF == "0" && PDF_CLASS == "EZPDF"){ + $error = "ERR_EZPDF_DISABLE"; + $sugar_smarty->assign("selected_pdf_class", "TCPDF"); +}else{ + $sugar_smarty->assign("selected_pdf_class", PDF_CLASS); +} +$sugar_smarty->assign("pdf_class", $pdf_class); + +if(!empty($error)){ + $sugar_smarty->assign("error", $mod_strings[$error]); +} +if (!function_exists('imagecreatefrompng')) { + $sugar_smarty->assign("GD_WARNING", 1); +} +else + $sugar_smarty->assign("GD_WARNING", 0); + +$sugar_smarty->display('modules/Configurator/tpls/SugarpdfSettings.tpl'); + +require_once("include/javascript/javascript.php"); +$javascript = new javascript(); +$javascript->setFormName("ConfigureSugarpdfSettings"); +foreach($SugarpdfSettings as $k=>$v){ + if(isset($v["required"]) && $v["required"] == true) + $javascript->addFieldGeneric($k, "varchar", $v['label'], TRUE, ""); +} + +echo $javascript->getScript(); + +function checkUploadImage(){ + $error=""; + $files = array('sugarpdf_pdf_header_logo'=>$_FILES['new_header_logo'], 'sugarpdf_pdf_small_header_logo'=>$_FILES['new_small_header_logo']); + foreach($files as $k=>$v){ + if(empty($error) && isset($v) && !empty($v['name'])){ + $file_name = K_PATH_CUSTOM_IMAGES .'pdf_logo_'. basename($v['name']); + if(file_exists($file_name)) + rmdir_recursive($file_name); + if (!empty($v['error'])) + $error='ERR_ALERT_FILE_UPLOAD'; + if(!mkdir_recursive(K_PATH_CUSTOM_IMAGES)) + $error='ERR_ALERT_FILE_UPLOAD'; + if(empty($error)){ + if (!move_uploaded_file($v['tmp_name'], $file_name)) + die("Possible file upload attack!\n"); + if(file_exists($file_name) && is_file($file_name)){ + $img_size = getimagesize($file_name); + $filetype = $img_size['mime']; + if($filetype != 'image/jpeg' && !empty($_REQUEST['sugarpdf_pdf_class']) && $_REQUEST['sugarpdf_pdf_class'] == "EZPDF"){ + $error='LBL_ALERT_TYPE_IMAGE_EZPDF'; + } + else if($filetype != 'image/jpeg' && $filetype != 'image/png'){ + $error='LBL_ALERT_TYPE_IMAGE'; + }else{ + $test=$img_size[0]/$img_size[1]; + if (($test>10 || $test<1)){ + //$error='LBL_ALERT_SIZE_RATIO_QUOTES'; + } + } + if(!empty($error)){ + rmdir_recursive($file_name); + }else{ + $_POST[$k]='pdf_logo_'. basename($v['name']); + } + }else{ + $error='ERR_ALERT_FILE_UPLOAD'; + } + } + } + } + return $error; +} +?> diff --git a/modules/Configurator/UploadFileCheck.php b/modules/Configurator/UploadFileCheck.php index feaa9eb8..1c3c6997 100644 --- a/modules/Configurator/UploadFileCheck.php +++ b/modules/Configurator/UploadFileCheck.php @@ -40,7 +40,7 @@ require_once('include/JSON.php'); require_once('include/entryPoint.php'); global $sugar_config; -$supportedExtensions = array('jpg', 'png', 'jpeg'); + $json = getJSONobj(); $rmdir=true; $returnArray = array(); @@ -51,7 +51,7 @@ if($json->decode(html_entity_decode($_REQUEST['forQuotes']))){ } if(isset($_FILES['file_1'])){ $uploadTmpDir=$sugar_config['tmp_dir'].'tmp_logo_'.$returnArray['forQuotes'].'_upload'; - $file_name = $uploadTmpDir . DIRECTORY_SEPARATOR . cleanFileName(basename($_FILES['file_1']['name'])); + $file_name = $uploadTmpDir .'/'. basename($_FILES['file_1']['name']); if(file_exists($uploadTmpDir)) rmdir_recursive($uploadTmpDir); @@ -77,11 +77,8 @@ if(file_exists($file_name) && is_file($file_name)){ $returnArray['path']=$file_name; $img_size = getimagesize($file_name); $filetype = $img_size['mime']; - $ext = end(explode(".", $file_name)); - if($ext === $file_name || !in_array($ext, $supportedExtensions) || ($filetype != 'image/jpeg' && $filetype != 'image/png') || ($filetype != 'image/jpeg' && $returnArray['forQuotes'] == 'quotes')){ + if(($filetype != 'image/jpeg' && $filetype != 'image/png') || ($filetype != 'image/jpeg' && $returnArray['forQuotes'] == 'quotes')){ $returnArray['data']='other'; - $returnArray['path'] = ''; - }else{ $test=$img_size[0]/$img_size[1]; if (($test>10 || $test<1) && $returnArray['forQuotes'] == 'company'){ diff --git a/modules/Configurator/action_view_map.php b/modules/Configurator/action_view_map.php index 13241121..c40b1f4a 100644 --- a/modules/Configurator/action_view_map.php +++ b/modules/Configurator/action_view_map.php @@ -36,4 +36,4 @@ $action_view_map['adminwizard'] = 'adminwizard'; -$action_view_map['sugarpdfsettings'] = 'sugarpdfsettings'; + diff --git a/modules/Configurator/controller.php b/modules/Configurator/controller.php index a9cc520e..e3cb3efb 100644 --- a/modules/Configurator/controller.php +++ b/modules/Configurator/controller.php @@ -43,10 +43,6 @@ class ConfiguratorController extends SugarController * Go to the font manager view */ function action_FontManager(){ - global $current_user; - if(!is_admin($current_user)){ - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } $this->view = 'fontmanager'; } @@ -71,20 +67,12 @@ class ConfiguratorController extends SugarController } function action_listview(){ - global $current_user; - if(!is_admin($current_user)){ - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } $this->view = 'edit'; } /** * Show the addFont view */ function action_addFontView(){ - global $current_user; - if(!is_admin($current_user)){ - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } $this->view = 'addFontView'; } /** @@ -134,10 +122,6 @@ class ConfiguratorController extends SugarController } function action_saveadminwizard() { - global $current_user; - if(!is_admin($current_user)){ - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } $focus = new Administration(); $focus->retrieveSettings(); $focus->saveConfig(); @@ -148,25 +132,11 @@ class ConfiguratorController extends SugarController $configurator->parseLoggerSettings(); $configurator->saveConfig(); - // Bug 37310 - Delete any existing currency that matches the one we've just set the default to during the admin wizard - $currency = new Currency; - $currency->retrieve($currency->retrieve_id_by_name($_REQUEST['default_currency_name'])); - if ( !empty($currency->id) - && $currency->symbol == $_REQUEST['default_currency_symbol'] - && $currency->iso4217 == $_REQUEST['default_currency_iso4217'] ) { - $currency->deleted = 1; - $currency->save(); - } - SugarApplication::redirect('index.php?module=Users&action=Wizard&skipwelcome=1'); } function action_saveconfig() { - global $current_user; - if(!is_admin($current_user)){ - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } $configurator = new Configurator(); $configurator->saveConfig(); @@ -182,10 +152,6 @@ class ConfiguratorController extends SugarController function action_detail() { - global $current_user; - if(!is_admin($current_user)){ - sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); - } $this->view = 'edit'; } } diff --git a/modules/Configurator/language/en_us.lang.php b/modules/Configurator/language/en_us.lang.php index 5fc706c5..5d0819a8 100644 --- a/modules/Configurator/language/en_us.lang.php +++ b/modules/Configurator/language/en_us.lang.php @@ -66,7 +66,7 @@ $mod_strings = array ( 'LBL_ALLOW_USER_TABS' => 'Allow users to hide tabs', 'LBL_CONFIGURE_SETTINGS_TITLE' => 'System Settings', 'LBL_ENABLE_MAILMERGE' => 'Enable mail merge?', - 'LBL_LOGVIEW' => 'View Log', + 'LBL_LOGVIEW' => 'Configure Log Settings', 'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?', 'LBL_MAIL_SMTPPASS' => 'SMTP Password:', 'LBL_MAIL_SMTPPORT' => 'SMTP Port:', @@ -87,14 +87,12 @@ $mod_strings = array ( 'LBL_ALLOW_DEFAULT_SELECTION_HELP' => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts. If the option is not selected, users can still use the outgoing mail server after providing their own account information.', 'LBL_MAILMERGE_DESC' => 'This flag should be checked only if you have the Sugar Plug-in for Microsoft® Word®.', 'LBL_MAILMERGE' => 'Mail Merge', - 'LBL_MIN_AUTO_REFRESH_INTERVAL' => 'Minimum Dashlet Auto-Refresh Interval', - 'LBL_MIN_AUTO_REFRESH_INTERVAL_HELP' => 'This is the minimum value one can choose to have dashlets auto-refresh. Setting to \'Never\' disables auto-refreshing of dashlets entirely.', 'LBL_MODULE_FAVICON' => 'Display module icon as favicon', 'LBL_MODULE_FAVICON_HELP' => 'If you are in a module with an icon, use the module\'s icon as the favicon, instead of the theme\'s favicon, in the browser tab.', 'LBL_MODULE_NAME'=>'System Settings', 'LBL_MODULE_ID' => 'Configurator', 'LBL_MODULE_TITLE'=>'User Interface', - 'LBL_NOTIFY_FROMADDRESS' => '\'From\' Address:', + 'LBL_NOTIFY_FROMADDRESS' => '"From" Address:', 'LBL_NOTIFY_SUBJECT' => 'Email subject:', 'LBL_PORTAL_ON_DESC' => 'Allows users to manage portal user information within contact records. Portal users can access Cases, Bugs, Knowledge Base articles and other data through the Sugar Portal application.', 'LBL_PORTAL_ON' => 'Enable Portal User Management', @@ -109,7 +107,7 @@ $mod_strings = array ( 'LBL_PROXY_USERNAME'=>'User Name', 'LBL_RESTORE_BUTTON_LABEL'=>'Restore', 'LBL_SYSTEM_SETTINGS' => 'System Settings', - 'LBL_SKYPEOUT_ON_DESC' => 'Allows users to click on phone numbers to call using SkypeOut®. The numbers must be formatted properly to make use of this feature. That is, it must be "+" "The Country Code" "The Number", like +1 (555) 555-1234.', + 'LBL_SKYPEOUT_ON_DESC' => 'Allows users to click on phone numbers to call using SkypeOut®. The numbers must be formatted properly to make use of this feature. That is, it must be "+" "The Country Code" "The Number", like +1 (555) 555-1234. For more information, see the Skype FAQ at skype® faq ', 'LBL_SKYPEOUT_ON' => 'Enable SkypeOut® integration', 'LBL_SKYPEOUT_TITLE' => 'SkypeOut®', 'LBL_USE_REAL_NAMES' => 'Show Full Names', @@ -169,9 +167,6 @@ $mod_strings = array ( 'LBL_LDAP_AUTO_CREATE_USERS_DESC'=> 'If an authenticated user does not exist one will be created in Sugar.', 'LBL_LDAP_ENC_KEY' => 'Encryption Key:', 'DEVELOPER_MODE'=>'Developer Mode', - - 'SHOW_DOWNLOADS_TAB' =>'Display Downloads Tab', - 'SHOW_DOWNLOADS_TAB_HELP' =>'When selected, the Download tab will appear in the User settings and provide users with access to Sugar plug-ins and other available files', 'LBL_LDAP_ENC_KEY_DESC' => 'For SOAP authentication when using LDAP.', 'LDAP_ENC_KEY_NO_FUNC_DESC' => 'The php_mcrypt extension must be enabled in your php.ini file.', 'LBL_ALL' => 'All', diff --git a/modules/Configurator/tpls/EditView.tpl b/modules/Configurator/tpls/EditView.tpl index 9c5ae9e2..7f023a5f 100644 --- a/modules/Configurator/tpls/EditView.tpl +++ b/modules/Configurator/tpls/EditView.tpl @@ -128,18 +128,14 @@ - - + - - - - -
    @@ -54,10 +54,7 @@
    - - + @@ -68,7 +65,7 @@
    {$MOD.DEFAULT_THEME}   - -
    - +
    "; } -function template_calendar_year($args) { +function template_calendar_year(& $args) { $count = 0; ?>
    @@ -121,14 +118,8 @@ var themes = []; for(var i=0; i < disabledTable.getRecordSet().getLength(); i++){ var data = disabledTable.getRecord(i).getData(); - if (data.dir && data.dir != '') { + if (data.dir && data.dir != '') themes[i] = data.dir; - if ( themes[i] == document.getElementById('default_theme').value ) { - if ( !confirm(SUGAR.language.get('Administration', 'LBL_DEFAULT_THEME_IS_DISABLED')) ) { - return false; - } - } - } } ajaxStatus.showStatus(SUGAR.language.get('Administration', 'LBL_SAVING')); @@ -136,7 +127,7 @@ Connect.method, Connect.url, {success: SUGAR.saveCallBack}, - 'to_pdf=1&module=Administration&action=ThemeSettings&default_theme='+document.getElementById('default_theme').value+'&disabled_themes=' + YAHOO.lang.JSON.stringify(themes) + 'to_pdf=1&module=Administration&action=ThemeSettings&disabled_themes=' + YAHOO.lang.JSON.stringify(themes) ); return true; diff --git a/modules/Administration/updater_utils.php b/modules/Administration/updater_utils.php index ea46ec0a..767d023d 100644 --- a/modules/Administration/updater_utils.php +++ b/modules/Administration/updater_utils.php @@ -42,7 +42,7 @@ require_once('include/utils/encryption_utils.php'); function getSystemInfo($send_usage_info=true){ global $sugar_config; - global $db, $authLevel, $administration, $timedate; + global $db, $authLevel, $administration; $info=array(); $info = getBaseSystemInfo($send_usage_info); if($send_usage_info){ @@ -63,16 +63,16 @@ function getSystemInfo($send_usage_info=true){ $user_list = get_user_array(false, "Active", "", false, null, " AND is_group=0 AND portal_only=0 ", false); - + $info['users']=count($user_list); if(empty($administration)){ - + $administration = new Administration(); } $administration->retrieveSettings('system'); $info['system_name'] = (!empty($administration->settings['system_name']))?substr($administration->settings['system_name'], 0 ,255):''; - + $query="select count(*) count from users where status='Active' and deleted=0 and is_admin='1'"; $result=$db->query($query, 'fetching admin count', false); $row = $db->fetchByAssoc($result); @@ -89,7 +89,7 @@ function getSystemInfo($send_usage_info=true){ if(!empty($row)) { $info['registered_users'] = $row['count']; } - $lastMonth = db_convert("'". $timedate->getNow()->modify("-30 days")->asDb(false) . "'", 'datetime'); + $lastMonth = db_convert("'".date($GLOBALS['timedate']->get_db_date_time_format() , strtotime('-1 month')) . "'", 'datetime'); if( !$send_usage_info){ $info['users_active_30_days'] = -1; } @@ -98,10 +98,10 @@ function getSystemInfo($send_usage_info=true){ $result=$db->query($query, 'fetching last 30 users count', false); $row = $db->fetchByAssoc($result); $info['users_active_30_days'] = $row['user_count']; - + } - - + + if(!$send_usage_info){ @@ -148,10 +148,10 @@ function getBaseSystemInfo($send_usage_info=true){ return $info; - + } - + function check_now($send_usage_info=true, $get_request_data=false, $response_data = false, $from_install=false ) { global $sugar_config, $timedate; global $db, $license; @@ -164,7 +164,7 @@ function check_now($send_usage_info=true, $get_request_data=false, $response_dat if($from_install){ $info = getBaseSystemInfo(false); - + }else{ $info = getSystemInfo($send_usage_info); } @@ -177,7 +177,7 @@ function check_now($send_usage_info=true, $get_request_data=false, $response_dat if(empty($ping) || $sclient->getError()){ $sclient = ''; } - + if(empty($sclient)){ $GLOBALS['log']->debug('USING HTTP TO CONNECT TO HEARTBEAT'); $sclient = new nusoapclient('http://updates.sugarcrm.com/heartbeat/soap.php', false, false, false, false, false, 15, 15); @@ -199,7 +199,7 @@ function check_now($send_usage_info=true, $get_request_data=false, $response_dat return serialize($request_data); } $encodedResult = $sclient->call('sugarHome', array('key'=>$key, 'data'=>$encoded)); - + }else{ $encodedResult = $response_data['data']; $key = $response_data['key']; @@ -242,15 +242,15 @@ function check_now($send_usage_info=true, $get_request_data=false, $response_dat $resultData = array(); $resultData['versions'] = array(); - $license->saveSetting('license', 'last_connection_fail', TimeDate::getInstance()->nowDb()); + $license->saveSetting('license', 'last_connection_fail', gmdate($GLOBALS['timedate']->get_db_date_time_format())); $license->saveSetting('license', 'last_validation', 'no_connection'); - + if( empty($license->settings['license_last_validation_success']) && empty($license->settings['license_last_validation_fail']) && empty($license->settings['license_vk_end_date'])){ - $license->saveSetting('license', 'vk_end_date', TimeDate::getInstance()->nowDb()); - + $license->saveSetting('license', 'vk_end_date', gmdate($GLOBALS['timedate']->get_db_date_time_format())); + $license->saveSetting('license', 'validation_key', base64_encode(serialize(array('verified'=>false)))); } - $_SESSION['COULD_NOT_CONNECT'] =TimeDate::getInstance()->nowDb(); + $_SESSION['COULD_NOT_CONNECT'] =gmdate($GLOBALS['timedate']->get_db_date_time_format()); } if(!empty($resultData['versions'])){ @@ -276,7 +276,7 @@ function check_now($send_usage_info=true, $get_request_data=false, $response_dat return $resultData['versions']; } function set_CheckUpdates_config_setting($value) { - + $admin=new Administration(); $admin->saveSetting('Update','CheckUpdates',$value); @@ -287,7 +287,7 @@ function set_CheckUpdates_config_setting($value) { function get_CheckUpdates_config_setting() { $checkupdates='automatic'; - + $admin=new Administration(); $admin=$admin->retrieveSettings('Update',true); @@ -300,14 +300,14 @@ function get_CheckUpdates_config_setting() { } function set_last_check_version_config_setting($value) { - + $admin=new Administration(); $admin->saveSetting('Update','last_check_version',$value); } function get_last_check_version_config_setting() { - + $admin=new Administration(); $admin=$admin->retrieveSettings('Update'); @@ -320,14 +320,14 @@ function get_last_check_version_config_setting() { function set_last_check_date_config_setting($value) { - + $admin=new Administration(); $admin->saveSetting('Update','last_check_date',$value); } function get_last_check_date_config_setting() { - + $admin=new Administration(); $admin=$admin->retrieveSettings('Update'); @@ -360,9 +360,9 @@ function get_sugarbeat() { function shouldCheckSugar(){ - global $license, $timedate; + global $license; if( - + get_CheckUpdates_config_setting() == 'automatic' ){ return true; } @@ -373,7 +373,7 @@ function shouldCheckSugar(){ function loadLicense($firstLogin=false){ - + $GLOBALS['license']=new Administration(); $GLOBALS['license']=$GLOBALS['license']->retrieveSettings('license', $firstLogin); @@ -382,12 +382,12 @@ function loadLicense($firstLogin=false){ function loginLicense(){ global $current_user, $license, $authLevel; loadLicense(true); - + $authLevel = 0; - + if (shouldCheckSugar()) { - - + + $last_check_date=get_last_check_date_config_setting(); $current_date_time=time(); $time_period=3*23*3600 ; diff --git a/modules/Administration/views/view.backups.php b/modules/Administration/views/view.backups.php deleted file mode 100644 index 7f6acae8..00000000 --- a/modules/Administration/views/view.backups.php +++ /dev/null @@ -1,189 +0,0 @@ -".$mod_strings['LBL_MODULE_NAME']."", - $mod_strings['LBL_BACKUPS_TITLE'] - ); - } - - /** - * @see SugarView::preDisplay() - */ - public function preDisplay() - { - global $current_user; - - if (!is_admin($current_user)) { - sugar_die("Unauthorized access to administration."); - } - } - - /** - * @see SugarView::display() - */ - public function display() - { - require_once('include/utils/zip_utils.php'); - - $form_action = "index.php?module=Administration&action=Backups"; - - $backup_dir = ""; - $backup_zip = ""; - $run = "confirm"; - $input_disabled = ""; - global $mod_strings; - $errors = array(); - - // process "run" commands - if( isset( $_REQUEST['run'] ) && ($_REQUEST['run'] != "") ){ - $run = $_REQUEST['run']; - - $backup_dir = $_REQUEST['backup_dir']; - $backup_zip = $_REQUEST['backup_zip']; - - if( $run == "confirm" ){ - if( $backup_dir == "" ){ - $errors[] = $mod_strings['LBL_BACKUP_DIRECTORY_ERROR']; - } - if( $backup_zip == "" ){ - $errors[] = $mod_strings['LBL_BACKUP_FILENAME_ERROR']; - } - - if( sizeof($errors) > 0 ){ - return( $errors ); - } - - if( !is_dir( $backup_dir ) ){ - if( !mkdir_recursive( $backup_dir ) ){ - $errors[] = $mod_strings['LBL_BACKUP_DIRECTORY_EXISTS']; - } - } - - if( !is_writable( $backup_dir ) ){ - $errors[] = $mod_strings['LBL_BACKUP_DIRECTORY_NOT_WRITABLE']; - } - - if( is_file( "$backup_dir/$backup_zip" ) ){ - $errors[] = $mod_strings['LBL_BACKUP_FILE_EXISTS']; - } - if( is_dir( "$backup_dir/$backup_zip" ) ){ - $errors[] = $mod_strings['LBL_BACKUP_FILE_AS_SUB']; - } - if( sizeof( $errors ) == 0 ){ - $run = "confirmed"; - $input_disabled = "readonly"; - } - } - else if( $run == "confirmed" ){ - ini_set( "memory_limit", "-1" ); - ini_set( "max_execution_time", "0" ); - zip_dir( ".", "$backup_dir/$backup_zip" ); - $run = "done"; - } - } - if( sizeof($errors) > 0 ){ - foreach( $errors as $error ){ - print( "$error
    " ); - } - } - if( $run == "done" ){ - $size = filesize( "$backup_dir/$backup_zip" ); - print( $mod_strings['LBL_BACKUP_FILE_STORED'] . " $backup_dir/$backup_zip ($size bytes).
    \n" ); - print( "" . $mod_strings['LBL_BACKUP_BACK_HOME']. "\n" ); - } - else{ - ?> - - ".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_BACKUPS_TITLE'], - ), - false - ); - echo $mod_strings['LBL_BACKUP_INSTRUCTIONS_1']; ?> -
    -
    - - - - - - - - - - -

    value=""/>
    value=""/>
    - - - - - -
    - - - - - - info( "Backups" ); - } -} diff --git a/modules/Administration/views/view.configuretabs.php b/modules/Administration/views/view.configuretabs.php index 094455dc..c3ce6b04 100644 --- a/modules/Administration/views/view.configuretabs.php +++ b/modules/Administration/views/view.configuretabs.php @@ -52,7 +52,7 @@ class ViewConfiguretabs extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; @@ -104,7 +104,7 @@ class ViewConfiguretabs extends SugarView $this->ss->assign('user_can_edit', $user_can_edit); $this->ss->assign('enabled_tabs', json_encode($enabled)); $this->ss->assign('disabled_tabs', json_encode($disabled)); - $this->ss->assign('title',$this->getModuleTitle(false)); + $this->ss->assign('title',$this->getModuleTitle()); //get list of all subpanels and panels to hide $mod_list_strings_key_to_lower = array_change_key_case($app_list_strings['moduleList']); diff --git a/modules/Administration/views/view.themesettings.php b/modules/Administration/views/view.themesettings.php index f70f3088..e2c0ef99 100644 --- a/modules/Administration/views/view.themesettings.php +++ b/modules/Administration/views/view.themesettings.php @@ -51,7 +51,7 @@ class AdministrationViewThemesettings extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; @@ -78,7 +78,6 @@ class AdministrationViewThemesettings extends SugarView $_REQUEST['disabled_themes'] = implode(',',$disabledThemes); $configurator = new Configurator(); $configurator->config['disabled_themes'] = $_REQUEST['disabled_themes']; - $configurator->config['default_theme'] = $_REQUEST['default_theme']; $configurator->handleOverride(); echo "true"; } else { @@ -106,14 +105,14 @@ class AdministrationViewThemesettings extends SugarView { $disabled[] = array("theme" => $theme, "dir" => $dir); } - $this->ss->assign("THEMES", get_select_options_with_id(SugarThemeRegistry::allThemes(), $GLOBALS['sugar_config']['default_theme'])); + $this->ss->assign('enabled_modules', json_encode($enabled)); $this->ss->assign('disabled_modules', json_encode($disabled)); $this->ss->assign('mod', $mod_strings); $this->ss->assign('APP', $app_strings); $this->ss->assign('currentTheme', SugarThemeRegistry::current()); - echo $this->getModuleTitle(false); + echo $this->getModuleTitle(); echo $this->ss->fetch('modules/Administration/templates/themeSettings.tpl'); } } diff --git a/modules/Bugs/language/en_us.lang.php b/modules/Bugs/language/en_us.lang.php index 5f36bff9..14b18f69 100644 --- a/modules/Bugs/language/en_us.lang.php +++ b/modules/Bugs/language/en_us.lang.php @@ -105,7 +105,6 @@ $mod_strings = array ( 'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Accounts', 'LBL_CASES_SUBPANEL_TITLE' => 'Cases', 'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects', - 'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documents', 'LBL_SYSTEM_ID' => 'System ID', 'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User', 'LBL_ASSIGNED_TO_NAME' => 'Assigned to', diff --git a/modules/Bugs/metadata/SearchFields.php b/modules/Bugs/metadata/SearchFields.php index 94ee4511..2c888f34 100644 --- a/modules/Bugs/metadata/SearchFields.php +++ b/modules/Bugs/metadata/SearchFields.php @@ -47,20 +47,5 @@ $searchFields['Bugs'] = 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), 'type'=> array('query_type'=>'default', 'options' => 'bug_type_dom', 'template_var' => 'TYPE_OPTIONS', 'options_add_blank' => true), - 'open_only' => array( - 'query_type'=>'default', - 'db_field'=>array('status'), - 'operator'=>'not in', - 'closed_values' => array('Closed', 'Rejected'), - 'type'=>'bool', - ), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/modules/Bugs/metadata/detailviewdefs.php b/modules/Bugs/metadata/detailviewdefs.php index 5774977e..6448a5f5 100644 --- a/modules/Bugs/metadata/detailviewdefs.php +++ b/modules/Bugs/metadata/detailviewdefs.php @@ -35,58 +35,65 @@ ********************************************************************************/ $viewdefs['Bugs']['DetailView'] = array( -'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',)), - 'maxColumns' => '2', +'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', + array('customCode'=>''),)), + 'maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30') ), ), - + 'panels' =>array ( - 'lbl_bug_information'=>array( + 'lbl_bug_information'=>array( array ( 'bug_number', 'priority', ), - + array ( array ( - 'name' => 'name', + 'name' => 'name', 'label' => 'LBL_SUBJECT', - ), + ), 'status', ), - + array ( 'type', 'source', ), - + array ( 'product_category', 'resolution', ), - + array ( array ( 'name' => 'found_in_release', - 'label' => 'LBL_FOUND_IN_RELEASE', - ), + 'label' => 'LBL_FOUND_IN_RELEASE', + ), 'fixed_in_release', ), - + array ( 'description', ), - + array ( 'work_log', ), - + ), - 'LBL_PANEL_ASSIGNMENT' => + 'LBL_PANEL_ASSIGNMENT' => array ( array ( @@ -104,7 +111,7 @@ $viewdefs['Bugs']['DetailView'] = array( ), array ( - + array ( 'name' => 'date_entered', 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', @@ -112,7 +119,7 @@ $viewdefs['Bugs']['DetailView'] = array( ), ), - ), -) + ), +) ); ?> \ No newline at end of file diff --git a/modules/Bugs/metadata/editviewdefs.php b/modules/Bugs/metadata/editviewdefs.php index 463c3e2b..2bd1a7d6 100644 --- a/modules/Bugs/metadata/editviewdefs.php +++ b/modules/Bugs/metadata/editviewdefs.php @@ -38,69 +38,69 @@ $viewdefs['Bugs']['EditView'] = array( 'templateMeta' => array('form'=>array('hidden'=>array('', '') ), - 'maxColumns' => '2', + 'maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30') + ), ), - ), - - + + 'panels' =>array ( - 'lbl_bug_information' => + 'lbl_bug_information' => array ( - + array ( array ( 'name' => 'bug_number', 'type' => 'readonly', ), ), - + array ( array('name'=>'name', 'displayParams'=>array('size'=>60, 'required'=>true)), - ), - + ), + array ( 'priority', 'type', ), - + array ( 'source', 'status', - + ), - + array ( 'product_category', 'resolution', ), - - + + array ( 'found_in_release', 'fixed_in_release' ), - + array ( array ( 'name' => 'description', 'nl2br' => true, ), ), - - + + array ( array ( 'name' => 'work_log', 'nl2br' => true, ), ), - + ), - 'LBL_PANEL_ASSIGNMENT' => + 'LBL_PANEL_ASSIGNMENT' => array ( array ( array ( @@ -108,8 +108,8 @@ $viewdefs['Bugs']['EditView'] = array( 'label' => 'LBL_ASSIGNED_TO_NAME', ), ), - ), + ), ), - + ); ?> \ No newline at end of file diff --git a/modules/Bugs/metadata/searchdefs.php b/modules/Bugs/metadata/searchdefs.php index 83d46c41..83b22213 100644 --- a/modules/Bugs/metadata/searchdefs.php +++ b/modules/Bugs/metadata/searchdefs.php @@ -42,7 +42,7 @@ */ $searchdefs['Bugs'] = array( 'templateMeta' => array( - 'maxColumns' => '4', + 'maxColumns' => '3', 'widths' => array('label' => '10', 'field' => '30'), ), 'layout' => array( @@ -50,7 +50,6 @@ 'name', array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), ), 'advanced_search' => array( 'bug_number', diff --git a/modules/Bugs/metadata/subpaneldefs.php b/modules/Bugs/metadata/subpaneldefs.php index 0fc26f5b..6c1c8b02 100644 --- a/modules/Bugs/metadata/subpaneldefs.php +++ b/modules/Bugs/metadata/subpaneldefs.php @@ -132,27 +132,6 @@ $layout_defs['Bugs'] = array( ), ) ), - 'documents' => array( - 'order' => 25, - 'module' => 'Documents', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'documents', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), 'accounts' => array( 'order' => 40, 'module' => 'Accounts', diff --git a/modules/Bugs/vardefs.php b/modules/Bugs/vardefs.php index a36138f3..594d1ba8 100644 --- a/modules/Bugs/vardefs.php +++ b/modules/Bugs/vardefs.php @@ -187,14 +187,6 @@ $dictionary['Bug'] = array('table' => 'bugs', 'audited'=>true, 'comment' => ' 'source'=>'non-db', 'vname'=>'LBL_EMAILS' ), - 'documents'=> - array ( - 'name' => 'documents', - 'type' => 'link', - 'relationship' => 'documents_bugs', - 'source' => 'non-db', - 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - ), 'contacts' => array ( 'name' => 'contacts', diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index 413bd1bb..70de6d51 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -40,6 +40,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ +require_once('modules/Calendar/DateTimeUtil.php'); + require_once('include/utils/activity_utils.php'); function sort_func_by_act_date($act0,$act1) @@ -54,11 +56,7 @@ function sort_func_by_act_date($act0,$act1) class Calendar { - var $view = 'month'; - /** - * Current date - * @var SugarDateTime - */ + var $view = 'month'; var $date_time; var $slices_arr = array(); // for monthly calendar view, if you want to see all the @@ -73,9 +71,9 @@ class Calendar var $slice_hash = array(); var $shared_users_arr = array(); - function __construct($view,$time_arr=array()) + function Calendar($view,$time_arr=array()) { - global $current_user, $timedate; + global $current_user; global $sugar_config; if ( $current_user->getPreference('time')) { @@ -91,11 +89,6 @@ class Calendar $this->use_24 = 0; } - if (!( $view == 'day' || $view == 'month' || $view == 'year' || $view == 'week' || $view == 'shared') ) - { - sugar_die ("view needs to be one of: day, week, month, shared, or year"); - } - $this->view = $view; if ( isset($time_arr['activity_focus'])) @@ -105,20 +98,39 @@ class Calendar } else { - if(!empty($time_arr)) { - // FIXME: what format? - $this->date_time = $timedate->fromTimeArray($time_arr); - } else { - $this->date_time = $timedate->getNow(); - } + $this->date_time = new DateTimeUtil($time_arr,true); + } + + if (!( $view == 'day' || $view == 'month' || $view == 'year' || $view == 'week' || $view == 'shared') ) + { + sugar_die ("view needs to be one of: day, week, month, shared, or year"); + } + + if ( empty($this->date_time->year)) + { + sugar_die ("all views: year was not set"); + } + else if ( $this->view == 'month' && empty($this->date_time->month)) + { + sugar_die ("month view: month was not set"); + } + else if ( $this->view == 'week' && empty($this->date_time->week)) + { + sugar_die ("week view: week was not set"); + } + else if ( $this->view == 'shared' && empty($this->date_time->week)) + { + sugar_die ("shared view: shared was not set"); + } + else if ( $this->view == 'day' && empty($this->date_time->day) && empty($this->date_time->month)) + { + sugar_die ("day view: day and month was not set"); } - $timedate->tzUser($this->date_time, $current_user); - $GLOBALS['log']->debug("CALENDATE: ".$this->date_time->format('r')); $this->create_slices(); } - function add_shared_users($shared_users_arr) + function add_shared_users(&$shared_users_arr) { $this->shared_users_arr = $shared_users_arr; } @@ -163,12 +175,15 @@ class Calendar function create_slices() { + global $current_user; + if ( $this->view == 'month') { $days_in_month = $this->date_time->days_in_month; + $first_day_of_month = $this->date_time->get_day_by_index_this_month(0); $num_of_prev_days = $first_day_of_month->day_of_week; // do 42 slices (6x7 grid) @@ -221,9 +236,8 @@ class Calendar } function add_activities($user,$type='sugar') { - global $timedate; if ( $this->view == 'week' || $this->view == 'shared') { - $end_date_time = $this->date_time->get("+7 days"); + $end_date_time = $this->date_time->get_first_day_of_next_week(); } else { $end_date_time = $this->date_time; } @@ -236,11 +250,10 @@ class Calendar } // loop thru each activity for this user - foreach ($acts_arr as $act) { + for ($i = 0;$i < count($acts_arr);$i++) { + $act = $acts_arr[$i]; // get "hashed" time slots for the current activity we are looping through - $start = $timedate->tzUser($act->start_time); - $end = $timedate->tzUser($act->end_time); - $hash_list = SugarDateTime::getHashList($this->view, $start, $end); + $hash_list =DateTimeUtil::getHashList($this->view,$act->start_time,$act->end_time); for($j=0;$j < count($hash_list); $j++) { if(!isset($this->slice_hash[$hash_list[$j]]) || !isset($this->slice_hash[$hash_list[$j]]->acts_arr[$user->id])) { @@ -251,7 +264,7 @@ class Calendar } } - function occurs_within_slice($slice, $act) + function occurs_within_slice(&$slice,&$act) { // if activity starts within this slice // OR activity ends within this slice @@ -266,6 +279,10 @@ class Calendar $act->end_time->ts >= $slice->end_time->ts ) ) { + //print "act_start:{$act->start_time->ts}
    "; + //print "act_end:{$act->end_time->ts}
    "; + //print "slice_start:{$slice->start_time->ts}
    "; + //print "slice_end:{$slice->end_time->ts}
    "; return true; } @@ -277,20 +294,19 @@ class Calendar { if ($this->view == 'month') { - $day = $this->date_time->get("-1 month")->get_day_begin(1); + $day = $this->date_time->get_first_day_of_last_month(); } else if ($this->view == 'week' || $this->view == 'shared') { - // first day last week - $day = $this->date_time->get("-7 days")->get_day_by_index_this_week(0)->get_day_begin(); + $day = $this->date_time->get_first_day_of_last_week(); } else if ($this->view == 'day') { - $day = $this->date_time->get("yesterday")->get_day_begin(); + $day = $this->date_time->get_yesterday(); } else if ($this->view == 'year') { - $day = $this->date_time->get_year_begin($this->year-1); + $day = $this->date_time->get_first_day_of_last_year(); } else { @@ -303,22 +319,22 @@ class Calendar { if ($this->view == 'month') { - $day = $this->date_time->get("+1 month")->get_day_begin(1); + $day = $this->date_time->get_first_day_of_next_month(); } else if ($this->view == 'week' || $this->view == 'shared' ) { - $day = $this->date_time->get("+7 days")->get_day_by_index_this_week(0)->get_day_begin(); + $day = $this->date_time->get_first_day_of_next_week(); } else if ($this->view == 'day') { - $day = $this->date_time->get("tomorrow")->get_day_begin(); + $day = $this->date_time->get_tomorrow(); } else if ($this->view == 'year') { - $day = $this->date_time->get_year_begin($this->year+1); + $day = $this->date_time->get_first_day_of_next_year(); } else { @@ -428,79 +444,84 @@ class CalendarActivity // if we've passed in an array, then this is a free/busy slot // and does not have a sugarbean associated to it global $DO_USER_TIME_OFFSET; - global $timedate; - if ( is_array ( $args )) - { - $this->start_time = clone $args[0]; - $this->end_time = clone $args[1]; - $this->sugar_bean = null; - $timedate->tzGMT($this->start_time); - $timedate->tzGMT($this->end_time); - return; - } + if ( is_array ( $args )) + { + $this->start_time = $args[0]; + $this->end_time = $args[1]; + $this->sugar_bean = null; + return; + } // else do regular constructor.. $sugar_bean = $args; + global $timedate; $this->sugar_bean = $sugar_bean; if ($sugar_bean->object_name == 'Task') { - $this->start_time = $timedate->fromUser($this->sugar_bean->date_due); + + $newdate = $timedate->merge_date_time($this->sugar_bean->date_due, $this->sugar_bean->time_due); + $tempdate = $timedate->to_db_date($newdate,$DO_USER_TIME_OFFSET); + + if($newdate != $tempdate){ + $this->sugar_bean->date_due = $tempdate; + } + $temptime = $timedate->to_db_time($newdate, $DO_USER_TIME_OFFSET); + if($newdate != $temptime){ + $this->sugar_bean->time_due = $temptime; + } + $this->start_time =DateTimeUtil::get_time_start( + $this->sugar_bean->date_due, + $this->sugar_bean->time_due + ); if ( empty($this->start_time)) { return null; } - $this->end_time = $timedate->fromUser($this->sugar_bean->date_due); + $this->end_time = $this->start_time; } else { - $this->start_time = $timedate->fromUser($this->sugar_bean->date_start); - if ( empty($this->start_time)) - { - return null; - } - $hours = $this->sugar_bean->duration_hours; - if(empty($hours)) { - $hours = 0; - } - $mins = $this->sugar_bean->duration_minutes; - if(empty($mins)) { - $mins = 0; - } - $this->end_time = $this->start_time->get("+$hours hours $mins minutes"); + // Convert it back to database time so we can properly manage it for getting the proper start and end dates + $dbDate = $timedate->to_db($this->sugar_bean->date_start); + $this->start_time =DateTimeUtil::get_time_start($dbDate); + $this->end_time =DateTimeUtil::get_time_end( + $this->start_time, + $this->sugar_bean->duration_hours, + $this->sugar_bean->duration_minutes + ); } - // Convert it back to database time so we can properly manage it for getting the proper start and end dates - $timedate->tzGMT($this->start_time); - $timedate->tzGMT($this->end_time); + } - function get_occurs_within_where_clause($table_name, $rel_table, $start_ts_obj, $end_ts_obj, $field_name='date_start', $view) - { + function get_occurs_within_where_clause($table_name, $rel_table, $start_ts_obj, $end_ts_obj, $field_name='date_start', $view) { global $timedate; - // ensure we're working with user TZ - $start_ts_obj = $timedate->tzUser($start_ts_obj); - $end_ts_obj = $timedate->tzUser($end_ts_obj); + $dtUtilArr = array(); switch ($view) { case 'month': - $start = $start_ts_obj->get_day_begin(1); - $end = $end_ts_obj->get("first day of next month")->get_day_begin(); + $start_ts = $start_ts_obj->get_first_day_of_this_month(); + $end_ts = $end_ts_obj->get_first_day_of_next_month(); break; default: // Date for the past 5 days as that is the maximum duration of a single activity - $start = $start_ts_obj->get("-5 days")->get_day_begin(); - $end = $start_ts_obj->get("+5 days")->get_day_begin(); + $dtUtilArr['ts'] = $start_ts_obj->ts - (86400*5); + $start_ts = new DateTimeUtil($dtUtilArr, false); + // Date for the next 5 days as that is the maximum duration of a single activity + $dtUtilArr['ts'] = $end_ts_obj->ts + (86400*5); + $end_ts = new DateTimeUtil($dtUtilArr, false); break; } + $start_day = $timedate->getDayStartEndGMT(date($timedate->get_date_format(), $start_ts->ts)); + $end_day = $timedate->getDayStartEndGMT(date($timedate->get_date_format(), $end_ts->ts)); + $field_date = $GLOBALS['db']->convert($table_name.'.'.$field_name,'datetime'); - $start_day = $start->asDb(); - $end_day = $end->asDb(); - $where = "($field_date >= '{$start_day}' AND $field_date < '{$end_day}'"; + $where = "($field_date >= '{$start_day['start']}' AND $field_date < '{$end_day['start']}'"; if($rel_table != '') { $where .= " AND $rel_table.accept_status != 'decline'"; } @@ -509,20 +530,23 @@ class CalendarActivity return $where; } - function get_freebusy_activities($user_focus, $start_date_time, $end_date_time) + function get_freebusy_activities(&$user_focus,&$start_date_time,&$end_date_time) { - $act_list = array(); + + + $act_list = array(); $vcal_focus = new vCal(); $vcal_str = $vcal_focus->get_vcal_freebusy($user_focus); $lines = explode("\n",$vcal_str); - $utc = new DateTimeZone("UTC"); + foreach ($lines as $line) { + $dates_arr = array(); if ( preg_match('/^FREEBUSY.*?:([^\/]+)\/([^\/]+)/i',$line,$matches)) { - $dates_arr = array(SugarDateTime::createFromFormat(vCal::UTC_FORMAT, $matches[1], $utc), - SugarDateTime::createFromFormat(vCal::UTC_FORMAT, $matches[2], $utc)); + $dates_arr[] =DateTimeUtil::parse_utc_date_time($matches[1]); + $dates_arr[] =DateTimeUtil::parse_utc_date_time($matches[2]); $act_list[] = new CalendarActivity($dates_arr); } } @@ -531,7 +555,7 @@ class CalendarActivity } - function get_activities($user_id, $show_tasks, $view_start_time, $view_end_time, $view) { + function get_activities($user_id, $show_tasks, &$view_start_time, &$view_end_time, $view) { global $current_user; $act_list = array(); $seen_ids = array(); diff --git a/include/generic/SugarWidgets/SugarWidgetFieldfile.php b/modules/Calendar/DateTime.php similarity index 84% rename from include/generic/SugarWidgets/SugarWidgetFieldfile.php rename to modules/Calendar/DateTime.php index 94bd5ea4..acd04444 100644 --- a/include/generic/SugarWidgets/SugarWidgetFieldfile.php +++ b/modules/Calendar/DateTime.php @@ -1,5 +1,5 @@ diff --git a/modules/Calendar/DateTimeUtil.php b/modules/Calendar/DateTimeUtil.php index 7521d1c1..ceb134aa 100644 --- a/modules/Calendar/DateTimeUtil.php +++ b/modules/Calendar/DateTimeUtil.php @@ -39,10 +39,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -/** - * @deprecated Phased out, should not be used anymore - * Use SugarDateTime instead - */ class DateTimeUtil { var $timezone; diff --git a/modules/Calendar/Menu.php b/modules/Calendar/Menu.php index 00da147a..787719ef 100644 --- a/modules/Calendar/Menu.php +++ b/modules/Calendar/Menu.php @@ -49,7 +49,12 @@ global $mod_strings; if(ACLController::checkAccess('Calls', 'edit', true))$module_menu[]=Array("index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView", $mod_strings['LNK_NEW_CALL'],"CreateCalls"); if(ACLController::checkAccess('Meetings', 'edit', true))$module_menu[]=Array("index.php?module=Meetings&action=EditView&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_NEW_MEETING'],"CreateMeetings"); if(ACLController::checkAccess('Tasks', 'edit', true))$module_menu[]=Array("index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks"); -if(ACLController::checkAccess('Calendar', 'list', true))$module_menu[]=Array("index.php?module=Calendar&action=index&return_module=Calendar&return_action=index", $mod_strings['LNK_VIEW_CALENDAR'],"Calendar"); +if(ACLController::checkAccess('Calls', 'list', true))$module_menu[]=Array("index.php?module=Calls&action=index&return_module=Calls&return_action=DetailView", $mod_strings['LNK_CALL_LIST'],"Calls"); +if(ACLController::checkAccess('Meetings', 'list', true))$module_menu[]=Array("index.php?module=Meetings&action=index&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_MEETING_LIST'],"Meetings"); +if(ACLController::checkAccess('Tasks', 'list', true))$module_menu[]=Array("index.php?module=Tasks&action=index&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks"); +if(ACLController::checkAccess('Calls', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Calls&return_module=Calls&return_action=index", $mod_strings['LNK_IMPORT_CALLS'],"Import", 'Calls'); +if(ACLController::checkAccess('Meetings', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Meetings&return_module=Meetings&return_action=index", $mod_strings['LNK_IMPORT_MEETINGS'],"Import", 'Meetings'); +if(ACLController::checkAccess('Tasks', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Tasks&return_module=Tasks&return_action=index", $mod_strings['LNK_IMPORT_TASKS'],"Import", 'Tasks'); diff --git a/modules/Calendar/TasksListView.php b/modules/Calendar/TasksListView.php index b7ffaab7..22381888 100644 --- a/modules/Calendar/TasksListView.php +++ b/modules/Calendar/TasksListView.php @@ -121,7 +121,8 @@ global $timedate; //jc: bug 14616 - dates need to specificy the end of the current date in order to get tasks // that are scheduled to start today -$today = $timedate->getNow(true)->get_day_end_time()->asDb(); +$today = $timedate->to_db_date(date($timedate->get_date_format() . " H:m:s"), false) . " 23:59:59"; +$today = $timedate->handle_offset($today, $timedate->dbDayFormat, true) . " 23:59:59"; //end bug 14616 $where = "(tasks.assigned_user_id='$current_user->id' and tasks.status<>'Completed' and tasks.status<>'Deferred'"; @@ -132,9 +133,8 @@ $lv->delete = false; $lv->select = false; $lv->mailMerge = false; $lv->multiSelect = false; -$lv->showMassupdateFields = false; -$lv->setup($seedTask, 'include/ListView/ListViewNoMassUpdate.tpl', $where, $params); -echo getClassicModuleTitle($current_module_strings['LBL_MODULE_NAME'], array($current_module_strings['LBL_LIST_FORM_TITLE']), false); +$lv->setup($seedTask, 'include/ListView/ListViewGeneric.tpl', $where, $params); +echo get_module_title($current_module_strings['LBL_MODULE_NAME'], $current_module_strings['LBL_LIST_FORM_TITLE'], false); echo $lv->display(); diff --git a/modules/Calendar/index.php b/modules/Calendar/index.php index 3c128324..e5752440 100644 --- a/modules/Calendar/index.php +++ b/modules/Calendar/index.php @@ -45,7 +45,7 @@ if(!ACLController::checkAccess('Calendar', 'list', true)){ ACLController::displayNoAccess(true); } -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_ACTION']), false); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], "»".$mod_strings['LBL_MODULE_ACTION'], true); if ( empty($_REQUEST['view'])) { @@ -87,6 +87,20 @@ if ( isset($_REQUEST['year'])) } // today adjusted for user's timezone +if(empty($date_arr)) { + global $timedate; + $gmt_today = $timedate->get_gmt_db_datetime(); + $user_today = $timedate->handle_offset($gmt_today, $GLOBALS['timedate']->get_db_date_time_format()); + preg_match('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$user_today,$matches); + + $date_arr = array( + 'year'=>$matches[1], + 'month'=>$matches[2], + 'day'=>$matches[3], + 'hour'=>$matches[4], + 'min'=>$matches[5]); +} + $args['calendar'] = new Calendar($_REQUEST['view'], $date_arr); if ($_REQUEST['view'] == 'day' || $_REQUEST['view'] == 'week' || $_REQUEST['view'] == 'month') { @@ -114,9 +128,9 @@ function toggleDisplay(id){ } // End --> - +
    - diff --git a/modules/Calendar/language/en_us.lang.php b/modules/Calendar/language/en_us.lang.php index 3b8c1538..d25528a4 100644 --- a/modules/Calendar/language/en_us.lang.php +++ b/modules/Calendar/language/en_us.lang.php @@ -54,7 +54,7 @@ $mod_strings = array ( 'LNK_CALL_LIST' => 'View Calls', 'LNK_MEETING_LIST' => 'View Meetings', 'LNK_TASK_LIST' => 'View Tasks', - 'LNK_VIEW_CALENDAR' => 'View Calendar', + 'LNK_VIEW_CALENDAR' => 'Today', 'LNK_IMPORT_CALLS'=>'Import Calls', 'LNK_IMPORT_MEETINGS'=>'Import Meetings', 'LNK_IMPORT_TASKS'=>'Import Tasks', diff --git a/modules/Calendar/templates/templates_calendar.php b/modules/Calendar/templates/templates_calendar.php index 49baf236..cd9a0c54 100644 --- a/modules/Calendar/templates/templates_calendar.php +++ b/modules/Calendar/templates/templates_calendar.php @@ -41,7 +41,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); // template ///////////////////////////////// global $timedate; -function template_cal_tabs($args) { +function template_cal_tabs(& $args) { global $mod_strings, $sugar_version, $sugar_config; $tabs = array('day', 'week', 'month', 'year', 'shared'); @@ -73,7 +73,7 @@ function template_cal_tabs($args) { ///////////////////////////////// // template ///////////////////////////////// - function template_cal_month_slice($args) { + function template_cal_month_slice(& $args) { ?> sugar_bean->$field['name'])) $fields[strtoupper($field['name'])] = $act->sugar_bean->$field['name']; } - - $extra = "id=\"adspan_{$act->sugar_bean->id}\" " - . "onmouseover=\"return SUGAR.util.getAdditionalDetails( '{$act->sugar_bean->module_dir}','{$act->sugar_bean->id}', 'adspan_{$act->sugar_bean->id}');\" " - . "onmouseout=\"return SUGAR.util.clearAdditionalDetailsCall()\" onmouseout=\"return nd(1000);\" "; + if($act->sugar_bean->ACLAccess('DetailView') && file_exists('modules/' . $act->sugar_bean->module_dir . '/metadata/additionalDetails.php')) { + require_once('modules/' . $act->sugar_bean->module_dir . '/metadata/additionalDetails.php'); + $ad_function = 'additionalDetails' . $act->sugar_bean->object_name; + $results = $ad_function($fields); + $results['string'] = str_replace(array("'", "'"), '\'', $results['string']); // no xss! + + if(trim($results['string']) == '') $results['string'] = $app_strings['LBL_NONE']; + } + + $extra = "onmouseover=\"return overlib('" . + str_replace(array("\rn", "\r", "\n"), array('','','
    '), $results['string']) + . "', CAPTION, '{$app_strings['LBL_ADDITIONAL_DETAILS']}" + . "', DELAY, 200, STICKY, MOUSEOFF, 1000, WIDTH, " + .(empty($results['width']) ? '300' : $results['width']) + . ", CLOSETEXT, '', " + . "CLOSETITLE, '{$app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE']}', CLOSECLICK, FGCLASS, 'olFgClass', " + . "CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass');\" " + . "onmouseout=\"return nd(1000);\" "; $count ++; @@ -159,7 +173,7 @@ function template_cal_tabs($args) { } } - function template_echo_slice_activities_shared($args) { + function template_echo_slice_activities_shared(& $args) { global $app_list_strings; global $shared_user, $timedate; @@ -180,7 +194,7 @@ function template_cal_tabs($args) { if(empty($act->sugar_bean->name)) { echo ""; } else { echo ""; } else { echo ""; if(empty($act->sugar_bean->name)) { echo ""; } else { echo ""; } } @@ -240,7 +254,7 @@ function template_cal_tabs($args) { ///////////////////////////////// // template ///////////////////////////////// - function template_cal_day_slice($args) { + function template_cal_day_slice(& $args) { /* echo "cale:".$args['calendar']->view; echo "cal1:".$args['calendar']->date_time->month; @@ -259,9 +273,9 @@ function template_cal_tabs($args) { ///////////////////////////////// // template ///////////////////////////////// - function template_calendar($args) { + function template_calendar(& $args) { global $timedate; - if(isset($args['size']) && $args['size'] == 'small') { + if(isset($args['size']) && $args['size'] = 'small') { $args['calendar']->show_activities = false; $args['calendar']->show_week_on_month_view = false; } @@ -422,7 +436,7 @@ function template_cal_tabs($args) { { ?> + href="index.php?module=Calendar&action=index&view=month&date_time->get_date_str();?>">
    + "; - echo $timedate->getTimePart($act->sugar_bean->date_start); + echo $timedate->getTimePart($act->sugar_bean->date_start); echo "
    @@ -197,7 +211,7 @@ function template_cal_tabs($args) { if(empty($act->sugar_bean->name)) { echo "". - $timedate->getTimePart($act->sugar_bean->date_start); + $timedate->getTimePart($act->sugar_bean->date_start); echo "
    @@ -206,7 +220,7 @@ function template_cal_tabs($args) { $app_list_strings['meeting_status_dom'][$act->sugar_bean->status].":". $act->sugar_bean->name."
    (". $timedate->getTimePart($act->sugar_bean->date_start).")"; - + // MEETING INTEGRATION if($act->sugar_bean->hasIntegratedMeeting()) { $out .= $act->sugar_bean->miIcon; @@ -218,18 +232,18 @@ function template_cal_tabs($args) { } } else if($act->sugar_bean->object_name == 'Task') { echo "
    ". - SugarThemeRegistry::current()->getImage('Tasks','alt="'.$app_list_strings['task_status_dom'][$act->sugar_bean->status].': '.$act->sugar_bean->name.'"'); + SugarThemeRegistry::current()->getImage('Tasks','alt="'.$act->sugar_bean->status.': '.$act->sugar_bean->name.'"'); echo "". - $timedate->getTimePart($act->sugar_bean->date_due); + $timedate->getTimePart($act->sugar_bean->date_due); echo "
    sugar_bean->id."\">". - $app_list_strings['task_status_dom'][$act->sugar_bean->status].': '.$act->sugar_bean->name."
    (". + $act->sugar_bean->status.': '.$act->sugar_bean->name."
    (". $timedate->getTimePart($act->sugar_bean->date_due).")
    "; // need to change these values after we find out what activities @@ -545,7 +559,7 @@ function template_calendar_horizontal($args) { echo "
    "; } -function template_cal_vertical_slice($args) { +function template_cal_vertical_slice(& $args) { global $timedate; ?>
    @@ -567,7 +581,7 @@ function template_cal_vertical_slice($args) { } -function template_cal_horizontal_slice($args) { +function template_cal_horizontal_slice(& $args) { echo ""; if($args['show_link'] == 'on') { @@ -581,7 +595,7 @@ function template_cal_horizontal_slice($args) { echo "
    @@ -621,7 +635,7 @@ function template_calendar_year($args) { } -function template_calendar_month($args) { +function template_calendar_month(& $args) { global $mod_strings; ?> @@ -643,6 +657,9 @@ function template_calendar_month($args) { } ?> +show_week_on_month_view ) { ?> + + +show_week_on_month_view ) { ?> + +get_gmt_db_datetime(); + $user_today = $timedate->handle_offset($gmt_today, $GLOBALS['timedate']->get_db_date_time_format()); + preg_match_all('/\d*/', $user_today, $matches); + $matches = $matches[0]; + $user_today_timestamp = mktime($matches[6], $matches[8], '0', $matches[2], $matches[4], $matches[0]); + } + $slice = $args['slice']; - if($slice->start_time->get_mysql_date() == $timedate->nowDbDate()) { + if($slice->start_time->get_mysql_date() == date($GLOBALS['timedate']->get_db_date_time_format(), $user_today_timestamp)) { return true; } - return false; } -function template_echo_daily_view_hour($args) { +function template_echo_daily_view_hour(& $args) { $slice = $args['slice']; $hour = $slice->start_time->get_hour(); @@ -710,7 +740,7 @@ function template_echo_daily_view_hour($args) { } -function template_echo_daily_view_24_hour($args) { +function template_echo_daily_view_24_hour(& $args) { $slice = $args['slice']; $hour = $slice->start_time->get_24_hour(); @@ -718,16 +748,16 @@ function template_echo_daily_view_24_hour($args) { } -function template_echo_slice_date($args) { +function template_echo_slice_date(& $args) { global $mod_strings; global $timedate; $slice = $args['slice']; if($slice->view != 'hour') { if($slice->start_time->get_day_of_week_short() == 'Sun' || $slice->start_time->get_day_of_week_short() == 'Sat') { - echo "get_view().$slice->start_time->get_date_str()."\" "; + echo "get_view()."&".$slice->start_time->get_date_str()."\" "; } else { - echo "get_view().$slice->start_time->get_date_str()."\" "; + echo "get_view()."&".$slice->start_time->get_date_str()."\" "; } } @@ -767,7 +797,7 @@ function template_echo_slice_date($args) { echo ""; } -function template_echo_slice_date_nolink($args) { +function template_echo_slice_date_nolink(& $args) { global $mod_strings; $slice = $args['slice']; echo $slice->start_time->get_day_of_week_short(); @@ -847,20 +877,20 @@ function template_echo_date_info($view, $date_time) { } } -function template_get_next_calendar($args) { +function template_get_next_calendar(& $args) { global $mod_strings; ?> -get_view_name($args['calendar']->view)]; ?> getImage('calendar_next','alt="'. $mod_strings["LBL_NEXT_".$args['calendar']->get_view_name($args['calendar']->view)].'" align="absmiddle" border="0"'); ?> +get_view_name($args['calendar']->view)]; ?> getImage('calendar_next','alt="'. $mod_strings["LBL_NEXT_".$args['calendar']->get_view_name($args['calendar']->view)].'" align="absmiddle" border="0"'); ?> -getImage('calendar_previous','alt="'. $mod_strings["LBL_PREVIOUS_".$args['calendar']->get_view_name($args['calendar']->view)].'" align="absmiddle" border="0"'); ?>  get_view_name($args['calendar']->view)]; ?> +getImage('calendar_previous','alt="'. $mod_strings["LBL_PREVIOUS_".$args['calendar']->get_view_name($args['calendar']->view)].'" align="absmiddle" border="0"'); ?>  get_view_name($args['calendar']->view)]; ?>date_start) && isset($this->duration_hours) && isset($this->duration_minutes)) - { - $td = $timedate->fromDb($this->date_start); - if($td) - { - $this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb(); - } + if( isset($this->date_start) && + isset($this->duration_hours) && + isset($this->duration_minutes) ) { + $date_time_start = DateTimeUtil::get_time_start($this->date_start); + $date_time_end = DateTimeUtil::get_time_end($date_time_start, $this->duration_hours, $this->duration_minutes); + $this->date_end = gmdate("Y-m-d", $date_time_end->ts); } - if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') { $check_notify = true; } else { @@ -164,7 +163,8 @@ class Call extends SugarBean } } if (empty($this->status) ) { - $this->status = $this->getDefaultStatus(); + $mod_strings = return_module_language($GLOBALS['current_language'], $this->module_dir); + $this->status = $mod_strings['LBL_DEFAULT_STATUS']; } /*nsingh 7/3/08 commenting out as bug #20814 is invalid if($current_user->getPreference('reminder_time')!= -1 && isset($_POST['reminder_checked']) && isset($_POST['reminder_time']) && $_POST['reminder_checked']==0 && $_POST['reminder_time']==-1){ @@ -350,7 +350,7 @@ class Call extends SugarBean global $timedate; //setting default date and time if (is_null($this->date_start)) { - $this->date_start = $timedate->now(); + $this->date_start = $timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format())); } if (is_null($this->duration_hours)) @@ -405,12 +405,12 @@ class Call extends SugarBean if(empty($action)) $action = "index"; - $setCompleteUrl = ""; + $setCompleteUrl = ""; $call_fields['SET_COMPLETE'] = $setCompleteUrl . SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Calls')." border='0'").""; } global $timedate; - $today = $timedate->nowDb(); - $nextday = $timedate->asDbDate($timedate->getNow()->modify("+1 day")); + $today = gmdate($GLOBALS['timedate']->get_db_date_time_format(), time()); + $nextday = gmdate($GLOBALS['timedate']->dbDayFormat, time() + 3600*24); $mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']); $date_db = $timedate->to_db($mergeTime); if( $date_db < $today){ @@ -421,23 +421,6 @@ class Call extends SugarBean $call_fields['DATE_START'] = "".$call_fields['DATE_START'].""; } $this->fill_in_additional_detail_fields(); - - //make sure we grab the localized version of the contact name, if a contact is provided - if (!empty($this->contact_id)) { - global $locale; - $query = "SELECT first_name, last_name, salutation, title FROM contacts "; - $query .= "WHERE id='$this->contact_id' AND deleted=0"; - $result = $this->db->limitQuery($query,0,1,true," Error filling in contact name fields: "); - - // Get the contact name. - $row = $this->db->fetchByAssoc($result); - - if($row != null) - { - $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], $row['salutation'], $row['title']); - } - } - $call_fields['CONTACT_ID'] = $this->contact_id; $call_fields['CONTACT_NAME'] = $this->contact_name; @@ -455,13 +438,14 @@ class Call extends SugarBean global $app_list_strings; global $timedate; - // rrs: bug 42684 - passing a contact breaks this call - $notifyUser =($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user; - - - // Assumes $call dates are in user format - $calldate = $timedate->fromDb($call->date_start); - $xOffset = $timedate->asUser($calldate, $notifyUser).' '.$timedate->userTimezoneSuffix($calldate, $notifyUser); + if ( method_exists($call->current_notify_user,'getUserDateTimePreferences') ) { + $prefDate = $call->current_notify_user->getUserDateTimePreferences(); + } else { + $prefDate['date'] = $timedate->get_date_format(true, $current_user); + $prefDate['time'] = $timedate->get_time_format(true, $current_user); + } + $x = date($prefDate['date']." ".$prefDate['time'], strtotime(($call->date_start . " " . $call->time_start))); + $xOffset = $timedate->handle_offset($x, $prefDate['date']." ".$prefDate['time'], true, $current_user); if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) { $xtpl->assign("ACCEPT_URL", $sugar_config['site_url']. @@ -476,7 +460,7 @@ class Call extends SugarBean $xtpl->assign("CALL_TO", $call->current_notify_user->new_assigned_user_name); $xtpl->assign("CALL_SUBJECT", $call->name); - $xtpl->assign("CALL_STARTDATE", $xOffset); + $xtpl->assign("CALL_STARTDATE", $xOffset . " " . (!empty($app_list_strings['dom_timezones_extra'][$prefDate['userGmtOffset']]) ? $app_list_strings['dom_timezones_extra'][$prefDate['userGmtOffset']] : $prefDate['userGmt'])); $xtpl->assign("CALL_HOURS", $call->duration_hours); $xtpl->assign("CALL_MINUTES", $call->duration_minutes); $xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : "")); @@ -578,7 +562,14 @@ class Call extends SugarBean // $GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true)); $list = array(); - if(!is_array($this->contacts_arr)) { + + $notify_user = new User(); + $notify_user->retrieve($this->assigned_user_id); + $notify_user->new_assigned_user_name = $notify_user->full_name; + $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name"); + $list[] = $notify_user; + + if(!is_array($this->contacts_arr)) { $this->contacts_arr = array(); } @@ -595,7 +586,7 @@ class Call extends SugarBean $notify_user->retrieve($user_id); $notify_user->new_assigned_user_name = $notify_user->full_name; $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name"); - $list[$notify_user->id] = $notify_user; + $list[] = $notify_user; } foreach($this->contacts_arr as $contact_id) { @@ -603,7 +594,7 @@ class Call extends SugarBean $notify_user->retrieve($contact_id); $notify_user->new_assigned_user_name = $notify_user->full_name; $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name"); - $list[$notify_user->id] = $notify_user; + $list[] = $notify_user; } foreach($this->leads_arr as $lead_id) { @@ -611,7 +602,7 @@ class Call extends SugarBean $notify_user->retrieve($lead_id); $notify_user->new_assigned_user_name = $notify_user->full_name; $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name"); - $list[$notify_user->id] = $notify_user; + $list[] = $notify_user; } // $GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true)); return $list; @@ -670,18 +661,6 @@ class Call extends SugarBean parent::save_relationship_changes($is_update, $exclude); } - public function getDefaultStatus() - { - $def = $this->field_defs['status']; - if (isset($def['default'])) { - return $def['default']; - } else { - $app = return_app_list_strings_language($GLOBALS['current_language']); - if (isset($def['options']) && isset($app[$def['options']])) { - $keys = array_keys($app[$def['options']]); - return $keys[0]; - } - } - return ''; - } } + +?> diff --git a/modules/Calls/CallFormBase.php b/modules/Calls/CallFormBase.php index 7cd9ec77..0aec5a56 100644 --- a/modules/Calls/CallFormBase.php +++ b/modules/Calls/CallFormBase.php @@ -82,7 +82,7 @@ $ntc_time_format = '('.$timedate->get_user_time_format().')'; $user_id = $current_user->id; $default_status = $app_list_strings['call_status_default']; $default_parent_type= $app_list_strings['record_type_default_key']; -$date = TimeDate::getInstance()->nowDb(); +$date = gmdate($GLOBALS['timedate']->get_db_date_time_format()); $default_date_start = $timedate->to_display_date($date,false); $default_time_start = $timedate->to_display_time($date); $time_ampm = $timedate->AMPMMenu($prefix,$default_time_start); @@ -231,7 +231,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { } if(isset($_POST[$prefix.'meridiem']) && !empty($_POST[$prefix.'meridiem'])) { - $_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'],$timedate->get_time_format(), $_POST[$prefix.'meridiem']); + $_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'],$timedate->get_time_format(true), $_POST[$prefix.'meridiem']); } if(isset($_POST[$prefix.'time_start']) && strlen($_POST[$prefix.'date_start']) == 10) { @@ -247,34 +247,34 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { //add assigned user and current user if this is the first time bean is saved if(empty($focus->id) && !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] =='Calls' && !empty($_REQUEST['return_action']) && $_REQUEST['return_action'] =='DetailView'){ - //if return action is set to detail view and return module to call, then this is from the long form, do not add the assigned user (only the current user) + //if return action is set to detail view and return module to call, then this is from the long form, do not add the assigned user (only the current user) //The current user is already added to UI and we want to give the current user the option of opting out of meeting. if($current_user->id != $_POST['assigned_user_id']){ $_POST['user_invitees'] .= ','.$_POST['assigned_user_id'].', '; $_POST['user_invitees'] = str_replace(',,', ',', $_POST['user_invitees']); } }elseif (empty($focus->id) ){ - //this is not from long form so add assigned and current user automatically as there is no invitee list UI. + //this is not from long form so add assigned and current user automatically as there is no invitee list UI. //This call could be through an ajax call from subpanels or shortcut bar $_POST['user_invitees'] .= ','.$_POST['assigned_user_id'].', '; - + //add current user if the assigned to user is different than current user. if($current_user->id != $_POST['assigned_user_id']){ $_POST['user_invitees'] .= ','.$current_user->id.', '; } - + //remove any double comma's introduced during appending $_POST['user_invitees'] = str_replace(',,', ',', $_POST['user_invitees']); } - + if(isset($_POST['isSaveFromDetailView']) && $_POST['isSaveFromDetailView'] == 'true'){ $focus->save(true); $return_id = $focus->id; }else{ - + if(empty($_REQUEST['return_module']) && empty($_REQUEST['return_action']) && $focus->status == 'Held'){ //if we are closing the call, and the request does not have a return module AND return action set, then - //the request is coming from a dashlet or subpanel close icon and there is no need to process user invitees, + //the request is coming from a dashlet or subpanel close icon and there is no need to process user invitees, //just save the current values. $focus->save(true); }else{ @@ -285,7 +285,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { } else { $userInvitees = array(); } - + // Calculate which users to flag as deleted and which to add $deleteUsers = array(); $focus->load_relationship('users'); @@ -300,26 +300,26 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { $acceptStatusUsers[$a['user_id']] = $a['accept_status']; } } - + if(count($deleteUsers) > 0) { $sql = ''; foreach($deleteUsers as $u) { $sql .= ",'" . $u . "'"; } - + $sql = substr($sql, 1); // We could run a delete SQL statement here, but will just mark as deleted instead $sql = "UPDATE calls_users set deleted = 1 where user_id in ($sql) AND call_id = '". $focus->id . "'"; $focus->db->query($sql); } - + // Get all contacts for the call if(!empty($_POST['contact_invitees'])) { $contactInvitees = explode(',', trim($_POST['contact_invitees'], ',')); } else { $contactInvitees = array(); } - + $deleteContacts = array(); $focus->load_relationship('contacts'); $q = 'SELECT mu.contact_id, mu.accept_status FROM calls_contacts mu WHERE mu.call_id = \''.$focus->id.'\''; @@ -332,7 +332,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { $acceptStatusContacts[$a['contact_id']] = $a['accept_status']; } } - + if(count($deleteContacts) > 0) { $sql = ''; foreach($deleteContacts as $u) { @@ -348,7 +348,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { } else { $leadInvitees = array(); } - + // Calculate which leads to flag as deleted and which to add $deleteLeads = array(); $focus->load_relationship('leads'); @@ -363,7 +363,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { $acceptStatusLeads[$a['user_id']] = $a['accept_status']; } } - + if(count($deleteLeads) > 0) { $sql = ''; foreach($deleteLeads as $u) { @@ -378,8 +378,8 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { } //// END REMOVE /////////////////////////////////////////////////////////////////////////// - - + + /////////////////////////////////////////////////////////////////////////// //// REBUILD INVITEE RELATIONSHIPS $focus->users_arr = array(); @@ -398,18 +398,18 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { // the users and contacts relationships $focus->save(true); $return_id = $focus->id; - + // Process users $existing_users = array(); if(!empty($_POST['existing_invitees'])) { $existing_users = explode(",", trim($_POST['existing_invitees'], ',')); } - + foreach($focus->users_arr as $user_id) { if(empty($user_id) || isset($existing_users[$user_id]) || isset($deleteUsers[$user_id])) { continue; } - + if(!isset($acceptStatusUsers[$user_id])) { $focus->load_relationship('users'); $focus->users->add($user_id); @@ -421,18 +421,18 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { $focus->db->query($qU); } } - + // Process contacts $existing_contacts = array(); if(!empty($_POST['existing_contact_invitees'])) { $existing_contacts = explode(",", trim($_POST['existing_contact_invitees'], ',')); } - + foreach($focus->contacts_arr as $contact_id) { - if(empty($contact_id) || isset($existing_contacts[$contact_id]) || isset($deleteContacts[$contact_id])) { + if(empty($contact_id) || isset($exiting_contacts[$contact_id]) || isset($deleteContacts[$contact_id])) { continue; } - + if(!isset($acceptStatusContacts[$contact_id])) { $focus->load_relationship('contacts'); $focus->contacts->add($contact_id); @@ -449,12 +449,12 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { if(!empty($_POST['existing_lead_invitees'])) { $existing_leads = explode(",", trim($_POST['existing_lead_invitees'], ',')); } - + foreach($focus->leads_arr as $lead_id) { if(empty($lead_id) || isset($existing_leads[$lead_id]) || isset($deleteLeads[$lead_id])) { continue; } - + if(!isset($acceptStatusLeads[$lead_id])) { $focus->load_relationship('leads'); $focus->leads->add($lead_id); @@ -466,11 +466,11 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { $focus->db->query($qU); } } - + // CCL - Comment out call to set $current_user as invitee //set organizer to auto-accept //$focus->set_accept_status($current_user, 'accept'); - + //// END REBUILD INVITEE RELATIONSHIPS /////////////////////////////////////////////////////////////////////////// } @@ -522,7 +522,7 @@ $cal_dateformat = $timedate->get_cal_date_format(); $user_id = $current_user->id; $default_status = $app_list_strings['call_status_default']; $default_parent_type= $app_list_strings['record_type_default_key']; -$date = TimeDate::getInstance()->nowDb(); +$date = gmdate($GLOBALS['timedate']->get_db_date_time_format()); $default_date_start = $timedate->to_display_date($date); $default_time_start = $timedate->to_display_time($date,true); $time_ampm = $timedate->AMPMMenu($prefix,$default_time_start); diff --git a/modules/Calls/CallsQuickCreate.php b/modules/Calls/CallsQuickCreate.php index 3d54bbbf..a42c01f1 100644 --- a/modules/Calls/CallsQuickCreate.php +++ b/modules/Calls/CallsQuickCreate.php @@ -35,44 +35,44 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ - + require_once('include/EditView/QuickCreate.php'); class CallsQuickCreate extends QuickCreate { - + var $javascript; - + function process() { global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings; $mod_strings = return_module_language($current_language, 'Calls'); - + parent::process(); $this->ss->assign("TIME_FORMAT", '('. $timedate->get_user_time_format().')'); $this->ss->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')'); $this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format()); - + if($this->viaAJAX) { // override for ajax call $this->ss->assign('saveOnclick', "onclick='if(check_form(\"callsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'"); $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';"); } - + $this->ss->assign('viaAJAX', $this->viaAJAX); $this->javascript = new javascript(); $this->javascript->setFormName('callsQuickCreate'); - + $focus = new Call(); $this->javascript->setSugarBean($focus); $this->javascript->addAllFields(''); - + if (is_null($focus->date_start)) - $focus->date_start = $timedate->nowDate(); + $focus->date_start = $timedate->to_display_date(gmdate($GLOBALS['timedate']->get_db_date_time_format())); if (is_null($focus->time_start)) - $focus->time_start = $timedate->asUserTime($timedate->getNow(), true); + $focus->time_start = $timedate->to_display_time(gmdate($GLOBALS['timedate']->get_db_date_time_format()), true); if (!isset ($focus->duration_hours)) $focus->duration_hours = "1"; @@ -80,7 +80,7 @@ class CallsQuickCreate extends QuickCreate { $this->ss->assign("TIME_START", substr($focus->time_start,0,5)); $time_start_hour = intval(substr($focus->time_start, 0, 2)); $time_start_minutes = substr($focus->time_start, 3, 5); - + if ($time_start_minutes > 0 && $time_start_minutes < 15) { $time_start_minutes = "15"; } else @@ -94,8 +94,8 @@ class CallsQuickCreate extends QuickCreate { $time_start_hour += 1; $time_start_minutes = "00"; } - - + + // We default the to assume that the time preference is set to 11:00 (i.e. without meridiem) $hours_arr = array (); $num_of_hours = 24; @@ -106,18 +106,18 @@ class CallsQuickCreate extends QuickCreate { $num_of_hours = 13; $start_at = 1; - // It's important to do this block first before we recalculate $time_start_hour + // It's important to do this block first before we recalculate $time_start_hour $options = strpos($time_pref, 'a') ? $app_list_strings['dom_meridiem_lowercase'] : $app_list_strings['dom_meridiem_uppercase']; if(strpos($time_pref, 'a')) { - $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start,'a') ? 'am' : 'pm')); + $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start,'a') ? 'am' : 'pm')); } else { - $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start,'A') ? 'AM' : 'PM')); + $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start,'A') ? 'AM' : 'PM')); } - + // the $num_of_hours array is keyed by values 01, 02, ... 12 for meridiem times $time_start_hour = $time_start_hour < 10 ? '0'.$time_start_hour : $time_start_hour; - } - + } + for ($i = $start_at; $i < $num_of_hours; $i ++) { $i = $i.""; if (strlen($i) == 1) { @@ -139,6 +139,6 @@ class CallsQuickCreate extends QuickCreate { $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['call_status_dom'], $focus->status)); $this->ss->assign('additionalScripts', $this->javascript->getScript(false)); - } + } } ?> \ No newline at end of file diff --git a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php index 29056a08..b9d42be7 100644 --- a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php +++ b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php @@ -153,9 +153,7 @@ class MyCallsDashlet extends DashletGeneric { 'myItems' => translate('LBL_DASHLET_CONFIGURE_MY_ITEMS_ONLY', 'Calls'), 'displayRows' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_DISPLAY_ROWS'], 'title' => $GLOBALS['mod_strings']['LBL_DASHLET_CONFIGURE_TITLE'], - 'save' => $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'], - 'autoRefresh' => $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH'], - )); + 'save' => $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'])); return $this->configureSS->fetch($this->configureTpl); } } diff --git a/modules/Calls/language/en_us.lang.php b/modules/Calls/language/en_us.lang.php index 341426ea..9e314091 100644 --- a/modules/Calls/language/en_us.lang.php +++ b/modules/Calls/language/en_us.lang.php @@ -78,6 +78,7 @@ $mod_strings = array ( 'LBL_HOURS_ABBREV' => 'h', 'LBL_MINSS_ABBREV' => 'm', 'LBL_COLON' => ':', + 'LBL_DEFAULT_STATUS' => 'Planned', 'LNK_NEW_CALL' => 'Log Call', 'LNK_NEW_MEETING' => 'Schedule Meeting', 'LNK_CALL_LIST' => 'View Calls', @@ -102,7 +103,7 @@ $mod_strings = array ( 'LBL_TIME_END'=>'Time End', 'LBL_REMINDER_TIME'=>'Reminder Time', 'LBL_SEARCH_BUTTON'=> 'Search', - 'LBL_ACTIVITIES_REPORTS' => 'Activities Report', + 'LBL_ACTIVITIES_REPORTS' => 'Activities Report', 'LBL_ADD_BUTTON'=> 'Add', 'LBL_DEFAULT_SUBPANEL_TITLE' => 'Calls', 'LBL_LOG_CALL'=> 'Log Call', @@ -124,7 +125,7 @@ $mod_strings = array ( 'NOTICE_DURATION_TIME' => 'Duration time must be greater than 0', 'LBL_CALL_INFORMATION' => 'Call Overview', 'LBL_REMOVE' => 'rem', -); + ); ?> \ No newline at end of file diff --git a/modules/Calls/metadata/SearchFields.php b/modules/Calls/metadata/SearchFields.php index 4ce7dbdd..0d845508 100644 --- a/modules/Calls/metadata/SearchFields.php +++ b/modules/Calls/metadata/SearchFields.php @@ -45,27 +45,5 @@ $searchFields['Calls'] = 'assigned_user_id'=> array('query_type'=>'default'), 'status'=> array('query_type'=>'default', 'options' => 'call_status_dom', 'template_var' => 'STATUS_FILTER'), - 'open_only' => array( - 'query_type'=>'default', - 'db_field'=>array('status'), - 'operator'=>'not in', - 'closed_values' => array('Held', 'Not Held'), - 'type'=>'bool', - ), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_end' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_end' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_end' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/modules/Calls/metadata/additionalDetails.php b/modules/Calls/metadata/additionalDetails.php index 508cda1d..22c84df4 100644 --- a/modules/Calls/metadata/additionalDetails.php +++ b/modules/Calls/metadata/additionalDetails.php @@ -42,14 +42,14 @@ function additionalDetailsCall($fields) { global $current_language; $mod_strings = return_module_language($current_language, 'Calls'); } - + $overlib_string = ''; - + //Modify by jchi 6/27/2008 1515pm china time , bug 20626. - if(!empty($fields['DATE_START'])) + if(!empty($fields['DATE_START'])) $overlib_string .= ''. $mod_strings['LBL_DATE_TIME'] . ' ' . $fields['DATE_START'] . '
    '; if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) { - $overlib_string .= ''. $mod_strings['LBL_DURATION'] . ' '; + $overlib_string .= ''. $mod_strings['LBL_DURATION'] . ' '; if(isset($fields['DURATION_HOURS'])) { $overlib_string .= $fields['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'] . ' '; } @@ -58,23 +58,27 @@ function additionalDetailsCall($fields) { } $overlib_string .= '
    '; } - if(!empty($fields['DESCRIPTION'])) { + if(!empty($fields['DESCRIPTION'])) { $overlib_string .= ''. $mod_strings['LBL_DESCRIPTION'] . ' ' . substr($fields['DESCRIPTION'], 0, 300); if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; $overlib_string .= '
    '; } - - $editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}"; - $viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}"; + + $editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}"; + $viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}"; $return_module = empty($_REQUEST['module']) ? 'Calls' : $_REQUEST['module']; $return_action = empty($_REQUEST['action']) ? 'ListView' : $_REQUEST['action']; - + $editLink .= "&return_module=$return_module&return_action=$return_action"; $viewLink .= "&return_module=$return_module&return_action=$return_action"; - - return array('fieldToAddTo' => 'NAME', - 'string' => $overlib_string, - 'editLink' => $editLink, + + return array('fieldToAddTo' => 'NAME', + 'string' => $overlib_string, + 'editLink' => $editLink, 'viewLink' => $viewLink); } + + ?> + + \ No newline at end of file diff --git a/modules/Calls/metadata/editviewdefs.php b/modules/Calls/metadata/editviewdefs.php index 39b2b4ba..b3e5e8ae 100644 --- a/modules/Calls/metadata/editviewdefs.php +++ b/modules/Calls/metadata/editviewdefs.php @@ -55,16 +55,16 @@ array ( array ( 0 => array ( - 'customCode' => '', + 'customCode' => '', ), 1 => 'CANCEL', 2 => array ( - 'customCode' => '', + 'customCode' => '', ), 3 => array ( - 'customCode' => '{if $fields.status.value != "Held"}{/if}', + 'customCode' => '{if $fields.status.value != "Held"}{/if}', ), ), 'footerTpl' => 'modules/Calls/tpls/footer.tpl', @@ -82,15 +82,15 @@ array ( 'field' => '30', ), ), - 'javascript' => ' - - + 'javascript' => ' + + - - - + + +', +function formSubmitCheck(){ldelim}if(check_form(\'EditView\') && isValidDuration()){ldelim}document.forms[\'EditView\'].submit();{rdelim}{rdelim}', 'useTabs' => false, ), 'panels' => diff --git a/modules/Calls/metadata/listviewdefs.php b/modules/Calls/metadata/listviewdefs.php index 55afd9cf..bee4f793 100644 --- a/modules/Calls/metadata/listviewdefs.php +++ b/modules/Calls/metadata/listviewdefs.php @@ -114,10 +114,5 @@ array ( 'link' => false, 'default' => false, ), - 'DATE_ENTERED' => array ( - 'width' => '10%', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true - ), ); ?> diff --git a/modules/Calls/metadata/searchdefs.php b/modules/Calls/metadata/searchdefs.php index 3da25e93..aff3e659 100644 --- a/modules/Calls/metadata/searchdefs.php +++ b/modules/Calls/metadata/searchdefs.php @@ -54,7 +54,7 @@ array ( 'default' => true, 'width' => '10%', ), - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), + ), 'advanced_search' => array ( @@ -115,7 +115,7 @@ array ( ), 'templateMeta' => array ( - 'maxColumns' => '4', + 'maxColumns' => '3', 'widths' => array ( 'label' => '10', diff --git a/modules/Calls/metadata/subpaneldefs.php b/modules/Calls/metadata/subpaneldefs.php index e85f272a..34e65701 100644 --- a/modules/Calls/metadata/subpaneldefs.php +++ b/modules/Calls/metadata/subpaneldefs.php @@ -86,7 +86,7 @@ $layout_defs['Calls'] = array( 'collection_list' => array( 'notes' => array( 'module' => 'Notes', - 'subpanel_name' => 'ForCalls', + 'subpanel_name' => 'ForHistory', 'get_subpanel_data' => 'notes', ), ), diff --git a/modules/Calls/vardefs.php b/modules/Calls/vardefs.php index 819870fc..218c1d0a 100644 --- a/modules/Calls/vardefs.php +++ b/modules/Calls/vardefs.php @@ -36,7 +36,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activity representing a phone call', - 'unified_search' => true, 'unified_search_default_enabled' => true, 'fields' => array ( + 'unified_search' => true,'fields' => array ( 'name' => array ( @@ -81,19 +81,15 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ 'comment' => 'Date in which call is schedule to (or did) start', 'importable' => 'required', 'required' => true, - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'date_end' => array ( 'name' => 'date_end', 'vname' => 'LBL_DATE_END', - 'type' => 'datetime', + 'type' => 'date', 'massupdate'=>false, - 'comment' => 'Date is which call is scheduled to (or did) end', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', + 'comment' => 'Date is which call is scheduled to (or did) end' ), 'parent_type'=> @@ -131,7 +127,6 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ 'comment' => 'The status of the call (Held, Not Held, etc.)', 'required' => true, 'importable' => 'required', - 'default' => 'Planned', ), 'direction' => array ( diff --git a/modules/Calls/views/view.edit.php b/modules/Calls/views/view.edit.php index 6ede06ed..036f1427 100644 --- a/modules/Calls/views/view.edit.php +++ b/modules/Calls/views/view.edit.php @@ -48,43 +48,43 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/json_config.php'); require_once('include/MVC/View/views/view.edit.php'); -class CallsViewEdit extends ViewEdit +class CallsViewEdit extends ViewEdit { /** * @see SugarView::preDisplay() */ - public function preDisplay() + public function preDisplay() { if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { $this->bean->status = ''; } //if if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { $this->bean->status = 'Held'; - } + } parent::preDisplay(); } - + /** * @see SugarView::display() */ - public function display() - { + public function display() + { global $json; $json = getJSONobj(); $json_config = new json_config(); if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) { $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); - + } else { $this->bean->json_id = $this->bean->id; $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); - + } $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); if($this->ev->isDuplicate){ - $this->bean->status = $this->bean->getDefaultStatus(); - } //if + $this->bean->status = $GLOBALS['mod_strings']['LBL_DEFAULT_STATUS']; + } //if parent::display(); } } diff --git a/modules/CampaignLog/CampaignLog.php b/modules/CampaignLog/CampaignLog.php index 0611848d..927a0abf 100644 --- a/modules/CampaignLog/CampaignLog.php +++ b/modules/CampaignLog/CampaignLog.php @@ -49,30 +49,30 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class CampaignLog extends SugarBean { - var $table_name = 'campaign_log'; - var $object_name = 'CampaignLog'; - var $module_dir = 'CampaignLog'; - - var $new_schema = true; - - var $campaign_id; - var $target_tracker_key; - var $target_id; - var $target_type; - var $activity_type; - var $activity_date; - var $related_id; - var $related_type; - var $deleted; - var $list_id; - var $hits; - var $more_information; - var $marketing_id; - function CampaignLog() { - global $sugar_config; - parent::SugarBean(); - - } + var $table_name = 'campaign_log'; + var $object_name = 'CampaignLog'; + var $module_dir = 'CampaignLog'; + + var $new_schema = true; + + var $campaign_id; + var $target_tracker_key; + var $target_id; + var $target_type; + var $activity_type; + var $activity_date; + var $related_id; + var $related_type; + var $deleted; + var $list_id; + var $hits; + var $more_information; + var $marketing_id; + function CampaignLog() { + global $sugar_config; + parent::SugarBean(); + + } function get_list_view_data(){ global $locale; @@ -82,14 +82,14 @@ class CampaignLog extends SugarBean { { //needed values to construct query are empty/null, so return null $GLOBALS['log']->debug("CampaignLog.php:get_list_view_data duntion: temp_array['TARGET_TYPE'] and/or temp_array['TARGET_ID'] are empty, return null"); $emptyArr = array(); - return $emptyArr; + return $emptyArr; } if ( ( $this->db->dbType == 'mysql' ) or ( $this->db->dbType == 'oci8' ) ) - { - $query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; + { + $query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; } if($this->db->dbType == 'mssql') - { + { $query="select first_name, last_name, (first_name + ' ' + last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; } if($temp_array['TARGET_TYPE']=='Accounts'){ @@ -105,7 +105,7 @@ class CampaignLog extends SugarBean { }else{ $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], ''); $temp_array['RECIPIENT_NAME']=$full_name; - } + } } $temp_array['RECIPIENT_EMAIL']=$this->retrieve_email_address($temp_array['TARGET_ID']); @@ -120,7 +120,7 @@ class CampaignLog extends SugarBean { return $temp_array; } - + function retrieve_email_address($trgt_id = ''){ $return_str = ''; if(!empty($trgt_id)){ @@ -131,40 +131,40 @@ class CampaignLog extends SugarBean { $qry .= " and ea.deleted = 0 "; $qry .= " and eabr.deleted = 0" ; $qry .= " order by primary_address desc "; - + $result=$this->db->query($qry); $row=$this->db->fetchByAssoc($result); - + if (!empty($row['email_address'])){ $return_str = $row['email_address']; } } return $return_str; } + - - //this function is called statically by the campaing_log subpanel. - function get_related_name($related_id, $related_type) { + //this function is called statically by the campaing_log subpanel. + function get_related_name($related_id, $related_type) { global $locale; - $db= DBManagerFactory::getInstance(); - if ($related_type == 'Emails') { - $query="SELECT name from emails where id='$related_id'"; - $result=$db->query($query); - $row=$db->fetchByAssoc($result); - if ($row != null) { - return $row['name']; - } - } - if ($related_type == 'Contacts') { - $query="SELECT first_name, last_name from contacts where id='$related_id'"; - $result=$db->query($query); - $row=$db->fetchByAssoc($result); - if ($row != null) { - return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); - } - } + $db= DBManagerFactory::getInstance(); + if ($related_type == 'Emails') { + $query="SELECT name from emails where id='$related_id'"; + $result=$db->query($query); + $row=$db->fetchByAssoc($result); + if ($row != null) { + return $row['name']; + } + } + if ($related_type == 'Contacts') { + $query="SELECT first_name, last_name from contacts where id='$related_id'"; + $result=$db->query($query); + $row=$db->fetchByAssoc($result); + if ($row != null) { + return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); + } + } if ($related_type == 'Leads') { $query="SELECT first_name, last_name from leads where id='$related_id'"; $result=$db->query($query); @@ -172,23 +172,23 @@ class CampaignLog extends SugarBean { if ($row != null) { return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); } - } + } if ($related_type == 'Prospects') { - $query="SELECT first_name, last_name from prospects where id='$related_id'"; - $result=$db->query($query); - $row=$db->fetchByAssoc($result); - if ($row != null) { - return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); - } - } - if ($related_type == 'CampaignTrackers') { - $query="SELECT tracker_url from campaign_trkrs where id='$related_id'"; - $result=$db->query($query); - $row=$db->fetchByAssoc($result); - if ($row != null) { - return $row['tracker_url'] ; - } - } + $query="SELECT first_name, last_name from prospects where id='$related_id'"; + $result=$db->query($query); + $row=$db->fetchByAssoc($result); + if ($row != null) { + return $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); + } + } + if ($related_type == 'CampaignTrackers') { + $query="SELECT tracker_url from campaign_trkrs where id='$related_id'"; + $result=$db->query($query); + $row=$db->fetchByAssoc($result); + if ($row != null) { + return $row['tracker_url'] ; + } + } if ($related_type == 'Accounts') { $query="SELECT name from accounts where id='$related_id'"; $result=$db->query($query); @@ -199,6 +199,7 @@ class CampaignLog extends SugarBean { } return $related_id.$related_type; } + } ?> diff --git a/modules/CampaignLog/vardefs.php b/modules/CampaignLog/vardefs.php index 9fe4582c..730ffdfd 100644 --- a/modules/CampaignLog/vardefs.php +++ b/modules/CampaignLog/vardefs.php @@ -38,7 +38,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dictionary['CampaignLog'] = array ('audited'=>false, 'comment' => 'Tracks items of interest that occurred after you send an email campaign', 'table' => 'campaign_log', - + 'fields' => array ( 'id' => array ( 'name' => 'id', @@ -108,7 +108,7 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'reportable'=>false, 'default'=>'0', 'comment' => 'Indicates if item has been archived' - ), + ), 'hits' => array ( 'name' => 'hits', 'vname' => 'LBL_HITS', @@ -116,7 +116,7 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'default'=>'0', 'reportable'=>true, 'comment' => 'Number of times the item has been invoked (e.g., multiple click-thrus)' - ), + ), 'list_id' => array( 'name' => 'list_id', 'vname' => 'LBL_LIST_ID', @@ -131,7 +131,7 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'type' => 'bool', 'reportable'=>false, 'comment' => 'Record deletion indicator' - ), + ), 'recipient_name' => array( 'name' => 'recipient_name', 'type' => 'varchar', @@ -169,26 +169,26 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'type' => 'varchar', 'len' => '255', 'source'=>'non-db', - ), + ), 'campaign_objective' => array( 'name' => 'campaign_objective', 'type' => 'varchar', 'len' => '255', 'source'=>'non-db', - ), + ), 'campaign_content' => array( 'name' => 'campaign_content', 'type' => 'varchar', 'len' => '255', 'source'=>'non-db', - ), + ), 'campaign'=> array ( 'name' => 'campaign', 'type' => 'link', 'relationship' => 'campaign_campaignlog', 'source'=>'non-db', 'vname'=> 'LBL_CAMPAIGNS', - ), + ), 'related_name'=>array ( 'source'=>'function', 'function_name'=>'get_related_name', @@ -203,7 +203,7 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', - ), + ), 'more_information'=> array( 'name'=>'more_information', 'vname'=>'LBL_MORE_INFO', @@ -223,7 +223,7 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'type' => 'link', 'relationship' => 'campaignlog_contact', 'source'=>'non-db', - ), + ), 'created_lead'=> array ( 'name' => 'created_lead', 'vname' => 'LBL_CREATED_LEAD', @@ -235,55 +235,49 @@ $dictionary['CampaignLog'] = array ('audited'=>false, 'indices' => array ( array ( 'name' =>'campaign_log_pk', - + 'type' =>'primary', 'fields'=>array('id') ), array ( 'name' =>'idx_camp_tracker', - + 'type' =>'index', 'fields'=>array('target_tracker_key') ), array ( 'name' =>'idx_camp_campaign_id', - + 'type' =>'index', 'fields'=>array('campaign_id') ), array ( 'name' =>'idx_camp_more_info', - + 'type' =>'index', 'fields'=>array('more_information') - ), - array ( - 'name' =>'idx_target_id', - - 'type' =>'index', - 'fields'=>array('target_id') - ), + ), ), 'relationships' => array ( - 'campaignlog_contact' => array( 'lhs_module'=> 'CampaignLog', - 'lhs_table'=> 'campaign_log', + 'campaignlog_contact' => array( 'lhs_module'=> 'CampaignLog', + 'lhs_table'=> 'campaign_log', 'lhs_key' => 'related_id', - 'rhs_module'=> 'Contacts', - 'rhs_table'=> 'contacts', + 'rhs_module'=> 'Contacts', + 'rhs_table'=> 'contacts', 'rhs_key' => 'id', 'relationship_type'=>'one-to-many'), - 'campaignlog_lead' => array('lhs_module'=> 'CampaignLog', - 'lhs_table'=> 'campaign_log', + 'campaignlog_lead' => array('lhs_module'=> 'CampaignLog', + 'lhs_table'=> 'campaign_log', 'lhs_key' => 'related_id', - 'rhs_module'=> 'Leads', - 'rhs_table'=> 'leads', + 'rhs_module'=> 'Leads', + 'rhs_table'=> 'leads', 'rhs_key' => 'id', 'relationship_type'=>'one-to-many'), ) - + ); ?> \ No newline at end of file diff --git a/modules/CampaignTrackers/CampaignTracker.php b/modules/CampaignTrackers/CampaignTracker.php index 7c080e14..bdc43981 100644 --- a/modules/CampaignTrackers/CampaignTracker.php +++ b/modules/CampaignTrackers/CampaignTracker.php @@ -42,120 +42,121 @@ * implemeting functions available in the SugarBean. ********************************************************************************/ + - - - + + class CampaignTracker extends SugarBean { - /* Foreach instance of the bean you will need to access the fields in the table. - * So define a variable for each one of them, the varaible name should be same as the field name - * Use this module's vardef file as a reference to create these variables. - */ - var $id; - var $date_entered; - var $created_by; - var $date_modified; - var $modified_by; - var $deleted; - var $tracker_key; - var $tracker_url; - var $tracker_name; - var $campaign_id; - var $campaign_name; - var $message_url; - var $is_optout; - - /* End field definitions*/ - - /* variable $table_name is used by SugarBean and methods in this file to constructs queries - * set this variables value to the table associated with this bean. - */ - var $table_name = 'campaign_trkrs'; - - /*This variable overrides the object_name variable in SugarBean, wher it has a value of null.*/ - var $object_name = 'CampaignTracker'; - - /**/ - var $module_dir = 'CampaignTrackers'; - - /* This is a legacy variable, set its value to true for new modules*/ - var $new_schema = true; - - /* $column_fields holds a list of columns that exist in this bean's table. This list is referenced - * when fetching or saving data for the bean. As you modify a table you need to keep this up to date. - */ - var $column_fields = Array( - 'id' - ,'tracker_key' - ,'tracker_url' - ,'tracker_name' - ,'campaign_id' - ); - - // This is used to retrieve related fields from form posts. - var $additional_column_fields = Array('campaign_id'); - var $relationship_fields = Array('campaing_id'=>'campaign'); - - var $required_fields = array('tracker_name'=>1,'tracker_url'=>1); - /*This bean's constructor*/ - function CampaignTracker() { - parent::SugarBean(); - } + /* Foreach instance of the bean you will need to access the fields in the table. + * So define a variable for each one of them, the varaible name should be same as the field name + * Use this module's vardef file as a reference to create these variables. + */ + var $id; + var $date_entered; + var $created_by; + var $date_modified; + var $modified_by; + var $deleted; + var $tracker_key; + var $tracker_url; + var $tracker_name; + var $campaign_id; + var $campaign_name; + var $message_url; + var $is_optout; + + /* End field definitions*/ + + /* variable $table_name is used by SugarBean and methods in this file to constructs queries + * set this variables value to the table associated with this bean. + */ + var $table_name = 'campaign_trkrs'; + + /*This variable overrides the object_name variable in SugarBean, wher it has a value of null.*/ + var $object_name = 'CampaignTracker'; + + /**/ + var $module_dir = 'CampaignTrackers'; + + /* This is a legacy variable, set its value to true for new modules*/ + var $new_schema = true; + + /* $column_fields holds a list of columns that exist in this bean's table. This list is referenced + * when fetching or saving data for the bean. As you modify a table you need to keep this up to date. + */ + var $column_fields = Array( + 'id' + ,'tracker_key' + ,'tracker_url' + ,'tracker_name' + ,'campaign_id' + ); + + // This is used to retrieve related fields from form posts. + var $additional_column_fields = Array('campaign_id'); + var $relationship_fields = Array('campaing_id'=>'campaign'); + + var $required_fields = array('tracker_name'=>1,'tracker_url'=>1); + + /*This bean's constructor*/ + function CampaignTracker() { + parent::SugarBean(); + } function save() { - //make sure that the url has a scheme, if not then add http:// scheme - if ($this->is_optout!=1 ){ - $url = strtolower(trim($this->tracker_url)); - if(!preg_match('/^(http|https|ftp):\/\//i', $url)){ - $this->tracker_url = 'http://'.$url; - } - } - - parent::save(); - } - - /* This method should return the summary text which is used to build the bread crumb navigation*/ - /* Generally from this method you would return value of a field that is required and is of type string*/ - function get_summary_text() - { - return "$this->tracker_name"; - } - - - /* This method is used to generate query for the list form. The base implementation of this method - * uses the table_name and list_field varaible to generate the basic query and then adds the custom field - * join and team filter. If you are implementing this function do not forget to consider the additional conditions. - */ - - function fill_in_additional_detail_fields() { - global $sugar_config; - - //setup campaign name. - $query = "SELECT name from campaigns where id = '$this->campaign_id'"; - $result =$this->db->query($query,true," Error filling in additional detail fields: "); - - // Get the id and the name. - $row = $this->db->fetchByAssoc($result); - if($row != null) { - $this->campaign_name=$row['name']; - } - - if (!class_exists('Administration')) { - - } - $admin=new Administration(); - $admin->retrieveSettings('massemailer'); //retrieve all admin settings. - if (isset($admin->settings['massemailer_tracking_entities_location_type']) and $admin->settings['massemailer_tracking_entities_location_type']=='2' and isset($admin->settings['massemailer_tracking_entities_location']) ) { - $this->message_url=$admin->settings['massemailer_tracking_entities_location']; - } else { - $this->message_url=$sugar_config['site_url']; - } - if ($this->is_optout == 1) { - $this->message_url .= '/index.php?entryPoint=removeme&identifier={MESSAGE_ID}'; - } else { - $this->message_url .= '/index.php?entryPoint=campaign_trackerv2&track=' . $this->id; - } + //make sure that the url has a scheme, if not then add http:// scheme + if ($this->is_optout!=1 ){ + $url = strtolower(trim($this->tracker_url)); + if(!preg_match('/^(http|https|ftp):\/\//i', $url)){ + $this->tracker_url = 'http://'.$url; + } + } + + parent::save(); } + + /* This method should return the summary text which is used to build the bread crumb navigation*/ + /* Generally from this method you would return value of a field that is required and is of type string*/ + function get_summary_text() + { + return "$this->tracker_name"; + } + + + /* This method is used to generate query for the list form. The base implementation of this method + * uses the table_name and list_field varaible to generate the basic query and then adds the custom field + * join and team filter. If you are implementing this function do not forget to consider the additional conditions. + */ + + function fill_in_additional_detail_fields() { + global $sugar_config; + + //setup campaign name. + $query = "SELECT name from campaigns where id = '$this->campaign_id'"; + $result =$this->db->query($query,true," Error filling in additional detail fields: "); + + // Get the id and the name. + $row = $this->db->fetchByAssoc($result); + if($row != null) { + $this->campaign_name=$row['name']; + } + + if (!class_exists('Administration')) { + + } + $admin=new Administration(); + $admin->retrieveSettings('massemailer'); //retrieve all admin settings. + if (isset($admin->settings['massemailer_tracking_entities_location_type']) and $admin->settings['massemailer_tracking_entities_location_type']=='2' and isset($admin->settings['massemailer_tracking_entities_location']) ) { + $this->message_url=$admin->settings['massemailer_tracking_entities_location']; + } else { + $this->message_url=$sugar_config['site_url']; + } + if ($this->is_optout == 1) { + $this->message_url .= '/index.php?entryPoint=removeme&identifier={MESSAGE_ID}'; + } else { + $this->message_url .= '/index.php?entryPoint=campaign_trackerv2&track=' . $this->id; + } + } } ?> \ No newline at end of file diff --git a/modules/CampaignTrackers/DetailView.php b/modules/CampaignTrackers/DetailView.php index 1136fd5d..1980be89 100644 --- a/modules/CampaignTrackers/DetailView.php +++ b/modules/CampaignTrackers/DetailView.php @@ -58,7 +58,7 @@ if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->id = ""; } -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->tracker_name), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->tracker_name, true); diff --git a/modules/CampaignTrackers/EditView.php b/modules/CampaignTrackers/EditView.php index bf84272a..0dcf7ae5 100644 --- a/modules/CampaignTrackers/EditView.php +++ b/modules/CampaignTrackers/EditView.php @@ -88,10 +88,8 @@ if (!empty($_REQUEST['campaign_id'])) { $xtpl->assign("CAMPAIGN_ID", $focus->campaign_id); $campaignId = $focus->campaign_id; } -$params = array(); -$params[] = "{$campaignName}"; -$params[] = $mod_strings['LBL_MODULE_NAME']; -echo getClassicModuleTitle($focus->module_dir, $params, true); +$middleText = "{$campaignName}»{$mod_strings['LBL_MODULE_NAME']}"; +echo get_module_title($focus->module_dir, $middleText, true); if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); diff --git a/modules/Campaigns/CampaignDiagnostic.php b/modules/Campaigns/CampaignDiagnostic.php index 7f47630b..a25c623d 100644 --- a/modules/Campaigns/CampaignDiagnostic.php +++ b/modules/Campaigns/CampaignDiagnostic.php @@ -61,6 +61,7 @@ if(!isset($_REQUEST['inline']) || $_REQUEST['inline'] != 'inline'){ $params[] = $mod_strings['LBL_CAMPAIGN_DIAGNOSTICS']; echo getClassicModuleTitle('Campaigns', $params, true); + //echo "

    ".get_module_title($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_CAMPAIGN_DIAGNOSTICS'],true)."

    "; } global $theme; diff --git a/modules/Campaigns/Charts.php b/modules/Campaigns/Charts.php index 9f7c00a6..e43f34ea 100644 --- a/modules/Campaigns/Charts.php +++ b/modules/Campaigns/Charts.php @@ -43,7 +43,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -require_once('include/SugarCharts/SugarChartFactory.php'); +require_once('include/charts/Charts.php'); + class campaign_charts { @@ -57,14 +58,11 @@ class campaign_charts { function campaign_response_by_activity_type($datay= array(),$targets=array(),$campaign_id, $cache_file_name='a_file', $refresh=false, $marketing_id='') { global $app_strings, $mod_strings, $charset, $lang, $barChartColors,$app_list_strings; - $sugarChart = SugarChartFactory::getInstance('','Reports'); - $xmlFile = $sugarChart->getXMLFileName($campaign_id); - - if (!file_exists($xmlFile) || $refresh == true) { + if (!file_exists($cache_file_name) || $refresh == true) { $GLOBALS['log']->debug("datay is:"); $GLOBALS['log']->debug($datay); $GLOBALS['log']->debug("user_id is: "); - $GLOBALS['log']->debug("cache_file_name is: $xmlFile"); + $GLOBALS['log']->debug("cache_file_name is: $cache_file_name"); $focus = new Campaign(); @@ -80,14 +78,13 @@ class campaign_charts { $query.= " GROUP BY activity_type, target_type"; $query.= " ORDER BY activity_type, target_type"; $result = $focus->db->query($query); - //$camp_data=$focus->db->fetchByAssoc($result); - $camp_data = array(); + $leadSourceArr = array(); $total=0; $total_targeted=0; $rowTotalArr = array(); $rowTotalArr[] = 0; - while($row = $focus->db->fetchByAssoc($result)) + while($row = $focus->db->fetchByAssoc($result, -1, false)) { if(!isset($leadSourceArr[$row['activity_type']]['row_total'])) { $leadSourceArr[$row['activity_type']]['row_total']=0; @@ -110,7 +107,9 @@ class campaign_charts { $total_targeted+=$row['hits']; } } - + + $fileContents = ' '."\n"; + foreach ($datay as $key=>$translation) { if ($key == '') { //$key = $mod_strings['NTC_NO_LEGENDS']; @@ -126,49 +125,62 @@ class campaign_charts { if(is_array($leadSourceArr[$key]) && isset($leadSourceArr[$key]['row_total']) && $leadSourceArr[$key]['row_total']>100){ $leadSourceArr[$key]['row_total'] = round($leadSourceArr[$key]['row_total']); } - $camp_data[$translation] = array(); - foreach ($targets as $outcome=>$outcome_translation){ + $fileContents .= ' '."\n"; + + if(is_array($leadSourceArr[$key]['outcome'])){ + + + + foreach ($leadSourceArr[$key]['outcome'] as $outcome=>$outcome_translation){ //create alternate text. $alttext = ' '; if(isset($targeted) && isset($targeted[$outcome])&& !empty($targeted[$outcome])){ $alttext=$targets[$outcome].': '.$mod_strings['LBL_TARGETED'].' '.$targeted[$outcome]. ', '.$mod_strings['LBL_TOTAL_TARGETED'].' '. $total_targeted. "."; } if ($key != 'targeted'){ - $hits = (isset($leadSourceArr[$key][$outcome]) && is_array($leadSourceArr[$key][$outcome]) && is_array($leadSourceArr[$key][$outcome]['hits'])) ? array_sum($leadSourceArr[$key][$outcome]['hits']) : 0; - $alttext.=" $translation ".$hits; + $alttext.=" $translation ". array_sum($leadSourceArr[$key][$outcome]['hits']); } - $count = (isset($leadSourceArr[$key][$outcome]) && is_array($leadSourceArr[$key][$outcome]) && is_array($leadSourceArr[$key][$outcome]['total'])) ? array_sum($leadSourceArr[$key][$outcome]['total']) : 0; - $camp_data[$translation][$outcome] = - array( - "numerical_value" => $count, - "group_text" => $translation, - "group_key" => "", - "count" => "{$count}", - "group_label" => $alttext, - "numerical_label" => "Hits", - "numerical_key" => "hits", - "module" => 'Campaigns', - "group_base_text" => $outcome, - "link" => $key - ); + $fileContents .= ' '."\n"; } + } + + $fileContents .= ' '."\n"; } + $fileContents .= ' '."\n"; + + $max = get_max($rowTotalArr); + + $fileContents .= ' '."\n"; + $fileContents .= ' '."\n"; + $i=0; + foreach ($targets as $outcome=>$outcome_translation) { + $color = generate_graphcolor($outcome,$i); + $fileContents .= ' '."\n"; + $i++; + } + $fileContents .= ' '."\n"; + $fileContents .= ' '."\n"; + $fileContents .= ' '."\n"; + $fileContents .= ' '."\n"; + $fileContents .= ' $value) { + $fileContents .= ' '.$key.'='.'"'.$value.'" '; + } + $fileContents .= ' />'."\n"; + $fileContents .= ''."\n"; + $total = round($total, 2); + $title = ''."\n"; + $fileContents = $title.$fileContents; - if($camp_data) - $sugarChart->setData($camp_data); - else - $sugarChart->setData(array()); - - $sugarChart->setProperties($mod_strings['LBL_CAMPAIGN_RESPONSE_BY_RECIPIENT_ACTIVITY'], "", 'horizontal group by chart'); - $sugarChart->saveXMLFile($xmlFile, $sugarChart->generateXML()); + save_xml_file($cache_file_name, $fileContents); } - $width = '100%'; - $return = ''; - $return .= $sugarChart->display($campaign_id, $xmlFile, $width, '480',""); + + + $return = create_chart('hBarF',$cache_file_name); return $return; } @@ -249,7 +261,6 @@ class campaign_charts { $opp_data1[$mod_strings['LBL_ROI_CHART_BUDGET']]=$camp_data1['budget']; $opp_data1[$mod_strings['LBL_ROI_CHART_EXPECTED_REVENUE']]=$camp_data1['expected_revenue']; - $query = "SELECT activity_type,target_type, count(*) hits "; $query.= " FROM campaign_log "; $query.= " WHERE campaign_id = '$campaign_id' AND archived=0 AND deleted=0"; @@ -270,10 +281,11 @@ class campaign_charts { global $current_user; $user_id = $current_user->id; + require_once('include/SugarCharts/SugarChart.php'); - $width = '100%'; + $width = ($is_dashlet) ? '100%' : '720px'; - $return = ''; + $return = ''; if (!$is_dashlet){ $return .= '
    '; } @@ -289,10 +301,9 @@ class campaign_charts { } - $sugarChart = SugarChartFactory::getInstance(); + $sugarChart = new SugarChart(); $sugarChart->is_currency = true; $sugarChart->currency_symbol = $currency_symbol; - if ($not_empty) $sugarChart->setData($opp_data1); else diff --git a/modules/Campaigns/Charts1.php b/modules/Campaigns/Charts1.php index 02b32bc2..0d6eabe1 100644 --- a/modules/Campaigns/Charts1.php +++ b/modules/Campaigns/Charts1.php @@ -95,7 +95,7 @@ class charts { foreach ($leadSourceArr as $key=>$values) { if (isset($values['bars'])) { foreach ($values['bars'] as $bar_id=>$bar_value) { - $xtpl->assign("Y_BAR_ID",$bar_id); + $xpl->assign("Y_BAR_ID",$bar_id); } } diff --git a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php index dc9d44b3..d26e8c03 100644 --- a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php +++ b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php @@ -38,32 +38,20 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); + require_once('include/Dashlets/Dashlet.php'); -class TopCampaignsDashlet extends Dashlet -{ - protected $top_campaigns = array(); + +class TopCampaignsDashlet extends Dashlet { + var $top_campaigns = array(); - /** - * Constructor - * - * @see Dashlet::Dashlet() - */ - public function __construct($id, $def = null) - { + function TopCampaignsDashlet($id, $def = null) { global $current_user, $app_strings; parent::Dashlet($id); - $this->isConfigurable = true; + $this->isConfigurable = false; $this->isRefreshable = true; - if(empty($def['title'])) { - $this->title = translate('LBL_TOP_CAMPAIGNS', 'Campaigns'); - } - else { - $this->title = $def['title']; - } - - if(isset($def['autoRefresh'])) $this->autoRefresh = $def['autoRefresh']; + if(empty($def['title'])) $this->title = translate('LBL_TOP_CAMPAIGNS', 'Campaigns'); $this->seedBean = new Opportunity(); @@ -82,11 +70,9 @@ class TopCampaignsDashlet extends Dashlet } } - /** - * @see Dashlet::display() - */ - public function display() - { + function display(){ + + $ss = new Sugar_Smarty(); $ss->assign('lbl_campaign_name', translate('LBL_TOP_CAMPAIGNS_NAME', 'Campaigns')); $ss->assign('lbl_revenue', translate('LBL_TOP_CAMPAIGNS_REVENUE', 'Campaigns')); @@ -95,38 +81,6 @@ class TopCampaignsDashlet extends Dashlet return parent::display() . $ss->fetch('modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl'); } - /** - * @see Dashlet::displayOptions() - */ - public function displayOptions() - { - $ss = new Sugar_Smarty(); - $ss->assign('titleLBL', translate('LBL_DASHLET_OPT_TITLE', 'Home')); - $ss->assign('title', $this->title); - $ss->assign('id', $this->id); - $ss->assign('saveLBL', $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL']); - if($this->isAutoRefreshable()) { - $ss->assign('isRefreshable', true); - $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $ss->assign('autoRefreshSelect', $this->autoRefresh); - } - - return $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl'); - } - - /** - * @see Dashlet::saveOptions() - */ - public function saveOptions($req) - { - $options = array(); - - if ( isset($req['title']) ) { - $options['title'] = $req['title']; - } - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; - - return $options; - } } + +?> diff --git a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl deleted file mode 100644 index be180402..00000000 --- a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} - - -
    -
    - - - - - -
    slice_hash[$args['calendar']->slices_arr[$count + 1]]->start_time->week; ?>
    - - - - -{if $isRefreshable} - - - - -{/if} - - - -
    {$titleLBL} - -
    - {$autoRefresh} - - -
    - -
    - - \ No newline at end of file diff --git a/modules/Campaigns/Delete.php b/modules/Campaigns/Delete.php index 8ae33de0..b7bb22c6 100644 --- a/modules/Campaigns/Delete.php +++ b/modules/Campaigns/Delete.php @@ -61,14 +61,6 @@ if (isset($_REQUEST['mode']) and $_REQUEST['mode']=='Test') { $query.="inner join campaign_log on campaign_log.related_id = emails.id and campaign_log.campaign_id = '{$focus->id}' "; $query.="inner join prospect_lists on campaign_log.list_id = prospect_lists.id and prospect_lists.list_type='test' "; $query.="set emails.deleted=1 "; - } elseif ($focus->db->dbType=='mssql') { - $query="update emails "; - $query.="set emails.deleted=1 "; - $query.="where id in ( "; - $query.="select related_id from campaign_log "; - $query.="inner join prospect_lists on campaign_log.list_id = prospect_lists.id "; - $query.="and prospect_lists.list_type='test' "; - $query.="and campaign_log.campaign_id = '{$focus->id}' ) "; } else { } $focus->db->query($query); @@ -78,13 +70,7 @@ if (isset($_REQUEST['mode']) and $_REQUEST['mode']=='Test') { $query="delete emailman.* from emailman "; $query.="inner join prospect_lists on emailman.list_id = prospect_lists.id and prospect_lists.list_type='test' "; $query.="WHERE emailman.campaign_id = '{$focus->id}' "; - } elseif ($focus->db->dbType=='mssql') { - $query="delete from emailman "; - $query.="where list_id in ( "; - $query.=" select prospect_list_id from prospect_list_campaigns "; - $query.=" inner join prospect_lists on prospect_list_campaigns.prospect_list_id = prospect_lists.id "; - $query.=" where prospect_lists.list_type='test' and prospect_list_campaigns.campaign_id = '{$focus->id}' ) "; - } else { + } else { } $focus->db->query($query); @@ -94,13 +80,6 @@ if (isset($_REQUEST['mode']) and $_REQUEST['mode']=='Test') { $query.="inner join prospect_lists on campaign_log.list_id = prospect_lists.id and prospect_lists.list_type='test' "; $query.="set campaign_log.deleted=1 "; $query.="where campaign_log.campaign_id='{$focus->id}' "; - } elseif ($focus->db->dbType=='mssql') { - $query="update campaign_log "; - $query.="set campaign_log.deleted=1 "; - $query.="where list_id in ( "; - $query.=" select id from prospect_lists "; - $query.=" where prospect_lists.list_type='test') "; - $query.="and campaign_log.campaign_id='{$focus->id}' "; } else { } $focus->db->query($query); diff --git a/modules/Campaigns/GenerateWebToLeadForm.php b/modules/Campaigns/GenerateWebToLeadForm.php index 85aced5a..c31ccc13 100644 --- a/modules/Campaigns/GenerateWebToLeadForm.php +++ b/modules/Campaigns/GenerateWebToLeadForm.php @@ -105,8 +105,8 @@ if(!empty($_REQUEST['assigned_user_id'])){ $xtpl->assign("APP", $app_strings); $Web_To_Lead_Form_html = ''; $Web_To_Lead_Form_html .=''; - $Web_To_Lead_Form_html .= ""; - $Web_To_Lead_Form_html .= ''; + $Web_To_Lead_Form_html .= ""; + $Web_To_Lead_Form_html .= ''; $Web_To_Lead_Form_html .="
    "; $Web_To_Lead_Form_html .= " diff --git a/modules/Campaigns/PopupCampaignRoi.php b/modules/Campaigns/PopupCampaignRoi.php index e1f1cf4c..27343298 100644 --- a/modules/Campaigns/PopupCampaignRoi.php +++ b/modules/Campaigns/PopupCampaignRoi.php @@ -55,6 +55,9 @@ global $app_strings; global $app_list_strings; global $sugar_version, $sugar_config; +/* +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER'].": ".$focus->name, true); +*/ global $theme; diff --git a/modules/Campaigns/ProcessBouncedEmails.php b/modules/Campaigns/ProcessBouncedEmails.php index 36b63e69..18203154 100644 --- a/modules/Campaigns/ProcessBouncedEmails.php +++ b/modules/Campaigns/ProcessBouncedEmails.php @@ -141,7 +141,7 @@ function campaign_process_bounced_emails(&$email, &$email_header) { global $sugar_config; $emailFromAddress = $email_header->fromaddress; - $email_description = $email->raw_source; + $email_description = $email->description; $email_description .= retrieveErrorReportAttachment($email); if (preg_match('/MAILER-DAEMON|POSTMASTER/i',$emailFromAddress)) diff --git a/modules/Campaigns/QueueCampaign.php b/modules/Campaigns/QueueCampaign.php index a27a0e8e..00bd95bb 100644 --- a/modules/Campaigns/QueueCampaign.php +++ b/modules/Campaigns/QueueCampaign.php @@ -78,7 +78,7 @@ if (!empty($campaign->status) && $campaign->status == 'sending') { } if ($campaign->db->dbType=='oci8') { } else { - $current_date= "'".$timedate->nowDb()."'"; + $current_date= "'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'"; } //start scheduling now..... @@ -86,32 +86,32 @@ foreach ($_POST['mass'] as $message_id) { //fetch email marketing definition. if (!class_exists('EmailMarketing')) require_once('modules/EmailMarketing/EmailMarketing.php'); - - + + $marketing = new EmailMarketing(); $marketing->retrieve($message_id); - + //make sure that the marketing message has a mailbox. // if (empty($marketing->inbound_email_id)) { - + echo "

    "; echo "

    {$mod_strings['ERR_NO_MAILBOX']}

    "; echo "
    $marketing->name"; echo "

    "; - sugar_die(''); + sugar_die(''); } global $timedate; $mergedvalue=$timedate->merge_date_time($marketing->date_start,$marketing->time_start); - + if ($campaign->db->dbType=='oci8') { } else { if ($test) { - $send_date_time="'".$timedate->getNow()->get("-60 seconds")->asDb() ."'"; + $send_date_time="'".gmdate($GLOBALS['timedate']->get_db_date_time_format(), mktime() -60) ."'"; } else { - $send_date_time= "'".$timedate->to_db($mergedvalue)."'"; + $send_date_time= "'".$timedate->to_db_date($mergedvalue) . ' ' .$timedate->to_db_time($mergedvalue)."'"; } } @@ -119,44 +119,44 @@ foreach ($_POST['mass'] as $message_id) { if ($marketing->all_prospect_lists == 1) { $query="SELECT prospect_lists.id prospect_list_id from prospect_lists "; $query.=" INNER JOIN prospect_list_campaigns plc ON plc.prospect_list_id = prospect_lists.id"; - $query.=" WHERE plc.campaign_id='{$campaign->id}'"; + $query.=" WHERE plc.campaign_id='{$campaign->id}'"; $query.=" AND prospect_lists.deleted=0"; $query.=" AND plc.deleted=0"; if ($test) { - $query.=" AND prospect_lists.list_type='test'"; + $query.=" AND prospect_lists.list_type='test'"; } else { - $query.=" AND prospect_lists.list_type!='test' AND prospect_lists.list_type not like 'exempt%'"; + $query.=" AND prospect_lists.list_type!='test' AND prospect_lists.list_type not like 'exempt%'"; } } else { $query="select email_marketing_prospect_lists.* FROM email_marketing_prospect_lists "; $query.=" inner join prospect_lists on prospect_lists.id = email_marketing_prospect_lists.prospect_list_id"; $query.=" WHERE prospect_lists.deleted=0 and email_marketing_id = '$message_id' and email_marketing_prospect_lists.deleted=0"; - + if ($test) { - $query.=" AND prospect_lists.list_type='test'"; + $query.=" AND prospect_lists.list_type='test'"; } else { - $query.=" AND prospect_lists.list_type!='test' AND prospect_lists.list_type not like 'exempt%'"; + $query.=" AND prospect_lists.list_type!='test' AND prospect_lists.list_type not like 'exempt%'"; } } $result=$campaign->db->query($query); while (($row=$campaign->db->fetchByAssoc($result))!=null ) { - + $prospect_list_id=$row['prospect_list_id']; - + //delete all messages for the current campaign and current email marketing message. $delete_emailman_query="delete from emailman where campaign_id='{$campaign->id}' and marketing_id='{$message_id}' and list_id='{$prospect_list_id}'"; $campaign->db->query($delete_emailman_query); - + $insert_query= "INSERT INTO emailman (date_entered, user_id, campaign_id, marketing_id,list_id, related_id, related_type, send_date_time"; if ($campaign->db->dbType=='oci8') { } - $insert_query.=')'; - $insert_query.= " SELECT $current_date,'{$current_user->id}',plc.campaign_id,'{$message_id}',plp.prospect_list_id, plp.related_id, plp.related_type,{$send_date_time} "; + $insert_query.=')'; + $insert_query.= " SELECT $current_date,'{$current_user->id}',plc.campaign_id,'{$message_id}',plp.prospect_list_id, plp.related_id, plp.related_type,{$send_date_time} "; if ($campaign->db->dbType=='oci8') { } $insert_query.= "FROM prospect_lists_prospects plp "; - $insert_query.= "INNER JOIN prospect_list_campaigns plc ON plc.prospect_list_id = plp.prospect_list_id "; + $insert_query.= "INNER JOIN prospect_list_campaigns plc ON plc.prospect_list_id = plp.prospect_list_id "; $insert_query.= "WHERE plp.prospect_list_id = '{$prospect_list_id}' "; $insert_query.= "AND plp.deleted=0 "; $insert_query.= "AND plc.deleted=0 "; @@ -169,22 +169,22 @@ foreach ($_POST['mass'] as $message_id) { } //delete all entries from the emailman table that belong to the exempt list. -if (!$test) { +if (!$test) { //id based exempt list treatment. if ($campaign->db->dbType =='mysql') { - - $delete_query = "DELETE emailman.* FROM emailman "; + + $delete_query = "DELETE emailman.* FROM emailman "; $delete_query.= "INNER JOIN prospect_lists_prospects plp on plp.related_id = emailman.related_id and plp.related_type = emailman.related_type "; $delete_query.= "INNER JOIN prospect_lists pl ON pl.id = plp.prospect_list_id "; $delete_query .= "INNER JOIN prospect_list_campaigns plc on plp.prospect_list_id = plc.prospect_list_id "; $delete_query.= "WHERE plp.deleted=0 "; - $delete_query.= "AND plc.campaign_id = '{$campaign->id}'"; + $delete_query.= "AND plc.campaign_id = '{$campaign->id}'"; $delete_query.= "AND pl.list_type = 'exempt' "; $delete_query.= "AND emailman.campaign_id='{$campaign->id}'"; $campaign->db->query($delete_query); - + }elseif($campaign->db->dbType =='mssql'){ - $delete_query = "DELETE FROM emailman "; + $delete_query = "DELETE FROM emailman "; $delete_query .= "WHERE emailman.campaign_id='".$campaign->id."' "; $delete_query .= "and emailman.related_id in "; $delete_query .= "(select prospect_lists_prospects.related_id from prospect_lists_prospects where prospect_lists_prospects.prospect_list_id in (select prospect_lists.id from prospect_lists where prospect_lists.list_type = 'exempt' and prospect_lists_prospects.prospect_list_id in(select prospect_list_campaigns.prospect_list_id from prospect_list_campaigns where prospect_list_campaigns.campaign_id = '".$campaign->id."'))) "; diff --git a/modules/Campaigns/RoiDetailView.tpl b/modules/Campaigns/RoiDetailView.html similarity index 51% rename from modules/Campaigns/RoiDetailView.tpl rename to modules/Campaigns/RoiDetailView.html index e0702f24..ea565e23 100644 --- a/modules/Campaigns/RoiDetailView.tpl +++ b/modules/Campaigns/RoiDetailView.html @@ -1,4 +1,4 @@ -{* + - -{$chartResources} +/********************************************************************************* + ********************************************************************************/ +--> +
    - + -
    - + -
    +ROI details for the Campaign -->
    Planned Budget{PLANNED_BUDGET}{CURRENCY}
    Actual Cost{ACTUAL_COST}{CURRENCY}
    Expected Revenue{EXPECTED_REVENUE}{CURRENCY}
    Opportunities Closed{OPP_COUNT} -
    Cost per Impression{COST_OF_IMPRESSION} -
    Cost per Click Through{COST_PER_CLICK_THROUGH} +
    Cost per Impression{COST_OF_IMPRESSION} +
    Cost per Click Through{COST_PER_CLICK_THROUGH}
    - +
    +
    +
    - - +
    - + - + - +
    - - {$ADMIN_EDIT} - + + + {ADMIN_EDIT} + {$ADMIN_EDIT}{ADMIN_EDIT}

    -{$PAGINATION} - - - - +{PAGINATION} + + + + - - + + + + + + + + - - - - + + + + - - - - + + + + - - + + @@ -98,26 +104,26 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -126,15 +132,15 @@
    {$MOD.LBL_NAME}{$NAME}{$MOD.LBL_ASSIGNED_TO}{$ASSIGNED_TO}{MOD.LBL_NAME}{NAME}{MOD.LBL_ASSIGNED_TO}{ASSIGNED_TO}
    {$MOD.LBL_CAMPAIGN_STATUS}{$STATUS}{MOD.LBL_CAMPAIGN_STATUS}{STATUS}{MOD.LBL_TEAM}{TEAM_NAME}    
    {$MOD.LBL_CAMPAIGN_START_DATE}{$START_DATE}{$APP.LBL_DATE_MODIFIED} {$DATE_MODIFIED} {$APP.LBL_BY} {$MODIFIED_BY}{MOD.LBL_CAMPAIGN_START_DATE}{START_DATE}{APP.LBL_DATE_MODIFIED} {DATE_MODIFIED} {APP.LBL_BY} {MODIFIED_BY}
    {$MOD.LBL_CAMPAIGN_END_DATE}{$END_DATE}{$APP.LBL_DATE_ENTERED} {$DATE_ENTERED} {$APP.LBL_BY} {$CREATED_BY}{MOD.LBL_CAMPAIGN_END_DATE}{END_DATE}{APP.LBL_DATE_ENTERED} {DATE_ENTERED} {APP.LBL_BY} {CREATED_BY}
    {$MOD.LBL_CAMPAIGN_TYPE}{$TYPE}{MOD.LBL_CAMPAIGN_TYPE}{TYPE}    
       
    {$MOD.LBL_CAMPAIGN_BUDGET} ({$CURRENCY}){$BUDGET}{$MOD.LBL_CAMPAIGN_IMPRESSIONS}{$IMPRESSIONS}{MOD.LBL_CAMPAIGN_BUDGET} ({CURRENCY}){BUDGET}{MOD.LBL_CAMPAIGN_IMPRESSIONS}{IMPRESSIONS}
    {$MOD.LBL_CAMPAIGN_EXPECTED_COST} ({$CURRENCY}){$EXPECTED_COST}{$MOD.LBL_CAMPAIGN_OPPORTUNITIES_WON}{$OPPORTUNITIES_WON}{MOD.LBL_CAMPAIGN_EXPECTED_COST} ({CURRENCY}){EXPECTED_COST}{MOD.LBL_CAMPAIGN_OPPORTUNITIES_WON}{OPPORTUNITIES_WON}
    {$MOD.LBL_CAMPAIGN_ACTUAL_COST} ({$CURRENCY}){$ACTUAL_COST}{$MOD.LBL_CAMPAIGN_COST_PER_IMPRESSION} ({$CURRENCY}){$COST_PER_IMPRESSION}{MOD.LBL_CAMPAIGN_ACTUAL_COST} ({CURRENCY}){ACTUAL_COST}{MOD.LBL_CAMPAIGN_COST_PER_IMPRESSION} ({CURRENCY}){COST_PER_IMPRESSION}
    {$MOD.LBL_CAMPAIGN_EXPECTED_REVENUE} ({$CURRENCY}){$EXPECTED_REVENUE}{$MOD.LBL_CAMPAIGN_COST_PER_CLICK_THROUGH} ({$CURRENCY}){$COST_PER_CLICK_THROUGH}{MOD.LBL_CAMPAIGN_EXPECTED_REVENUE} ({CURRENCY}){EXPECTED_REVENUE}{MOD.LBL_CAMPAIGN_COST_PER_CLICK_THROUGH} ({CURRENCY}){COST_PER_CLICK_THROUGH}
       

    -
    {$MY_CHART_ROI}
    +
    {MY_CHART_ROI}
    diff --git a/modules/Campaigns/RoiDetailView.php b/modules/Campaigns/RoiDetailView.php index 38c65ae0..a41d5cbd 100644 --- a/modules/Campaigns/RoiDetailView.php +++ b/modules/Campaigns/RoiDetailView.php @@ -78,43 +78,43 @@ if(!$focus->campaign_type == "NewsLetter"){ } else{ */ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->name), true); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true); $GLOBALS['log']->info("Campaign detail view"); - $smarty = new Sugar_Smarty(); - $smarty->assign("MOD", $mod_strings); - $smarty->assign("APP", $app_strings); - - $smarty->assign("THEME", $theme); - $smarty->assign("GRIDLINE", $gridline); - $smarty->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); - $smarty->assign("ID", $focus->id); - $smarty->assign("ASSIGNED_TO", $focus->assigned_user_name); - $smarty->assign("STATUS", $app_list_strings['campaign_status_dom'][$focus->status]); - $smarty->assign("NAME", $focus->name); - $smarty->assign("TYPE", $app_list_strings['campaign_type_dom'][$focus->campaign_type]); - $smarty->assign("START_DATE", $focus->start_date); - $smarty->assign("END_DATE", $focus->end_date); - - $smarty->assign("BUDGET", $focus->budget); - $smarty->assign("ACTUAL_COST", $focus->actual_cost); - $smarty->assign("EXPECTED_COST", $focus->expected_cost); - $smarty->assign("EXPECTED_REVENUE", $focus->expected_revenue); - - - $smarty->assign("OBJECTIVE", nl2br($focus->objective)); - $smarty->assign("CONTENT", nl2br($focus->content)); - $smarty->assign("DATE_MODIFIED", $focus->date_modified); - $smarty->assign("DATE_ENTERED", $focus->date_entered); - - $smarty->assign("CREATED_BY", $focus->created_by_name); - $smarty->assign("MODIFIED_BY", $focus->modified_by_name); - $smarty->assign("TRACKER_URL", $sugar_config['site_url'] . '/campaign_tracker.php?track=' . $focus->tracker_key); - $smarty->assign("TRACKER_COUNT", intval($focus->tracker_count)); - $smarty->assign("TRACKER_TEXT", $focus->tracker_text); - $smarty->assign("REFER_URL", $focus->refer_url); - $smarty->assign("IMPRESSIONS", $focus->impressions); + $xtpl=new XTemplate ('modules/Campaigns/RoiDetailView.html'); + $xtpl->assign("MOD", $mod_strings); + $xtpl->assign("APP", $app_strings); + + $xtpl->assign("THEME", $theme); + $xtpl->assign("GRIDLINE", $gridline); + $xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); + $xtpl->assign("ID", $focus->id); + $xtpl->assign("ASSIGNED_TO", $focus->assigned_user_name); + $xtpl->assign("STATUS", $app_list_strings['campaign_status_dom'][$focus->status]); + $xtpl->assign("NAME", $focus->name); + $xtpl->assign("TYPE", $app_list_strings['campaign_type_dom'][$focus->campaign_type]); + $xtpl->assign("START_DATE", $focus->start_date); + $xtpl->assign("END_DATE", $focus->end_date); + + $xtpl->assign("BUDGET", $focus->budget); + $xtpl->assign("ACTUAL_COST", $focus->actual_cost); + $xtpl->assign("EXPECTED_COST", $focus->expected_cost); + $xtpl->assign("EXPECTED_REVENUE", $focus->expected_revenue); + + + $xtpl->assign("OBJECTIVE", nl2br($focus->objective)); + $xtpl->assign("CONTENT", nl2br($focus->content)); + $xtpl->assign("DATE_MODIFIED", $focus->date_modified); + $xtpl->assign("DATE_ENTERED", $focus->date_entered); + + $xtpl->assign("CREATED_BY", $focus->created_by_name); + $xtpl->assign("MODIFIED_BY", $focus->modified_by_name); + $xtpl->assign("TRACKER_URL", $sugar_config['site_url'] . '/campaign_tracker.php?track=' . $focus->tracker_key); + $xtpl->assign("TRACKER_COUNT", intval($focus->tracker_count)); + $xtpl->assign("TRACKER_TEXT", $focus->tracker_text); + $xtpl->assign("REFER_URL", $focus->refer_url); + $xtpl->assign("IMPRESSIONS", $focus->impressions); $roi_vals = array(); $roi_vals['budget']= $focus->budget; $roi_vals['actual_cost']= $focus->actual_cost; @@ -134,7 +134,7 @@ $campaign_id = $focus->id; $opp_data1=$focus->db->fetchByAssoc($opp_result1); if(empty($opp_data1['opp_count'])) $opp_data1['opp_count']=0; //_ppd($opp_data1); - $smarty->assign("OPPORTUNITIES_WON",$opp_data1['opp_count']); + $xtpl->assign("OPPORTUNITIES_WON",$opp_data1['opp_count']); $camp_query1 = "select camp.name, count(*) click_thru_link"; $camp_query1 .= " from campaign_log camp_log"; @@ -151,7 +151,7 @@ $campaign_id = $focus->id; else{ $cost_per_impression = format_number(0); } - $smarty->assign("COST_PER_IMPRESSION",currency_format_number($cost_per_impression)); + $xtpl->assign("COST_PER_IMPRESSION",currency_format_number($cost_per_impression)); if(empty($camp_data1['click_thru_link'])) $camp_data1['click_thru_link']=0; $click_thru_links = $camp_data1['click_thru_link']; @@ -161,7 +161,7 @@ $campaign_id = $focus->id; else{ $cost_per_click_thru = format_number(0); } - $smarty->assign("COST_PER_CLICK_THROUGH",currency_format_number($cost_per_click_thru)); + $xtpl->assign("COST_PER_CLICK_THROUGH",currency_format_number($cost_per_click_thru)); $currency = new Currency(); @@ -169,24 +169,24 @@ $campaign_id = $focus->id; { $currency->retrieve($focus->currency_id); if( $currency->deleted != 1){ - $smarty->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol ); - }else $smarty->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); + $xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol ); + }else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); }else{ - $smarty->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); + $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); } global $current_user; if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){ - $smarty->assign("ADMIN_EDIT","".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""); + $xtpl->assign("ADMIN_EDIT","".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""); } $detailView->processListNavigation($xtpl, "CAMPAIGN", $offset, $focus->is_AuditEnabled()); // adding custom fields: require_once('modules/DynamicFields/templates/Files/DetailView.php'); - + $xtpl->parse("main.open_source"); @@ -198,13 +198,9 @@ $campaign_id = $focus->id; $cache_file_name_roi = $current_user->getUserPrivGuid()."_campaign_response_by_roi_".$dateFileNameSafe[0]."_".$dateFileNameSafe[1].".xml"; $chart= new campaign_charts(); //_ppd($roi_vals); - $smarty->assign("MY_CHART_ROI", $chart->campaign_response_roi($app_list_strings['roi_type_dom'],$app_list_strings['roi_type_dom'],$focus->id,true,true)); + $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi($app_list_strings['roi_type_dom'],$app_list_strings['roi_type_dom'],$focus->id,true,true)); //end chart - //custom chart code - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); - $resources = $sugarChart->getChartResources(); - $smarty->assign('chartResources', $resources); - -echo $smarty->fetch('modules/Campaigns/RoiDetailView.tpl'); + + $xtpl->parse("main"); + $xtpl->out("main"); ?> \ No newline at end of file diff --git a/modules/Campaigns/Schedule.php b/modules/Campaigns/Schedule.php index 0d8adf3d..2d2efa70 100644 --- a/modules/Campaigns/Schedule.php +++ b/modules/Campaigns/Schedule.php @@ -73,9 +73,9 @@ global $currentModule; $current_module_strings = return_module_language($current_language, 'EmailMarketing'); if ($test) { - echo getClassicModuleTitle('Campaigns', array($current_module_strings['LBL_MODULE_SEND_TEST']), false); + echo get_module_title('Campaigns', $current_module_strings['LBL_MODULE_SEND_TEST'], false); } else { - echo getClassicModuleTitle('Campaigns', array($current_module_strings['LBL_MODULE_SEND_EMAILS']), false); + echo get_module_title('Campaigns', $current_module_strings['LBL_MODULE_SEND_EMAILS'], false); } $focus = new EmailMarketing(); diff --git a/modules/Campaigns/Subscriptions.php b/modules/Campaigns/Subscriptions.php index cba4104e..8d04bb53 100644 --- a/modules/Campaigns/Subscriptions.php +++ b/modules/Campaigns/Subscriptions.php @@ -74,6 +74,7 @@ if(isset($_REQUEST['record'])) { } +//echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME']." ".$mod_strings['LBL_STEP_3_TITLE'], true); $this->ss->assign("MOD", $mod_strings); $this->ss->assign("APP", $app_strings); @@ -86,11 +87,8 @@ if(isset($_REQUEST['record'])){$this->ss->assign("RECORD", $_REQUEST['record']); if(isset($_REQUEST['subs_action'])){manageSubscriptions($focus);} //$title = $GLOBALS['app_strings']['LBL_MANAGE_SUBSCRIPTIONS_FOR'].$focus->name; -$params = array(); -$params[] = "{$focus->module_dir}"; -$params[] = "{$focus->name}"; -$params[] = $mod_strings['LBL_MANAGE_SUBSCRIPTIONS_TITLE']; -$title = getClassicModuleTitle($focus->module_dir, $params, true); +$middleText = "{$focus->module_dir}»{$focus->name}»{$mod_strings['LBL_MANAGE_SUBSCRIPTIONS_TITLE']}"; +$title = get_module_title($focus->module_dir, $middleText, true); $orig_vals_str = printOriginalValues($focus); $orig_vals_array = constructDDSubscriptionList($focus); diff --git a/modules/Campaigns/TrackDetailView.tpl b/modules/Campaigns/TrackDetailView.html similarity index 61% rename from modules/Campaigns/TrackDetailView.tpl rename to modules/Campaigns/TrackDetailView.html index b71a714f..f8fe233a 100644 --- a/modules/Campaigns/TrackDetailView.tpl +++ b/modules/Campaigns/TrackDetailView.html @@ -1,4 +1,4 @@ -{* + -{$chartResources} - - - +
    - + - + - {$TRACK_DELETE_BUTTON} + {TRACK_DELETE_BUTTON}
    - - - {$ADMIN_EDIT} + + + {ADMIN_EDIT} {$ADMIN_EDIT}{ADMIN_EDIT}
    - +
    -{$PAGINATION} - - - - +{PAGINATION} + + + + - - + + - - + + - - - - + + + + - - - - + + + + - - + + @@ -109,15 +106,15 @@ - - - - + + + + - - - - + + + + @@ -126,27 +123,29 @@ - - + + - - + +
    {$MOD.LBL_NAME}{$NAME}{$MOD.LBL_ASSIGNED_TO}{$ASSIGNED_TO}{MOD.LBL_NAME}{NAME}{MOD.LBL_ASSIGNED_TO}{ASSIGNED_TO}
    {$MOD.LBL_CAMPAIGN_STATUS}{$STATUS}{MOD.LBL_CAMPAIGN_STATUS}{STATUS} {$MOD.LBL_TEAM}{$TEAM_NAME}{MOD.LBL_TEAM}{TEAM_NAME}    
    {$MOD.LBL_CAMPAIGN_START_DATE}{$START_DATE}{$APP.LBL_DATE_MODIFIED} {$DATE_MODIFIED} {$APP.LBL_BY} {$MODIFIED_BY}{MOD.LBL_CAMPAIGN_START_DATE}{START_DATE}{APP.LBL_DATE_MODIFIED} {DATE_MODIFIED} {APP.LBL_BY} {MODIFIED_BY}
    {$MOD.LBL_CAMPAIGN_END_DATE}{$END_DATE}{$APP.LBL_DATE_ENTERED} {$DATE_ENTERED} {$APP.LBL_BY} {$CREATED_BY}{MOD.LBL_CAMPAIGN_END_DATE}{END_DATE}{APP.LBL_DATE_ENTERED} {DATE_ENTERED} {APP.LBL_BY} {CREATED_BY}
    {$MOD.LBL_CAMPAIGN_TYPE}{$TYPE}{MOD.LBL_CAMPAIGN_TYPE}{TYPE}    
       
    {$MOD.LBL_CAMPAIGN_BUDGET} ({$CURRENCY}){$BUDGET}{$MOD.LBL_CAMPAIGN_ACTUAL_COST} ({$CURRENCY}){$ACTUAL_COST}{MOD.LBL_CAMPAIGN_BUDGET} ({CURRENCY}){BUDGET}{MOD.LBL_CAMPAIGN_ACTUAL_COST} ({CURRENCY}){ACTUAL_COST}
    {$MOD.LBL_CAMPAIGN_EXPECTED_REVENUE} ({$CURRENCY}){$EXPECTED_REVENUE}{$MOD.LBL_CAMPAIGN_EXPECTED_COST} ({$CURRENCY}){$EXPECTED_COST}{MOD.LBL_CAMPAIGN_EXPECTED_REVENUE} ({CURRENCY}){EXPECTED_REVENUE}{MOD.LBL_CAMPAIGN_EXPECTED_COST} ({CURRENCY}){EXPECTED_COST}
      
    {$MOD.LBL_CAMPAIGN_OBJECTIVE}{$OBJECTIVE}{MOD.LBL_CAMPAIGN_OBJECTIVE}{OBJECTIVE}
    {$MOD.LBL_CAMPAIGN_CONTENT}{$CONTENT}{MOD.LBL_CAMPAIGN_CONTENT}{CONTENT}
    - - + + - + + +
    {$FILTER_LABEL}{$MKT_DROP_DOWN}{FILTER_LABEL}{MKT_DROP_DOWN}  
    {$MY_CHART}
     

    {MY_CHART}

     
    - -{$SUBPANEL} - \ No newline at end of file + +{SUBPANEL} + diff --git a/modules/Campaigns/TrackDetailView.php b/modules/Campaigns/TrackDetailView.php index 1fafeaf4..8349dc06 100644 --- a/modules/Campaigns/TrackDetailView.php +++ b/modules/Campaigns/TrackDetailView.php @@ -77,46 +77,47 @@ if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) { // include ('modules/Campaigns/NewsLetterTrackDetailView.php'); if(isset($focus->campaign_type) && $focus->campaign_type == "NewsLetter"){ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_NEWSLETTER'],$focus->name), true); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER'].": ".$focus->name, true); } else{ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->name), true); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true); } $GLOBALS['log']->info("Campaign detail view"); - $smarty = new Sugar_Smarty(); - $smarty->assign("MOD", $mod_strings); - $smarty->assign("APP", $app_strings); - $smarty->assign("GRIDLINE", $gridline); - $smarty->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); - $smarty->assign("ID", $focus->id); - $smarty->assign("ASSIGNED_TO", $focus->assigned_user_name); - $smarty->assign("STATUS", $app_list_strings['campaign_status_dom'][$focus->status]); - $smarty->assign("NAME", $focus->name); - $smarty->assign("TYPE", $app_list_strings['campaign_type_dom'][$focus->campaign_type]); - $smarty->assign("START_DATE", $focus->start_date); - $smarty->assign("END_DATE", $focus->end_date); + $xtpl=new XTemplate ('modules/Campaigns/TrackDetailView.html'); + $xtpl->assign("MOD", $mod_strings); + $xtpl->assign("APP", $app_strings); - $smarty->assign("BUDGET", $focus->budget); - $smarty->assign("ACTUAL_COST", $focus->actual_cost); - $smarty->assign("EXPECTED_COST", $focus->expected_cost); - $smarty->assign("EXPECTED_REVENUE", $focus->expected_revenue); + $xtpl->assign("GRIDLINE", $gridline); + $xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); + $xtpl->assign("ID", $focus->id); + $xtpl->assign("ASSIGNED_TO", $focus->assigned_user_name); + $xtpl->assign("STATUS", $app_list_strings['campaign_status_dom'][$focus->status]); + $xtpl->assign("NAME", $focus->name); + $xtpl->assign("TYPE", $app_list_strings['campaign_type_dom'][$focus->campaign_type]); + $xtpl->assign("START_DATE", $focus->start_date); + $xtpl->assign("END_DATE", $focus->end_date); + $xtpl->assign("BUDGET", $focus->budget); + $xtpl->assign("ACTUAL_COST", $focus->actual_cost); + $xtpl->assign("EXPECTED_COST", $focus->expected_cost); + $xtpl->assign("EXPECTED_REVENUE", $focus->expected_revenue); - $smarty->assign("OBJECTIVE", nl2br($focus->objective)); - $smarty->assign("CONTENT", nl2br($focus->content)); - $smarty->assign("DATE_MODIFIED", $focus->date_modified); - $smarty->assign("DATE_ENTERED", $focus->date_entered); - $smarty->assign("CREATED_BY", $focus->created_by_name); - $smarty->assign("MODIFIED_BY", $focus->modified_by_name); - $smarty->assign("TRACKER_URL", $sugar_config['site_url'] . '/campaign_tracker.php?track=' . $focus->tracker_key); - $smarty->assign("TRACKER_COUNT", intval($focus->tracker_count)); - $smarty->assign("TRACKER_TEXT", $focus->tracker_text); - $smarty->assign("REFER_URL", $focus->refer_url); + $xtpl->assign("OBJECTIVE", nl2br($focus->objective)); + $xtpl->assign("CONTENT", nl2br($focus->content)); + $xtpl->assign("DATE_MODIFIED", $focus->date_modified); + $xtpl->assign("DATE_ENTERED", $focus->date_entered); + + $xtpl->assign("CREATED_BY", $focus->created_by_name); + $xtpl->assign("MODIFIED_BY", $focus->modified_by_name); + $xtpl->assign("TRACKER_URL", $sugar_config['site_url'] . '/campaign_tracker.php?track=' . $focus->tracker_key); + $xtpl->assign("TRACKER_COUNT", intval($focus->tracker_count)); + $xtpl->assign("TRACKER_TEXT", $focus->tracker_text); + $xtpl->assign("REFER_URL", $focus->refer_url); if(isset($focus->campaign_type) && $focus->campaign_type == "Email" || $focus->campaign_type == "NewsLetter") { - $smarty->assign("TRACK_DELETE_BUTTON",""); + $xtpl->assign("TRACK_DELETE_BUTTON",""); } $currency = new Currency(); @@ -124,17 +125,17 @@ if(isset($focus->campaign_type) && $focus->campaign_type == "NewsLetter"){ { $currency->retrieve($focus->currency_id); if( $currency->deleted != 1){ - $smarty->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol ); - }else $smarty->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); + $xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol ); + }else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); }else{ - $smarty->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); + $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); } global $current_user; if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){ - $smarty->assign("ADMIN_EDIT","".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""); + $xtpl->assign("ADMIN_EDIT","".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""); } $detailView->processListNavigation($xtpl, "CAMPAIGN", $offset, $focus->is_AuditEnabled()); @@ -190,8 +191,8 @@ if(isset($focus->campaign_type) && $focus->campaign_type == "NewsLetter"){ } $options_str .=""; //populate the dropdown - $smarty->assign("FILTER_LABEL", $mod_strings['LBL_FILTER_CHART_BY']); - $smarty->assign("MKT_DROP_DOWN",$options_str); + $xtpl->assign("FILTER_LABEL", $mod_strings['LBL_FILTER_CHART_BY']); + $xtpl->assign("MKT_DROP_DOWN",$options_str); } //add chart $seps = array("-", "/"); @@ -206,19 +207,15 @@ $chart= new campaign_charts(); if(!empty($selected_marketing_id)){$latest_marketing_id = $selected_marketing_id;} if(empty($latest_marketing_id) || $latest_marketing_id === 'all'){ - $smarty->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'],$app_list_strings['campainglog_target_type_dom'],$focus->id,$sugar_config['tmp_dir'].$cache_file_name,true)); + $xtpl->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'],$app_list_strings['campainglog_target_type_dom'],$focus->id,$sugar_config['tmp_dir'].$cache_file_name,true)); }else{ - $smarty->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'],$app_list_strings['campainglog_target_type_dom'],$focus->id,$sugar_config['tmp_dir'].$cache_file_name,true,$latest_marketing_id)); + $xtpl->assign("MY_CHART", $chart->campaign_response_by_activity_type($app_list_strings['campainglog_activity_type_dom'],$app_list_strings['campainglog_target_type_dom'],$focus->id,$sugar_config['tmp_dir'].$cache_file_name,true,$latest_marketing_id)); } //end chart -//custom chart code - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); - $resources = $sugarChart->getChartResources(); - $smarty->assign('chartResources', $resources); -echo $smarty->fetch('modules/Campaigns/TrackDetailView.tpl'); +$xtpl->parse("main"); +$xtpl->out("main"); require_once('include/SubPanel/SubPanelTiles.php'); $subpanel = new SubPanelTiles($focus, 'Campaigns'); diff --git a/modules/Campaigns/WebToLeadCapture.php b/modules/Campaigns/WebToLeadCapture.php index 1f5a4567..0113b5aa 100644 --- a/modules/Campaigns/WebToLeadCapture.php +++ b/modules/Campaigns/WebToLeadCapture.php @@ -83,11 +83,6 @@ if (isset($_POST['campaign_id']) && !empty($_POST['campaign_id'])) { $lead->new_with_id = true; } $GLOBALS['check_notify'] = true; - - //bug: 42398 - have to unset the id from the required_fields since it is not populated in the $_POST - unset($lead->required_fields['id']); - unset($lead->required_fields['team_name']); - unset($lead->required_fields['team_count']); $lead = $leadForm->handleSave($prefix, false, true, false, $lead); if(!empty($lead)){ @@ -99,7 +94,7 @@ if (isset($_POST['campaign_id']) && !empty($_POST['campaign_id'])) { $camplog->related_type = $lead->module_dir; $camplog->activity_type = "lead"; $camplog->target_type = $lead->module_dir; - $campaign_log->activity_date=$timedate->now(); + $campaign_log->activity_date=$timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format())); $camplog->target_id = $lead->id; $camplog->save(); diff --git a/modules/Campaigns/WizardHome.php b/modules/Campaigns/WizardHome.php index 4dbd72a7..62f4f5df 100644 --- a/modules/Campaigns/WizardHome.php +++ b/modules/Campaigns/WizardHome.php @@ -63,9 +63,9 @@ global $current_user; //if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); //account for use within wizards if($focus->campaign_type == 'NewsLetter'){ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_NEWSLETTER_WIZARD_START_TITLE'].$focus->name), true, false); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER_WIZARD_START_TITLE'].$focus->name, true, false); }else{ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN_WIZARD_START_TITLE'].$focus->name), true, false); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CAMPAIGN_WIZARD_START_TITLE'].$focus->name, true, false); } global $theme; @@ -160,7 +160,7 @@ global $currentModule; //if (!is_admin($current_user)) sugar_die("Unauthorized access to administration."); //account for use within wizards - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN_WIZARD'].$focus->name), true, false); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CAMPAIGN_WIZARD'].$focus->name, true, false); $ss = new Sugar_Smarty(); diff --git a/modules/Campaigns/WizardMarketing.php b/modules/Campaigns/WizardMarketing.php index 70b4f87e..b354c906 100644 --- a/modules/Campaigns/WizardMarketing.php +++ b/modules/Campaigns/WizardMarketing.php @@ -74,9 +74,9 @@ $json = getJSONobj(); $GLOBALS['log']->info("Wizard Continue Create Wizard"); if($campaign_focus->campaign_type=='NewsLetter'){ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_NEWSLETTER WIZARD_TITLE'].' '.$campaign_focus->name), true); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER WIZARD_TITLE'].' '.$campaign_focus->name, true); }else{ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN'].' '.$campaign_focus->name), true); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CAMPAIGN'].' '.$campaign_focus->name, true); } $ss = new Sugar_Smarty(); diff --git a/modules/Campaigns/WizardMarketingSave.php b/modules/Campaigns/WizardMarketingSave.php index 607503da..07e5069e 100644 --- a/modules/Campaigns/WizardMarketingSave.php +++ b/modules/Campaigns/WizardMarketingSave.php @@ -101,7 +101,7 @@ else { } if(!empty($_REQUEST['meridiem'])){ - $_REQUEST['time_start'] = $timedate->merge_time_meridiem($_REQUEST['time_start'],$timedate->get_time_format(), $_REQUEST['meridiem']); + $_REQUEST['time_start'] = $timedate->merge_time_meridiem($_REQUEST['time_start'],$timedate->get_time_format(true), $_REQUEST['meridiem']); } if(empty($_REQUEST['time_start'])) { diff --git a/modules/Campaigns/WizardNewsletter.php b/modules/Campaigns/WizardNewsletter.php index 689a3850..f6a54c9e 100644 --- a/modules/Campaigns/WizardNewsletter.php +++ b/modules/Campaigns/WizardNewsletter.php @@ -76,9 +76,9 @@ $json = getJSONobj(); $GLOBALS['log']->info("Campaign NewsLetter Wizard"); if( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==1) || ($focus->campaign_type=='NewsLetter')){ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_NEWSLETTER WIZARD_TITLE'].$focus->name), true, false); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER WIZARD_TITLE'].$focus->name, true, false); }else{ - echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN'].$focus->name), true, false); + echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CAMPAIGN'].$focus->name, true, false); } diff --git a/modules/Campaigns/image.php b/modules/Campaigns/image.php index 094f6466..0c7f30a4 100644 --- a/modules/Campaigns/image.php +++ b/modules/Campaigns/image.php @@ -43,6 +43,6 @@ if(!empty($_REQUEST['identifier'])) { } sugar_cleanup(); Header("Content-Type: image/gif"); -$fn=sugar_fopen(SugarThemeRegistry::current()->getImageURL("blank.gif",false),"r"); +$fn=sugar_fopen(SugarThemeRegistry::current()->getImageURL("blank.gif"),"r"); fpassthru($fn); ?> diff --git a/modules/Campaigns/metadata/SearchFields.php b/modules/Campaigns/metadata/SearchFields.php index e27b1a37..ab58b10b 100644 --- a/modules/Campaigns/metadata/SearchFields.php +++ b/modules/Campaigns/metadata/SearchFields.php @@ -42,25 +42,5 @@ $searchFields['Campaigns'] = 'status'=> array('query_type'=>'default', 'options' => 'campaign_status_dom', 'template_var' => 'STATUS_OPTIONS'), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), - 'start_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), - 'end_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), - //Range Search Support ); ?> diff --git a/modules/Campaigns/metadata/listviewdefs.php b/modules/Campaigns/metadata/listviewdefs.php index dddb56fd..eba58c9a 100644 --- a/modules/Campaigns/metadata/listviewdefs.php +++ b/modules/Campaigns/metadata/listviewdefs.php @@ -81,10 +81,6 @@ $listViewDefs['Campaigns'] = array( 'default' => true, 'studio' => false, 'nowrap' => true, - 'sortable' => false), - 'DATE_ENTERED' => array ( - 'width' => '10', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true), + 'sortable' => false), ); ?> diff --git a/modules/Campaigns/utils.php b/modules/Campaigns/utils.php index a81bd220..c8822cb6 100644 --- a/modules/Campaigns/utils.php +++ b/modules/Campaigns/utils.php @@ -173,7 +173,7 @@ function log_campaign_activity($identifier, $activity, $update=true, $clicked_ur $data['campaign_id']="'" . $row['campaign_id'] . "'"; $data['target_tracker_key']="'" . $identifier . "'"; $data['activity_type']="'" . $activity . "'"; - $data['activity_date']="'" . TimeDate::getInstance()->nowDb() . "'"; + $data['activity_date']="'" . gmdate($GLOBALS['timedate']->get_db_date_time_format()) . "'"; $data['hits']=1; if (!empty($clicked_url_key)) { $data['related_id']="'".$clicked_url_key."'"; @@ -232,7 +232,7 @@ function log_campaign_activity($identifier, $activity, $update=true, $clicked_ur $data['target_id']="'" . $row['target_id'] . "'"; $data['target_type']="'" . $row['target_type'] . "'"; $data['activity_type']="'" . $activity . "'"; - $data['activity_date']="'" . TimeDate::getInstance()->nowDb() . "'"; + $data['activity_date']="'" . gmdate($GLOBALS['timedate']->get_db_date_time_format()) . "'"; $data['list_id']="'" . $row['list_id'] . "'"; $data['marketing_id']="'" . $row['marketing_id'] . "'"; $data['hits']=1; @@ -289,7 +289,7 @@ function campaign_log_lead_entry($campaign_id, $parent_bean,$child_bean,$activit $campaign_log->related_type = $parent_bean->module_dir; $campaign_log->target_id = $child_bean->id; $campaign_log->target_type = $child_bean->module_dir; - $campaign_log->activity_date = $timedate->now(); + $campaign_log->activity_date = $timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format()));; $campaign_log->activity_type = $activity_type; //save the campaign log entry $campaign_log->save(); @@ -844,7 +844,7 @@ function write_mail_merge_log_entry($campaign_id,$pl_row) { $data['target_id']="'" . $pl_row['related_id'] . "'"; $data['target_type']="'" . $pl_row['related_type'] . "'"; $data['activity_type']="'targeted'"; - $data['activity_date']="'" . TimeDate::getInstance()->nowDb() . "'"; + $data['activity_date']="'" . gmdate($GLOBALS['timedate']->get_db_date_time_format()) . "'"; $data['list_id']="'" . $pl_row['prospect_list_id'] . "'"; $data['hits']=1; @@ -871,11 +871,11 @@ function write_mail_merge_log_entry($campaign_id,$pl_row) { if ($focus->db->dbType=='oci8') { } else if ($focus->db->dbType=='mssql') { - $current_date= "'".TimeDate::getInstance()->nowDb()."'"; + $current_date= "'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'"; $guid = "NEWID()"; } else { - $current_date= "'".TimeDate::getInstance()->nowDb()."'"; + $current_date= "'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'"; $guid = "UUID()"; } @@ -935,7 +935,7 @@ function write_mail_merge_log_entry($campaign_id,$pl_row) { $campaign_log->target_id = $rel_bean->id; $campaign_log->target_type = $rel_bean->module_dir; $campaign_log->activity_type = 'targeted'; - $campaign_log->activity_date=$timedate->now(); + $campaign_log->activity_date=$timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format())); //save the campaign log entry $campaign_log->save(); } @@ -982,4 +982,4 @@ function write_mail_merge_log_entry($campaign_id,$pl_row) { } -?> +?> \ No newline at end of file diff --git a/modules/Campaigns/vardefs.php b/modules/Campaigns/vardefs.php index bb414709..ce641f9b 100644 --- a/modules/Campaigns/vardefs.php +++ b/modules/Campaigns/vardefs.php @@ -38,7 +38,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dictionary['Campaign'] = array ('audited'=>true, 'comment' => 'Campaigns are a series of operations undertaken to accomplish a purpose, usually acquiring leads', 'table' => 'campaigns', - 'unified_search' => true, + 'fields' => array ( 'tracker_key' => array ( 'name' => 'tracker_key', @@ -67,7 +67,6 @@ $dictionary['Campaign'] = array ('audited'=>true, 'comment' => 'The name of the campaign', 'importable' => 'required', 'required' => true, - 'unified_search' => true, ), 'refer_url' => array ( 'name' => 'refer_url', @@ -93,8 +92,6 @@ $dictionary['Campaign'] = array ('audited'=>true, 'audited'=>true, 'comment' => 'Starting date of the campaign', 'validation' => array ('type' => 'isbefore', 'compareto' => 'end_date'), - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'end_date' => array ( 'name' => 'end_date', @@ -104,8 +101,6 @@ $dictionary['Campaign'] = array ('audited'=>true, 'comment' => 'Ending date of the campaign', 'importable' => 'required', 'required' => true, - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'status' => array ( 'name' => 'status', diff --git a/modules/Campaigns/views/view.classic.php b/modules/Campaigns/views/view.classic.php index b756f110..6e35eb67 100644 --- a/modules/Campaigns/views/view.classic.php +++ b/modules/Campaigns/views/view.classic.php @@ -65,42 +65,37 @@ class CampaignsViewClassic extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { $params = array(); - $params[] = $this->_getModuleTitleListParam($browserTitle); + $params[] = $this->_getModuleTitleListParam(); if (isset($this->action)){ switch($_REQUEST['action']){ case 'WizardHome': - if(!empty($this->bean->id)) - { + if(!empty($this->bean->id)){ $params[] = "".$this->bean->name.""; + $params[] = $GLOBALS['mod_strings']['LBL_CAMPAIGN_WIZARD']; + }else{ + $params[] = $GLOBALS['mod_strings']['LBL_CAMPAIGN_WIZARD']; } - $params[] = $GLOBALS['mod_strings']['LBL_CAMPAIGN_WIZARD']; break; case 'WebToLeadCreation': $params[] = $GLOBALS['mod_strings']['LBL_LEAD_FORM_WIZARD']; break; case 'WizardNewsletter': - if(!empty($this->bean->id)) - { + if(!empty($this->bean->id)){ $params[] = "".$GLOBALS['mod_strings']['LBL_NEWSLETTER_TITLE'].""; + $params[] = $GLOBALS['mod_strings']['LBL_CREATE_NEWSLETTER']; + }else{ + $params[] = $GLOBALS['mod_strings']['LBL_CREATE_NEWSLETTER']; } - $params[] = $GLOBALS['mod_strings']['LBL_CREATE_NEWSLETTER']; break; case 'CampaignDiagnostic': $params[] = $GLOBALS['mod_strings']['LBL_CAMPAIGN_DIAGNOSTICS']; break; case 'WizardEmailSetup': $params[] = $GLOBALS['mod_strings']['LBL_EMAIL_SETUP_WIZARD_TITLE']; - break; - case 'TrackDetailView': - if(!empty($this->bean->id)) - { - $params[] = "".$this->bean->name.""; - } - $params[] = $GLOBALS['mod_strings']['LBL_LIST_TO_ACTIVITY']; - break; + break; }//switch }//fi diff --git a/modules/Cases/Case.php b/modules/Cases/Case.php index 2bbadd5a..91e220e3 100644 --- a/modules/Cases/Case.php +++ b/modules/Cases/Case.php @@ -150,7 +150,7 @@ class aCase extends Basic { return $array_assign; } - + function save_relationship_changes($is_update) { parent::save_relationship_changes($is_update); @@ -187,14 +187,9 @@ class aCase extends Basic { $this->created_by_name = get_assigned_user_name($this->created_by); $this->modified_by_name = get_assigned_user_name($this->modified_user_id); - - if(!empty($this->id)) { - $account_info = $this->getAccount($this->id); - if(!empty($account_info)) { - $this->account_name = $account_info['account_name']; - $this->account_id = $account_info['account_id']; - } - } + $account_info = $this->getAccount($this->id); + $this->account_name = $account_info['account_name']; + $this->account_id = $account_info['account_id']; } @@ -293,10 +288,10 @@ class aCase extends Basic { return (isset($sugar_config['inbound_email_case_subject_macro']) && !empty($sugar_config['inbound_email_case_subject_macro'])) ? $sugar_config['inbound_email_case_subject_macro'] : $this->emailSubjectMacro; } - + function getAccount($case_id){ - if(empty($case_id)) return array(); - $ret_array = array(); + $ret_array = array(); + $query = "SELECT acc.id, acc.name from accounts acc, cases where acc.id = cases.account_id and cases.id = '" . $case_id . "' and cases.deleted=0 and acc.deleted=0"; $result = $this->db->query($query,true," Error filling in additional detail fields: "); @@ -310,7 +305,7 @@ class aCase extends Basic { else{ $ret_array['account_name'] = ''; $ret_array['account_id'] = ''; - } + } return $ret_array; } } diff --git a/modules/Cases/Menu.php b/modules/Cases/Menu.php index 5d8fcee0..4ab86999 100644 --- a/modules/Cases/Menu.php +++ b/modules/Cases/Menu.php @@ -44,7 +44,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ global $mod_strings,$app_strings; -if(ACLController::checkAccess('Cases', 'edit', true)) +if(ACLController::checkAccess('Cases', 'view', true)) $module_menu [] = Array("index.php?module=Cases&action=EditView&return_module=Cases&return_action=DetailView", $mod_strings['LNK_NEW_CASE'],"CreateCases"); if(ACLController::checkAccess('Cases', 'list', true)) $module_menu [] = Array("index.php?module=Cases&action=index&return_module=Cases&return_action=DetailView", $mod_strings['LNK_CASE_LIST'],"Cases"); diff --git a/modules/Cases/language/en_us.lang.php b/modules/Cases/language/en_us.lang.php index 94f7ec00..5a42c1a7 100644 --- a/modules/Cases/language/en_us.lang.php +++ b/modules/Cases/language/en_us.lang.php @@ -71,7 +71,6 @@ $mod_strings = array ( 'LBL_NUMBER' => 'Number:', 'LBL_PRIORITY' => 'Priority:', 'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects', - 'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documents', 'LBL_RESOLUTION' => 'Resolution:', 'LBL_SEARCH_FORM_TITLE' => 'Case Search', 'LBL_STATUS' => 'Status:', diff --git a/modules/Cases/metadata/SearchFields.php b/modules/Cases/metadata/SearchFields.php index daf230eb..2329f77d 100644 --- a/modules/Cases/metadata/SearchFields.php +++ b/modules/Cases/metadata/SearchFields.php @@ -44,12 +44,5 @@ $searchFields['Cases'] = 'case_number' => array( 'query_type'=>'default', 'operator'=>'in'), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - 'open_only' => array( - 'query_type'=>'default', - 'db_field'=>array('status'), - 'operator'=>'not in', - 'closed_values' => array('Closed', 'Rejected', 'Duplicate'), - 'type'=>'bool', - ), ); ?> diff --git a/modules/Cases/metadata/detailviewdefs.php b/modules/Cases/metadata/detailviewdefs.php index 166ece85..5d10f3db 100644 --- a/modules/Cases/metadata/detailviewdefs.php +++ b/modules/Cases/metadata/detailviewdefs.php @@ -51,7 +51,7 @@ $viewdefs['Cases']['DetailView'] = array( array('name' => 'case_number', 'label' => 'LBL_CASE_NUMBER'), 'priority' ), - + array ( 'status', 'account_name', @@ -59,25 +59,25 @@ $viewdefs['Cases']['DetailView'] = array( array ( 'type', ), - + array ( - + array ( 'name' => 'name', 'label' => 'LBL_SUBJECT', ), ), - + array ( 'description', ), - + array ( 'resolution', ), - + ), - + 'LBL_PANEL_ASSIGNMENT' => array( array ( array ( @@ -95,7 +95,7 @@ $viewdefs['Cases']['DetailView'] = array( 'name' => 'date_entered', 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', ), - ), + ), ), ) diff --git a/modules/Cases/metadata/editviewdefs.php b/modules/Cases/metadata/editviewdefs.php index 7bfd5935..fc255be6 100644 --- a/modules/Cases/metadata/editviewdefs.php +++ b/modules/Cases/metadata/editviewdefs.php @@ -35,29 +35,29 @@ ********************************************************************************/ $viewdefs['Cases']['EditView'] = array( - 'templateMeta' => array('maxColumns' => '2', + 'templateMeta' => array('maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30') ), ), 'panels' => array ( - - 'lbl_case_information' => + + 'lbl_case_information' => array( array ( array('name'=>'case_number', 'type'=>'readonly') , ), - + array ( 'priority', ), - + array ( 'status', 'account_name', ), - + array ( 'type', ), @@ -67,33 +67,33 @@ $viewdefs['Cases']['EditView'] = array( 'displayParams' => array ('size'=>75) ), ), - + array ( - + array ( 'name' => 'description', 'nl2br' => true, ), ), - + array ( - + array ( 'name' => 'resolution', 'nl2br' => true, ), ), - + ), - - 'LBL_PANEL_ASSIGNMENT' => + + 'LBL_PANEL_ASSIGNMENT' => array( array ( - 'assigned_user_name', + 'assigned_user_name', ), ), ), - + ); ?> \ No newline at end of file diff --git a/modules/Cases/metadata/listviewdefs.php b/modules/Cases/metadata/listviewdefs.php index ac560ee7..f6fc03a0 100644 --- a/modules/Cases/metadata/listviewdefs.php +++ b/modules/Cases/metadata/listviewdefs.php @@ -45,12 +45,12 @@ $listViewDefs['Cases'] = array( 'label' => 'LBL_LIST_NUMBER', 'default' => true), 'NAME' => array( - 'width' => '25', + 'width' => '35', 'label' => 'LBL_LIST_SUBJECT', 'link' => true, 'default' => true), 'ACCOUNT_NAME' => array( - 'width' => '20', + 'width' => '25', 'label' => 'LBL_LIST_ACCOUNT_NAME', 'module' => 'Accounts', 'id' => 'ACCOUNT_ID', @@ -59,22 +59,18 @@ $listViewDefs['Cases'] = array( 'ACLTag' => 'ACCOUNT', 'related_fields' => array('account_id')), 'PRIORITY' => array( - 'width' => '10', + 'width' => '8', 'label' => 'LBL_LIST_PRIORITY', 'default' => true), 'STATUS' => array( - 'width' => '10', + 'width' => '8', 'label' => 'LBL_LIST_STATUS', 'default' => true), 'ASSIGNED_USER_NAME' => array( - 'width' => '10', + 'width' => '5', 'label' => 'LBL_ASSIGNED_TO_NAME', 'module' => 'Employees', 'id' => 'ASSIGNED_USER_ID', - 'default' => true), - 'DATE_ENTERED' => array ( - 'width' => '10', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true), + 'default' => true) ); ?> diff --git a/modules/Cases/metadata/searchdefs.php b/modules/Cases/metadata/searchdefs.php index a6937ea0..e8ab8ea9 100644 --- a/modules/Cases/metadata/searchdefs.php +++ b/modules/Cases/metadata/searchdefs.php @@ -36,7 +36,7 @@ $searchdefs['Cases'] = array( 'templateMeta' => array( - 'maxColumns' => '4', + 'maxColumns' => '3', 'widths' => array('label' => '10', 'field' => '30'), ), 'layout' => array( @@ -44,8 +44,6 @@ 'name', array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), - ), 'advanced_search' => array( 'case_number', diff --git a/modules/Cases/metadata/subpaneldefs.php b/modules/Cases/metadata/subpaneldefs.php index 8f0dc52f..6b7d56ef 100644 --- a/modules/Cases/metadata/subpaneldefs.php +++ b/modules/Cases/metadata/subpaneldefs.php @@ -137,27 +137,6 @@ $layout_defs['Cases'] = array( ), ) ), - 'documents' => array( - 'order' => 25, - 'module' => 'Documents', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'documents', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), 'bugs' => array( 'order' => 40, 'module' => 'Bugs', diff --git a/modules/Cases/vardefs.php b/modules/Cases/vardefs.php index 716a94e9..9a056c39 100644 --- a/modules/Cases/vardefs.php +++ b/modules/Cases/vardefs.php @@ -36,7 +36,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -$dictionary['Case'] = array('table' => 'cases','audited'=>true, 'unified_search' => true, 'unified_search_default_enabled' => true, 'duplicate_merge'=>true, +$dictionary['Case'] = array('table' => 'cases','audited'=>true, 'unified_search' => true,'duplicate_merge'=>true, 'comment' => 'Cases are issues or problems that a customer asks a support representative to resolve' ,'fields' => array ( @@ -149,14 +149,6 @@ $dictionary['Case'] = array('table' => 'cases','audited'=>true, 'unified_search' 'source'=>'non-db', 'vname'=>'LBL_EMAILS', ), - 'documents'=> - array ( - 'name' => 'documents', - 'type' => 'link', - 'relationship' => 'documents_cases', - 'source' => 'non-db', - 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - ), 'calls' => array ( 'name' => 'calls', diff --git a/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.en_us.lang.php b/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.en_us.lang.php index f860da2c..52aee86f 100644 --- a/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.en_us.lang.php +++ b/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.en_us.lang.php @@ -42,4 +42,5 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dashletStrings['CampaignROIChartDashlet'] = array('LBL_TITLE' => 'Campaign ROI', 'LBL_DESCRIPTION' => 'ROI Chart', 'LBL_REFRESH' => 'Refresh Chart'); -?> \ No newline at end of file +?> + diff --git a/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php b/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php index 5384dfcc..613f8c36 100644 --- a/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php +++ b/modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php @@ -45,9 +45,6 @@ class CampaignROIChartDashlet extends DashletGenericChart { public $campaign_id; - /** - * @see DashletGenericChart::$_seedName - */ protected $_seedName = 'Campaigns'; /** @@ -80,8 +77,11 @@ class CampaignROIChartDashlet extends DashletGenericChart $GLOBALS['app_list_strings']['roi_type_dom'], $this->campaign_id[0],null,true,true,true,$this->id); - $returnStr = $chartStr; + $returnStr = '' . $chartStr; - return $this->getTitle('
    ') . '
    ' . $returnStr . '
    '. $this->processAutoRefresh(); - } -} \ No newline at end of file + return $this->getTitle('
    ') . '
    ' . $returnStr . '

    '; + } + +} + +?> \ No newline at end of file diff --git a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php index 64f0e92e..d4298e6c 100644 --- a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php +++ b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php @@ -42,4 +42,5 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dashletStrings['MyPipelineBySalesStageDashlet'] = array('LBL_TITLE' => 'My Pipeline By Sales Stage', 'LBL_DESCRIPTION' => 'Vertical Bar Chart of My Sales Stage Pipeline', 'LBL_REFRESH' => 'Refresh Chart'); -?> \ No newline at end of file +?> + diff --git a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php index 17977adf..bec1d165 100644 --- a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php +++ b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php @@ -41,31 +41,31 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/Dashlets/DashletGenericChart.php'); -class MyPipelineBySalesStageDashlet extends DashletGenericChart +class MyPipelineBySalesStageDashlet extends DashletGenericChart { public $mypbss_date_start; public $mypbss_date_end; public $mypbss_sales_stages = array(); - + protected $_seedName = 'Opportunities'; - + /** * @see DashletGenericChart::__construct() */ public function __construct( - $id, + $id, array $options = null - ) + ) { global $timedate; - - if(empty($options['mypbss_date_start'])) - $options['mypbss_date_start'] = $timedate->nowDbDate(); + + if(empty($options['mypbss_date_start'])) + $options['mypbss_date_start'] = date($timedate->get_db_date_time_format(), time()); if(empty($options['mypbss_date_end'])) - $options['mypbss_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months")); - if(empty($options['title'])) + $options['mypbss_date_end'] = date($timedate->get_db_date_time_format(), strtotime("+6 months", time())); + if(empty($options['title'])) $options['title'] = translate('LBL_MY_PIPELINE_FORM_TITLE', 'Home'); - + parent::__construct($id,$options); } @@ -75,66 +75,66 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart public function displayOptions() { global $app_list_strings; - + $selected_datax = array(); if (count($this->mypbss_sales_stages) > 0) foreach ($this->mypbss_sales_stages as $key) $selected_datax[] = $key; - else + else $selected_datax = array_keys($app_list_strings['sales_stage_dom']); - + $this->_searchFields['mypbss_sales_stages']['options'] = $app_list_strings['sales_stage_dom']; $this->_searchFields['mypbss_sales_stages']['input_name0'] = $selected_datax; - + return parent::displayOptions(); } - + /** * @see DashletGenericChart::display() */ - public function display() + public function display() { global $sugar_config, $current_user; - - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); + + require_once('include/SugarCharts/SugarChart.php'); + $sugarChart = new SugarChart(); $sugarChart->base_url = array( 'module' => 'Opportunities', 'action' => 'index', 'query' => 'true', 'searchFormTab' => 'advanced_search', ); - $sugarChart->url_params = array( 'assigned_user_id' => $current_user->id ); + $sugarChart->url_params = array( 'assigned_user_id' => $current_user->id ); $sugarChart->group_by = $this->constructGroupBy(); - + $currency_symbol = $sugar_config['default_currency_symbol']; if ($current_user->getPreference('currency')){ - + $currency = new Currency(); $currency->retrieve($current_user->getPreference('currency')); $currency_symbol = $currency->symbol; - } - + } + $sugarChart->is_currency = true; $sugarChart->thousands_symbol = translate('LBL_OPP_THOUSANDS', 'Charts'); - + $subtitle = translate('LBL_OPP_SIZE', 'Charts') . " " . $currency_symbol . "1" . translate('LBL_OPP_THOUSANDS', 'Charts'); - + $query = $this->constructQuery(); $dataset = $this->constructCEChartData($this->getChartData($query)); $sugarChart->setData($dataset); - $total = format_number($this->getHorizBarTotal($dataset), 0, 0, array('convert'=>true)); + $total = format_number($this->getHorizBarTotal($dataset), 0, 0, array('convert'=>true)); $pipeline_total_string = translate('LBL_TOTAL_PIPELINE', 'Charts') . $sugarChart->currency_symbol . $total . $sugarChart->thousands_symbol; $sugarChart->setProperties($pipeline_total_string, $subtitle, 'horizontal bar chart'); - + $xmlFile = $sugarChart->getXMLFileName($this->id); $sugarChart->saveXMLFile($xmlFile, $sugarChart->generateXML()); return $this->getTitle('') . - '
    ' .$sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '

    '. $this->processAutoRefresh(); + '
    ' .$sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '

    '; } /** - * awu: Bug 16794 - this function is a hack to get the correct sales stage order + * awu: Bug 16794 - this function is a hack to get the correct sales stage order * until i can clean it up later * * @param $query string @@ -145,14 +145,14 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart ) { global $app_list_strings, $db; - + $data = array(); $temp_data = array(); $selected_datax = array(); - + $user_sales_stage = $this->mypbss_sales_stages; $tempx = $user_sales_stage; - + //set $datax using selected sales stage keys if (count($tempx) > 0) { foreach ($tempx as $key) { @@ -164,16 +164,16 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart $datax = $app_list_strings['sales_stage_dom']; $selected_datax = array_keys($app_list_strings['sales_stage_dom']); } - + $result = $db->query($query); $row = $db->fetchByAssoc($result, -1, false); - + while($row != null){ $temp_data[] = $row; $row = $db->fetchByAssoc($result, -1, false); } - // reorder and set the array based on the order of selected_datax + // reorder and set the array based on the order of selected_datax foreach($selected_datax as $sales_stage){ foreach($temp_data as $key => $value){ if ($value['sales_stage'] == $sales_stage){ @@ -187,7 +187,7 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart } return $data; } - + /** * @param $dataset array * @return int @@ -200,10 +200,10 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart foreach($dataset as $value){ $total += $value; } - + return $total; } - + /** * @param $dataset array * @return array @@ -216,13 +216,13 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart foreach($dataset as $key=>$value){ $newData[$value['sales_stage']] = $value['total']; } - return $newData; + return $newData; } - + /** * @see DashletGenericChart::constructQuery() */ - protected function constructQuery() + protected function constructQuery() { $query = "SELECT opportunities.sales_stage, users.user_name, @@ -240,16 +240,16 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart return $query; } - + /** * @see DashletGenericChart::constructGroupBy() */ protected function constructGroupBy() { $groupBy = array('sales_stage'); - + array_push($groupBy, 'user_name'); - return $groupBy; + return $groupBy; } } diff --git a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeConfigure.tpl b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeConfigure.tpl similarity index 100% rename from modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeConfigure.tpl rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeConfigure.tpl diff --git a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.data.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php similarity index 96% rename from modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.data.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php index 2ae7d316..cd4b174d 100644 --- a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.data.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php @@ -38,7 +38,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -$dashletData['OppByLeadOutcomeDashlet']['searchFields'] = array( +$dashletData['OpportunitiesByLeadSourceByOutcomeDashlet']['searchFields'] = array( 'lsbo_lead_sources' => array( 'name' => 'lsbo_lead_sources', 'vname' => 'LBL_LEAD_SOURCES', diff --git a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.en_us.lang.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.en_us.lang.php similarity index 94% rename from modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.en_us.lang.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.en_us.lang.php index 82704a0a..3b7dc51c 100644 --- a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.en_us.lang.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.en_us.lang.php @@ -39,7 +39,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -$dashletStrings['OppByLeadOutcomeDashlet'] = array('LBL_TITLE' => 'All Opportunities By Lead Source By Outcome', +$dashletStrings['OpportunitiesByLeadSourceByOutcomeDashlet'] = array('LBL_TITLE' => 'All Opportunities By Lead Source By Outcome', 'LBL_DESCRIPTION' => 'Horizontal stacked chart of Opportunities By Lead Source By Outcome', 'LBL_REFRESH' => 'Refresh Chart'); -?> \ No newline at end of file +?> + diff --git a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.meta.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.meta.php similarity index 96% rename from modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.meta.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.meta.php index 64ee24fd..7676837a 100644 --- a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.meta.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.meta.php @@ -40,7 +40,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); global $app_strings, $current_language; -$dashletMeta['OppByLeadOutcomeDashlet'] = array('title' => 'LBL_TITLE', +$dashletMeta['OpportunitiesByLeadSourceByOutcomeDashlet'] = array('title' => 'LBL_TITLE', 'description' => 'LBL_TITLE', 'icon' => 'icon_Charts_Horizontal_32.gif', 'module' => 'Opportunities', diff --git a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php similarity index 91% rename from modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php index ee07b5a2..b16036c1 100644 --- a/modules/Charts/Dashlets/OppByLeadOutcomeDashlet/OppByLeadOutcomeDashlet.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php @@ -40,19 +40,13 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/Dashlets/DashletGenericChart.php'); -class OppByLeadOutcomeDashlet extends DashletGenericChart +class OpportunitiesByLeadSourceByOutcomeDashlet extends DashletGenericChart { public $lsbo_lead_sources = array(); public $lsbo_ids = array(); - /** - * @see DashletGenericChart::$_seedName - */ protected $_seedName = 'Opportunities'; - /** - * @see DashletGenericChart::displayOptions() - */ public function displayOptions() { global $app_list_strings; @@ -73,17 +67,14 @@ class OppByLeadOutcomeDashlet extends DashletGenericChart return parent::displayOptions(); } - /** - * @see DashletGenericChart::display() - */ public function display() { global $current_user, $sugar_config; require("modules/Charts/chartdefs.php"); $chartDef = $chartDefs['lead_source_by_outcome']; - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); + require_once('include/SugarCharts/SugarChart.php'); + $sugarChart = new SugarChart(); $sugarChart->is_currency = true; $currency_symbol = $sugar_config['default_currency_symbol']; if ($current_user->getPreference('currency')){ @@ -105,12 +96,9 @@ class OppByLeadOutcomeDashlet extends DashletGenericChart $sugarChart->saveXMLFile($xmlFile, $sugarChart->generateXML()); return $this->getTitle('
    ') . - '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '
    '. $this->processAutoRefresh(); + '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '

    '; } - /** - * @see DashletGenericChart::constructQuery() - */ protected function constuctQuery() { $query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total, ". @@ -126,4 +114,6 @@ class OppByLeadOutcomeDashlet extends DashletGenericChart return $query; } -} \ No newline at end of file +} + +?> \ No newline at end of file diff --git a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceConfigure.tpl b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceConfigure.tpl similarity index 100% rename from modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceConfigure.tpl rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceConfigure.tpl diff --git a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.data.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.data.php similarity index 97% rename from modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.data.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.data.php index fbcda4d0..f4bb1768 100644 --- a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.data.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.data.php @@ -38,7 +38,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -$dashletData['OppByLeadSourceDashlet']['searchFields'] = array( +$dashletData['OpportunitiesByLeadSourceDashlet']['searchFields'] = array( 'pbls_lead_sources' => array( 'name' => 'pbls_lead_sources', 'vname' => 'LBL_LEAD_SOURCES', diff --git a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.en_us.lang.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.en_us.lang.php similarity index 94% rename from modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.en_us.lang.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.en_us.lang.php index 80e0c586..b845a644 100644 --- a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.en_us.lang.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.en_us.lang.php @@ -39,7 +39,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -$dashletStrings['OppByLeadSourceDashlet'] = array('LBL_TITLE' => 'All Opportunities by Lead Source', +$dashletStrings['OpportunitiesByLeadSourceDashlet'] = array('LBL_TITLE' => 'All Opportunities by Lead Source', 'LBL_DESCRIPTION' => 'Pie Chart of Opportunities by Lead Source', 'LBL_REFRESH' => 'Refresh Chart'); -?> \ No newline at end of file +?> + diff --git a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.meta.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.meta.php similarity index 96% rename from modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.meta.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.meta.php index 85acd77a..d009adb9 100644 --- a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.meta.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.meta.php @@ -40,7 +40,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); global $app_strings, $current_language; -$dashletMeta['OppByLeadSourceDashlet'] = array('title' => 'LBL_TITLE', +$dashletMeta['OpportunitiesByLeadSourceDashlet'] = array('title' => 'LBL_TITLE', 'description' => 'LBL_TITLE', 'icon' => 'icon_Charts_Pie_32.gif', 'module' => 'Opportunities', diff --git a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php similarity index 91% rename from modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.php rename to modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php index 8af9578e..9faadc3b 100644 --- a/modules/Charts/Dashlets/OppByLeadSourceDashlet/OppByLeadSourceDashlet.php +++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php @@ -41,19 +41,13 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/Dashlets/DashletGenericChart.php'); -class OppByLeadSourceDashlet extends DashletGenericChart +class OpportunitiesByLeadSourceDashlet extends DashletGenericChart { public $pbls_lead_sources = array(); public $pbls_ids = array(); - /** - * @see DashletGenericChart::$_seedName - */ protected $_seedName = 'Opportunities'; - /** - * @see DashletGenericChart::displayOptions() - */ public function displayOptions() { global $app_list_strings; @@ -74,17 +68,14 @@ class OppByLeadSourceDashlet extends DashletGenericChart return parent::displayOptions(); } - /** - * @see DashletGenericChart::display() - */ public function display() { global $current_user, $sugar_config; require("modules/Charts/chartdefs.php"); $chartDef = $chartDefs['pipeline_by_lead_source']; - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); + require_once('include/SugarCharts/SugarChart.php'); + $sugarChart = new SugarChart(); $sugarChart->is_currency = true; $currency_symbol = $sugar_config['default_currency_symbol']; if ($current_user->getPreference('currency')){ @@ -106,12 +97,9 @@ class OppByLeadSourceDashlet extends DashletGenericChart $sugarChart->saveXMLFile($xmlFile, $sugarChart->generateXML()); return $this->getTitle('
    ') . - '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '
    '. $this->processAutoRefresh(); + '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '

    '; } - /** - * @see DashletGenericChart::constructQuery() - */ protected function constructQuery() { $query = "SELECT lead_source,sum(amount_usdollar/1000) as total,count(*) as opp_count ". @@ -127,4 +115,7 @@ class OppByLeadSourceDashlet extends DashletGenericChart return $query; } -} \ No newline at end of file + +} + +?> \ No newline at end of file diff --git a/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.en_us.lang.php b/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.en_us.lang.php index e2b809c8..0517fdcf 100644 --- a/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.en_us.lang.php +++ b/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.en_us.lang.php @@ -42,4 +42,5 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dashletStrings['OutcomeByMonthDashlet'] = array('LBL_TITLE' => 'Outcome by Month', 'LBL_DESCRIPTION' => 'Chart of the Monthly Outcomes', 'LBL_REFRESH' => 'Refresh Chart'); -?> \ No newline at end of file +?> + diff --git a/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php b/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php index 8283c7b3..7fefaf27 100644 --- a/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php +++ b/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php @@ -41,36 +41,33 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/Dashlets/DashletGenericChart.php'); -class OutcomeByMonthDashlet extends DashletGenericChart +class OutcomeByMonthDashlet extends DashletGenericChart { public $obm_ids = array(); public $obm_date_start; public $obm_date_end; - /** - * @see DashletGenericChart::$_seedName - */ protected $_seedName = 'Opportunities'; - + /** * @see DashletGenericChart::__construct() */ public function __construct( - $id, + $id, array $options = null - ) + ) { global $timedate; - - if(empty($options['obm_date_start'])) - $options['obm_date_start'] = $timedate->nowDbDate(); - + + if(empty($options['obm_date_start'])) + $options['obm_date_start'] = date($timedate->get_db_date_time_format(), time()); + if(empty($options['obm_date_end'])) - $options['obm_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months")); - + $options['obm_date_end'] = date($timedate->get_db_date_time_format(), strtotime("+6 months", time())); + parent::__construct($id,$options); } - + /** * @see DashletGenericChart::displayOptions() */ @@ -78,18 +75,18 @@ class OutcomeByMonthDashlet extends DashletGenericChart { if (!isset($this->obm_ids) || count($this->obm_ids) == 0) $this->_searchFields['obm_ids']['input_name0'] = array_keys(get_user_array(false)); - + return parent::displayOptions(); } - + /** * @see DashletGenericChart::display() */ - public function display() + public function display() { $currency_symbol = $GLOBALS['sugar_config']['default_currency_symbol']; if ($GLOBALS['current_user']->getPreference('currency')){ - + $currency = new Currency(); $currency->retrieve($GLOBALS['current_user']->getPreference('currency')); $currency_symbol = $currency->symbol; @@ -97,11 +94,11 @@ class OutcomeByMonthDashlet extends DashletGenericChart require("modules/Charts/chartdefs.php"); $chartDef = $chartDefs['outcome_by_month']; - - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); - $sugarChart->setProperties('', - translate('LBL_OPP_SIZE', 'Charts') . ' ' . $currency_symbol . '1' .translate('LBL_OPP_THOUSANDS', 'Charts'), + + require_once('include/SugarCharts/SugarChart.php'); + $sugarChart = new SugarChart(); + $sugarChart->setProperties('', + translate('LBL_OPP_SIZE', 'Charts') . ' ' . $currency_symbol . '1' .translate('LBL_OPP_THOUSANDS', 'Charts'), $chartDef['chartType']); $sugarChart->base_url = $chartDef['base_url']; $sugarChart->group_by = $chartDef['groupBy']; @@ -113,9 +110,9 @@ class OutcomeByMonthDashlet extends DashletGenericChart $sugarChart->saveXMLFile($xmlFile, $sugarChart->generateXML()); return $this->getTitle('
    ') . - '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '
    '. $this->processAutoRefresh(); + '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '

    '; } - + /** * @see DashletGenericChart::constructQuery() */ @@ -125,14 +122,16 @@ class OutcomeByMonthDashlet extends DashletGenericChart db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))." as m, ". "sum(amount_usdollar/1000) as total, count(*) as opp_count FROM opportunities "; $query .= " WHERE opportunities.date_closed >= ".db_convert("'".$this->obm_date_start."'",'datetime') . - " AND opportunities.date_closed <= ".db_convert("'".$this->obm_date_end."'",'datetime') . + " AND opportunities.date_closed <= ".db_convert("'".$this->obm_date_end."'",'datetime') . " AND opportunities.deleted=0"; if (count($this->obm_ids) > 0) $query .= " AND opportunities.assigned_user_id IN ('" . implode("','",$this->obm_ids) . "')"; $query .= " GROUP BY sales_stage,". db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'")) . " ORDER BY m"; - + return $query; } -} \ No newline at end of file +} + +?> \ No newline at end of file diff --git a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php index d21b5cf6..5f1668db 100644 --- a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php +++ b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php @@ -42,4 +42,5 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dashletStrings['PipelineBySalesStageDashlet'] = array('LBL_TITLE' => 'Pipeline By Sales Stage', 'LBL_DESCRIPTION' => 'Vertical Bar Chart of Sales Stage Pipeline', 'LBL_REFRESH' => 'Refresh Chart'); -?> \ No newline at end of file +?> + diff --git a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php index 5524020c..375c715d 100644 --- a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php +++ b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php @@ -47,9 +47,6 @@ class PipelineBySalesStageDashlet extends DashletGenericChart public $pbss_date_end; public $pbss_sales_stages = array(); - /** - * @see DashletGenericChart::$_seedName - */ protected $_seedName = 'Opportunities'; /** @@ -100,8 +97,8 @@ class PipelineBySalesStageDashlet extends DashletGenericChart { global $current_user, $sugar_config; - require_once('include/SugarCharts/SugarChartFactory.php'); - $sugarChart = SugarChartFactory::getInstance(); + require_once('include/SugarCharts/SugarChart.php'); + $sugarChart = new SugarChart(); $sugarChart->base_url = array( 'module' => 'Opportunities', 'action' => 'index', @@ -129,7 +126,7 @@ class PipelineBySalesStageDashlet extends DashletGenericChart $xmlFile = $sugarChart->getXMLFileName($this->id); $sugarChart->saveXMLFile($xmlFile, $sugarChart->generateXML()); - return $this->getTitle('') . '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '
    '. $this->processAutoRefresh(); + return $this->getTitle('') . '
    ' . $sugarChart->display($this->id, $xmlFile, '100%', '480', false) . '

    '; } /** @@ -215,3 +212,5 @@ class PipelineBySalesStageDashlet extends DashletGenericChart ); } } + +?> diff --git a/modules/Charts/Dashlets/PredefinedChartDashletScript.tpl b/modules/Charts/Dashlets/PredefinedChartDashletScript.tpl index fb30f45a..d6f76dca 100644 --- a/modules/Charts/Dashlets/PredefinedChartDashletScript.tpl +++ b/modules/Charts/Dashlets/PredefinedChartDashletScript.tpl @@ -41,5 +41,5 @@ *} diff --git a/modules/Charts/PredefinedChart.php b/modules/Charts/PredefinedChart.php index c4d2a004..49076a06 100644 --- a/modules/Charts/PredefinedChart.php +++ b/modules/Charts/PredefinedChart.php @@ -1,5 +1,5 @@ getPreference('pbss_date_start'); - + if (!empty($user_date_start) && !isset($_REQUEST['pbss_date_start'])) { $date_start = $timedate->to_display_date($user_date_start, false); $GLOBALS['log']->debug("USER PREFERENCES['pbss_date_start'] is:"); @@ -95,9 +95,9 @@ class PredefinedChart{ $GLOBALS['log']->debug($current_user->getPreference('pbss_date_start')); } else { - $date_start = $timedate->nowDate(); + $date_start = date($timedate->get_date_format(), time()); } - + $user_date_end = $current_user->getPreference('pbss_date_end'); if (!empty($user_date_end) && !isset($_REQUEST['pbss_date_end'])) { $date_end = $timedate->to_display_date($user_date_end, false); @@ -114,10 +114,10 @@ class PredefinedChart{ $GLOBALS['log']->debug( $current_user->getPreference('pbss_date_end')); } else { - $date_end = $timedate->asUserDate($timedate->fromString("2010-01-01")); + $date_end = date($timedate->get_date_format(), strtotime('2010-01-01')); $GLOBALS['log']->debug("USER PREFERENCES['pbss_date_end'] not found. Using: ".$date_end); } - + $tempx = array(); $datax = array(); $datax_selected= array(); @@ -136,7 +136,7 @@ class PredefinedChart{ $GLOBALS['log']->debug("USER PREFERENCES['pbss_sales_stages'] is:"); $GLOBALS['log']->debug($current_user->getPreference('pbss_sales_stages')); } - + //set $datax using selected sales stage keys if (count($tempx) > 0) { foreach ($tempx as $key) { @@ -150,14 +150,14 @@ class PredefinedChart{ } $GLOBALS['log']->debug("datax is:"); $GLOBALS['log']->debug($datax); - + $ids = array(); $new_ids = array(); $user_ids = $current_user->getPreference('pbss_ids'); //get list of user ids for which to display data if (!empty($user_ids) && count($user_ids) != 0 && !isset($_REQUEST['pbss_ids'])) { $ids = $user_ids; - + $GLOBALS['log']->debug("USER PREFERENCES['pbss_ids'] is:"); $GLOBALS['log']->debug($user_ids); } @@ -172,8 +172,8 @@ class PredefinedChart{ else { $ids = get_user_array(false); $ids = array_keys($ids); - - } + + } $user_id = $ids; $opp = new Opportunity; @@ -206,9 +206,9 @@ class PredefinedChart{ } $date_start = $timedate->swap_formats($date_start, $timedate->get_date_format(), $timedate->dbDayFormat); - $date_end = $timedate->swap_formats($date_end, $timedate->get_date_format(), $timedate->dbDayFormat); + $date_end = $timedate->swap_formats($date_end, $timedate->get_date_format(), $timedate->dbDayFormat); //build the where clause for the query that matches $date_start and $date_end - $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " + $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date') ; $where .= " AND opportunities.assigned_user_id = users.id AND opportunities.deleted=0 "; @@ -222,17 +222,17 @@ class PredefinedChart{ FROM users,opportunities "; $query .= "WHERE " .$where; $query .= " GROUP BY opportunities.sales_stage"; - + $additional_params = array( 'date_start' => $date_start, 'date_closed' => $date_end, ); - + $this->params = $additional_params; return $query; } - + function leadSourceByOutcomeQuery($filters){ - - + + global $current_user; global $app_list_strings; @@ -264,10 +264,10 @@ class PredefinedChart{ else { $datax = $app_list_strings['lead_source_dom']; $selected_datax = array_keys($app_list_strings['lead_source_dom']); - } - + } + $datay = $datax; - + $ids = $filters['lsbo_ids']; //get list of user ids for which to display data if (!empty($ids) && count($ids) != 0 && !isset($_REQUEST['lsbo_ids'])) { @@ -288,7 +288,7 @@ class PredefinedChart{ } $user_id = $ids; - + $opp = new Opportunity(); $where=""; //build the where clause for the query that matches $user @@ -317,13 +317,13 @@ class PredefinedChart{ $query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total,count(*) as opp_count FROM opportunities "; $query .= "WHERE " .$where." AND opportunities.deleted=0 "; $query .= " GROUP BY sales_stage,lead_source ORDER BY lead_source,sales_stage"; - + return $query; } - + function outcomeByMonthQuery(){ - - + + global $current_user; global $timedate; @@ -361,7 +361,7 @@ class PredefinedChart{ else { $date_end = date('Y').'-12-31'; } - + $ids = array(); //get list of user ids for which to display data $user_ids = $current_user->getPreference('obm_ids'); @@ -382,9 +382,9 @@ class PredefinedChart{ $ids = get_user_array(false); $ids = array_keys($ids); } - + $user_id = $ids; - + $where = ""; //build the where clause for the query that matches $user $count = count($user_id); @@ -399,28 +399,28 @@ class PredefinedChart{ } // cn: adding user-pref date handling - $dateStartDisplay = $timedate->asUserDate($timedate->fromString($date_start)); - $dateEndDisplay = $timedate->asUserDate($timedate->fromString($date_end)); + $dateStartDisplay = date($timedate->get_date_format(), strtotime($date_start)); + $dateEndDisplay = date($timedate->get_date_format(), strtotime($date_end)); $opp = new Opportunity(); //build the where clause for the query that matches $date_start and $date_end $where .= "AND opportunities.date_closed >= ".db_convert("'".$date_start."'",'date')." AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date')." AND opportunities.deleted=0"; $query = "SELECT sales_stage,".db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))." as m, sum(amount_usdollar/1000) as total, count(*) as opp_count FROM opportunities "; $query .= "WHERE ".$where; - $query .= " GROUP BY sales_stage,".db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))."ORDER BY m"; + $query .= " GROUP BY sales_stage,".db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))."ORDER BY m"; return $query; } - + function pipelineByLeadSourceQuery($filters){ - - + + global $current_user; global $app_list_strings; - + $tempx = array(); $datax = array(); $selected_datax = array(); - + //get list of sales stage keys to display $user_tempx = $filters['pbls_lead_sources']; if (!empty($user_tempx) && count($user_tempx) > 0 && !isset($_REQUEST['pbls_lead_sources'])) { @@ -436,7 +436,7 @@ class PredefinedChart{ $GLOBALS['log']->debug("USER PREFERENCES['pbls_lead_sources'] is:"); $GLOBALS['log']->debug($current_user->getPreference('pbls_lead_sources')); } - + //set $datax using selected sales stage keys if (count($tempx) > 0) { foreach ($tempx as $key) { @@ -448,9 +448,9 @@ class PredefinedChart{ $datax = $app_list_strings['lead_source_dom']; $selected_datax = array_keys($app_list_strings['lead_source_dom']); } - + $legends = $datax; - + $ids = array(); $user_ids = $filters['pbls_ids']; //get list of user ids for which to display data @@ -461,7 +461,7 @@ class PredefinedChart{ $ids = get_user_array(false); $ids = array_keys($ids); } - + $user_id = $ids; $opp = new Opportunity; //Now do the db queries @@ -495,29 +495,29 @@ class PredefinedChart{ $query .= "WHERE ".$where." AND opportunities.deleted=0 "; $query .= "GROUP BY lead_source ORDER BY total DESC"; - return $query; - } - + return $query; + } + function myModuleUsageLast30Days() { global $current_user; - $dateValue = db_convert("'".$timedate->getNow()->modify("-30 days")->asDb()."'" ,"datetime"); + $dateValue = db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime("- 30 days"))."'" ,"datetime"); $query = "SELECT tracker.module_name as module_name "; $query .= ",COUNT(*) count FROM tracker "; $query .= "WHERE tracker.user_id = '$current_user->id' AND tracker.module_name != 'UserPreferences' AND tracker.date_modified > $dateValue "; $query .= "GROUP BY tracker.module_name ORDER BY count DESC"; - return $query; + return $query; } - - + + // This function will grab a query from the custom directory to be used for charting function customChartQuery($chart){ if (file_exists('custom/Charts/' . $chart . '.php')){ - require_once('custom/Charts/' . $chart . '.php'); + require_once('custom/Charts/' . $chart . '.php'); return customChartQuery(); } - else return false; + else return false; } } diff --git a/modules/Charts/code/Chart_lead_source_by_outcome.php b/modules/Charts/code/Chart_lead_source_by_outcome.php index 28bfcd70..4dc4a9ad 100644 --- a/modules/Charts/code/Chart_lead_source_by_outcome.php +++ b/modules/Charts/code/Chart_lead_source_by_outcome.php @@ -50,7 +50,7 @@ require_once('include/charts/Charts.php'); class Chart_lead_source_by_outcome { - var $modules = array('Opportunities'); + var $modules = array('Opportunities'); var $order = 0; function Chart_lead_source_by_outcome() { @@ -186,7 +186,7 @@ echo "

    ".$current_module_strings['L if (file_exists($sugar_config['tmp_dir'].$cache_file_name)) { global $timedate; - $file_date = $timedate->asUser($timedate->fromTimestamp(filemtime($sugar_config['tmp_dir'].$cache_file_name))); + $file_date = date($timedate->get_date_format()." ".$timedate->get_time_format(), filemtime($sugar_config['tmp_dir'].$cache_file_name)); } else { $file_date = ''; @@ -214,9 +214,9 @@ global $timedate; */ function gen_xml($datay=array('foo','bar'), $user_id=array('1'), $cache_file_name='a_file', $refresh=false,$current_module_strings) { global $app_strings, $charset, $lang, $barChartColors,$app_list_strings, $current_user; - + $kDelim = $current_user->getPreference('num_grp_sep'); - + if (!file_exists($cache_file_name) || $refresh == true) { $GLOBALS['log']->debug("datay is:"); $GLOBALS['log']->debug($datay); @@ -253,7 +253,7 @@ global $timedate; $query .= " GROUP BY sales_stage,lead_source ORDER BY lead_source,sales_stage"; //Now do the db queries //query for opportunity data that matches $datay and $user - + $result = $opp->db->query($query) or sugar_die("Error selecting sugarbean: ".mysql_error()); //build pipeline by sales stage data @@ -267,7 +267,7 @@ global $timedate; global $current_user; $salesStages = array("Closed Lost"=>$app_list_strings['sales_stage_dom']["Closed Lost"],"Closed Won"=>$app_list_strings['sales_stage_dom']["Closed Won"],"Other"=>$other); if($current_user->getPreference('currency') ){ - + $currency = new Currency(); $currency->retrieve($current_user->getPreference('currency')); $div = $currency->conversion_rate; @@ -350,8 +350,8 @@ global $timedate; $return = create_chart('hBarF',$cache_file_name); return $return; } - - + + function constructQuery(){ global $current_user; global $app_list_strings; @@ -360,7 +360,7 @@ global $timedate; $datax = array(); $selected_datax = array(); //get list of sales stage keys to display - + $tempx = $current_user->getPreference('lsbo_lead_sources'); if (!empty($lsbo_lead_sources) && count($lsbo_lead_sources) > 0 && !isset($_REQUEST['lsbo_lead_sources'])) { $GLOBALS['log']->fatal("user->getPreference('lsbo_lead_sources') is:"); @@ -384,10 +384,10 @@ global $timedate; else { $datax = $app_list_strings['lead_source_dom']; $selected_datax = array_keys($app_list_strings['lead_source_dom']); - } - + } + $datay = $datax; - + $ids =$current_user->getPreference('lsbo_ids'); //get list of user ids for which to display data if (!empty($ids) && count($ids) != 0 && !isset($_REQUEST['lsbo_ids'])) { @@ -408,7 +408,7 @@ global $timedate; } $user_id = $ids; - + $opp = new Opportunity(); $where=""; //build the where clause for the query that matches $user @@ -437,10 +437,10 @@ global $timedate; $query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total,count(*) as opp_count FROM opportunities "; $query .= "WHERE " .$where." AND opportunities.deleted=0 "; $query .= " GROUP BY sales_stage,lead_source ORDER BY lead_source,sales_stage"; - + return $query; } - + function constructGroupBy(){ return array( 'lead_source', 'sales_stage' ); } diff --git a/modules/Charts/code/Chart_my_pipeline_by_sales_stage.php b/modules/Charts/code/Chart_my_pipeline_by_sales_stage.php index 9a663962..248c6fc6 100644 --- a/modules/Charts/code/Chart_my_pipeline_by_sales_stage.php +++ b/modules/Charts/code/Chart_my_pipeline_by_sales_stage.php @@ -74,7 +74,7 @@ elseif (isset($_REQUEST['mypbss_date_start']) && $_REQUEST['mypbss_date_start'] $GLOBALS['log']->debug($current_user->getPreference('mypbss_date_start')); } else { - $date_start = $timedate->nowDate(); + $date_start = date($timedate->get_date_format(), time()); } $user_date_end = $current_user->getPreference('mypbss_date_end'); @@ -92,7 +92,7 @@ elseif (isset($_REQUEST['mypbss_date_end']) && $_REQUEST['mypbss_date_end'] != ' $GLOBALS['log']->debug( $current_user->getPreference('mypbss_date_end')); } else { - $date_end = $timedate->asUserDate($timedate->fromString("2010-01-01")); + $date_end = date($timedate->get_date_format(), strtotime('2010-01-01')); $GLOBALS['log']->debug("USER PREFERENCES['mypbss_date_end'] not found. Using: ".$date_end); } @@ -215,7 +215,7 @@ echo "

    ".$current_module_strings['L if (file_exists($sugar_config['tmp_dir'].$cache_file_name)) { - $file_date = $timedate->asUser($timedate->fromTimestamp(filemtime($sugar_config['tmp_dir'].$cache_file_name))); + $file_date = date($timedate->get_date_format()." ".$timedate->get_time_format(), filemtime($sugar_config['tmp_dir'].$cache_file_name)); } else { $file_date = ''; @@ -238,7 +238,7 @@ echo get_validate_chart_js(); */ function gen_xml_pipeline_by_sales_stage($datax=array('foo','bar'), $date_start='2071-10-15', $date_end='2071-10-15', $user_id=array('1'), $cache_file_name='a_file', $refresh=false,$chart_size='hBarF',$current_module_strings) { global $app_strings, $charset, $lang, $barChartColors, $current_user; - + $kDelim = $current_user->getPreference('num_grp_sep'); global $timedate; @@ -280,7 +280,7 @@ echo get_validate_chart_js(); } //build the where clause for the query that matches $date_start and $date_end - $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " + $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date') ; $where .= " AND opportunities.assigned_user_id = users.id AND opportunities.deleted=0 "; @@ -294,7 +294,7 @@ echo get_validate_chart_js(); FROM users,opportunities "; $query .= "WHERE " .$where; $query .= " GROUP BY opportunities.sales_stage,users.user_name,opportunities.assigned_user_id"; - + $result = $opp->db->query($query) or sugar_die("Error selecting sugarbean: ".mysql_error()); //build pipeline by sales stage data @@ -304,16 +304,16 @@ echo get_validate_chart_js(); $symbol = $sugar_config['default_currency_symbol']; global $current_user; if($current_user->getPreference('currency') ){ - + $currency = new Currency(); $currency->retrieve($current_user->getPreference('currency')); $div = $currency->conversion_rate; $symbol = $currency->symbol; } // cn: adding user-pref date handling - $dateStartDisplay = $timedate->asUserDate($timedate->fromString($date_start)); - $dateEndDisplay = $timedate->asUserDate($timedate->fromString($date_end)); - + $dateStartDisplay = date($timedate->get_date_format(), strtotime($date_start)); + $dateEndDisplay = date($timedate->get_date_format(), strtotime($date_end)); + $fileContents = ' '."\n"; $stageArr = array(); $usernameArr = array(); @@ -395,14 +395,14 @@ echo get_validate_chart_js(); $return = create_chart($chart_size,$cache_file_name,$width,$height); return $return; } - + function constructQuery(){ global $current_user; global $time_date; - + //get the dates to display $user_date_start = $current_user->getPreference('mypbss_date_start'); - + if (!empty($user_date_start) && !isset($_REQUEST['mypbss_date_start'])) { $date_start = $user_date_start; $GLOBALS['log']->debug("USER PREFERENCES['mypbss_date_start'] is:"); @@ -417,10 +417,10 @@ echo get_validate_chart_js(); $GLOBALS['log']->debug($current_user->getPreference('mypbss_date_start')); } else { - $date_start = $timedate->nowDate(); + $date_start = date($timedate->get_date_format(), time()); } $user_date_end = $current_user->getPreference('mypbss_date_end'); - + if (!empty($user_date_end) && !isset($_REQUEST['mypbss_date_end'])) { $date_end = $user_date_end; $GLOBALS['log']->debug("USER PREFERENCES['mypbss_date_end'] is:"); @@ -435,12 +435,12 @@ echo get_validate_chart_js(); $GLOBALS['log']->debug( $current_user->getPreference('mypbss_date_end')); } else { - $date_end = $timedate->asUserDate($timedate->fromString("2010-01-01")); + $date_end = date($timedate->get_date_format(), strtotime('2010-01-01')); $GLOBALS['log']->debug("USER PREFERENCES['mypbss_date_end'] not found. Using: ".$date_end); } - + $user_id = array($current_user->id); - + $opp = new Opportunity; $where=""; //build the where clause for the query that matches $user @@ -469,7 +469,7 @@ echo get_validate_chart_js(); } //build the where clause for the query that matches $date_start and $date_end - $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " + $where .= " AND opportunities.date_closed >= ". db_convert("'".$date_start."'",'date'). " AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date') ; $where .= " AND opportunities.assigned_user_id = users.id AND opportunities.deleted=0 "; @@ -485,9 +485,9 @@ echo get_validate_chart_js(); $query .= " GROUP BY opportunities.sales_stage,users.user_name,opportunities.assigned_user_id"; return $query; - + } - + function constructGroupBy(){ return array('sales_stage'); } diff --git a/modules/Charts/code/Chart_outcome_by_month.php b/modules/Charts/code/Chart_outcome_by_month.php index 06f5665b..1615e739 100644 --- a/modules/Charts/code/Chart_outcome_by_month.php +++ b/modules/Charts/code/Chart_outcome_by_month.php @@ -199,7 +199,7 @@ echo "

    ".$current_module_strings['L asUser($timedate->fromTimestamp(filemtime($sugar_config['tmp_dir'].$cache_file_name))); + $file_date = date($timedate->get_date_format()." ".$timedate->get_time_format(), filemtime($sugar_config['tmp_dir'].$cache_file_name)); } else { $file_date = ''; @@ -223,10 +223,10 @@ echo get_validate_chart_js(); */ function gen_xml($date_start='1971-10-15', $date_end='2010-10-15', $user_id=array('1'), $cache_file_name='a_file', $refresh=false,$current_module_strings) { global $app_strings, $app_list_strings, $charset, $lang, $barChartColors, $current_user; - - $kDelim = $current_user->getPreference('num_grp_sep'); + + $kDelim = $current_user->getPreference('num_grp_sep'); global $timedate; - + if (!file_exists($cache_file_name) || $refresh == true) { $GLOBALS['log']->debug("date_start is: $date_start"); $GLOBALS['log']->debug("date_end is: $date_end"); @@ -248,8 +248,8 @@ echo get_validate_chart_js(); } // cn: adding user-pref date handling - $dateStartDisplay = $timedate->asUserDate($timedate->fromString($date_start)); - $dateEndDisplay = $timedate->asUserDate($timedate->fromString($date_end)); + $dateStartDisplay = date($timedate->get_date_format(), strtotime($date_start)); + $dateEndDisplay = date($timedate->get_date_format(), strtotime($date_end)); $opp = new Opportunity(); //build the where clause for the query that matches $date_start and $date_end @@ -260,7 +260,7 @@ echo get_validate_chart_js(); //Now do the db queries //query for opportunity data that matches $datay and $user //_pp($query); - + $result = $opp->db->query($query) or sugar_die("Error selecting sugarbean: ".mysql_error()); //build pipeline by sales stage data @@ -274,7 +274,7 @@ echo get_validate_chart_js(); global $current_user; $salesStages = array("Closed Lost"=>$app_list_strings['sales_stage_dom']["Closed Lost"],"Closed Won"=>$app_list_strings['sales_stage_dom']["Closed Won"],"Other"=>$other); if($current_user->getPreference('currency') ){ - + $currency = new Currency(); $currency->retrieve($current_user->getPreference('currency')); $div = $currency->conversion_rate; @@ -362,7 +362,7 @@ echo get_validate_chart_js(); return $return; } - + function constructQuery(){ global $current_user; global $timedate; @@ -401,7 +401,7 @@ echo get_validate_chart_js(); else { $date_end = date('Y').'-12-31'; } - + $ids = array(); //get list of user ids for which to display data $user_ids = $current_user->getPreference('obm_ids'); @@ -422,9 +422,9 @@ echo get_validate_chart_js(); $ids = get_user_array(false); $ids = array_keys($ids); } - + $user_id = $ids; - + $where = ""; //build the where clause for the query that matches $user $count = count($user_id); @@ -439,22 +439,22 @@ echo get_validate_chart_js(); } // cn: adding user-pref date handling - $dateStartDisplay = $timedate->asUserDate($timedate->fromString($date_start)); - $dateEndDisplay = $timedate->asUserDate($timedate->fromString($date_end)); + $dateStartDisplay = date($timedate->get_date_format(), strtotime($date_start)); + $dateEndDisplay = date($timedate->get_date_format(), strtotime($date_end)); $opp = new Opportunity(); //build the where clause for the query that matches $date_start and $date_end $where .= "AND opportunities.date_closed >= ".db_convert("'".$date_start."'",'date')." AND opportunities.date_closed <= ".db_convert("'".$date_end."'",'date')." AND opportunities.deleted=0"; $query = "SELECT sales_stage,".db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))." as m, sum(amount_usdollar/1000) as total, count(*) as opp_count FROM opportunities "; $query .= "WHERE ".$where; - $query .= " GROUP BY sales_stage,".db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))."ORDER BY m"; + $query .= " GROUP BY sales_stage,".db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'"))."ORDER BY m"; return $query; } - + function constructGroupBy(){ return array( 'm', 'sales_stage', ); } - + } ?> diff --git a/modules/Charts/code/Chart_pipeline_by_lead_source.php b/modules/Charts/code/Chart_pipeline_by_lead_source.php index 9f336214..83781a77 100644 --- a/modules/Charts/code/Chart_pipeline_by_lead_source.php +++ b/modules/Charts/code/Chart_pipeline_by_lead_source.php @@ -183,7 +183,7 @@ echo "

    ".$current_module_strings['L if (file_exists($sugar_config['tmp_dir'].$cache_file_name)) { global $timedate; - $file_date = $timedate->asUser($timedate->fromTimestamp(filemtime($sugar_config['tmp_dir'].$cache_file_name))); + $file_date = date($timedate->get_date_format()." ".$timedate->get_time_format(), filemtime($sugar_config['tmp_dir'].$cache_file_name)); } else { $file_date = ''; @@ -208,7 +208,7 @@ global $timedate; */ function gen_xml($legends=array('foo','bar'), $user_id=array('1'), $cache_file_name='a_file', $refresh=true,$current_module_strings) { global $app_strings, $charset, $lang, $pieChartColors, $current_user; - + $kDelim = $current_user->getPreference('num_grp_sep'); if (!file_exists($cache_file_name) || $refresh == true) { @@ -251,7 +251,7 @@ global $timedate; $query = "SELECT lead_source,sum(amount_usdollar/1000) as total,count(*) as opp_count FROM opportunities "; $query .= "WHERE ".$where." AND opportunities.deleted=0 "; $query .= "GROUP BY lead_source ORDER BY total DESC"; - + //build pipeline by lead source data $total = 0; $div = 1; @@ -327,11 +327,11 @@ global $timedate; return $return; } - + function constructQuery(){ global $current_user; global $app_list_strings; - + $tempx = array(); $datax = array(); $selected_datax = array(); @@ -351,7 +351,7 @@ global $timedate; $GLOBALS['log']->debug("USER PREFERENCES['pbls_lead_sources'] is:"); $GLOBALS['log']->debug($current_user->getPreference('pbls_lead_sources')); } - + //set $datax using selected sales stage keys if (count($tempx) > 0) { foreach ($tempx as $key) { @@ -363,9 +363,9 @@ global $timedate; $datax = $app_list_strings['lead_source_dom']; $selected_datax = array_keys($app_list_strings['lead_source_dom']); } - + $legends = $datax; - + $ids = array(); $user_ids = $current_user->getPreference('pbls_ids'); //get list of user ids for which to display data @@ -386,9 +386,9 @@ global $timedate; $ids = get_user_array(false); $ids = array_keys($ids); } - + $user_id = $ids; - + $opp = new Opportunity; //Now do the db queries //query for opportunity data that matches $legends and $user @@ -423,7 +423,7 @@ global $timedate; return $query; } - + function constructGroupBy(){ return array( 'lead_source', ); } diff --git a/modules/Charts/code/Chart_pipeline_by_sales_stage.php b/modules/Charts/code/Chart_pipeline_by_sales_stage.php index b22c0ae1..16afe391 100644 --- a/modules/Charts/code/Chart_pipeline_by_sales_stage.php +++ b/modules/Charts/code/Chart_pipeline_by_sales_stage.php @@ -98,7 +98,7 @@ elseif (isset($_REQUEST['pbss_date_start']) && $_REQUEST['pbss_date_start'] != ' $GLOBALS['log']->debug($current_user->getPreference('pbss_date_start')); } else { - $date_start = $timedate->nowDate(); + $date_start = date($timedate->get_date_format(), time()); } $user_date_end = $current_user->getPreference('pbss_date_end'); @@ -117,7 +117,7 @@ elseif (isset($_REQUEST['pbss_date_end']) && $_REQUEST['pbss_date_end'] != '') { $GLOBALS['log']->debug( $current_user->getPreference('pbss_date_end')); } else { - $date_end = $timedate->asUserDate($timedate->fromString("2010-01-01")); + $date_end = date($timedate->get_date_format(), strtotime('2010-01-01')); $GLOBALS['log']->debug("USER PREFERENCES['pbss_date_end'] not found. Using: ".$date_end); } @@ -243,7 +243,7 @@ $puser_date_start = $current_user->getPreference('user_date_start');

    {$MOD.SYSTEM_NAME} + {$MOD.SYSTEM_NAME} {$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL}  {sugar_help text=$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL_HELP} - -
    - {$MOD.CURRENT_LOGO} {sugar_help text=$MOD.CURRENT_LOGO_HELP} + {$MOD.CURRENT_LOGO} {sugar_help text=$MOD.CURRENT_LOGO_HELP} @@ -147,7 +143,7 @@
    - {$MOD.NEW_LOGO} {sugar_help text=$MOD.NEW_LOGO_HELP} + {$MOD.NEW_LOGO}: {sugar_help text=$MOD.NEW_LOGO_HELP}
    @@ -303,9 +299,6 @@
    diff --git a/modules/Configurator/tpls/adminwizard.tpl b/modules/Configurator/tpls/adminwizard.tpl index 34bf9a65..3b94625f 100644 --- a/modules/Configurator/tpls/adminwizard.tpl +++ b/modules/Configurator/tpls/adminwizard.tpl @@ -307,7 +307,7 @@ function disableReturnSubmission(e) {
    {$APP.LBL_EMAIL_SMTP_SSL_OR_TLS} - +
    @@ -76,140 +71,137 @@ -{else} - -{/if} \ No newline at end of file + \ No newline at end of file diff --git a/modules/Connectors/tpls/modify_display.tpl b/modules/Connectors/tpls/modify_display.tpl index 383b3fea..d6f8c546 100644 --- a/modules/Connectors/tpls/modify_display.tpl +++ b/modules/Connectors/tpls/modify_display.tpl @@ -116,7 +116,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init); - +
    @@ -130,7 +130,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init);
    - +
    - + diff --git a/modules/Users/EditView.php b/modules/Users/EditView.php index 96252a46..3dddf8c6 100644 --- a/modules/Users/EditView.php +++ b/modules/Users/EditView.php @@ -43,8 +43,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Contributor(s): ______________________________________.. ********************************************************************************/ - - $sugar_smarty = new Sugar_Smarty(); require_once('include/export_utils.php'); require_once('modules/Configurator/Configurator.php'); @@ -62,9 +60,9 @@ $focus = new User(); $is_current_admin=is_admin($current_user) ||is_admin_for_module($GLOBALS['current_user'],'Users'); $is_super_admin = is_admin($current_user); +if(!$is_current_admin && $_REQUEST['record'] != $current_user->id) sugar_die("Unauthorized access to administration."); if(isset($_REQUEST['record'])) { - if(!$is_current_admin && $_REQUEST['record'] != $current_user->id) sugar_die("Unauthorized access to administration."); $focus->retrieve($_REQUEST['record']); } @@ -74,9 +72,7 @@ if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->id = ""; $focus->user_name = ""; }else if(!isset($_REQUEST['record'])){ - if ( !defined('SUGARPDF_USE_DEFAULT_SETTINGS') ) { - define('SUGARPDF_USE_DEFAULT_SETTINGS', true); - } + define('SUGARPDF_USE_DEFAULT_SETTINGS', true); } @@ -108,14 +104,12 @@ if (isset($buttons)) $sugar_smarty->assign("BUTTONS", $buttons); echo "\n

    \n"; $params = array(); if(empty($focus->id)){ - $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; + $params[] = "»".$GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; }else{ - $params[] = "".$locale->getLocaleFormattedName($focus->first_name,$focus->last_name).""; + $params[] = "»".$locale->getLocaleFormattedName($focus->first_name,$focus->last_name).""; $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL']; } - -$index_url = ($is_current_admin) ? "index.php?module=Users&action=index" : "index.php?module=Users&action=DetailView&record={$focus->id}"; -echo getClassicModuleTitle("Users", $params, true,$index_url); +echo getClassicModuleTitle("Users", $params, true); $GLOBALS['log']->info('User edit view'); $sugar_smarty->assign('MOD', $mod_strings); @@ -204,9 +198,6 @@ if($focus->getPreference('no_opps') == 'on') { } - - - // check if the user has access to the User Management $sugar_smarty->assign('USER_ADMIN',is_admin_for_module($current_user,'Users')&& !is_admin($current_user)); @@ -246,19 +237,34 @@ $sugar_smarty->assign('DATEOPTIONS', $dateOptions); if(empty($focus->id)) { // remove default timezone for new users(set later) $focus->user_preferences['timezone'] = ''; } +require_once('include/timezone/timezones.php'); +global $timezones; $userTZ = $focus->getPreference('timezone'); - if(empty($userTZ) && !$focus->is_group && !$focus->portal_only) { - $userTZ = TimeDate::guessTimezone(); - $focus->setPreference('timezone', $userTZ); + $focus->setPreference('timezone', date('T')); } +if(empty($userTZ) && !$focus->is_group && !$focus->portal_only) + $userTZ = lookupTimezone(); + if(!$focus->getPreference('ut')) { $sugar_smarty->assign('PROMPTTZ', ' checked'); } -$sugar_smarty->assign('TIMEZONE_CURRENT', $userTZ); -$sugar_smarty->assign('TIMEZONEOPTIONS', TimeDate::getTimezoneList()); + +$timezoneOptions = ''; +ksort($timezones); +foreach($timezones as $key => $value) { + $selected =($userTZ == $key) ? ' SELECTED="true"' : ''; + $dst = !empty($value['dstOffset']) ? '(+DST)' : ''; + $gmtOffset =($value['gmtOffset'] / 60); + + if(!strstr($gmtOffset,'-')) { + $gmtOffset = '+'.$gmtOffset; + } + $timezoneOptions .= ""; +} +$sugar_smarty->assign('TIMEZONEOPTIONS', $timezoneOptions); //// Numbers and Currency display require_once('modules/Currencies/ListCurrency.php'); @@ -321,7 +327,7 @@ $sugar_smarty->assign('getNameJs', $locale->getNameJs()); // Grouped tabs? -$useGroupTabs = $focus->getPreference('navigation_paradigm'); +$useGroupTabs = $current_user->getPreference('navigation_paradigm'); if ( ! isset($useGroupTabs) ) { if ( ! isset($GLOBALS['sugar_config']['default_navigation_paradigm']) ) { $GLOBALS['sugar_config']['default_navigation_paradigm'] = 'gm'; @@ -338,7 +344,7 @@ if(isset($user_max_tabs) && $user_max_tabs > 0) { } else { $sugar_smarty->assign("MAX_TAB", $GLOBALS['sugar_config']['default_max_tabs']); } -$sugar_smarty->assign("MAX_TAB_OPTIONS", range(1, ((!empty($GLOBALS['sugar_config']['default_max_tabs']) && $GLOBALS['sugar_config']['default_max_tabs'] > 10 ) ? $GLOBALS['sugar_config']['default_max_tabs'] : 10))); +$sugar_smarty->assign("MAX_TAB_OPTIONS", range(1, 10)); $user_subpanel_tabs = $focus->getPreference('subpanel_tabs'); if(isset($user_subpanel_tabs)) { @@ -471,7 +477,7 @@ else $sugar_smarty->assign('REQUIRED_PASSWORD','0'); // If my account page or portal only user or regular user without system generated password or a duplicate user -if((($current_user->id == $focus->id) || $usertype=='PORTAL_ONLY' || (($usertype=='REGULAR' || $usertype == 'ADMIN' || (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true' && $usertype!='GROUP')) && !$enable_syst_generate_pwd)) && !$focus->external_auth_only ) +if((($current_user->id == $focus->id) || $usertype=='PORTAL_ONLY' || (($usertype=='REGULAR' || (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true' && $usertype!='GROUP')) && !$enable_syst_generate_pwd)) && !$focus->external_auth_only ) $sugar_smarty->assign('CHANGE_PWD', '1'); else $sugar_smarty->assign('CHANGE_PWD', '0'); @@ -500,7 +506,9 @@ else{ $sugar_smarty->assign('IS_FOCUS_ADMIN', is_admin($focus)); -if($edit_self) { +$disable_download_tab = !isset($sugar_config['disable_download_tab']) ? false : $sugar_config['disable_download_tab']; + +if($edit_self && !$disable_download_tab) { $sugar_smarty->assign('EDIT_SELF','1'); } if($admin_edit_self) { @@ -508,18 +516,6 @@ if($admin_edit_self) { } -if (isset($sugar_config['show_download_tab'])) -{ - $enable_download_tab = $sugar_config['show_download_tab']; -}else{ - - $enable_download_tab = true; -} - -$sugar_smarty->assign('SHOW_DOWNLOADS_TAB', $enable_download_tab); - - - ///////////////////////////////////////////// /// Handle email account selections for users ///////////////////////////////////////////// @@ -538,22 +534,22 @@ if( !($usertype=='GROUP' || $usertype=='PORTAL_ONLY') ) $mail_smtpdisplay = $systemOutboundEmail->mail_smtpdisplay; $hide_if_can_use_default = true; $mail_smtpauth_req=true; - + if( !$systemOutboundEmail->isAllowUserAccessToSystemDefaultOutbound() ) { - + $mail_smtpauth_req = $systemOutboundEmail->mail_smtpauth_req; $userOverrideOE = $systemOutboundEmail->getUsersMailerForSystemOverride($current_user->id); if($userOverrideOE != null) { - + $mail_smtpuser = $userOverrideOE->mail_smtpuser; $mail_smtppass = $userOverrideOE->mail_smtppass; - + } + - - if(!$mail_smtpauth_req && - ( empty($systemOutboundEmail->mail_smtpserver) || empty($systemOutboundEmail->mail_smtpuser) + if(!$mail_smtpauth_req && + ( empty($systemOutboundEmail->mail_smtpserver) || empty($systemOutboundEmail->mail_smtpuser) || empty($systemOutboundEmail->mail_smtppass))) { $hide_if_can_use_default = true; @@ -562,11 +558,11 @@ if( !($usertype=='GROUP' || $usertype=='PORTAL_ONLY') ) $hide_if_can_use_default = false; } } - + $sugar_smarty->assign("mail_smtpdisplay", $mail_smtpdisplay); $sugar_smarty->assign("mail_smtpserver", $mail_smtpserver); $sugar_smarty->assign("mail_smtpuser", $mail_smtpuser); - $sugar_smarty->assign("mail_smtppass", ""); + $sugar_smarty->assign("mail_smtppass", $mail_smtppass); $sugar_smarty->assign("mail_smtpauth_req", $mail_smtpauth_req); $sugar_smarty->assign('MAIL_SMTPPORT',$mail_smtpport); $sugar_smarty->assign('MAIL_SMTPSSL',$mail_smtpssl); diff --git a/modules/Users/EditView.tpl b/modules/Users/EditView.tpl index ea772d83..d50909f2 100644 --- a/modules/Users/EditView.tpl +++ b/modules/Users/EditView.tpl @@ -55,15 +55,6 @@ var ERR_REENTER_PASSWORDS = '{$MOD.ERR_REENTER_PASSWORDS}'; {$ERROR_STRING} - -
    - - - - - - -
    @@ -86,7 +77,7 @@ var ERR_REENTER_PASSWORDS = '{$MOD.ERR_REENTER_PASSWORDS}';

    - + +
    diff --git a/modules/Connectors/tpls/modify_mapping.tpl b/modules/Connectors/tpls/modify_mapping.tpl index 87a1a329..b18987bf 100644 --- a/modules/Connectors/tpls/modify_mapping.tpl +++ b/modules/Connectors/tpls/modify_mapping.tpl @@ -110,7 +110,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init); - +
    @@ -124,7 +124,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init);
    - +
    diff --git a/modules/SavedSearch/index.php b/modules/SavedSearch/index.php index eaf3ba66..814fd300 100644 --- a/modules/SavedSearch/index.php +++ b/modules/SavedSearch/index.php @@ -45,17 +45,16 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); if(!empty($_REQUEST['saved_search_action'])) { - +// _pp($_REQUEST); + $ss = new SavedSearch(); switch($_REQUEST['saved_search_action']) { case 'update': // save here - $savedSearchBean = loadBean($_REQUEST['search_module']); - $ss->handleSave('', true, false, $_REQUEST['saved_search_select'], $savedSearchBean); + $ss->handleSave('', true, false, $_REQUEST['saved_search_select']); break; case 'save': // save here - $savedSearchBean = loadBean($_REQUEST['search_module']); - $ss->handleSave('', true, false, null, $savedSearchBean); + $ss->handleSave('', true, false); break; case 'delete': // delete here $ss->handleDelete($_REQUEST['saved_search_select']); diff --git a/modules/Schedulers/EditView.html b/modules/Schedulers/EditView.html index 7bf46b38..e6d3221e 100644 --- a/modules/Schedulers/EditView.html +++ b/modules/Schedulers/EditView.html @@ -107,9 +107,9 @@ - +
    diff --git a/modules/Connectors/tpls/modify_properties.tpl b/modules/Connectors/tpls/modify_properties.tpl index 641a086e..8ba46e77 100644 --- a/modules/Connectors/tpls/modify_properties.tpl +++ b/modules/Connectors/tpls/modify_properties.tpl @@ -117,7 +117,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init); {/foreach} - +
    @@ -134,7 +134,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init);
    - +
    - {if empty($hideKeys)}{/if} - " ; } } @@ -220,17 +184,13 @@ class ViewLayoutView extends ViewEdit // assign fields and layout $smarty->assign ( 'available_fields', $parser->getAvailableFields () ) ; - - $smarty->assign ( 'disable_layout', $disableLayout) ; $smarty->assign ( 'required_fields', $requiredFields) ; $smarty->assign ( 'layout', $parser->getLayout () ) ; - $smarty->assign ( 'field_defs', $parser->getFieldDefs () ) ; $smarty->assign ( 'view_module', $this->editModule ) ; $smarty->assign ( 'view', $this->editLayout ) ; $smarty->assign ( 'maxColumns', $parser->getMaxColumns() ) ; $smarty->assign ( 'nextPanelId', $parser->getFirstNewPanelId() ) ; $smarty->assign ( 'displayAsTabs', $parser->getUseTabs() ) ; - $smarty->assign ( 'syncDetailEditViews', $parser->getSyncDetailEditViews() ) ; $smarty->assign ( 'fieldwidth', 150 ) ; $smarty->assign ( 'translate', $this->fromModuleBuilder ? false : true ) ; diff --git a/modules/ModuleBuilder/views/view.listview.php b/modules/ModuleBuilder/views/view.listview.php index 44c2781d..1b3d7c78 100644 --- a/modules/ModuleBuilder/views/view.listview.php +++ b/modules/ModuleBuilder/views/view.listview.php @@ -50,13 +50,13 @@ class ViewListView extends ViewEdit /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -177,7 +177,6 @@ class ViewListView extends ViewEdit $smarty->assign ( 'view', $this->editLayout ) ; $smarty->assign ( 'module', "ModuleBuilder" ) ; - $smarty->assign ( 'field_defs', $parser->getFieldDefs () ) ; $smarty->assign ( 'action', 'listViewSave' ) ; $smarty->assign ( 'view_module', $this->editModule ) ; if (!empty ( $this->subpanel ) ) @@ -186,7 +185,7 @@ class ViewListView extends ViewEdit if (!$this->fromModuleBuilder) { $subList = SubPanel::getModuleSubpanels ( $this->editModule); $subRef = $subList[strtolower($this->subpanel)]; - $subTitleKey = !empty($subRef) ? $subRef : "LBL_" . strtoupper($this->subpanel) . "_SUBPANEL_TITLE"; + $subTitleKey = empty($subRef) ? $subRef : "LBL_" . strtoupper($this->subpanel) . "_SUBPANEL_TITLE"; $subTitle = !empty($subRef) ? translate($subTitleKey, $this->editModule) : UCfirst($this->subpanel); $smarty->assign ( 'subpanel_label', $subTitleKey ) ; $smarty->assign ( 'subpanel_title', $subTitle ) ; diff --git a/modules/ModuleBuilder/views/view.main.php b/modules/ModuleBuilder/views/view.main.php index 35297cb2..491b2fa8 100644 --- a/modules/ModuleBuilder/views/view.main.php +++ b/modules/ModuleBuilder/views/view.main.php @@ -45,13 +45,13 @@ class ViewMain extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.module.php b/modules/ModuleBuilder/views/view.module.php index d8360ae8..e39812ce 100644 --- a/modules/ModuleBuilder/views/view.module.php +++ b/modules/ModuleBuilder/views/view.module.php @@ -41,13 +41,13 @@ class ViewModule extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.modulefield.php b/modules/ModuleBuilder/views/view.modulefield.php index 6f08dcc8..46480f5c 100644 --- a/modules/ModuleBuilder/views/view.modulefield.php +++ b/modules/ModuleBuilder/views/view.modulefield.php @@ -42,13 +42,13 @@ class ViewModulefield extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -276,24 +276,15 @@ class ViewModulefield extends SugarView $fv->ss->assign('duplicate_merge_options', $GLOBALS['app_list_strings']['custom_fields_merge_dup_dom']); $triggers = array () ; - $existing_field_names = array () ; foreach ( $module->mbvardefs->vardefs['fields'] as $field ) { if ($field [ 'type' ] == 'enum' || $field [ 'type'] == 'multienum' ) { $triggers [] = $field [ 'name' ] ; } - - if (!isset($field['source']) || $field['source'] != 'non-db') { - if(preg_match('/^(.*?)(_c)?$/', $field['name'], $matches)) - { - $existing_field_names [] = strtoupper($matches[1]); - } - } } - $fv->ss->assign('triggers',$triggers); - $fv->ss->assign('existing_field_names', $json->encode($existing_field_names)); + $fv->ss->assign('mod_strings',$GLOBALS['mod_strings']); // jchi #24880 diff --git a/modules/ModuleBuilder/views/view.modulefields.php b/modules/ModuleBuilder/views/view.modulefields.php index 91863c68..cc95d83f 100644 --- a/modules/ModuleBuilder/views/view.modulefields.php +++ b/modules/ModuleBuilder/views/view.modulefields.php @@ -42,13 +42,13 @@ class ViewModulefields extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -72,13 +72,13 @@ class ViewModulefields extends SugarView if($objectName == 'aCase') // Bug 17614 - renamed aCase as Case in vardefs for backwards compatibililty with 451 modules $objectName = 'Case'; - VardefManager::loadVardef($module_name, $objectName, true); + VardefManager::loadVardef($module_name, $objectName); global $dictionary; $f = array($mod_strings['LBL_HCUSTOM']=>array(), $mod_strings['LBL_HDEFAULT']=>array()); // TODO: replace this section to select fields to list with the algorithm in AbstractMetaDataImplmentation::validField() $def = $this->cullFields($dictionary[$objectName]['fields']); - + foreach($dictionary[$objectName]['fields'] as $def) { if ($this->isValidStudioField($def)) { diff --git a/modules/ModuleBuilder/views/view.modulelabels.php b/modules/ModuleBuilder/views/view.modulelabels.php index 3df02d4f..d4c21f3e 100644 --- a/modules/ModuleBuilder/views/view.modulelabels.php +++ b/modules/ModuleBuilder/views/view.modulelabels.php @@ -48,13 +48,13 @@ class ViewModulelabels extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.package.php b/modules/ModuleBuilder/views/view.package.php index c3a39f37..eca377aa 100644 --- a/modules/ModuleBuilder/views/view.package.php +++ b/modules/ModuleBuilder/views/view.package.php @@ -41,13 +41,13 @@ class Viewpackage extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -72,29 +72,8 @@ class Viewpackage extends SugarView echo $ajax->getJavascript(); } else { - $name = (!empty($_REQUEST['package']))?$_REQUEST['package']:''; $mb->getPackage($name); - - require_once ('modules/ModuleBuilder/MB/MBPackageTree.php') ; - $mbt = new MBPackageTree(); - $nodes = $mbt->fetchNodes(); - - $package_labels = array(); - if(!empty($nodes['tree_data']['nodes'])) - { - foreach($nodes['tree_data']['nodes'] as $entry) - { - if(!empty($entry['data']['label']) && $name != $entry['data']['label']) - { - $package_labels[] = strtoupper($entry['data']['label']); - } - } - } - - $json = getJSONobj(); - $smarty->assign('package_labels', $json->encode($package_labels)); - $this->package =& $mb->packages[$name]; $this->loadModuleTypes(); $this->loadPackageHelp($name); diff --git a/modules/ModuleBuilder/views/view.popupview.php b/modules/ModuleBuilder/views/view.popupview.php index d60a8b2f..e7b9ceb2 100644 --- a/modules/ModuleBuilder/views/view.popupview.php +++ b/modules/ModuleBuilder/views/view.popupview.php @@ -61,13 +61,13 @@ class ViewPopupview extends ViewListView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -139,7 +139,6 @@ class ViewPopupview extends ViewListView $smarty->assign ( 'action', 'popupSave' ) ; $smarty->assign( 'module', 'ModuleBuilder'); $smarty->assign ( 'view_module', $this->editModule ) ; - $smarty->assign ( 'field_defs', $parser->getFieldDefs () ) ; $helpName = (isset( $_REQUEST['view']) && $_REQUEST['view']==MB_POPUPSEARCH) ? 'searchViewEditor' : 'popupListViewEditor'; $smarty->assign ( 'helpName', $helpName ) ; $smarty->assign ( 'helpDefault', 'modify' ) ; diff --git a/modules/ModuleBuilder/views/view.property.php b/modules/ModuleBuilder/views/view.property.php index a6e5d4e2..f3ede8b6 100644 --- a/modules/ModuleBuilder/views/view.property.php +++ b/modules/ModuleBuilder/views/view.property.php @@ -48,13 +48,13 @@ class ViewProperty extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.relationship.php b/modules/ModuleBuilder/views/view.relationship.php index 30be4ca5..67a8eaec 100644 --- a/modules/ModuleBuilder/views/view.relationship.php +++ b/modules/ModuleBuilder/views/view.relationship.php @@ -46,13 +46,13 @@ class ViewRelationship extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.relationships.php b/modules/ModuleBuilder/views/view.relationships.php index 77206a1b..1e23ae88 100644 --- a/modules/ModuleBuilder/views/view.relationships.php +++ b/modules/ModuleBuilder/views/view.relationships.php @@ -45,13 +45,13 @@ class ViewRelationships extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.resetmodule.php b/modules/ModuleBuilder/views/view.resetmodule.php index 97877ebd..cc3ff0a5 100644 --- a/modules/ModuleBuilder/views/view.resetmodule.php +++ b/modules/ModuleBuilder/views/view.resetmodule.php @@ -47,13 +47,13 @@ class ViewResetmodule extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.searchview.php b/modules/ModuleBuilder/views/view.searchview.php index 7300007b..701f0b32 100644 --- a/modules/ModuleBuilder/views/view.searchview.php +++ b/modules/ModuleBuilder/views/view.searchview.php @@ -56,13 +56,13 @@ class ViewSearchView extends ViewListView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.tree.php b/modules/ModuleBuilder/views/view.tree.php index d4403fa4..aa010d93 100644 --- a/modules/ModuleBuilder/views/view.tree.php +++ b/modules/ModuleBuilder/views/view.tree.php @@ -45,13 +45,13 @@ class ViewHistory extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.wizard.php b/modules/ModuleBuilder/views/view.wizard.php index 0c99c4c3..7823e2c6 100644 --- a/modules/ModuleBuilder/views/view.wizard.php +++ b/modules/ModuleBuilder/views/view.wizard.php @@ -61,13 +61,13 @@ class ModuleBuilderViewWizard extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/MySettings/StoreQuery.php b/modules/MySettings/StoreQuery.php index c16308a1..d2a8c907 100644 --- a/modules/MySettings/StoreQuery.php +++ b/modules/MySettings/StoreQuery.php @@ -45,67 +45,8 @@ class StoreQuery{ $this->query[$name] = $val; } - /** - * SaveQuery - * - * This function handles saving the query parameters to the user preferences - * SavedSearch.php does something very similar when saving saved searches as well - * - * @see SavedSearch - * @param $name String name to identify this query - */ - function SaveQuery($name) - { - global $current_user, $timedate; - if(isset($this->query['module'])) - { - $bean = loadBean($this->query['module']); - if(!empty($bean)) - { - foreach($this->query as $key=>$value) - { - //Filter date fields to ensure it is saved to DB format, but also avoid empty values - if(!empty($value) && preg_match('/^(start_range_|end_range_|range_)?(.*?)(_advanced|_basic)$/', $key, $match)) - { - $field = $match[2]; - if(isset($bean->field_defs[$field]['type'])) - { - $type = $bean->field_defs[$field]['type']; - - if(($type == 'date' || $type == 'datetime' || $type == 'datetimecombo') && !preg_match('/^\[.*?\]$/', $value)) - { - $db_format = $timedate->to_db_date($value, false); - $this->query[$key] = $db_format; - } else if ($type == 'int' || $type == 'currency' || $type == 'decimal' || $type == 'float') { - if(preg_match('/[^\d]/', $value)) { - require_once('modules/Currencies/Currency.php'); - $this->query[$key] = unformat_number($value); - //Flag this value as having been unformatted - $this->query[$key . '_unformatted_number'] = true; - //If the type is of currency and there was a currency symbol (non-digit), save the symbol - if($type == 'currency' && preg_match('/^([^\d])/', $value, $match)) - { - $this->query[$key . '_currency_symbol'] = $match[1]; - } - } else { - //unset any flags - if(isset($this->query[$key . '_unformatted_number'])) - { - unset($this->query[$key . '_unformatted_number']); - } - - if(isset($this->query[$key . '_currency_symbol'])) - { - unset($this->query[$key . '_currency_symbol']); - } - } - } - } - } - } - } - } - + function SaveQuery($name){ + global $current_user; $current_user->setPreference($name.'Q', $this->query); } @@ -129,45 +70,12 @@ class StoreQuery{ } - function populateRequest() - { - global $timedate; - - if(isset($this->query['module'])) - { - $bean = loadBean($this->query['module']); - } - - foreach($this->query as $key=>$value) - { + function populateRequest(){ + foreach($this->query as $key=>$val){ // todo wp: remove this - if($key != 'advanced' && $key != 'module') - { - //Filter date fields to ensure it is saved to DB format, but also avoid empty values - if(!empty($value) && !empty($bean) && preg_match('/^(start_range_|end_range_|range_)?(.*?)(_advanced|_basic)$/', $key, $match)) - { - $field = $match[2]; - if(isset($bean->field_defs[$field]['type'])) - { - $type = $bean->field_defs[$field]['type']; - - if(($type == 'date' || $type == 'datetime' || $type == 'datetimecombo') && preg_match('/^\d{4}-\d{2}-\d{2}$/', $value) && !preg_match('/^\[.*?\]$/', $value)) - { - $value = $timedate->to_display_date($value, false); - } else if (($type == 'int' || $type == 'currency' || $type == 'decimal' || $type == 'float') && isset($this->query[$key . '_unformatted_number']) && preg_match('/^\d+$/', $value)) { - require_once('modules/Currencies/Currency.php'); - $value = format_number($value); - if($type == 'currency' && isset($this->query[$key . '_currency_symbol'])) - { - $value = $this->query[$key . '_currency_symbol'] . $value; - } - } - } - } - - // cn: bug 6546 storequery stomps correct value for 'module' in Activities - $_REQUEST[$key] = $value; - $_GET[$key] = $value; + if($key != 'advanced' && $key != 'module') { // cn: bug 6546 storequery stomps correct value for 'module' in Activities + $_REQUEST[$key] = $val; + $_GET[$key] = $val; } } } diff --git a/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php b/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php deleted file mode 100644 index 79707e93..00000000 --- a/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php +++ /dev/null @@ -1,126 +0,0 @@ - array('default' => ''), - 'assigned_user_id' => array('type' => 'assigned_user_name', - 'label' => 'LBL_ASSIGNED_TO', - 'default' => $current_user->name), - 'name' => array( 'default'=>''), - ); - -$dashletData['MyNotesDashlet']['columns'] = array ( - 'name' => - array ( - 'width' => '40%', - 'label' => 'LBL_LIST_SUBJECT', - 'link' => true, - 'default' => true, - ), - 'contact_name' => - array ( - 'width' => '20%', - 'label' => 'LBL_LIST_CONTACT', - 'link' => true, - 'id' => 'CONTACT_ID', - 'module' => 'Contacts', - 'default' => true, - 'ACLTag' => 'CONTACT', - 'related_fields' => - array ( - 0 => 'contact_id', - ), - ), - 'parent_name' => - array ( - 'width' => '20%', - 'label' => 'LBL_LIST_RELATED_TO', - 'dynamic_module' => 'PARENT_TYPE', - 'id' => 'PARENT_ID', - 'link' => true, - 'default' => true, - 'sortable' => false, - 'ACLTag' => 'PARENT', - 'related_fields' => - array ( - 0 => 'parent_id', - 1 => 'parent_type', - ), - ), - 'filename' => - array ( - 'width' => '20%', - 'label' => 'LBL_LIST_FILENAME', - 'default' => true, - 'type' => 'file', - 'related_fields' => - array ( - 0 => 'file_url', - 1 => 'id', - 2 => 'doc_id', - 3 => 'doc_type', - ), - 'displayParams' => - array( - 'module' => 'Notes', - ), - ), - 'created_by_name' => - array ( - 'type' => 'relate', - 'label' => 'LBL_CREATED_BY', - 'width' => '10%', - 'default' => true, - ), - 'date_entered' => - array ( - 'type' => 'datetime', - 'label' => 'LBL_DATE_ENTERED', - 'width' => '10%', - 'default' => false, - ), - 'date_modified' => - array ( - 'width' => '20%', - 'label' => 'LBL_DATE_MODIFIED', - 'link' => false, - 'default' => false, - ), - ); - ?> diff --git a/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.meta.php b/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.meta.php deleted file mode 100644 index c6d2fd8e..00000000 --- a/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.meta.php +++ /dev/null @@ -1,45 +0,0 @@ - 'Notes', - 'title' => translate('LBL_MY_NOTES_DASHLETNAME', 'Notes'), - 'description' => 'A customizable view into Notes', - 'category' => 'Module Views'); -?> diff --git a/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.php b/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.php deleted file mode 100644 index 1dc1b76b..00000000 --- a/modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.php +++ /dev/null @@ -1,57 +0,0 @@ -title = translate('LBL_MY_NOTES_DASHLETNAME', 'Notes'); - - $this->searchFields = $dashletData['MyNotesDashlet']['searchFields']; - $this->columns = $dashletData['MyNotesDashlet']['columns']; - - $this->seedBean = new Note(); - } -} -?> diff --git a/modules/Notes/Note.php b/modules/Notes/Note.php index f131caee..4f1f3827 100644 --- a/modules/Notes/Note.php +++ b/modules/Notes/Note.php @@ -47,6 +47,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); + require_once('include/upload_file.php'); // Note is used to store customer information. @@ -149,16 +150,6 @@ class Note extends SugarBean { return true; } $removeFile = clean_path(getAbsolutePath("{$GLOBALS['sugar_config']['upload_dir']}{$this->id}")); - } - if(!empty($this->doc_type) && !empty($this->doc_id)){ - $document = ExternalAPIFactory::loadAPI($this->doc_type); - - $response = $document->deleteDoc($this); - $this->doc_type = ''; - $this->doc_id = ''; - $this->doc_url = ''; - $this->filename = ''; - $this->file_mime_type = ''; } if(file_exists($removeFile)) { if(!unlink($removeFile)) { @@ -170,13 +161,6 @@ class Note extends SugarBean { $this->save(); return true; } - } else { - $this->filename = ''; - $this->file_mime_type = ''; - $this->file = ''; - $this->doc_id = ''; - $this->save(); - return true; } return false; } @@ -231,7 +215,7 @@ class Note extends SugarBean { if(!empty($this->contact_name)){ $emailAddress = new SugarEmailAddress(); - $this->contact_email = $emailAddress->getPrimaryAddress(false, $this->contact_id, 'Contacts'); + $this->contact_email = $emailAddress->getPrimaryAddress(false, 'Contacts', $this->contact_id); } if(isset($this->contact_id) && $this->contact_id != '') { @@ -319,7 +303,7 @@ class Note extends SugarBean { case 'ACL':return true; } return false; - } -} + } +} ?> diff --git a/modules/Notes/NoteSoap.php b/modules/Notes/NoteSoap.php index f433fd95..1706c4d2 100644 --- a/modules/Notes/NoteSoap.php +++ b/modules/Notes/NoteSoap.php @@ -77,7 +77,7 @@ function saveFile($note, $portal = false){ }else{ return '-1'; } - + return $return_id; } @@ -110,11 +110,11 @@ function newSaveFile($note, $portal = false){ } $return_id = $focus->id; - + if(!empty($note['file'])){ $this->upload_file->final_move($focus->id); } - + if (!empty($note['related_module_id']) && !empty($note['related_module_name'])) { $focus->process_save_dates=false; $module_name = $note['related_module_name']; @@ -126,7 +126,7 @@ function newSaveFile($note, $portal = false){ $focus->contact_id=$module_id; } $focus->save(); - + } // if return $return_id; } @@ -139,7 +139,9 @@ function retrieveFile($id, $filename){ $this->upload_file->stored_file_name = $filename; $filepath = $this->upload_file->get_upload_path($id); if(file_exists($filepath)){ - $file = file_get_contents($filepath); + $fp = sugar_fopen($filepath, 'rb'); + $file = fread($fp, filesize($filepath)); + fclose($fp); return base64_encode($file); } return -1; diff --git a/modules/Notes/controller.php b/modules/Notes/controller.php index d498c4c9..59832b3f 100644 --- a/modules/Notes/controller.php +++ b/modules/Notes/controller.php @@ -45,12 +45,9 @@ class NotesController extends SugarController { + function action_save(){ require_once('include/upload_file.php'); - // Check for both relate_id and parent_id, and prevent overriding of parent_id - if (!empty($_REQUEST['relate_id']) && !empty($_REQUEST['parent_id'])) { - $_REQUEST['relate_id'] = false; - } $GLOBALS['log']->debug('PERFORMING NOTES SAVE'); $upload_file = new UploadFile('uploadfile'); $do_final_move = 0; @@ -89,7 +86,7 @@ } } - function action_editview(){ + function action_editview(){ $this->view = 'edit'; $GLOBALS['view'] = $this->view; if(!empty($_REQUEST['deleteAttachment'])){ diff --git a/modules/Notes/language/en_us.lang.php b/modules/Notes/language/en_us.lang.php index 8d30dbc1..cce7c5e4 100644 --- a/modules/Notes/language/en_us.lang.php +++ b/modules/Notes/language/en_us.lang.php @@ -71,7 +71,7 @@ $mod_strings = array ( 'LBL_MODULE_TITLE' => 'Notes: Home', 'LBL_NEW_FORM_TITLE' => 'Create Note or Add Attachment', 'LBL_NOTE_STATUS' => 'Note', - 'LBL_NOTE_SUBJECT' => 'Subject:', + 'LBL_NOTE_SUBJECT' => 'Note Subject:', 'LBL_NOTES_SUBPANEL_TITLE' => 'Attachments', 'LBL_NOTE' => 'Note:', 'LBL_OPPORTUNITY_ID' => 'Opportunity ID:', @@ -101,7 +101,6 @@ $mod_strings = array ( 'LBL_ACTIVITIES_REPORTS' => 'Activities Report', 'LBL_PANEL_DETAILS' => 'Details', 'LBL_NOTE_INFORMATION' => 'Note Overview', - 'LBL_MY_NOTES_DASHLETNAME' => 'My Notes', ); ?> \ No newline at end of file diff --git a/modules/Notes/metadata/SearchFields.php b/modules/Notes/metadata/SearchFields.php index 416c44f9..02fd770e 100644 --- a/modules/Notes/metadata/SearchFields.php +++ b/modules/Notes/metadata/SearchFields.php @@ -40,14 +40,5 @@ $searchFields['Notes'] = 'name' => array( 'query_type'=>'default'), 'contact_name' => array( 'query_type'=>'default','db_field'=>array('contacts.first_name','contacts.last_name')), - - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/modules/Notes/metadata/detailviewdefs.php b/modules/Notes/metadata/detailviewdefs.php index 5b1d5331..d8dca639 100644 --- a/modules/Notes/metadata/detailviewdefs.php +++ b/modules/Notes/metadata/detailviewdefs.php @@ -81,7 +81,13 @@ array ( array ( 'name' => 'filename', - ), + 'type' => 'file', + 'displayParams' => + array ( + 'id' => 'id', + 'link' => 'filename', + ), + ), ), array ( diff --git a/modules/Notes/metadata/editviewdefs.php b/modules/Notes/metadata/editviewdefs.php index 09edcae1..b59724ea 100644 --- a/modules/Notes/metadata/editviewdefs.php +++ b/modules/Notes/metadata/editviewdefs.php @@ -38,24 +38,24 @@ $viewdefs['Notes']['EditView'] = array( 'templateMeta' => array('form' => array('enctype'=> 'multipart/form-data', 'headerTpl'=>'modules/Notes/tpls/EditViewHeader.tpl', ), - 'maxColumns' => '2', + 'maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30') ), 'javascript' => '', ), @@ -65,23 +65,31 @@ function deleteAttachmentCallBack(text) array ( array('name'=>'name', 'displayParams'=>array('size'=>60)),'' ), - array ( - 'filename', - + array ( + 'name' => 'filename', + 'customCode' => ' + + + + + {$fields.filename.value} + + ', + ), ), array ( array('name' => 'description', 'label' => 'LBL_NOTE_STATUS'), - ), - + ), + ), - - + + 'LBL_PANEL_ASSIGNMENT' => array( array( array ('name' => 'assigned_user_name','label' => 'LBL_ASSIGNED_TO'), ), - ), + ), ) ); ?> \ No newline at end of file diff --git a/modules/Notes/metadata/listviewdefs.php b/modules/Notes/metadata/listviewdefs.php index ecb66e4e..27da5e92 100644 --- a/modules/Notes/metadata/listviewdefs.php +++ b/modules/Notes/metadata/listviewdefs.php @@ -73,22 +73,18 @@ array ( 1 => 'parent_type', ), ), - 'FILENAME' => array ( 'width' => '20%', 'label' => 'LBL_LIST_FILENAME', + 'link' => false, 'default' => true, - 'type' => 'file', 'related_fields' => array ( 0 => 'file_url', 1 => 'id', ), - 'displayParams' => - array( - 'module' => 'Notes', - ), + 'customCode' => '{$FILENAME}', ), 'CREATED_BY_NAME' => array ( @@ -98,6 +94,13 @@ array ( 'default' => true, 'related_fields' => array ( 'created_by' ), ), + 'DATE_ENTERED' => + array ( + 'type' => 'datetime', + 'label' => 'LBL_DATE_ENTERED', + 'width' => '10%', + 'default' => false, + ), 'DATE_MODIFIED' => array ( 'width' => '20%', @@ -105,12 +108,5 @@ array ( 'link' => false, 'default' => false, ), - 'DATE_ENTERED' => - array ( - 'type' => 'datetime', - 'label' => 'LBL_DATE_ENTERED', - 'width' => '10%', - 'default' => true, - ), ); ?> diff --git a/modules/Notes/metadata/quickcreatedefs.php b/modules/Notes/metadata/quickcreatedefs.php index 04f435d3..a0f817bf 100644 --- a/modules/Notes/metadata/quickcreatedefs.php +++ b/modules/Notes/metadata/quickcreatedefs.php @@ -60,6 +60,19 @@ array ( ), ), 'javascript' => ' +', ), 'panels' => @@ -70,6 +83,9 @@ array ( array ( 'contact_name', 'parent_name', + ), + array ( + ), array ( @@ -85,7 +101,18 @@ array ( ), array ( - 'filename', + + array ( + 'name' => 'filename', + 'customCode' => ' + + + + + {$fields.filename.value} + + ', + ), ), array ( @@ -100,9 +127,6 @@ array ( ), ), ), - array ( - - ), ), ), ), diff --git a/modules/Notes/metadata/searchdefs.php b/modules/Notes/metadata/searchdefs.php index 3dd632a5..b63a8ab3 100644 --- a/modules/Notes/metadata/searchdefs.php +++ b/modules/Notes/metadata/searchdefs.php @@ -75,7 +75,6 @@ array ( ), 'filename' => array ( - 'type' => 'name', 'name' => 'filename', 'default' => true, 'width' => '10%', diff --git a/modules/Notes/metadata/subpanels/ForCalls.php b/modules/Notes/metadata/subpanels/ForCalls.php deleted file mode 100644 index 80162ca5..00000000 --- a/modules/Notes/metadata/subpanels/ForCalls.php +++ /dev/null @@ -1,127 +0,0 @@ - '', - - - 'list_fields' => array( - 'object_image'=>array( - 'vname' => 'LBL_OBJECT_IMAGE', - 'widget_class' => 'SubPanelIcon', - 'width' => '2%', - 'image2'=>'attachment', - 'image2_url_field'=>'file_url' - ), - 'name'=>array( - 'vname' => 'LBL_LIST_SUBJECT', - 'widget_class' => 'SubPanelDetailViewLink', - 'width' => '30%', - ), - 'reply_to_status' => array( - 'usage' => 'query_only', - 'force_exists' => true, - 'force_default' => 0, - ), - 'contact_name'=>array( - 'widget_class' => 'SubPanelDetailViewLink', - 'target_record_key' => 'contact_id', - 'target_module' => 'Contacts', - 'module' => 'Contacts', - 'vname' => 'LBL_LIST_CONTACT', - 'width' => '11%', - 'sortable'=>false, - ), - 'parent_id'=>array( - 'usage'=>'query_only', - 'force_exists'=>true - ), - 'parent_type'=>array( - 'usage'=>'query_only', - 'force_exists'=>true - ), - - 'date_modified'=>array( - 'vname' => 'LBL_LIST_DATE_MODIFIED', - 'width' => '10%', - ), - 'date_entered'=>array( - 'vname' => 'LBL_LIST_DATE_ENTERED', - 'width' => '10%', - ), - 'assigned_user_name' => array ( - 'name' => 'assigned_user_name', - 'vname' => 'LBL_LIST_ASSIGNED_TO_NAME', - 'widget_class' => 'SubPanelDetailViewLink', - 'target_record_key' => 'assigned_user_id', - 'target_module' => 'Employees', - 'width' => '10%', - ), - 'assigned_user_owner' => array ( - 'force_exists'=>true, //this will create a fake field since this field is not defined - 'usage'=>'query_only' - ), - 'assigned_user_mod' => array ( - 'force_exists'=>true, //this will create a fake field since this field is not defined - 'usage'=>'query_only' - ), - 'edit_button'=>array( - 'vname' => 'LBL_EDIT_BUTTON', - 'widget_class' => 'SubPanelEditButton', - 'width' => '2%', - ), - 'remove_button'=>array( - 'vname' => 'LBL_REMOVE', - 'widget_class' => 'SubPanelRemoveButton', - 'width' => '2%', - ), - 'file_url'=>array( - 'usage'=>'query_only' - ), - 'filename'=>array( - 'usage'=>'query_only' - ), - - ), -); -?> diff --git a/modules/Notes/metadata/subpanels/ForHistory.php b/modules/Notes/metadata/subpanels/ForHistory.php index 0a3b4fc4..78c2fa9f 100644 --- a/modules/Notes/metadata/subpanels/ForHistory.php +++ b/modules/Notes/metadata/subpanels/ForHistory.php @@ -51,10 +51,7 @@ $subpanel_layout = array( 'widget_class' => 'SubPanelIcon', 'width' => '2%', 'image2'=>'attachment', - 'image2_url_field'=> array( - 'id_field' => 'id', - 'filename_field' => 'filename', - ), + 'image2_url_field'=>'file_url' ), 'name'=>array( 'vname' => 'LBL_LIST_SUBJECT', diff --git a/modules/Notes/metadata/subpanels/default.php b/modules/Notes/metadata/subpanels/default.php index 1dd31480..4b2fc36b 100644 --- a/modules/Notes/metadata/subpanels/default.php +++ b/modules/Notes/metadata/subpanels/default.php @@ -53,10 +53,7 @@ $subpanel_layout = array( 'widget_class' => 'SubPanelIcon', 'width' => '2%', 'image2'=>'attachment', - 'image2_url_field'=> array( - 'id_field' => 'id', - 'filename_field' => 'filename', - ), + 'image2_url_field'=>'file_url' ), 'name'=>array( 'vname' => 'LBL_LIST_SUBJECT', diff --git a/modules/Notes/vardefs.php b/modules/Notes/vardefs.php index 28bb6ad9..88d523ab 100644 --- a/modules/Notes/vardefs.php +++ b/modules/Notes/vardefs.php @@ -36,10 +36,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ $dictionary['Note'] = array( - - 'table' => 'notes', - 'unified_search' => true, 'unified_search_default_enabled' => true, - + 'table' => 'notes', + 'unified_search' => true, 'comment' => 'Notes and Attachments' ,'fields' => array ( 'id' => @@ -56,17 +54,14 @@ $dictionary['Note'] = array( 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', - 'comment' => 'Date record created', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', + 'comment' => 'Date record created' ), 'date_modified' => array ( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', - 'comment' => 'Date record last modified', - 'enable_range_search' => true, + 'comment' => 'Date record last modified' ), 'modified_user_id' => array ( @@ -82,7 +77,7 @@ $dictionary['Note'] = array( 'reportable'=>true, 'comment' => 'User who last modified record', ), - 'modified_by_name' => + 'modified_by_name' => array ( 'name' => 'modified_by_name', 'vname' => 'LBL_MODIFIED_BY', @@ -94,8 +89,8 @@ $dictionary['Note'] = array( 'id_name' => 'modified_user_id', 'module'=>'Users', 'link'=>'modified_user_link', - 'duplicate_merge'=>'disabled' - ), + 'duplicate_merge'=>'disabled' + ), 'created_by' => array ( 'name' => 'created_by', @@ -108,7 +103,7 @@ $dictionary['Note'] = array( 'dbType' => 'id', 'comment' => 'User who created record' ), - 'created_by_name' => + 'created_by_name' => array ( 'name' => 'created_by_name', 'vname' => 'LBL_CREATED_BY', @@ -135,6 +130,16 @@ $dictionary['Note'] = array( 'importable' => 'required', 'required' => true, ), + 'filename' => + array ( + 'name' => 'filename', + 'vname' => 'LBL_FILENAME', + 'type' => 'varchar', + 'len' => '255', + 'reportable'=>true, + 'comment' => 'File name associated with the note (attachment)', + 'importable' => false, + ), 'file_mime_type' => array ( 'name' => 'file_mime_type', @@ -158,17 +163,6 @@ $dictionary['Note'] = array( 'comment' => 'Path to file (can be URL)', 'importable' => false, ), - 'filename' => - array ( - 'name' => 'filename', - 'vname' => 'LBL_FILENAME', - 'type' => 'file', - 'dbType' => 'varchar', - 'len' => '255', - 'reportable'=>true, - 'comment' => 'File name associated with the note (attachment)', - 'importable' => false, - ), 'parent_type'=> array( 'name'=>'parent_type', diff --git a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php b/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php index e0d1098e..68acfdec 100644 --- a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php +++ b/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.php @@ -38,31 +38,21 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); + require_once('include/Dashlets/Dashlet.php'); -class MyClosedOpportunitiesDashlet extends Dashlet -{ - protected $total_opportunities; - protected $total_opportunities_won; + +class MyClosedOpportunitiesDashlet extends Dashlet { + var $total_opportunities; + var $total_opportunities_won; - /** - * @see Dashlet::Dashlet() - */ - public function __construct($id, $def = null) - { + function MyClosedOpportunitiesDashlet($id, $def = null) { global $current_user, $app_strings; parent::Dashlet($id); - $this->isConfigurable = true; + $this->isConfigurable = false; $this->isRefreshable = true; - if(empty($def['title'])) { - $this->title = translate('LBL_MY_CLOSED_OPPORTUNITIES', 'Opportunities'); - } - else { - $this->title = $def['title']; - } - - if(isset($def['autoRefresh'])) $this->autoRefresh = $def['autoRefresh']; + if(empty($def['title'])) $this->title = translate('LBL_MY_CLOSED_OPPORTUNITIES', 'Opportunities'); $this->seedBean = new Opportunity(); @@ -78,11 +68,9 @@ class MyClosedOpportunitiesDashlet extends Dashlet $this->total_opportunities_won = $row['c']; } - /** - * @see Dashlet::display() - */ - public function display() - { + function display(){ + + $ss = new Sugar_Smarty(); $ss->assign('lblTotalOpportunities', translate('LBL_TOTAL_OPPORTUNITIES', 'Opportunities')); $ss->assign('lblClosedWonOpportunities', translate('LBL_CLOSED_WON_OPPORTUNITIES', 'Opportunities')); @@ -93,38 +81,6 @@ class MyClosedOpportunitiesDashlet extends Dashlet return parent::display() . $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl'); } - /** - * @see Dashlet::displayOptions() - */ - public function displayOptions() - { - $ss = new Sugar_Smarty(); - $ss->assign('titleLBL', translate('LBL_DASHLET_OPT_TITLE', 'Home')); - $ss->assign('title', $this->title); - $ss->assign('id', $this->id); - $ss->assign('saveLBL', $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL']); - if($this->isAutoRefreshable()) { - $ss->assign('isRefreshable', true); - $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $ss->assign('autoRefreshSelect', $this->autoRefresh); - } - - return $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl'); - } - - /** - * @see Dashlet::saveOptions() - */ - public function saveOptions($req) - { - $options = array(); - - if ( isset($req['title']) ) { - $options['title'] = $req['title']; - } - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; - - return $options; - } } + +?> diff --git a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl b/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl index 07c53707..6f5f4b9d 100644 --- a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl +++ b/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl @@ -44,9 +44,11 @@ - - - + + +
    diff --git a/modules/Connectors/tpls/modify_search.tpl b/modules/Connectors/tpls/modify_search.tpl index a77c1463..db12c367 100644 --- a/modules/Connectors/tpls/modify_search.tpl +++ b/modules/Connectors/tpls/modify_search.tpl @@ -114,7 +114,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init); - +
    @@ -128,7 +128,7 @@ YAHOO.util.Event.onDOMReady(SourceTabs.init);
    - +
    + {include file="modules/DynamicFields/templates/Fields/Forms/coreBottom.tpl"} \ No newline at end of file diff --git a/modules/DynamicFields/templates/Fields/Forms/coreTop.tpl b/modules/DynamicFields/templates/Fields/Forms/coreTop.tpl index 219db902..50c988d2 100644 --- a/modules/DynamicFields/templates/Fields/Forms/coreTop.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/coreTop.tpl @@ -61,9 +61,6 @@ diff --git a/modules/DynamicFields/templates/Fields/Forms/currency.tpl b/modules/DynamicFields/templates/Fields/Forms/currency.tpl index f925774b..5f607eff 100644 --- a/modules/DynamicFields/templates/Fields/Forms/currency.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/currency.tpl @@ -41,18 +41,9 @@ *} {include file="modules/DynamicFields/templates/Fields/Forms/coreTop.tpl"} -{if $range_search_option_enabled} - - - - -{/if} @@ -54,19 +54,10 @@ -{if $range_search_option_enabled} - - - - -{/if} {include file="modules/DynamicFields/templates/Fields/Forms/coreBottom.tpl"} \ No newline at end of file diff --git a/modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl b/modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl index 9d057a94..eaff8e0a 100644 --- a/modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl @@ -79,14 +79,14 @@
    {html_options name='defaultHours' size='1' id='defaultTime_hours' options=$default_hours_values onchange="timeValueUpdate();" selected=$default_hours} : - {html_options name='defaultMinutes' size='1' id='defaultTime_minutes' options=$default_minutes_values onchange="timeValueUpdate();" selected=$default_minutes} + {html_options name='defaultMinutes' size='1' id='defaultTime_minutes' options=$default_minutes_values onchange="timeValueUpdate();" selected=$default_minutes} {if $show_meridiem === true} {html_options name='defaultMeridiem' size='1' id='defaultTime_meridiem' options=$default_meridiem_values onchange="timeValueUpdate();" selected=$default_meridiem} {/if}
    {else} - {$defaultTime} + {$defaultTime} {/if} @@ -94,21 +94,12 @@ -{if $range_search_option_enabled} - - - - -{/if} {else} - {$vardef.default} + {$vardef.default} {/if} @@ -67,15 +67,6 @@ {/if} -{if $range_search_option_enabled} - - - - -{/if} -{if $range_search_option_enabled} - - - - -{/if} {* -toggle_textarea_elem_values = ['{MOD.LBL_EDIT_ALT_TEXT}', '{MOD.LBL_HIDE_ALT_TEXT}']; var multi_selector = new multiFiles(document.getElementById('upload_div')); multi_selector.addElement( document.getElementById('my_file')); @@ -242,7 +242,8 @@ addVariables(document.EditView.variable_name,'{DEFAULT_MODULE}'); focus_obj = document.EditView.body; toggle_portal_flag(); -update_textarea_button(); + + diff --git a/modules/EmailTemplates/EditView.php b/modules/EmailTemplates/EditView.php index fc8e4bee..c2696fc1 100644 --- a/modules/EmailTemplates/EditView.php +++ b/modules/EmailTemplates/EditView.php @@ -102,9 +102,9 @@ if($has_campaign || $inboundEmail) { $params = array(); if(empty($focus->id)){ - $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; + $params[] = "»".$GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; }else{ - $params[] = "{$focus->name}"; + $params[] = "»{$focus->name}"; $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL']; } diff --git a/modules/EmailTemplates/EditViewMain.html b/modules/EmailTemplates/EditViewMain.html index 1988855d..4f74318d 100644 --- a/modules/EmailTemplates/EditViewMain.html +++ b/modules/EmailTemplates/EditViewMain.html @@ -193,7 +193,8 @@
    - + + {MOD.LBL_EDIT_ALT_TEXT}

    eoq; - } + } echo $json->encode($out); } } else { @@ -896,7 +896,7 @@ eoq; case "updateSubscriptions": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: updateSubscriptions"); - if(isset($_REQUEST['subscriptions']) && !empty($_REQUEST['subscriptions'])) + if(isset($_REQUEST['subscriptions']) && !empty($_REQUEST['subscriptions'])) { $subs = explode("::", $_REQUEST['subscriptions']); $childrenSubs = array(); @@ -904,10 +904,10 @@ eoq; //them to the list of folders to show. foreach ($subs as $singleSub) $email->et->folder->findAllChildren($singleSub, $childrenSubs); - + $subs = array_merge($subs, $childrenSubs); $email->et->folder->setSubscriptions($subs); - } + } elseif(empty($_REQUEST['subscriptions'])) { $email->et->folder->clearSubscriptions(); } @@ -1052,7 +1052,7 @@ eoq; echo $out; break; - + case "rebuildFolders": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: rebuildFolders"); $tree = $email->et->getMailboxNodes(false); @@ -1084,7 +1084,7 @@ eoq; $results = array('outbound_account_list' => $outbounds, 'count' => count($outbounds)); $out = $json->encode($results, false); echo $out; - + break; case "editOutbound": @@ -1098,7 +1098,6 @@ eoq; foreach($oe->field_defs as $def) { $ret[$def] = $oe->$def; } - $ret['mail_smtppass']=''; // don't send back the password $out = $json->encode($ret, true); echo $out; @@ -1110,16 +1109,16 @@ eoq; case "deleteOutbound": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: deleteOutbound"); - if(isset($_REQUEST['outbound_email']) && !empty($_REQUEST['outbound_email'])) + if(isset($_REQUEST['outbound_email']) && !empty($_REQUEST['outbound_email'])) { $oe = new OutboundEmail(); global $current_user; $oe->retrieve($_REQUEST['outbound_email']); $affectedInboundAccounts = $oe->getAssociatedInboundAccounts($current_user); - + //Check if the user has confirmed he wants to delete the email account even if associated to an inbound accnt. $confirmedDelete = ( isset($_REQUEST['confirm']) && $_REQUEST['confirm'] ) ? TRUE : FALSE; - + if( count($affectedInboundAccounts) > 0 && !$confirmedDelete) { $results = array('is_error' => true, 'error_message' => $app_strings['LBL_EMAIL_REMOVE_SMTP_WARNING'] , 'outbound_email' => $_REQUEST['outbound_email']); @@ -1129,15 +1128,15 @@ eoq; $oe->delete(); $results = array('is_error' => false, 'error_message' => ''); } - + $out = $json->encode($results); @ob_end_clean(); ob_start(); echo $out; ob_end_flush(); die(); - } - else + } + else { echo "NOOP"; } @@ -1148,7 +1147,6 @@ eoq; $oe = new OutboundEmail(); $oe->id = $_REQUEST['mail_id']; - $oe->retrieve($oe->id); $oe->name = $_REQUEST['mail_name']; $type = empty($_REQUEST['type']) ? 'user' : $_REQUEST['type']; $oe->type = $type; @@ -1160,13 +1158,11 @@ eoq; $oe->mail_smtpssl = $_REQUEST['mail_smtpssl']; $oe->mail_smtpauth_req = isset($_REQUEST['mail_smtpauth_req']) ? 1 : 0; $oe->mail_smtpuser = $_REQUEST['mail_smtpuser']; - if(!empty($_REQUEST['mail_smtppass'])) { - $oe->mail_smtppass = $_REQUEST['mail_smtppass']; - } + $oe->mail_smtppass = $_REQUEST['mail_smtppass']; $oe = $oe->save(); echo $oe->id; break; - + case "saveDefaultOutbound": global $current_user; $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: saveDefaultOutbound"); @@ -1177,24 +1173,13 @@ eoq; case "testOutbound": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: testOutbound"); - $pass = ''; - if(!empty($_REQUEST['mail_smtppass'])) { - $pass = $_REQUEST['mail_smtppass']; - } elseif(isset($_REQUEST['mail_name'])) { - $oe = new OutboundEmail(); - $oe = $oe->getMailerByName($current_user, $_REQUEST['mail_name']); - if(!empty($oe)) { - $pass = $oe->mail_smtppass; - } - } - $out = $email->sendEmailTest($_REQUEST['mail_smtpserver'], $_REQUEST['mail_smtpport'], $_REQUEST['mail_smtpssl'], - (isset($_REQUEST['mail_smtpauth_req']) ? 1 : 0), $_REQUEST['mail_smtpuser'], - $pass, $_REQUEST['outboundtest_from_address'], $_REQUEST['outboundtest_from_address']); - + $out = $email->sendEmailTest($_REQUEST['mail_smtpserver'], $_REQUEST['mail_smtpport'], $_REQUEST['mail_smtpssl'], + (isset($_REQUEST['mail_smtpauth_req']) ? 1 : 0), $_REQUEST['mail_smtpuser'], + $_REQUEST['mail_smtppass'], $_REQUEST['outboundtest_from_address'], $_REQUEST['outboundtest_from_address']); $out = $json->encode($out); echo $out; break; - + case "rebuildShowAccount": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: rebuildShowAccount"); $ret = $email->et->getShowAccountsOptions($ie); @@ -1279,16 +1264,16 @@ eoq; if (isset($ie->$k)) $ret[$k] = $ie->$k; } - + $out = $json->encode($ret); echo $out; } - + //If the user is saving the username/password then we need to update the outbound account. $outboundMailUser = (isset($_REQUEST['mail_smtpuser'])) ? $_REQUEST['mail_smtpuser'] : ""; $outboundMailPass = (isset($_REQUEST['mail_smtppass'])) ? $_REQUEST['mail_smtppass'] : ""; $outboundMailId = (isset($_REQUEST['outbound_email'])) ? $_REQUEST['outbound_email'] : ""; - + if( !empty($outboundMailUser) && !empty($outboundMailPass) && !empty($outboundMailId) ) { $oe = new OutboundEmail(); @@ -1296,8 +1281,8 @@ eoq; $oe->mail_smtpuser = $outboundMailUser; $oe->mail_smtppass = $outboundMailPass; $oe->save(); - } - + } + } else { echo "NOOP"; } @@ -1329,7 +1314,6 @@ eoq; $ret[$k] = $ie->$k; } - unset($ret['email_password']); // no need to send the password out $out = $json->encode($ret); } else { @@ -1369,13 +1353,13 @@ eoq; $metalist = $email->searchImportedEmails(); $out = $email->et->jsonOuput($metalist, 'Email', $metalist['totalCount']); - + @ob_end_clean(); ob_start(); echo $out; ob_end_flush(); die(); - + break; //// END SEARCH /////////////////////////////////////////////////////////////////////////// @@ -1541,7 +1525,7 @@ eoq; $wheres['last_name'] = $_REQUEST['search_field']; $wheres['email_address'] = $_REQUEST['search_field']; } - + if(isset($_REQUEST['person']) && !empty($_REQUEST['person'])) { $person = $_REQUEST['person']; } @@ -1563,19 +1547,19 @@ eoq; $count = $row['c']; } $time = microtime(true); - + //Handle sort and order requests $sort = !empty($_REQUEST['sort']) ? $_REQUEST['sort'] : "id"; $sort = ($sort == 'bean_id') ? 'id' : $sort; - $sort = ($sort == 'email') ? 'email_address' : $sort; + $sort = ($sort == 'email') ? 'email_address' : $sort; $sort = ($sort == 'name') ? 'last_name' : $sort; $direction = !empty($_REQUEST['dir']) ? $_REQUEST['dir'] : "asc"; $order = ( !empty($sort) && !empty($direction) ) ? " ORDER BY {$sort} {$direction}" : ""; - + $r = $ie->db->limitQuery($qArray['query'] . " $order ", $start, 25, true); $GLOBALS['log']->debug("***QUERY Got results in " . (microtime(true) - $time) . " milisec\n"); - - + + while($a = $ie->db->fetchByAssoc($r)) { $person = array(); $person['bean_id'] = $a['id']; diff --git a/modules/Emails/ListViewGroup.php b/modules/Emails/ListViewGroup.php index 0d119dc0..f08715d2 100644 --- a/modules/Emails/ListViewGroup.php +++ b/modules/Emails/ListViewGroup.php @@ -209,7 +209,7 @@ $display_title = $mod_strings['LBL_LIST_TITLE_GROUP_INBOX']; //// OUTPUT /////////////////////////////////////////////////////////////////////////////// -echo getClassicModuleTitle("Emails", array($mod_strings['LBL_MODULE_TITLE'].$display_title), true); +echo get_module_title("Emails", $mod_strings['LBL_MODULE_TITLE'].$display_title, true); // admin-edit if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){ $header_text = " ".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""; diff --git a/modules/Emails/PopupDocuments.php b/modules/Emails/PopupDocuments.php index e46658b0..18d07d7b 100644 --- a/modules/Emails/PopupDocuments.php +++ b/modules/Emails/PopupDocuments.php @@ -59,11 +59,7 @@ $where = ''; $where = $popup->_get_where_clause(); -// We can't attach remote documents to emails because we can't necessarialy fetch a copy of them to include. -if ( ! empty($where) ) { - $where .= ' AND '; -} -$where .= "documents.doc_type IN ( '', 'Sugar')"; + $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name']; $document_name = empty($_REQUEST['document_name']) ? '' : $_REQUEST['document_name']; diff --git a/modules/Emails/Save.php b/modules/Emails/Save.php index 8a6f3c63..53a11296 100644 --- a/modules/Emails/Save.php +++ b/modules/Emails/Save.php @@ -54,7 +54,7 @@ if(!isset($prefix)) { $prefix = ''; } if(isset($_POST[$prefix.'meridiem']) && !empty($_POST[$prefix.'meridiem'])) { - $_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'], $timedate->get_time_format(), $_POST[$prefix.'meridiem']); + $_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'], $timedate->get_time_format(true), $_POST[$prefix.'meridiem']); } //retrieve the record if(isset($_POST['record']) && !empty($_POST['record'])) { @@ -220,14 +220,26 @@ if(isset($_REQUEST['object_type']) && !empty($_REQUEST['object_type']) && isset( } } } +//// handle legacy parent_id/parent_type relationship calls +elseif(isset($_REQUEST['parent_type']) && !empty($_REQUEST['parent_type']) + && isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id'])) { + //run linking code only if the object_id has not been linked as part of the contacts above + if(!isset($exContactIds) || !in_array($_REQUEST['parent_id'],$exContactIds)){ + $rel = strtolower($_REQUEST['parent_type']); + if ($focus->load_relationship($rel)) { + $focus->$rel->add($_REQUEST['parent_id']); + } + } +} //// END RELATIONSHIP LINKING /////////////////////////////////////////////////////////////////////////////// // If came from email archiving edit view, this would have been set from form input. if (!isset($focus->date_start)) { - $timedate = TimeDate::getInstance(); - list($focus->date_start, $focus->time_start) = $timedate->split_date_time($timedate->now()); + $today = gmdate($GLOBALS['timedate']->get_db_date_time_format()); + $focus->date_start = $timedate->to_display_date($today); + $focus->time_start = $timedate->to_display_time($today, true); } $focus->date_sent = ""; diff --git a/modules/Emails/Status.php b/modules/Emails/Status.php index d20a3423..119d62d8 100644 --- a/modules/Emails/Status.php +++ b/modules/Emails/Status.php @@ -67,7 +67,7 @@ if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) { $focus->contact_id = $_REQUEST['contact_id']; } -echo getClassicModuleTitle($mod_strings['LBL_SEND'], array($mod_strings['LBL_SEND']), true); +echo get_module_title($mod_strings['LBL_SEND'], $mod_strings['LBL_SEND'], true); $GLOBALS['log']->info("Email detail view"); diff --git a/modules/Emails/javascript/EmailUI.js b/modules/Emails/javascript/EmailUI.js index c6af417b..c3c5a1c9 100644 --- a/modules/Emails/javascript/EmailUI.js +++ b/modules/Emails/javascript/EmailUI.js @@ -60,7 +60,7 @@ SE.accounts = { editOutbound : function(obi) { AjaxObject.startRequest(AjaxObject.accounts.callbackEditOutbound, urlStandard + "&emailUIAction=editOutbound&outbound_email=" + obi); - + }, deleteOutbound : function(obi) { @@ -94,18 +94,18 @@ SE.accounts = { * Called on "Accounts" tab activation event */ lazyLoad : function() { - + this._setupInboundAccountTable(); - this._setupOutboundAccountTable(); + this._setupOutboundAccountTable(); }, - + _setupInboundAccountTable: function() { //Setup the inbound mail settings if(!this.inboundAccountsSettingsTable) { - this.customImageFormatter = function(elLiner, oRecord, oColumn, oData) { + this.customImageFormatter = function(elLiner, oRecord, oColumn, oData) { var clckEvent = oColumn.key; var imgSrc = ""; var is_group = oRecord.getData("is_group"); @@ -123,8 +123,8 @@ SE.accounts = { } elLiner.innerHTML = ''; } - }; - + }; + this.showBoolean = function(el, oRecord, oColumn, oData) { var is_group = oRecord.getData("is_group"); @@ -139,50 +139,50 @@ SE.accounts = { }; - YAHOO.widget.DataTable.Formatter.customImage = this.customImageFormatter; + YAHOO.widget.DataTable.Formatter.customImage = this.customImageFormatter; YAHOO.widget.DataTable.Formatter.showBoolean = this.showBoolean; - + var typeHoverHelp = ' '; - - + + this.ieColumnDefs = [{key:'name',label:app_strings.LBL_EMAIL_SETTINGS_NAME }, {key:'server_url',label:ie_mod_strings.LBL_SERVER_URL}, - {key:'is_active',label:ie_mod_strings.LBL_STATUS_ACTIVE,formatter:"checkbox",className:'yui-cstm-cntrd-liner'}, - {key:'is_default',label:app_strings.LBL_EMAIL_ACCOUNTS_SMTPDEFAULT,formatter:"showBoolean",className:'yui-cstm-cntrd-liner'}, + {key:'is_active',label:ie_mod_strings.LBL_STATUS_ACTIVE,formatter:"checkbox",className:'yui-cstm-cntrd-liner'}, + {key:'is_default',label:app_strings.LBL_EMAIL_ACCOUNTS_SMTPDEFAULT,formatter:"showBoolean",className:'yui-cstm-cntrd-liner'}, {key:'type',label:mod_strings.LBL_LIST_TYPE + typeHoverHelp }, {key:'edit',label:mod_strings.LBL_BUTTON_EDIT,formatter:"customImage",className:'yui-cstm-cntrd-liner'}, {key:'delete',label:app_strings.LBL_EMAIL_DELETE,formatter:"customImage",className:'yui-cstm-cntrd-liner'}]; var query = "index.php?module=Emails&action=EmailUIAjax&to_pdf=true&emailUIAction=rebuildShowAccount"; this.ieDataSource = new YAHOO.util.DataSource(query); - this.ieDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; + this.ieDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; this.ieDataSource.responseSchema = { resultsList: "account_list", fields: [{key:'id'},{key:'name'},'is_active',{key:'server_url'},'is_group','group_id','is_default','has_groupfolder','type'] }; this.inboundAccountsSettingsTable = new YAHOO.widget.DataTable("inboundAccountsTable", this.ieColumnDefs, this.ieDataSource); - this.inboundAccountsSettingsTable.subscribe("checkboxClickEvent", function(oArgs){ - - var elCheckbox = oArgs.target; + this.inboundAccountsSettingsTable.subscribe("checkboxClickEvent", function(oArgs){ + + var elCheckbox = oArgs.target; var oColumn = this.getColumn(elCheckbox); if(oColumn.key == 'is_active') { - var oRecord = this.getRecord(elCheckbox); + var oRecord = this.getRecord(elCheckbox); oRecord.setData("is_active",elCheckbox.checked); var t_id = oRecord.getData('id'); var isGroupFolder = oRecord.getData('has_groupfolder'); - + if(isGroupFolder) SUGAR.email2.folders.updateSubscriptions(); else SUGAR.email2.folders.setFolderSelection(); - + } }); var lastDefaultSelectedId = ""; - this.inboundAccountsSettingsTable.subscribe("radioClickEvent", function(oArgs){ - - var elRadio = oArgs.target; + this.inboundAccountsSettingsTable.subscribe("radioClickEvent", function(oArgs){ + + var elRadio = oArgs.target; var oColumn = this.getColumn(elRadio); if(oColumn.key == 'is_default') { @@ -191,25 +191,25 @@ SE.accounts = { var t_isGroup = oRecord.getData('is_group'); if(t_id != lastDefaultSelectedId && !t_isGroup) { - SUGAR.default_inbound_accnt_id = t_id; //Set in the global space for access during compose + SUGAR.default_inbound_accnt_id = t_id; //Set in the global space for access during compose lastDefaultSelectedId = t_id; - AjaxObject.startRequest(callbackDefaultOutboundSave, urlStandard + "&emailUIAction=saveDefaultOutbound&id="+ t_id); + AjaxObject.startRequest(callbackDefaultOutboundSave, urlStandard + "&emailUIAction=saveDefaultOutbound&id="+ t_id); } else if(t_isGroup) YAHOO.util.Event.preventDefault(oArgs.event); //Do not allow users to select group mailboxes as a default. - + } }); - - this.inboundAccountsSettingsTable.subscribe("rowMouseoverEvent", this.inboundAccountsSettingsTable.onEventHighlightRow); - this.inboundAccountsSettingsTable.subscribe("rowMouseoutEvent", this.inboundAccountsSettingsTable.onEventUnhighlightRow); + + this.inboundAccountsSettingsTable.subscribe("rowMouseoverEvent", this.inboundAccountsSettingsTable.onEventHighlightRow); + this.inboundAccountsSettingsTable.subscribe("rowMouseoutEvent", this.inboundAccountsSettingsTable.onEventUnhighlightRow); } }, _setupOutboundAccountTable: function() { if(!this.outboundAccountsSettingsTable) - { - this.obImageFormatter = function(elLiner, oRecord, oColumn, oData) { + { + this.obImageFormatter = function(elLiner, oRecord, oColumn, oData) { var clckEvent = oColumn.key; var imgSrc = ""; var isEditable = oRecord.getData("is_editable"); @@ -229,14 +229,14 @@ SE.accounts = { if(imgSrc != '') elLiner.innerHTML = ''; } - }; - + }; + //Custom formatter to display any error messages. - this.messageDisplay = function(elLiner, oRecord, oColumn, oData) { - + this.messageDisplay = function(elLiner, oRecord, oColumn, oData) { + if(SUGAR.email2.composeLayout.outboundAccountErrors == null) SUGAR.email2.composeLayout.outboundAccountErrors = {}; - + var id = oRecord.getData('id'); var message = oRecord.getData("errors"); if(message != '') @@ -250,29 +250,29 @@ SE.accounts = { if(typeof(SUGAR.email2.composeLayout.outboundAccountErrors[id]) != 'undefined' ) delete SUGAR.email2.composeLayout.outboundAccountErrors[id]; } - }; + }; YAHOO.widget.DataTable.Formatter.actionsImage = this.obImageFormatter; YAHOO.widget.DataTable.Formatter.messageDisplay = this.messageDisplay; - + this.obAccntsColumnDefs = [{key:'name',label:app_strings.LBL_EMAIL_ACCOUNTS_NAME }, {key:'mail_smtpserver',label:app_strings.LBL_EMAIL_ACCOUNTS_SMTPSERVER}, {key:'edit',label:mod_strings.LBL_BUTTON_EDIT,formatter:"actionsImage",className:'yui-cstm-cntrd-liner'}, - {key:'delete', label:app_strings.LBL_EMAIL_DELETE,formatter:"actionsImage",className:'yui-cstm-cntrd-liner'}, + {key:'delete', label:app_strings.LBL_EMAIL_DELETE,formatter:"actionsImage",className:'yui-cstm-cntrd-liner'}, {key:'messages',label:'', formatter:"messageDisplay",className:'yui-cstm-cntrd-liner'}]; - + var query = "index.php?module=Emails&action=EmailUIAjax&to_pdf=true&emailUIAction=retrieveAllOutbound"; this.obDataSource = new YAHOO.util.DataSource(query); - this.obDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; + this.obDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; this.obDataSource.responseSchema = { - + resultsList: "outbound_account_list", fields: ['id','name','is_editable','mail_smtpserver','type','errors'] }; - + this.outboundAccountsSettingsTable = new YAHOO.widget.DataTable("outboundAccountsTable", this.obAccntsColumnDefs, this.obDataSource); - - - this.outboundAccountsSettingsTable.subscribe("rowMouseoverEvent", this.outboundAccountsSettingsTable.onEventHighlightRow); - this.outboundAccountsSettingsTable.subscribe("rowMouseoutEvent", this.outboundAccountsSettingsTable.onEventUnhighlightRow); + + + this.outboundAccountsSettingsTable.subscribe("rowMouseoverEvent", this.outboundAccountsSettingsTable.onEventHighlightRow); + this.outboundAccountsSettingsTable.subscribe("rowMouseoutEvent", this.outboundAccountsSettingsTable.onEventUnhighlightRow); this.outboundAccountsSettingsTable.subscribe("postRenderEvent",this.rebuildMailerOptions); } }, @@ -280,7 +280,7 @@ SE.accounts = { * Displays a modal diaglogue to edit outbound account settings */ showEditInboundAccountDialogue : function(clear) { - + if(!this.inboundAccountEditDialog) { var EAD = this.inboundAccountEditDialog = new YAHOO.widget.Dialog("editAccountDialogue", { modal:true, @@ -295,8 +295,8 @@ SE.accounts = { var viewH = YAHOO.util.Dom.getViewportHeight(); if (this.header && el && viewH - 50 < el.clientHeight) { var body = this.header.nextElementSibling; - body.style.overflow = "hidden"; - body.style.height = "100%"; + body.style.overflow = "auto"; + body.style.height = (viewH - 50) + "px"; } }, EAD); EAD.setHeader(mod_strings.LBL_EMAIL_ACCOUNTS_INBOUND); @@ -304,21 +304,21 @@ SE.accounts = { } // end lazy load - if(clear == undefined || clear == true) + if(clear == undefined || clear == true) { SE.accounts.clearInboundAccountEditScreen(); //Set default protocol to IMAP when creating new records document.forms['ieAccount'].elements['protocol'].value = "imap"; - SE.accounts.setPortDefault(); + SE.accounts.setPortDefault(); } - + //Check if we should display username/password fields for outbound account if errors were detected. this.checkOutBoundSelection(); - + this.inboundAccountEditDialog.render(); this.inboundAccountEditDialog.show(); }, - + /** * Set all fields on the outbound edit form to either enabled/disabled * except for the username/password. @@ -335,15 +335,15 @@ SE.accounts = { Dom.addClass("mail_smtpssl_row", "yui-hidden"); else Dom.removeClass('mail_smtpssl_row', "yui-hidden"); - + }, /** * Refresh the inbound accounts table. */ refreshInboundAccountTable : function() - { + { this.inboundAccountsSettingsTable.getDataSource().sendRequest('', - { + { success: this.inboundAccountsSettingsTable.onDataReturnInitializeTable, scope: this.inboundAccountsSettingsTable } ); @@ -352,9 +352,9 @@ SE.accounts = { * Refresh the outbound accounts table. */ refreshOuboundAccountTable : function() - { + { this.outboundAccountsSettingsTable.getDataSource().sendRequest('', - { + { success: this.outboundAccountsSettingsTable.onDataReturnInitializeTable, scope: this.outboundAccountsSettingsTable } ); @@ -385,10 +385,10 @@ SE.accounts = { SE.accounts.checkOutBoundSelection(); return true; }); - + Dom.removeClass("outboundDialog", "yui-hidden"); } // end lazy load - + // clear out form var form = document.getElementById('outboundEmailForm'); for(i=0; i"; - } + } if(trim(smtpServer) == '') { isError = true; errorMessage += app_strings.LBL_EMAIL_ACCOUNTS_SMTPSERVER + "
    "; @@ -785,16 +774,20 @@ SE.accounts = { isError = true; errorMessage += app_strings.LBL_EMAIL_ACCOUNTS_SMTPUSER + "
    "; } + if(trim(document.getElementById('mail_smtppass').value) == '') { + isError = true; + errorMessage += app_strings.LBL_EMAIL_ACCOUNTS_SMTPPASS + "
    "; + } } - } + } if(isError) { overlay(mod_strings.ERR_MISSING_REQUIRED_FIELDS, errorMessage, 'alert'); - return false; + return false; } else { return true; } - }, - + }, + testOutboundSettings: function() { var errorMessage = ''; var isError = false; @@ -802,38 +795,38 @@ SE.accounts = { if (trim(fromAddress) == "") { errorMessage += app_strings.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR + "
    "; overlay(mod_strings.ERR_MISSING_REQUIRED_FIELDS, errorMessage, 'alert'); - return false; + return false; } else if (!isValidEmail(fromAddress)) { errorMessage += app_strings.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR + "
    "; overlay(mod_strings.ERR_INVALID_REQUIRED_FIELDS, errorMessage, 'alert'); - return false; + return false; } - + //Hide the dialogue and show an in progress indicator. SE.accounts.testOutboundDialog.hide(); overlay(app_strings.LBL_EMAIL_PERFORMING_TASK, app_strings.LBL_EMAIL_ONE_MOMENT, 'plain'); - + //If the outbound mail type is a system override we need to re-enable the post fields otherwise //nothing is sent in the request. var outboundType = document.forms['outboundEmailForm'].elements['type'].value; SUGAR.email2.accounts.toggleOutboundAccountDisabledFields(false); - + YAHOO.util.Connect.setForm(document.getElementById("outboundEmailForm")); if(outboundType == 'system-override') SUGAR.email2.accounts.toggleOutboundAccountDisabledFields(true); - + var data = "&emailUIAction=testOutbound&outboundtest_from_address=" + fromAddress; AjaxObject.startRequest(callbackOutboundTest, urlStandard + data); - + }, - + testOutboundSettingsDialog: function() { //Ensure that all settings are correct before proceeding to send test email. if(!SE.accounts.checkOutboundSettings()) - return; - + return; + // lazy load dialogue if(!SE.accounts.testOutboundDialog) { SE.accounts.testOutboundDialog = new YAHOO.widget.Dialog("testOutboundDialog", { @@ -850,7 +843,7 @@ SE.accounts = { SE.accounts.testOutboundDialog.render(); SE.accounts.testOutboundDialog.show(); }, - + /** * Saves Outbound email settings */ @@ -866,12 +859,12 @@ SE.accounts = { }, saveIeAccount : function() { - + //Before saving check if there are any error messages associated with the outbound account. var outboundID = document.getElementById('outbound_email').value; if( SE.accounts.checkIeCreds({'valiateTrash': true,'validateFromAddr': true,'validateOutbound' :true, - 'validateSMTPCreds':true}) ) + 'validateSMTPCreds':true}) ) { document.getElementById('saveButton').disabled = true; @@ -903,13 +896,13 @@ SE.accounts = { } // if getFoldersListForInboundAccount("InboundEmail", "ShowInboundFoldersList", "Popup", 400, 300, form.server_url.value, form.protocol.value, form.port.value, form.email_user.value, Rot13.write(form.email_password.value), mailBoxValue, form.ssl.checked, true, form.searchField.value ); } // if - + }, - + checkIeCreds : function(validateRules) { - if(typeof(validateRules) == 'undefined') + if(typeof(validateRules) == 'undefined') validateRules = {}; - + var errors = new Array(); var out = new String(); @@ -922,20 +915,20 @@ SE.accounts = { var port = Dom.get('port').value; var oe = Dom.get('outbound_email'); var oe_value = typeof(oe.options[oe.selectedIndex]) == 'undefined' ? "" : oe.options[oe.selectedIndex].value; - + var outboundUserName = Dom.get('inbound_mail_smtpuser').value; var outboundPass = Dom.get('inbound_mail_smtppass').value; - + //If the username and password were provided then ignore the error messge - + var outboundCredentialsFound = false; - + if(outboundUserName != "" && outboundPass != "") outboundCredentialsFound = true; - + var validateSMTPCreds = (typeof(validateRules.validateSMTPCreds) != 'undefined' && validateRules.validateSMTPCreds); - - if ( SE.composeLayout.outboundAccountErrors != null && SE.composeLayout.outboundAccountErrors[oe_value] != null + + if ( SE.composeLayout.outboundAccountErrors != null && SE.composeLayout.outboundAccountErrors[oe_value] != null && validateSMTPCreds) { if(trim(outboundUserName) == "") { @@ -949,15 +942,15 @@ SE.accounts = { if(trim(ie_name) == "") { errors.push(app_strings.LBL_EMAIL_ERROR_NAME); } - + if ( typeof(validateRules.validateFromAddr) != 'undefined' && validateRules.validateFromAddr) - { + { if(trim(fromAddress) == "" || !isValidEmail(fromAddress) ) { errors.push(app_strings.LBL_EMAIL_ERROR_FROM_ADDRESS); } } - - + + if( (typeof(validateRules.validateOutbound) != 'undefined' && validateRules.validateOutbound) && ( trim(oe_value) == "" || trim(oe_value) == "SYSTEM_ADD") ) { errors.push(app_strings.LBL_EMAIL_ERROR_NO_OUTBOUND); @@ -968,6 +961,9 @@ SE.accounts = { if(trim(email_user) == "") { errors.push(app_strings.LBL_EMAIL_ERROR_USER); } + if(trim(email_password) == "") { + errors.push(app_strings.LBL_EMAIL_ERROR_PASSWORD); + } if(protocol == "") { errors.push(app_strings.LBL_EMAIL_ERROR_PROTOCOL); } @@ -1021,7 +1017,7 @@ SE.accounts = { SE.util.cascadeNodes(SE.tree.getRoot(), SE.accounts.setNodeStyle); SE.tree.render(); }, - + //Sets the style for any nodes that need it. setNodeStyle : function(node) { if (!node.data.origText) { @@ -1040,7 +1036,7 @@ SE.accounts = { } SE.accounts.setupDDTarget(node); }, - + setupDDTarget : function(node) { if (node.ddTarget) { node.ddTarget.removeFromGroup(); @@ -1049,9 +1045,9 @@ SE.accounts = { var id = node.getElId(); var num = id.substring(4); if (node.data.origText != SUGAR.language.get("Emails", "LNK_MY_INBOX") && - node.data.origText != SUGAR.language.get("Emails", "LNK_MY_DRAFTS") && + node.data.origText != SUGAR.language.get("Emails", "LNK_MY_DRAFTS") && node.data.origText != SUGAR.language.get("Emails", "LNK_SENT_EMAIL_LIST")) { - + node.ddTarget = new SUGAR.email2.folders.folderDD("ygtvcontentel" + num); } else if (node.data.origText == SUGAR.language.get("Emails", "LNK_MY_INBOX")){ @@ -1066,7 +1062,7 @@ SE.accounts = { overlay(app_strings.LBL_EMAIL_REBUILDING_FOLDERS, app_strings.LBL_EMAIL_ONE_MOMENT); AjaxObject.startRequest(callbackFolders, urlStandard + '&emailUIAction=rebuildFolders'); }, - + /** * Returns the number of remote accounts the user has active. */ @@ -1092,7 +1088,7 @@ SE.accounts = { /////////////////////////////////////////////////////////////////////////////// //// CONTEXT MENU CALLS SE.contextMenus = { - + assignToDialogue : null, /** * Archives from context menu @@ -1115,7 +1111,7 @@ SE.contextMenus = { */ archiveToSugar : function(menuItem) { SE.contextMenus.emailListContextMenu.hide(); - + var rows = SE.grid.getSelectedRows(); var uids = []; /* iterate through available rows JIC a row is deleted - use first available */ @@ -1125,7 +1121,7 @@ SE.contextMenus = { var data = SE.grid.getRecord(rows[0]).getData(); SE.contextMenus._archiveToSugar(uids, data.ieId, data.mbox); }, - + /** * Popup the printable version and start system's print function. */ @@ -1159,12 +1155,12 @@ SE.contextMenus = { SE.contextMenus.assignToDialogue.setHeader(app_strings.LBL_EMAIL_ASSIGN_TO); enableQS(true); } - + Dom.removeClass("assignToDiv", "yui-hidden"); SE.contextMenus.assignToDialogue.render(); SE.contextMenus.assignToDialogue.show(); }, - + /** * Marks email flagged on mail server */ @@ -1202,7 +1198,7 @@ SE.contextMenus = { */ markEmail : function(type) { SE.contextMenus.emailListContextMenu.hide(); - + //var dm = SE.grid.getStore(); //var uids = SE.grid.getSelectedRowIds(); //var indexes = SE.grid.getSelectedRowIndexes(); @@ -1210,24 +1206,24 @@ SE.contextMenus = { if (rows.length == 0) rows = [SE.contextMenus.currentRow]; var ser = [ ]; - + for(var i=0; i 0) { - AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + + AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + '&emailUIAction=checkEmailProgress&ieId=' + SE.accounts.ieIds[0] + "¤tCount=0"); } else { hideOverlay(); @@ -2038,7 +2034,7 @@ SE.folders = { SE.folders.checkingMail = setTimeout("SE.folders.startEmailAccountCheck();", 5000); } }, - + /** * Checks a single Account check based on passed ieId */ @@ -2055,7 +2051,7 @@ SE.folders = { } // if overlay(app_strings.LBL_EMAIL_CHECKING_NEW, app_strings.LBL_EMAIL_CHECKING_DESC, 'progress'); SE.accounts.ieIds = [ieId]; - AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + + AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + '&emailUIAction=checkEmailProgress&mbox=' + mbox + '&ieId=' + ieId + "¤tCount=0&synch=" + synch); }, @@ -2068,7 +2064,7 @@ SE.folders = { overlay(app_strings.LBL_EMAIL_EMPTYING_TRASH, app_strings.LBL_EMAIL_ONE_MOMENT); AjaxObject.startRequest(callbackEmptyTrash, urlStandard + '&emailUIAction=emptyTrash'); }, - + /** * Clears Cache files of the inboundemail account */ @@ -2077,8 +2073,8 @@ SE.folders = { overlay(app_strings.LBL_EMAIL_CLEARING_CACHE_FILES, app_strings.LBL_EMAIL_ONE_MOMENT); AjaxObject.startRequest(callbackClearCacheFiles, urlStandard + '&ieId=' + ieId + '&emailUIAction=clearInboundAccountCache'); }, - - + + /** * Returns an array of all the active accounts in the folder view */ @@ -2110,7 +2106,7 @@ SE.folders = { AjaxObject.timeout = 300000; // 5 min timeout for long checks AjaxObject.startRequest(callbackLoadSettingFolder, urlStandard + '&emailUIAction=getFoldersForSettings'); }, - + /** * Recursively removes nodes from the TreeView of type Sugar (data.ieId = 'folder') */ @@ -2126,14 +2122,14 @@ SE.folders = { root.childrenRendered = true; } }, - + rebuildFolders : function(silent) { if (!silent) overlay(app_strings.LBL_EMAIL_REBUILDING_FOLDERS, app_strings.LBL_EMAIL_ONE_MOMENT); AjaxObject.startRequest(callbackFolders, urlStandard + '&emailUIAction=getAllFoldersTree'); }, - - + + /** * Updates TreeView with Sugar Folders */ @@ -2189,7 +2185,7 @@ SE.folders = { if(is_active) a_active_accnts += ("&ieIdShow[]=" + t_record.getData('id')); } - + if(a_active_accnts == "") a_active_accnts = "&ieIdShow[]="; @@ -2307,10 +2303,10 @@ SE.folders = { * @param count how many to decrement */ decrementUnreadCount : function(ieId, mbox, count) { - + if(mbox == null) return; - + if(mbox.indexOf("sugar::") === 0) { var node = this.getNodeFromId(ieId); } else { @@ -2348,13 +2344,13 @@ SE.folders = { */ getNodeFromIeIdAndMailbox : function(id, mbox) { SE.folders.focusNode = null; - if (mbox == "sugar::Emails") { + if (mbox == "sugar::Emails") { mbox = id; id = "folder"; } // if SE.util.cascadeNodes(SE.tree.getRoot(), function(varsarray) { if (varsarray instanceof Array) { - if (this.data.ieId && this.data.ieId == varsarray[0] + if (this.data.ieId && this.data.ieId == varsarray[0] && this.data.mbox == varsarray[1]) { SE.folders.focusNode = this; return false; @@ -2368,7 +2364,7 @@ SE.folders = { }, null, [id, mbox]); return SE.folders.focusNode; }, - + unhighliteAll : function() { SE.util.cascadeNodes(SE.tree.getRoot(), function(){this.unhighlight()}); }, @@ -2382,8 +2378,8 @@ SE.folders = { var node = SE.clickedFolderNode; if(node != null && node.data) { - overlay(app_strings.LBL_EMAIL_FOLDERS_ADD_DIALOG_TITLE, - app_strings.LBL_EMAIL_SETTINGS_NAME, + overlay(app_strings.LBL_EMAIL_FOLDERS_ADD_DIALOG_TITLE, + app_strings.LBL_EMAIL_SETTINGS_NAME, 'prompt', {fn:SE.folders.folderAddXmlCall, beforeShow: SE.folders.folderAddRegisterEnter, beforeHide: SE.folders.folderRemoveRegisterEnter}); } else { alert(app_strings.LBL_EMAIL_FOLDERS_NO_VALID_NODE); @@ -2391,17 +2387,17 @@ SE.folders = { }, folderAddRegisterEnter : function() { - this.enterKeyListener = new YAHOO.util.KeyListener(YAHOO.util.Dom.get("sugar-message-prompt"), + this.enterKeyListener = new YAHOO.util.KeyListener(YAHOO.util.Dom.get("sugar-message-prompt"), {keys: YAHOO.util.KeyListener.KEY.ENTER}, this.buttons[1].handler); - - this.enterKeyListener.enable(); + + this.enterKeyListener.enable(); }, - + folderRemoveRegisterEnter : function() { this.enterKeyListener.disable(); }, - + folderAddXmlCall : function(name) { if (trim(name) == "") { alert(mod_strings.LBL_ENTER_FOLDER_NAME); @@ -2412,7 +2408,7 @@ SE.folders = { var type = 'sugar'; var parentNode = SE.clickedFolderNode; - + this.contextMenuFocus = parentNode; if(parentNode.data.ieId) { @@ -2447,7 +2443,7 @@ SE.folders = { */ folderDelete : function() { SE.contextMenus.frameFoldersContextMenu.hide(); - + if(confirm(app_strings.LBL_EMAIL_FOLDERS_DELETE_CONFIRM)) { var post = ''; var parentNode = SE.clickedFolderNode; @@ -2488,11 +2484,11 @@ SE.folders = { overlay(app_strings.LBL_EMAIL_ERROR_GENERAL_TITLE, app_strings.LBL_EMAIL_FOLDERS_CHANGE_HOME, 'alert'); return; } - - overlay(app_strings.LBL_EMAIL_FOLDERS_RENAME_DIALOG_TITLE + " - " + node.data.text, - app_strings.LBL_EMAIL_SETTINGS_NAME, + + overlay(app_strings.LBL_EMAIL_FOLDERS_RENAME_DIALOG_TITLE + " - " + node.data.text, + app_strings.LBL_EMAIL_SETTINGS_NAME, 'prompt', - {fn:SE.folders.submitFolderRename, beforeShow: SE.folders.folderAddRegisterEnter, beforeHide: SE.folders.folderRemoveRegisterEnter}); + {fn:SE.folders.submitFolderRename, beforeShow: SE.folders.folderAddRegisterEnter, beforeHide: SE.folders.folderRemoveRegisterEnter}); } else { alert(app_strings.LBL_EMAIL_FOLDERS_NO_VALID_NODE); } @@ -2609,7 +2605,7 @@ SE.folders = { //eval(node.data.click); //debugger; }, - + /** * Called when a node is right-clicked on in the folder tree */ @@ -2618,7 +2614,7 @@ SE.folders = { //Get the Tree Node var node = SUGAR.email2.tree.getNodeByElement(YAHOO.util.Event.getTarget(e)); var menu = SUGAR.email2.contextMenus.frameFoldersContextMenu; - + //If the click was on a sugar folder SE.clickedFolderNode = node; var inbound = (node.data.ieId && node.data.ieId != 'folder'); @@ -2648,7 +2644,7 @@ SE.folders = { menu.getItem(4).cfg.setProperty("disabled", true); menu.getItem(5).cfg.setProperty("disabled", true); } - + //For group with auto inbound, disable everything. if( (typeof(node.data.is_group) != 'undefined') && node.data.is_group == 'true') { @@ -2660,11 +2656,11 @@ SE.folders = { menu.getItem(5).cfg.setProperty("disabled", true); menu.getItem(6).cfg.setProperty("disabled", true); } - + menu.cfg.setProperty("xy", YAHOO.util.Event.getXY(e)); menu.show(); }, - + /** * Called when a row is dropped on a node */ @@ -2682,14 +2678,14 @@ SE.folders = { SE.listView.moveEmails(srcIeId, srcFolder, destIeId, destFolder, uids, rows); } }, - + /** * Called when something is dragged over a Folder Node */ dragOver : function(dragObject) { return true; }, - + /** * Determines if a folder name is unique to the folder tree * @param string name @@ -2717,7 +2713,7 @@ SE.folders = { alert(mod_strings.LBL_ENTER_FOLDER_NAME); return false; } - newName = escape(newName); + newName = escape(newName); var node = SE.clickedFolderNode; var origName = node.data.text //Ignore no change @@ -2733,7 +2729,7 @@ SE.folders = { else { //IMAP folder or POP mailbox var nodePath = node.data.mbox.substring(0, node.data.mbox.lastIndexOf(".") + 1); - AjaxObject.startRequest(callbackFolderRename, urlStandard + "&emailUIAction=renameFolder&ieId=" + AjaxObject.startRequest(callbackFolderRename, urlStandard + "&emailUIAction=renameFolder&ieId=" + node.data.ieId + "&oldFolderName=" + node.data.mbox + "&newFolderName=" + nodePath + newName); } return true; @@ -2742,11 +2738,11 @@ SE.folders = { return false; } }, - + moveFolder : function(folderId, parentFolderId) { if (folderId != parentFolderId) { - AjaxObject.startRequest(callbackFolderRename, urlStandard + "&emailUIAction=moveFolder&folderId=" + AjaxObject.startRequest(callbackFolderRename, urlStandard + "&emailUIAction=moveFolder&folderId=" + folderId + "&newParentId=" + parentFolderId); } }, @@ -2767,8 +2763,8 @@ SE.folders = { * @param string type of Folder selection */ updateSubscriptions : function() { - overlay(app_strings.LBL_EMAIL_REBUILDING_FOLDERS, app_strings.LBL_EMAIL_ONE_MOMENT); - + overlay(app_strings.LBL_EMAIL_REBUILDING_FOLDERS, app_strings.LBL_EMAIL_ONE_MOMENT); + var active = ""; select = document.getElementById('userFolders'); @@ -2782,14 +2778,14 @@ SE.folders = { active += opt.value; } } - + //Add the group folder ids. var group_folders = SUGAR.email2.folders.retrieveGroupFolderSubscriptions(); - for(i=0; i 0) { SE.detailView.getEmailPreview(); @@ -2971,7 +2967,7 @@ SE.listView = { uid = new String(uid); uids = uid.split(','); var dataTableRecords = SE.grid.getRecordSet().getRecords(0, SE.grid.getRecordSet().getLength()); - + for(j=0; j'); - dlg.beforeRenderEvent.subscribe(function() { - var dd = new YAHOO.util.DDProxy(dlg.element); - dd.setHandleElId(dlg.header); - dd.on('endDragEvent', function() { - dlg.show(); - }); - }, dlg, true); + dlg.beforeRenderEvent.subscribe(function() { + var dd = new YAHOO.util.DDProxy(dlg.element); + dd.setHandleElId(dlg.header); + dd.on('endDragEvent', function() { + dlg.show(); + }); + }, dlg, true); dlg.render(); var tp = SE.settings.settingsTabs = new YAHOO.widget.TabView("settingsTabDiv"); @@ -3445,12 +3441,12 @@ SE.settings = { tp.appendTo(dlg.body); } - + SE.settings.settingsDialog.show(); SE.folders.lazyLoadSettings(); SE.accounts.lazyLoad(); }, - + lazyLoadRules : function() { if(false/*!SE.settings.rules*/) { diff --git a/modules/Emails/javascript/EmailUICompose.js b/modules/Emails/javascript/EmailUICompose.js index 019a5913..f1cb075a 100644 --- a/modules/Emails/javascript/EmailUICompose.js +++ b/modules/Emails/javascript/EmailUICompose.js @@ -1287,12 +1287,6 @@ SE.composeLayout = { var box_title = mod_strings.LBL_EMAILTEMPLATE_MESSAGE_SHOW_TITLE; var box_msg = mod_strings.LBL_EMAILTEMPLATE_MESSAGE_SHOW_MSG; var box_none_msg = mod_strings.LBL_EMAILTEMPLATE_MESSAGE_CLEAR_MSG; - //Bug #6224 - var to_addr = document.getElementById('addressTO'+idx); - if (to_addr.value.search(/[^;,]{6,}[;,][^;,]{6,}/) != -1) { - box_title = mod_strings.LBL_EMAILTEMPLATE_MESSAGE_WARNING_TITLE; - box_msg = mod_strings.LBL_EMAILTEMPLATE_MESSAGE_MULTIPLE_RECIPIENTS + '

    ' + box_msg; - } // id is selected index of email template drop-down if(id == '' || id == "0") { diff --git a/modules/Emails/javascript/ajax.js b/modules/Emails/javascript/ajax.js index 389905f9..63132a50 100644 --- a/modules/Emails/javascript/ajax.js +++ b/modules/Emails/javascript/ajax.js @@ -34,7 +34,7 @@ ********************************************************************************/ -if (typeof console == "undefined") +if (typeof console == "undefined") console = { log: function(o) {alert(o)} }; var AjaxObject = { @@ -73,8 +73,8 @@ var AjaxObject = { SUGAR.email2.composeLayout.fromAccounts = ret.fromAccounts; SUGAR.email2.composeLayout.setComposeOptions(idx); - - //Set the error array so we can notify the user when they try to hit send if any errors + + //Set the error array so we can notify the user when they try to hit send if any errors //are present. We will also notify them now (after hitting compose button). SUGAR.email2.composeLayout.outboundAccountErrors = ret.errorArray; @@ -89,7 +89,7 @@ var AjaxObject = { for(i in ret.errorArray) overlay(app_strings.LBL_EMAIL_ERROR_DESC, ret.errorArray[i], 'alert'); } - + //YUI bug with IE6 - Wont restore visibility property for nested select elements. if(SUGAR.isIE) { var overlayPanel = YAHOO.SUGAR.MessageBox.panel; @@ -113,7 +113,7 @@ var AjaxObject = { } setSigEditButtonVisibility(); }, - + /** */ handleDeleteReturn : function(o) { @@ -132,9 +132,6 @@ var AjaxObject = { handleFailure : function(o) { // Failure handler overlay('Exception occurred...', o.statusText, 'alert'); - if(document.getElementById('saveButton')) { - document.getElementById('saveButton').disabled = false; - } }, handleReplyForward : function(o) { @@ -180,18 +177,18 @@ var AjaxObject = { SUGAR.email2.composeLayout.showHiddenAddress('bcc',idx); } - + if(a.type) { document.getElementById('type' + idx).value = a.type; } - + // apply attachment values SUGAR.email2.composeLayout.loadAttachments(a.attachments); setTimeout("callbackReplyForward.finish(globalA);", 500); }, - + /** */ handleSuccess : function(o) { @@ -209,7 +206,7 @@ var AjaxObject = { SUGAR.email2.accounts.refreshInboundAccountTable(); alert(app_strings.LBL_EMAIL_IE_DELETE_SUCCESSFUL); SUGAR.email2.accounts.rebuildFolderList(); - + }, /** @@ -230,9 +227,9 @@ var AjaxObject = { } } else { hideOverlay(); - overlay(app_strings.LBL_EMAIL_ERROR_DESC, app_strings.LBL_EMAIL_ERROR_SAVE_ACCOUNT, 'alert'); + overlay(app_strings.LBL_EMAIL_ERROR_DESC, app_strings.LBL_EMAIL_ERROR_SAVE_ACCOUNT, 'alert'); } - + }, /** @@ -258,7 +255,7 @@ var AjaxObject = { var ret = JSON.parse(o.responseText); if (!ret['status']) { hideOverlay(); - overlay(app_strings.LBL_EMAIL_ERROR_DESC, ret['message'], 'alert'); + overlay(app_strings.LBL_EMAIL_ERROR_DESC, ret['message'], 'alert'); } else { SUGAR.email2.contextMenus.markEmailCleanup(); } // else @@ -311,29 +308,29 @@ var AjaxObject = { } else if (o.responseText) { overlay(mod_strings.LBL_SEND_EMAIL_FAIL_TITLE, o.responseText, 'alert'); } - + if (typeof(SE.grid) != 'undefined') SE.listView.refreshGrid(); //Disabled while address book is disabled - + //If this call back was initiated by quick compose from a Detail View page, refresh the //history subpanel. If it was initiated by quickcreate from shortcut bar, then //close the shortcut bar menu if ( (typeof(action_sugar_grp1) != 'undefined')) { if(action_sugar_grp1 == 'DetailView') { - showSubPanel('history',null,true); + showSubPanel('history',null,true); } else if(action_sugar_grp1 == 'quickcreate') { closeEmailOverlay(); } } - + }, ieSendSuccess : function(o) { hideOverlay(); overlay(app_strings.LBL_EMAIL_TEST_OUTBOUND_SETTINGS_SENT, app_strings.LBL_EMAIL_TEST_NOTIFICATION_SENT, 'plain'); }, - + /** */ settingsFolderRefresh : function(o) { @@ -364,7 +361,7 @@ var AjaxObject = { this.currentRequestObject = YAHOO.util.Connect.asyncRequest('POST', "./index.php", callback, args); this._reset(); }, - + requestInProgress : function() { return (YAHOO.util.Connect.isCallInProgress(this.currentRequestObject)); }, @@ -400,11 +397,11 @@ var AjaxObject = { var idx = SUGAR.email2.composeLayout.currentInstanceId; var overall = document.getElementById('addedFiles' + idx); var index = overall.childNodes.length; - var out = + var out = "
    " + - // remove button + // remove button "" + // file icon "" + // file name - ((ret.nameForDisplay != null) ? ret.nameForDisplay + " " : ret.name + " ") + + ((ret.nameForDisplay != null) ? ret.nameForDisplay + " " : ret.name + " ") + "
    " + "
    "; overall.innerHTML += out; @@ -438,10 +435,10 @@ AjaxObject.accounts = { SUGAR.email2.accounts.newAddedOutboundId = id; }, saveDefaultOutboundCleanup: function(o){ - + }, callbackEditOutbound : { - success : function(o) + success : function(o) { var ret = JSON.parse(o.responseText); // show overlay @@ -456,11 +453,11 @@ AjaxObject.accounts = { document.getElementById("outboundEmailForm").mail_smtptype.value = ret.mail_smtptype; document.getElementById("mail_smtpport").value = ret.mail_smtpport; document.getElementById("mail_smtpuser").value = ret.mail_smtpuser; - //document.getElementById("mail_smtppass").value = ret.mail_smtppass; + document.getElementById("mail_smtppass").value = ret.mail_smtppass; document.getElementById("mail_smtpauth_req").checked = (ret.mail_smtpauth_req == 1) ? true : false; SUGAR.email2.accounts.smtp_authenticate_field_display(); document.getElementById("mail_smtpssl").options[ret.mail_smtpssl].selected = true; - + if(ret.type == 'system-override') { SUGAR.email2.accounts.toggleOutboundAccountDisabledFields(true); SUGAR.email2.accounts.changeEmailScreenDisplay(ret.mail_smtptype,true); @@ -469,8 +466,8 @@ AjaxObject.accounts = { SUGAR.email2.accounts.toggleOutboundAccountDisabledFields(false); SUGAR.email2.accounts.changeEmailScreenDisplay(ret.mail_smtptype,false); } - - + + }, failure : AjaxObject.handleFailure, timeout : AjaxObject.timeout, @@ -481,13 +478,13 @@ AjaxObject.accounts = { var ret = JSON.parse(o.responseText); if(ret.is_error) { - if(confirm(ret.error_message)) + if(confirm(ret.error_message)) { overlay(app_strings.LBL_EMAIL_IE_DELETE, app_strings.LBL_EMAIL_ONE_MOMENT); AjaxObject.startRequest(AjaxObject.accounts.callbackDeleteOutbound, urlStandard + "&emailUIAction=deleteOutbound&confirm=true&outbound_email=" + ret.outbound_email); } else - hideOverlay(); + hideOverlay(); } else { @@ -495,35 +492,35 @@ AjaxObject.accounts = { SUGAR.email2.accounts.refreshOuboundAccountTable(); } }, - + failure : AjaxObject.handleFailure, timeout : AjaxObject.timeout, scope : AjaxObject }, - + callbackCheckMailProgress : { success : function(o) { if (typeof(SUGAR.email2.accounts.totalMsgCount) == "undefined") { SUGAR.email2.accounts.totalMsgCount = -1; } - + //Check for server timeout / errors var ret = JSON.parse(o.responseText); var done = false; - + if (typeof(o.responseText) == 'undefined' || o.responseText == "" || ret == false) { hideOverlay(); overlay(app_strings.LBL_EMAIL_ERROR_DESC, app_strings.LBL_EMAIL_ERROR_TIMEOUT, 'alert'); SUGAR.email2.accounts.totalMsgCount = -1; //SUGAR.email2.folders.rebuildFolders(); done = true; - } - + } + var currIeId = ret['ieid']; - - + + var serverCount = ret.count; - + if (ret['status'] == 'done') { for(i=0; i < SUGAR.email2.accounts.ieIds.length; i++) { if (i == SUGAR.email2.accounts.ieIds.length - 1) { @@ -538,7 +535,7 @@ AjaxObject.accounts = { break; } } - } + } else if (ret.mbox && ret.totalcount && ret.count) { SUGAR.email2.accounts.totalMsgCount = ret.totalcount; if (ret.count >= ret.totalcount) { @@ -552,7 +549,7 @@ AjaxObject.accounts = { SUGAR.email2.accounts.totalMsgCount = -1; done = true; } - + if (done) { SUGAR.email2.accounts.totalMsgCount = -1; hideOverlay(); @@ -560,13 +557,13 @@ AjaxObject.accounts = { SE.listView.refreshGrid(); } else if (SUGAR.email2.accounts.totalMsgCount < 0) { YAHOO.SUGAR.MessageBox.updateProgress(0, mod_strings.LBL_CHECKING_ACCOUNT + ' '+ (i + 2) + ' '+ mod_strings.LBL_OF + ' ' + SUGAR.email2.accounts.ieIds.length); - AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + + AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + '&emailUIAction=checkEmailProgress&ieId=' + currIeId + "¤tCount=0&synch=" + ret.synch); } else { YAHOO.SUGAR.MessageBox.updateProgress((ret.count / SUGAR.email2.accounts.totalMsgCount) * 100, app_strings.LBL_EMAIL_DOWNLOAD_STATUS.replace(/\[\[count\]\]/, ret.count).replace(/\[\[total\]\]/, SUGAR.email2.accounts.totalMsgCount)); - AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + - '&emailUIAction=checkEmailProgress&ieId=' + currIeId + "¤tCount=" + serverCount + + AjaxObject.startRequest(AjaxObject.accounts.callbackCheckMailProgress, urlStandard + + '&emailUIAction=checkEmailProgress&ieId=' + currIeId + "¤tCount=" + serverCount + '&mbox=' + ret.mbox + '&synch=' + ret.synch + '&totalcount=' + SUGAR.email2.accounts.totalMsgCount); } }, @@ -587,7 +584,7 @@ AjaxObject.composeLayout = { var ret = JSON.parse(o.responseText); if(ret) SUGAR.email2.composeLayout.forceCloseCompose(ret.composeLayoutId); - else if (o.responseText) + else if (o.responseText) overlay(mod_strings.LBL_ERROR_SAVING_DRAFT, o.responseText, 'alert'); } }; @@ -615,7 +612,7 @@ AjaxObject.detailView = { if (typeof(email.cc) == 'undefined') { email.cc = ""; } - + var out = displayTemplate.exec({ 'app_strings' : app_strings, 'theme' : theme, @@ -625,7 +622,7 @@ AjaxObject.detailView = { }); // open popup window - var popup = window.open('modules/Emails/templates/_blank.html', 'printwin' , + var popup = window.open('modules/Emails/templates/_blank.html', 'printwin' , 'scrollbars=yes,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); popup.document.write(out); @@ -660,7 +657,7 @@ AjaxObject.detailView = { SED.viewDialog.setHeader(ret.title); SED.viewDialog.setBody(ret.html); SED.viewDialog.render(); - SED.viewDialog.show(); + SED.viewDialog.show(); }, /** @@ -678,7 +675,7 @@ AjaxObject.detailView = { constraintoviewport: true, shadow : true }); - + SED.quickCreateDialog.renderEvent.subscribe(function() { var viewH = YAHOO.util.Dom.getViewportHeight(); var contH = 0; @@ -693,7 +690,7 @@ AjaxObject.detailView = { this.body.style.height = (viewH - 75 > contH ? (contH + 10) : (viewH - 75)) + "px"; this.body.style.overflow = "auto"; }, SED.quickCreateDialog); - + SED.quickCreateDialog.hideEvent.subscribe(function(){ var qsFields = YAHOO.util.Dom.getElementsByClassName('.sqsEnabled', null, this.body); /*for(var qsField in qsFields){ @@ -709,29 +706,29 @@ AjaxObject.detailView = { SED.quickCreateDialog.setBody(ret.html ? ret.html : " "); SED.quickCreateDialog.render(); SUGAR.util.evalScript(ret.html + ''); - + SED.quickCreateDialog.ieId = ret.ieId; SED.quickCreateDialog.uid = ret.uid; SED.quickCreateDialog.mbox = ret.mbox; SED.quickCreateDialog.qcmodule = ret.module; - + SED.quickCreateDialog.show(); var editForm = document.getElementById('form_EmailQCView_' + ret.module); if (editForm) { editForm.module.value = 'Emails'; - var count = SUGAR.EmailAddressWidget.count[ret.module] ? SUGAR.EmailAddressWidget.count[ret.module] : 0; + var count = SUGAR.EmailAddressWidget.count[ret.module] ? SUGAR.EmailAddressWidget.count[ret.module] : 0; var tableId = YAHOO.util.Dom.getElementsByClassName('emailaddresses', 'table', editForm)[0].id; var instId = ret.module + count; SED.quickCreateEmailsToAdd = ret.emailAddress; SED.quickCreateEmailCallback = function(instId, tableId) { var eaw = SUGAR.EmailAddressWidget.instances[instId]; if (typeof(eaw) == "undefined") - window.setTimeout("SUGAR.email2.detailView.quickCreateEmailCallback('" + window.setTimeout("SUGAR.email2.detailView.quickCreateEmailCallback('" + instId + "','" + tableId + "');", 100); eaw.prefillEmailAddresses(tableId, SUGAR.email2.detailView.quickCreateEmailsToAdd); } - window.setTimeout("SUGAR.email2.detailView.quickCreateEmailCallback('" + window.setTimeout("SUGAR.email2.detailView.quickCreateEmailCallback('" + instId + "','" + tableId + "');", 100); } }, @@ -764,7 +761,7 @@ AjaxObject.detailView = { SUGAR.email2.complexLayout.findPanel('contactsTab').show(); validate['EditView'] = [ ]; }, - + handleAssignmentDialogAssignAction : function() { @@ -781,7 +778,7 @@ AjaxObject.detailView = { alert(warning_message); return; } - + var emailUids = SUGAR.email2.listView.getUidsFromSelection(); var uids = ""; for(i=0; i 'Please check!', 'LBL_EMAILTEMPLATE_MESSAGE_SHOW_MSG' => 'Selecting this template will overwrite any data already entered within the email body. Do you wish to continue?', 'LBL_EMAILTEMPLATE_MESSAGE_CLEAR_MSG' => 'Selecting "--None--" will clear any data already entered within the email body. Do you wish to continue?', - 'LBL_EMAILTEMPLATE_MESSAGE_WARNING_TITLE' => 'Warning', - 'LBL_EMAILTEMPLATE_MESSAGE_MULTIPLE_RECIPIENTS' => 'Using an email template containing contact variables, such as the contact name, to send emails to multiple recipients may have unexpected results. It is recommended that you use an email campaign for mass mailings.', 'LBL_CHECK_ATTACHMENTS'=>'Please Check Attachments!', 'LBL_HAS_ATTACHMENTS' => 'This email already has attachment(s). Would you like to keep the attachment(s)?', 'ERR_MISSING_REQUIRED_FIELDS' => 'Missing required field', diff --git a/modules/Emails/metadata/qcmodulesdefs.php b/modules/Emails/metadata/qcmodulesdefs.php deleted file mode 100644 index 573f802e..00000000 --- a/modules/Emails/metadata/qcmodulesdefs.php +++ /dev/null @@ -1,45 +0,0 @@ -
    @@ -111,6 +111,7 @@ diff --git a/modules/Emails/templates/outboundDialog.tpl b/modules/Emails/templates/outboundDialog.tpl index 4effac25..2179ce17 100644 --- a/modules/Emails/templates/outboundDialog.tpl +++ b/modules/Emails/templates/outboundDialog.tpl @@ -108,8 +108,7 @@ diff --git a/modules/Employees/Employee.php b/modules/Employees/Employee.php index 7dff5463..d79fa114 100644 --- a/modules/Employees/Employee.php +++ b/modules/Employees/Employee.php @@ -208,18 +208,15 @@ class Employee extends Person { return $query; } - //use parent class /** * Generate the name field from the first_name and last_name fields. */ - /* function _create_proper_name_field() { global $locale; $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name); $this->name = $full_name; $this->full_name = $full_name; } - */ function preprocess_fields_on_save(){ parent::preprocess_fields_on_save(); diff --git a/include/SugarCharts/Jit/css/base.css b/modules/Employees/EmployeeStatus.php similarity index 54% rename from include/SugarCharts/Jit/css/base.css rename to modules/Employees/EmployeeStatus.php index aa83b954..ad5577ae 100644 --- a/include/SugarCharts/Jit/css/base.css +++ b/modules/Employees/EmployeeStatus.php @@ -1,3 +1,5 @@ +user_name + && isset($sugar_config['lock_default_user_name']) + && $sugar_config['lock_default_user_name']) + { + $employee_status .= " disabled "; + } + $employee_status .= ">"; + $employee_status .= get_select_options_with_id($app_list_strings['employee_status_dom'], $focus->employee_status); + $employee_status .= "\n"; + } else { + $employee_status = ''; + } + return $employee_status; + } //if($view == 'EditView') + + if ( isset($app_list_strings['employee_status_dom'][$focus->employee_status]) ) + return $app_list_strings['employee_status_dom'][$focus->employee_status]; + + return $focus->employee_status; } -/*TOOLTIPS*/ -.tip { - color: #111; - width: auto; - background-color: white; - border:1px solid #ccc; - -moz-box-shadow:#555 2px 2px 8px; - -webkit-box-shadow:#555 2px 2px 8px; - -o-box-shadow:#555 2px 2px 8px; - box-shadow:#555 2px 2px 8px; - opacity:0.9; - filter:alpha(opacity=90); - font-size:11px; - font-family: Arial, Helvetica, sans-serif; - padding:7px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} -.rotatedLabel { --webkit-transform: rotate(-90deg); --moz-transform: rotate(-90deg); -filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); +function getMessengerTypeOptions($focus, $name = 'messenger_type', $value, $view = 'DetailView') { + global $current_user, $app_list_strings; + if($view == 'EditView' || $view == 'MassUpdate') { + $messenger_type = "'; + return $messenger_type; + } + + return $app_list_strings['messenger_type_dom'][$focus->messenger_type]; } -.rotatedLabelReverse { --webkit-transform: rotate(-0deg); --moz-transform: rotate(90deg); -filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -} \ No newline at end of file +?> diff --git a/modules/Employees/Save.php b/modules/Employees/Save.php index 79a99def..2a11c64b 100644 --- a/modules/Employees/Save.php +++ b/modules/Employees/Save.php @@ -51,11 +51,9 @@ parse_str($tabs_def,$DISPLAY_ARR); $focus = new Employee(); - $focus->retrieve($_POST['record']); //rrs bug: 30035 - I am not sure how this ever worked b/c old_reports_to_id was not populated. $old_reports_to_id = $focus->reports_to_id; - populateFromRow($focus,$_POST); $focus->save(); @@ -70,17 +68,13 @@ if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST[ $GLOBALS['log']->debug("Saved record with id of ".$return_id); - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); - function populateFromRow(&$focus,$row){ - - //only employee specific field values need to be copied. - $e_fields=array('first_name','last_name','reports_to_id','description','phone_home','phone_mobile','phone_work','phone_other','phone_fax','address_street','address_city','address_state','address_country','address_country', 'address_postalcode', 'messenger_id','messenger_type'); + $e_fields=array('employee_status', 'first_name','last_name','reports_to_id','description','phone_home','phone_mobile','phone_work','phone_other','phone_fax','address_street','address_city','address_state','address_country','address_country', 'address_postalcode', 'messenger_id','messenger_type'); if ( is_admin($GLOBALS['current_user']) ) - $e_fields = array_merge($e_fields,array('title','department','employee_status')); + $e_fields = array_merge($e_fields,array('title','department')); $nullvalue=''; foreach($e_fields as $field) { diff --git a/modules/Employees/metadata/editviewdefs.php b/modules/Employees/metadata/editviewdefs.php index 1af40f7b..fe76c4d5 100644 --- a/modules/Employees/metadata/editviewdefs.php +++ b/modules/Employees/metadata/editviewdefs.php @@ -35,9 +35,9 @@ ********************************************************************************/ $viewdefs['Employees']['EditView'] = array( - 'templateMeta' => array('maxColumns' => '2', + 'templateMeta' => array('maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30') ), ), @@ -45,11 +45,7 @@ $viewdefs['Employees']['EditView'] = array( 'default'=>array ( array ( - array('name' => 'employee_status', - 'customCode' => ' -'), + 'employee_status', ), array ( 'first_name', @@ -58,14 +54,14 @@ $viewdefs['Employees']['EditView'] = array( array ( array( 'name'=>'title', - 'customCode' => '{if $EDIT_REPORTS_TO}'. + 'customCode' => '{if $EDIT_REPORTS_TO}'. '{else}{$fields.title.value}{/if}'), array('name'=>'phone_work','label'=>'LBL_OFFICE_PHONE'), ), array ( array( - 'name'=>'department', - 'customCode' => '{if $EDIT_REPORTS_TO}'. + 'name'=>'department', + 'customCode' => '{if $EDIT_REPORTS_TO}'. '{else}{$fields.department.value}{/if}'), 'phone_mobile', ), diff --git a/modules/Employees/metadata/listviewdefs.php b/modules/Employees/metadata/listviewdefs.php index efbd9206..6cd31157 100644 --- a/modules/Employees/metadata/listviewdefs.php +++ b/modules/Employees/metadata/listviewdefs.php @@ -52,12 +52,12 @@ $listViewDefs['Employees'] = array( 'link' => true, 'default' => true), 'TITLE' => array( - 'width' => '15', + 'width' => '20', 'label' => 'LBL_TITLE', 'link' => true, 'default' => true), 'REPORTS_TO_NAME' => array( - 'width' => '15', + 'width' => '20', 'label' => 'LBL_LIST_REPORTS_TO_NAME', 'link' => true, 'sortable' => false, @@ -79,9 +79,6 @@ $listViewDefs['Employees'] = array( 'label' => 'LBL_LIST_EMPLOYEE_STATUS', 'link' => false, 'default' => true), - 'DATE_ENTERED' => array ( - 'width' => '10', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true), + ); ?> diff --git a/modules/Employees/views/view.edit.php b/modules/Employees/views/view.edit.php index d939509e..14aea41f 100644 --- a/modules/Employees/views/view.edit.php +++ b/modules/Employees/views/view.edit.php @@ -49,16 +49,12 @@ require_once('include/MVC/View/views/view.edit.php'); class EmployeesViewEdit extends ViewEdit { - function display() - { - global $sugar_config; - if(!empty($sugar_config['default_user_name']) - && $sugar_config['default_user_name'] == $this->bean->user_name - && !empty($sugar_config['lock_default_user_name'])) - { - $this->ss->assign('STATUS_DISABLE', true); - } - if(is_admin($GLOBALS['current_user'])) { + function EmployeesViewEdit(){ + parent::ViewEdit(); + } + + function display() { + if(is_admin($GLOBALS['current_user'])) { $json = getJSONobj(); require_once('include/QuickSearchDefaults.php'); $qsd = new QuickSearchDefaults(); diff --git a/modules/Employees/views/view.list.php b/modules/Employees/views/view.list.php index ad278e81..5f47f723 100644 --- a/modules/Employees/views/view.list.php +++ b/modules/Employees/views/view.list.php @@ -44,14 +44,12 @@ class EmployeesViewList extends ViewList { $this->lv = new ListViewSmarty(); $this->lv->delete = false; - $this->lv->email = false; if (!is_admin($GLOBALS['current_user'])&& !is_admin_for_module($GLOBALS['current_user'],'Users')){ $this->lv->multiSelect = false; } } - public function listViewProcess() - { + function listViewProcess(){ $this->processSearchForm(); $this->lv->searchColumns = $this->searchForm->searchColumns; @@ -68,5 +66,7 @@ class EmployeesViewList extends ViewList $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']); echo $this->lv->display(); } + + } } diff --git a/modules/Groups/DetailView.php b/modules/Groups/DetailView.php index 8aaf2c4b..f4970476 100644 --- a/modules/Groups/DetailView.php +++ b/modules/Groups/DetailView.php @@ -57,7 +57,7 @@ if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) { header("Location: index.php?module=Groups&action=index"); } -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->user_name), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->user_name, true); /* end standard DetailView layout process */ diff --git a/modules/Groups/EditView.php b/modules/Groups/EditView.php index 2a77adf7..81dcae59 100644 --- a/modules/Groups/EditView.php +++ b/modules/Groups/EditView.php @@ -58,7 +58,7 @@ if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { $focus->user_name = ""; } -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->last_name." (".$focus->user_name.")"), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->last_name." (".$focus->user_name.")", true); $GLOBALS['log']->info("Groups edit view"); $xtpl= new XTemplate ('modules/Groups/EditView.html'); diff --git a/modules/Home/About.php b/modules/Home/About.php index ae07bfa4..6f8f6287 100644 --- a/modules/Home/About.php +++ b/modules/Home/About.php @@ -158,32 +158,29 @@ echo $theProductName."™ ".$mod_strings['LBL_AND']." Sugar™ ".$mod_st diff --git a/modules/Home/views/view.additionaldetailsretrieve.php b/modules/Home/AdditionalDetailsRetrieve.php similarity index 52% rename from modules/Home/views/view.additionaldetailsretrieve.php rename to modules/Home/AdditionalDetailsRetrieve.php index 24614412..6e670ebf 100644 --- a/modules/Home/views/view.additionaldetailsretrieve.php +++ b/modules/Home/AdditionalDetailsRetrieve.php @@ -42,57 +42,40 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ -require_once('include/MVC/View/SugarView.php'); - -class HomeViewAdditionaldetailsretrieve extends SugarView -{ - public function display() - { - global $beanList, $beanFiles, $current_user, $app_strings; - - $moduleDir = empty($_REQUEST['bean']) ? '' : $_REQUEST['bean']; - $beanName = empty($beanList[$moduleDir]) ? '' : $beanList[$moduleDir]; - $id = empty($_REQUEST['id']) ? '' : $_REQUEST['id']; - - // Bug 40216 - Add support for a custom additionalDetails.php file - $additionalDetailsFile = $this->getAdditionalDetailsMetadataFile($moduleDir); - - if(empty($beanFiles[$beanName]) || - empty($id) || !is_file($additionalDetailsFile) ) { - echo 'bad data'; - die(); - } - - require_once($beanFiles[$beanName]); - require_once($additionalDetailsFile); - $adFunction = 'additionalDetails' . $beanName; - - if(function_exists($adFunction)) { // does the additional details function exist - $json = getJSONobj(); - $bean = new $beanName(); - $bean->retrieve($id); - $arr = array_change_key_case($bean->toArray(), CASE_UPPER); - - $results = $adFunction($arr); - $retArray['body'] = str_replace(array("\rn", "\r", "\n"), array('','','
    '), $results['string']); - if(!$bean->ACLAccess('EditView')) $results['editLink'] = ''; - - $retArray['caption'] = "
    {$app_strings['LBL_ADDITIONAL_DETAILS']}
    "; - $retArray['caption'] .= ""; - $retArray['width'] = (empty($results['width']) ? '300' : $results['width']); - echo 'result = ' . $json->encode($retArray); - } - } + +global $beanList, $beanFiles, $current_user; + +$moduleDir = empty($_REQUEST['bean']) ? '' : $_REQUEST['bean']; +$beanName = empty($beanList[$moduleDir]) ? '' : $beanList[$moduleDir]; +$id = empty($_REQUEST['id']) ? '' : $_REQUEST['id']; + + +if(empty($beanFiles[$beanName]) || + empty($id) || !is_file(substr($beanFiles[$beanName], 0, strrpos($beanFiles[$beanName], '/')) . '/metadata/additionalDetails.php')) { + echo 'bad data'; + die(); +} + +require_once($beanFiles[$beanName]); +require_once(substr($beanFiles[$beanName], 0, strrpos($beanFiles[$beanName], '/')) . '/metadata/additionalDetails.php'); +$adFunction = 'additionalDetails' . $beanName; + +if(function_exists($adFunction)) { // does the additional details function exist + global $theme; + $json = getJSONobj(); + $bean = new $beanName(); + $bean->retrieve($id); + $arr = array_change_key_case($bean->toArray(), CASE_UPPER); + + $results = $adFunction($arr); + $retArray['body'] = str_replace(array("\rn", "\r", "\n"), array('','','
    '), $results['string']); + if(!$bean->ACLAccess('EditView')) $results['editLink'] = ''; - protected function getAdditionalDetailsMetadataFile( - $moduleName - ) - { - $additionalDetailsFile = 'modules/' . $moduleName . '/metadata/additionalDetails.php'; - if (file_exists('custom/'.$additionalDetailsFile)) { - $additionalDetailsFile = 'custom/'.$additionalDetailsFile; - } - - return $additionalDetailsFile; - } -} \ No newline at end of file +$retArray['caption'] = "
    {$app_strings['LBL_ADDITIONAL_DETAILS']}
    " . (!empty($results['editLink']) ? "" : ''); + $retArray['caption'] .= (!empty($results['viewLink']) ? "" : '') . ""; + $retArray['width'] = (empty($results['width']) ? '300' : $results['width']); + $retArray['theme'] = $theme; + echo 'result = ' . $json->encode($retArray); +} + +?> \ No newline at end of file diff --git a/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php b/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php index ff7a752b..06a697ae 100644 --- a/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php +++ b/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php @@ -42,4 +42,4 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dashletStrings['ChartsDashlet'] = array('LBL_TITLE' => 'Charts', 'LBL_DESCRIPTION' => 'A dashlet to display charts', 'LBL_CONFIGURE_TITLE' => 'Title', ); -?> \ No newline at end of file +?> diff --git a/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php b/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php index 6dd16a15..e08151a5 100644 --- a/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php +++ b/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php @@ -73,7 +73,7 @@ class ChartsDashlet extends Dashlet { require_once("modules/Reports/Report.php"); -// ini_set('display_errors', 'false'); + ini_set('display_errors', 'false'); $chartReport = new SavedReport(); $chartExists = $chartReport->retrieve($this->report_id, false); @@ -124,17 +124,21 @@ class ChartsDashlet extends Dashlet { $this->title = $chartReport->name; require_once("modules/Reports/templates/templates_chart.php"); - require_once('include/SugarCharts/SugarChartFactory.php'); - - $sugarChart = SugarChartFactory::getInstance(); - - + $reporter = new Report($chartReport->content); $reporter->is_saved_report = true; $reporter->saved_report_id = $chartReport->id; $xmlFile = get_cache_file_name($reporter); - - $str = $sugarChart->getDashletScript($this->id,$xmlFile); + + $ss = new Sugar_Smarty(); + $ss->assign('chartName', $this->id); + $ss->assign('chartXMLFile', $xmlFile); + + $ss->assign('chartStyleCSS', SugarThemeRegistry::current()->getCSSURL('chart.css')); + $ss->assign('chartColorsXML', SugarThemeRegistry::current()->getImageURL('sugarColors.xml')); + $ss->assign('chartLangFile', $GLOBALS['sugar_config']['tmp_dir'].'chart_strings.' . $GLOBALS['current_language'] .'.lang.xml'); + + $str = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl'); return $str; } } diff --git a/modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl b/modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl index b1dfb31a..7a4041ba 100644 --- a/modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl +++ b/modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl @@ -41,5 +41,5 @@ *} diff --git a/modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.en_us.lang.php b/modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.en_us.lang.php index c94a3e12..5941ace9 100644 --- a/modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.en_us.lang.php +++ b/modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.en_us.lang.php @@ -47,4 +47,4 @@ $dashletStrings['InvadersDashlet'] = array( 'LBL_GAME_OVER' => 'Game Over
    (Click to play again)', ); -?> \ No newline at end of file +?> diff --git a/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php b/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php index 3cb8cb9a..45d31632 100644 --- a/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php +++ b/modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.en_us.lang.php @@ -48,4 +48,4 @@ $dashletStrings['JotPadDashlet'] = array('LBL_TITLE' => 'JotPad', 'LBL_DBLCLICK_HELP' => 'Double click below to Edit.', 'LBL_DEFAULT_TEXT' => $defaultText, ); -?> \ No newline at end of file +?> \ No newline at end of file diff --git a/modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php b/modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php index c877b6f2..1dbc13fa 100644 --- a/modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php +++ b/modules/Home/Dashlets/RSSDashlet/RSSDashlet.en_us.lang.php @@ -51,4 +51,4 @@ $dashletStrings['RSSDashlet'] = array('LBL_TITLE' => 'News Feed', 'LBL_DBLCLICK_HELP' => '', 'ERR_LOADING_FEED' => 'Failed loading RSS Feed', ); -?> \ No newline at end of file +?> diff --git a/modules/Home/Dashlets/RSSDashlet/RSSDashlet.php b/modules/Home/Dashlets/RSSDashlet/RSSDashlet.php index dc286dad..ca83cf80 100644 --- a/modules/Home/Dashlets/RSSDashlet/RSSDashlet.php +++ b/modules/Home/Dashlets/RSSDashlet/RSSDashlet.php @@ -67,8 +67,6 @@ class RSSDashlet extends Dashlet else $this->title = $this->dashletStrings['LBL_TITLE']; - if(isset($def['autoRefresh'])) $this->autoRefresh = $def['autoRefresh']; - parent::Dashlet($id); // call parent constructor $this->isConfigurable = true; // dashlet is configurable @@ -109,12 +107,6 @@ class RSSDashlet extends Dashlet $ss->assign('height', $this->height); $ss->assign('url', $this->url); $ss->assign('id', $this->id); - if($this->isAutoRefreshable()) { - $ss->assign('isRefreshable', true); - $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $ss->assign('autoRefreshSelect', $this->autoRefresh); - } return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl'); } @@ -133,8 +125,7 @@ class RSSDashlet extends Dashlet $options['title'] = $req['title']; $options['url'] = $req['url']; $options['height'] = $req['height']; - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; - + return $options; } diff --git a/modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl b/modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl index 0a139376..6ceb3d9a 100644 --- a/modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl +++ b/modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl @@ -54,18 +54,6 @@
    -{if $isRefreshable} - - - - -{/if} {/if} - {foreach from=$custom_mappings item=item name=custommappings} - {capture assign=mapping_label}{$MOD.LBL_CUSTOM_MAPPING_}{$item|upper}{/capture} - - - - {/foreach} {foreach from=$custom_imports key=key item=item name=saved} {if $smarty.foreach.saved.first} diff --git a/modules/Import/tpls/step3.tpl b/modules/Import/tpls/step3.tpl index edf4fe7a..4eca2554 100644 --- a/modules/Import/tpls/step3.tpl +++ b/modules/Import/tpls/step3.tpl @@ -116,8 +116,8 @@ textarea { width: 20em } {if $item.show_remove} {else} @@ -130,14 +130,14 @@ textarea { width: 20em } {/foreach} - + @@ -194,14 +194,14 @@ textarea { width: 20em } @@ -215,7 +215,7 @@ textarea { width: 20em } - +
    diff --git a/modules/Connectors/views/view.connectorsettings.php b/modules/Connectors/views/view.connectorsettings.php index 82aa5e78..7b0bd1d4 100644 --- a/modules/Connectors/views/view.connectorsettings.php +++ b/modules/Connectors/views/view.connectorsettings.php @@ -42,7 +42,7 @@ class ViewConnectorSettings extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; @@ -67,7 +67,7 @@ class ViewConnectorSettings extends SugarView { global $mod_strings, $app_strings; - echo $this->getModuleTitle(false); + echo $this->getModuleTitle(); $this->ss->assign('mod', $mod_strings); $this->ss->assign('app', $app_strings); diff --git a/modules/Connectors/views/view.displayproperties.php b/modules/Connectors/views/view.displayproperties.php index b2fff5d8..4dacabed 100644 --- a/modules/Connectors/views/view.displayproperties.php +++ b/modules/Connectors/views/view.displayproperties.php @@ -40,12 +40,12 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/MVC/View/views/view.list.php'); require_once('include/connectors/sources/SourceFactory.php'); -class ViewDisplayProperties extends ViewList +class ViewDisplayProperties extends ViewList { /** * @see SugarView::process() */ - public function process() + public function process() { $this->options['show_all'] = false; $this->options['show_javascript'] = true; @@ -53,31 +53,31 @@ class ViewDisplayProperties extends ViewList $this->options['show_header'] = false; parent::process(); } - + /** * @see SugarView::display() */ - public function display() + public function display() { require_once('include/connectors/utils/ConnectorUtils.php'); $source = $_REQUEST['source_id']; $sources = ConnectorUtils::getConnectors(); - $modules_sources = ConnectorUtils::getDisplayConfig(); + $modules_sources = ConnectorUtils::getDisplayConfig(); //$json = getJSONobj(); - + $enabled_modules = array(); $disabled_modules = array(); - + //Find all modules this source has been enabled for foreach($modules_sources as $module=>$mapping) { foreach($modules_sources[$module] as $entry) { if($entry == $source) { $enabled_modules[$module] = $module; } - } + } } - + global $moduleList, $beanList; //Do filtering here? $count = 0; @@ -91,25 +91,22 @@ class ViewDisplayProperties extends ViewList $disabled_modules[$e] = $e; } } - + asort($enabled_modules); asort($disabled_modules); //$enabled = $json->encode($enabled_modules); //$disabled = $json->encode($disabled_modules); - //$script = "addTable('{$module}', '{$enabled}', '{$disabled}', '{$source}', '{$GLOBALS['theme']}');\n"; + //$script = "addTable('{$module}', '{$enabled}', '{$disabled}', '{$source}', '{$GLOBALS['theme']}');\n"; //$this->ss->assign('new_modules_sources', $modules_sources); //$this->ss->assign('dynamic_script', $script); - + $this->ss->assign('enabled_modules', $enabled_modules); $this->ss->assign('disabled_modules', $disabled_modules); $this->ss->assign('source_id', $source); $this->ss->assign('mod', $GLOBALS['mod_strings']); $this->ss->assign('APP', $GLOBALS['app_strings']); $this->ss->assign('theme', $GLOBALS['theme']); - $this->ss->assign('external', !empty($sources[$source]['eapm'])); - $this->ss->assign('externalOnly', !empty($sources[$source]['eapm']['only'])); - $this->ss->assign('externalChecked', !empty($sources[$source]['eapm']['enabled'])?" checked":""); - echo $this->ss->fetch('modules/Connectors/tpls/display_properties.tpl'); + echo $this->ss->fetch('modules/Connectors/tpls/display_properties.tpl'); } } \ No newline at end of file diff --git a/modules/Connectors/views/view.modifydisplay.php b/modules/Connectors/views/view.modifydisplay.php index 093ea189..f3bce075 100644 --- a/modules/Connectors/views/view.modifydisplay.php +++ b/modules/Connectors/views/view.modifydisplay.php @@ -45,7 +45,7 @@ class ViewModifyDisplay extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; diff --git a/modules/Connectors/views/view.modifymapping.php b/modules/Connectors/views/view.modifymapping.php index b2f9e72a..0ce8338a 100644 --- a/modules/Connectors/views/view.modifymapping.php +++ b/modules/Connectors/views/view.modifymapping.php @@ -45,7 +45,7 @@ class ViewModifyMapping extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; @@ -75,13 +75,6 @@ class ViewModifyMapping extends SugarView $this->ss->assign('mod', $mod_strings); $this->ss->assign('APP', $app_strings); $connectors = ConnectorUtils::getConnectors(true); - foreach($connectors as $id=>$source) { - $s = SourceFactory::getSource($id); - $mapping = $s->getMapping(); - if(empty($mapping)) { - unset($connectors[$id]); - } - } $this->ss->assign('SOURCES', $connectors); echo $this->getModuleTitle(); diff --git a/modules/Connectors/views/view.modifyproperties.php b/modules/Connectors/views/view.modifyproperties.php index 9cb7a579..40057145 100644 --- a/modules/Connectors/views/view.modifyproperties.php +++ b/modules/Connectors/views/view.modifyproperties.php @@ -44,7 +44,7 @@ class ViewModifyProperties extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; @@ -78,25 +78,17 @@ class ViewModifyProperties extends SugarView $connectors = ConnectorUtils::getConnectors(true); $required_fields = array(); //Get required fields for first connector only - - $connectorsToShow = $connectors; foreach($connectors as $id=>$entry) { - $s = SourceFactory::getSource($id); - $connector_strings = ConnectorUtils::getConnectorStrings($id); - $fields = $s->getRequiredConfigFields(); - - if(empty($fields)){ - unset($connectorsToShow[$id]); - }else{ - if(empty($required_fields)){ - foreach($fields as $field_id) { - $label = isset($connector_strings[$field_id]) ? $connector_strings[$field_id] : $field_id; - $required_fields[$id][$field_id]=$label; - } - } - } + $s = SourceFactory::getSource($id); + $connector_strings = ConnectorUtils::getConnectorStrings($id); + $fields = $s->getRequiredConfigFields(); + foreach($fields as $field_id) { + $label = isset($connector_strings[$field_id]) ? $connector_strings[$field_id] : $field_id; + $required_fields[$id][$field_id]=$label; + } + break; } - $this->ss->assign('SOURCES', $connectorsToShow); + $this->ss->assign('SOURCES', $connectors); $this->ss->assign('REQUIRED_FIELDS', $required_fields); echo $this->getModuleTitle(); $this->ss->display('modules/Connectors/tpls/modify_properties.tpl'); diff --git a/modules/Connectors/views/view.modifysearch.php b/modules/Connectors/views/view.modifysearch.php index ed634cd1..f3b4a15b 100644 --- a/modules/Connectors/views/view.modifysearch.php +++ b/modules/Connectors/views/view.modifysearch.php @@ -46,7 +46,7 @@ class ViewModifySearch extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; diff --git a/modules/Contacts/BusinessCard.php b/modules/Contacts/BusinessCard.php index cd62abcf..e7e14ab2 100644 --- a/modules/Contacts/BusinessCard.php +++ b/modules/Contacts/BusinessCard.php @@ -51,7 +51,7 @@ global $theme; $error_msg = ''; global $current_language; $mod_strings = return_module_language($current_language, 'Contacts'); -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_BUSINESSCARD']), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_BUSINESSCARD'], true); $xtpl=new XTemplate ('modules/Contacts/BusinessCard.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); diff --git a/modules/Contacts/Contact.php b/modules/Contacts/Contact.php index e49d2534..775eb606 100644 --- a/modules/Contacts/Contact.php +++ b/modules/Contacts/Contact.php @@ -203,7 +203,7 @@ class Contact extends Person { //if this is from "contact address popup" action, then process popup list query if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'ContactAddressPopup'){ return $this->address_popup_create_new_list_query($order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect); - + }else{ //any other action goes to parent function in sugarbean if(strpos($order_by,'sync_contact') !== false){ @@ -212,7 +212,7 @@ class Contact extends Person { $order_by = ''; } return parent::create_new_list_query($order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect); - } + } } @@ -256,7 +256,7 @@ class Contact extends Person { $from_query .= $custom_join['join']; } $ret_array['from'] = $from_query; - $ret_array['from_min'] = 'from contacts'; + $ret_array['from_min'] = 'from contacts'; $where_auto = '1=1'; if($show_deleted == 0){ @@ -273,33 +273,33 @@ class Contact extends Person { $where_query = "where ".$where_auto; } - + $ret_array['where'] = $where_query; - $orderby_query = ''; + $orderby_query = ''; if(!empty($order_by)){ $orderby_query = " ORDER BY ". $this->process_order_by($order_by, null); } $ret_array['order_by'] = $orderby_query ; - + if($return_array) { return $ret_array; - } - + } + return $ret_array['select'] . $ret_array['from'] . $ret_array['where']. $ret_array['order_by']; } - - + + function create_export_query(&$order_by, &$where, $relate_link_join='') { $custom_join = $this->custom_fields->getJOIN(true, true,$where); if($custom_join) $custom_join['join'] .= $relate_link_join; $query = "SELECT - contacts.*,email_addresses.email_address email_address, + contacts.*,email_addresses.email_address email1, accounts.name as account_name, users.user_name as assigned_user_name "; if($custom_join){ @@ -312,11 +312,11 @@ class Contact extends Person { ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0)) LEFT JOIN accounts ON accounts_contacts.account_id=accounts.id "; - + //join email address table too. $query .= ' LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Contacts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 '; $query .= ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ; - + if($custom_join){ $query .= $custom_join['join']; } @@ -335,13 +335,13 @@ class Contact extends Person { return $query; } - function fill_in_additional_list_fields() { + function fill_in_additional_list_fields() { parent::fill_in_additional_list_fields(); $this->_create_proper_name_field(); // cn: bug 8586 - l10n names for Contacts in Email TO: field $this->email_and_name1 = "{$this->full_name} <".$this->email1.">"; $this->email_and_name2 = "{$this->full_name} <".$this->email2.">"; - + if($this->force_load_details == true) { $this->fill_in_additional_detail_fields(); } @@ -349,9 +349,8 @@ class Contact extends Person { function fill_in_additional_detail_fields() { parent::fill_in_additional_detail_fields(); - if(empty($this->id)) return; - - global $locale, $app_list_strings, $current_user; + global $locale, $app_list_strings, $current_user; + // retrieve the account information and the information about the person the contact reports to. $query = "SELECT acc.id, acc.name, con_reports_to.first_name, con_reports_to.last_name @@ -360,11 +359,7 @@ class Contact extends Person { left join accounts acc on a_c.account_id = acc.id and acc.deleted=0 left join contacts con_reports_to on con_reports_to.id = contacts.reports_to_id where contacts.id = '".$this->id."'"; - // Bug 43196 - If a contact is related to multiple accounts, make sure we pull the one we are looking for - if ( !empty($this->account_id) ) { - $query .= " and acc.id = '{$this->account_id}'"; - } - + $result = $this->db->query($query,true," Error filling in additional detail fields: "); // Get the id and the name. @@ -397,11 +392,11 @@ class Contact extends Person { } // Set campaign name if there is a campaign id if( !empty($this->campaign_id)){ - + $camp = new Campaign(); $where = "campaigns.id='{$this->campaign_id}'"; $campaign_list = $camp->get_full_list("campaigns.name", $where, true); - $this->campaign_name = $campaign_list[0]->name; + $this->campaign_name = $campaign_list[0]->name; } } @@ -500,7 +495,7 @@ class Contact extends Person { function set_notification_body($xtpl, $contact) { global $locale; - + $xtpl->assign("CONTACT_NAME", trim($locale->getLocaleFormattedName($contact->first_name, $contact->last_name))); $xtpl->assign("CONTACT_DESCRIPTION", $contact->description); @@ -553,10 +548,10 @@ class Contact extends Person { return false; } function get_unlinked_email_query($type=array()) { - + return get_unlinked_email_query($type, $this); } - + /** * used by import to add a list of users * @@ -566,27 +561,27 @@ class Contact extends Person { * * @param string $list_of_user */ - + function process_sync_to_outlook( $list_of_users - ) + ) { static $focus_user; - + // cache this object since we'll be reusing it a bunch if ( !($focus_user instanceof User) ) { - + $focus_user = new User(); } - - + + if ( empty($list_of_users) ) { return; } if ( !isset($this->users) ) { $this->load_relationship('user_sync'); } - + if ( strtolower($list_of_users) == 'all' ) { // add all non-deleted users $sql = "SELECT id FROM users WHERE deleted=0 AND is_group=0 AND portal_only=0"; @@ -594,7 +589,7 @@ class Contact extends Person { while ( $hash = $this->db->fetchByAssoc($result) ) { $this->user_sync->add($hash['id']); } - } + } else { $theList = explode(",",$list_of_users); foreach ($theList as $eachItem) { diff --git a/modules/Contacts/ContactFormBase.php b/modules/Contacts/ContactFormBase.php index 777bbc23..9742b048 100644 --- a/modules/Contacts/ContactFormBase.php +++ b/modules/Contacts/ContactFormBase.php @@ -612,14 +612,6 @@ function handleSave($prefix, $redirect=true, $useRequired=false){ if(isset($_POST['inbound_email_id']) && !empty($_POST['inbound_email_id'])) { $get .= '&inbound_email_id='.$_POST['inbound_email_id']; } - - // Bug 25311 - Add special handling for when the form specifies many-to-many relationships - if(isset($_POST['relate_to']) && !empty($_POST['relate_to'])) { - $get .= '&Contactsrelate_to='.$_POST['relate_to']; - } - if(isset($_POST['relate_id']) && !empty($_POST['relate_id'])) { - $get .= '&Contactsrelate_id='.$_POST['relate_id']; - } //add all of the post fields to redirect get string foreach ($focus->column_fields as $field) @@ -680,7 +672,7 @@ function handleSave($prefix, $redirect=true, $useRequired=false){ ob_clean(); $json = getJSONobj(); $_SESSION['SHOW_DUPLICATES'] = $get; - echo $json->encode(array('status' => 'dupe', 'get' => $location)); + echo $json->encode(array('status' => 'dupe', 'get' => $location . $get)); } else { if(!empty($_POST['to_pdf'])) $location .= '&to_pdf='.$_POST['to_pdf']; $_SESSION['SHOW_DUPLICATES'] = $get; @@ -731,7 +723,7 @@ function handleSave($prefix, $redirect=true, $useRequired=false){ echo $json->encode(array('status' => 'success', 'get' => '')); $trackerManager = TrackerManager::getInstance(); - $timeStamp = TimeDate::getInstance()->nowDb(); + $timeStamp = gmdate($GLOBALS['timedate']->get_db_date_time_format()); if($monitor = $trackerManager->getMonitor('tracker')){ $monitor->setValue('action', 'detailview'); $monitor->setValue('user_id', $GLOBALS['current_user']->id); diff --git a/modules/Contacts/ContactOpportunityRelationshipEdit.php b/modules/Contacts/ContactOpportunityRelationshipEdit.php index 4eec505c..ff2e171a 100644 --- a/modules/Contacts/ContactOpportunityRelationshipEdit.php +++ b/modules/Contacts/ContactOpportunityRelationshipEdit.php @@ -93,7 +93,7 @@ $xtpl->assign("ID", $focus->id); $xtpl->assign("CONTACT",$contactName = Array("NAME" => $focus->contact_name, "ID" => $focus->contact_id)); $xtpl->assign("OPPORTUNITY",$oppName = Array("NAME" => $focus->opportunity_name, "ID" => $focus->opportunity_id)); -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_CONTACT_OPP_FORM_TITLE']." ".$contactName['NAME'] . " - ". $oppName['NAME']), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONTACT_OPP_FORM_TITLE']." ".$contactName['NAME'] . " - ". $oppName['NAME'], true); $xtpl->assign("CONTACT_ROLE_OPTIONS", get_select_options_with_id($app_list_strings['opportunity_relationship_type_dom'], $focus->contact_role)); diff --git a/modules/Contacts/Popup_picker.php b/modules/Contacts/Popup_picker.php index 8d4f1220..cd4b86c9 100644 --- a/modules/Contacts/Popup_picker.php +++ b/modules/Contacts/Popup_picker.php @@ -170,24 +170,14 @@ EOQ; $button .= ""; $button .= ""; $button .= ""; - // Added ID attribute to each element to use getElementById. To give ID attribute to an element is a good practice. - $button .= ""; - $button .= ""; - $button .= ""; - $button .= ""; - $button .= ""; - // Adding an onclick event to remove address for alternate address, as user has selected copy address to primary address - $button .= "\n"; - // Adding a new block of code copy the address to alternate address for contacts - $button .= ""; - $button .= ""; - $button .= ""; - $button .= ""; - $button .= ""; - // Adding an onclick event to remove address for primary address, as user has selected copy address to alternate address - // NOTE => You need to change the label as as per SugarCRM way.. - $button .= "\n"; + $button .= ""; + $button .= ""; + $button .= ""; + $button .= ""; + $button .= ""; + $button .= "\n"; $button .= "\n"; + ob_start(); insert_popup_header($theme); $output_html .= ob_get_contents(); @@ -219,36 +209,22 @@ EOQ; $change = 'save_checks'; $output_html = preg_replace(array($exp), array($change), $output_html); - $output_html .= << - -EOJS; + $output_html .= ''; $output_html .= insert_popup_footer(); return $output_html; diff --git a/modules/Contacts/ShowDuplicates.php b/modules/Contacts/ShowDuplicates.php index 194c74a6..bc0ee756 100644 --- a/modules/Contacts/ShowDuplicates.php +++ b/modules/Contacts/ShowDuplicates.php @@ -51,7 +51,7 @@ $error_msg = ''; global $current_language; $mod_strings = return_module_language($current_language, 'Contacts'); -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_SAVE_CONTACT']), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_SAVE_CONTACT'], true); $xtpl=new XTemplate ('modules/Contacts/ShowDuplicates.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); @@ -115,14 +115,6 @@ foreach ($contact->additional_column_fields as $field) } } -// Bug 25311 - Add special handling for when the form specifies many-to-many relationships -if(!empty($_POST['Contactsrelate_to'])) { - $input .= "\n"; -} -if(!empty($_POST['Contactsrelate_id'])) { - $input .= "\n"; -} - $emailAddress = new SugarEmailAddress(); $input .= $emailAddress->getEmailAddressWidgetDuplicatesView($contact); diff --git a/modules/Contacts/contactSeedData.php b/modules/Contacts/contactSeedData.php new file mode 100644 index 00000000..62ecf4a1 --- /dev/null +++ b/modules/Contacts/contactSeedData.php @@ -0,0 +1,21306 @@ + \ No newline at end of file diff --git a/modules/Contacts/contactSeedData_jp.php b/modules/Contacts/contactSeedData_jp.php new file mode 100644 index 00000000..6d9cc2f7 --- /dev/null +++ b/modules/Contacts/contactSeedData_jp.php @@ -0,0 +1,178 @@ + diff --git a/modules/Contacts/language/en_us.lang.php b/modules/Contacts/language/en_us.lang.php index 31eb17b0..640dd2d2 100644 --- a/modules/Contacts/language/en_us.lang.php +++ b/modules/Contacts/language/en_us.lang.php @@ -187,8 +187,8 @@ $mod_strings = array ( 'LNK_NEW_OPPORTUNITY' => 'Create Opportunity', 'LNK_NEW_TASK' => 'Create Task', 'LNK_SELECT_ACCOUNT' => "Select Account", - 'MSG_DUPLICATE' => 'The contact record you are about to create might be a duplicate of a contact record that already exists. Contact records containing similar names are listed below.
    Click Create Contact to continue creating this new contact, or select an existing contact listed below.', - 'MSG_SHOW_DUPLICATES' => 'The contact record you are about to create might be a duplicate of a contact record that already exists. Contact records containing similar names are listed below.
    Click Save to continue creating this new contact, or click Cancel to return to the module without creating the contact.', + 'MSG_DUPLICATE' => 'The contact record you are about to create might be a duplicate of a contact record that already exists. Contact records containing similar names and/or email addresses are listed below.
    Click Save to continue creating this new contact, or click Cancel to return to the module without creating the contact.', + 'MSG_SHOW_DUPLICATES' => 'The contact record you are about to create might be a duplicate of a contact record that already exists. Contact records containing similar names and/or email addresses are listed below.
    Click Save to continue creating this new contact, or click Cancel to return to the module without creating the contact.', 'NTC_COPY_ALTERNATE_ADDRESS' => 'Copy alternate address to primary address', 'NTC_COPY_PRIMARY_ADDRESS' => 'Copy primary address to alternate address', 'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?', @@ -200,9 +200,7 @@ $mod_strings = array ( 'LBL_LEADS_SUBPANEL_TITLE' => 'Leads', 'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Opportunities', - 'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documents', - 'LBL_COPY_ADDRESS_CHECKED_PRIMARY' => 'Copy to Primary Address', - 'LBL_COPY_ADDRESS_CHECKED_ALT' => 'Copy to Other Address', + 'LBL_COPY_ADDRESS_CHECKED' => 'Copy Address to Checked Contacts', 'LBL_CASES_SUBPANEL_TITLE' => 'Cases', 'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs', diff --git a/modules/Contacts/metadata/SearchFields.php b/modules/Contacts/metadata/SearchFields.php index 547758d4..d6771e8e 100644 --- a/modules/Contacts/metadata/SearchFields.php +++ b/modules/Contacts/metadata/SearchFields.php @@ -62,13 +62,5 @@ $searchFields['Contacts'] = 'assigned_user_id'=> array('query_type'=>'default'), 'account_id'=> array('query_type'=>'default','db_field'=>array('accounts.id')), 'campaign_name'=> array('query_type'=>'default'), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/modules/Contacts/metadata/additionalDetails.php b/modules/Contacts/metadata/additionalDetails.php index 54184e10..ab54421c 100644 --- a/modules/Contacts/metadata/additionalDetails.php +++ b/modules/Contacts/metadata/additionalDetails.php @@ -57,9 +57,9 @@ function additionalDetailsContact($fields) { if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '
    '; if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '
    ') == strlen($overlib_string) - 4)) $overlib_string .= '
    '; - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= ''. $mod_strings['LBL_MOBILE_PHONE'] . ' ' . $fields['PHONE_MOBILE'] . '
    '; - if(!empty($fields['PHONE_HOME'])) $overlib_string .= ''. $mod_strings['LBL_HOME_PHONE'] . ' ' . $fields['PHONE_HOME'] . '
    '; - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= ''. $mod_strings['LBL_OTHER_PHONE'] . ' ' . $fields['PHONE_OTHER'] . '
    '; + if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= ''. $mod_strings['LBL_MOBILE_PHONE'] . ' ' . $fields['PHONE_MOBILE'] . '
    '; + if(!empty($fields['PHONE_HOME'])) $overlib_string .= ''. $mod_strings['LBL_HOME_PHONE'] . ' ' . $fields['PHONE_HOME'] . '
    '; + if(!empty($fields['PHONE_OTHER'])) $overlib_string .= ''. $mod_strings['LBL_OTHER_PHONE'] . ' ' . $fields['PHONE_OTHER'] . '
    '; if(!empty($fields['DATE_MODIFIED'])) $overlib_string .= ''. $mod_strings['LBL_DATE_MODIFIED'] . ' ' . $fields['DATE_MODIFIED'] . '
    '; diff --git a/modules/Contacts/metadata/detailviewdefs.php b/modules/Contacts/metadata/detailviewdefs.php index bf1a6e8a..c0f1d01d 100644 --- a/modules/Contacts/metadata/detailviewdefs.php +++ b/modules/Contacts/metadata/detailviewdefs.php @@ -39,22 +39,22 @@ $viewdefs['Contacts']['DetailView'] = array( array('customCode'=>''), ), ), - 'maxColumns' => '2', + 'maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30') ), - + 'includes'=> array( array('file'=>'modules/Leads/Lead.js'), - ), + ), ), - - - - 'panels' => + + + + 'panels' => array ( - 'lbl_contact_information' => + 'lbl_contact_information' => array ( array ( @@ -84,9 +84,9 @@ $viewdefs['Contacts']['DetailView'] = array( array ( 'name' => 'phone_mobile', 'label' => 'LBL_MOBILE_PHONE', - ), + ), ), - + array ( array ( 'name' => 'account_name', @@ -104,7 +104,7 @@ $viewdefs['Contacts']['DetailView'] = array( 'name' => 'primary_address_street', 'label' => 'LBL_PRIMARY_ADDRESS', 'type' => 'address', - 'displayParams' => + 'displayParams' => array ( 'key' => 'primary', ), @@ -114,7 +114,7 @@ $viewdefs['Contacts']['DetailView'] = array( 'name' => 'alt_address_street', 'label' => 'LBL_ALTERNATE_ADDRESS', 'type' => 'address', - 'displayParams' => + 'displayParams' => array ( 'key' => 'alt', ), @@ -128,8 +128,8 @@ $viewdefs['Contacts']['DetailView'] = array( 'studio' => 'false', 'label' => 'LBL_EMAIL_ADDRESS', ), - ), - + ), + array ( array ( @@ -139,8 +139,8 @@ $viewdefs['Contacts']['DetailView'] = array( ), ), ), - - 'LBL_PANEL_ADVANCED' => + + 'LBL_PANEL_ADVANCED' => array ( array ( @@ -164,26 +164,26 @@ $viewdefs['Contacts']['DetailView'] = array( 'comment' => 'How did the contact come about', 'label' => 'LBL_LEAD_SOURCE', ), - + array ( 'name' => 'do_not_call', 'comment' => 'An indicator of whether contact can be called', 'label' => 'LBL_DO_NOT_CALL', ), ), - + array ( - + array ( 'name' => 'campaign_name', 'label' => 'LBL_CAMPAIGN', ), - - ), - - + + ), + + ), - 'LBL_PANEL_ASSIGNMENT' => + 'LBL_PANEL_ASSIGNMENT' => array ( array ( @@ -201,7 +201,7 @@ $viewdefs['Contacts']['DetailView'] = array( ), array ( - + array ( 'name' => 'date_entered', 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', @@ -210,6 +210,6 @@ $viewdefs['Contacts']['DetailView'] = array( ), ), - ) + ) ); ?> \ No newline at end of file diff --git a/modules/Contacts/metadata/editviewdefs.php b/modules/Contacts/metadata/editviewdefs.php index b2d8c99c..367dca29 100644 --- a/modules/Contacts/metadata/editviewdefs.php +++ b/modules/Contacts/metadata/editviewdefs.php @@ -40,17 +40,17 @@ $viewdefs['Contacts']['EditView'] = array( '', '', '')), - 'maxColumns' => '2', + 'maxColumns' => '2', 'widths' => array( - array('label' => '10', 'field' => '30'), + array('label' => '10', 'field' => '30'), array('label' => '10', 'field' => '30'), ), ), - 'panels' => + 'panels' => array ( - 'lbl_contact_information' => + 'lbl_contact_information' => array ( array ( array ( @@ -69,7 +69,7 @@ $viewdefs['Contacts']['EditView'] = array( 'name' => 'phone_work', 'comment' => 'Work phone number of the contact', 'label' => 'LBL_OFFICE_PHONE', - ), + ), ), array ( @@ -83,8 +83,8 @@ $viewdefs['Contacts']['EditView'] = array( 'name' => 'phone_mobile', 'comment' => 'Mobile phone number of the contact', 'label' => 'LBL_MOBILE_PHONE', - ), - + ), + ), array ( @@ -98,17 +98,17 @@ $viewdefs['Contacts']['EditView'] = array( array( array ( 'name' => 'account_name', - 'displayParams' => + 'displayParams' => array ( 'key' => 'billing', 'copy' => 'primary', 'billingKey' => 'primary', - 'additionalFields' => + 'additionalFields' => array ( 'phone_office' => 'phone_work', ), ), - ), + ), ), array ( @@ -117,7 +117,7 @@ $viewdefs['Contacts']['EditView'] = array( 'name' => 'primary_address_street', 'hideLabel' => true, 'type' => 'address', - 'displayParams' => + 'displayParams' => array ( 'key' => 'primary', 'rows' => 2, @@ -130,7 +130,7 @@ $viewdefs['Contacts']['EditView'] = array( 'name' => 'alt_address_street', 'hideLabel' => true, 'type' => 'address', - 'displayParams' => + 'displayParams' => array ( 'key' => 'alt', 'copy' => 'primary', @@ -149,7 +149,7 @@ $viewdefs['Contacts']['EditView'] = array( 'label' => 'LBL_EMAIL_ADDRESS', ), ), - + array ( array ( @@ -158,9 +158,9 @@ $viewdefs['Contacts']['EditView'] = array( ), ), ), - - - 'LBL_PANEL_ADVANCED' => + + + 'LBL_PANEL_ADVANCED' => array ( array ( @@ -191,17 +191,17 @@ $viewdefs['Contacts']['EditView'] = array( 'label' => 'LBL_DO_NOT_CALL', ), ), - + array ( 'campaign_name', ), ), - - - - 'LBL_PANEL_ASSIGNMENT' => + + + + 'LBL_PANEL_ASSIGNMENT' => array ( - array ( + array ( array ( 'name' => 'assigned_user_name', 'label' => 'LBL_ASSIGNED_TO_NAME', diff --git a/modules/Contacts/metadata/listviewdefs.php b/modules/Contacts/metadata/listviewdefs.php index 209ba4b2..99948a47 100644 --- a/modules/Contacts/metadata/listviewdefs.php +++ b/modules/Contacts/metadata/listviewdefs.php @@ -152,6 +152,9 @@ $listViewDefs['Contacts'] = array( 'ALT_ADDRESS_COUNTRY' => array( 'width' => '10', 'label' => 'LBL_ALT_ADDRESS_COUNTRY'), + 'DATE_ENTERED' => array( + 'width' => '10', + 'label' => 'LBL_DATE_ENTERED'), 'CREATED_BY_NAME' => array( 'width' => '10', 'label' => 'LBL_CREATED'), @@ -171,9 +174,5 @@ $listViewDefs['Contacts'] = array( 'default' => false, 'sortable' => false, ), - 'DATE_ENTERED' => array( - 'width' => '10', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true) ); ?> diff --git a/modules/Contacts/metadata/quickcreatedefs.php b/modules/Contacts/metadata/quickcreatedefs.php index 7c9d605b..dea6a18e 100644 --- a/modules/Contacts/metadata/quickcreatedefs.php +++ b/modules/Contacts/metadata/quickcreatedefs.php @@ -57,8 +57,8 @@ $viewdefs = array ( '', '', '', - '{if !empty($smarty.request.contact_id)}{/if}', - '{if !empty($smarty.request.contact_name)}{/if}', + '', + '', ), ), 'maxColumns' => '2', diff --git a/modules/Contacts/metadata/subpaneldefs.php b/modules/Contacts/metadata/subpaneldefs.php index d74f2f60..524e4df6 100644 --- a/modules/Contacts/metadata/subpaneldefs.php +++ b/modules/Contacts/metadata/subpaneldefs.php @@ -136,27 +136,6 @@ $layout_defs['Contacts'] = array( ), ) ), - 'documents' => array( - 'order' => 25, - 'module' => 'Documents', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'documents', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), 'leads' => array( 'order' => 60, 'module' => 'Leads', diff --git a/modules/Contacts/vardefs.php b/modules/Contacts/vardefs.php index 66149696..6131919b 100644 --- a/modules/Contacts/vardefs.php +++ b/modules/Contacts/vardefs.php @@ -37,7 +37,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dictionary['Contact'] = array('table' => 'contacts', 'audited'=>true, -'unified_search' => true, 'unified_search_default_enabled' => true, 'duplicate_merge'=>true, 'fields' => +'unified_search' => true, 'duplicate_merge'=>true, 'fields' => array ( 'email_and_name1' => @@ -251,14 +251,6 @@ array ( 'source' => 'non-db', 'vname' => 'LBL_EMAILS', ), - 'documents'=> - array ( - 'name' => 'documents', - 'type' => 'link', - 'relationship' => 'documents_contacts', - 'source' => 'non-db', - 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - ), 'leads'=> array ( 'name' => 'leads', @@ -471,7 +463,6 @@ array ( 'type' => 'bool', 'source' => 'non-db', 'comment' => 'Synch to outlook? (Meta-Data only)', - 'studio' => 'true', ), ), 'indices' => array ( diff --git a/modules/Contacts/views/view.detail.php b/modules/Contacts/views/view.detail.php index bce07f15..42ab2dc3 100644 --- a/modules/Contacts/views/view.detail.php +++ b/modules/Contacts/views/view.detail.php @@ -39,7 +39,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/MVC/View/views/view.detail.php'); -class ContactsViewDetail extends ViewDetail +class ContactsViewDetail extends ViewDetail { /** * @see SugarView::display() @@ -47,7 +47,7 @@ class ContactsViewDetail extends ViewDetail * We are overridding the display method to manipulate the portal information. * If portal is not enabled then don't show the portal fields. */ - public function display() + public function display() { $admin = new Administration(); $admin->retrieveSettings(); diff --git a/modules/Contacts/views/view.list.php b/modules/Contacts/views/view.list.php deleted file mode 100644 index 297b42b6..00000000 --- a/modules/Contacts/views/view.list.php +++ /dev/null @@ -1,48 +0,0 @@ -lv->targetList = true; - } -} diff --git a/modules/Currencies/index.php b/modules/Currencies/index.php index ec6f55e4..44066b7d 100644 --- a/modules/Currencies/index.php +++ b/modules/Currencies/index.php @@ -50,14 +50,7 @@ global $app_list_strings; global $app_strings; global $current_user, $focus; -echo getClassicModuleTitle( - "Administration", - array( - "".translate('LBL_MODULE_NAME','Administration')."", - $mod_strings['LBL_MODULE_NAME'], - ), - false - ); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'], true); if($current_user->is_admin){ require_once('modules/Currencies/ListCurrency.php'); @@ -117,7 +110,7 @@ $edit_botton = '
    '; $edit_botton .= ''; $edit_botton .= ''; $edit_botton .= ' '; - $edit_botton .= ' '; + $edit_botton .= ' '; $header_text = ''; if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){ $header_text = " ".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""; @@ -127,7 +120,7 @@ $ListView->initNewXTemplate( 'modules/Currencies/ListView.html',$mod_strings); $ListView->xTemplateAssign('PRETABLE', $pretable); $ListView->xTemplateAssign('POSTTABLE', '
    '); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_DELETE'].'" border="0"')); -//$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']. $header_text ); +$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']. $header_text ); $ListView->setHeaderText($merge_button); $ListView->processListView($lc->list, "main", "CURRENCY"); @@ -139,12 +132,8 @@ if(isset($_GET['record']) && !empty($_GET['record']) && !isset($_POST['edit'])) if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){ $header_text = " ".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""; } -if ( empty($focus->id) ) { - echo get_form_header($app_strings['LBL_CREATE_BUTTON_LABEL'] . $header_text,$edit_botton , false); -} -else { - echo get_form_header($app_strings['LBL_EDIT_BUTTON_LABEL']." » ".$focus->name . $header_text,$edit_botton , false); -} +echo get_form_header($mod_strings['LBL_CURRENCY']." ".$focus->name . $header_text,$edit_botton , false); + $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign("MOD", $mod_strings); diff --git a/modules/Currencies/language/en_us.lang.php b/modules/Currencies/language/en_us.lang.php index 6ca1b2c7..51f8cad0 100644 --- a/modules/Currencies/language/en_us.lang.php +++ b/modules/Currencies/language/en_us.lang.php @@ -76,7 +76,6 @@ $mod_strings = array ( 'Active' => 'Active', 'Inactive' => 'Inactive', ), - 'LBL_CREATED_BY' => 'Created By', ); diff --git a/modules/DocumentRevisions/DetailView.html b/modules/DocumentRevisions/DetailView.html new file mode 100644 index 00000000..6c7dd012 --- /dev/null +++ b/modules/DocumentRevisions/DetailView.html @@ -0,0 +1,90 @@ + + + + + + + +
    +
    + + + + + + + + + +
    +
    {ADMIN_EDIT}
    + + +
    + +{PAGINATION} + + + + + + + + + + + + + + + + + + + + + + + +
    {MOD.LBL_DOC_NAME}{DOCUMENT_NAME} {MOD.LBL_CURRENT_DOC_VERSION}{CURRENT_REVISION} 
    {MOD.LBL_FILENAME}{FILE_NAME} {MOD.LBL_DOC_VERSION}{REVISION} 
    {MOD.LBL_DET_CREATED_BY}{CREATED_BY} {MOD.LBL_DET_DATE_CREATED}{DATE_CREATED} 
    {MOD.LBL_CHANGE_LOG}{CHANGE_LOG} 
    +
    + \ No newline at end of file diff --git a/modules/DocumentRevisions/DetailView.php b/modules/DocumentRevisions/DetailView.php new file mode 100644 index 00000000..ab65e2ee --- /dev/null +++ b/modules/DocumentRevisions/DetailView.php @@ -0,0 +1,103 @@ +retrieve($_REQUEST['record']); +} +$old_id = ''; + +echo get_module_title('DocumentRevisions', $mod_strings['LBL_MODULE_NAME'].": ".$focus->document_name, true); + + +$GLOBALS['log']->info("Document revision detail view"); + +$xtpl=new XTemplate ('modules/DocumentRevisions/DetailView.html'); +$xtpl->assign("MOD", $mod_strings); +$xtpl->assign("APP", $app_strings); + +if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); +if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); +if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); +$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); + +$focus->fill_document_name_revision($focus->document_id); + +$xtpl->assign("ID", $focus->id); +$xtpl->assign("DOCUMENT_NAME",$focus->name); +$xtpl->assign("CURRENT_REVISION",$focus->latest_revision); +$xtpl->assign("CHANGE_LOG",$focus->change_log); +$created_user = new User(); +$created_user->retrieve($focus->created_by); +$xtpl->assign("CREATED_BY",$locale->getLocaleFormattedName($created_user->first_name, $created_user->last_name)); + +$xtpl->assign("DATE_CREATED",$focus->date_entered); +$xtpl->assign("REVISION",$focus->revision); +$xtpl->assign("FILENAME",$focus->filename); + +$xtpl->assign("FILE_NAME", $focus->filename); +$xtpl->assign("SAVE_FILE", $focus->id); + +$xtpl->assign("FILE_URL", UploadFile::get_url($focus->filename,$focus->id)); +$xtpl->assign("GRIDLINE", $gridline); + + +$xtpl->parse("main"); +$xtpl->out("main"); +?> \ No newline at end of file diff --git a/modules/DocumentRevisions/DocumentRevision.php b/modules/DocumentRevisions/DocumentRevision.php index 1ffae31b..fedfb1dc 100644 --- a/modules/DocumentRevisions/DocumentRevision.php +++ b/modules/DocumentRevisions/DocumentRevision.php @@ -53,9 +53,6 @@ class DocumentRevision extends SugarBean { var $id; var $document_id; - var $doc_id; - var $doc_type; - var $doc_url; var $date_entered; var $created_by; var $filename; @@ -118,20 +115,11 @@ class DocumentRevision extends SugarBean { } function save($check_notify = false){ - $saveRet = parent::save($check_notify); - - //update documents table. (not through save, because it causes a loop) - // If we don't have a document_id, find it. - if ( empty($this->document_id) ) { - $query = "SELECT document_id FROM document_revisions WHERE id = '".$this->db->quote($this->id)."'"; - $ret = $this->db->query($query,true); - $row = $this->db->fetchByAssoc($ret); - $this->document_id = $row['document_id']; - } - $query = "UPDATE documents set document_revision_id='".$this->db->quote($this->id)."', doc_type='".$this->db->quote($this->doc_type)."', doc_url='".$this->db->quote($this->doc_url)."', doc_id='".$this->db->quote($this->doc_id)."' where id = '".$this->db->quote($this->document_id)."'"; - $this->db->query($query,true); - - return $saveRet; + parent::save($check_notify); + + //update documents table. + //$query = "UPDATE documents set document_version_id='$this->id' where id = '$this->document_id'"; + //$this->db->query($query); } function get_summary_text() { @@ -159,25 +147,40 @@ class DocumentRevision extends SugarBean { global $current_language; parent::fill_in_additional_detail_fields(); - - if ( empty($this->id) && empty($this->document_id) && isset($_REQUEST['return_id']) && !empty($_REQUEST['return_id']) ) { - $this->document_id = $_REQUEST['return_id']; - } + + $mod_strings=return_module_language($current_language, 'Documents'); //find the document name and current version. - $query = "SELECT document_name, revision, document_revision_id FROM documents, document_revisions where documents.id = '".$this->db->quote($this->document_id)."' AND document_revisions.id = documents.document_revision_id"; + $query = "SELECT document_name, revision, document_revision_id FROM documents, document_revisions where documents.id = '$this->document_id' AND document_revisions.id = documents.document_revision_id"; $result = $this->db->query($query,true,"Error fetching document details...:"); $row = $this->db->fetchByAssoc($result); if ($row != null) { $this->document_name = $row['document_name']; - $this->document_name = ''.$row['document_name'].''; $this->latest_revision = $row['revision']; $this->latest_revision_id = $row['document_revision_id']; - - if ( empty($this->revision) ) { - $this->revision = $this->latest_revision + 1; - } - } + } + //populate the file url. + //image is selected based on the extension name _image_inline, extension is stored in document_revisions. + //if file is not found then default image file will be used. + global $img_name; + global $img_name_bare; + if (!empty($this->file_ext)) { + $img_name = SugarThemeRegistry::current()->getImageURL("{$this->file_ext}_image_inline.gif"); + $img_name_bare = "{$this->file_ext}_image_inline"; + } + + //set default file name. + if (!empty($img_name) && file_exists($img_name)) { + $img_name = $img_name_bare; + } + else { + $img_name = "def_image_inline"; //todo change the default image. + } + if($this->ACLAccess('DetailView')){ + $this->file_url = "".SugarThemeRegistry::current()->getImage($img_name,'alt="'.$mod_strings['LBL_LIST_VIEW_DOCUMENT'].'" border="0"').""; + }else{ + $this->file_url = ""; + } } /** @@ -193,6 +196,9 @@ class DocumentRevision extends SugarBean { $localLabels = return_module_language($current_language, 'DocumentRevisions'); // prep - get source Document + if(!class_exists('Documents')) { + + } $document = new Document(); // use passed revision ID @@ -299,5 +305,4 @@ class DocumentRevision extends SugarBean { return $return_array; } } - -require_once('modules/Documents/DocumentExternalApiDropDown.php'); \ No newline at end of file +?> \ No newline at end of file diff --git a/modules/DocumentRevisions/EditView.html b/modules/DocumentRevisions/EditView.html new file mode 100644 index 00000000..c8759a50 --- /dev/null +++ b/modules/DocumentRevisions/EditView.html @@ -0,0 +1,89 @@ + + + + + + + + +
    +
    + + + + + + + + + +
    {APP.LBL_REQUIRED_SYMBOL} {APP.NTC_REQUIRED}{ADMIN_EDIT}
    + + + + + +
    + + + + + + + + + + + + + + + + + +
    {MOD.LBL_DOC_NAME} {DOCUMENT_NAME} {MOD.LBL_CURRENT_DOC_VERSION}{CURRENT_REVISION} 
    {MOD.LBL_FILENAME} {APP.LBL_REQUIRED_SYMBOL}{MOD.LBL_DOC_VERSION} {APP.LBL_REQUIRED_SYMBOL}
    {MOD.LBL_CHANGE_LOG}
    +
    + + + +{JAVASCRIPT} + diff --git a/modules/DocumentRevisions/EditView.php b/modules/DocumentRevisions/EditView.php new file mode 100644 index 00000000..c497256d --- /dev/null +++ b/modules/DocumentRevisions/EditView.php @@ -0,0 +1,109 @@ +retrieve($_REQUEST['record']); +} +$old_id = ''; + +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') +{ + if (! empty($focus->filename) ) + { + $old_id = $focus->id; + } + $focus->id = ""; +} + +echo get_module_title('DocumentRevisions', $mod_strings['LBL_MODULE_NAME'].": ".$focus->document_name, true); + + +$GLOBALS['log']->info("Document revision edit view"); + +$xtpl=new XTemplate ('modules/DocumentRevisions/EditView.html'); +$xtpl->assign("MOD", $mod_strings); +$xtpl->assign("APP", $app_strings); + +if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); +if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); +if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); +$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); +$xtpl->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_document_revision_js()); + +$focus->fill_document_name_revision($_REQUEST['return_id']); + +$xtpl->assign("ID", $focus->id); +$xtpl->assign("DOCUMENT_NAME",$_REQUEST['document_name']); +$xtpl->assign("CURRENT_REVISION",$_REQUEST['document_revision']); + +if($_REQUEST['document_revision'] == null) { + $xtpl->assign("CURRENT_REVISION",$focus->latest_revision); +} + +$xtpl->assign("FILE_URL", UploadFile::get_url($_REQUEST['document_filename'],$_REQUEST['document_revision_id'])); + + +$xtpl->parse("main"); +$xtpl->out("main"); + +//implements required fields check based on the required fields list defined in the bean. + +$javascript = new javascript(); +$javascript->setFormName('DocumentRevisionEditView'); +$javascript->setSugarBean($focus); +$javascript->addAllFields(''); +echo $javascript->getScript(); + +?> \ No newline at end of file diff --git a/modules/Administration/views/view.languages.php b/modules/DocumentRevisions/Save.php similarity index 55% rename from modules/Administration/views/view.languages.php rename to modules/DocumentRevisions/Save.php index 22e026ab..792d6a96 100644 --- a/modules/Administration/views/view.languages.php +++ b/modules/DocumentRevisions/Save.php @@ -37,73 +37,74 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); /********************************************************************************* - * Description: TODO: To be written. + * Description: Base Form For Notes * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ + -class ViewLanguages extends SugarView -{ - /** - * @see SugarView::_getModuleTitleParams() - */ - protected function _getModuleTitleParams($browserTitle = false) - { - global $mod_strings; - return array( - "".$mod_strings['LBL_MODULE_NAME']."", - $mod_strings['LBL_MANAGE_LANGUAGES'] - ); - } - /** - * @see SugarView::preDisplay() - */ - public function preDisplay() - { - global $current_user; +require_once('include/formbase.php'); +require_once('include/upload_file.php'); + +global $mod_strings; +$mod_strings = return_module_language($current_language, 'DocumentRevisions'); - if (!is_admin($current_user)) { - sugar_die("Unauthorized access to administration."); - } +$prefix=''; + +$do_final_move = 0; + +$Revision = new DocumentRevision(); +$Document = new Document(); +if (isset($_REQUEST['record'])) { + $Document->retrieve($_REQUEST['record']); +} +if(!$Document->ACLAccess('Save')){ + ACLController::displayNoAccess(true); + sugar_cleanup(true); +} +if (isset($_REQUEST['SaveRevision'])) { + + //fetch the document record. + $Document->retrieve($_REQUEST['return_id']); + + if($useRequired && !checkRequired($prefix, array_keys($Revision->required_fields))){ + return null; } - /** - * @see SugarView::display() - */ - public function display() + $Revision = populateFromPost($prefix, $Revision); + $upload_file = new UploadFile('uploadfile'); + if (isset($_FILES['uploadfile']) && $upload_file->confirm_upload()) { - global $mod_strings; - global $app_list_strings; - global $app_strings; - global $sugar_config; - - $disabled = array(); - $disabled_list = array(); - if ( isset($sugar_config['disabled_languages'])) { - if(!is_array($sugar_config['disabled_languages'])){ - $disabled_list = array_flip(explode(',', $sugar_config['disabled_languages'])); - }else{ - $disabled_list = array_flip($sugar_config['disabled_languages']); - } - } - foreach ($sugar_config['languages'] as $key=>$value) - { - if(isset($disabled_list[$key])) { - $disabled[] = array("module" => $key, 'label' => $value); - } else { - $enabled[] = array("module" => $key, 'label' => $value); - } - } + $Revision->filename = $upload_file->get_stored_file_name(); + $Revision->file_mime_type = $upload_file->mime_type; + $Revision->file_ext = $upload_file->file_ext; + + $do_final_move = 1; + } + + //save revision + $Revision->document_id = $_REQUEST['return_id']; + $Revision->id = null; // 17767: Security fix, make sure no id is passed in via form. + $Revision->save(); - $this->ss->assign('APP', $GLOBALS['app_strings']); - $this->ss->assign('MOD', $GLOBALS['mod_strings']); - $this->ss->assign('enabled_langs', json_encode($enabled)); - $this->ss->assign('disabled_langs', json_encode($disabled)); - $this->ss->assign('title',$this->getModuleTitle(false)); + //revsion is the document. + $Document->document_revision_id = $Revision->id; + $Document->save(); + $return_id = $Document->id; +} - echo $this->ss->fetch('modules/Administration/templates/Languages.tpl'); - } +if ($do_final_move) +{ + $upload_file->final_move($Revision->id); } +else if ( ! empty($_REQUEST['old_id'])) +{ + $upload_file->duplicate_file($_REQUEST['old_id'], $Revision->id, $Revision->filename); +} + +$GLOBALS['log']->debug("Saved record with id of ".$return_id); +handleRedirect($return_id, "Documents"); +?> diff --git a/modules/DocumentRevisions/language/en_us.lang.php b/modules/DocumentRevisions/language/en_us.lang.php index 51c745e1..7342645e 100644 --- a/modules/DocumentRevisions/language/en_us.lang.php +++ b/modules/DocumentRevisions/language/en_us.lang.php @@ -83,9 +83,6 @@ $mod_strings = array ( 'ERR_DELETE_CONFIRM'=> 'Do you want to delete this document revision?', 'ERR_DELETE_LATEST_VERSION'=> 'You are not allowed to delete the latest revision of a document.', 'LNK_NEW_MAIL_MERGE' => 'Mail Merge', - 'LBL_DOC_ID' => 'Document Source ID', - 'LBL_DOC_TYPE' => 'Source', - 'LBL_DOC_URL' => 'Document Source URL', ); diff --git a/modules/DocumentRevisions/metadata/detailviewdefs.php b/modules/DocumentRevisions/metadata/detailviewdefs.php deleted file mode 100644 index ccb00fcd..00000000 --- a/modules/DocumentRevisions/metadata/detailviewdefs.php +++ /dev/null @@ -1,76 +0,0 @@ - array('maxColumns' => '2', - 'form' => array( - 'buttons' => array(), - 'hidden'=>array('')), - 'widths' => array( - array('label' => '10', 'field' => '30'), - array('label' => '10', 'field' => '30') - ), - ), - 'panels' => - array ( - '' => - array ( - array ( - 'document_name', - 'latest_revision', - ), - - array ( - 'revision', - ), - - array ( - 'filename', - ), - - array ( - array ( - 'name' => 'date_entered', - 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', - ), - ), - - array ( - 'change_log', - ), - ), - ), -); \ No newline at end of file diff --git a/modules/DocumentRevisions/metadata/editviewdefs.php b/modules/DocumentRevisions/metadata/editviewdefs.php deleted file mode 100644 index feb36600..00000000 --- a/modules/DocumentRevisions/metadata/editviewdefs.php +++ /dev/null @@ -1,75 +0,0 @@ - array('form' => array('enctype'=>'multipart/form-data', - 'hidden'=>array(''), - ), - 'maxColumns' => '2', - 'widths' => array( - array('label' => '10', 'field' => '30'), - array('label' => '10', 'field' => '30') - ), - 'javascript' => ' - - - - - -', - ), - 'panels' =>array ( - '' => - array ( - array ( - array ( 'name' => 'document_name', 'type' => 'readonly' ), - array ( 'name' => 'latest_revision', 'type' => 'readonly' ), - ), - array ( - 'revision', - ), - - array ( - 'filename', - ), - - array ( - array ( 'name' => 'change_log', 'size' => '126', 'maxlength' => '255' ), - ), - - ), - ), -); \ No newline at end of file diff --git a/modules/DocumentRevisions/vardefs.php b/modules/DocumentRevisions/vardefs.php index f14e9020..a2d843a0 100644 --- a/modules/DocumentRevisions/vardefs.php +++ b/modules/DocumentRevisions/vardefs.php @@ -65,36 +65,7 @@ $dictionary['DocumentRevision'] = array('table' => 'document_revisions' 'required'=>false, 'reportable'=>false, ), -'doc_id' => - array ( - 'name' => 'doc_id', - 'vname' => 'LBL_DOC_ID', - 'type' => 'varchar', - 'len' => '100', - 'comment' => 'Document ID from documents web server provider', - 'importable' => false, - 'studio' => 'false', - ), - 'doc_type' => - array ( - 'name' => 'doc_type', - 'vname' => 'LBL_DOC_TYPE', - 'type' => 'enum', - 'function' => 'getDocumentsExternalApiDropDown', - 'len' => '100', - 'comment' => 'Document type (ex: Google, box.net, LotusLive)', - 'studio' => 'false', - ), -'doc_url' => - array ( - 'name' => 'doc_url', - 'vname' => 'LBL_DOC_URL', - 'type' => 'varchar', - 'len' => '255', - 'comment' => 'Document URL from documents web server provider', - 'importable' => false, - 'studio' => 'false', - ), + 'date_entered' => array ( 'name' => 'date_entered', @@ -117,12 +88,9 @@ $dictionary['DocumentRevision'] = array('table' => 'document_revisions' array ( 'name' => 'filename', 'vname' => 'LBL_FILENAME', - 'type' => 'file', - 'dbType' => 'varchar', + 'type' => 'varchar', 'required'=>true, 'len' => '255', - 'allowEapm' => true, - 'linkModuleOverride' => 'Documents', ), 'file_ext' => array ( @@ -207,23 +175,6 @@ $dictionary['DocumentRevision'] = array('table' => 'document_revisions' 'len' => '36', 'source'=>'non-db', ), - 'document_name' => - array ( - 'name' => 'document_name', - 'vname' => 'LBL_DOC_NAME', - 'type' => 'varchar', - 'len' => '255', - 'source' => 'non-db', - ), - 'latest_revision' => - array ( - 'name' => 'latest_revision', - 'vname' => 'LBL_CURRENT_DOC_VERSION', - 'type' => 'varchar', - 'len' => '255', - 'source' => 'non-db', - ), - ), 'relationships'=>array( 'revisions_created_by' => array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id', @@ -232,8 +183,7 @@ $dictionary['DocumentRevision'] = array('table' => 'document_revisions' ), 'indices' => array ( - array('name' =>'documentrevisionspk', 'type' =>'primary', 'fields'=>array('id')), - array('name' =>'documentrevision_mimetype', 'type' =>'index', 'fields'=>array('file_mime_type')), - ) + array('name' =>'documentrevisionspk', 'type' =>'primary', 'fields'=>array('id')) +) ); ?> diff --git a/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php b/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php deleted file mode 100644 index 71d1bfe8..00000000 --- a/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php +++ /dev/null @@ -1,102 +0,0 @@ - array('default' => ''), - 'document_name' => array('default' => ''), - 'category_id' => array('default' => ''), - 'status_id' => array('default' => ''), - 'active_date' => array('default' => ''), - - 'assigned_user_id' => array('type' => 'assigned_user_name', - 'default' => $current_user->name, - 'label' => 'LBL_ASSIGNED_TO')); - - - -$dashletData['MyDocumentsDashlet']['columns'] = array('document_name' => array('width' => '40', - 'label' => 'LBL_NAME', - 'link' => true, - 'default' => true), - 'category_id' => array('width' => '8', - 'label' => 'LBL_CATEGORY', - 'default' => true), - 'subcategory_id' => array('width' => '8', - 'label' => 'LBL_SUBCATEGORY', - 'default' => false), - 'template_type' => array('width' => '8', - 'label' => 'LBL_TEMPLATE_TYPE', - 'default' => true), - 'is_template' => array('width' => '8', - 'label' => 'LBL_IS_TEMPLATE', - 'default' => false), - 'status_id' => array('width' => '8', - 'label' => 'LBL_STATUS', - 'default' => true), - 'active_date' => array('width' => '8', - 'label' => 'LBL_ACTIVE_DATE', - 'default' => true), - 'exp_date' => array('width' => '8', - 'label' => 'LBL_EXPIRATION_DATE', - 'default' => false), - 'date_entered' => array('width' => '15', - 'label' => 'LBL_DATE_ENTERED'), - 'date_modified' => array('width' => '15', - 'label' => 'LBL_DATE_MODIFIED'), - 'created_by' => array('width' => '8', - 'label' => 'LBL_CREATED'), - 'assigned_user_name' => array('width' => '8', - 'label' => 'LBL_LIST_ASSIGNED_USER'), - 'FILENAME' => array ( - 'width' => '20%', - 'label' => 'LBL_FILENAME', - 'link' => true, - 'default' => false, - 'bold' => false, - 'displayParams' => array ( 'module' => 'Documents', ), - 'related_fields' => - array ( - 0 => 'document_revision_id', - 1 => 'doc_id', - 2 => 'doc_type', - 3 => 'doc_url', - ), - ), - ); -?> \ No newline at end of file diff --git a/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php b/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php deleted file mode 100644 index 5f540882..00000000 --- a/modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php +++ /dev/null @@ -1,45 +0,0 @@ - 'Documents', - 'title' => translate('LBL_HOMEPAGE_TITLE', 'Documents'), - 'description' => 'A customizable view into Documents', - 'category' => 'Module Views'); -?> \ No newline at end of file diff --git a/modules/Documents/Document.php b/modules/Documents/Document.php index d7804486..1e3736b2 100644 --- a/modules/Documents/Document.php +++ b/modules/Documents/Document.php @@ -53,12 +53,10 @@ class Document extends SugarBean { var $date_entered; var $date_modified; var $modified_user_id; - var $assigned_user_id; var $active_date; var $exp_date; var $document_revision_id; var $filename; - var $doc_type; var $img_name; var $img_name_bare; @@ -103,78 +101,46 @@ class Document extends SugarBean { } function save($check_notify = false) { - - if (empty($this->doc_type)) { - $this->doc_type = 'Sugar'; - } - if (empty($this->id) || $this->new_with_id) + if (empty($this->id) || $this->new_with_id) { - if (empty($this->id)) { - $this->id = create_guid(); - $this->new_with_id = true; - } - - if ( isset($_REQUEST) && isset($_REQUEST['duplicateSave']) && $_REQUEST['duplicateSave'] == true && isset($_REQUEST['filename_old_doctype']) ) { - $this->doc_type = $_REQUEST['filename_old_doctype']; - $isDuplicate = true; - } else { - $isDuplicate = false; - } - - $Revision = new DocumentRevision(); - //save revision. - $Revision->in_workflow = true; - $Revision->not_use_rel_in_req = true; - $Revision->new_rel_id = $this->id; - $Revision->new_rel_relname = 'Documents'; - $Revision->change_log = translate('DEF_CREATE_LOG','Documents'); - $Revision->revision = $this->revision; - $Revision->document_id = $this->id; - $Revision->filename = $this->filename; - - if(isset($this->file_ext)) - { - $Revision->file_ext = $this->file_ext; - } - - if(isset($this->file_mime_type)) - { - $Revision->file_mime_type = $this->file_mime_type; - } - - $Revision->doc_type = $this->doc_type; - $Revision->doc_id = $this->doc_id; - $Revision->doc_url = $this->doc_url; - $Revision->save(); + if (!empty($this->uploadfile)) + { + $this->filename = $this->uploadfile; + if (empty($this->id)) { + $this->id = create_guid(); + $this->new_with_id = true; + } + $Revision = new DocumentRevision(); + //save revision. + $Revision->change_log = translate('DEF_CREATE_LOG','Documents'); + $Revision->revision = $this->revision; + $Revision->document_id = $this->id; + $Revision->filename = $this->filename; + $Revision->file_ext = $this->file_ext; + $Revision->file_mime_type = $this->file_mime_type; + $Revision->save(); + + //Move file saved during populatefrompost to match the revision id rather than document id + rename(UploadFile :: get_url($this->filename, $this->id), UploadFile :: get_url($this->filename, $Revision->id)); + + //update document with latest revision id + $this->process_save_dates=false; //make sure that conversion does not happen again. + $this->document_revision_id = $Revision->id; + } - //Move file saved during populatefrompost to match the revision id rather than document id - if (!empty($_FILES['filename_file'])) { - rename(UploadFile :: get_url($this->filename, $this->id), UploadFile :: get_url($this->filename, $Revision->id)); - } else if ( $isDuplicate && ( empty($this->doc_type) || $this->doc_type == 'Sugar' ) ) { - // Looks like we need to duplicate a file, this is tricky - $oldDocument = new Document(); - $oldDocument->retrieve($_REQUEST['duplicateId']); - $GLOBALS['log']->debug('Attempting to copy from '.UploadFile :: get_url($this->filename, $oldDocument->document_revision_id).' to '.UploadFile :: get_url($this->filename, $Revision->id)); - copy(UploadFile :: get_url($this->filename, $oldDocument->document_revision_id), UploadFile :: get_url($this->filename, $Revision->id)); - } - //update document with latest revision id - $this->process_save_dates=false; //make sure that conversion does not happen again. - $this->document_revision_id = $Revision->id; - - - //set relationship field values if contract_id is passed (via subpanel create) - if (!empty($_POST['contract_id'])) { - $save_revision['document_revision_id']=$this->document_revision_id; - $this->load_relationship('contracts'); - $this->contracts->add($_POST['contract_id'],$save_revision); - } - - if ((isset($_POST['load_signed_id']) and !empty($_POST['load_signed_id']))) { - $query="update linked_documents set deleted=1 where id='".$_POST['load_signed_id']."'"; - $this->db->query($query); - } - } - + //set relationship field values if contract_id is passed (via subpanel create) + if (!empty($_POST['contract_id'])) { + $save_revision['document_revision_id']=$this->document_revision_id; + $this->load_relationship('contracts'); + $this->contracts->add($_POST['contract_id'],$save_revision); + } + + if ((isset($_POST['load_signed_id']) and !empty($_POST['load_signed_id']))) { + $query="update linked_documents set deleted=1 where id='".$_POST['load_signed_id']."'"; + $this->db->query($query); + } + } + return parent :: save($check_notify); } function get_summary_text() { @@ -199,7 +165,8 @@ class Document extends SugarBean { $mod_strings = return_module_language($current_language, 'Documents'); - $query = "SELECT users.first_name AS first_name, users.last_name AS last_name, document_revisions.date_entered AS rev_date, document_revisions.filename AS filename, document_revisions.revision AS revision, document_revisions.file_ext AS file_ext FROM users, document_revisions WHERE users.id = document_revisions.created_by AND document_revisions.id = '$this->document_revision_id'"; + $query = "SELECT filename,revision,file_ext FROM document_revisions WHERE id='$this->document_revision_id'"; + $result = $this->db->query($query); $row = $this->db->fetchByAssoc($result); @@ -225,11 +192,7 @@ class Document extends SugarBean { $img_name = "def_image_inline"; //todo change the default image. } if($this->ACLAccess('DetailView')){ - $file_url = "".SugarThemeRegistry::current()->getImage($img_name, 'alt="'.$mod_strings['LBL_LIST_VIEW_DOCUMENT'].'" border="0"').""; - - if(!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url)) - $file_url= "".SugarThemeRegistry::current()->getImage($this->doc_type.'_image_inline', 'alt="'.$mod_strings['LBL_LIST_VIEW_DOCUMENT'].'" border="0"',null,null,'.png').""; - $this->file_url = $file_url; + $this->file_url = "".SugarThemeRegistry::current()->getImage($img_name, 'alt="'.$mod_strings['LBL_LIST_VIEW_DOCUMENT'].'" border="0"').""; $this->file_url_noimage = basename(UploadFile :: get_url($this->filename, $this->document_revision_id)); }else{ $this->file_url = ""; @@ -237,6 +200,9 @@ class Document extends SugarBean { } //get last_rev_by user name. + $query = "SELECT first_name,last_name, document_revisions.date_entered as rev_date FROM users, document_revisions WHERE users.id = document_revisions.created_by and document_revisions.id = '$this->document_revision_id'"; + $result = $this->db->query($query, true, "Eror fetching user name: "); + $row = $this->db->fetchByAssoc($result); if (!empty ($row)) { $this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); @@ -293,17 +259,12 @@ class Document extends SugarBean { $app_list_strings = return_app_list_strings_language($current_language); $document_fields = $this->get_list_view_array(); - - $this->fill_in_additional_list_fields(); - - - $document_fields['FILENAME'] = $this->filename; $document_fields['FILE_URL'] = $this->file_url; $document_fields['FILE_URL_NOIMAGE'] = $this->file_url_noimage; $document_fields['LAST_REV_CREATED_BY'] = $this->last_rev_created_name; $document_fields['CATEGORY_ID'] = empty ($this->category_id) ? "" : $app_list_strings['document_category_dom'][$this->category_id]; $document_fields['SUBCATEGORY_ID'] = empty ($this->subcategory_id) ? "" : $app_list_strings['document_subcategory_dom'][$this->subcategory_id]; - $document_fields['NAME'] = $this->document_name; + $document_fields['DOCUMENT_NAME_JAVASCRIPT'] = $GLOBALS['db']->helper->escape_quote($document_fields['DOCUMENT_NAME']); return $document_fields; } @@ -336,6 +297,4 @@ class Document extends SugarBean { return null; } } - -require_once('modules/Documents/DocumentExternalApiDropDown.php'); - +?> \ No newline at end of file diff --git a/modules/Documents/DocumentExternalApiDropDown.php b/modules/Documents/DocumentExternalApiDropDown.php deleted file mode 100644 index 81bca083..00000000 --- a/modules/Documents/DocumentExternalApiDropDown.php +++ /dev/null @@ -1,51 +0,0 @@ -$GLOBALS['app_list_strings']['eapm_list']['Sugar']),$apiList); - if(!empty($value) && empty($apiList[$value])){ - $apiList[$value] = $value; - } - return $apiList; - -} - diff --git a/modules/Documents/DocumentSoap.php b/modules/Documents/DocumentSoap.php index 649d224a..f6bc71bd 100644 --- a/modules/Documents/DocumentSoap.php +++ b/modules/Documents/DocumentSoap.php @@ -43,7 +43,7 @@ require_once('include/upload_file.php'); class DocumentSoap{ var $upload_file; function DocumentSoap(){ - $this->upload_file = new UploadFile('filename_file'); + $this->upload_file = new UploadFile('uploadfile'); } function saveFile($document, $portal = false){ diff --git a/modules/Documents/GetLatestRevision.php b/modules/Documents/GetLatestRevision.php index c166026f..1288769f 100644 --- a/modules/Documents/GetLatestRevision.php +++ b/modules/Documents/GetLatestRevision.php @@ -45,7 +45,7 @@ if (!empty($_REQUEST['record'])) { $document = new Document(); $document->retrieve($_REQUEST['record']); if (!empty($document->document_revision_id) && !empty($_REQUEST['get_latest_for_id'])) { - $query="update linked_documents set document_revision_id='{$document->document_revision_id}', date_modified='".TimeDate::getInstance()->nowDb()."' where id ='{$_REQUEST['get_latest_for_id']}' "; + $query="update linked_documents set document_revision_id='{$document->document_revision_id}', date_modified='".gmdate($GLOBALS['timedate']->get_db_date_time_format())."' where id ='{$_REQUEST['get_latest_for_id']}' "; $document->db->query($query); } } diff --git a/modules/Documents/action_view_map.php b/modules/Documents/action_view_map.php deleted file mode 100644 index ca3f53c6..00000000 --- a/modules/Documents/action_view_map.php +++ /dev/null @@ -1,38 +0,0 @@ - 'Sub Category', 'LBL_STATUS' => 'Status', 'LBL_CREATED_BY'=> 'Created by', - 'LBL_DATE_ENTERED'=> 'Date Created', + 'LBL_DATE_ENTERED'=> 'Date Entered', 'LBL_DATE_MODIFIED'=> 'Date Modified', 'LBL_DELETED' => 'Deleted', 'LBL_MODIFIED'=> 'Modified by ID', @@ -82,18 +82,13 @@ $mod_strings = array ( 'LBL_FILE_EXTENSION' => 'File Extension', 'LBL_LAST_REV_MIME_TYPE' => 'Last revision MIME type', 'LBL_CAT_OR_SUBCAT_UNSPEC'=>'Unspecified', - 'LBL_HOMEPAGE_TITLE' => 'My Documents', //quick search 'LBL_NEW_FORM_TITLE' => 'New Document', //document edit and detail view 'LBL_DOC_NAME' => 'Document Name:', 'LBL_FILENAME' => 'File Name:', - 'LBL_LIST_FILENAME' => 'File:', 'LBL_DOC_VERSION' => 'Revision:', - 'LBL_FILE_UPLOAD' => 'File:', - 'LBL_CATEGORY_VALUE' => 'Category:', - 'LBL_LIST_CATEGORY' => 'Category', 'LBL_SUBCATEGORY_VALUE'=> 'Sub Category:', 'LBL_DOC_STATUS'=> 'Status:', 'LBL_LAST_REV_CREATOR' => 'Revision Created By:', @@ -154,7 +149,7 @@ $mod_strings = array ( 'LBL_TREE_TITLE' => 'Documents', //sub-panel vardefs. - 'LBL_LIST_DOCUMENT_NAME'=>'Name', + 'LBL_LIST_DOCUMENT_NAME'=>'Document Name', 'LBL_CONTRACT_NAME'=>'Contract Name:', 'LBL_LIST_IS_TEMPLATE'=>'Template?', 'LBL_LIST_TEMPLATE_TYPE'=>'Document Type', @@ -167,23 +162,6 @@ $mod_strings = array ( 'LBL_CREATED_USER' => 'Created User', 'LBL_THEREVISIONS_SUBPANEL_TITLE' => 'Reversions', 'LBL_DOCUMENT_INFORMATION' => 'Document Overview', - 'LBL_DOC_ID' => 'Document Source ID', - 'LBL_DOC_TYPE' => 'Source', - 'LBL_LIST_DOC_TYPE' => 'Source', - 'LBL_DOC_TYPE_POPUP' => 'Select a source to which this document will be uploaded
    and from which it will be available.', - 'LBL_DOC_URL' => 'Document Source URL', - 'LBL_SEARCH_EXTERNAL_DOCUMENT' => 'File Name', - 'LBL_EXTERNAL_DOCUMENT_NOTE' => 'The first 20 most recently modified files are displayed in descending order in the list below. Use the Search to find other files.', - 'LBL_LIST_EXT_DOCUMENT_NAME' => 'File Name', - - // Links around the world - 'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Accounts', - 'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts', - 'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Opportunities', - 'LBL_CASES_SUBPANEL_TITLE' => 'Cases', - 'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs', - 'LBL_QUOTES_SUBPANEL_TITLE' => 'Quotes', - 'LBL_PRODUCTS_SUBPANEL_TITLE' => 'Products', ); diff --git a/modules/Documents/metadata/SearchFields.php b/modules/Documents/metadata/SearchFields.php index 97e76d3c..e4abe641 100644 --- a/modules/Documents/metadata/SearchFields.php +++ b/modules/Documents/metadata/SearchFields.php @@ -42,14 +42,5 @@ $searchFields['Documents'] = 'subcategory_id'=> array('query_type'=>'default', 'options' => 'document_subcategory_dom', 'template_var' => 'SUBCATEGORY_OPTIONS'), 'active_date'=> array('query_type'=>'default'), 'exp_date'=> array('query_type'=>'default'), - 'assigned_user_id'=> array('query_type'=>'default'), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/modules/Documents/metadata/detailviewdefs.php b/modules/Documents/metadata/detailviewdefs.php index b71ed70e..15a0d843 100644 --- a/modules/Documents/metadata/detailviewdefs.php +++ b/modules/Documents/metadata/detailviewdefs.php @@ -47,7 +47,14 @@ $viewdefs['Documents']['DetailView'] = array( 'lbl_document_information' => array ( array ( - 'filename', + array ( + 'name' => 'filename', + 'displayParams' => + array ( + 'link' => 'filename', + 'id' => 'document_revision_id', + ), + ), 'status', ), @@ -95,7 +102,6 @@ $viewdefs['Documents']['DetailView'] = array( 'related_doc_rev_number', ), - ), 'LBL_REVISIONS_PANEL' => @@ -105,15 +111,6 @@ $viewdefs['Documents']['DetailView'] = array( 1 => 'last_rev_create_date', ), ), - 'LBL_PANEL_ASSIGNMENT' => - array ( - array ( - array ( - 'name' => 'assigned_user_name', - 'label' => 'LBL_ASSIGNED_TO_NAME', - ), - ), - ), ) ); diff --git a/modules/Documents/metadata/editviewdefs.php b/modules/Documents/metadata/editviewdefs.php index 7bc68c88..e63aa996 100644 --- a/modules/Documents/metadata/editviewdefs.php +++ b/modules/Documents/metadata/editviewdefs.php @@ -55,10 +55,11 @@ $viewdefs['Documents']['EditView'] = array( 'panels' =>array ( 'lbl_document_information' => array ( + array ( array( - 'name' => 'filename', - 'displayParams' => array('onchangeSetFileNameTo' => 'document_name'), + 'name'=>'uploadfile', + 'customCode' => '{$fields.filename.value}', ), array ( 'name' => 'status_id', @@ -111,15 +112,7 @@ $viewdefs['Documents']['EditView'] = array( ), ), - ), - 'LBL_PANEL_ASSIGNMENT' => - array ( - array ( - array ( - 'name' => 'assigned_user_name', - 'label' => 'LBL_ASSIGNED_TO_NAME', - ), - ), + ), ) diff --git a/modules/Documents/metadata/listviewdefs.php b/modules/Documents/metadata/listviewdefs.php index 76ec70f4..5b30053b 100644 --- a/modules/Documents/metadata/listviewdefs.php +++ b/modules/Documents/metadata/listviewdefs.php @@ -39,40 +39,36 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $listViewDefs['Documents'] = array( - 'DOCUMENT_NAME' => + 'FILE_URL' => array ( - 'width' => '20%', - 'label' => 'LBL_NAME', + 'width' => '2%', + 'label' => ' ', 'link' => true, 'default' => true, - 'bold' => true, + 'related_fields' => + array ( + 0 => 'document_revision_id', + ), + 'sortable' => false, + 'studio' => false, ), - 'FILENAME' => + 'DOCUMENT_NAME' => array ( - 'width' => '20%', - 'label' => 'LBL_FILENAME', + 'width' => '40%', + 'label' => 'LBL_NAME', 'link' => true, 'default' => true, - 'bold' => false, - 'displayParams' => array ( 'module' => 'Documents', ), - 'sortable' => false, - 'related_fields' => - array ( - 0 => 'document_revision_id', - 1 => 'doc_id', - 2 => 'doc_type', - 3 => 'doc_url', - ), + 'bold' => true, ), 'CATEGORY_ID' => array ( - 'width' => '10%', + 'width' => '40%', 'label' => 'LBL_LIST_CATEGORY', 'default' => true, ), 'SUBCATEGORY_ID' => array ( - 'width' => '15%', + 'width' => '40%', 'label' => 'LBL_LIST_SUBCATEGORY', 'default' => true, ), @@ -87,20 +83,26 @@ $listViewDefs['Documents'] = array( 0 => 'document_revision_id', ), ), + 'CREATED_BY_NAME' => + array ( + 'width' => '2%', + 'label' => 'LBL_LIST_LAST_REV_CREATOR', + 'default' => true, + 'sortable' => false, + ), + 'ACTIVE_DATE' => + array ( + 'width' => '10%', + 'label' => 'LBL_LIST_ACTIVE_DATE', + 'default' => true, + ), 'EXP_DATE' => array ( 'width' => '10%', 'label' => 'LBL_LIST_EXP_DATE', 'default' => true, ), - 'ASSIGNED_USER_NAME' => - array( - 'width' => '10', - 'label' => 'LBL_LIST_ASSIGNED_USER', - 'module' => 'Employees', - 'id' => 'ASSIGNED_USER_ID', - 'default' => true), - 'MODIFIED_BY_NAME' => + 'MODIFIED_BY_NAME' => array ( 'width' => '10%', 'label' => 'LBL_MODIFIED_USER', @@ -108,15 +110,10 @@ $listViewDefs['Documents'] = array( 'id' => 'USERS_ID', 'default' => false, 'sortable' => false, - 'related_fields' => + 'related_fields' => array ( 0 => 'modified_user_id', ), - ), - 'DATE_ENTERED' => array ( - 'width' => '10%', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true, ) ); ?> \ No newline at end of file diff --git a/modules/Documents/metadata/quickcreatedefs.php b/modules/Documents/metadata/quickcreatedefs.php index 59f7d9bc..4f5a81d0 100644 --- a/modules/Documents/metadata/quickcreatedefs.php +++ b/modules/Documents/metadata/quickcreatedefs.php @@ -60,24 +60,42 @@ $viewdefs['Documents']['QuickCreate'] = array( array ( array ( - 'status_id', - ), - array ( - array('name'=>'filename', - 'displayParams'=>array('required'=>true, 'onchangeSetFileNameTo' => 'document_name'), + + array('name'=>'uploadfile', + 'customCode' => '{$fields.filename.value}', + 'displayParams'=>array('required'=>true), ), + 'status_id', ), array ( 'document_name', - 'revision' + array('name'=>'revision', + 'customCode' => '' + ), ), + array ( + array ( + 'name' => 'template_type', + 'label' => 'LBL_DET_TEMPLATE_TYPE', + ), + array ( + 'name' => 'is_template', + 'label' => 'LBL_DET_IS_TEMPLATE', + ), + ), + array ( array('name'=>'active_date','displayParams'=>array('required'=>true)), 'category_id', ), + array ( + 'exp_date', + 'subcategory_id', + ), + array ( array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)), diff --git a/modules/Documents/metadata/searchdefs.php b/modules/Documents/metadata/searchdefs.php index efa6c5ea..77e33834 100644 --- a/modules/Documents/metadata/searchdefs.php +++ b/modules/Documents/metadata/searchdefs.php @@ -51,23 +51,7 @@ 'subcategory_id', 'active_date', 'exp_date', - 'assigned_user_id' => - array ( - 'name' => 'assigned_user_id', - 'type' => 'enum', - 'label' => 'LBL_ASSIGNED_TO', - 'function' => - array ( - 'name' => 'get_user_array', - 'params' => - array ( - 0 => false, - ), - ), - 'default' => true, - 'width' => '10%', - ), - + ), ), ); diff --git a/modules/Documents/metadata/subpaneldefs.php b/modules/Documents/metadata/subpaneldefs.php index 359f43b4..12ad4c96 100644 --- a/modules/Documents/metadata/subpaneldefs.php +++ b/modules/Documents/metadata/subpaneldefs.php @@ -51,128 +51,6 @@ $layout_defs['Documents'] = array( 'get_subpanel_data' => 'revisions', 'fill_in_additional_fields'=>true, ), - 'accounts' => array( - 'order' => 30, - 'module' => 'Accounts', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'accounts', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), - 'contacts' => array( - 'order' => 40, - 'module' => 'Contacts', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'contacts', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), - 'opportunities' => array( - 'order' => 40, - 'module' => 'Opportunities', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE', - 'get_subpanel_data' => 'opportunities', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), - 'cases' => array( - 'order' => 50, - 'module' => 'Cases', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_CASES_SUBPANEL_TITLE', - 'get_subpanel_data' => 'cases', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), - 'bugs' => array( - 'order' => 60, - 'module' => 'Bugs', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_BUGS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'bugs', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), - 'quotes' => array( - 'order' => 70, - 'module' => 'Quotes', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_QUOTES_SUBPANEL_TITLE', - 'get_subpanel_data' => 'quotes', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), ), ); ?> \ No newline at end of file diff --git a/modules/Documents/metadata/subpanels/default.php b/modules/Documents/metadata/subpanels/default.php index f1a6a6f6..feaa0276 100644 --- a/modules/Documents/metadata/subpanels/default.php +++ b/modules/Documents/metadata/subpanels/default.php @@ -48,52 +48,52 @@ $subpanel_layout = array( 'list_fields'=> array( - 'object_image'=>array( - 'vname' => 'LBL_OBJECT_IMAGE', - 'widget_class' => 'SubPanelIcon', - 'width' => '2%', - 'image2'=>'attachment', - 'image2_url_field'=> array( - 'id_field' => 'id', - 'filename_field' => 'filename', - ), - 'attachment_image_only'=>true, - ), - 'document_name'=> array( + 'object_image'=>array( + 'vname' => 'LBL_OBJECT_IMAGE', + 'widget_class' => 'SubPanelIcon', + 'width' => '2%', + 'image2'=>'attachment', + 'image2_url_field'=>array('id_field'=>'selected_revision_id','filename_field'=>'selected_revision_filename'), + 'attachment_image_only'=>true, + + ), + 'document_name'=> array( 'name' => 'document_name', 'vname' => 'LBL_LIST_DOCUMENT_NAME', 'widget_class' => 'SubPanelDetailViewLink', - 'width' => '20%', + 'width' => '30%', ), - 'filename'=>array( - 'name' => 'filename', - 'vname' => 'LBL_LIST_FILENAME', - 'width' => '20%', - 'module' => 'Documents', - 'sortable'=>false, - 'displayParams' => array( - 'module' => 'Documents', - ), + 'is_template'=>array( + 'name' => 'is_template', + 'vname' => 'LBL_LIST_IS_TEMPLATE', + 'width' => '5%', + 'widget_type'=>'checkbox', ), - 'document_revision_id' => array( - 'name' => 'document_revision_id', - 'usage' => 'query_only', - ), - 'category_id'=>array( - 'name' => 'category_id', - 'vname' => 'LBL_LIST_CATEGORY', - 'width' => '20%', + 'template_type'=>array( + 'name' => 'template_types', + 'vname' => 'LBL_LIST_TEMPLATE_TYPE', + 'width' => '15%', ), - 'status_id'=>array( - 'name' => 'status_id', - 'vname' => 'LBL_LIST_STATUS', + 'selected_revision_name'=>array( + 'name' => 'selected_revision_name', + 'vname' => 'LBL_LIST_SELECTED_REVISION', 'width' => '10%', ), - 'active_date'=>array( - 'name' => 'active_date', - 'vname' => 'LBL_LIST_ACTIVE_DATE', + 'latest_revision_name'=>array( + 'name' => 'latest_revision_name', + 'vname' => 'LBL_LIST_LATEST_REVISION', 'width' => '10%', ), + 'get_latest'=>array( + 'widget_class' => 'SubPanelGetLatestButton', + 'module' => 'Documents', + 'width' => '5%', + ), + 'load_signed'=>array( + 'widget_class' => 'SubPanelLoadSignedButton', + 'module' => 'Documents', + 'width' => '5%', + ), 'edit_button'=>array( 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', @@ -105,7 +105,7 @@ $subpanel_layout = array( 'widget_class' => 'SubPanelRemoveButton', 'module' => 'Documents', 'width' => '5%', - ), + ), ), ); ?> \ No newline at end of file diff --git a/modules/EAPM/metadata/subpanels/default.php b/modules/Documents/subpanels/ForContractType.php similarity index 67% rename from modules/EAPM/metadata/subpanels/default.php rename to modules/Documents/subpanels/ForContractType.php index 5bbf56e4..e96bbd9d 100644 --- a/modules/EAPM/metadata/subpanels/default.php +++ b/modules/Documents/subpanels/ForContractType.php @@ -36,42 +36,54 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -$module_name='EAPM'; + $subpanel_layout = array( 'top_buttons' => array( - array('widget_class' => 'SubPanelTopCreateButton'), + array('widget_class' => 'SubPanelTopCreateButton'), + array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Documents','field_to_name_array'=>array('document_revision_id'=>'REL_ATTRIBUTE_document_revision_id')), ), 'where' => '', + + - 'list_fields' => array( - 'name'=>array( - 'vname' => 'LBL_NAME', + 'list_fields'=> array( + 'document_name'=> array( + 'name' => 'document_name', + 'vname' => 'LBL_LIST_DOCUMENT_NAME', 'widget_class' => 'SubPanelDetailViewLink', - 'width' => '25%', - ), - 'application'=>array( - 'vname' => 'LBL_APPLICATION', - 'width' => '20%', + 'width' => '30%', + ), + 'is_template'=>array( + 'name' => 'is_template', + 'vname' => 'LBL_LIST_IS_TEMPLATE', + 'width' => '5%', + 'widget_type'=>'checkbox', ), - 'active'=>array( - 'vname' => 'LBL_ACTIVE', - 'width' => '5%', - ), - 'validated'=>array( - 'vname' => 'LBL_VALIDATED', - 'width' => '5%', + 'template_type'=>array( + 'name' => 'template_types', + 'vname' => 'LBL_LIST_TEMPLATE_TYPE', + 'width' => '15%', ), - 'date_modified'=>array( - 'vname' => 'LBL_DATE_MODIFIED', - 'width' => '20%', + 'latest_revision'=>array( + 'name' => 'latest_revision', + 'vname' => 'LBL_LATEST_REVISION', + 'width' => '10%', + 'sortable' => false ), 'edit_button'=>array( 'widget_class' => 'SubPanelEditButton', - 'module' => $module_name, - 'width' => '4%', + 'module' => 'Documents', + 'width' => '5%', + ), + 'remove_button'=>array( + 'widget_class' => 'SubPanelRemoveButton', + 'module' => 'Documents', + 'width' => '5%', + ), + 'document_revision_id'=>array( + 'usage'=>'query_only' ), ), ); - -?> +?> \ No newline at end of file diff --git a/modules/Notes/metadata/subpanels/ForMeetings.php b/modules/Documents/subpanels/default.php similarity index 55% rename from modules/Notes/metadata/subpanels/ForMeetings.php rename to modules/Documents/subpanels/default.php index 80162ca5..03e25232 100644 --- a/modules/Notes/metadata/subpanels/ForMeetings.php +++ b/modules/Documents/subpanels/default.php @@ -37,91 +37,72 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); - $subpanel_layout = array( - //Removed button because this layout def is a component of - //the activities sub-panel. + 'top_buttons' => array( + array('widget_class' => 'SubPanelTopCreateButton'), + array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Documents','field_to_name_array'=>array('document_revision_id'=>'REL_ATTRIBUTE_document_revision_id')), + ), 'where' => '', + + - - 'list_fields' => array( + 'list_fields'=> array( 'object_image'=>array( - 'vname' => 'LBL_OBJECT_IMAGE', 'widget_class' => 'SubPanelIcon', 'width' => '2%', 'image2'=>'attachment', - 'image2_url_field'=>'file_url' - ), - 'name'=>array( - 'vname' => 'LBL_LIST_SUBJECT', - 'widget_class' => 'SubPanelDetailViewLink', - 'width' => '30%', - ), - 'reply_to_status' => array( - 'usage' => 'query_only', - 'force_exists' => true, - 'force_default' => 0, - ), - 'contact_name'=>array( - 'widget_class' => 'SubPanelDetailViewLink', - 'target_record_key' => 'contact_id', - 'target_module' => 'Contacts', - 'module' => 'Contacts', - 'vname' => 'LBL_LIST_CONTACT', - 'width' => '11%', - 'sortable'=>false, + 'image2_url_field'=>array('id_field'=>'selected_revision_id','filename_field'=>'selected_revision_filename'), + 'attachment_image_only'=>true, + ), - 'parent_id'=>array( - 'usage'=>'query_only', - 'force_exists'=>true - ), - 'parent_type'=>array( - 'usage'=>'query_only', - 'force_exists'=>true - ), - - 'date_modified'=>array( - 'vname' => 'LBL_LIST_DATE_MODIFIED', - 'width' => '10%', - ), - 'date_entered'=>array( - 'vname' => 'LBL_LIST_DATE_ENTERED', - 'width' => '10%', - ), - 'assigned_user_name' => array ( - 'name' => 'assigned_user_name', - 'vname' => 'LBL_LIST_ASSIGNED_TO_NAME', + 'document_name'=> array( + 'name' => 'document_name', + 'vname' => 'LBL_LIST_DOCUMENT_NAME', 'widget_class' => 'SubPanelDetailViewLink', - 'target_record_key' => 'assigned_user_id', - 'target_module' => 'Employees', - 'width' => '10%', + 'width' => '30%', + ), + 'is_template'=>array( + 'name' => 'is_template', + 'vname' => 'LBL_LIST_IS_TEMPLATE', + 'width' => '5%', + 'widget_type'=>'checkbox', ), - 'assigned_user_owner' => array ( - 'force_exists'=>true, //this will create a fake field since this field is not defined - 'usage'=>'query_only' + 'template_type'=>array( + 'name' => 'template_types', + 'vname' => 'LBL_LIST_TEMPLATE_TYPE', + 'width' => '15%', + ), + 'selected_revision_name'=>array( + 'name' => 'selected_revision_name', + 'vname' => 'LBL_LIST_SELECTED_REVISION', + 'width' => '10%', ), - 'assigned_user_mod' => array ( - 'force_exists'=>true, //this will create a fake field since this field is not defined - 'usage'=>'query_only' + 'latest_revision_name'=>array( + 'name' => 'latest_revision_name', + 'vname' => 'LBL_LIST_LATEST_REVISION', + 'width' => '10%', ), + 'get_latest'=>array( + 'widget_class' => 'SubPanelGetLatestButton', + 'module' => 'Documents', + 'width' => '5%', + ), + 'load_signed'=>array( + 'widget_class' => 'SubPanelLoadSignedButton', + 'module' => 'Documents', + 'width' => '5%', + ), 'edit_button'=>array( - 'vname' => 'LBL_EDIT_BUTTON', - 'widget_class' => 'SubPanelEditButton', - 'width' => '2%', + 'widget_class' => 'SubPanelEditButton', + 'module' => 'Documents', + 'width' => '5%', ), 'remove_button'=>array( - 'vname' => 'LBL_REMOVE', - 'widget_class' => 'SubPanelRemoveButton', - 'width' => '2%', - ), - 'file_url'=>array( - 'usage'=>'query_only' - ), - 'filename'=>array( - 'usage'=>'query_only' - ), - + 'widget_class' => 'SubPanelRemoveButton', + 'module' => 'Documents', + 'width' => '5%', + ), ), ); -?> +?> \ No newline at end of file diff --git a/modules/Documents/tpls/view.extdoc.tpl b/modules/Documents/tpls/view.extdoc.tpl deleted file mode 100644 index 4d992cd9..00000000 --- a/modules/Documents/tpls/view.extdoc.tpl +++ /dev/null @@ -1,132 +0,0 @@ -{* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - -*} - -
    -
    - - - - - - -
    -{$searchFieldLabel}:   - - - - -
    -
    -
    -
    {$displayedNote}
    - - - {counter start=0 name="colCounter" print=false assign="colCounter"} - {foreach from=$displayColumns key=colHeader item=params} - - {counter name="colCounter"} - {/foreach} - - - - {foreach name=rowIteration from=$data key=id item=rowData} - {counter name="offset" print=false} - - {if $smarty.foreach.rowIteration.iteration is odd} - {assign var='_rowColor' value=$rowColor[0]} - {else} - {assign var='_rowColor' value=$rowColor[1]} - {/if} - - {counter start=0 name="colCounter" print=false assign="colCounter"} - {foreach from=$displayColumns key=col item=params} - {strip} - - {/strip} - {counter name="colCounter"} - {/foreach} - - {foreachelse} - - - - {/foreach} -
    -
    - {sugar_translate label=$params.label module='Documents'} -
    -
     
    - {if $col == 'NAME' || $params.bold}{/if} - {if $params.link && !empty($rowData.DOC_URL) } - - {/if} - {sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col} - {if empty($rowData.$col)} {/if} - {if $params.link && !empty($rowData.DOC_URL) } - - {/if} - {if $params.link && !empty($rowData.URL) } - - {/if} - {if $col == 'NAME' || $params.bold}{/if} -
    - {$APP.LBL_NO_DATA} -
    diff --git a/modules/Documents/vardefs.php b/modules/Documents/vardefs.php index 55d922fc..179047d4 100644 --- a/modules/Documents/vardefs.php +++ b/modules/Documents/vardefs.php @@ -35,10 +35,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -$dictionary['Document'] = array('table' => 'documents', - 'unified_search' => true, - 'unified_search_default_enabled' => true, - 'fields' => array ( +$dictionary['Document'] = array('table' => 'documents' + ,'fields' => array ( 'document_name' => array ( @@ -48,45 +46,9 @@ $dictionary['Document'] = array('table' => 'documents', 'len' => '255', 'required'=>true, 'importable' => 'required', - 'unified_search' => true, ), 'name'=> array('name'=>'name', 'vname' => 'LBL_NAME', 'source'=>'non-db', 'type'=>'varchar'), -'doc_id' => - array ( - 'name' => 'doc_id', - 'vname' => 'LBL_DOC_ID', - 'type' => 'varchar', - 'len' => '100', - 'comment' => 'Document ID from documents web server provider', - 'importable' => false, - 'studio' => 'false', - ), - 'doc_type' => - array ( - 'name' => 'doc_type', - 'vname' => 'LBL_DOC_TYPE', - 'type' => 'enum', - 'function' => 'getDocumentsExternalApiDropDown', - 'len' => '100', - 'comment' => 'Document type (ex: Google, box.net, LotusLive)', - 'popupHelp' => 'LBL_DOC_TYPE_POPUP', - 'massupdate' => false, - 'options' => 'eapm_list', - 'default' => 'Sugar', - 'studio' => 'false', - ), -'doc_url' => - array ( - 'name' => 'doc_url', - 'vname' => 'LBL_DOC_URL', - 'type' => 'varchar', - 'len' => '255', - 'comment' => 'Document URL from documents web server provider', - 'importable' => false, - 'massupdate' => false, - 'studio' => 'false', - ), 'filename' => array ( 'name' => 'filename', @@ -95,10 +57,15 @@ $dictionary['Document'] = array('table' => 'documents', 'source' => 'non-db', 'comment' => 'The filename of the document attachment', 'required' => true, - 'noChange' => true, - 'allowEapm' => true, - 'fileId' => 'document_revision_id', - 'docType' => 'doc_type', + ), + + 'uploadfile' => + array ( + 'name'=>'uploadfile', + 'required' => true, + 'vname' => 'LBL_FILENAME', + 'type' => 'file', + 'source' => 'non-db', ), 'active_date' => @@ -108,7 +75,6 @@ $dictionary['Document'] = array('table' => 'documents', 'type' => 'date', 'importable' => 'required', 'required' => true, - 'display_default' => 'now', ), 'exp_date' => @@ -185,7 +151,6 @@ $dictionary['Document'] = array('table' => 'documents', 'source'=>'non-db', 'importable' => 'required', 'required' => true, - 'default' => '1', ), 'last_rev_created_name' => @@ -240,47 +205,7 @@ $dictionary['Document'] = array('table' => 'documents', 'source' => 'non-db', 'vname' => 'LBL_LEADS', ), - // Links around the world - 'accounts'=> - array ( - 'name' => 'accounts', - 'type' => 'link', - 'relationship' => 'documents_accounts', - 'source' => 'non-db', - 'vname' => 'LBL_ACCOUNTS_SUBPANEL_TITLE', - ), - 'contacts'=> - array ( - 'name' => 'contacts', - 'type' => 'link', - 'relationship' => 'documents_contacts', - 'source' => 'non-db', - 'vname' => 'LBL_CONTACTS_SUBPANEL_TITLE', - ), - 'opportunities'=> - array ( - 'name' => 'opportunities', - 'type' => 'link', - 'relationship' => 'documents_opportunities', - 'source' => 'non-db', - 'vname' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE', - ), - 'cases'=> - array ( - 'name' => 'cases', - 'type' => 'link', - 'relationship' => 'documents_cases', - 'source' => 'non-db', - 'vname' => 'LBL_CASES_SUBPANEL_TITLE', - ), - 'bugs'=> - array ( - 'name' => 'bugs', - 'type' => 'link', - 'relationship' => 'documents_bugs', - 'source' => 'non-db', - 'vname' => 'LBL_BUGS_SUBPANEL_TITLE', - ), + 'related_doc_id' => array ( 'name' => 'related_doc_id', @@ -413,7 +338,7 @@ $dictionary['Document'] = array('table' => 'documents', ), 'relationships' => array ( 'document_revisions' => array('lhs_module'=> 'Documents', 'lhs_table'=> 'documents', 'lhs_key' => 'id', - 'rhs_module'=> 'DocumentRevisions', 'rhs_table'=> 'document_revisions', 'rhs_key' => 'document_id', + 'rhs_module'=> 'Documents', 'rhs_table'=> 'document_revisions', 'rhs_key' => 'document_id', 'relationship_type'=>'one-to-many') ,'documents_modified_user' => @@ -428,6 +353,6 @@ $dictionary['Document'] = array('table' => 'documents', ), ); -VardefManager::createVardef('Documents','Document', array('default','assignable', +VardefManager::createVardef('Documents','Document', array('default', )); ?> diff --git a/modules/Documents/views/view.detail.php b/modules/Documents/views/view.detail.php index 0b2937b8..5afdc50c 100644 --- a/modules/Documents/views/view.detail.php +++ b/modules/Documents/views/view.detail.php @@ -52,10 +52,10 @@ class DocumentsViewDetail extends ViewDetail /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { $params = array(); - $params[] = $this->_getModuleTitleListParam($browserTitle); + $params[] = $this->_getModuleTitleListParam(); $params[] = $this->bean->document_name; return $params; diff --git a/modules/Documents/views/view.edit.php b/modules/Documents/views/view.edit.php index 12a4e246..833d968b 100644 --- a/modules/Documents/views/view.edit.php +++ b/modules/Documents/views/view.edit.php @@ -47,12 +47,12 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/MVC/View/views/view.edit.php'); -class DocumentsViewEdit extends ViewEdit +class DocumentsViewEdit extends ViewEdit { /** * @see SugarView::display() */ - public function display() + public function display() { global $app_list_strings, $mod_strings; /* @@ -67,30 +67,34 @@ class DocumentsViewEdit extends ViewEdit */ $load_signed=false; if ((isset($_REQUEST['load_signed_id']) && !empty($_REQUEST['load_signed_id']))) { - + $load_signed=true; if (isset($_REQUEST['record'])) { $this->bean->related_doc_id=$_REQUEST['record']; } - if (isset($_REQUEST['selected_revision_id'])) { + if (isset($_REQUEST['selected_revision_id'])) { $this->bean->related_doc_rev_id=$_REQUEST['selected_revision_id']; } - + $this->bean->id=null; $this->bean->document_name=null; $this->bean->filename=null; $this->bean->is_template=0; } //if - + if (!empty($this->bean->id)) { $this->ss->assign("FILE_OR_HIDDEN", "hidden"); if (!$this->ev->isDuplicate) { $this->ss->assign("DISABLED", "disabled"); } - } else { + } else { + global $timedate; + $format = $timedate->get_cal_date_format(); + $format = str_replace('%', '', $format); + $this->bean->active_date = date($format); $this->bean->revision = 1; $this->ss->assign("FILE_OR_HIDDEN", "file"); - } + } $popup_request_data = array( 'call_back_function' => 'document_set_return', @@ -111,28 +115,28 @@ class DocumentsViewEdit extends ViewEdit if (!empty($this->bean->related_doc_rev_id)) { $this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($this->bean->related_doc_id), $this->bean->related_doc_rev_id)); } else { - $this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($this->bean->related_doc_id), '')); + $this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($this->bean->related_doc_id), '')); } } else { - $this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled"); + $this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled"); } //set parent information in the form. if (isset($_REQUEST['parent_id'])) { - $this->ss->assign("PARENT_ID",$_REQUEST['parent_id']); + $this->ss->assign("PARENT_ID",$_REQUEST['parent_id']); } //if - + if (isset($_REQUEST['parent_name'])) { $this->ss->assign("PARENT_NAME", $_REQUEST['parent_name']); - + if (!empty($_REQUEST['parent_type'])) { switch (strtolower($_REQUEST['parent_type'])) { - + case "contracts" : $this->ss->assign("LBL_PARENT_NAME",$mod_strings['LBL_CONTRACT_NAME']); break; - + //todo remove leads case. case "leads" : $this->ss->assign("LBL_PARENT_NAME",$mod_strings['LBL_CONTRACT_NAME']); @@ -140,36 +144,36 @@ class DocumentsViewEdit extends ViewEdit } //switch } //if } //if - + if (isset($_REQUEST['parent_type'])) { - $this->ss->assign("PARENT_TYPE",$_REQUEST['parent_type']); + $this->ss->assign("PARENT_TYPE",$_REQUEST['parent_type']); } if ($load_signed) { - $this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled"); - $this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "hidden"); + $this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled"); + $this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "hidden"); $this->ss->assign("LOAD_SIGNED_ID",$_REQUEST['load_signed_id']); } else { - $this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "button"); + $this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "button"); } //if-else parent::display(); } - + /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { $params = array(); - $params[] = $this->_getModuleTitleListParam($browserTitle); + $params[] = $this->_getModuleTitleListParam(); if(!empty($this->bean->id)){ $params[] = "".$this->bean->document_name.""; $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL']; }else{ $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL']; } - + return $params; } } diff --git a/modules/Documents/views/view.extdoc.php b/modules/Documents/views/view.extdoc.php deleted file mode 100644 index f1bddb1a..00000000 --- a/modules/Documents/views/view.extdoc.php +++ /dev/null @@ -1,187 +0,0 @@ - false, 'show_title' => false, 'show_subpanels' => false, 'show_search' => true, 'show_footer' => false, 'show_javascript' => false, 'view_print' => false,); - - public function init($bean, $view_object_map) { - $this->seed = $bean; - } - - public function display(){ - - if ( isset($_REQUEST['name_basic']) ) { - $file_search = trim($_REQUEST['name_basic']); - } else { - $file_search = ''; - } - - // $apiName = 'LotusLiveDirect'; - if ( !isset($_REQUEST['apiName']) ) { - $apiName = 'LotusLive'; - } else { - $apiName = $_REQUEST['apiName']; - } - - // See if we are running as a popup window - if ( isset($_REQUEST['isPopup']) && $_REQUEST['isPopup'] == 1 && !empty($_REQUEST['elemBaseName']) ) { - $isPopup = true; - } else { - $isPopup = false; - } - - // Need to manually attempt to fetch the EAPM record, we don't want to give them the signup screen when they just have a deactivated account. - - if ( !$eapmBean = EAPM::getLoginInfo($apiName,true) ) { - $smarty = new Sugar_Smarty(); - echo $smarty->fetch('include/externalAPI/LotusLive/LotusLiveSignup.'.$GLOBALS['current_language'].'.tpl'); - return; - } - - - $api = ExternalAPIFactory::loadAPI($apiName,true); - $api->loadEAPM($eapmBean); - - $quickCheck = $api->quickCheckLogin(); - if ( ! $quickCheck['success'] ) { - $errorMessage = string_format(translate('LBL_ERR_FAILED_QUICKCHECK','EAPM'), array('LotusLive')); - $errorMessage .= '
    '; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - - $errorMessage .= '
     '; - $errorMessage .= ''; - $errorMessage .= '
    '; - echo $errorMessage; - return; - } - - $searchDataLower = $api->searchDoc($file_search,true); - - - // In order to emulate the list views for the SugarFields, I need to uppercase all of the key names. - $searchData = array(); - - if ( is_array($searchDataLower) ) { - foreach ( $searchDataLower as $row ) { - $newRow = array(); - foreach ( $row as $key => $value ) { - $newRow[strtoupper($key)] = $value; - } - - if ( $isPopup ) { - // We are running as a popup window, we need to replace the direct url with some javascript - $newRow['DOC_URL'] = "javascript:window.opener.SUGAR.field.file.populateFromPopup('".addslashes($_REQUEST['elemBaseName'])."','".addslashes($newRow['ID'])."','".addslashes($newRow['NAME'])."','".addslashes($newRow['URL'])."','".addslashes($newRow['URL'])."'); window.close();"; - }else{ - $newRow['DOC_URL'] = $newRow['URL']; - } - $searchData[] = $newRow; - } - } - - $displayColumns = array( - 'NAME' => array( - 'label' => 'LBL_LIST_EXT_DOCUMENT_NAME', - 'type' => 'varchar', - 'link' => true, - ), - 'DATE_MODIFIED' => array( - 'label' => 'LBL_DATE', - 'type' => 'date', - ), - ); - - $ss = new Sugar_Smarty(); - $ss->assign('searchFieldLabel',translate('LBL_SEARCH_EXTERNAL_DOCUMENT','Documents')); - $ss->assign('displayedNote',translate('LBL_EXTERNAL_DOCUMENT_NOTE','Documents')); - $ss->assign('APP',$GLOBALS['app_strings']); - $ss->assign('MOD',$GLOBALS['mod_strings']); - $ss->assign('data', $searchData); - $ss->assign('displayColumns',$displayColumns); - $ss->assign('imgPath',SugarThemeRegistry::current()->getImageURL($apiName.'_image_inline.png')); - - if ( $isPopup ) { - $ss->assign('linkTarget',''); - $ss->assign('isPopup',1); - $ss->assign('elemBaseName',$_REQUEST['elemBaseName']); - } else { - $ss->assign('linkTarget','_new'); - $ss->assign('isPopup',0); - $ss->assign('elemBaseName',''); - } - $ss->assign('apiName',$apiName); - $ss->assign('DCSEARCH',$file_search); - - if ( $isPopup ) { - // Need the popup header... I feel so dirty. - ob_start(); - echo('
    '); - insert_popup_header($GLOBALS['theme']); - $output_html = ob_get_contents(); - ob_end_clean(); - - $output_html .= get_form_header(translate('LBL_SEARCH_FORM_TITLE','Documents'), '', false); - - echo($output_html); - } - - $ss->display('modules/Documents/tpls/view.extdoc.tpl'); - - if ( $isPopup ) { - // Close the dccontent div - echo('
    '); - } - } -} diff --git a/modules/DynamicFields/DynamicField.php b/modules/DynamicFields/DynamicField.php index 3d4575ae..77ec7e85 100644 --- a/modules/DynamicFields/DynamicField.php +++ b/modules/DynamicFields/DynamicField.php @@ -41,12 +41,12 @@ if (! defined ( 'sugarEntry' ) || ! sugarEntry) class DynamicField { var $use_existing_labels = false; // this value is set to true by install_custom_fields() in ModuleInstaller.php; everything else expects it to be false - var $base_path = ""; - - function DynamicField($module = '') { - $this->module = (! empty ( $module )) ? $module :( (isset($_REQUEST['module']) && ! empty($_REQUEST['module'])) ? $_REQUEST ['module'] : ''); - $this->base_path = "custom/Extension/modules/{$this->module}/Ext/Vardefs"; - } + var $base_path = ""; + + function DynamicField($module = '') { + $this->module = (! empty ( $module )) ? $module :( (isset($_REQUEST['module']) && ! empty($_REQUEST['module'])) ? $_REQUEST ['module'] : ''); + $this->base_path = "custom/Extension/modules/{$this->module}/Ext/Vardefs"; + } function getModuleName() { @@ -65,23 +65,23 @@ class DynamicField { } - /** - * This will add the bean as a reference in this object as well as building the custom field cache if it has not been built - * LOADS THE BEAN IF THE BEAN IS NOT BEING PASSED ALONG IN SETUP IT SHOULD BE SET PRIOR TO SETUP - * - * @param SUGARBEAN $bean - */ - function setup($bean = null) { - if ($bean) { - $this->bean = $bean; - } - if (isset ( $this->bean->module_dir )) { - $this->module = $this->bean->module_dir; - } - if(!isset($GLOBALS['dictionary'][$this->bean->object_name]['custom_fields'])){ - $this->buildCache ( $this->module ); - } - } + /** + * This will add the bean as a reference in this object as well as building the custom field cache if it has not been built + * LOADS THE BEAN IF THE BEAN IS NOT BEING PASSED ALONG IN SETUP IT SHOULD BE SET PRIOR TO SETUP + * + * @param SUGARBEAN $bean + */ + function setup($bean = null) { + if ($bean) { + $this->bean = & $bean; + } + if (isset ( $this->bean->module_dir )) { + $this->module = $this->bean->module_dir; + } + if(!isset($GLOBALS['dictionary'][$this->bean->object_name]['custom_fields'])){ + $this->buildCache ( $this->module ); + } + } function setLabel( $language='en_us' , $key , $value ) { @@ -91,195 +91,195 @@ class DynamicField { $parser->handleSave( $params , $language); } - /** - * Builds the cache for custom fields based on the vardefs - * - * @param STRING $module - * @return unknown - */ - function buildCache($module = false) { - //We can't build the cache while installing as the required database tables may not exist. - if (!empty($GLOBALS['installing']) && $GLOBALS['installing'] == true|| !$GLOBALS['db']) - return false; - if($module == '../data')return false; - - static $results = array ( ) ; - - $where = ''; - if (! empty ( $module )) { - $where .= " custom_module='$module' AND "; - unset( $results[ $module ] ) ; // clear out any old results for the module as $results is declared static - } - else - { - $results = array ( ) ; // clear out results - if we remove a module we don't want to have its old vardefs hanging around - } - - $GLOBALS['log']->debug('rebuilding cache for ' . $module); - $query = "SELECT * FROM fields_meta_data WHERE $where deleted = 0"; - - $result = $GLOBALS['db']->query ( $query ); - require_once ('modules/DynamicFields/FieldCases.php'); - - // retrieve the field definition from the fields_meta_data table - // using 'encode'=false to fetchByAssoc to prevent any pre-formatting of the base metadata - // for immediate use in HTML. This metadata will be further massaged by get_field_def() and so should not be pre-formatted - while ( $row = $GLOBALS['db']->fetchByAssoc ( $result , -1 ,false ) ) { - $field = get_widget ( $row ['type'] ); - - foreach ( $row as $key => $value ) { - $field->$key = $value; - } - $field->default = $field->default_value; - $vardef = $field->get_field_def (); - $vardef ['id'] = $row ['id']; - $vardef ['custom_module'] = $row ['custom_module']; - if (empty ( $vardef ['source'] )) - $vardef ['source'] = 'custom_fields'; - if (empty ( $results [$row ['custom_module']] )) - $results [$row ['custom_module']] = array ( ); - $results [$row ['custom_module']] [$row ['name']] = $vardef; - } - if (empty ( $module )) { - foreach ( $results as $module => $result ) { - $this->saveToVardef ( $module, $result ); - } - } else { - if (! empty ( $results [$module] )) { - $this->saveToVardef ( $module, $results [$module] ); - }else{ - $this->saveToVardef ( $module, false ); - } - } - return true; - - } - - /** - * Returns the widget for a custom field from the fields_meta_data table. - */ - function getFieldWidget($module, $fieldName) { - if (empty($module) || empty($fieldName)){ - sugar_die("Unable to load widget for '$module' : '$fieldName'"); - } - $query = "SELECT * FROM fields_meta_data WHERE custom_module='$module' AND name='$fieldName' AND deleted = 0"; - $result = $GLOBALS['db']->query ( $query ); - require_once ('modules/DynamicFields/FieldCases.php'); - if ( $row = $GLOBALS['db']->fetchByAssoc ( $result ) ) { - $field = get_widget ( $row ['type'] ); - $field->populateFromRow($row); - return $field; - } - } - - - /** - * Updates the cached vardefs with the custom field information stored in result - * - * @param string $module - * @param array $result - */ - function saveToVardef($module,$result) { - - global $beanList; - if (! empty ( $beanList [$module] )) { - $object = $beanList [$module]; - - if ($object == 'aCase') { - $object = 'Case'; - } - - if(empty($GLOBALS['dictionary'][$object]['fields'])){ - //if the vardef isn't loaded let's try loading it. - VardefManager::refreshVardefs($module,$object, null, false); - //if it's still not loaded we really don't have anything useful to cache - if(empty($GLOBALS['dictionary'][$object]['fields']))return; - } - $GLOBALS ['dictionary'] [$object] ['custom_fields'] = false; - if (! empty ( $GLOBALS ['dictionary'] [$object] )) { - if (! empty ( $result )) { - // First loop to add - - foreach ( $result as $field ) { - foreach($field as $k=>$v){ - //allows values for custom fields to be defined outside of the scope of studio - if(!isset($GLOBALS ['dictionary'] [$object] ['fields'] [$field ['name']][$k])){ - $GLOBALS ['dictionary'] [$object] ['fields'] [$field ['name']][$k] = $v; - } - } - } - - // Second loop to remove - foreach ( $GLOBALS ['dictionary'] [$object] ['fields'] as $name => $fieldDef ) { - - if (isset ( $fieldDef ['custom_module'] )) { - if (! isset ( $result [$name] )) { - unset ( $GLOBALS ['dictionary'] [$object] ['fields'] [$name] ); - } else { - $GLOBALS ['dictionary'] [$object] ['custom_fields'] = true; - } - } - - } //if - } - } - $manager = new VardefManager ( ); - $manager->saveCache ( $this->module, $object ); - } - } - - /** - * returns either false or an array containing the select and join parameter for a query using custom fields - * @param $expandedList boolean If true, return a list of all fields with source=custom_fields in the select instead of the standard _cstm.* - * This is required for any downstream construction of a SQL statement where we need to manipulate the select list, - * for example, listviews with custom relate fields where the value comes from join rather than from the custom table - * - * @return array select=>select columns, join=>prebuilt join statement - */ + /** + * Builds the cache for custom fields based on the vardefs + * + * @param STRING $module + * @return unknown + */ + function buildCache($module = false) { + //We can't build the cache while installing as the required database tables may not exist. + if (!empty($GLOBALS['installing']) && $GLOBALS['installing'] == true|| !$GLOBALS['db']) + return false; + if($module == '../data')return false; + + static $results = array ( ) ; + + $where = ''; + if (! empty ( $module )) { + $where .= " custom_module='$module' AND "; + unset( $results[ $module ] ) ; // clear out any old results for the module as $results is declared static + } + else + { + $results = array ( ) ; // clear out results - if we remove a module we don't want to have its old vardefs hanging around + } + + $GLOBALS['log']->debug('rebuilding cache for ' . $module); + $query = "SELECT * FROM fields_meta_data WHERE $where deleted = 0"; + + $result = $GLOBALS['db']->query ( $query ); + require_once ('modules/DynamicFields/FieldCases.php'); + + // retrieve the field definition from the fields_meta_data table + // using 'encode'=false to fetchByAssoc to prevent any pre-formatting of the base metadata + // for immediate use in HTML. This metadata will be further massaged by get_field_def() and so should not be pre-formatted + while ( $row = $GLOBALS['db']->fetchByAssoc ( $result , -1 ,false ) ) { + $field = get_widget ( $row ['type'] ); + + foreach ( $row as $key => $value ) { + $field->$key = $value; + } + $field->default = $field->default_value; + $vardef = $field->get_field_def (); + $vardef ['id'] = $row ['id']; + $vardef ['custom_module'] = $row ['custom_module']; + if (empty ( $vardef ['source'] )) + $vardef ['source'] = 'custom_fields'; + if (empty ( $results [$row ['custom_module']] )) + $results [$row ['custom_module']] = array ( ); + $results [$row ['custom_module']] [$row ['name']] = $vardef; + } + if (empty ( $module )) { + foreach ( $results as $module => $result ) { + $this->saveToVardef ( $module, $result ); + } + } else { + if (! empty ( $results [$module] )) { + $this->saveToVardef ( $module, $results [$module] ); + }else{ + $this->saveToVardef ( $module, false ); + } + } + return true; + + } + + /** + * Returns the widget for a custom field from the fields_meta_data table. + */ + function getFieldWidget($module, $fieldName) { + if (empty($module) || empty($fieldName)){ + sugar_die("Unable to load widget for '$module' : '$fieldName'"); + } + $query = "SELECT * FROM fields_meta_data WHERE custom_module='$module' AND name='$fieldName' AND deleted = 0"; + $result = $GLOBALS['db']->query ( $query ); + require_once ('modules/DynamicFields/FieldCases.php'); + if ( $row = $GLOBALS['db']->fetchByAssoc ( $result ) ) { + $field = get_widget ( $row ['type'] ); + $field->populateFromRow($row); + return $field; + } + } + + + /** + * Updates the cached vardefs with the custom field information stored in result + * + * @param string $module + * @param array $result + */ + function saveToVardef($module,$result) { + + global $beanList; + if (! empty ( $beanList [$module] )) { + $object = $beanList [$module]; + + if ($object == 'aCase') { + $object = 'Case'; + } + + if(empty($GLOBALS['dictionary'][$object]['fields'])){ + //if the vardef isn't loaded let's try loading it. + VardefManager::refreshVardefs($module,$object, null, false); + //if it's still not loaded we really don't have anything useful to cache + if(empty($GLOBALS['dictionary'][$object]['fields']))return; + } + $GLOBALS ['dictionary'] [$object] ['custom_fields'] = false; + if (! empty ( $GLOBALS ['dictionary'] [$object] )) { + if (! empty ( $result )) { + // First loop to add + + foreach ( $result as $field ) { + foreach($field as $k=>$v){ + //allows values for custom fields to be defined outside of the scope of studio + if(!isset($GLOBALS ['dictionary'] [$object] ['fields'] [$field ['name']][$k])){ + $GLOBALS ['dictionary'] [$object] ['fields'] [$field ['name']][$k] = $v; + } + } + } + + // Second loop to remove + foreach ( $GLOBALS ['dictionary'] [$object] ['fields'] as $name => $fieldDef ) { + + if (isset ( $fieldDef ['custom_module'] )) { + if (! isset ( $result [$name] )) { + unset ( $GLOBALS ['dictionary'] [$object] ['fields'] [$name] ); + } else { + $GLOBALS ['dictionary'] [$object] ['custom_fields'] = true; + } + } + + } //if + } + } + $manager = new VardefManager ( ); + $manager->saveCache ( $this->module, $object ); + } + } + + /** + * returns either false or an array containing the select and join parameter for a query using custom fields + * @param $expandedList boolean If true, return a list of all fields with source=custom_fields in the select instead of the standard _cstm.* + * This is required for any downstream construction of a SQL statement where we need to manipulate the select list, + * for example, listviews with custom relate fields where the value comes from join rather than from the custom table + * + * @return array select=>select columns, join=>prebuilt join statement + */ function getJOIN( $expandedList = false , $includeRelates = false, &$where = false){ - if(!$this->bean->hasCustomFields()){ + if(!$this->bean->hasCustomFields()){ return false; } if (empty($expandedList) ) { - $select = ",{$this->bean->table_name}_cstm.*" ; + $select = ",{$this->bean->table_name}_cstm.*" ; } else { - $select = ''; - $isList = is_array($expandedList); - foreach($this->bean->field_defs as $name=>$field) - { - if (!empty($field['source']) && $field['source'] == 'custom_fields' && (!$isList || !empty($expandedList[$name]))){ - // assumption: that the column name in _cstm is the same as the field name. Currently true. - // however, two types of dynamic fields do not have columns in the custom table - html fields (they're readonly) and flex relates (parent_name doesn't exist) - if ( $field['type'] != 'html' && $name != 'parent_name') - $select .= ",{$this->bean->table_name}_cstm.{$name}" ; - } - } + $select = ''; + $isList = is_array($expandedList); + foreach($this->bean->field_defs as $name=>$field) + { + if (!empty($field['source']) && $field['source'] == 'custom_fields' && (!$isList || !empty($expandedList[$name]))){ + // assumption: that the column name in _cstm is the same as the field name. Currently true. + // however, two types of dynamic fields do not have columns in the custom table - html fields (they're readonly) and flex relates (parent_name doesn't exist) + if ( $field['type'] != 'html' && $name != 'parent_name') + $select .= ",{$this->bean->table_name}_cstm.{$name}" ; + } + } } $join = " LEFT JOIN " .$this->bean->table_name. "_cstm ON " .$this->bean->table_name. ".id = ". $this->bean->table_name. "_cstm.id_c "; if ($includeRelates) { - $jtAlias = "relJoin"; - $jtCount = 1; - foreach($this->bean->field_defs as $name=>$field) - { - if ($field['type'] == 'relate' && isset($field['custom_module'])) { - $relateJoinInfo = $this->getRelateJoin($field, $jtAlias.$jtCount); - $select .= $relateJoinInfo['select']; - $join .= $relateJoinInfo['from']; - //bug 27654 martin - if ($where) - { - $pattern = '/'.$field['name'].'\slike/i'; - $replacement = $relateJoinInfo['name_field'].' like'; - $where = preg_replace($pattern,$replacement,$where); - } - $jtCount++; - } - } + $jtAlias = "relJoin"; + $jtCount = 1; + foreach($this->bean->field_defs as $name=>$field) + { + if ($field['type'] == 'relate' && isset($field['custom_module'])) { + $relateJoinInfo = $this->getRelateJoin($field, $jtAlias.$jtCount); + $select .= $relateJoinInfo['select']; + $join .= $relateJoinInfo['from']; + //bug 27654 martin + if ($where) + { + $pattern = '/'.$field['name'].'\slike/i'; + $replacement = $relateJoinInfo['name_field'].' like'; + $where = preg_replace($pattern,$replacement,$where); + } + $jtCount++; + } + } } return array('select'=>$select, 'join'=>$join); @@ -287,43 +287,43 @@ class DynamicField { } function getRelateJoin($field_def, $joinTableAlias) { - if (empty($field_def['type']) || $field_def['type'] != "relate") { - return false; - } - global $beanFiles, $beanList, $module; - $rel_module = $field_def['module']; - if(empty($beanFiles[$beanList[$rel_module]])) { - return false; - } + if (empty($field_def['type']) || $field_def['type'] != "relate") { + return false; + } + global $beanFiles, $beanList, $module; + $rel_module = $field_def['module']; + if(empty($beanFiles[$beanList[$rel_module]])) { + return false; + } - require_once($beanFiles[$beanList[$rel_module]]); - $rel_mod = new $beanList[$rel_module](); - $rel_table = $rel_mod->table_name; - if (isset($rel_mod->field_defs['name'])) - { - $name_field_def = $rel_mod->field_defs['name']; - if(isset($name_field_def['db_concat_fields'])) - { - $name_field = db_concat($joinTableAlias, $name_field_def['db_concat_fields']); - } - //If the name field is non-db, we need to find another field to display - else if(!empty($rel_mod->field_defs['name']['source']) && $rel_mod->field_defs['name']['source'] == "non-db" && !empty($field_def['rname'])) - { - $name_field = "$joinTableAlias." . $field_def['rname']; - } - else - { - $name_field = "$joinTableAlias.name"; - } - } - $tableName = isset($field_def['custom_module']) ? "{$this->bean->table_name}_cstm" : $this->bean->table_name ; - $relID = $field_def['id_name']; - $ret_array['rel_table'] = $rel_table; - $ret_array['name_field'] = $name_field; - $ret_array['select'] = ", $name_field {$field_def['name']} "; - $ret_array['from'] = " LEFT JOIN $rel_table $joinTableAlias ON $tableName.$relID = $joinTableAlias.id" - . " AND $joinTableAlias.deleted=0 "; - return $ret_array; + require_once($beanFiles[$beanList[$rel_module]]); + $rel_mod = new $beanList[$rel_module](); + $rel_table = $rel_mod->table_name; + if (isset($rel_mod->field_defs['name'])) + { + $name_field_def = $rel_mod->field_defs['name']; + if(isset($name_field_def['db_concat_fields'])) + { + $name_field = db_concat($joinTableAlias, $name_field_def['db_concat_fields']); + } + //If the name field is non-db, we need to find another field to display + else if(!empty($rel_mod->field_defs['name']['source']) && $rel_mod->field_defs['name']['source'] == "non-db" && !empty($field_def['rname'])) + { + $name_field = "$joinTableAlias." . $field_def['rname']; + } + else + { + $name_field = "$joinTableAlias.name"; + } + } + $tableName = isset($field_def['custom_module']) ? "{$this->bean->table_name}_cstm" : $this->bean->table_name ; + $relID = $field_def['id_name']; + $ret_array['rel_table'] = $rel_table; + $ret_array['name_field'] = $name_field; + $ret_array['select'] = ", $name_field {$field_def['name']} "; + $ret_array['from'] = " LEFT JOIN $rel_table $joinTableAlias ON $tableName.$relID = $joinTableAlias.id" + . " AND $joinTableAlias.deleted=0 "; + return $ret_array; } /** @@ -333,28 +333,28 @@ class DynamicField { function fill_relationships(){ global $beanList, $beanFiles; if(!empty($this->bean->relDepth)) { - if($this->bean->relDepth > 1)return; - }else{ - $this->bean->relDepth = 0; + if($this->bean->relDepth > 1)return; + }else{ + $this->bean->relDepth = 0; } foreach($this->bean->field_defs as $field){ - if(empty($field['source']) || $field['source'] != 'custom_fields')continue; + if(empty($field['source']) || $field['source'] != 'custom_fields')continue; if($field['type'] == 'relate'){ $related_module =$field['ext2']; $name = $field['name']; if (empty($this->bean->$name)) { //Don't load the relationship twice - $id_name = $field['id_name']; - if(isset($beanList[ $related_module])){ - $class = $beanList[$related_module]; - - if(file_exists($beanFiles[$class]) && isset($this->bean->$name)){ - require_once($beanFiles[$class]); - $mod = new $class(); - $mod->relDepth = $this->bean->relDepth + 1; - $mod->retrieve($this->bean->$id_name); - $this->bean->$name = $mod->name; - } - } + $id_name = $field['id_name']; + if(isset($beanList[ $related_module])){ + $class = $beanList[$related_module]; + + if(file_exists($beanFiles[$class]) && isset($this->bean->$name)){ + require_once($beanFiles[$class]); + $mod = new $class(); + $mod->relDepth = $this->bean->relDepth + 1; + $mod->retrieve($this->bean->$id_name); + $this->bean->$name = $mod->name; + } + } } } } @@ -398,9 +398,9 @@ class DynamicField { elseif ( $this->bean->$name === TRUE ) $this->bean->$name = '1'; } - if(($field['type'] == 'date' || $field['type'] == 'datetimecombo') && (empty($this->bean->$name )|| $this->bean->$name == '1900-01-01')){ - $quote = ''; - $this->bean->$name = "NULL"; + if(($field['type'] == 'date' || $field['type'] == 'datetimecombo') && (empty($this->bean->$name )|| $this->bean->$name == '1900-01-01')){ + $quote = ''; + $this->bean->$name = 'NULL'; } if($isUpdate){ if($first){ @@ -429,11 +429,14 @@ class DynamicField { if ( $GLOBALS['db']->getOne($checkquery) ) $result = $GLOBALS['db']->query($query); else - $GLOBALS['db']->query($queryInsert); + $GLOBALS['db']->query($queryInsert); } } + } + + } /** * Deletes the field from fields_meta_data and drops the database column then it rebuilds the cache @@ -441,24 +444,24 @@ class DynamicField { * @param STRING $name - field name */ function deleteField($widget){ - require_once('modules/DynamicFields/templates/Fields/TemplateField.php'); - global $beanList; - if (!($widget instanceof TemplateField)) { - $field_name = $widget; - $widget = new TemplateField(); - $widget->name = $field_name; - } - $object_name = $beanList[$this->module]; - - if ($object_name == 'aCase') { + require_once('modules/DynamicFields/templates/Fields/TemplateField.php'); + global $beanList; + if (!($widget instanceof TemplateField)) { + $field_name = $widget; + $widget = new TemplateField(); + $widget->name = $field_name; + } + $object_name = $beanList[$this->module]; + + if ($object_name == 'aCase') { $object_name = 'Case'; } - $GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id='" . $this->module . $widget->name . "'"); + $GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id='" . $this->module . $widget->name . "'"); $sql = $widget->get_db_delete_alter_table( $this->bean->table_name . "_cstm" ) ; if (! empty( $sql ) ) $GLOBALS['db']->query( $sql ); - + $this->removeVardefExtension($widget); VardefManager::clearVardef(); VardefManager::refreshVardefs($this->module, $object_name); @@ -498,9 +501,9 @@ class DynamicField { * @param Field Object $field * @return boolean */ - function addFieldObject(&$field){ - $GLOBALS['log']->debug('adding field'); - $object_name = $this->module; + function addFieldObject(&$field){ + $GLOBALS['log']->debug('adding field'); + $object_name = $this->module; $db_name = $field->name; $fmd = new FieldsMetaData(); @@ -513,7 +516,7 @@ class DynamicField { $db_name = $this->getDBName($field->name); $field->name = $db_name; } - $this->createCustomTable(); + $this->createCustomTable(); $fmd->id = $object_name.$db_name; $fmd->custom_module= $object_name; $fmd->name = $db_name; @@ -550,100 +553,100 @@ class DynamicField { } $this->saveExtendedAttributes($field, array_keys($fmd->field_defs)); } - + return true; } - + function saveExtendedAttributes($field, $column_fields) { - require_once ('modules/ModuleBuilder/parsers/StandardField.php') ; - require_once ('modules/DynamicFields/FieldCases.php') ; - global $beanList; - - $to_save = array(); - $base_field = get_widget ( $field->type) ; - foreach ($field->vardef_map as $property => $fmd_col){ - - if (!isset($field->$property) || in_array($fmd_col, $column_fields) || in_array($property, $column_fields) - || $this->isDefaultValue($property, $field->$property, $base_field) - || $property == "action" || $property == "label_value" || $property == "label" - || (substr($property, 0,3) == 'ext' && strlen($property) == 4)) - { - continue; - } - $to_save[$property] = - is_string($field->$property) ? htmlspecialchars_decode($field->$property, ENT_QUOTES) : $field->$property; + require_once ('modules/ModuleBuilder/parsers/StandardField.php') ; + require_once ('modules/DynamicFields/FieldCases.php') ; + global $beanList; + + $to_save = array(); + $base_field = get_widget ( $field->type) ; + foreach ($field->vardef_map as $property => $fmd_col){ + + if (!isset($field->$property) || in_array($fmd_col, $column_fields) || in_array($property, $column_fields) + || $this->isDefaultValue($property, $field->$property, $base_field) + || $property == "action" || $property == "label_value" || $property == "label" + || (substr($property, 0,3) == 'ext' && strlen($property) == 4)) + { + continue; + } + $to_save[$property] = + is_string($field->$property) ? htmlspecialchars_decode($field->$property, ENT_QUOTES) : $field->$property; } $bean_name = $beanList[$this->module]; - + $this->writeVardefExtension($bean_name, $field, $to_save); } - - protected function isDefaultValue($property, $value, $baseField) + + protected function isDefaultValue($property, $value, $baseField) { - switch ($property) { - case "importable": - return ( $value === 'true' || $value === '1' || $value === true || $value === 1 ); break; - case "required": - case "audited": - case "massupdate": - return ( $value === 'false' || $value === '0' || $value === false || $value === 0); break; - case "default_value": - case "default": - case "help": - case "comments": - return ($value == ""); - case "duplicate_merge": - return ( $value === 'false' || $value === '0' || $value === false || $value === 0 || $value === "disabled"); break; + switch ($property) { + case "importable": + return ( $value === 'true' || $value === '1' || $value === true || $value === 1 ); break; + case "required": + case "audited": + case "massupdate": + return ( $value === 'false' || $value === '0' || $value === false || $value === 0); break; + case "default_value": + case "default": + case "help": + case "comments": + return ($value == ""); + case "duplicate_merge": + return ( $value === 'false' || $value === '0' || $value === false || $value === 0 || $value === "disabled"); break; } - + if (isset($baseField->$property)) { - return $baseField->$property == $value; + return $baseField->$property == $value; } - + return false; } - + protected function writeVardefExtension($bean_name, $field, $def_override) { - //Hack for the broken cases module - $vBean = $bean_name == "aCase" ? "Case" : $bean_name; - $file_loc = "$this->base_path/sugarfield_{$field->name}.php"; - - $out = " $val) + //Hack for the broken cases module + $vBean = $bean_name == "aCase" ? "Case" : $bean_name; + $file_loc = "$this->base_path/sugarfield_{$field->name}.php"; + + $out = " $val) { - $out .= override_value_to_string_recursive(array($vBean, "fields", $field->name, $property), "dictionary", $val) . "\n"; + $out .= override_value_to_string_recursive(array($vBean, "fields", $field->name, $property), "dictionary", $val) . "\n"; } - + $out .= "\n ?>"; - + if (!file_exists($this->base_path)) mkdir_recursive($this->base_path); - + if( $fh = @sugar_fopen( $file_loc, 'w' ) ) - { - fputs( $fh, $out); - fclose( $fh ); - return true ; - } - else - { - return false ; - } + { + fputs( $fh, $out); + fclose( $fh ); + return true ; + } + else + { + return false ; + } } - + protected function removeVardefExtension($field) { - $file_loc = "$this->base_path/sugarfield_{$field->name}.php"; - - if (is_file($file_loc)) - { - unlink($file_loc); - } + $file_loc = "$this->base_path/sugarfield_{$field->name}.php"; + + if (is_file($file_loc)) + { + unlink($file_loc); + } } - + /** * DEPRECIATED: Use addFieldObject instead. @@ -667,27 +670,27 @@ class DynamicField { * @return boolean */ function addField($name,$label='', $type='Text',$max_size='255',$required_option='optional', $default_value='', $ext1='', $ext2='', $ext3='',$audited=0, $mass_update = 0 , $ext4='', $help='',$duplicate_merge=0, $comment=''){ - require_once('modules/DynamicFields/templates/Fields/TemplateField.php'); - $field = new TemplateField(); - $field->label = $label; + require_once('modules/DynamicFields/templates/Fields/TemplateField.php'); + $field = new TemplateField(); + $field->label = $label; if(empty($field->label)){ $field->label = $name; } $field->name = $name; - $field->type = $type; - $field->len = $max_size; - $field->required = (!empty($required_option) && $required_option != 'optional'); - $field->default = $default_value; - $field->ext1 = $ext1; - $field->ext2 = $ext2; - $field->ext3 = $ext3; - $field->ext4 = $ext4; - $field->help = $help; - $field->comments = $comment; - $field->massupdate = $mass_update; - $field->duplicate_merge = $duplicate_merge; - $field->audited = $audited; - $field->reportable = 1; + $field->type = $type; + $field->len = $max_size; + $field->required = (!empty($required_option) && $required_option != 'optional'); + $field->default = $default_value; + $field->ext1 = $ext1; + $field->ext2 = $ext2; + $field->ext3 = $ext3; + $field->ext4 = $ext4; + $field->help = $help; + $field->comments = $comment; + $field->massupdate = $mass_update; + $field->duplicate_merge = $duplicate_merge; + $field->audited = $audited; + $field->reportable = 1; return $this->addFieldObject($field); } @@ -698,8 +701,9 @@ class DynamicField { function createCustomTable($execute = true){ $out = ""; if (!$GLOBALS['db']->tableExists($this->bean->table_name."_cstm")) { - $GLOBALS['log']->debug('creating custom table for '. $this->bean->table_name); - $query = 'CREATE TABLE '.$this->bean->table_name.'_cstm ( '; + $GLOBALS['log']->debug('creating custom table for '. $this->bean->table_name); + $query = "/* Missing Table: {$this->bean->table_name}_cstm */\n" + . "CREATE TABLE ".$this->bean->table_name.'_cstm ( '; $query .='id_c ' . $this->bean->dbManager->helper->getColumnType('id') .' NOT NULL'; $query .=', PRIMARY KEY ( id_c ) )'; if($GLOBALS['db']->dbType == 'mysql'){ @@ -823,18 +827,18 @@ class DynamicField { } function setWhereClauses(&$where_clauses){ - if (isset($this->avail_fields)) { - foreach($this->avail_fields as $name=>$value){ - if(!empty($_REQUEST[$name])){ - $where_clauses[] = $this->bean->table_name . "_cstm.$name LIKE '". $GLOBALS['db']->quote($_REQUEST[$name]). "%'"; - } - } - } + if (isset($this->avail_fields)) { + foreach($this->avail_fields as $name=>$value){ + if(!empty($_REQUEST[$name])){ + $where_clauses[] = $this->bean->table_name . "_cstm.$name LIKE '". $GLOBALS['db']->quote($_REQUEST[$name]). "%'"; + } + } + } } - /////////////////////////BACKWARDS COMPATABILITY MODE FOR PRE 5.0 MODULES\\\\\\\\\\\\\\\\\\\\\\\\\\\ - ////////////////////////////END BACKWARDS COMPATABILITY MODE FOR PRE 5.0 MODULES\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + /////////////////////////BACKWARDS COMPATABILITY MODE FOR PRE 5.0 MODULES\\\\\\\\\\\\\\\\\\\\\\\\\\\ + ////////////////////////////END BACKWARDS COMPATABILITY MODE FOR PRE 5.0 MODULES\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /** * @@ -873,34 +877,34 @@ class DynamicField { } function populateXTPL(&$xtpl, $view){ - if($this->bean->hasCustomFields()){ - $results = $this->getAllFieldsView($view, 'xtpl'); - foreach($results as $name=>$value){ - if(is_array($value['xtpl'])){ - foreach($value['xtpl'] as $xName=>$xValue){ - $xtpl->assign(strtoupper($xName), $xValue); - - } - }else{ - $xtpl->assign(strtoupper($name), $value['xtpl']); - } - } - } + if($this->bean->hasCustomFields()){ + $results = $this->getAllFieldsView($view, 'xtpl'); + foreach($results as $name=>$value){ + if(is_array($value['xtpl'])){ + foreach($value['xtpl'] as $xName=>$xValue){ + $xtpl->assign(strtoupper($xName), $xValue); + + } + }else{ + $xtpl->assign(strtoupper($name), $value['xtpl']); + } + } + } } function populateAllXTPL(&$xtpl, $view){ - $this->populateXTPL($xtpl, $view); + $this->populateXTPL($xtpl, $view); - } + } function getAllFieldsView($view, $type){ - $results = array(); + $results = array(); foreach($this->bean->field_defs as $name=>$data){ - if(empty($data['source']) || $data['source'] != 'custom_fields')continue; - require_once ('modules/DynamicFields/FieldCases.php'); - $field = get_widget ( $data ['type'] ); - $field->populateFromRow($data); + if(empty($data['source']) || $data['source'] != 'custom_fields')continue; + require_once ('modules/DynamicFields/FieldCases.php'); + $field = get_widget ( $data ['type'] ); + $field->populateFromRow($data); $field->view = $view; $field->bean =& $this->bean; switch(strtolower($type)){ @@ -917,7 +921,7 @@ class DynamicField { return $results; } - ////////////////////////////END BACKWARDS COMPATABILITY MODE FOR PRE 5.0 MODULES\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + ////////////////////////////END BACKWARDS COMPATABILITY MODE FOR PRE 5.0 MODULES\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ } ?> diff --git a/modules/DynamicFields/FieldCases.php b/modules/DynamicFields/FieldCases.php index cb43e9be..41a7b894 100644 --- a/modules/DynamicFields/FieldCases.php +++ b/modules/DynamicFields/FieldCases.php @@ -119,7 +119,6 @@ function get_widget($type) case 'id': $local_temp = new TemplateId(); break; case 'datetimecombo': - case 'datetime': $local_temp = new TemplateDatetimecombo(); break; case 'image': $local_temp = new TemplateImage(); break; diff --git a/modules/DynamicFields/FieldViewer.php b/modules/DynamicFields/FieldViewer.php index 0ef8e705..8817d4b1 100644 --- a/modules/DynamicFields/FieldViewer.php +++ b/modules/DynamicFields/FieldViewer.php @@ -45,9 +45,6 @@ class FieldViewer{ $this->ss->assign('vardef', $vardef); $this->ss->assign('MOD', $mod); $this->ss->assign('APP', $GLOBALS['app_strings']); - //Only display range search option if in Studio, not ModuleBuilder - $this->ss->assign('range_search_option_enabled', empty($_REQUEST['view_package'])); - $GLOBALS['log']->debug('FieldViewer.php->getLayout() = '.$vardef['type']); switch($vardef['type']){ case 'address': @@ -64,7 +61,6 @@ class FieldViewer{ require_once('modules/DynamicFields/templates/Fields/Forms/date.php'); return get_body($this->ss, $vardef); case 'datetimecombo': - case 'datetime': require_once('modules/DynamicFields/templates/Fields/Forms/datetimecombo.php'); return get_body($this->ss, $vardef); case 'enum': @@ -98,9 +94,6 @@ class FieldViewer{ case 'url': require_once('modules/DynamicFields/templates/Fields/Forms/url.php'); return get_body($this->ss, $vardef); - case 'phone:': - require_once('modules/DynamicFields/templates/Fields/Forms/phone.php'); - return get_body($this->ss, $vardef); default: $file = false; if(file_exists('custom/modules/DynamicFields/templates/Fields/Forms/' . $vardef['type'] . '.php')){ diff --git a/modules/DynamicFields/language/en_us.lang.php b/modules/DynamicFields/language/en_us.lang.php index bfd036c1..b3e376bb 100644 --- a/modules/DynamicFields/language/en_us.lang.php +++ b/modules/DynamicFields/language/en_us.lang.php @@ -84,7 +84,6 @@ $mod_strings = array ( 'COLUMN_TITLE_DISPLAYED_ITEM_COUNT'=>'# Items displayed', 'COLUMN_TITLE_AUTOINC_NEXT' => 'Auto Increment Next Value', 'COLUMN_DISABLE_NUMBER_FORMAT' => 'Disable Format', - 'COLUMN_TITLE_ENABLE_RANGE_SEARCH' => 'Enable Range Search', 'LBL_DROP_DOWN_LIST' => 'Drop Down List', 'LBL_RADIO_FIELDS'=> 'Radio Fields', 'LBL_MULTI_SELECT_LIST'=> 'Multi Select List', @@ -105,7 +104,6 @@ $mod_strings = array ( 'LBL_REPORTABLE'=>'Reportable', 'ERR_RESERVED_FIELD_NAME' => "Reserved Keyword", 'ERR_SELECT_FIELD_TYPE' => 'Please Select a Field Type', - 'ERR_FIELD_NAME_ALREADY_EXISTS' => 'Field Name already exists', 'LBL_BTN_ADD' => 'Add', 'LBL_BTN_EDIT' => 'Edit', 'LBL_GENERATE_URL' => 'Generate URL', @@ -119,10 +117,6 @@ $mod_strings = array ( 'LBL_IMAGE_WIDTH' => 'Width', 'LBL_IMAGE_HEIGHT' => 'Height', 'LBL_IMAGE_BORDER' => 'Border', - 'COLUMN_TITLE_VALIDATE_US_FORMAT' => 'U.S. Format', - 'LBL_DEPENDENT'=>'Dependent', - 'LBL_VISIBLE_IF'=>'Visible If', - 'LBL_ENFORCED'=>'Enforced', ); diff --git a/modules/DynamicFields/templates/Fields/Forms/bool.tpl b/modules/DynamicFields/templates/Fields/Forms/bool.tpl index b251328a..b810f0a7 100644 --- a/modules/DynamicFields/templates/Fields/Forms/bool.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/bool.tpl @@ -42,5 +42,5 @@ {include file="modules/DynamicFields/templates/Fields/Forms/coreTop.tpl"} -
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_DEFAULT_VALUE"}: 5}disabled{/if} />{if $hideLevel > 5}{/if}
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_DEFAULT_VALUE"}: 5}disabled{/if} />{if $hideLevel > 5}{/if}
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_ENABLE_RANGE_SEARCH"}: - 5}disabled{/if} /> - {if $hideLevel > 5}{/if} -
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_DEFAULT_VALUE"}: {if $hideLevel < 5} - + diff --git a/modules/DynamicFields/templates/Fields/Forms/date.tpl b/modules/DynamicFields/templates/Fields/Forms/date.tpl index 4d76d09c..5f785a55 100644 --- a/modules/DynamicFields/templates/Fields/Forms/date.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/date.tpl @@ -44,9 +44,9 @@ {sugar_translate module="DynamicFields" label="COLUMN_TITLE_DEFAULT_VALUE"}: {if $hideLevel < 5} - {html_options id='default' name='default' options=$default_values selected=$vardef.display_default} + {html_options name='default' options=$default_values selected=$vardef.display_default} {else} - {$vardef.display_default} + {$vardef.display_default} {/if}
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_MASS_UPDATE"}: {if $hideLevel < 5} - + {else} - + {/if}
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_ENABLE_RANGE_SEARCH"}: - 5}disabled{/if} /> - {if $hideLevel > 5}{/if} -
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_MASS_UPDATE"}: {if $hideLevel < 5} - + {else} - + {/if}
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_ENABLE_RANGE_SEARCH"}: - 5}disabled{/if} /> - {if $hideLevel > 5}{/if} -
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_ENABLE_RANGE_SEARCH"}: - 5}disabled{/if} /> - {if $hideLevel > 5}{/if} -
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_PRECISION"}: diff --git a/modules/DynamicFields/templates/Fields/Forms/html.php b/modules/DynamicFields/templates/Fields/Forms/html.php index 0841d9cb..17bd70ac 100644 --- a/modules/DynamicFields/templates/Fields/Forms/html.php +++ b/modules/DynamicFields/templates/Fields/Forms/html.php @@ -37,11 +37,11 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); -function get_body($ss, $vardef) -{ +function get_body(&$ss, $vardef){ $edit_mod_strings = return_module_language($GLOBALS['current_language'], 'EditCustomFields'); $ss->assign('MOD', $edit_mod_strings); - + if(!empty($cf))$ss->assign('cf', $cf); + $edValue = ''; if(!empty($vardef['default_value'])) { $edValue = $vardef['default_value']; diff --git a/modules/DynamicFields/templates/Fields/Forms/int.tpl b/modules/DynamicFields/templates/Fields/Forms/int.tpl index af14846a..de58bb02 100644 --- a/modules/DynamicFields/templates/Fields/Forms/int.tpl +++ b/modules/DynamicFields/templates/Fields/Forms/int.tpl @@ -87,15 +87,6 @@ formsWithFieldLogic=null; {/if}
    {sugar_translate module="DynamicFields" label="COLUMN_TITLE_ENABLE_RANGE_SEARCH"}: - 5}disabled{/if} /> - {if $hideLevel > 5}{/if} -
    _generateComposeConfigData('email_compose'); - - + + //Check quick create module access - $QCAvailableModules = $this->_loadQuickCreateModules(); + $QCAvailibleModules = array(); + $QCModules = array( + 'Bugs', + 'Cases', + 'Contacts', + 'Leads', + 'Tasks' + ); + foreach($QCModules as $module) { + $class = substr($module, 0, strlen($module) - 1); + require_once("modules/{$module}/{$class}.php"); + + if($class=="Case") { + $class = "aCase"; + } + + $seed = new $class(); + if ($seed->ACLAccess('edit')) { + $QCAvailibleModules[] = $module; + } + } //Get the quickSearch js needed for assigned user id on Search Tab require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); - $qsd->setFormName('advancedSearchForm'); + $qsd = new QuickSearchDefaults(); + $qsd->setFormName('advancedSearchForm'); $quicksearchAssignedUser = "if(typeof sqs_objects == 'undefined'){var sqs_objects = new Array;}"; $quicksearchAssignedUser .= "sqs_objects['advancedSearchForm_assigned_user_name']=" . json_encode($qsd->getQSUser()) . ";"; - $qsd->setFormName('Distribute'); + $qsd->setFormName('Distribute'); $quicksearchAssignedUser .= "sqs_objects['Distribute_assigned_user_name']=" . json_encode($qsd->getQSUser()) . ";"; $this->smarty->assign('quickSearchForAssignedUser', $quicksearchAssignedUser); - - + + /////////////////////////////////////////////////////////////////////// //// BASIC ASSIGNS $this->smarty->assign("currentUserId",$current_user->id); @@ -151,7 +171,7 @@ class EmailUI { $this->smarty->assign('sugar_flavor', $sugar_flavor); $this->smarty->assign('current_language', $current_language); $this->smarty->assign('server_unique_key', $server_unique_key); - $this->smarty->assign('qcModules', json_encode($QCAvailableModules)); + $this->smarty->assign('qcModules', json_encode($QCAvailibleModules)); $extAllDebugValue = "ext-all.js"; $this->smarty->assign('extFileName', $extAllDebugValue); @@ -162,13 +182,12 @@ class EmailUI { /////////////////////////////////////////////////////////////////////// //// USER SETTINGS // settings: accounts - + $cuDatePref = $current_user->getUserDateTimePreferences(); $this->smarty->assign('dateFormat', $cuDatePref['date']); $this->smarty->assign('dateFormatExample', str_replace(array("Y", "m", "d"), array("yyyy", "mm", "dd"), $cuDatePref['date'])); $this->smarty->assign('calFormat', $timedate->get_cal_date_format()); - $this->smarty->assign('TIME_FORMAT', $timedate->get_user_time_format()); - + $ieAccounts = $ie->retrieveByGroupId($current_user->id); $ieAccountsOptions = "\n"; @@ -177,11 +196,11 @@ class EmailUI { $group = (!$v->is_personal) ? $app_strings['LBL_EMAIL_GROUP']."." : ""; $ieAccountsOptions .= "\n"; } - + $this->smarty->assign('ieAccounts', $ieAccountsOptions); $this->smarty->assign('rollover', $this->rolloverStyle); - $protocol = filterInboundEmailPopSelection($app_list_strings['dom_email_server_type']); + $protocol = filterInboundEmailPopSelection($app_list_strings['dom_email_server_type']); $this->smarty->assign('PROTOCOL', get_select_options_with_id($protocol, '')); $this->smarty->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], '')); $this->smarty->assign('ie_mod_strings', return_module_language($current_language, 'InboundEmail')); @@ -198,11 +217,11 @@ class EmailUI { 'selected' => $charsetSelectedValue, ); $this->smarty->assign('charset', $charset); - + $emailCheckInterval = array('options' => $app_strings['LBL_EMAIL_CHECK_INTERVAL_DOM'], 'selected' => $emailSettings['emailCheckInterval']); $this->smarty->assign('emailCheckInterval', $emailCheckInterval); $this->smarty->assign('attachmentsSearchOptions', $app_list_strings['checkbox_dom']); - $this->smarty->assign('sendPlainTextChecked', ($emailSettings['sendPlainText'] == 1) ? 'CHECKED' : ''); + $this->smarty->assign('sendPlainTextChecked', ($emailSettings['sendPlainText'] == 1) ? 'CHECKED' : ''); $this->smarty->assign('showNumInList', get_select_options_with_id($app_list_strings['email_settings_num_dom'], $emailSettings['showNumInList'])); //// END USER SETTINGS @@ -263,8 +282,8 @@ class EmailUI { var loader = new YAHOO.util.YUILoader({ require : [ - "layout", "element", "tabview", "menu", - "cookie", "sugarwidgets" + "layout", "element", "tabview", "menu", + "cookie", "sugarwidgets" ], loadOptional: true, skin: { base: 'blank', defaultSkin: '' }, @@ -277,85 +296,59 @@ class EmailUI { type : "js", fullpath: "include/javascript/sugarwidgets/SugarYUIWidgets.js", varName: "YAHOO.SUGAR", - requires: ["datatable", "dragdrop", "treeview", "tabview", "calendar"] + requires: ["datatable", "dragdrop", "treeview", "tabview"] }); loader.insert(); {$preloadFolder}; - eoq; return $out; } - + /** * Generate the frame needed for the quick compose email UI. This frame is loaded dynamically * by an ajax call. * * @return JSON An object containing html markup and js script variables. */ - function displayQuickComposeEmailFrame() + function displayQuickComposeEmailFrame() { $this->preflightUserCache(); - + $this->_generateComposeConfigData('email_compose_light'); $javascriptOut = $this->smarty->fetch("modules/Emails/templates/_baseConfigData.tpl"); $divOut = $this->smarty->fetch("modules/Emails/templates/overlay.tpl"); $divOut .= $this->smarty->fetch("modules/Emails/templates/addressSearchContent.tpl"); - + $outData = array('jsData' => $javascriptOut,'divData'=> $divOut); $out = json_encode($outData); return $out; } - - /** - * Load the modules from the metadata file and include in a custom one if it exists - * - * @return array - */ - protected function _loadQuickCreateModules() - { - $QCAvailableModules = array(); - $QCModules = array(); - - include('modules/Emails/metadata/qcmodulesdefs.php'); - if (file_exists('custom/modules/Emails/metadata/qcmodulesdefs.php')) { - include('custom/modules/Emails/metadata/qcmodulesdefs.php'); - } - - foreach($QCModules as $module) { - $seed = SugarModule::get($module)->loadBean(); - if ( ( $seed instanceOf SugarBean ) && $seed->ACLAccess('edit') ) { - $QCAvailableModules[] = $module; - } - } - - return $QCAvailableModules; - } - + /** * Given an email link url (eg. index.php?action=Compose&parent_type=Contacts...) break up the - * request components and create a compose package that can be used by the quick compose UI. The + * request components and create a compose package that can be used by the quick compose UI. The * result is typically passed into the js call SUGAR.quickCompose.init which initalizes the quick compose - * UI. + * UI. * * @param String $emailLinkUrl * @return JSON Object containing the composePackage and full link url */ - function generateComposePackageForQuickCreateFromComposeUrl($emailLinkUrl, $lazyLoad=false) + function generateComposePackageForQuickCreateFromComposeUrl($emailLinkUrl) { $composeData = explode("&",$emailLinkUrl); $a_composeData = array(); - foreach ($composeData as $singleRequest) + foreach ($composeData as $singleRequest) { - $tmp = explode("=",$singleRequest); + $tmp = explode("=",$singleRequest); $a_composeData[$tmp[0]] = urldecode($tmp[1]); } - - return $this->generateComposePackageForQuickCreate($a_composeData,$emailLinkUrl, $lazyLoad); + + return $this->generateComposePackageForQuickCreate($a_composeData,$emailLinkUrl); } /** * Generate the composePackage for the quick compose email UI. The package contains @@ -363,45 +356,40 @@ eoq; * quick compose email UI (eg. to addr, parent id, parent type, etc) * * @param Array $composeData Associative array read and processed by generateComposeDataPackage. - * @param String $fullLinkUrl A link that contains all pertinant information so the user can be + * @param String $fullLinkUrl A link that contains all pertinant information so the user can be * directed to the full compose screen if needed * @return JSON Object containg composePackage and fullLinkUrl */ - function generateComposePackageForQuickCreate($composeData,$fullLinkUrl, $lazyLoad=false) + function generateComposePackageForQuickCreate($composeData,$fullLinkUrl) { $_REQUEST['forQuickCreate'] = true; - - if(!$lazyLoad){ - require_once('modules/Emails/Compose.php'); - $composePackage = generateComposeDataPackage($composeData,FALSE); - }else{ - $composePackage = $composeData; - } - + require_once('modules/Emails/Compose.php'); + $composePackage = generateComposeDataPackage($composeData,FALSE); + //JSON object is passed into the function defined within the a href onclick event //which is delimeted by '. Need to escape all single quotes, every other char is valid. foreach ($composePackage as $key => $singleCompose) { - if (is_string($singleCompose)) - $composePackage[$key] = str_replace("'","'",$singleCompose); + if (is_string($singleCompose)) + $composePackage[$key] = str_replace("'","'",$singleCompose); } - + $quickComposeOptions = array('fullComposeUrl' => $fullLinkUrl,'composePackage' => $composePackage); $j_quickComposeOptions = json_encode($quickComposeOptions); - + return $j_quickComposeOptions; } - + /** * Generate the config data needed for the Full Compose UI and the Quick Compose UI. The set of config data - * returned is the minimum set needed by the quick compose UI. + * returned is the minimum set needed by the quick compose UI. * * @param String $type Drives which tinyMCE options will be included. */ function _generateComposeConfigData($type = "email_compose_light" ) { global $app_list_strings,$current_user, $app_strings, $mod_strings,$current_language,$locale; - + //Link drop-downs $parent_types = $app_list_strings['record_type_display']; $disabled_parent_types = ACLController::disabledModuleList($parent_types, false, 'list'); @@ -416,7 +404,7 @@ eoq; require_once("include/SugarTinyMCE.php"); $tiny = new SugarTinyMCE(); $tinyConf = $tiny->getConfig($type); - + //Generate Language Packs $lang = "var app_strings = new Object();\n"; foreach($app_strings as $k => $v) { @@ -424,7 +412,7 @@ eoq; $lang .= "app_strings.{$k} = '{$v}';\n"; } } - //Get the email mod strings but don't use the global variable as this may be overridden by + //Get the email mod strings but don't use the global variable as this may be overridden by //other modules when the quick create is rendered. $email_mod_strings = return_module_language($current_language,'Emails'); $modStrings = "var mod_strings = new Object();\n"; @@ -442,7 +430,7 @@ eoq; $ieModStrings .= "ie_mod_strings.{$k} = '{$v}';\n"; } $lang .= "\n\n{$ieModStrings}\n"; - + $this->smarty->assign('linkBeans', $linkBeans); $this->smarty->assign('linkBeansOptions', $parent_types); $this->smarty->assign('tinyMCE', $tinyConf); @@ -450,7 +438,7 @@ eoq; $this->smarty->assign('app_strings', $app_strings); $this->smarty->assign('mod_strings', $email_mod_strings); $ie1 = new InboundEmail(); - + //Signatures $defsigID = $current_user->getPreference('signature_default'); $defaultSignature = $current_user->getDefaultSignature(); @@ -459,21 +447,21 @@ eoq; $this->smarty->assign('signatureDefaultId', (isset($defaultSignature['id'])) ? $defaultSignature['id'] : ""); //User Preferences $this->smarty->assign('userPrefs', json_encode($this->getUserPrefsJS())); - + //Get the users default outbound id $defaultOutID = $ie1->getUsersDefaultOutboundServerId($current_user); $this->smarty->assign('defaultOutID', $defaultOutID); - + //Character Set $charsets = json_encode($locale->getCharsetSelect()); $this->smarty->assign('emailCharsets', $charsets); - + //Relateable List of People for address book search //#20776 jchi - $peopleTables = array("users", - "contacts", - "leads", - "prospects", + $peopleTables = array("users", + "contacts", + "leads", + "prospects", "accounts"); $filterPeopleTables = array(); global $app_list_strings, $app_strings; @@ -488,11 +476,11 @@ eoq; $filterPeopleTables[$person->table_name] = $app_list_strings['moduleList'][$person->module_dir]; } $this->smarty->assign('listOfPersons' , get_select_options_with_id($filterPeopleTables,'')); - + } - - - + + + //// END CORE /////////////////////////////////////////////////////////////////////////// @@ -562,7 +550,7 @@ eoq; * @param string $str JSON serialized object */ function saveContactEdit($str) { - + $json = getJSONobj(); $str = from_html($str); @@ -597,10 +585,10 @@ eoq; */ function getEditContact($id, $module) { global $app_strings; - + if(!class_exists("Contact")) { - + } $contact = new Contact(); @@ -645,7 +633,7 @@ eoq; * @return array */ function getUserContacts($contacts, $user=null) { - + global $current_user; global $locale; @@ -787,7 +775,7 @@ eoq; /////////////////////////////////////////////////////////////////////////// //// FOLDER FUNCTIONS - + /** * Creates a new Sugar folder * @param string $nodeLabel New sugar folder name @@ -802,7 +790,8 @@ eoq; $this->folder->has_child = 0; $this->folder->created_by = $current_user->id; $this->folder->modified_by = $current_user->id; - $this->folder->date_modified = $this->folder->date_created = TimeDate::getInstance()->nowDb(); + $this->folder->date_created = date($GLOBALS['timedate']->get_db_date_time_format(), gmmktime()); + $this->folder->date_modified = date($GLOBALS['timedate']->get_db_date_time_format(), gmmktime()); $this->folder->save(); return array( @@ -1235,9 +1224,9 @@ eoq; $focus->lead_source_description = trim($email->name); $from = (isset($email->from_name) && !empty($email->from_name)) ? $email->from_name : $email->from_addr; - + if(isset($_REQUEST['sugarEmail']) && !empty($_REQUEST['sugarEmail'])) - $from = (isset($email->from_name) && !empty($email->from_name)) ? $email->from_name : $email->from_addr_name; + $from = (isset($email->from_name) && !empty($email->from_name)) ? $email->from_name : $email->from_addr_name; $name = explode(" ", trim($from)); @@ -1252,7 +1241,7 @@ eoq; 'opt_out' => 0, 'reply_to_address' => 1 ); - + $focus->email1 = $address; if(!empty($name)) { @@ -1279,7 +1268,7 @@ eoq; //MFH BUG#20283 - checks for custom quickcreate fields $EditView->setup($_REQUEST['qc_module'], $focus, 'custom/modules/'.$focus->module_dir.'/metadata/editviewdefs.php', 'include/EditView/EditView.tpl'); $EditView->process(); - $EditView->render(); + $EditView->render(); $EditView->defs['templateMeta']['form']['buttons'] = array( 'email2save' => array( @@ -1316,9 +1305,9 @@ eoq; $jsLanguage = ''; - - - + + + $EditView->view = 'EmailQCView'; $EditView->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl'; $EditView->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl'; @@ -1345,7 +1334,7 @@ eoq; require_once('include/QuickSearchDefaults.php'); $qsd = new QuickSearchDefaults(); $qsd->setFormName($formName); - + global $app_strings; global $current_user; global $app_list_strings; @@ -1379,7 +1368,7 @@ eoq; $parent_types = $app_list_strings['record_type_display']; $smarty->assign('parentOptions', get_select_options_with_id($parent_types, $email->parent_type)); - $quicksearch_js = ''; + $quicksearch_js = ''; $smarty->assign('SQS', $quicksearch_js); $meta = array(); @@ -1392,7 +1381,7 @@ eoq; * */ function getDetailViewForEmail2($emailId) { - + require_once('include/DetailView/DetailView.php'); global $app_strings, $app_list_strings; global $mod_strings; @@ -1407,11 +1396,11 @@ eoq; $title = ""; $offset = 0; if($focus->type == 'out') { - $title = getClassicModuleTitle('Emails', array($mod_strings['LBL_SENT_MODULE_NAME'],$focus->name), true); + $title = get_module_title('Emails', $mod_strings['LBL_SENT_MODULE_NAME'].": ".$focus->name, true); } elseif ($focus->type == 'draft') { - $title = getClassicModuleTitle('Emails', array($mod_strings['LBL_LIST_FORM_DRAFTS_TITLE'],$focus->name), true); + $title = get_module_title('Emails', $mod_strings['LBL_LIST_FORM_DRAFTS_TITLE'].": ".$focus->name, true); } elseif($focus->type == 'inbound') { - $title = getClassicModuleTitle('Emails', array($mod_strings['LBL_INBOUND_TITLE'],$focus->name), true); + $title = get_module_title('Emails', $mod_strings['LBL_INBOUND_TITLE'].": ".$focus->name, true); } $smarty->assign("emailTitle", $title); @@ -1569,7 +1558,7 @@ eoq; /* dealing with IMAP email, uids are IMAP uids */ global $ie; // provided by EmailUIAjax.php if(empty($ie)) { - + $ie = new InboundEmail(); } $ie->retrieve($ieId); @@ -1789,7 +1778,7 @@ function setLastRobin($ie, $lastRobin) { * @return array */ function getSingleMessage($ie) { - + global $timedate; global $app_strings,$mod_strings; $ie->retrieve($_REQUEST['ieId']); @@ -1827,7 +1816,7 @@ function getSingleMessage($ie) { $out = $ie->displayOneEmail($_REQUEST['uid'], $_REQUEST['mbox']); // modify the out object to store date in GMT format on the local cache file $dateTimeInUserFormat = $out['meta']['email']['date_start']; - $out['meta']['email']['date_start'] = $timedate->to_db($dateTimeInUserFormat); + $out['meta']['email']['date_start'] = $timedate->to_db_date($dateTimeInUserFormat) . " " . $timedate->to_db_time($dateTimeInUserFormat); if ($status == 'error') { $writeToCacheFile = false; } @@ -1857,8 +1846,8 @@ eoq; } if(empty($out['meta']['email']['description'])) - $out['meta']['email']['description'] = $mod_strings['LBL_EMPTY_EMAIL_BODY']; - + $out['meta']['email']['description'] = $mod_strings['LBL_EMPTY_EMAIL_BODY']; + if($noCache) { $GLOBALS['log']->debug("EMAILUI: getSingleMessage() NOT using cache file"); } else { @@ -1879,7 +1868,7 @@ eoq; */ function getListEmails($ieId, $mbox, $folderListCacheOffset, $forceRefresh='false') { global $sugar_config; - + $ie = new InboundEmail(); $ie->retrieve($ieId); @@ -1896,13 +1885,13 @@ eoq; global $locale; global $current_user; - + $ea = new SugarEmailAddress(); if(!empty($email)) { - $description = (empty($email->description_html)) ? $email->description : $email->description_html; + $description = (empty($email->description_html)) ? $email->description : from_html($email->description_html); } - + //Get the most complete address list availible for this email $addresses = array('toAddresses' => 'to', 'ccAddresses' => 'cc', 'bccAddresses' => 'bcc'); foreach($addresses as $var => $type) @@ -1923,6 +1912,8 @@ eoq; $ret['description'] = $description; $ret['from'] = (isset($_REQUEST['composeType']) && $_REQUEST['composeType'] == 'forward') ? "" : $email->from_addr; $ret['to'] = from_html($toAddresses); + $ret['cc'] = from_html($ccAddresses); + $ret['bcc'] = $bccAddresses; $ret['uid'] = $email->id; $ret['parent_name'] = $email->parent_name; $ret['parent_type'] = $email->parent_type; @@ -1930,9 +1921,6 @@ eoq; // reply all if(isset($_REQUEST['composeType']) && $_REQUEST['composeType'] == 'replyAll') { - $ret['cc'] = from_html($ccAddresses); - $ret['bcc'] = $bccAddresses; - $userEmails = array(); $userEmailsMeta = $ea->getAddressesByGUID($current_user->id, 'Users'); foreach($userEmailsMeta as $emailMeta) { @@ -2003,7 +1991,7 @@ eoq; case "replyCase": $GLOBALS['log']->debug("EMAILUI: At reply case"); $header = $email->getReplyHeader(); - + $myCase = new aCase(); $myCase->retrieve($email->parent_id); $myCaseMacro = $myCase->getEmailSubjectMacro(); @@ -2037,9 +2025,9 @@ eoq; global $current_user , $app_strings; global $db; if(!isset($person) || $person === 'LBL_DROPDOWN_LIST_ALL'){ - $peopleTables = array("users", + $peopleTables = array("users", "contacts", - "leads", + "leads", "prospects", "accounts" ); @@ -2094,10 +2082,10 @@ eoq; } $countq = "SELECT count(people.id) c from ($q) people"; $q .= "ORDER BY last_name"; - + return array('query' => $q, 'countQuery' => $countq); } - + /** * get emails of related bean for a given bean id * @param $beanType @@ -2109,32 +2097,29 @@ eoq; $finalQuery = ''; $searchBeans = null; if($beanType === 'LBL_DROPDOWN_LIST_ALL') - $searchBeans = array("users", + $searchBeans = array("users", "contacts", - "leads", + "leads", "prospects", "accounts" ); - + if ($relatedBeanInfoArr == '' || empty($relatedBeanInfoArr['related_bean_type']) ) { - if ($searchBeans != null) + if ($searchBeans != null) { $q = array(); - foreach ($searchBeans as $searchBean) + foreach ($searchBeans as $searchBean) { - $searchq = $this->findEmailFromBeanIds('', $searchBean, $whereArr); - if(!empty($searchq)) { - $q[] = "($searchq)"; - } + $q[] = '('.$this->findEmailFromBeanIds('', $searchBean, $whereArr).')'; } if (!empty($q)) $finalQuery .= implode("\n UNION ALL \n", $q); - } - else + } + else $finalQuery = $this->findEmailFromBeanIds('', $beanType, $whereArr); - } - else + } + else { $class = $beanList[$relatedBeanInfoArr['related_bean_type']]; $focus = new $class(); @@ -2165,9 +2150,9 @@ eoq; } } $countq = "SELECT count(people.id) c from ($finalQuery) people"; - return array('query' => $finalQuery, 'countQuery' => $countq); + return array('query' => $finalQuery, 'countQuery' => $countq); } - + function findEmailFromBeanIds($beanIds, $beanType, $whereArr) { global $current_user; $q = ''; @@ -2195,7 +2180,7 @@ eoq; $clause = $current_user->db->helper->escape_quote($clause); $whereAdd .= "{$column} LIKE '{$clause}%'"; } - $table = $beanType; + $table = $beanType; $module = ucfirst($table); $class = substr($module, 0, strlen($module) - 1); require_once("modules/{$module}/{$class}.php"); @@ -2213,7 +2198,7 @@ eoq; if(!empty($whereAdd)) { $where .= " AND ({$whereAdd})"; } - + if ($beanType === 'accounts') { $t = "SELECT {$table}.id, '' first_name, {$table}.name last_name, eabr.primary_address, ea.email_address, '{$module}' module "; } else { @@ -2380,7 +2365,7 @@ eoq; * @return array */ function getEmailTemplatesArray() { - + global $app_strings; if(ACLController::checkAccess('EmailTemplates', 'list', true) && ACLController::checkAccess('EmailTemplates', 'view', true)) { @@ -2403,13 +2388,13 @@ eoq; $ieAccountsFull = $ie->retrieveAllByGroupIdWithGroupAccounts($current_user->id); $ieAccountsFrom= array(); - + $oe = new OutboundEmail(); $system = $oe->getSystemMailerSettings(); $ret = $current_user->getUsersNameAndEmail(); $ret['name'] = from_html($ret['name']); $useMyAccountString = true; - + if(empty($ret['email'])) { $systemReturn = $current_user->getSystemDefaultNameAndEmail(); $ret['email'] = $systemReturn['email']; @@ -2421,26 +2406,26 @@ eoq; if ($useMyAccountString) { $myAccountString = " - {$app_strings['LBL_MY_ACCOUNT']}"; } // if - + //Check to make sure that the user has set the associated inbound email acount -> outbound acount is active. $showFolders = unserialize(base64_decode($current_user->getPreference('showFolders', 'Emails'))); $sf = new SugarFolder(); $groupSubs = $sf->getSubscriptions($current_user); - - foreach($ieAccountsFull as $k => $v) + + foreach($ieAccountsFull as $k => $v) { $personalSelected = (!empty($showFolders) && in_array($v->id, $showFolders)); - + $allowOutboundGroupUsage = $v->get_stored_options('allow_outbound_group_usage',FALSE); - $groupSelected = ( in_array($v->groupfolder_id, $groupSubs) && $allowOutboundGroupUsage); + $groupSelected = ( in_array($v->groupfolder_id, $groupSubs) && $allowOutboundGroupUsage); $selected = ( $personalSelected || $groupSelected ); - + if(!$selected) { $GLOBALS['log']->debug("Inbound Email {$v->name}, not selected and will not be available for selection within compose UI."); continue; } - + $name = $v->get_stored_options('from_name'); $addr = $v->get_stored_options('from_addr'); if ($name != null && $addr != null) { @@ -2452,15 +2437,15 @@ eoq; } // else } // if } // foreach - - + + $userSystemOverride = $oe->getUsersMailerForSystemOverride($current_user->id); //Substitute in the users system override if its available. if($userSystemOverride != null) $system = $userSystemOverride; - - if( !empty($system->mail_smtpserver) ) - { + + if( !empty($system->mail_smtpserver) ) + { $admin = new Administration(); $admin->retrieveSettings(); //retrieve all admin settings. $ieAccountsFrom[] = array("value" => $system->id, "text" => @@ -2529,7 +2514,7 @@ eoq; } // if if(!empty($system->id)) { - + $admin = new Administration(); $admin->retrieveSettings(); //retrieve all admin settings. if (in_array(trim($return['email']), $toArray)) { @@ -2617,46 +2602,46 @@ eoq; $showFolders = unserialize(base64_decode($current_user->getPreference('showFolders', 'Emails'))); $defaultIEAccount = $ie->getUsersDefaultOutboundServerId($current_user); - + foreach($ieAccountsFull as $k => $v) { $selected = (!empty($showFolders) && in_array($v->id, $showFolders)) ? true : false; $default = ($defaultIEAccount == $v->id) ? TRUE : FALSE; $has_groupfolder = !empty($v->groupfolder_id) ? TRUE : FALSE; - $type = ($v->is_personal) ? $mod_strings['LBL_MAILBOX_TYPE_PERSONAL'] : $mod_strings['LBL_MAILBOX_TYPE_GROUP']; - - $ieAccountsShowOptionsMeta[] = array("id" => $v->id, "name" => $v->name, 'is_active' => $selected, + $type = ($v->is_personal) ? $mod_strings['LBL_MAILBOX_TYPE_PERSONAL'] : $mod_strings['LBL_MAILBOX_TYPE_GROUP']; + + $ieAccountsShowOptionsMeta[] = array("id" => $v->id, "name" => $v->name, 'is_active' => $selected, 'server_url' => $v->server_url, 'is_group' => !$v->is_personal,'group_id' => $v->group_id, 'is_default' => $default, 'has_groupfolder' => $has_groupfolder,'type' => $type ); } - + //Retrieve the grou folders $f = new SugarFolder(); $groupFolders = $f->getGroupFoldersForSettings($current_user); - + foreach ($groupFolders as $singleGroup) { //Retrieve the related IE accounts. $relatedIEAccounts = $ie->retrieveByGroupFolderId($singleGroup['id']); - + if(count($relatedIEAccounts) == 0) $server_url = $app_strings['LBL_EMAIL_MULT_GROUP_FOLDER_ACCOUNTS_EMPTY']; else if(count($relatedIEAccounts) == 1) { if($relatedIEAccounts[0]->status != 'Active' || $relatedIEAccounts[0]->mailbox_type == 'bounce') continue; - + $server_url = $relatedIEAccounts[0]->server_url; } - else + else $server_url = $app_strings['LBL_EMAIL_MULT_GROUP_FOLDER_ACCOUNTS']; - - $type = $mod_strings['LBL_MAILBOX_TYPE_GROUP_FOLDER']; - $ieAccountsShowOptionsMeta[] = array("id" => $singleGroup['id'], "name" => $singleGroup['origName'], 'is_active' => $singleGroup['selected'], + + $type = $mod_strings['LBL_MAILBOX_TYPE_GROUP_FOLDER']; + $ieAccountsShowOptionsMeta[] = array("id" => $singleGroup['id'], "name" => $singleGroup['origName'], 'is_active' => $singleGroup['selected'], 'server_url' => $server_url, 'is_group' => true,'group_id' => $singleGroup['id'], 'is_default' => FALSE, 'has_groupfolder' => true,'type' => $type); } - - + + return $ieAccountsShowOptionsMeta; } @@ -2861,19 +2846,19 @@ eoq; */ function jsonOuput($data, $resultsParam, $count=0, $fromCache=true, $unread=-1) { global $app_strings; - + $count = ($count > 0) ? $count : 0; - if(isset($a['fromCache'])) + if(isset($a['fromCache'])) $cached = ($a['fromCache'] == 1) ? 1 : 0; - else + else $cached = ($fromCache) ? 1 : 0; - if($data['mbox'] == 'undefined' || empty($data['mbox'])) + if($data['mbox'] == 'undefined' || empty($data['mbox'])) $data['mbox'] = $app_strings['LBL_NONE']; $jsonOut = array('TotalCount' => $count, 'FromCache' => $cached, 'UnreadCount' => $unread, $resultsParam => $data['out']); - + return json_encode($jsonOut); } /** @@ -2911,7 +2896,7 @@ eoq; eoq; return $ret; } - + /** * Generate to/cc addresses string in email detailview. * @@ -2929,7 +2914,7 @@ eoq; $pattern = '/@.*,/U'; preg_match_all($pattern, $tempStr, $matchs); $totalCount = count($matchs[0]); - + if(!empty($matchs[0]) && $totalCount > $defaultNum) { $position = strpos($tempStr, $matchs[0][$defaultNum]); $hiddenCount = $totalCount - $defaultNum; @@ -2940,7 +2925,7 @@ eoq; return $str; } - + /** * Unify the seperator as , * diff --git a/modules/Emails/EmailUIAjax.php b/modules/Emails/EmailUIAjax.php index 3e744a47..c634d678 100644 --- a/modules/Emails/EmailUIAjax.php +++ b/modules/Emails/EmailUIAjax.php @@ -44,8 +44,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); //increate timeout for phpo script execution ini_set('max_execution_time',300); //ajaxInit(); - - + + require_once("include/OutboundEmail/OutboundEmail.php"); require_once("include/ytree/Tree.php"); require_once("include/ytree/ExtNode.php"); @@ -80,7 +80,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); //get the forward header and add to description $forward_header = $email->getForwardHeader(); - $ret['description'] = $forward_header . $ret['description']; + $ret['description'] = $forward_header . $ret['description']; if ($_REQUEST['composeType'] == 'forward') { $ret = $ie->email->et->getDraftAttachments($ret); } @@ -117,7 +117,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); */ case "sendEmail": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: sendEmail"); - + $sea = new SugarEmailAddress(); @@ -130,7 +130,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); if (isset($_REQUEST['uid']) && !empty($_REQUEST['uid'])) { $email->uid = $_REQUEST['uid']; } - + if ($email->email2Send($_REQUEST)) { $ret = array( 'composeLayoutId' => $_REQUEST['composeLayoutId'], @@ -179,18 +179,18 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $out['signatures'] = $sigs; $out['fromAccounts'] = $email->et->getFromAccountsArray($ie); $out['errorArray'] = array(); - + $oe = new OutboundEmail(); if( $oe->doesUserOverrideAccountRequireCredentials($current_user->id) ) { - $overideAccount = $oe->getUsersMailerForSystemOverride($current_user->id); + $overideAccount = $oe->getUsersMailerForSystemOverride($current_user->id); //If the user override account has not been created yet, create it for the user. if($overideAccount == null) $overideAccount = $oe->createUserSystemOverrideAccount($current_user->id); - + $out['errorArray'] = array($overideAccount->id => $app_strings['LBL_EMAIL_WARNING_MISSING_USER_CREDS']); - } - + } + $ret = $json->encode($out); echo $ret; break; @@ -234,7 +234,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); case "getTemplateAttachments": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: getTemplateAttachments"); if(isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id'])) { - + $where = "parent_id='{$_REQUEST['parent_id']}'"; $order = ""; @@ -385,7 +385,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); if (!empty($ie->email->reply_to_addr)) { $emailAddressWithName = $ie->email->reply_to_addr; } // if - + $emailAddress = SugarEmailAddress::_cleanAddress($emailAddressWithName); $contactIds = $ie->email->emailAddress->getRelatedId($emailAddress, 'contacts'); if (!empty($contactIds)) { @@ -425,11 +425,11 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); echo $out; } else - echo $ret['html']; - + echo $ret['html']; + } break; - + case "relateEmails": if (isset($_REQUEST['uid']) && !empty($_REQUEST['uid']) && isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id']) && @@ -708,7 +708,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $ret = $ie->email->et->getDraftAttachments($ret, $ie); $ret = $ie->email->et->getFromAllAccountsArray($ie, $ret); - + $out = $json->encode($ret, true); echo $out; } else { @@ -732,7 +732,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    {$app_strings.LBL_EMAIL_SEARCH_DATE_FROM}: ({$dateFormatExample})
    -   - {$app_strings.LBL_ENTER_DATE} +   + {$app_strings.LBL_ENTER_DATE}
    {$app_strings.LBL_EMAIL_SEARCH_DATE_UNTIL}: ({$dateFormatExample})
    -   - {$app_strings.LBL_ENTER_DATE} +   + {$app_strings.LBL_ENTER_DATE}

     
    +  
    {$app_strings.LBL_EMAIL_SMTP_SSL_OR_TLS} - +
    - {$autoRefresh} - - -
    {$rssUrlLbl} diff --git a/modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php b/modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php index 2ea2267c..e42f4739 100644 --- a/modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php +++ b/modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php @@ -66,7 +66,6 @@ class SugarNewsDashlet extends Dashlet { $this->height = (int)$options['height']; } - if(isset($options['autoRefresh'])) $this->autoRefresh = $options['autoRefresh']; } function displayOptions() { @@ -80,12 +79,6 @@ class SugarNewsDashlet extends Dashlet { $ss->assign('id', $this->id); $ss->assign('height', $this->height); $ss->assign('saveLBL', $app_strings['LBL_SAVE_BUTTON_LABEL']); - if($this->isAutoRefreshable()) { - $ss->assign('isRefreshable', true); - $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $ss->assign('autoRefreshSelect', $this->autoRefresh); - } return $ss->fetch('modules/Home/Dashlets/SugarNewsDashlet/configure.tpl'); } @@ -102,8 +95,7 @@ class SugarNewsDashlet extends Dashlet { if ( isset($req['height']) ) { $options['height'] = (int)$req['height']; } - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; - + return $options; } diff --git a/modules/Home/Dashlets/SugarNewsDashlet/configure.tpl b/modules/Home/Dashlets/SugarNewsDashlet/configure.tpl index 2ca4df29..a1aef9b0 100644 --- a/modules/Home/Dashlets/SugarNewsDashlet/configure.tpl +++ b/modules/Home/Dashlets/SugarNewsDashlet/configure.tpl @@ -45,34 +45,22 @@ - +
    - - + -{if $isRefreshable} - - - -{/if} - - - + - - + diff --git a/modules/Home/Dashlets/iFrameDashlet/configure.tpl b/modules/Home/Dashlets/iFrameDashlet/configure.tpl index 2ca4df29..a1aef9b0 100644 --- a/modules/Home/Dashlets/iFrameDashlet/configure.tpl +++ b/modules/Home/Dashlets/iFrameDashlet/configure.tpl @@ -45,34 +45,22 @@ -
    {$titleLBL} + {$titleLBL}
    - {$autoRefresh} - - -
    {$urlLBL} + {$urlLBL}
    {$heightLBL} + {$heightLBL}
    +
    - - + -{if $isRefreshable} - - - -{/if} - - - + - - + diff --git a/modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php b/modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php index d9ef1f67..72e33c34 100644 --- a/modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php +++ b/modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php @@ -44,42 +44,30 @@ class iFrameDashlet extends Dashlet { var $configureTpl = 'modules/Home/Dashlets/iFrameDashlet/configure.tpl'; var $defaultURL = 'http://apps.sugarcrm.com/dashlet/sugarcrm-news-dashlet.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@'; var $url; - protected $allowed_schemes = array("http", "https"); function iFrameDashlet($id, $options = null) { parent::Dashlet($id); $this->isConfigurable = true; - - if(empty($options['title'])) { + + if(empty($options['title'])) { $this->title = translate('LBL_DASHLET_TITLE', 'Home'); $this->title = translate('LBL_DASHLET_DISCOVER_SUGAR_PRO', 'Home'); } else { $this->title = $options['title']; } - if(empty($options['url'])) { + if(empty($options['url'])) { $this->url = $this->defaultURL; $this->url = 'http://apps.sugarcrm.com/dashlet/go-pro.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@'; } else { $this->url = $options['url']; } - $this->checkURL(); - - if(empty($options['height']) || (int)$options['height'] < 1 ) { - $this->height = 315; + if(empty($options['height']) || (int)$options['height'] < 1 ) { + $this->height = 315; } else { $this->height = (int)$options['height']; } - if(isset($options['autoRefresh'])) $this->autoRefresh = $options['autoRefresh']; - } - - protected function checkURL() - { - $scheme = parse_url($this->url, PHP_URL_SCHEME); - if(!in_array($scheme, $this->allowed_schemes)) { - $this->url = 'about:blank'; - } } function displayOptions() { @@ -93,19 +81,13 @@ class iFrameDashlet extends Dashlet { $ss->assign('id', $this->id); $ss->assign('height', $this->height); $ss->assign('saveLBL', $app_strings['LBL_SAVE_BUTTON_LABEL']); - if($this->isAutoRefreshable()) { - $ss->assign('isRefreshable', true); - $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $ss->assign('autoRefreshSelect', $this->autoRefresh); - } return $ss->fetch('modules/Home/Dashlets/iFrameDashlet/configure.tpl'); } function saveOptions($req) { $options = array(); - + if ( isset($req['title']) ) { $options['title'] = $req['title']; } @@ -115,7 +97,6 @@ class iFrameDashlet extends Dashlet { if ( isset($req['height']) ) { $options['height'] = (int)$req['height']; } - $options['autoRefresh'] = empty($req['autoRefresh']) ? '0' : $req['autoRefresh']; return $options; } diff --git a/modules/Home/Home.tpl b/modules/Home/Home.tpl index 472ee8ee..7b72d308 100644 --- a/modules/Home/Home.tpl +++ b/modules/Home/Home.tpl @@ -73,13 +73,7 @@ var moduleName = 'Home'; - - - - - - - +
    diff --git a/modules/Home/SubpanelCreates.php b/modules/Home/SubpanelCreates.php index 36bc1e60..e2d2d116 100644 --- a/modules/Home/SubpanelCreates.php +++ b/modules/Home/SubpanelCreates.php @@ -35,40 +35,25 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -$mod_strings = return_module_language($current_language, $_REQUEST['target_module']); -$target_module = $_REQUEST['target_module']; // target class - -if(file_exists('modules/'. $_REQUEST['target_module'] . '/EditView.php')) { - $tpl = $_REQUEST['tpl']; +$mod_strings = return_module_language($current_language, $_REQUEST['target_module']); +if(file_exists('modules/'. $_REQUEST['target_module'] . '/EditView.php')){ + $target_module = $_REQUEST['target_module']; // target class if(is_file('modules/' . $target_module . '/' . $target_module . 'QuickCreate.php')) { // if there is a quickcreate override require_once('modules/' . $target_module . '/' . $target_module . 'QuickCreate.php'); - $editviewClass = $target_module . 'QuickCreate'; // eg. OpportunitiesQuickCreate - $editview = new $editviewClass($target_module, 'modules/' . $target_module . '/tpls/' . $tpl); + $editviewClass = $target_module . 'QuickCreate'; // eg. OpportunitiesQuickCreate + $editview = new $editviewClass($target_module, 'modules/' . $target_module . '/tpls/' . $_REQUEST['tpl']); $editview->viaAJAX = true; } else { // else use base class require_once('include/EditView/EditViewQuickCreate.php'); - $editview = new EditViewQuickCreate($target_module, 'modules/' . $target_module . '/tpls/' . $tpl); + $editview = new EditViewQuickCreate($target_module, 'modules/' . $target_module . '/tpls/' . $_REQUEST['tpl']); } $editview->process(); echo $editview->display(); -} else{ - - $subpanelView = 'modules/'. $target_module . '/views/view.subpanelquickcreate.php'; - $view = (!empty($_REQUEST['target_view'])) ? $_REQUEST['target_view'] : 'QuickCreate'; - //Check if there is a custom override, then check for module override, finally use default (SubpanelQuickCreate) - if(file_exists('custom/' . $subpanelView)) { - require_once($subpanelView); - $subpanelClass = $target_module . 'SubpanelQuickCreate'; - $sqc = new $subpanelClass($target_module, $view); - } else if(file_exists($subpanelView)) { - require_once($subpanelView); - $subpanelClass = $target_module . 'SubpanelQuickCreate'; - $sqc = new $subpanelClass($target_module, $view); - } else { - require_once('include/EditView/SubpanelQuickCreate.php'); - $sqc = new SubpanelQuickCreate($target_module, $view); - } +}else{ + require_once('include/EditView/SubpanelQuickCreate.php'); + $view = (!empty($_REQUEST['target_view']))?$_REQUEST['target_view']: 'QuickCreate'; + $sqc = new SubpanelQuickCreate($_REQUEST['target_module'], $view); } ?> diff --git a/modules/Home/UnifiedSearch.php b/modules/Home/UnifiedSearch.php index b76b8c30..61377477 100644 --- a/modules/Home/UnifiedSearch.php +++ b/modules/Home/UnifiedSearch.php @@ -49,8 +49,12 @@ require_once('modules/Home/UnifiedSearchAdvanced.php'); if(!empty($_REQUEST['usa_form'])) { $usa = new UnifiedSearchAdvanced(); echo $usa->getDropDownDiv(); -} else { +} +else { global $mod_strings, $modListHeader, $app_strings, $beanList, $beanFiles; + + echo get_module_title("Search", $mod_strings['LBL_SEARCH_RESULTS'], true); + $usa = new UnifiedSearchAdvanced(); $usa->search(); } diff --git a/modules/Home/UnifiedSearchAdvanced.php b/modules/Home/UnifiedSearchAdvanced.php index 6932a2bd..19bbab4a 100644 --- a/modules/Home/UnifiedSearchAdvanced.php +++ b/modules/Home/UnifiedSearchAdvanced.php @@ -59,109 +59,53 @@ class UnifiedSearchAdvanced { } function getDropDownDiv($tpl = 'modules/Home/UnifiedSearchAdvanced.tpl') { - global $app_list_strings, $app_strings; + global $app_list_strings; if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php')) - { - $this->buildCache(); - } - + $this->buildCache(); include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php')) - { - $this->createUnifiedSearchModulesDisplay(); - } - - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php'); - global $mod_strings, $modListHeader, $app_list_strings, $current_user, $app_strings, $beanList; $users_modules = $current_user->getPreference('globalSearch', 'search'); - // preferences are empty, select all - if(empty($users_modules)) { + if(!isset($users_modules)) { // preferences are empty, select all $users_modules = array(); - foreach($unified_search_modules_display as $module=>$data) { - if (!empty($data['visible']) ) { + foreach($unified_search_modules as $module=>$data) { + if ( !empty($data['default']) ) { $users_modules[$module] = $beanList[$module]; } } $current_user->setPreference('globalSearch', $users_modules, 0, 'search'); } - $sugar_smarty = new Sugar_Smarty(); $modules_to_search = array(); - - foreach($users_modules as $key=>$module) - { - if(ACLController::checkAccess($key, 'list', true)) - { - $modules_to_search[$key]['checked'] = true; + foreach($unified_search_modules as $module => $data) { + if(ACLController::checkAccess($module, 'list', true)) { + $modules_to_search[$module] = array('translated' => $app_list_strings['moduleList'][$module]); + if(array_key_exists($module, $users_modules)) $modules_to_search[$module]['checked'] = true; + else $modules_to_search[$module]['checked'] = false; } } - - if(!empty($this->query_string)) - { - $sugar_smarty->assign('query_string', securexss($this->query_string)); - } else { - $sugar_smarty->assign('query_string', ''); - } - - $sugar_smarty->assign('MOD', return_module_language($GLOBALS['current_language'], 'Administration')); - $sugar_smarty->assign('APP', $app_strings); + + if(!empty($this->query_string)) $sugar_smarty->assign('query_string', securexss($this->query_string)); + else $sugar_smarty->assign('query_string', ''); $sugar_smarty->assign('USE_SEARCH_GIF', 0); $sugar_smarty->assign('LBL_SEARCH_BUTTON_LABEL', $app_strings['LBL_SEARCH_BUTTON_LABEL']); - - $json_enabled = array(); - $json_disabled = array(); - - //Now add the rest of the modules that are searchable via Global Search settings - foreach($unified_search_modules_display as $module=>$data) - { - if(!isset($modules_to_search[$module]) && $data['visible'] && ACLController::checkAccess($module, 'list', true)) - { - $modules_to_search[$module]['checked'] = false; - } else if (isset($modules_to_search[$module]) && !$data['visible']) { - unset($modules_to_search[$module]); - } - } - - //Create the two lists (doing it this way preserves the user's ordering choice for enabled modules) - foreach($modules_to_search as $module=>$data) - { - $label = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module; - if(!empty($data['checked'])) - { - $json_enabled[] = array("module" => $module, 'label' => $label); - } else { - $json_disabled[] = array("module" => $module, 'label' => $label); - } - } - - $sugar_smarty->assign('enabled_modules', json_encode($json_enabled)); - $sugar_smarty->assign('disabled_modules', json_encode($json_disabled)); - - $showDiv = $current_user->getPreference('showGSDiv', 'search'); - if(!isset($showDiv)) - { - $showDiv = 'no'; - } - - $sugar_smarty->assign('SHOWGSDIV', $showDiv); + $sugar_smarty->assign('MODULES_TO_SEARCH', $modules_to_search); $sugar_smarty->debugging = true; + return $sugar_smarty->fetch($tpl); } function search() { if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php')) - { $this->buildCache(); - } - + include $GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'; require_once 'include/ListView/ListViewSmarty.php'; + global $modListHeader, $beanList, $beanFiles, $current_language, $app_strings, $current_user, $mod_strings; $home_mod_strings = return_module_language($current_language, 'Home'); @@ -170,59 +114,32 @@ class UnifiedSearchAdvanced { if(!empty($_REQUEST['advanced']) && $_REQUEST['advanced'] != 'false') { $modules_to_search = array(); - if(!empty($_REQUEST['search_modules'])) - { - foreach(explode (',', $_REQUEST['search_modules'] ) as $e) - { - $modules_to_search[$e] = $beanList[$e]; - } + foreach($_REQUEST as $param => $value) { + if(preg_match('/^search_mod_(.*)$/', $param, $match)) { + $modules_to_search[$match[1]] = $beanList[$match[1]]; + } } - - $current_user->setPreference('showGSDiv', isset($_REQUEST['showGSDiv']) ? $_REQUEST['showGSDiv'] : 'no', 0, 'search'); $current_user->setPreference('globalSearch', $modules_to_search, 0, 'search'); // save selections to user preference - } else { + } + else { $users_modules = $current_user->getPreference('globalSearch', 'search'); - $modules_to_search = array(); - - if(!empty($users_modules)) { - // use user's previous selections + if(isset($users_modules)) { // use user's previous selections foreach ( $users_modules as $key => $value ) { if ( isset($unified_search_modules[$key]) ) { $modules_to_search[$key] = $value; } } - } else { - // select all the modules (ie first time user has used global search) + } + else { // select all the modules (ie first time user has used global search) foreach($unified_search_modules as $module=>$data) { - if (!empty($data['default']) ) { + if ( !empty($data['default']) ) { $modules_to_search[$module] = $beanList[$module]; } } } $current_user->setPreference('globalSearch', $modules_to_search, 'search'); } - - - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php')) - { - $this->createUnifiedSearchModulesDisplay(); - } - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php'); - foreach($modules_to_search as $module=>$data) - { - if(isset($unified_search_modules_display[$module]['visible']) && !$unified_search_modules_display[$module]['visible']) - { - unset($modules_to_search[$module]); - } - } - - $templateFile = 'modules/Home/UnifiedSearchAdvancedForm.tpl'; - if(file_exists('custom/' . $templateFile)) - { - $templateFile = 'custom/'.$templateFile; - } - - echo $this->getDropDownDiv($templateFile); + echo $this->getDropDownDiv('modules/Home/UnifiedSearchAdvancedForm.tpl'); $module_results = array(); $module_counts = array(); @@ -230,57 +147,22 @@ class UnifiedSearchAdvanced { if(!empty($this->query_string)) { foreach($modules_to_search as $moduleName => $beanName) { - require_once $beanFiles[$beanName] ; - $seed = new $beanName(); - - $lv = new ListViewSmarty(); - $lv->lvd->additionalDetails = false; - $mod_strings = return_module_language($current_language, $seed->module_dir); - - //retrieve the original list view defs and store for processing in case of custom layout changes - require('modules/'.$seed->module_dir.'/metadata/listviewdefs.php'); - $orig_listViewDefs = $listViewDefs; - - if(file_exists('custom/modules/'.$seed->module_dir.'/metadata/listviewdefs.php')) - { - require('custom/modules/'.$seed->module_dir.'/metadata/listviewdefs.php'); - } - - if ( !isset($listViewDefs) || !isset($listViewDefs[$seed->module_dir]) ) - { - continue; - } - $unifiedSearchFields = array () ; $innerJoins = array(); foreach ( $unified_search_modules[ $moduleName ]['fields'] as $field=>$def ) { - $listViewCheckField = strtoupper($field); - //check to see if the field is in listview defs - if ( empty($listViewDefs[$seed->module_dir][$listViewCheckField]['default']) ) { - //check to see if field is in original list view defs (in case we are using custom layout defs) - if (!empty($orig_listViewDefs[$seed->module_dir][$listViewCheckField]['default']) ) { - //if we are here then the layout has been customized, but the field is still needed for query creation - $listViewDefs[$seed->module_dir][$listViewCheckField] = $orig_listViewDefs[$seed->module_dir][$listViewCheckField]; - } - - } - //bug: 34125 we might want to try to use the LEFT JOIN operator instead of the INNER JOIN in the case we are //joining against a field that has not been populated. - if(!empty($def['innerjoin']) ) - { + if(!empty($def['innerjoin']) ){ if (empty($def['db_field']) ) - { continue; - } $innerJoins[$field] = $def; $def['innerjoin'] = str_replace('INNER', 'LEFT', $def['innerjoin']); } $unifiedSearchFields[ $moduleName ] [ $field ] = $def ; $unifiedSearchFields[ $moduleName ] [ $field ][ 'value' ] = $this->query_string ; } - + /* * Use searchForm2->generateSearchWhere() to create the search query, as it can generate SQL for the full set of comparisons required * generateSearchWhere() expects to find the search conditions for a field in the 'value' parameter of the searchFields entry for that field @@ -289,7 +171,7 @@ class UnifiedSearchAdvanced { $seed = new $beanName(); require_once 'include/SearchForm/SearchForm2.php' ; $searchForm = new SearchForm ( $seed, $moduleName ) ; - + $searchForm->setup (array ( $moduleName => array() ) , $unifiedSearchFields , '' , 'saved_views' /* hack to avoid setup doing further unwanted processing */ ) ; $where_clauses = $searchForm->generateSearchWhere() ; //add inner joins back into the where clause @@ -304,27 +186,30 @@ class UnifiedSearchAdvanced { } } - if (count($where_clauses) > 0) - { - $where = '(('. implode(' ) OR ( ', $where_clauses) . '))'; + if (count($where_clauses) > 0 ) + $where = '(('. implode(' ) OR ( ', $where_clauses) . '))'; + + $lv = new ListViewSmarty(); + $lv->lvd->additionalDetails = false; + $mod_strings = return_module_language($current_language, $seed->module_dir); + if(file_exists('custom/modules/'.$seed->module_dir.'/metadata/listviewdefs.php')){ + require_once('custom/modules/'.$seed->module_dir.'/metadata/listviewdefs.php'); + }else{ + require_once('modules/'.$seed->module_dir.'/metadata/listviewdefs.php'); + } - - $displayColumns = array(); - foreach($listViewDefs[$seed->module_dir] as $colName => $param) - { - if(!empty($param['default']) && $param['default'] == true) - { + if ( !isset($listViewDefs) || !isset($listViewDefs[$seed->module_dir]) ) + continue; + $displayColumns = array(); + foreach($listViewDefs[$seed->module_dir] as $colName => $param) { + if(!empty($param['default']) && $param['default'] == true) { $param['url_sort'] = true;//bug 27933 $displayColumns[$colName] = $param; } } - if(count($displayColumns) > 0) - { - $lv->displayColumns = $displayColumns; - } else { - $lv->displayColumns = $listViewDefs[$seed->module_dir]; - } + if(count($displayColumns) > 0) $lv->displayColumns = $displayColumns; + else $lv->displayColumns = $listViewDefs[$seed->module_dir]; $lv->export = false; $lv->mergeduplicates = false; @@ -332,37 +217,37 @@ class UnifiedSearchAdvanced { $lv->delete = false; $lv->select = false; $lv->showMassupdateFields = false; - $lv->email = false; if($overlib) { $lv->overlib = true; $overlib = false; - } else { - $lv->overlib = false; } + else $lv->overlib = false; - $lv->setup($seed, 'include/ListView/ListViewNoMassUpdate.tpl', $where, $params, 0, 10); + + $lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where, $params, 0, 10); + $module_results[$moduleName] = '

    ' . get_form_header($GLOBALS['app_list_strings']['moduleList'][$seed->module_dir] . ' (' . $lv->data['pageData']['offsets']['total'] . ')', '', false); $module_counts[$moduleName] = $lv->data['pageData']['offsets']['total']; if($lv->data['pageData']['offsets']['total'] == 0) { - //$module_results[$moduleName] .= "
  • " . $home_mod_strings['LBL_NO_RESULTS_IN_MODULE'] . '

  • '; $module_results[$moduleName] .= '

    ' . $home_mod_strings['LBL_NO_RESULTS_IN_MODULE'] . '

    '; - } else { + } + else { $has_results = true; - //$module_results[$moduleName] .= "
  • " . $lv->display(false, false) . '
  • '; $module_results[$moduleName] .= $lv->display(false, false); } - } } - + if($has_results) { - //arsort($module_counts); + arsort($module_counts); foreach($module_counts as $name=>$value) { echo $module_results[$name]; } - } else { + } + else { + echo '
    '; echo $home_mod_strings['LBL_NO_RESULTS']; echo $home_mod_strings['LBL_NO_RESULTS_TIPS']; } @@ -395,17 +280,13 @@ class UnifiedSearchAdvanced { if(!empty($metafiles[$moduleName]['searchfields'])) - { require $metafiles[$moduleName]['searchfields'] ; - } else if(file_exists("modules/{$moduleName}/metadata/SearchFields.php")) { + elseif(file_exists("modules/{$moduleName}/metadata/SearchFields.php")) require "modules/{$moduleName}/metadata/SearchFields.php" ; - } - - $isCustomModule = preg_match('/^([a-z0-9]{1,5})_([a-z0-9_]+)$/i' , $moduleName); - - //If the bean supports unified search or if it's a custom module bean and unified search is not defined - if(!empty($dictionary[$beanName]['unified_search']) || $isCustomModule) + + if(isset($dictionary[$beanName]['unified_search']) && $dictionary[$beanName]['unified_search']) // if bean participates in uf { + $fields = array(); foreach ( $dictionary [ $beanName ][ 'fields' ] as $field => $def ) { @@ -420,7 +301,7 @@ class UnifiedSearchAdvanced { if (strpos($field,'phone') !== false) $field = 'phone' ; - if ( !empty($def['unified_search']) && isset ( $searchFields [ $moduleName ] [ $field ] )) + if ( isset($def['unified_search']) && $def['unified_search'] && isset ( $searchFields [ $moduleName ] [ $field ] )) { $fields [ $field ] = $searchFields [ $moduleName ] [ $field ] ; } @@ -428,326 +309,22 @@ class UnifiedSearchAdvanced { if(count($fields) > 0) { $supported_modules [$moduleName] ['fields'] = $fields; - if (isset($dictionary[$beanName]['unified_search_default_enabled']) && $dictionary[$beanName]['unified_search_default_enabled'] === TRUE) { - $supported_modules [$moduleName]['default'] = true; - } else { + if ( isset($dictionary[$beanName]['unified_search_default_enabled']) && + $dictionary[$beanName]['unified_search_default_enabled'] == FALSE ) { $supported_modules [$moduleName]['default'] = false; + } + else { + $supported_modules [$moduleName]['default'] = true; } } } } - ksort($supported_modules); write_array_to_file('unified_search_modules', $supported_modules, $GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - } - - /** - * - */ - function modifyGlobalSearchSettings() - { - global $mod_strings, $app_strings, $app_list_strings; - - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php')) - { - $this->createUnifiedSearchModulesDisplay(); - } - - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php'); - - $sugar_smarty = new Sugar_Smarty(); - $sugar_smarty->assign('APP', $app_strings); - $sugar_smarty->assign('MOD', $mod_strings); - - //Add the translated attribute for display label - $json_enabled = array(); - $json_disabled = array(); - foreach($unified_search_modules_display as $module=>$data) - { - $label = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module; - if($data['visible'] === true) - { - $json_enabled[] = array("module" => $module, 'label' => $label); - } else { - $json_disabled[] = array("module" => $module, 'label' => $label); - } - } - - //If the file doesn't exist - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php')) - { - $this->buildCache(); - } - - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - - //Now add any new modules that may have since been added to unified_search_modules.php - foreach($unified_search_modules as $module=>$data) - { - if(!isset($unified_search_modules_display[$module])) - { - $label = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module; - if($data['default']) - { - $json_enabled[] = array("module" => $module, 'label' => $label); - } else { - $json_disabled[] = array("module" => $module, 'label' => $label); - } - } - } - - $sugar_smarty->assign('enabled_modules', json_encode($json_enabled)); - $sugar_smarty->assign('disabled_modules', json_encode($json_disabled)); - - //uasort($unified_search_modules_display, 'unified_search_modules_cmp'); - $tpl = 'modules/Administration/templates/GlobalSearchSettings.tpl'; - if(file_exists('custom/' . $tpl)) - { - $tpl = 'custom/' . $tpl; - } - return $sugar_smarty->fetch($tpl); - } - - - /** - * addModuleToUnifiedSearch - * This method handles adding a new module to the unified search list of modules. It will add an - * entry to the unified_search_modules.php if it already exists - * - * @param module String value of the module entry to add - * @return boolean value indiciating whether or not the module was added to the unified_search_modules.php file - */ - function addModuleToUnifiedSearch($module='') - { - if(empty($module)) - { - return false; - } - - //If the file doesn't exist - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php')) - { - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - $this->buildCache(); - return isset($unified_search_modules[$module]) ? true : false; - } - - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - - //If modules is already in list, unset it and rebuild - if(isset($unified_search_modules[$module])) - { - unset($unified_search_modules[$module]); - } - - //Build the entry - global $beanList, $beanFiles, $dictionary; - - if(!isset($beanList[$module])) - { - $GLOBALS['log']->fatal('no beanList entry!'); - $beanName = $module; - //return false; - } - - $beanName = $beanList[$module]; - - if (!isset($beanFiles[$beanName])) - { - $GLOBALS['log']->fatal('no beanFiles entry!'); - //return false; - } - - if($beanName == 'aCase') - { - $beanName = 'Case'; - } - - $manager = new VardefManager(); - $manager->loadVardef($module, $beanName); - - // obtain the field definitions used by generateSearchWhere (duplicate code in view.list.php) - if(file_exists('custom/modules/'.$module.'/metadata/metafiles.php')) - { - require('custom/modules/'.$module.'/metadata/metafiles.php'); - } elseif (file_exists('modules/'.$module.'/metadata/metafiles.php')) { - require('modules/'.$module.'/metadata/metafiles.php'); - } - - - if(!empty($metafiles[$module]['searchfields'])) - { - require $metafiles[$moduleName]['searchfields'] ; - } else if(file_exists("modules/{$module}/metadata/SearchFields.php")) { - require "modules/{$module}/metadata/SearchFields.php" ; - } - - $isCustomModule = preg_match('/^([a-z0-9]{1,5})_([a-z0-9_]+)$/i' , $module); - - //If the bean supports unified search or if it's a custom module bean and unified search is not defined - if(!empty($dictionary[$beanName]['unified_search']) || $isCustomModule) - { - $GLOBALS['log']->fatal("found dictionary entry!"); - $fields = array(); - foreach ( $dictionary [ $beanName ][ 'fields' ] as $field => $def ) - { - // We cannot enable or disable unified_search for email in the vardefs as we don't actually have a vardef entry for 'email' - - // the searchFields entry for 'email' doesn't correspond to any vardef entry. Instead it contains SQL to directly perform the search. - // So as a proxy we allow any field in the vardefs that has a name starting with 'email...' to be tagged with the 'unified_search' parameter - if (strpos($field,'email') !== false) - $field = 'email' ; - - //bug: 38139 - allow phone to be searched through Global Search - if (strpos($field,'phone') !== false) - $field = 'phone' ; - - if (!empty($def['unified_search']) && isset ($searchFields [$module] [ $field ])) - { - $fields[ $field ] = $searchFields [$module] [ $field ] ; - } - } - - if(count($fields) > 0) { - $unified_search_modules [$module] ['fields'] = $fields; - if (isset($dictionary[$beanName]['unified_search_default_enabled']) && $dictionary[$beanName]['unified_search_default_enabled'] === TRUE) { - $unified_search_modules[$module]['default'] = true; - } else { - $unified_search_modules[$module]['default'] = false; - } - } - } - - if(!isset($unified_search_modules[$module])) - { - return false; - } - - return write_array_to_file('unified_search_modules', $unified_search_modules, $GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - } - - /** - * saveGlobalSearchSettings - * This method handles the administrator's request to save the searchable modules selected and stores - * the results in the unified_search_modules_display.php file - * - */ - function saveGlobalSearchSettings() - { - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php')) - { - $this->createUnifiedSearchModulesDisplay(); - } - - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php'); - - if(isset($_REQUEST['enabled_modules'])) - { - $new_unified_search_modules_display = array(); - - foreach(explode (',', $_REQUEST['enabled_modules'] ) as $module) - { - $new_unified_search_modules_display[$module]['visible'] = true; - } - - foreach($unified_search_modules_display as $module=>$data) - { - if(!isset($new_unified_search_modules_display[$module])) - { - $new_unified_search_modules_display[$module]['visible'] = false; - } - } - - $this->writeUnifiedSearchModulesDisplayFile($new_unified_search_modules_display); - } - } - - - public static function unlinkUnifiedSearchModulesFile() { - //clear the unified_search_module.php file - if(file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php')) - { - $GLOBALS['log']->info("unlink {$GLOBALS['sugar_config']['cache_dir']}modules/unified_search_modules.php file"); - unlink($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - } - } - - /** - * createUnifiedSearchModulesDisplay - * method to create the unified_search_modules_display.php file - * - */ - function createUnifiedSearchModulesDisplay() - { - //Make directory if it doesn't exist - if(!file_exists('cache/modules')) - { - mkdir_recursive('cache/modules'); - } - - //Load unified_search_modules.php file - if(!file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php')) - { - $this->buildCache(); - } - - include($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'); - - $unified_search_modules_display = array(); - - if(!empty($unified_search_modules)) - { - foreach($unified_search_modules as $module=>$data) - { - $unified_search_modules_display[$module]['visible'] = (isset($data['default']) && $data['default']) ? true : false; - } - } - - $this->writeUnifiedSearchModulesDisplayFile($unified_search_modules_display); - } - - - /* - * writeUnifiedSearchModulesDisplayFile - * Private method to handle writing the unified_search_modules_display value to file - * - * @param mixed The array of the unified search modules and their display attributes - * @return boolean value indication whether or not file was successfully written - * @throws Exception Thrown if the file write operation fails - */ - private function writeUnifiedSearchModulesDisplayFile($unified_search_modules_display) - { - if(is_null($unified_search_modules_display) || empty($unified_search_modules_display)) - { - return false; - } - - if(!write_array_to_file("unified_search_modules_display", $unified_search_modules_display, $GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php')) - { - //Log error message and throw Exception - global $app_strings; - $msg = string_format($app_strings['ERR_FILE_WRITE'], array($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules_display.php')); - $GLOBALS['log']->error($msg); - throw new Exception($msg); - } - - return true; } } - -function unified_search_modules_cmp($a, $b) { - if(!isset($a['translated']) || !isset($b['translated'])) - { - return 0; - } - - $name1 = strtolower($a['translated']); - $name2 = strtolower($b['translated']); - - return $name1 < $name2 ? -1 : 1; -} - ?> \ No newline at end of file diff --git a/modules/Home/UnifiedSearchAdvanced.tpl b/modules/Home/UnifiedSearchAdvanced.tpl index 0df18b1d..9c4c9cdb 100644 --- a/modules/Home/UnifiedSearchAdvanced.tpl +++ b/modules/Home/UnifiedSearchAdvanced.tpl @@ -40,42 +40,34 @@ *} - + + - -
    {$titleLBL} + {$titleLBL}
    - {$autoRefresh} - - -
    {$urlLBL} + {$urlLBL}
    {$heightLBL} + {$heightLBL}
    - -
    - - -
    - - -{foreach from=$MODULES_TO_SEARCH name=m key=module item=info} -{if $smarty.foreach.m.first} - -{/if} - - -{if $smarty.foreach.m.index % 2 == 1} - -{/if} -{/foreach} - -
    - - - {$info.translated} -
    - - - -
    - - -
    + + + + + + {foreach from=$MODULES_TO_SEARCH name=m key=module item=info} + {if $smarty.foreach.m.first} + + {/if} + + + {if $smarty.foreach.m.index % 2 == 1} + + {/if} + {/foreach} + +
    {sugar_translate label='LBL_MODULES_TO_SEARCH' module='Home'} + +
    + + + {$info.translated} +
    \ No newline at end of file diff --git a/modules/Home/UnifiedSearchAdvancedForm.tpl b/modules/Home/UnifiedSearchAdvancedForm.tpl index a4cb9235..5c0540c5 100644 --- a/modules/Home/UnifiedSearchAdvancedForm.tpl +++ b/modules/Home/UnifiedSearchAdvancedForm.tpl @@ -40,140 +40,35 @@ *} - - -
    +
    + - - - + + {if $smarty.foreach.m.index % 4 == 3} + + {/if} + {/foreach}
    -   - {$MOD.LBL_SELECT_MODULES}  - {if $SHOWGSDIV == 'yes'} - - {else} - - {/if} - - + +  
    -
    - - - - - - - - -
    - {sugar_translate label="LBL_SELECT_MODULES_TITLE" module="Administration"} -
    -
    -
    -
    -
    -
    + {foreach from=$MODULES_TO_SEARCH name=m key=module item=info} +
    + + {$info.translated} +
    -
    - - \ No newline at end of file + \ No newline at end of file diff --git a/modules/Home/UnifiedSearchAdvancedResults.tpl b/modules/Home/UnifiedSearchAdvancedResults.tpl index 23903160..31d74abc 100644 --- a/modules/Home/UnifiedSearchAdvancedResults.tpl +++ b/modules/Home/UnifiedSearchAdvancedResults.tpl @@ -40,54 +40,114 @@ *} - var SubpanelInit = function() { - SubpanelInitTabNames(["quotes","activities","opportunities","history","leads","campaigns","cases","contacts"]); - } - var SubpanelInitTabNames = function(tabNames) { - subpanel_dd = new Array(); - j = 0; - for(i in tabNames) { - subpanel_dd[j] = new ygDDList('whole_subpanel_' + tabNames[i]); - subpanel_dd[j].setHandleElId('subpanel_title_' + tabNames[i]); - subpanel_dd[j].onMouseDown = SUGAR.subpanelUtils.onDrag; - subpanel_dd[j].afterEndDrag = SUGAR.subpanelUtils.onDrop; - j++; - } - YAHOO.util.DDM.mode = 1; - } - currentModule = 'Contacts'; - YAHOO.util.Event.addListener(window, 'load', SubpanelInit); +{if $overlib} + + +{/if} - \ No newline at end of file + + + + + + {if $prerow} + + {/if} + {foreach from=$displayColumns key=colHeader item=params} + + {/foreach} + + + {counter start=0 name=rowCounter print=false} + {foreach from=$data key=id item=rowData} + {if $rowCounter is even} + {assign var="_rowColor" value=$rowColor[0]} + {else} + {assign var="_rowColor" value=$rowColor[1]} + {/if} + + {if $prerow} + + {/if} + {foreach from=$displayColumns key=col item=params} + + {/foreach} + + + {counter print=false} + {/foreach} + + + +
    + + + + + {else} +   Next Next + {/if} + + +
    {$exportLink}{$mergeLink}{$selectedObjectsSpan}  + {if $pageData.urls.startPage} + Start Start   + {else} + Start Start   + {/if} + {if $pageData.urls.prevPage} + Previous Previous   + {else} + Previous Previous   + {/if} + ({$pageData.offsets.current+1} - {$pageData.offsets.next} of {if $pageData.offsets.totalCounted}{$pageData.offsets.total}{else}{$rowCount+1}}+{/if})   + {if $pageData.urls.nextPage} + Next Next   + {else} +   Next Next + {/if} + {if $pageData.urls.endPage} + End End
    +
    {$checkall} + {$params.label} Sort +
    + {if $params.link} + {if $params.customCode} + {sugar_evalcolumn_old var=$params.customCode rowData=$rowData} + {else} + <{$pageData.tag.$id.MAIN} href="index.php?action={$params.action|default:"DetailView"}&module={$params.module|default:$pageData.bean.moduleDir}&record={$rowData[$params.id]|default:$id}&offset={$pageData.offsets.current}&stamp={$pageData.stamp}" >{$rowData.$col} + {/if} + {else} + {$rowData.$col} + {/if} +
    + + + + + {else} +   Next Next + {/if} + + +
    {$exportLink}{$mergeLink}{$selectedObjectsSpan}  + {if $pageData.urls.startPage} + Start Start   + {else} + Start Start   + {/if} + {if $pageData.urls.prevPage} + Previous Previous   + {else} + Previous Previous   + {/if} + ({$pageData.offsets.current+1} - {$pageData.offsets.next} of {if $pageData.offsets.totalCounted}{$pageData.offsets.end}{else}{$rowCount+1}}+{/if})   + {if $pageData.urls.nextPage} + Next Next   + {else} +   Next Next + {/if} + {if $pageData.urls.endPage} + End End
    +
    \ No newline at end of file diff --git a/modules/Home/action_view_map.php b/modules/Home/action_view_map.php deleted file mode 100644 index 1925dd4c..00000000 --- a/modules/Home/action_view_map.php +++ /dev/null @@ -1,38 +0,0 @@ -buildCache(); } @@ -52,7 +52,7 @@ require_once($GLOBALS['sugar_config']['cache_dir'].'dashlets/dashlets.php'); require('modules/Home/dashlets.php'); -$pages = $current_user->getPreference('pages', 'Home'); +$pages = $current_user->getPreference('pages', 'Home'); $dashlets = $current_user->getPreference('dashlets', 'Home'); $defaultHomepage = false; @@ -62,17 +62,17 @@ $hasUserPreferences = (!isset($pages) || empty($pages) || !isset($dashlets) || e if(!$hasUserPreferences){ $dashlets = array(); - + //list of preferences to move over and to where $prefstomove = array( 'mypbss_date_start' => 'MyPipelineBySalesStageDashlet', 'mypbss_date_end' => 'MyPipelineBySalesStageDashlet', 'mypbss_sales_stages' => 'MyPipelineBySalesStageDashlet', 'mypbss_chart_type' => 'MyPipelineBySalesStageDashlet', - 'lsbo_lead_sources' => 'OppByLeadOutcomeDashlet', - 'lsbo_ids' => 'OppByLeadOutcomeDashlet', - 'pbls_lead_sources' => 'OppByLeadSourceDashlet', - 'pbls_ids' => 'OppByLeadSourceDashlet', + 'lsbo_lead_sources' => 'OpportunitiesByLeadSourceByOutcomeDashlet', + 'lsbo_ids' => 'OpportunitiesByLeadSourceByOutcomeDashlet', + 'pbls_lead_sources' => 'OpportunitiesByLeadSourceDashlet', + 'pbls_ids' => 'OpportunitiesByLeadSourceDashlet', 'pbss_date_start' => 'PipelineBySalesStageDashlet', 'pbss_date_end' => 'PipelineBySalesStageDashlet', 'pbss_sales_stages' => 'PipelineBySalesStageDashlet', @@ -88,7 +88,7 @@ if(!$hasUserPreferences){ if (isset($old_columns) && !empty($old_columns) && isset($old_dashlets) && !empty($old_dashlets)){ $columns = $old_columns; $dashlets = $old_dashlets; - + // resetting old columns and dashlets to have no preference and data $old_columns = array(); $old_dashlets = array(); @@ -120,7 +120,7 @@ if(!$hasUserPreferences){ 'url' => 'http://www.sugarcrm.com/crm/product/news', 'height' => 315, )); - + foreach($defaultDashlets as $dashletName=>$module){ // clint - fixes bug #20398 // only display dashlets that are from visibile modules and that the user has permission to list @@ -132,14 +132,14 @@ if(!$hasUserPreferences){ foreach ( $prefsforthisdashlet as $pref ) { $options[$pref] = $current_user->getPreference($pref); } - $dashlets[create_guid()] = array('className' => $dashletName, - 'module' => $module, + $dashlets[create_guid()] = array('className' => $dashletName, + 'module' => $module, 'forceColumn' => 0, 'fileLocation' => $dashletsFiles[$dashletName]['file'], 'options' => $options); } } - + $count = 0; $columns = array(); $columns[0] = array(); @@ -148,9 +148,9 @@ if(!$hasUserPreferences){ $columns[1] = array(); $columns[1]['width'] = '40%'; $columns[1]['dashlets'] = array(); - + foreach($dashlets as $guid=>$dashlet) { - if( $dashlet['forceColumn'] == 0 ) array_push($columns[0]['dashlets'], $guid); + if( $dashlet['forceColumn'] == 0 ) array_push($columns[0]['dashlets'], $guid); else array_push($columns[1]['dashlets'], $guid); $count++; } @@ -158,12 +158,12 @@ if(!$hasUserPreferences){ - + $current_user->setPreference('dashlets', $dashlets, 0, 'Home'); } // handles upgrading from versions that had the 'Dashboard' module; move those items over to the Home page -$pagesDashboard = $current_user->getPreference('pages', 'Dashboard'); +$pagesDashboard = $current_user->getPreference('pages', 'Dashboard'); $dashletsDashboard = $current_user->getPreference('dashlets', 'Dashboard'); if ( !empty($pagesDashboard) ) { // move dashlets from the dashboard to be at the end of the home screen dashlets @@ -180,7 +180,7 @@ if ( !empty($dashletsDashboard) ) { $current_user->setPreference('dashlets', $dashlets, 0, 'Home'); } if ( !empty($pagesDashboard) || !empty($dashletsDashboard) ) - $current_user->resetPreferences('Dashboard'); + $current_user->resetPreferences('Dashboard'); if (empty($pages)){ $pages = array(); @@ -190,7 +190,7 @@ if (empty($pages)){ $pages[0]['pageTitle'] = $mod_strings['LBL_HOME_PAGE_1_NAME']; // "My Sugar" $pageIndex++; $current_user->setPreference('pages', $pages, 0, 'Home'); - $activePage = 0; + $activePage = 0; } $sugar_smarty = new Sugar_Smarty(); @@ -209,20 +209,16 @@ $display = array(); foreach($pages[$activePage]['columns'] as $colNum => $column) { if ($colNum == $numCols){ break; - } + } $display[$colNum]['width'] = $column['width']; - $display[$colNum]['dashlets'] = array(); + $display[$colNum]['dashlets'] = array(); foreach($column['dashlets'] as $num => $id) { // clint - fixes bug #20398 // only display dashlets that are from visibile modules and that the user has permission to list if(!empty($id) && isset($dashlets[$id]) && is_file($dashlets[$id]['fileLocation'])) { $module = 'Home'; - if ( !empty($dashletsFiles[$dashlets[$id]['className']]['module']) ) + if ( isset($dashletsFiles[$dashlets[$id]['className']]['module']) ) $module = $dashletsFiles[$dashlets[$id]['className']]['module']; - // Bug 24772 - Look into the user preference for the module the dashlet is a part of in case - // of the Report Chart dashlets. - elseif ( !empty($dashlets[$id]['module']) ) - $module = $dashlets[$id]['module']; $myDashlet = new MySugar($module); @@ -257,7 +253,7 @@ foreach($pages[$activePage]['columns'] as $colNum => $column) { } catch (Exception $ex) { $display[$colNum]['dashlets'][$id]['display'] = $ex->getMessage(); $display[$colNum]['dashlets'][$id]['displayHeader'] = $dashlet->getHeader(); - $display[$colNum]['dashlets'][$id]['displayFooter'] = $dashlet->getFooter(); + $display[$colNum]['dashlets'][$id]['displayFooter'] = $dashlet->getFooter(); } } } @@ -265,7 +261,7 @@ foreach($pages[$activePage]['columns'] as $colNum => $column) { } -if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) $sugar_smarty->assign('lock_homepage', true); +if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) $sugar_smarty->assign('lock_homepage', true); $sugar_smarty->assign('sugarVersion', $sugar_version); @@ -295,13 +291,6 @@ $sugar_smarty->assign('lblLnkHelp', $GLOBALS['app_strings']['LNK_HELP']); $sugar_smarty->assign('mod', return_module_language($sugar_config['default_language'], 'Home')); $sugar_smarty->assign('app', $GLOBALS['app_strings']); $sugar_smarty->assign('module', 'Home'); -//custom chart code -require_once('include/SugarCharts/SugarChartFactory.php'); -$sugarChart = SugarChartFactory::getInstance(); -$resources = $sugarChart->getChartResources(); -$mySugarResources = $sugarChart->getMySugarChartResources(); -$sugar_smarty->assign('chartResources', $resources); -$sugar_smarty->assign('mySugarChartResources', $mySugarResources); echo $sugar_smarty->fetch('include/MySugar/tpls/MySugar.tpl'); ?> \ No newline at end of file diff --git a/modules/Home/language/en_us.lang.php b/modules/Home/language/en_us.lang.php index b7ae106f..91dbd92c 100644 --- a/modules/Home/language/en_us.lang.php +++ b/modules/Home/language/en_us.lang.php @@ -230,9 +230,6 @@ $mod_strings = array ( 'LBL_SOURCE_TCPDF' => 'TCPDF - A PHP class for generating PDF documents.', 'LBL_SOURCE_CSSMIN' => 'CssMin - A css parser and minifier.', 'LBL_SOURCE_PHPSAML' => 'PHP-SAML - A simple SAML toolkit for PHP.', - 'LBL_SOURCE_ISCROLL' => 'iScroll - The overflow:scroll for mobile webkit. Native scrolling inside a fixed width/height element.', - 'LBL_SOURCE_FLASHCANVAS' => 'FlashCanvas - FlashCanvas is a JavaScript library which adds the HTML5 Canvas support to Internet Explorer. It renders shapes and images via Flash drawing API. It supports almost all Canvas APIs and, in many cases, runs faster than other similar libraries which use VML or Silverlight.', - 'LBL_SOURCE_JIT' => 'JavaScript InfoVis Toolkit - The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web.', 'LBL_DASHLET_TITLE' => 'My Sites', @@ -241,6 +238,7 @@ $mod_strings = array ( 'LBL_DASHLET_OPT_HEIGHT' => 'Dashlet Height (in pixels)', 'LBL_DASHLET_SUGAR_NEWS' => 'Sugar News', 'LBL_DASHLET_DISCOVER_SUGAR_PRO' => 'Discover Sugar', + ); diff --git a/modules/Home/quicksearchQuery.php b/modules/Home/quicksearchQuery.php index f22d08e5..a683efa3 100644 --- a/modules/Home/quicksearchQuery.php +++ b/modules/Home/quicksearchQuery.php @@ -86,17 +86,11 @@ class quicksearchQuery { } } - $whereClause = '('.implode(" {$query_obj['group']} ",$cond_arr).')'; + $whereClause = implode(" {$query_obj['group']} ",$cond_arr); if($table == 'users.') $whereClause .= " AND {$table}status='Active'"; - // Need to include the default whereStatement - if(!empty($query_obj['whereExtra'])){ - if(!empty($whereClause))$whereClause .= ' AND '; - $whereClause .= html_entity_decode($query_obj['whereExtra'],ENT_QUOTES); - } - return $whereClause; } @@ -149,8 +143,8 @@ class quicksearchQuery { $query_where = $this->constructWhere($args, $focus); $list_arr = array(); - if($focus->ACLAccess('ListView', true)) - { + if($focus->ACLAccess('ListView', true)) { + $GLOBALS['log']->fatal($query_where); $curlist = $focus->get_list($query_orderby, $query_where, 0, $query_limit, -1, 0); $list_return = array_merge($list_return,$curlist['list']); } @@ -160,7 +154,6 @@ class quicksearchQuery { } protected function formatResults($args, $list_return){ - global $sugar_config; $app_list_strings = null; $list_arr['totalCount']=count($list_return); $list_arr['fields']= array(); @@ -186,7 +179,7 @@ class quicksearchQuery { $list_return[$i]->$field = $app_list_strings[$list_return[$i]->field_name_map[$field]['options']][$list_return[$i]->$field]; } } - + if (isset($listData[$field])) { @@ -290,36 +283,21 @@ class quicksearchQuery { $response = array(); if(showFullName()) { // utils.php, if system is configured to show full name - $user_array = getUserArrayFromFullName($args['conditions'][0]['value'], true); + $user_array = getUserArrayFromFullName($args['conditions'][0]['value']); } else { - $user_array = get_user_array(false, "Active", '', false, $args['conditions'][0]['value'],' AND portal_only=0 ',false); + $user_array = get_user_array(false, "Active", '', false, $args['conditions'][0]['value'],null,false); } $response['totalCount']=count($user_array); $response['fields']=array(); $i=0; foreach($user_array as $id=>$name) { - array_push($response['fields'], array('id' => (string) $id, 'user_name' => $name, 'module' => 'Users')); + array_push($response['fields'], array('id' => $id, 'user_name' => $name, 'module' => 'Users')); $i++; } return $json->encodeReal($response); } - - function externalApi($data) { - require_once('include/externalAPI/ExternalAPIFactory.php'); - - $api = ExternalAPIFactory::loadAPI($data['api']); - - $json = getJSONobj(); - - $listArray['fields'] = $api->searchDoc($_REQUEST['query']); - $listArray['totalCount'] = count($listArray['fields']); - - $listJson = $json->encodeReal($listArray); - - return $listJson; - } } $json = getJSONobj(); diff --git a/modules/Import/Forms.php b/modules/Import/Forms.php index 101c185b..3c2b5ac3 100644 --- a/modules/Import/Forms.php +++ b/modules/Import/Forms.php @@ -43,6 +43,121 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * All Rights Reserved. ********************************************************************************/ +/** + * Returns the bean object of the given module + * + * @param string $module + * @return object + */ +function loadImportBean( + $module + ) +{ + $focus = SugarModule::get($module)->loadBean(); + if ( $focus ) { + if ( !$focus->importable ) + return false; + if ( $module == 'Users' && !is_admin($GLOBALS['current_user']) + && !is_admin_for_module($GLOBALS['current_user'],'Users') + ) + return false; + if ( $focus->bean_implements('ACL')){ + if(!ACLController::checkAccess($focus->module_dir, 'import', true)){ + ACLController::displayNoAccess(); + sugar_die(''); + } + } + } + else { + return false; + } + + return $focus; +} + +/** + * Displays the Smarty template for an error + * + * @param string $message error message to show + * @param string $module what module we were importing into + * @param string $action what page we should go back to + */ +function showImportError( + $message, + $module, + $action = 'Step1' + ) +{ + $ss = new Sugar_Smarty(); + + $ss->assign("MESSAGE",$message); + $ss->assign("ACTION",$action); + $ss->assign("IMPORT_MODULE",$module); + $ss->assign("MOD", $GLOBALS['mod_strings']); + $ss->assign("SOURCE",""); + if ( isset($_REQUEST['source']) ) + $ss->assign("SOURCE", $_REQUEST['source']); + + echo $ss->fetch('modules/Import/tpls/error.tpl'); +} + +/** + * Replaces PHP error handler in Step4 + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param string $errline + */ +function handleImportErrors( + $errno, + $errstr, + $errfile, + $errline + ) +{ + if ( !defined('E_DEPRECATED') ) + define('E_DEPRECATED','8192'); + if ( !defined('E_USER_DEPRECATED') ) + define('E_USER_DEPRECATED','16384'); + + // check to see if current reporting level should be included based upon error_reporting() setting, if not + // then just return + if ( !(error_reporting() & $errno) ) + return true; + + switch ($errno) { + case E_USER_ERROR: + $err_str = "ERROR: [$errno] $errstr on line $errline in file $errfile
    \n"; + $GLOBALS['log']->fatal('IMPORT ERROR:: '.$err_str); + echo $err_str; + exit(1); + break; + case E_USER_WARNING: + case E_WARNING: + $GLOBALS['log']->fatal("IMPORT WARNING:: [$errno] $errstr on line $errline in file $errfile
    \n"); + break; + case E_USER_NOTICE: + case E_NOTICE: + $GLOBALS['log']->fatal("IMPORT NOTICE:: [$errno] $errstr on line $errline in file $errfile
    \n"); + break; + case E_STRICT: + case E_DEPRECATED: + case E_USER_DEPRECATED: + // don't worry about these + //echo "STRICT ERROR: [$errno] $errstr on line $errline in file $errfile
    \n"; + break; + default: + $err_str = "Unknown error type: [$errno] $errstr on line $errline in file $errfile
    \n"; + echo $err_str; + $GLOBALS['log']->fatal('IMPORT ERROR:: '.$err_str); + break; + } + + return true; +} + + /** * Returns an input control for this fieldname given * diff --git a/modules/Import/ImportDuplicateCheck.php b/modules/Import/ImportDuplicateCheck.php index 6e50b167..33c39a73 100644 --- a/modules/Import/ImportDuplicateCheck.php +++ b/modules/Import/ImportDuplicateCheck.php @@ -145,12 +145,6 @@ class ImportDuplicateCheck ) > 0 ) return true; } - // Adds a hook so you can define a method in the bean to handle dupe checking - elseif ( isset($index['dupeCheckFunction']) ) { - $functionName = substr_replace($index['dupeCheckFunction'],'',0,9); - if ( method_exists($this->_focus,$functionName) ) - return $this->_focus->$functionName($index); - } else { $index_fields = array('deleted' => '0'); foreach($index['fields'] as $field){ diff --git a/modules/Import/ImportFieldSanitize.php b/modules/Import/ImportFieldSanitize.php index 0b8a51d7..67c3c8ef 100644 --- a/modules/Import/ImportFieldSanitize.php +++ b/modules/Import/ImportFieldSanitize.php @@ -57,92 +57,145 @@ class ImportFieldSanitize public $num_grp_sep; public $dec_sep; public $default_locale_name_format; - + /** * array of modules/users_last_import ids pairs that are created in this class * needs to be reset after the row is imported */ public static $createdBeans = array(); - + /** - * true if we will create related beans during the sanitize process + * Validate boolean fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure */ - public $addRelatedBean = false; + public function bool( + $value, + $vardef + ) + { + $bool_values = array(0=>'0',1=>'no',2=>'off',3=>'n',4=>'yes',5=>'y',6=>'on',7=>'1'); + $bool_search = array_search($value,$bool_values); + if ( $bool_search === false ) { + return false; + } + else { + //Convert all the values to a real bool. + $value = (int) ( $bool_search > 3 ); + } + if ( isset($vardef['dbType']) && $vardef['dbType'] == 'varchar' ) + $value = ( $value ? 'on' : 'off' ); + + return $value; + } /** - * Checks the SugarField defintion for an available santization method. + * Validate currency fields * * @param $value string * @param $vardef array - * @param $focus object bean of the module we're importing into * @return string sanitized and validated value on success, bool false on failure */ - public function __call( - $name, - $params + public function currency( + $value, + $vardef ) { - static $sfh; + $value = str_replace($this->currency_symbol,"",$value); - if(!isset($sfh)) { - require_once('include/SugarFields/SugarFieldHandler.php'); - $sfh = new SugarFieldHandler(); - } - $value = $params[0]; - $vardef = $params[1]; - if ( isset($params[2]) ) - $focus = $params[2]; - else - $focus = null; - if ( $name == 'relate' && !empty($params[3]) ) - $this->addRelatedBean = true; - else - $this->addRelatedBean = false; - - $field = $sfh->getSugarField(ucfirst($name)); - if ( $field instanceOf SugarFieldBase ) { - $value = $field->importSanitize($value,$vardef,$focus,$this); + return $this->float($value,$vardef); + } + + /** + * Validate datetimecombo fields + * + * @see ImportFieldSanitize::datetime() + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function datetimecombo( + $value, + $vardef + ) + { + return $this->datetime($value,$vardef); + } + + /** + * Validate datetime fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function datetime( + $value, + $vardef + ) + { + global $timedate; + $value = preg_replace('/\s([pm|PM|am|AM]+)/', '\1', $value); + $format = $this->dateformat . ' ' . $this->timeformat; + + if ( !$timedate->check_matching_format($value, $format) ) { + // see if adding a valid time at the end makes it work + list($dateformat,$timeformat) = explode(' ',$format); + $value .= ' ' . date($timeformat,0); + if ( !$timedate->check_matching_format($value, $format) ) { + return false; + } } + if ( !$this->isValidTimeDate($value, $format) ) + return false; + + $value = $timedate->swap_formats( + $value, $format, $timedate->get_date_time_format()); + $value = $timedate->handle_offset( + $value, $timedate->get_date_time_format(), false, $GLOBALS['current_user'], $this->timezone); + $value = $timedate->swap_formats( + $value, $timedate->get_date_time_format(), $timedate->get_db_date_time_format() ); + return $value; } - + /** * Validate date fields * * @param $value string * @param $vardef array - * @param $focus object bean of the module we're importing into * @return string sanitized and validated value on success, bool false on failure */ public function date( $value, - $vardef, - &$focus + $vardef ) { global $timedate; - + $format = $this->dateformat; - - if ( !$timedate->check_matching_format($value, $format) ) + + if ( !$timedate->check_matching_format($value, $format) ) return false; - + if ( !$this->isValidTimeDate($value, $format) ) return false; - + $value = $timedate->swap_formats( $value, $format, $timedate->get_date_format()); - + return $value; } - + /** * Validate email fields * * @param $value string * @param $vardef array - * @param $focus object bean of the module we're importing into * @return string sanitized and validated value on success, bool false on failure */ public function email( @@ -153,10 +206,376 @@ class ImportFieldSanitize if ( !empty($value) && !preg_match('/^\w+(?:[\'.\-+]\w+)*@\w+(?:[.\-]\w+)*(?:[.]\w{2,})+$/',$value) ) { return false; } - + return $value; } - + + /** + * Validate enum fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function enum( + $value, + $vardef + ) + { + global $app_list_strings; + + // Bug 27467 - Trim the value given + $value = trim($value); + + if ( isset($app_list_strings[$vardef['options']]) + && !isset($app_list_strings[$vardef['options']][$value]) ) { + // Bug 23485/23198 - Check to see if the value passed matches the display value + if ( in_array($value,$app_list_strings[$vardef['options']]) ) + $value = array_search($value,$app_list_strings[$vardef['options']]); + // Bug 33328 - Check for a matching key in a different case + elseif ( in_array(strtolower($value), array_keys(array_change_key_case($app_list_strings[$vardef['options']]))) ) { + foreach ( $app_list_strings[$vardef['options']] as $optionkey => $optionvalue ) + if ( strtolower($value) == strtolower($optionkey) ) + $value = $optionkey; + } + // Bug 33328 - Check for a matching value in a different case + elseif ( in_array(strtolower($value), array_map('strtolower', $app_list_strings[$vardef['options']])) ) { + foreach ( $app_list_strings[$vardef['options']] as $optionkey => $optionvalue ) + if ( strtolower($value) == strtolower($optionvalue) ) + $value = $optionkey; + } + else + return false; + } + + return $value; + } + + /** + * Validate float fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function float( + $value, + $vardef + ) + { + $value = str_replace($this->num_grp_sep,"",$value); + $dec_sep = $this->dec_sep; + if ( $dec_sep != '.' ) { + $value = str_replace($dec_sep,".",$value); + } + if ( !is_numeric($value) ) { + return false; + } + + return $value; + } + + /** + * Split full_name field into first_name and last_name + * + * @param $value string + * @param $vardef array + * @param $focus object bean of the module we're importing into + * @return string sanitized and validated value on success, bool false on failure + */ + public function fullname( + $value, + $vardef, + &$focus + ) + { + if ( property_exists($focus,'first_name') && property_exists($focus,'last_name') ) { + $name_arr = preg_split('/\s+/',$value); + + if ( count($name_arr) == 1) { + $focus->last_name = $value; + } + else { + // figure out what comes first, the last name or first name + if ( strpos($this->default_locale_name_format,'l') > strpos($this->default_locale_name_format,'f') ) { + $focus->first_name = array_shift($name_arr); + $focus->last_name = join(' ',$name_arr); + } + else { + $focus->last_name = array_shift($name_arr); + $focus->first_name = join(' ',$name_arr); + } + } + } + } + + /** + * Validate id fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function id( + $value, + $vardef + ) + { + if ( strlen($value) > 36 ) { + return false; + } + + return $value; + } + + /** + * Validate int fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function int( + $value, + $vardef + ) + { + $value = str_replace($this->num_grp_sep,"",$value); + if (!is_numeric($value) || strstr($value,".")) { + return false; + } + + return $value; + } + + /** + * Validate multienum fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function multienum( + $value, + $vardef + ) + { + if(!empty($value) && is_array($value)) { + $enum_list = $value; + } + else { + // If someone was using the old style multienum import technique + $value = str_replace("^","",$value); + + // We will need to break it apart to put test it. + $enum_list = explode(",",$value); + } + // parse to see if all the values given are valid + foreach ( $enum_list as $key => $enum_value ) { + $enum_list[$key] = $enum_value = trim($enum_value); + if ( $this->enum($enum_value,$vardef) === false ) { + return false; + } + } + $value = encodeMultienumValue($enum_list); + + return $value; + } + + /** + * Validate name fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function name( + $value, + $vardef + ) + { + if( isset($vardef['len']) ) { + // check for field length + $value = sugar_substr($value, $vardef['len']); + } + + return $value; + } + + /** + * Validate num fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function num( + $value, + $vardef + ) + { + return $this->int($value,$vardef); + } + + /** + * Validate parent fields + * + * @param $value string + * @param $vardef array + * @param $focus object bean of the module we're importing into + * @param $addRelatedBean bool true if we want to add the related bean if it is not found + * @return string sanitized and validated value on success, bool false on failure + */ + public function parent( + $value, + $vardef, + &$focus, + $addRelatedBean = true + ) + { + global $beanList; + + if ( isset($vardef['type_name']) ) { + $moduleName = $vardef['type_name']; + if ( isset($focus->$moduleName) && isset($beanList[$focus->$moduleName]) ) { + $vardef['module'] = $focus->$moduleName; + $vardef['rname'] = 'name'; + $relatedBean = loadBean($focus->$moduleName); + $vardef['table'] = $relatedBean->table_name; + return $this->relate($value,$vardef,$focus,$addRelatedBean); + } + } + + return false; + } + + /** + * Validate relate fields + * + * @param $value string + * @param $vardef array + * @param $focus object bean of the module we're importing into + * @param $addRelatedBean bool true if we want to add the related bean if it is not found + * @return string sanitized and validated value on success, bool false on failure + */ + public function relate( + $value, + $vardef, + &$focus, + $addRelatedBean = true + ) + { + if ( !isset($vardef['module']) ) + return false; + $newbean = loadBean($vardef['module']); + + // Bug 38885 - If we are relating to the Users table on user_name, there's a good chance + // that the related field data is the full_name, rather than the user_name. So to be sure + // let's try to lookup the field the relationship is expecting to use (user_name). + if ( $vardef['module'] == 'Users' && $vardef['rname'] == 'user_name' ) { + $userFocus = new User; + $userFocus->retrieve_by_string_fields( + array($userFocus->db->concat('users',array('first_name','last_name')) => $value )); + if ( !empty($userFocus->id) ) { + $value = $userFocus->user_name; + } + } + + // Bug 32869 - Assumed related field name is 'name' if it is not specified + if ( !isset($vardef['rname']) ) + $vardef['rname'] = 'name'; + + // Bug 27046 - Validate field against type as it is in the related field + $rvardef = $newbean->getFieldDefinition($vardef['rname']); + if ( isset($rvardef['type']) + && method_exists($this,$rvardef['type']) ) { + $fieldtype = $rvardef['type']; + $returnValue = $this->$fieldtype($value,$rvardef,$focus,$addRelatedBean); + if ( !$returnValue ) + return false; + else + $value = $returnValue; + } + + if ( isset($vardef['id_name']) ) { + $idField = $vardef['id_name']; + + // Bug 24075 - clear out id field value if it is invalid + if ( isset($focus->$idField) ) { + $checkfocus = loadBean($vardef['module']); + if ( $checkfocus && is_null($checkfocus->retrieve($focus->$idField)) ) + $focus->$idField = ''; + } + + // Bug 38356 - Populate the table entry in the vardef from the bean information in case it's not provided + if (!isset($vardef['table'])) { + // Set target module table as the default table name + $tmpfocus = loadBean($vardef['module']); + $vardef['table'] = $tmpfocus->table_name; + } + + // be sure that the id isn't already set for this row + if ( empty($focus->$idField) + && $idField != $vardef['name'] + && !empty($vardef['rname']) + && !empty($vardef['table'])) { + // Bug 27562 - Check db_concat_fields first to see if the field name is a concat + $relatedFieldDef = $newbean->getFieldDefinition($vardef['rname']); + if ( isset($relatedFieldDef['db_concat_fields']) + && is_array($relatedFieldDef['db_concat_fields']) ) + $fieldname = db_concat($vardef['table'],$relatedFieldDef['db_concat_fields']); + else + $fieldname = $vardef['rname']; + // lookup first record that matches in linked table + $query = "SELECT id + FROM {$vardef['table']} + WHERE {$fieldname} = '" . $focus->db->quote($value) . "' + AND deleted != 1"; + + $result = $focus->db->limitQuery($query,0,1,true, "Want only a single row"); + if(!empty($result)){ + if ( $relaterow = $focus->db->fetchByAssoc($result) ) + $focus->$idField = $relaterow['id']; + elseif ( !$addRelatedBean + || ( $newbean->bean_implements('ACL') && !$newbean->ACLAccess('save') ) + || ( in_array($newbean->module_dir,array('Teams','Users')) ) + ) + return false; + else { + // add this as a new record in that bean, then relate + if ( isset($relatedFieldDef['db_concat_fields']) + && is_array($relatedFieldDef['db_concat_fields']) ) { + $relatedFieldParts = explode(' ',$value); + foreach ($relatedFieldDef['db_concat_fields'] as $relatedField) + $newbean->$relatedField = array_shift($relatedFieldParts); + } + else + $newbean->$vardef['rname'] = $value; + if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' ) + $newbean->assigned_user_id = $GLOBALS['current_user']->id; + else + $newbean->assigned_user_id = $focus->assigned_user_id; + if ( !isset($focus->modified_user_id) || $focus->modified_user_id == '' ) + $newbean->modified_user_id = $GLOBALS['current_user']->id; + else + $newbean->modified_user_id = $focus->modified_user_id; + + // populate fields from the parent bean to the child bean + $focus->populateRelatedBean($newbean); + + $newbean->save(false); + $focus->$idField = $newbean->id; + $this->createdBeans[] = ImportFile::writeRowToLastImport( + $focus->module_dir,$newbean->object_name,$newbean->id); + } + } + } + } + + return $value; + } + + /** * Validate sync_to_outlook field * @@ -172,14 +591,14 @@ class ImportFieldSanitize ) { static $focus_user; - + // cache this object since we'll be reusing it a bunch if ( !($focus_user instanceof User) ) { - + $focus_user = new User(); } - - + + if ( !empty($value) && strtolower($value) != "all" ) { $theList = explode(",",$value); $isValid = true; @@ -200,44 +619,57 @@ class ImportFieldSanitize return false; } } - + return $value; } - + /** * Validate time fields * * @param $value string * @param $vardef array - * @param $focus object bean of the module we're importing into * @return string sanitized and validated value on success, bool false on failure */ public function time( $value, - $vardef, - $focus + $vardef ) { global $timedate; - + $format = $this->timeformat; - - if ( !$timedate->check_matching_format($value, $format) ) + + if ( !$timedate->check_matching_format($value, $format) ) return false; - + if ( !$this->isValidTimeDate($value, $format) ) return false; - + $value = $timedate->swap_formats( $value, $format, $timedate->get_time_format()); $value = $timedate->handle_offset( $value, $timedate->get_time_format(), false, $GLOBALS['current_user'], $this->timezone); $value = $timedate->handle_offset( $value, $timedate->get_time_format(), true); - + return $value; } - + + /** + * Validate varchar fields + * + * @param $value string + * @param $vardef array + * @return string sanitized and validated value on success, bool false on failure + */ + public function varchar( + $value, + $vardef + ) + { + return $this->name($value,$vardef); + } + /** * Added to handle Bug 24104, to make sure the date/time value is correct ( i.e. 20/20/2008 doesn't work ) * @@ -245,59 +677,57 @@ class ImportFieldSanitize * @param $format string * @return string sanitized and validated value on success, bool false on failure */ - public function isValidTimeDate( + private function isValidTimeDate( $value, $format ) { global $timedate; - + $dateparts = array(); $reg = $timedate->get_regular_expression($format); preg_match('@'.$reg['format'].'@', $value, $dateparts); - - if ( empty($dateparts) ) - return false; - if ( isset($reg['positions']['a']) + + if ( isset($reg['positions']['a']) && !in_array($dateparts[$reg['positions']['a']], array('am','pm')) ) return false; - if ( isset($reg['positions']['A']) + if ( isset($reg['positions']['A']) && !in_array($dateparts[$reg['positions']['A']], array('AM','PM')) ) return false; if ( isset($reg['positions']['h']) && ( - !is_numeric($dateparts[$reg['positions']['h']]) + !is_numeric($dateparts[$reg['positions']['h']]) || $dateparts[$reg['positions']['h']] < 1 || $dateparts[$reg['positions']['h']] > 12 ) ) return false; if ( isset($reg['positions']['H']) && ( - !is_numeric($dateparts[$reg['positions']['H']]) + !is_numeric($dateparts[$reg['positions']['H']]) || $dateparts[$reg['positions']['H']] < 0 || $dateparts[$reg['positions']['H']] > 23 ) ) return false; if ( isset($reg['positions']['i']) && ( - !is_numeric($dateparts[$reg['positions']['i']]) + !is_numeric($dateparts[$reg['positions']['i']]) || $dateparts[$reg['positions']['i']] < 0 || $dateparts[$reg['positions']['i']] > 59 ) ) return false; if ( isset($reg['positions']['s']) && ( - !is_numeric($dateparts[$reg['positions']['s']]) + !is_numeric($dateparts[$reg['positions']['s']]) || $dateparts[$reg['positions']['s']] < 0 || $dateparts[$reg['positions']['s']] > 59 ) ) return false; if ( isset($reg['positions']['d']) && ( - !is_numeric($dateparts[$reg['positions']['d']]) + !is_numeric($dateparts[$reg['positions']['d']]) || $dateparts[$reg['positions']['d']] < 1 || $dateparts[$reg['positions']['d']] > 31 ) ) return false; if ( isset($reg['positions']['m']) && ( - !is_numeric($dateparts[$reg['positions']['m']]) + !is_numeric($dateparts[$reg['positions']['m']]) || $dateparts[$reg['positions']['m']] < 1 || $dateparts[$reg['positions']['m']] > 12 ) ) return false; if ( isset($reg['positions']['Y']) && !is_numeric($dateparts[$reg['positions']['Y']]) ) return false; - + return true; } diff --git a/modules/Import/ImportFile.php b/modules/Import/ImportFile.php index 80f2d938..4b75c2db 100644 --- a/modules/Import/ImportFile.php +++ b/modules/Import/ImportFile.php @@ -197,11 +197,9 @@ class ImportFile } // Bug 26219 - Convert all line endings to the same style as PHP_EOL - foreach ( $this->_currentRow as $key => $value ) { - // use preg_replace instead of str_replace as str_replace may cause extra lines on Windows - $this->_currentRow[$key] = preg_replace("[\r\n|\n|\r]", PHP_EOL, $value); - } - + foreach ( $this->_currentRow as $key => $value ) + $this->_currentRow[$key] = str_replace(array("\r\n", "\n", "\r"),PHP_EOL,$value); + $this->_rowsCount++; $this->_rowCountedForErrors = false; diff --git a/modules/Import/ImportMap.php b/modules/Import/ImportMap.php index da653977..4278a21d 100644 --- a/modules/Import/ImportMap.php +++ b/modules/Import/ImportMap.php @@ -46,7 +46,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class ImportMap extends SugarBean { - /** + /** * Fields in the table */ public $id; @@ -64,14 +64,13 @@ class ImportMap extends SugarBean public $assigned_user_id; public $is_published; - /** + /** * Set the default settings from Sugarbean */ public $table_name = "import_maps"; public $object_name = "ImportMap"; public $module_dir = 'Import'; public $new_schema = true; - var $disable_custom_fields = true; public $column_fields = array( "id", "name", @@ -86,15 +85,15 @@ class ImportMap extends SugarBean "date_modified", "assigned_user_id", "is_published", - ); + ); /** * Constructor */ - public function __construct() - { + public function __construct() + { parent::SugarBean(); - } + } /** * Returns an array with the field mappings @@ -112,10 +111,10 @@ class ImportMap extends SugarBean $mapping_arr[trim($name)] = $value; } } - + return $mapping_arr; } - + /** * Sets $content with the mapping given * @@ -131,7 +130,7 @@ class ImportMap extends SugarBean } $this->content = implode("&", $output); } - + /** * Returns an array with the default field values * @@ -148,10 +147,10 @@ class ImportMap extends SugarBean $defa_arr[trim($name)] = $value; } } - + return $defa_arr; } - + /** * Sets $default_values with the default values given * @@ -198,11 +197,11 @@ class ImportMap extends SugarBean * @param string $enclosure * @return bool */ - public function save( - $owner_id, - $name, - $module, - $source, + public function save( + $owner_id, + $name, + $module, + $source, $has_header, $delimiter, $enclosure @@ -210,18 +209,18 @@ class ImportMap extends SugarBean { $olddefault_values = $this->default_values; $oldcontent = $this->content; - - $this->retrieve_by_string_fields( + + $this->retrieve_by_string_fields( array( 'assigned_user_id'=>$owner_id, - 'name'=>$name), + 'name'=>$name), false ); - + // Bug 23354 - Make sure enclosure gets saved as an empty string if // it is an empty string, instead of as a null if ( strlen($enclosure) <= 0 ) $enclosure = ' '; - + $this->assigned_user_id = $owner_id; $this->name = $name; $this->source = $source; @@ -233,13 +232,13 @@ class ImportMap extends SugarBean $this->default_values = $olddefault_values; $this->content = $oldcontent; parent::save(); - + // Bug 29365 - The enclosure character isn't saved correctly if it's a tab using MssqlManager, so resave it if ( $enclosure == '\\t' && $this->db instanceOf MssqlManager ) { $this->enclosure = $enclosure; parent::save(); } - + return 1; } @@ -254,18 +253,18 @@ class ImportMap extends SugarBean ) { global $current_user; - + if ( !is_admin($current_user) ) { $other_map = new ImportMap(); $other_map->retrieve_by_string_fields(array('id'=> $id), false); - + if ( $other_map->assigned_user_id != $current_user->id ) return false; } - + return parent::mark_deleted($id); } - + /** * Mark an import map as published * @@ -279,10 +278,10 @@ class ImportMap extends SugarBean ) { global $current_user; - + if ( !is_admin($current_user) ) return false; - + // check for problems if ($flag) { // if you are trying to publish your map @@ -310,13 +309,13 @@ class ImportMap extends SugarBean return false; // otherwise update the is_published flag - $query = "UPDATE $this->table_name - SET is_published = '". ($flag?'yes':'no') . "', - assigned_user_id = '$user_id' + $query = "UPDATE $this->table_name + SET is_published = '". ($flag?'yes':'no') . "', + assigned_user_id = '$user_id' WHERE id = '{$this->id}'"; $this->db->query($query,true,"Error marking import map published: "); - + return true; } @@ -329,28 +328,28 @@ class ImportMap extends SugarBean public function retrieve_all_by_string_fields( $fields_array ) - { - $query = "SELECT * - FROM {$this->table_name} + { + $query = "SELECT * + FROM {$this->table_name} " . $this->get_where($fields_array); - + $result = $this->db->query($query,true," Error: "); $obj_arr = array(); while ($row = $this->db->fetchByAssoc($result,-1,FALSE) ) { - $focus = new ImportMap(); - - foreach($this->column_fields as $field) { - if(isset($row[$field])) { - $focus->$field = $row[$field]; - } - } - $focus->fill_in_additional_detail_fields(); - $obj_arr[]=$focus; - } - - return $obj_arr; - } + $focus = new ImportMap(); + + foreach($this->column_fields as $field) { + if(isset($row[$field])) { + $focus->$field = $row[$field]; + } + } + $focus->fill_in_additional_detail_fields(); + $obj_arr[]=$focus; + } + + return $obj_arr; + } } diff --git a/modules/Import/UsersLastImport.php b/modules/Import/UsersLastImport.php index 6c0a9f5b..9222f0c2 100644 --- a/modules/Import/UsersLastImport.php +++ b/modules/Import/UsersLastImport.php @@ -47,61 +47,60 @@ require_once('modules/Import/Forms.php'); class UsersLastImport extends SugarBean { - /** + /** * Fields in the table */ - public $id; - public $assigned_user_id; - public $import_module; - public $bean_type; - public $bean_id; - public $deleted; - + public $id; + public $assigned_user_id; + public $import_module; + public $bean_type; + public $bean_id; + public $deleted; + /** * Set the default settings from Sugarbean */ public $module_dir = 'Import'; public $table_name = "users_last_import"; public $object_name = "UsersLastImport"; - var $disable_custom_fields = true; public $column_fields = array( "id", "assigned_user_id", "bean_type", "bean_id", "deleted" - ); + ); public $new_schema = true; public $additional_column_fields = Array(); /** * Constructor */ - public function __construct() + public function __construct() { parent::SugarBean(); - } + } - /** + /** * Extends SugarBean::listviewACLHelper * * @return array */ public function listviewACLHelper() { - $array_assign = parent::listviewACLHelper(); - $is_owner = false; - if ( !ACLController::moduleSupportsACL('Accounts') + $array_assign = parent::listviewACLHelper(); + $is_owner = false; + if ( !ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner) ) { - $array_assign['ACCOUNT'] = 'a'; - } + $array_assign['ACCOUNT'] = 'a'; + } else { - $array_assign['ACCOUNT'] = 'span'; - } - return $array_assign; - } + $array_assign['ACCOUNT'] = 'span'; + } + return $array_assign; + } - /** + /** * Delete all the records for a particular user * * @param string $user_id user id of the user doing the import @@ -110,7 +109,7 @@ class UsersLastImport extends SugarBean $user_id ) { - $query = "DELETE FROM $this->table_name + $query = "DELETE FROM $this->table_name WHERE assigned_user_id = '$user_id'"; $this->db->query($query,true,"Error marking last imported records deleted: "); } @@ -125,23 +124,23 @@ class UsersLastImport extends SugarBean ) { global $current_user; - - $query1 = "SELECT bean_id, bean_type + + $query1 = "SELECT bean_id, bean_type FROM users_last_import WHERE assigned_user_id = '$current_user->id' AND id = '$id' AND deleted=0"; - + $result1 = $this->db->query($query1); if ( !$result1 ) return false; while ( $row1 = $this->db->fetchByAssoc($result1)) $this->_deleteRecord($row1['bean_id'],$row1['bean_type']); - + return true; } - + /** * Undo an import * @@ -150,25 +149,25 @@ class UsersLastImport extends SugarBean public function undo( $module ) - { + { global $current_user; - - $query1 = "SELECT bean_id, bean_type + + $query1 = "SELECT bean_id, bean_type FROM users_last_import WHERE assigned_user_id = '$current_user->id' AND import_module = '$module' AND deleted=0"; - - $result1 = $this->db->query($query1); + + $result1 = $this->db->query($query1); if ( !$result1 ) return false; while ( $row1 = $this->db->fetchByAssoc($result1)) $this->_deleteRecord($row1['bean_id'],$row1['bean_type']); - + return true; - } - + } + /** * Deletes a record in a bean * @@ -181,15 +180,15 @@ class UsersLastImport extends SugarBean ) { static $focus; - + // load bean if ( !( $focus instanceof $module) ) { require_once($GLOBALS['beanFiles'][$module]); $focus = new $module; } - + $result = $this->db->query( - "DELETE FROM {$focus->table_name} + "DELETE FROM {$focus->table_name} WHERE id = '{$bean_id}'" ); if (!$result) @@ -205,23 +204,23 @@ class UsersLastImport extends SugarBean WHERE email_addr_bean_rel.bean_id='{$bean_id}' AND email_addr_bean_rel.bean_module='{$focus->module_dir}'" ); - + while ( $row2 = $this->db->fetchByAssoc($result2)) { if ( !$this->db->getOne( - "SELECT email_address_id - FROM email_addr_bean_rel + "SELECT email_address_id + FROM email_addr_bean_rel WHERE email_address_id = '{$row2['email_address_id']}'") ) $this->db->query( - "DELETE FROM email_addresses + "DELETE FROM email_addresses WHERE id = '{$row2['email_address_id']}'"); } - + if ($focus->hasCustomFields()) $this->db->query( - "DELETE FROM {$focus->table_name}_cstm + "DELETE FROM {$focus->table_name}_cstm WHERE id_c = '{$bean_id}'"); } - + /** * Get a list of bean types created in the import * @@ -230,23 +229,23 @@ class UsersLastImport extends SugarBean public static function getBeansByImport( $module ) - { + { global $current_user; - - $query1 = "SELECT DISTINCT bean_type + + $query1 = "SELECT DISTINCT bean_type FROM users_last_import WHERE assigned_user_id = '$current_user->id' AND import_module = '$module' AND deleted=0"; - $result1 = $GLOBALS['db']->query($query1); + $result1 = $GLOBALS['db']->query($query1); if ( !$result1 ) return array($module); $returnarray = array(); while ( $row1 = $GLOBALS['db']->fetchByAssoc($result1)) $returnarray[] = $row1['bean_type']; - + return $returnarray; } diff --git a/modules/Import/controller.php b/modules/Import/controller.php index 595731bb..dc00acc5 100644 --- a/modules/Import/controller.php +++ b/modules/Import/controller.php @@ -44,39 +44,9 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ require_once("modules/Import/Forms.php"); -require_once("include/MVC/Controller/SugarController.php"); class ImportController extends SugarController { - /** - * @see SugarController::loadBean() - */ - public function loadBean() - { - global $mod_strings; - - $this->bean = loadBean($_REQUEST['import_module']); - if ( $this->bean ) { - if ( !$this->bean->importable ) - $this->bean = false; - elseif ( $_REQUEST['import_module'] == 'Users' && !is_admin($GLOBALS['current_user']) ) - $this->bean = false; - elseif ( $this->bean->bean_implements('ACL')){ - if(!ACLController::checkAccess($this->bean->module_dir, 'import', true)){ - ACLController::displayNoAccess(); - sugar_die(''); - } - } - } - - if ( !$this->bean ) { - $_REQUEST['message'] = $mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP']; - $this->view = 'error'; - } - else - $GLOBALS['FOCUS'] = $this->bean; - } - function action_index() { $this->action_Step1(); diff --git a/modules/Import/tpls/step1.tpl b/modules/Import/tpls/step1.tpl index bc9cf2c3..0d3fb186 100644 --- a/modules/Import/tpls/step1.tpl +++ b/modules/Import/tpls/step1.tpl @@ -108,13 +108,6 @@  {$MOD.LBL_ACT}
    -  {$mapping_label}
    -
    - -        {$MOD.LBL_SAVE_MAPPING_AS} -  {sugar_help text=$MOD.LBL_SAVE_MAPPING_HELP} @@ -165,7 +165,7 @@ textarea { width: 20em }
    {$MOD.LBL_TIMEZONE}
    {$MOD.LBL_CURRENCY}{$MOD.LBL_NUMBER_GROUPING_SEP}
    {$MOD.LBL_DECIMAL_SEP} -
    {$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}:
    @@ -266,31 +266,31 @@ ProcessImport = new function() * number of file to process processed */ this.fileCount = 0; - + /* * total files to processs */ this.fileTotal = {/literal}{$FILECOUNT-1}{literal}; - + /* * total records to process */ this.recordCount = {/literal}{$RECORDCOUNT}{literal}; - + /* * maximum number of records per file */ this.recordThreshold = {/literal}{$RECORDTHRESHOLD}{literal}; - + /* * submits the form */ this.submit = function() { - document.getElementById("importstep3").tmp_file.value = + document.getElementById("importstep3").tmp_file.value = document.getElementById("importstep3").tmp_file_base.value + '-' + this.fileCount; YAHOO.util.Connect.setForm(document.getElementById("importstep3")); - YAHOO.util.Connect.asyncRequest('POST', 'index.php', + YAHOO.util.Connect.asyncRequest('POST', 'index.php', { success: function(o) { if (o.responseText.replace(/^\s+|\s+$/g, '') != '') { @@ -298,8 +298,8 @@ ProcessImport = new function() } else { var locationStr = "index.php?module=Import" - + "&action=Last" - + "&type={/literal}{$TYPE}{literal}" + + "&action=Last" + + "&type={/literal}{$TYPE}{literal}" + "&import_module={/literal}{$IMPORT_MODULE}{literal}"; if ( ProcessImport.fileCount >= ProcessImport.fileTotal ) { YAHOO.SUGAR.MessageBox.updateProgress(1,'{/literal}{$MOD.LBL_IMPORT_COMPLETE}{literal}'); @@ -315,9 +315,9 @@ ProcessImport = new function() failure: function(o) { YAHOO.SUGAR.MessageBox.minWidth = 500; YAHOO.SUGAR.MessageBox.show({ - type: "alert", - title: '{/literal}{$MOD.LBL_IMPORT_ERROR}{literal}', - msg: o.responseText, + type: "alert", + title: '{/literal}{$MOD.LBL_IMPORT_ERROR}{literal}', + msg: o.responseText, fn: function() { window.location.reload(true); } }); } @@ -332,11 +332,11 @@ ProcessImport = new function() + " {/literal}{$MOD.LBL_IMPORT_RECORDS_TO}{literal} " + Math.min(((this.fileCount+1) * this.recordThreshold),this.recordCount) + " {/literal}{$MOD.LBL_IMPORT_RECORDS_OF}{literal} " + this.recordCount ); } - + /* * begins the form submission process */ - this.begin = function() + this.begin = function() { datestarted = '{/literal}{$MOD.LBL_IMPORT_STARTED}{literal} ' + YAHOO.util.Date.format('{/literal}{$datetimeformat}{literal}'); diff --git a/modules/Import/views/view.error.php b/modules/Import/views/view.error.php index ae98e365..cb4fc239 100644 --- a/modules/Import/views/view.error.php +++ b/modules/Import/views/view.error.php @@ -90,6 +90,9 @@ class ImportViewError extends SugarView */ public function display() { + global $mod_strings; + + $this->ss->assign("MOD", $mod_strings); $this->ss->assign("IMPORT_MODULE", $_REQUEST['import_module']); $this->ss->assign("ACTION", 'Step1'); $this->ss->assign("MESSAGE",$_REQUEST['message']); diff --git a/modules/Import/views/view.last.php b/modules/Import/views/view.last.php index ed2a1c10..e03a3a4a 100644 --- a/modules/Import/views/view.last.php +++ b/modules/Import/views/view.last.php @@ -90,22 +90,15 @@ class ImportViewLast extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { - global $mod_strings, $app_list_strings; + global $mod_strings; - $iconPath = $this->getModuleTitleIconPath($this->module); - $returnArray = array(); - if (!empty($iconPath) && !$browserTitle) { - $returnArray[] = "{$app_list_strings["; - } - else { - $returnArray[] = $app_list_strings['moduleList'][$_REQUEST['import_module']]; - } - $returnArray[] = "".$mod_strings['LBL_MODULE_NAME'].""; - $returnArray[] = $mod_strings['LBL_RESULTS']; - - return $returnArray; + return array( + "".$_REQUEST[", + "".$mod_strings['LBL_MODULE_NAME']."", + $mod_strings['LBL_RESULTS'], + ); } /** @@ -115,11 +108,14 @@ class ImportViewLast extends SugarView { global $mod_strings, $app_strings, $current_user, $sugar_config, $current_language; + $this->ss->assign("MOD", $mod_strings); + $this->ss->assign("APP", $app_strings); $this->ss->assign("IMPORT_MODULE", $_REQUEST['import_module']); $this->ss->assign("TYPE", $_REQUEST['type']); $this->ss->assign("HEADER", $app_strings['LBL_IMPORT']." ". $mod_strings['LBL_MODULE_NAME']); $this->ss->assign("MODULE_TITLE", $this->getModuleTitle()); // lookup this module's $mod_strings to get the correct module name + $language = (isset($current_language)) ? ($current_language) : ($sugar_config['default_language']); $module_mod_strings = return_module_language($current_language, $_REQUEST['import_module']); $this->ss->assign("MODULENAME",$module_mod_strings['LBL_MODULE_NAME']); @@ -155,7 +151,14 @@ class ImportViewLast extends SugarView $this->ss->assign("errorrecordsFile",ImportCacheFiles::getErrorRecordsFileName()); $this->ss->assign("dupeFile",ImportCacheFiles::getDuplicateFileName()); - if ( $this->bean->object_name == "Prospect" ) { + // load bean + $focus = loadImportBean($_REQUEST['import_module']); + if ( !$focus ) { + showImportError($mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'],$_REQUEST['import_module']); + return; + } + + if ( $focus->object_name == "Prospect" ) { $this->ss->assign("PROSPECTLISTBUTTON", $this->_addToProspectListButton()); } @@ -167,12 +170,13 @@ class ImportViewLast extends SugarView foreach ( UsersLastImport::getBeansByImport($_REQUEST['import_module']) as $beanname ) { // load bean - if ( !( $this->bean instanceof $beanname ) ) { - $this->bean = new $beanname; + if ( !( $focus instanceof $beanname ) ) { + require_once($GLOBALS['beanFiles'][$beanname]); + $focus = new $beanname; } // build listview to show imported records require_once('include/ListView/ListViewFacade.php'); - $lvf = new ListViewFacade($this->bean, $this->bean->module_dir, 0); + $lvf = new ListViewFacade($focus, $focus->module_dir, 0); $params = array(); if(!empty($_REQUEST['orderBy'])) { @@ -180,15 +184,15 @@ class ImportViewLast extends SugarView $params['overrideOrder'] = true; if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder']; } - $beanname = ($this->bean->object_name == 'Case' ? 'aCase' : $this->bean->object_name); + $beanname = ($focus->object_name == 'Case' ? 'aCase' : $focus->object_name); // add users_last_import joins so we only show records done in this import $params['custom_from'] = ', users_last_import'; $params['custom_where'] = " AND users_last_import.assigned_user_id = '{$GLOBALS['current_user']->id}' AND users_last_import.bean_type = '{$beanname}' - AND users_last_import.bean_id = {$this->bean->table_name}.id + AND users_last_import.bean_id = {$focus->table_name}.id AND users_last_import.deleted = 0 - AND {$this->bean->table_name}.deleted = 0"; - $where = " {$this->bean->table_name}.id IN ( + AND {$focus->table_name}.deleted = 0"; + $where = " {$focus->table_name}.id IN ( SELECT users_last_import.bean_id FROM users_last_import WHERE users_last_import.assigned_user_id = '{$GLOBALS['current_user']->id}' @@ -197,11 +201,7 @@ class ImportViewLast extends SugarView $lbl_last_imported = $mod_strings['LBL_LAST_IMPORTED']; $lvf->lv->mergeduplicates = false; - $lvf->lv->showMassupdateFields = false; - if ( $lvf->type == 2 ) { - $lvf->template = 'include/ListView/ListViewNoMassUpdate.tpl'; - } - $module_mod_strings = return_module_language($current_language, $this->bean->module_dir); + $module_mod_strings = return_module_language($current_language, $focus->module_dir); $lvf->setup('', $where, $params, $module_mod_strings, 0, -1, '', strtoupper($beanname), array(), 'id'); $lvf->display($lbl_last_imported.": ".$module_mod_strings['LBL_MODULE_NAME']); } diff --git a/modules/Import/views/view.step1.php b/modules/Import/views/view.step1.php index 645a9887..40bb04c4 100644 --- a/modules/Import/views/view.step1.php +++ b/modules/Import/views/view.step1.php @@ -88,22 +88,15 @@ class ImportViewStep1 extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { - global $mod_strings, $app_list_strings; + global $mod_strings; - $iconPath = $this->getModuleTitleIconPath($this->module); - $returnArray = array(); - if (!empty($iconPath) && !$browserTitle) { - $returnArray[] = "{$app_list_strings["; - } - else { - $returnArray[] = $app_list_strings['moduleList'][$_REQUEST['import_module']]; - } - $returnArray[] = "".$mod_strings['LBL_MODULE_NAME'].""; - $returnArray[] = $mod_strings['LBL_STEP_1_TITLE']; - - return $returnArray; + return array( + "".$_REQUEST[", + "".$mod_strings['LBL_MODULE_NAME']."", + $mod_strings['LBL_STEP_1_TITLE'], + ); } /** @@ -111,10 +104,12 @@ class ImportViewStep1 extends SugarView */ public function display() { - global $mod_strings, $app_strings, $current_user; + global $mod_strings, $app_list_strings, $app_strings, $current_user; global $sugar_config; $this->ss->assign("MODULE_TITLE", $this->getModuleTitle()); + $this->ss->assign("MOD", $mod_strings); + $this->ss->assign("APP", $app_strings); $this->ss->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_DELETE'].'" border="0"')); $this->ss->assign("PUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('publish_inline','align="absmiddle" alt="'.$mod_strings['LBL_PUBLISH'].'" border="0"')); $this->ss->assign("UNPUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('unpublish_inline','align="absmiddle" alt="'.$mod_strings['LBL_UNPUBLISH'].'" border="0"')); @@ -151,6 +146,13 @@ class ImportViewStep1 extends SugarView } + // load bean + $focus = loadImportBean($_REQUEST['import_module']); + if ( !$focus ) { + showImportError($mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'],$_REQUEST['import_module']); + return; + } + // trigger showing other software packages $this->ss->assign("show_salesforce",false); $this->ss->assign("show_outlook",false); @@ -172,26 +174,6 @@ class ImportViewStep1 extends SugarView break; } - // show any custom mappings - if (sugar_is_dir('custom/modules/Import') && $dir = opendir('custom/modules/Import')) { - while (($file = readdir('custom/modules/Import')) !== false) { - if ($file == ".." - || $file == "." - || $file == ".svn" - || $file == "CVS" - || $file == "Attic" - || !sugar_is_dir("./$dirPath".$file) - || sugar_is_file("modules/Import/{$file}") - ) - continue; - require_once("custom/modules/Import/{$file}"); - $classname = str_replace('.php','',$file); - $mappingClass = new $classname; - $custom_mappings[] = $mappingClass->name; - } - } - - // get user defined import maps $this->ss->assign('is_admin',is_admin($current_user)); $import_map_seed = new ImportMap(); diff --git a/modules/Import/views/view.step2.php b/modules/Import/views/view.step2.php index ef15dace..02854760 100644 --- a/modules/Import/views/view.step2.php +++ b/modules/Import/views/view.step2.php @@ -91,20 +91,13 @@ class ImportViewStep2 extends SugarView */ protected function _getModuleTitleParams() { - global $mod_strings, $app_list_strings; + global $mod_strings; - $iconPath = $this->getModuleTitleIconPath($this->module); - $returnArray = array(); - if (!empty($iconPath) && !$browserTitle) { - $returnArray[] = "{$app_list_strings["; - } - else { - $returnArray[] = $app_list_strings['moduleList'][$_REQUEST['import_module']]; - } - $returnArray[] = "".$mod_strings['LBL_MODULE_NAME'].""; - $returnArray[] = $mod_strings['LBL_STEP_2_TITLE']; - - return $returnArray; + return array( + "".$_REQUEST[", + "".$mod_strings['LBL_MODULE_NAME']."", + $mod_strings['LBL_STEP_2_TITLE'], + ); } /** @@ -116,6 +109,8 @@ class ImportViewStep2 extends SugarView global $import_mod_strings; $this->ss->assign("MODULE_TITLE", $this->getModuleTitle()); + $this->ss->assign("MOD", $mod_strings); + $this->ss->assign("APP", $app_strings); $this->ss->assign("IMP", $import_mod_strings); $this->ss->assign("TYPE",( !empty($_REQUEST['type']) ? $_REQUEST['type'] : "import" )); $this->ss->assign("CUSTOM_DELIMITER", @@ -130,6 +125,13 @@ class ImportViewStep2 extends SugarView $this->ss->assign("HEADER", $app_strings['LBL_IMPORT']." ". $mod_strings['LBL_MODULE_NAME']); $this->ss->assign("JAVASCRIPT", $this->_getJS()); + // load bean + $focus = loadImportBean($_REQUEST['import_module']); + if ( !$focus ) { + showImportError($mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'],$_REQUEST['import_module']); + return; + } + // special for importing from Outlook if ($_REQUEST['source'] == "outlook") { $this->ss->assign("SOURCE", $_REQUEST['source']); @@ -155,25 +157,15 @@ class ImportViewStep2 extends SugarView } else { $classname = 'ImportMap' . ucfirst($_REQUEST['source']); - if ( file_exists("modules/Import/{$classname}.php") ) - require_once("modules/Import/{$classname}.php"); - elseif ( file_exists("custom/modules/Import/{$classname}.php") ) - require_once("custom/modules/Import/{$classname}.php"); - else { - require_once("custom/modules/Import/ImportMapOther.php"); - $classname = 'ImportMapOther'; - $_REQUEST['source'] = 'other'; - } - if ( class_exists($classname) ) { - $import_map_seed = new $classname; - if (isset($import_map_seed->delimiter)) - $this->ss->assign("CUSTOM_DELIMITER", $import_map_seed->delimiter); - if (isset($import_map_seed->enclosure)) - $this->ss->assign("CUSTOM_ENCLOSURE", htmlentities($import_map_seed->enclosure)); - if ($import_map_seed->has_header) - $this->ss->assign("HAS_HEADER_CHECKED"," CHECKED"); - $this->ss->assign("SOURCE", $_REQUEST['source']); - } + require("modules/Import/{$classname}.php"); + $import_map_seed = new $classname; + if (isset($import_map_seed->delimiter)) + $this->ss->assign("CUSTOM_DELIMITER", $import_map_seed->delimiter); + if (isset($import_map_seed->enclosure)) + $this->ss->assign("CUSTOM_ENCLOSURE", htmlentities($import_map_seed->enclosure)); + if ($import_map_seed->has_header) + $this->ss->assign("HAS_HEADER_CHECKED"," CHECKED"); + $this->ss->assign("SOURCE", $_REQUEST['source']); } // add instructions for anything other than custom_delimited @@ -197,11 +189,6 @@ class ImportViewStep2 extends SugarView case "csv": $lang_key = "CUSTOM"; break; - case "other": - break; - default: - $lang_key = "CUSTOM_MAPPING_".strtoupper($import_map_seed->name); - break; } if ( $lang_key != '' ) { for ($i = 1; isset($mod_strings["LBL_{$lang_key}_NUM_$i"]);$i++) { diff --git a/modules/Import/views/view.step3.php b/modules/Import/views/view.step3.php index be5a1cc0..ca795f4f 100644 --- a/modules/Import/views/view.step3.php +++ b/modules/Import/views/view.step3.php @@ -47,10 +47,10 @@ require_once('modules/Import/ImportFileSplitter.php'); require_once('modules/Import/ImportCacheFiles.php'); require_once('modules/Import/ImportDuplicateCheck.php'); -require_once('include/upload_file.php'); +require_once('include/upload_file.php'); -class ImportViewStep3 extends SugarView -{ +class ImportViewStep3 extends SugarView +{ /** * @see SugarView::getMenu() */ @@ -59,25 +59,25 @@ class ImportViewStep3 extends SugarView ) { global $mod_strings, $current_language; - + if ( empty($module) ) $module = $_REQUEST['import_module']; - + $old_mod_strings = $mod_strings; $mod_strings = return_module_language($current_language, $module); $returnMenu = parent::getMenu($module); $mod_strings = $old_mod_strings; - + return $returnMenu; } - + /** * @see SugarView::_getModuleTab() */ protected function _getModuleTab() { global $app_list_strings, $moduleTabMap; - + // Need to figure out what tab this module belongs to, most modules have their own tabs, but there are exceptions. if ( !empty($_REQUEST['module_tab']) ) return $_REQUEST['module_tab']; @@ -89,46 +89,47 @@ class ImportViewStep3 extends SugarView else return $_REQUEST['import_module']; } - + /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { - global $mod_strings, $app_list_strings; + global $mod_strings; - $iconPath = $this->getModuleTitleIconPath($this->module); - $returnArray = array(); - if (!empty($iconPath) && !$browserTitle) { - $returnArray[] = "{$app_list_strings["; - } - else { - $returnArray[] = $app_list_strings['moduleList'][$_REQUEST['import_module']]; - } - $returnArray[] = "".$mod_strings['LBL_MODULE_NAME'].""; - $returnArray[] = $mod_strings['LBL_STEP_3_TITLE']; - - return $returnArray; + return array( + "".$_REQUEST[", + "".$mod_strings['LBL_MODULE_NAME']."", + $mod_strings['LBL_STEP_3_TITLE'], + ); } - - /** + + /** * @see SugarView::display() */ public function display() { global $mod_strings, $app_strings, $current_user, $sugar_config, $app_list_strings, $locale; - + $this->ss->assign("MOD", $mod_strings); + $this->ss->assign("APP", $app_strings); $this->ss->assign("IMPORT_MODULE", $_REQUEST['import_module']); $has_header = ( isset( $_REQUEST['has_header']) ? 1 : 0 ); - $sugar_config['import_max_records_per_file'] = - ( empty($sugar_config['import_max_records_per_file']) + $sugar_config['import_max_records_per_file'] = + ( empty($sugar_config['import_max_records_per_file']) ? 1000 : $sugar_config['import_max_records_per_file'] ); + // load the bean for the import module + $focus = loadImportBean($_REQUEST['import_module']); + if ( !$focus ) { + showImportError($mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'],$_REQUEST['import_module']); + return; + } + // Clear out this user's last import $seedUsersLastImport = new UsersLastImport(); $seedUsersLastImport->mark_deleted_by_user_id($current_user->id); ImportCacheFiles::clearCacheFiles(); - + // attempt to lookup a preexisting field map // use the custom one if specfied to do so in step 1 $field_map = array(); @@ -139,9 +140,9 @@ class ImportViewStep3 extends SugarView $mapping_file->retrieve( $_REQUEST['source_id'],false); $_REQUEST['source'] = $mapping_file->source; $has_header = $mapping_file->has_header; - if (isset($mapping_file->delimiter)) + if (isset($mapping_file->delimiter)) $_REQUEST['custom_delimiter'] = $mapping_file->delimiter; - if (isset($mapping_file->enclosure)) + if (isset($mapping_file->enclosure)) $_REQUEST['custom_enclosure'] = htmlentities($mapping_file->enclosure); $field_map = $mapping_file->getMapping(); $default_values = $mapping_file->getDefaultValues(); @@ -150,46 +151,36 @@ class ImportViewStep3 extends SugarView } else { // Try to see if we have a custom mapping we can use - // based upon the where the records are coming from + // based upon the where the records are coming from // and what module we are importing into $classname = 'ImportMap' . ucfirst($_REQUEST['source']); - if ( file_exists("modules/Import/{$classname}.php") ) - require_once("modules/Import/{$classname}.php"); - elseif ( file_exists("custom/modules/Import/{$classname}.php") ) - require_once("custom/modules/Import/{$classname}.php"); - else { - require_once("custom/modules/Import/ImportMapOther.php"); - $classname = 'ImportMapOther'; - $_REQUEST['source'] = 'other'; - } - if ( class_exists($classname) ) { - $mapping_file = new $classname; - if (isset($mapping_file->delimiter)) - $_REQUEST['custom_delimiter'] = $mapping_file->delimiter; - if (isset($mapping_file->enclosure)) - $_REQUEST['custom_enclosure'] = htmlentities($mapping_file->enclosure); - $ignored_fields = $mapping_file->getIgnoredFields($_REQUEST['import_module']); - $field_map = $mapping_file->getMapping($_REQUEST['import_module']); - } + require("modules/Import/{$classname}.php"); + $mapping_file = new $classname; + if (isset($mapping_file->delimiter)) + $_REQUEST['custom_delimiter'] = $mapping_file->delimiter; + if (isset($mapping_file->enclosure)) + $_REQUEST['custom_enclosure'] = htmlentities($mapping_file->enclosure); + $ignored_fields = $mapping_file->getIgnoredFields($_REQUEST['import_module']); + $field_map = $mapping_file->getMapping($_REQUEST['import_module']); } - + $this->ss->assign("CUSTOM_DELIMITER", ( !empty($_REQUEST['custom_delimiter']) ? $_REQUEST['custom_delimiter'] : "," )); $this->ss->assign("CUSTOM_ENCLOSURE", ( !empty($_REQUEST['custom_enclosure']) ? $_REQUEST['custom_enclosure'] : "" )); - + // handle uploaded file $uploadFile = new UploadFile('userfile'); if (isset($_FILES['userfile']) && $uploadFile->confirm_upload()) { - $uploadFile->final_move('IMPORT_'.$this->bean->object_name.'_'.$current_user->id); - $uploadFileName = $uploadFile->get_upload_path('IMPORT_'.$this->bean->object_name.'_'.$current_user->id); + $uploadFile->final_move('IMPORT_'.$focus->object_name.'_'.$current_user->id); + $uploadFileName = $uploadFile->get_upload_path('IMPORT_'.$focus->object_name.'_'.$current_user->id); } else { - $this->_showImportError($mod_strings['LBL_IMPORT_MODULE_ERROR_NO_UPLOAD'],$_REQUEST['import_module'],'Step2'); + showImportError($mod_strings['LBL_IMPORT_MODULE_ERROR_NO_UPLOAD'],$_REQUEST['import_module'],'Step2'); return; } - + // split file into parts $splitter = new ImportFileSplitter( $uploadFileName, @@ -199,34 +190,31 @@ class ImportViewStep3 extends SugarView html_entity_decode($_REQUEST['custom_enclosure'],ENT_QUOTES), $has_header ); - + // Now parse the file and look for errors $importFile = new ImportFile( $uploadFileName, $_REQUEST['custom_delimiter'], html_entity_decode($_REQUEST['custom_enclosure'],ENT_QUOTES) ); - + if ( !$importFile->fileExists() ) { - $this->_showImportError($mod_strings['LBL_CANNOT_OPEN'],$_REQUEST['import_module'],'Step2'); + showImportError($mod_strings['LBL_CANNOT_OPEN'],$_REQUEST['import_module'],'Step2'); return; } - + // retrieve first 3 rows $rows = array(); $system_charset = $locale->default_export_charset; $user_charset = $locale->getExportCharset(); - $other_charsets = 'UTF-8, UTF-7, ASCII, CP1252, EUC-JP, SJIS, eucJP-win, SJIS-win, JIS, ISO-2022-JP'; - $detectable_charsets = "UTF-8, {$user_charset}, {$system_charset}, {$other_charsets}"; - // Bug 26824 - mb_detect_encoding() thinks CP1252 is IS0-8859-1, so use that instead in the encoding list passed to the function - $detectable_charsets = str_replace('CP1252','ISO-8859-1',$detectable_charsets); + $other_charsets = 'UTF-8, UTF-7, ASCII, EUC-JP,SJIS, eucJP-win, SJIS-win, JIS, ISO-2022-JP'; $charset_for_import = $user_charset; //We will set the default import charset option by user's preference. $able_to_detect = function_exists('mb_detect_encoding'); for ( $i = 0; $i < 3; $i++ ) { $rows[$i] = $importFile->getNextRow(); if(!empty($rows[$i]) && $able_to_detect) { foreach($rows[$i] as & $temp_value) { - $current_charset = mb_detect_encoding($temp_value, $detectable_charsets); + $current_charset = mb_detect_encoding($temp_value, "UTF-8, {$user_charset}, {$system_charset}, {$other_charsets}"); if(!empty($current_charset) && $current_charset != "UTF-8") { $temp_value = $locale->translateCharset($temp_value, $current_charset);// we will use utf-8 for displaying the data on the page. $charset_for_import = $current_charset; @@ -237,7 +225,7 @@ class ImportViewStep3 extends SugarView } } $ret_field_count = $importFile->getFieldCount(); - + // Bug 14689 - Parse the first data row to make sure it has non-empty data in it $isempty = true; if ( $rows[(int)$has_header] != false ) { @@ -248,15 +236,15 @@ class ImportViewStep3 extends SugarView } } } - + if ($isempty || $rows[(int)$has_header] == false) { - $this->_showImportError($mod_strings['LBL_NO_LINES'],$_REQUEST['import_module'],'Step2'); + showImportError($mod_strings['LBL_NO_LINES'],$_REQUEST['import_module'],'Step2'); return; } - + // save first row to send to step 4 $this->ss->assign("FIRSTROW", base64_encode(serialize($rows[0]))); - + // Now build template $this->ss->assign("TMP_FILE", $uploadFileName ); $this->ss->assign("FILECOUNT", $splitter->getFileCount() ); @@ -267,18 +255,18 @@ class ImportViewStep3 extends SugarView $this->ss->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('basic_search','align="absmiddle" alt="'.$app_strings['LNK_DELETE'].'" border="0"')); $this->ss->assign("PUBLISH_INLINE_PNG", SugarThemeRegistry::current()->getImage('advanced_search','align="absmiddle" alt="'.$mod_strings['LBL_PUBLISH'].'" border="0"')); $this->ss->assign("MODULE_TITLE", $this->getModuleTitle()); - $this->ss->assign("STEP4_TITLE", - strip_tags(str_replace("\n","",getClassicModuleTitle( - $mod_strings['LBL_MODULE_NAME'], - array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_STEP_4_TITLE']), + $this->ss->assign("STEP4_TITLE", + strip_tags(str_replace("\n","",get_module_title( + $mod_strings['LBL_MODULE_NAME'], + $mod_strings['LBL_MODULE_NAME']." ".$mod_strings['LBL_STEP_4_TITLE'], false ))) ); $this->ss->assign("HEADER", $app_strings['LBL_IMPORT']." ". $mod_strings['LBL_MODULE_NAME']); - + // we export it as email_address, but import as email1 $field_map['email_address'] = 'email1'; - + // build each row; row count is determined by the the number of fields in the import file $columns = array(); $mappedFields = array(); @@ -300,27 +288,27 @@ class ImportViewStep3 extends SugarView elseif (empty( $_REQUEST['source_id'])) { $defaultValue = trim($rows[0][$field_count]); } - + // build string of options - $fields = $this->bean->get_importable_fields(); + $fields = $focus->get_importable_fields(); $options = array(); $defaultField = ''; foreach ( $fields as $fieldname => $properties ) { // get field name if (!empty ($properties['vname'])) - $displayname = str_replace(":","",translate($properties['vname'] ,$this->bean->module_dir)); + $displayname = str_replace(":","",translate($properties['vname'] ,$focus->module_dir)); else - $displayname = str_replace(":","",translate($properties['name'] ,$this->bean->module_dir)); + $displayname = str_replace(":","",translate($properties['name'] ,$focus->module_dir)); // see if this is required $req_mark = ""; $req_class = ""; - if ( array_key_exists($fieldname, $this->bean->get_import_required_fields()) ) { + if ( array_key_exists($fieldname, $focus->get_import_required_fields()) ) { $req_mark = ' ' . $app_strings['LBL_REQUIRED_SYMBOL']; $req_class = ' class="required" '; } // see if we have a match $selected = ''; - if ( !empty($defaultValue) && !in_array($fieldname,$mappedFields) + if ( !empty($defaultValue) && !in_array($fieldname,$mappedFields) && !in_array($fieldname,$ignored_fields) ) { if ( strtolower($fieldname) == strtolower($defaultValue) || strtolower($fieldname) == str_replace(" ","_",strtolower($defaultValue)) @@ -333,7 +321,7 @@ class ImportViewStep3 extends SugarView } // get field type information $fieldtype = ''; - if ( isset($properties['type']) + if ( isset($properties['type']) && isset($mod_strings['LBL_IMPORT_FIELDDEF_' . strtoupper($properties['type'])]) ) $fieldtype = ' [' . $mod_strings['LBL_IMPORT_FIELDDEF_' . strtoupper($properties['type'])] . '] '; if ( isset($properties['comment']) ) @@ -341,7 +329,7 @@ class ImportViewStep3 extends SugarView $options[$displayname.$fieldname] = '\n'; } - + // get default field value $defaultFieldHTML = ''; if ( !empty($defaultField) ) { @@ -352,13 +340,13 @@ class ImportViewStep3 extends SugarView ( isset($default_values[$defaultField]) ? $default_values[$defaultField] : '' ) ); } - + if ( isset($default_values[$defaultField]) ) unset($default_values[$defaultField]); - + // Bug 27046 - Sort the column name picker alphabetically ksort($options); - + $columns[] = array( 'field_choices' => implode('',$options), 'default_field' => $defaultFieldHTML, @@ -373,26 +361,26 @@ class ImportViewStep3 extends SugarView if ( count($default_values) > 0 ) { foreach ( $default_values as $field_name => $default_value ) { // build string of options - $fields = $this->bean->get_importable_fields(); + $fields = $focus->get_importable_fields(); $options = array(); $defaultField = ''; foreach ( $fields as $fieldname => $properties ) { // get field name if (!empty ($properties['vname'])) - $displayname = str_replace(":","",translate($properties['vname'] ,$this->bean->module_dir)); + $displayname = str_replace(":","",translate($properties['vname'] ,$focus->module_dir)); else - $displayname = str_replace(":","",translate($properties['name'] ,$this->bean->module_dir)); + $displayname = str_replace(":","",translate($properties['name'] ,$focus->module_dir)); // see if this is required $req_mark = ""; $req_class = ""; - if ( array_key_exists($fieldname, $this->bean->get_import_required_fields()) ) { + if ( array_key_exists($fieldname, $focus->get_import_required_fields()) ) { $req_mark = ' ' . $app_strings['LBL_REQUIRED_SYMBOL']; $req_class = ' class="required" '; } // see if we have a match $selected = ''; - if ( strtolower($fieldname) == strtolower($field_name) - && !in_array($fieldname,$mappedFields) + if ( strtolower($fieldname) == strtolower($field_name) + && !in_array($fieldname,$mappedFields) && !in_array($fieldname,$ignored_fields) ) { $selected = ' selected="selected" '; $defaultField = $fieldname; @@ -400,15 +388,15 @@ class ImportViewStep3 extends SugarView } // get field type information $fieldtype = ''; - if ( isset($properties['type']) + if ( isset($properties['type']) && isset($mod_strings['LBL_IMPORT_FIELDDEF_' . strtoupper($properties['type'])]) ) $fieldtype = ' [' . $mod_strings['LBL_IMPORT_FIELDDEF_' . strtoupper($properties['type'])] . '] '; if ( isset($properties['comment']) ) $fieldtype .= ' - ' . $properties['comment']; - $options[$displayname.$fieldname] = '\n'; } - + // get default field value $defaultFieldHTML = ''; if ( !empty($defaultField) ) { @@ -419,23 +407,23 @@ class ImportViewStep3 extends SugarView $default_value ); } - + // Bug 27046 - Sort the column name picker alphabetically ksort($options); - + $columns[] = array( 'field_choices' => implode('',$options), 'default_field' => $defaultFieldHTML, 'show_remove' => true, ); - + $ret_field_count++; } } - + $this->ss->assign("COLUMNCOUNT",$ret_field_count); $this->ss->assign("rows",$columns); - + // get list of valid date/time formats $timeFormat = $current_user->getUserDateTimePreferences(); $timeOptions = get_select_options_with_id($sugar_config['time_formats'], $timeFormat['time']); @@ -443,18 +431,32 @@ class ImportViewStep3 extends SugarView $this->ss->assign('TIMEOPTIONS', $timeOptions); $this->ss->assign('DATEOPTIONS', $dateOptions); $this->ss->assign('datetimeformat', $GLOBALS['timedate']->get_cal_date_time_format()); - + // get list of valid timezones + require_once('include/timezone/timezones.php'); + global $timezones; + $userTZ = $current_user->getPreference('timezone'); if(empty($userTZ)) - $userTZ = TimeDate::userTimezone(); - - $this->ss->assign('TIMEZONE_CURRENT', $userTZ); - $this->ss->assign('TIMEZONEOPTIONS', TimeDate::getTimezoneList()); + $userTZ = lookupTimezone(); + + $timezoneOptions = ''; + ksort($timezones); + foreach($timezones as $key => $value) { + $selected =($userTZ == $key) ? ' SELECTED="true"' : ''; + $dst = !empty($value['dstOffset']) ? '(+DST)' : ''; + $gmtOffset =($value['gmtOffset'] / 60); + + if(!strstr($gmtOffset,'-')) { + $gmtOffset = '+'.$gmtOffset; + } + $timezoneOptions .= ""; + } + $this->ss->assign('TIMEZONEOPTIONS', $timezoneOptions); // get currency preference require_once('modules/Currencies/ListCurrency.php'); - $currency = new ListCurrency(); + $currency = new ListCurrency(); $cur_id = $locale->getPrecedentPreference('currency', $current_user); if($cur_id) { $selectCurrency = $currency->getSelectOptions($cur_id); @@ -463,7 +465,7 @@ class ImportViewStep3 extends SugarView $selectCurrency = $currency->getSelectOptions(); $this->ss->assign("CURRENCY", $selectCurrency); } - + $currenciesVars = ""; $i=0; foreach($locale->currencies as $id => $arrVal) { @@ -478,8 +480,8 @@ function setSymbolValue(id) { } eoq; $this->ss->assign('currencySymbolJs', $currencySymbolsJs); - - + + // fill significant digits dropdown $significantDigits = $locale->getPrecedentPreference('default_currency_significant_digits', $current_user); $sigDigits = ''; @@ -490,38 +492,38 @@ eoq; $sigDigits .= ''; } } - + $this->ss->assign('sigDigits', $sigDigits); - + $num_grp_sep = $current_user->getPreference('num_grp_sep'); $dec_sep = $current_user->getPreference('dec_sep'); $this->ss->assign("NUM_GRP_SEP", - ( empty($num_grp_sep) + ( empty($num_grp_sep) ? $sugar_config['default_number_grouping_seperator'] : $num_grp_sep )); $this->ss->assign("DEC_SEP", - ( empty($dec_sep) + ( empty($dec_sep) ? $sugar_config['default_decimal_seperator'] : $dec_sep )); $this->ss->assign('getNumberJs', $locale->getNumberJs()); - + // Name display format $this->ss->assign('default_locale_name_format', $locale->getLocaleFormatMacro($current_user)); $this->ss->assign('getNameJs', $locale->getNameJs()); - + // Charset $charsetOptions = get_select_options_with_id( $locale->getCharsetSelect(), $charset_for_import);//wdong, bug 25927, here we should use the charset testing results from above. $this->ss->assign('CHARSETOPTIONS', $charsetOptions); - + // handle building index selector global $dictionary, $current_language; - + require_once("include/templates/TemplateGroupChooser.php"); - + $chooser_array = array(); $chooser_array[0] = array(); - $idc = new ImportDuplicateCheck($this->bean); + $idc = new ImportDuplicateCheck($focus); $chooser_array[1] = $idc->getDuplicateCheckIndexes(); - + $chooser = new TemplateGroupChooser(); $chooser->args['id'] = 'selected_indices'; $chooser->args['values_array'] = $chooser_array; @@ -530,11 +532,11 @@ eoq; $chooser->args['left_label'] = $mod_strings['LBL_INDEX_USED']; $chooser->args['right_label'] = $mod_strings['LBL_INDEX_NOT_USED']; $this->ss->assign("TAB_CHOOSER", $chooser->display()); - + // show notes - if ( $this->bean instanceof Person ) + if ( $focus instanceof Person ) $module_key = "LBL_CONTACTS_NOTE_"; - elseif ( $this->bean instanceof Company ) + elseif ( $focus instanceof Company ) $module_key = "LBL_ACCOUNTS_NOTE_"; else $module_key = "LBL_".strtoupper($_REQUEST['import_module'])."_NOTE_"; @@ -544,68 +546,39 @@ eoq; } $this->ss->assign("NOTETEXT",$notetext); $this->ss->assign("HAS_HEADER",($has_header ? 'on' : 'off' )); - + // get list of required fields $required = array(); - foreach ( array_keys($this->bean->get_import_required_fields()) as $name ) { - $properties = $this->bean->getFieldDefinition($name); + foreach ( array_keys($focus->get_import_required_fields()) as $name ) { + $properties = $focus->getFieldDefinition($name); if (!empty ($properties['vname'])) - $required[$name] = str_replace(":","",translate($properties['vname'] ,$this->bean->module_dir)); + $required[$name] = str_replace(":","",translate($properties['vname'] ,$focus->module_dir)); else - $required[$name] = str_replace(":","",translate($properties['name'] ,$this->bean->module_dir)); + $required[$name] = str_replace(":","",translate($properties['name'] ,$focus->module_dir)); } // include anything needed for quicksearch to work require_once("include/TemplateHandler/TemplateHandler.php"); $quicksearch_js = TemplateHandler::createQuickSearchCode($fields,$fields,'importstep3'); $this->ss->assign("JAVASCRIPT", $quicksearch_js . "\n" . $this->_getJS($required)); - + $this->ss->assign('required_fields',implode(', ',$required)); $this->ss->display('modules/Import/tpls/step3.tpl'); } - - /** - * Displays the Smarty template for an error - * - * @param string $message error message to show - * @param string $module what module we were importing into - * @param string $action what page we should go back to - */ - protected function _showImportError( - $message, - $module, - $action = 'Step1' - ) - { - $ss = new Sugar_Smarty(); - - $ss->assign("MESSAGE",$message); - $ss->assign("ACTION",$action); - $ss->assign("IMPORT_MODULE",$module); - $ss->assign("MOD", $GLOBALS['mod_strings']); - $ss->assign("SOURCE",""); - if ( isset($_REQUEST['source']) ) - $ss->assign("SOURCE", $_REQUEST['source']); - - echo $ss->fetch('modules/Import/tpls/error.tpl'); - } /** * Returns JS used in this view - * - * @param array $required fields that are required for the import - * @return string HTML output with JS code */ - protected function _getJS($required) + private function _getJS($required) { global $mod_strings; - + $print_required_array = ""; foreach ($required as $name=>$display) { $print_required_array .= "required['$name'] = '". $display . "';\n"; } - + $sqsWaitImage = SugarThemeRegistry::current()->getImageURL('sqsWait.gif'); - + return << {if $fromPortal} @@ -225,16 +195,14 @@ \ No newline at end of file + diff --git a/modules/ModuleBuilder/tpls/listView.tpl b/modules/ModuleBuilder/tpls/listView.tpl index 53c8f371..d3f14204 100644 --- a/modules/ModuleBuilder/tpls/listView.tpl +++ b/modules/ModuleBuilder/tpls/listView.tpl @@ -98,31 +98,23 @@ studiotabs.reset(); {/if}
    - {* BEGIN SUGARCRM flav=pro ONLY *} - {if isset($field_defs.$key.calculated) && $field_defs.$key.calculated} - - {/if} - {if isset($field_defs.$key.dependency) && $field_defs.$key.dependency} - - {/if} - {* END SUGARCRM flav=pro ONLY *} + @@ -130,7 +122,7 @@ studiotabs.reset();
    [{$key}] + {if $view|substr:-6 == "search" } % {else} diff --git a/modules/ModuleBuilder/views/view.dashlet.php b/modules/ModuleBuilder/views/view.dashlet.php index 216e92a7..fff37bb2 100644 --- a/modules/ModuleBuilder/views/view.dashlet.php +++ b/modules/ModuleBuilder/views/view.dashlet.php @@ -67,13 +67,13 @@ class ViewDashlet extends ViewListView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -138,7 +138,6 @@ class ViewDashlet extends ViewListView $smarty->assign ( 'action', 'dashletSave' ) ; $smarty->assign( 'module', 'ModuleBuilder'); $smarty->assign ( 'view_module', $this->editModule ) ; - $smarty->assign ( 'field_defs', $parser->getFieldDefs () ) ; $helpName = (isset( $_REQUEST['view']) && $_REQUEST['view']=='dashletsearch') ? 'searchViewEditor' : 'listViewEditor'; $smarty->assign ( 'helpName', $helpName ) ; $smarty->assign ( 'helpDefault', 'modify' ) ; diff --git a/modules/ModuleBuilder/views/view.deletemodule.php b/modules/ModuleBuilder/views/view.deletemodule.php index 839f277d..7159cd82 100644 --- a/modules/ModuleBuilder/views/view.deletemodule.php +++ b/modules/ModuleBuilder/views/view.deletemodule.php @@ -42,13 +42,13 @@ class Viewdeletemodule extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.deletepackage.php b/modules/ModuleBuilder/views/view.deletepackage.php index b6ea11d8..71033dad 100644 --- a/modules/ModuleBuilder/views/view.deletepackage.php +++ b/modules/ModuleBuilder/views/view.deletepackage.php @@ -42,13 +42,13 @@ class Viewdeletepackage extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.displaydeploy.php b/modules/ModuleBuilder/views/view.displaydeploy.php index b6c8c73d..29e1f2ca 100644 --- a/modules/ModuleBuilder/views/view.displaydeploy.php +++ b/modules/ModuleBuilder/views/view.displaydeploy.php @@ -54,13 +54,13 @@ class ViewDisplaydeploy extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } } diff --git a/modules/ModuleBuilder/views/view.displaydeployresult.php b/modules/ModuleBuilder/views/view.displaydeployresult.php index 3c547cf8..6496e32e 100644 --- a/modules/ModuleBuilder/views/view.displaydeployresult.php +++ b/modules/ModuleBuilder/views/view.displaydeployresult.php @@ -51,13 +51,13 @@ class ViewDisplaydeployresult extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.dropdown.php b/modules/ModuleBuilder/views/view.dropdown.php index 5bc76c91..ea42e05b 100644 --- a/modules/ModuleBuilder/views/view.dropdown.php +++ b/modules/ModuleBuilder/views/view.dropdown.php @@ -41,13 +41,13 @@ class ViewDropdown extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -87,8 +87,8 @@ class ViewDropdown extends SugarView if(!empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio'){ require_once('modules/ModuleBuilder/MB/ModuleBuilder.php'); $mb = new ModuleBuilder(); - $this->module = $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']); - $package = $mb->packages[$_REQUEST['view_package']]; + $this->module =& $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']); + $package =& $mb->packages[$_REQUEST['view_package']]; $package_name = $package->name; $this->module->getVardefs(); if(empty($_REQUEST['dropdown_name']) && !empty($_REQUEST['field'])){ @@ -111,7 +111,8 @@ class ViewDropdown extends SugarView asort($dropdowns); $keys = array_keys($dropdowns); $first_string = $my_list_strings[$dropdowns[$keys[0]]]; - + if(!empty($cf))$smarty->assign('cf', $cf); + $name = ''; $selected_dropdown = array(); diff --git a/modules/ModuleBuilder/views/view.dropdowns.php b/modules/ModuleBuilder/views/view.dropdowns.php index e13b0be5..a87518b6 100644 --- a/modules/ModuleBuilder/views/view.dropdowns.php +++ b/modules/ModuleBuilder/views/view.dropdowns.php @@ -41,13 +41,13 @@ class ViewDropdowns extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.exportcustomizations.php b/modules/ModuleBuilder/views/view.exportcustomizations.php index dea2527b..de6c8d4d 100644 --- a/modules/ModuleBuilder/views/view.exportcustomizations.php +++ b/modules/ModuleBuilder/views/view.exportcustomizations.php @@ -40,13 +40,13 @@ class ViewExportcustomizations extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.history.php b/modules/ModuleBuilder/views/view.history.php index b06bfdcc..0b107b09 100644 --- a/modules/ModuleBuilder/views/view.history.php +++ b/modules/ModuleBuilder/views/view.history.php @@ -46,13 +46,13 @@ class ViewHistory extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -98,7 +98,7 @@ class ViewHistory extends SugarView $snapshots = array ( ) ; for ( $i = 0 ; $i <= $this->pageSize && $ts > 0 ; $i ++ ) { - $dbDate = $timedate->fromTimestamp($ts)->asDb(); + $dbDate = gmdate ( $timedate->get_db_date_time_format (), $ts ) ; $displayTS = $timedate->to_display_date_time ( $dbDate ) ; if ($page * $this->pageSize + $i + 1 == $count) $displayTS = translate("LBL_MB_DEFAULT_LAYOUT"); diff --git a/modules/ModuleBuilder/views/view.home.php b/modules/ModuleBuilder/views/view.home.php index 20706d23..198df6fa 100644 --- a/modules/ModuleBuilder/views/view.home.php +++ b/modules/ModuleBuilder/views/view.home.php @@ -40,13 +40,13 @@ class ViewHome extends SugarView /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } diff --git a/modules/ModuleBuilder/views/view.labels.php b/modules/ModuleBuilder/views/view.labels.php index f30d52b3..eba58c00 100644 --- a/modules/ModuleBuilder/views/view.labels.php +++ b/modules/ModuleBuilder/views/view.labels.php @@ -42,28 +42,26 @@ */ require_once('modules/ModuleBuilder/MB/AjaxCompose.php'); require_once('modules/ModuleBuilder/views/view.modulefields.php'); -class ViewLabels extends ViewModulefields +class ViewLabels extends ViewModulefields { /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; - + return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } - + //STUDIO LABELS ONLY// //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. function display() { $editModule = $_REQUEST['view_module']; - $allLabels = (!empty($_REQUEST['labels']) && $_REQUEST['labels']== 'all'); - if (!isset($_REQUEST['MB'])) { global $app_list_strings; @@ -141,14 +139,14 @@ class ViewLabels extends ViewModulefields //return_module_language($selected_lang, $editModule,false) : the mod_strings will be included from cache files here. foreach(return_module_language($selected_lang, $editModule,false) as $name=>$label) { //#25294 - if($allLabels || isset($vnames[$name]) || preg_match( '/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si' , $name)) { + if(isset($vnames[$name]) || preg_match( '/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si' , $name)) { $formatted_mod_strings[$name] = htmlentities($label, ENT_QUOTES, 'UTF-8'); } } //Grab everything from the custom files $mod_bak = $mod_strings; $files = array( - "custom/modules/$editModule/language/$selected_lang.lang.php", + "custom/modules/$editModule/language/$selected_lang.lang.php", "custom/modules/$editModule/Ext/Language/$selected_lang.lang.ext.php" ); foreach($files as $langfile){ @@ -170,8 +168,6 @@ class ViewLabels extends ViewModulefields $smarty->assign('selected_lang', $selected_lang); $smarty->assign('defaultHelp', 'labelsBtn'); $smarty->assign('assistant', array('key'=>'labels', 'group'=>'module')); - $smarty->assign('labels_choice', $mod_strings['labelTypes']); - $smarty->assign('labels_current', $allLabels?"all":""); $ajax = new AjaxCompose(); $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")'); diff --git a/modules/ModuleBuilder/views/view.layoutview.php b/modules/ModuleBuilder/views/view.layoutview.php index 89d1073b..03464e49 100644 --- a/modules/ModuleBuilder/views/view.layoutview.php +++ b/modules/ModuleBuilder/views/view.layoutview.php @@ -77,13 +77,13 @@ class ViewLayoutView extends ViewEdit /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), - ModuleBuilderController::getModuleTitle(), + $mod_strings['LBL_MODULEBUILDER'], ); } @@ -117,7 +117,6 @@ class ViewLayoutView extends ViewEdit $requiredFields = implode($parser->getRequiredFields () , ','); $slashedRequiredFields = addslashes($requiredFields); $buttons = array ( ) ; - $disableLayout = false; if ($preview) { @@ -125,77 +124,46 @@ class ViewLayoutView extends ViewEdit } else { $smarty->assign ( 'layouttitle', translate ( 'LBL_CURRENT_LAYOUT', 'ModuleBuilder' ) ) ; - - if($this->editLayout == MB_DETAILVIEW || $this->editLayout == MB_QUICKCREATE){ - $parser2 = ParserFactory::getParser(MB_EDITVIEW,$this->editModule,$this->package); - if($this->editLayout == MB_DETAILVIEW){ - $disableLayout = $parser2->getSyncDetailEditViews(); - } - if(!empty($_REQUEST['copyFromEditView'])){ - $editViewPanels = $parser2->convertFromCanonicalForm ( $parser2->_viewdefs [ 'panels' ] , $parser2->_fielddefs ) ; - $parser->_viewdefs [ 'panels' ] = $editViewPanels; - $parser->_fielddefs = $parser2->_fielddefs; - $parser->setUseTabs($parser2->getUseTabs()); - } - } - if (! $this->fromModuleBuilder) { - $buttons [] = array ( + $buttons [] = array ( 'id' => 'saveBtn' , 'text' => translate ( 'LBL_BTN_SAVE' ) , - 'actionScript' => "onclick='if(Studio2.checkGridLayout(\"{$this->editLayout}\")) Studio2.handleSave();'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='if(Studio2.checkGridLayout(\"{$this->editLayout}\")) Studio2.handleSave();'" ) ; $buttons [] = array ( 'id' => 'publishBtn' , 'text' => translate ( 'LBL_BTN_SAVEPUBLISH' ) , - 'actionScript' => "onclick='if(Studio2.checkGridLayout(\"{$this->editLayout}\")) Studio2.handlePublish();'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='if(Studio2.checkGridLayout(\"{$this->editLayout}\")) Studio2.handlePublish();'" ) ; - $buttons [] = array ( 'id' => 'spacer' , 'width' => '33px' ) ; + $buttons [] = array ( 'id' => 'spacer' , 'width' => '50px' ) ; $buttons [] = array ( 'id' => 'historyBtn' , 'text' => translate ( 'LBL_HISTORY' ) , - 'actionScript' => "onclick='ModuleBuilder.history.browse(\"{$this->editModule}\", \"{$this->editLayout}\")'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='ModuleBuilder.history.browse(\"{$this->editModule}\", \"{$this->editLayout}\")'" ) ; $buttons [] = array ( 'id' => 'historyDefault' , 'text' => translate ( 'LBL_RESTORE_DEFAULT' ) , - 'actionScript' => "onclick='ModuleBuilder.history.revert(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$history->getLast()}\", \"\")'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='ModuleBuilder.history.revert(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$history->getLast()}\", \"\")'" ) ; } else { $buttons [] = array ( 'id' => 'saveBtn' , 'text' => $GLOBALS [ 'mod_strings' ] [ 'LBL_BTN_SAVE' ] , - 'actionScript' => "onclick='if(Studio2.checkGridLayout(\"{$this->editLayout}\")) Studio2.handlePublish();'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='if(Studio2.checkGridLayout(\"{$this->editLayout}\")) Studio2.handlePublish();'" ) ; - $buttons [] = array ( 'id' => 'spacer' , 'width' => '33px' ) ; + $buttons [] = array ( 'id' => 'spacer' , 'width' => '50px' ) ; $buttons [] = array ( 'id' => 'historyBtn' , 'text' => translate ( 'LBL_HISTORY' ) , - 'actionScript' => "onclick='ModuleBuilder.history.browse(\"{$this->editModule}\", \"{$this->editLayout}\")'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='ModuleBuilder.history.browse(\"{$this->editModule}\", \"{$this->editLayout}\")'" ) ; $buttons [] = array ( 'id' => 'historyDefault' , 'text' => translate ( 'LBL_RESTORE_DEFAULT' ) , - 'actionScript' => "onclick='ModuleBuilder.history.revert(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$history->getLast()}\", \"\")'", - 'disabled' => $disableLayout, - ) ; - } - - - if($this->editLayout == MB_DETAILVIEW || $this->editLayout == MB_QUICKCREATE){ - $buttons [] = array ( - 'id' => 'copyFromEditView' , - 'text' => translate ( 'LBL_COPY_FROM_EDITVIEW' ) , - 'actionScript' => "onclick='ModuleBuilder.copyFromView(\"{$this->editModule}\", \"{$this->editLayout}\")'", - 'disabled' => $disableLayout, + 'actionScript' => "onclick='ModuleBuilder.history.revert(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$history->getLast()}\", \"\")'" ) ; } } @@ -208,11 +176,7 @@ class ViewLayoutView extends ViewEdit } else { $html .= " {$lblTotalOpportunities} {$lblClosedWonOpportunities}
    {$total_opportunities}{$total_opportunities_won}
    {$total_opportunities}{$total_opportunities_won}
    - \ No newline at end of file + +
    + diff --git a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl b/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl deleted file mode 100644 index be180402..00000000 --- a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletConfigure.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} - - -
    -
    - - - - - - - - - - -{if $isRefreshable} - - - - -{/if} - - - -
    {$titleLBL} - -
    - {$autoRefresh} - - -
    - -
    -
    -
    \ No newline at end of file diff --git a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletOptions.tpl b/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletOptions.tpl deleted file mode 100644 index 2ca4df29..00000000 --- a/modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashletOptions.tpl +++ /dev/null @@ -1,86 +0,0 @@ -{* - -/********************************************************************************* - * SugarCRM is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - -*} - - -
    -
    - - - - - - - - - - -{if $isRefreshable} - - - - -{/if} - - - - - - - - - - - -
    {$titleLBL} - -
    - {$autoRefresh} - - -
    {$urlLBL} - -
    {$heightLBL} - -
    - -
    -
    -
    \ No newline at end of file diff --git a/modules/Opportunities/Opportunity.php b/modules/Opportunities/Opportunity.php index 8dee2494..22776205 100644 --- a/modules/Opportunities/Opportunity.php +++ b/modules/Opportunities/Opportunity.php @@ -92,7 +92,7 @@ class Opportunity extends SugarBean { var $rel_account_table = "accounts_opportunities"; var $rel_contact_table = "opportunities_contacts"; var $module_dir = "Opportunities"; - + var $importable = true; var $object_name = "Opportunity"; @@ -102,10 +102,8 @@ class Opportunity extends SugarBean { var $relationship_fields = Array('task_id'=>'tasks', 'note_id'=>'notes', 'account_id'=>'accounts', 'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails', 'project_id'=>'project', - // Bug 38529 & 40938 - 'currency_id' => 'currencies', ); - + function Opportunity() { parent::SugarBean(); global $sugar_config; @@ -116,7 +114,7 @@ class Opportunity extends SugarBean { var $new_schema = true; - + function get_summary_text() { @@ -125,10 +123,10 @@ class Opportunity extends SugarBean { function create_list_query($order_by, $where, $show_deleted = 0) { - + $custom_join = $this->custom_fields->getJOIN(); $query = "SELECT "; - + $query .= " accounts.id as account_id, accounts.name as account_name, @@ -151,10 +149,10 @@ $query .= "LEFT JOIN users $query .= $custom_join['join']; } $where_auto = '1=1'; - if($show_deleted == 0){ + if($show_deleted == 0){ $where_auto = " ($this->rel_account_table.deleted is null OR $this->rel_account_table.deleted=0) - AND (accounts.deleted is null OR accounts.deleted=0) + AND (accounts.deleted is null OR accounts.deleted=0) AND opportunities.deleted=0"; }else if($show_deleted == 1){ $where_auto = " opportunities.deleted=1"; @@ -198,7 +196,7 @@ $query .= "LEFT JOIN users } $where_auto = " ($this->rel_account_table.deleted is null OR $this->rel_account_table.deleted=0) - AND (accounts.deleted is null OR accounts.deleted=0) + AND (accounts.deleted is null OR accounts.deleted=0) AND opportunities.deleted=0"; if($where != "") @@ -222,34 +220,29 @@ $query .= "LEFT JOIN users } function fill_in_additional_detail_fields() - { + { parent::fill_in_additional_detail_fields(); - - if(!empty($this->currency_id)) { - $currency = new Currency(); - $currency->retrieve($this->currency_id); - if($currency->id != $this->currency_id || $currency->deleted == 1){ - $this->amount = $this->amount_usdollar; - $this->currency_id = $currency->id; - } + + $currency = new Currency(); + $currency->retrieve($this->currency_id); + if($currency->id != $this->currency_id || $currency->deleted == 1){ + $this->amount = $this->amount_usdollar; + $this->currency_id = $currency->id; } //get campaign name - if(!empty($this->campaign_id)) { - $camp = new Campaign(); - $camp->retrieve($this->campaign_id); - $this->campaign_name = $camp->name; - } + $camp = new Campaign(); + $camp->retrieve($this->campaign_id); + $this->campaign_name = $camp->name; $this->account_name = ''; $this->account_id = ''; - if(!empty($this->id)) { - $ret_values=Opportunity::get_account_detail($this->id); - if (!empty($ret_values)) { - $this->account_name=$ret_values['name']; - $this->account_id=$ret_values['id']; - $this->account_id_owner =$ret_values['assigned_user_id']; - } + $ret_values=Opportunity::get_account_detail($this->id); + if (!empty($ret_values)) { + $this->account_name=$ret_values['name']; + $this->account_id=$ret_values['id']; + $this->account_id_owner =$ret_values['assigned_user_id']; + } + } - } /** Returns a list of the associated contacts * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. @@ -260,21 +253,21 @@ $query .= "LEFT JOIN users { $this->load_relationship('contacts'); $query_array=$this->contacts->getQuery(true); - + //update the select clause in the retruned query. $query_array['select']="SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id "; - + $query=''; foreach ($query_array as $qstring) { $query.=' '.$qstring; - } + } $temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id'); return $this->build_related_list2($query, new Contact(), $temp); } function update_currency_id($fromid, $toid){ $idequals = ''; - + $currency = new Currency(); $currency->retrieve($toid); foreach($fromid as $f){ @@ -301,7 +294,7 @@ $query .= "LEFT JOIN users global $locale, $current_language, $current_user, $mod_strings, $app_list_strings, $sugar_config; $app_strings = return_application_language($current_language); $params = array(); - + $temp_array = $this->get_list_view_array(); $temp_array['SALES_STAGE'] = empty($temp_array['SALES_STAGE']) ? '' : $temp_array['SALES_STAGE']; $temp_array["ENCODED_NAME"]=$this->name; @@ -315,14 +308,14 @@ $query .= "LEFT JOIN users if(!empty($cur_res)){ $cur_row = $this->db->fetchByAssoc($cur_res); if(isset($cur_row['symbol'])){ - return $cur_row['symbol']; + return $cur_row['symbol']; } } } return ''; - } - + } + /** builds a generic search based on the query string using or do not include any $this-> because this is called on without having the class instantiated @@ -344,16 +337,16 @@ $query .= "LEFT JOIN users return $the_where; } - function save($check_notify = FALSE) + function save($check_notify = FALSE) { // Bug 32581 - Make sure the currency_id is set to something global $current_user, $app_list_strings; - + if ( empty($this->currency_id) ) $this->currency_id = $current_user->getPreference('currency'); if ( empty($this->currency_id) ) $this->currency_id = -99; - + //if probablity isn't set, set it based on the sales stage if (!isset($this->probability) && !empty($this->sales_stage)) { @@ -361,26 +354,26 @@ $query .= "LEFT JOIN users if (isset($prob_arr[$this->sales_stage])) $this->probability = $prob_arr[$this->sales_stage]; } - + require_once('modules/Opportunities/SaveOverload.php'); - + perform_save($this); return parent::save($check_notify); } - + function save_relationship_changes($is_update) { //if account_id was replaced unlink the previous account_id. //this rel_fields_before_value is populated by sugarbean during the retrieve call. - if (!empty($this->account_id) and !empty($this->rel_fields_before_value['account_id']) and + if (!empty($this->account_id) and !empty($this->rel_fields_before_value['account_id']) and (trim($this->account_id) != trim($this->rel_fields_before_value['account_id']))) { //unlink the old record. - $this->load_relationship('accounts'); - $this->accounts->delete($this->id,$this->rel_fields_before_value['account_id']); + $this->load_relationship('accounts'); + $this->accounts->delete($this->id,$this->rel_fields_before_value['account_id']); } - // Bug 38529 & 40938 - exclude currency_id - parent::save_relationship_changes($is_update, array('currency_id')); + + parent::save_relationship_changes($is_update); if (!empty($this->contact_id)) { $this->set_opportunity_contact_relationship($this->contact_id); @@ -398,7 +391,7 @@ $query .= "LEFT JOIN users function set_notification_body($xtpl, $oppty) { global $app_list_strings; - + $xtpl->assign("OPPORTUNITY_NAME", $oppty->name); $xtpl->assign("OPPORTUNITY_AMOUNT", $oppty->amount); $xtpl->assign("OPPORTUNITY_CLOSEDATE", $oppty->date_closed); @@ -418,7 +411,7 @@ $query .= "LEFT JOIN users $array_assign = parent::listviewACLHelper(); $is_owner = false; if(!empty($this->account_id)){ - + if(!empty($this->account_id_owner)){ global $current_user; $is_owner = $current_user->id == $this->account_id_owner; @@ -429,10 +422,10 @@ $query .= "LEFT JOIN users }else{ $array_assign['ACCOUNT'] = 'span'; } - + return $array_assign; } - + /** * Static helper function for getting releated account info. */ @@ -456,7 +449,7 @@ $query .= "LEFT JOIN users } } function getCurrencyType(){ - + } ?> \ No newline at end of file diff --git a/modules/Opportunities/language/en_us.lang.php b/modules/Opportunities/language/en_us.lang.php index f34e6c19..3776eee4 100644 --- a/modules/Opportunities/language/en_us.lang.php +++ b/modules/Opportunities/language/en_us.lang.php @@ -123,7 +123,6 @@ $mod_strings = array ( 'LBL_LEADS_SUBPANEL_TITLE' => 'Leads', 'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts', - 'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documents', 'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects', 'LBL_ASSIGNED_TO_NAME' => 'Assigned to:', 'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User', diff --git a/modules/Opportunities/metadata/SearchFields.php b/modules/Opportunities/metadata/SearchFields.php index 8fbcf584..9d6187a3 100644 --- a/modules/Opportunities/metadata/SearchFields.php +++ b/modules/Opportunities/metadata/SearchFields.php @@ -47,29 +47,5 @@ $searchFields['Opportunities'] = 'sales_stage'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'sales_stage_dom', 'template_var' => 'SALES_STAGE_OPTIONS', 'options_add_blank' => true), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - 'open_only' => array( - 'query_type'=>'default', - 'db_field'=>array('sales_stage'), - 'operator'=>'not in', - 'closed_values' => array('Closed Won', 'Closed Lost'), - 'type'=>'bool', - ), - - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_closed' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), - 'start_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), - 'end_range_amount' => array ('query_type' => 'default', 'enable_range_search' => true), - //Range Search Support ); ?> diff --git a/modules/Opportunities/metadata/detailviewdefs.php b/modules/Opportunities/metadata/detailviewdefs.php index a618a34e..f16308a4 100644 --- a/modules/Opportunities/metadata/detailviewdefs.php +++ b/modules/Opportunities/metadata/detailviewdefs.php @@ -35,7 +35,14 @@ ********************************************************************************/ $viewdefs['Opportunities']['DetailView'] = array( - 'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',)), + 'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE', + array('customCode'=>''),)), 'maxColumns' => '2', 'widths' => array( array('label' => '10', 'field' => '30'), diff --git a/modules/Opportunities/metadata/listviewdefs.php b/modules/Opportunities/metadata/listviewdefs.php index 688d0bf6..625002b4 100644 --- a/modules/Opportunities/metadata/listviewdefs.php +++ b/modules/Opportunities/metadata/listviewdefs.php @@ -92,6 +92,9 @@ $listViewDefs['Opportunities'] = array( 'width' => '10', 'label' => 'LBL_LIST_DATE_CLOSED', 'default' => true), + 'DATE_ENTERED' => array( + 'width' => '10', + 'label' => 'LBL_DATE_ENTERED'), 'CREATED_BY_NAME' => array( 'width' => '10', 'label' => 'LBL_CREATED'), @@ -103,11 +106,7 @@ $listViewDefs['Opportunities'] = array( 'default' => true), 'MODIFIED_BY_NAME' => array( 'width' => '5', - 'label' => 'LBL_MODIFIED'), - 'DATE_ENTERED' => array( - 'width' => '10', - 'label' => 'LBL_DATE_ENTERED', - 'default' => true) + 'label' => 'LBL_MODIFIED') ); ?> diff --git a/modules/Opportunities/metadata/searchdefs.php b/modules/Opportunities/metadata/searchdefs.php index 483c51df..258102ac 100644 --- a/modules/Opportunities/metadata/searchdefs.php +++ b/modules/Opportunities/metadata/searchdefs.php @@ -37,7 +37,7 @@ $searchdefs['Opportunities'] = array( 'templateMeta' => array ( - 'maxColumns' => '4', + 'maxColumns' => '3', 'widths' => array ( 'label' => '10', @@ -62,7 +62,7 @@ $searchdefs['Opportunities'] = array( 'default' => true, 'width' => '10%', ), - array ('name' => 'open_only', 'label' => 'LBL_OPEN_ITEMS', 'type' => 'bool', 'default' => false, 'width' => '10%'), + ), 'advanced_search' => array ( @@ -126,6 +126,7 @@ $searchdefs['Opportunities'] = array( 'default' => true, 'name' => 'next_step', ), + ), ), diff --git a/modules/Opportunities/metadata/subpaneldefs.php b/modules/Opportunities/metadata/subpaneldefs.php index 219aac07..58a833d9 100644 --- a/modules/Opportunities/metadata/subpaneldefs.php +++ b/modules/Opportunities/metadata/subpaneldefs.php @@ -119,27 +119,6 @@ $layout_defs['Opportunities'] = array( ), ) ), - 'documents' => array( - 'order' => 25, - 'module' => 'Documents', - 'subpanel_name' => 'default', - 'sort_order' => 'asc', - 'sort_by' => 'id', - 'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - 'get_subpanel_data' => 'documents', - 'top_buttons' => - array ( - 0 => - array ( - 'widget_class' => 'SubPanelTopButtonQuickCreate', - ), - 1 => - array ( - 'widget_class' => 'SubPanelTopSelectButton', - 'mode' => 'MultiSelect', - ), - ), - ), 'leads' => array( 'order' => 50, 'module' => 'Leads', diff --git a/modules/Opportunities/vardefs.php b/modules/Opportunities/vardefs.php index be49c04c..0ae73538 100644 --- a/modules/Opportunities/vardefs.php +++ b/modules/Opportunities/vardefs.php @@ -36,7 +36,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ -$dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, 'unified_search' => true, 'unified_search_default_enabled' => true, 'duplicate_merge'=>true, +$dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, 'unified_search' => true,'duplicate_merge'=>true, 'comment' => 'An opportunity is the target of selling activities', 'fields' => array ( 'name' => @@ -147,10 +147,9 @@ $dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, ' // 'disable_num_format' => true, 'dbType' => 'double', 'comment' => 'Unconverted amount of the opportunity', + 'duplicate_merge'=>'disabled', 'importable' => 'required', 'required' => true, - 'options' => 'numeric_range_search_dom', - 'enable_range_search' => true, ), 'amount_usdollar' => array ( @@ -160,9 +159,8 @@ $dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, ' 'group'=>'amount', 'dbType' => 'double', 'disable_num_format' => true, - 'duplicate_merge'=>'disabled', 'audited'=>true, - 'comment' => 'Formatted amount of the opportunity', + 'comment' => 'Formatted amount of the opportunity' ), 'currency_id' => array ( @@ -213,8 +211,6 @@ $dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, ' 'comment' => 'Expected or actual date the oppportunity will close', 'importable' => 'required', 'required' => true, - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'next_step' => array ( @@ -311,14 +307,6 @@ $dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, ' 'source'=>'non-db', 'vname'=>'LBL_EMAILS', ), - 'documents'=> - array ( - 'name' => 'documents', - 'type' => 'link', - 'relationship' => 'documents_opportunities', - 'source' => 'non-db', - 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - ), 'project' => array ( diff --git a/modules/Opportunities/views/view.edit.php b/modules/Opportunities/views/view.edit.php index 411efe78..6b351895 100644 --- a/modules/Opportunities/views/view.edit.php +++ b/modules/Opportunities/views/view.edit.php @@ -71,8 +71,6 @@ $probability_script=<< array( 'query_type'=>'default'), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_estimated_start_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_estimated_end_date' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support ); ?> diff --git a/modules/Project/vardefs.php b/modules/Project/vardefs.php index bc04e612..56f5157d 100644 --- a/modules/Project/vardefs.php +++ b/modules/Project/vardefs.php @@ -56,17 +56,13 @@ $dictionary['Project'] = array( 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', - 'comment' => 'Date record created', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', + 'comment' => 'Date record created' ), 'date_modified' => array( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', - 'comment' => 'Date record last modified', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', + 'comment' => 'Date record last modified' ), 'assigned_user_id' => array( 'name' => 'assigned_user_id', @@ -171,7 +167,6 @@ $dictionary['Project'] = array( 'type' => 'date', 'importable' => 'required', 'required' => true, - 'enable_range_search' => true, ), 'estimated_end_date' => array( @@ -181,7 +176,6 @@ $dictionary['Project'] = array( 'type' => 'date', 'importable' => 'required', 'required' => true, - 'enable_range_search' => true, ), 'status' => array( diff --git a/modules/Project/views/view.templatesdetail.php b/modules/Project/views/view.templatesdetail.php index 9b119807..94168f18 100644 --- a/modules/Project/views/view.templatesdetail.php +++ b/modules/Project/views/view.templatesdetail.php @@ -43,12 +43,12 @@ class ProjectViewTemplatesDetail extends ViewDetail /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; return array( - $this->_getModuleTitleListParam($browserTitle), + $this->_getModuleTitleListParam(), "{$this->bean->name}", $mod_strings['LBL_PROJECT_TEMPLATE'] ); diff --git a/modules/Project/views/view.templatesedit.php b/modules/Project/views/view.templatesedit.php index d0815b90..f4c2d37d 100644 --- a/modules/Project/views/view.templatesedit.php +++ b/modules/Project/views/view.templatesedit.php @@ -43,12 +43,12 @@ class ProjectViewTemplatesEdit extends ViewEdit /** * @see SugarView::_getModuleTitleParams() */ - protected function _getModuleTitleParams($browserTitle = false) + protected function _getModuleTitleParams() { global $mod_strings; $crumbs = array(); - $crumbs[] = $this->_getModuleTitleListParam($browserTitle); + $crumbs[] = $this->_getModuleTitleListParam(); if(!empty($this->bean->id)){ $crumbs[] = "{$this->bean->name}"; } diff --git a/modules/ProjectTask/MyProjectTasks.php b/modules/ProjectTask/MyProjectTasks.php index 04e777a2..c56c711e 100644 --- a/modules/ProjectTask/MyProjectTasks.php +++ b/modules/ProjectTask/MyProjectTasks.php @@ -50,7 +50,7 @@ global $app_list_strings; global $current_language, $current_user; $current_module_strings = return_module_language($current_language, 'ProjectTask'); -$today = $timedate->nowDbDate(); +$today = date($GLOBALS['timedate']->dbDayFormat); $today = $timedate->handle_offset($today, $timedate->dbDayFormat, false); $ListView = new ListView(); diff --git a/modules/ProjectTask/metadata/SearchFields.php b/modules/ProjectTask/metadata/SearchFields.php index a4466bd0..b1634e1a 100644 --- a/modules/ProjectTask/metadata/SearchFields.php +++ b/modules/ProjectTask/metadata/SearchFields.php @@ -42,20 +42,6 @@ $searchFields['ProjectTask'] = 'project_name' => array('query_type'=>'default','db_field'=>array('project.name')), 'assigned_user_id' => array('query_type'=>'default'), //'status'=> array('query_type'=>'default', 'options' => 'project_task_status_options', 'template_var' => 'STATUS_FILTER') - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - - 'range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_finish' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_finish' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_finish' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support + ); ?> diff --git a/modules/ProjectTask/vardefs.php b/modules/ProjectTask/vardefs.php index f5ff3dea..45b281b3 100644 --- a/modules/ProjectTask/vardefs.php +++ b/modules/ProjectTask/vardefs.php @@ -53,15 +53,11 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'date_modified' => array( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', ), 'project_id' => array( 'name' => 'project_id', @@ -75,7 +71,7 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'project_task_id' => array( 'name' => 'project_task_id', 'vname' => 'LBL_PROJECT_TASK_ID', - 'required' => false, + 'required' => true, 'type' => 'int', 'reportable' => false, @@ -117,7 +113,6 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'type' => 'date', 'validation'=>array('type' => 'isbefore', 'compareto'=>'date_finish', 'blank' => true), 'audited'=>true, - 'enable_range_search' => true, ), 'time_start' => array( 'name' => 'time_start', @@ -141,7 +136,7 @@ $dictionary['ProjectTask'] = array('audited'=>true, 'type' => 'date', 'validation'=>array('type' => 'isafter', 'compareto'=>'date_start', 'blank' => true), 'audited'=>true, - 'enable_range_search' => true, + ), 'duration' => array( 'name' => 'duration', diff --git a/modules/ProjectTask/views/view.list.php b/modules/ProjectTask/views/view.list.php index 5f5a23c9..db002dbc 100644 --- a/modules/ProjectTask/views/view.list.php +++ b/modules/ProjectTask/views/view.list.php @@ -216,7 +216,7 @@ class ProjectTaskViewList extends ViewList{ if(isset($this->options['show_title']) && $this->options['show_title']) { $moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME']; - echo getClassicModuleTitle($moduleName, array($GLOBALS['mod_strings']['LBL_MODULE_TITLE']), FALSE); + echo get_module_title($moduleName, $GLOBALS['mod_strings']['LBL_MODULE_TITLE'], true); } $where = ''; diff --git a/modules/ProspectLists/Duplicate.php b/modules/ProspectLists/Duplicate.php index e38c1f4d..93b18f99 100644 --- a/modules/ProspectLists/Duplicate.php +++ b/modules/ProspectLists/Duplicate.php @@ -66,7 +66,7 @@ if (isset($_POST['isDuplicate']) && $_POST['isDuplicate'] == true) { while(($row = $focus->db->fetchByAssoc($result)) != null) { $iquery ="INSERT INTO prospect_lists_prospects (id,prospect_list_id, related_id, related_type,date_modified) "; - $iquery .= "VALUES ("."'".create_guid()."',"."'".$focus->id."',"."'".$row['related_id']."',"."'".$row['related_type']."',"."'".TimeDate::getInstance()->nowDb()."')"; + $iquery .= "VALUES ("."'".create_guid()."',"."'".$focus->id."',"."'".$row['related_id']."',"."'".$row['related_type']."',"."'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."')"; $focus->db->query($iquery); //save the record. } } diff --git a/modules/ProspectLists/Menu.php b/modules/ProspectLists/Menu.php index ba4f675f..894d0e7a 100644 --- a/modules/ProspectLists/Menu.php +++ b/modules/ProspectLists/Menu.php @@ -44,5 +44,12 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ global $mod_strings, $app_strings; +if(ACLController::checkAccess('Campaigns', 'edit', true))$module_menu[]= Array("index.php?module=Campaigns&action=EditView&return_module=Campaigns&return_action=index", $mod_strings['LNK_NEW_CAMPAIGN'],"CreateCampaigns"); +if(ACLController::checkAccess('Campaigns', 'list', true))$module_menu[]= Array("index.php?module=Campaigns&action=index&return_module=Campaigns&return_action=index", $mod_strings['LNK_CAMPAIGN_LIST'],"Campaigns"); if(ACLController::checkAccess('ProspectLists', 'edit', true))$module_menu[]= Array("index.php?module=ProspectLists&action=EditView&return_module=ProspectLists&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT_LIST'],"CreateProspectLists"); -if(ACLController::checkAccess('ProspectLists', 'list', true))$module_menu[]= Array("index.php?module=ProspectLists&action=index&return_module=ProspectLists&return_action=index", $mod_strings['LNK_PROSPECT_LIST_LIST'],"ProspectLists"); \ No newline at end of file +if(ACLController::checkAccess('ProspectLists', 'list', true))$module_menu[]= Array("index.php?module=ProspectLists&action=index&return_module=ProspectLists&return_action=index", $mod_strings['LNK_PROSPECT_LIST_LIST'],"ProspectLists"); +if(ACLController::checkAccess('Prospects', 'edit', true))$module_menu[]= Array("index.php?module=Prospects&action=EditView&return_module=Prospects&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT'],"CreateProspects"); +if(ACLController::checkAccess('Prospects', 'list', true))$module_menu[]= Array("index.php?module=Prospects&action=index&return_module=Prospects&return_action=index", $mod_strings['LNK_PROSPECT_LIST'],"Prospects"); + + +?> \ No newline at end of file diff --git a/modules/ProspectLists/TargetListUpdate.php b/modules/ProspectLists/TargetListUpdate.php index 92a61d38..79104fcd 100644 --- a/modules/ProspectLists/TargetListUpdate.php +++ b/modules/ProspectLists/TargetListUpdate.php @@ -72,23 +72,11 @@ else{ $uids = explode ( ',', $_POST['uids'] ); } -// find the relationship to use -$relationship = ''; -foreach($focus->get_linked_fields() as $field => $def) { - if ($focus->load_relationship($field)) { - if ( $focus->$field->getRelatedModuleName() == 'ProspectLists' ) { - $relationship = $field; - break; - } - } -} - -if ( $relationship != '' ) { - foreach ( $uids as $id) { - $focus->retrieve($id); - $focus->load_relationship($relationship); - $focus->prospect_lists->add( $_REQUEST['prospect_list'] ); - } +foreach ( $uids as $id) +{ + $focus->retrieve($id); + $focus->load_relationship('prospect_lists'); + $focus->prospect_lists->add( $_REQUEST['prospect_list'] ); } handleRedirect(); exit; diff --git a/modules/ProspectLists/language/en_us.lang.php b/modules/ProspectLists/language/en_us.lang.php index ec860c55..b5891dd9 100644 --- a/modules/ProspectLists/language/en_us.lang.php +++ b/modules/ProspectLists/language/en_us.lang.php @@ -57,7 +57,7 @@ $mod_strings = array ( 'LBL_LIST_DESCRIPTION' => 'Description', 'LBL_LIST_TYPE_NO' => 'Type', 'LBL_LIST_END_DATE' => 'End Date', - 'LBL_DATE_ENTERED' => 'Date Created', + 'LBL_DATE_ENTERED' => 'Date Entered', 'LBL_DATE_MODIFIED' => 'Date Modified', 'LBL_MODIFIED' => 'Modified by', 'LBL_CREATED' => 'Created by', @@ -67,7 +67,7 @@ $mod_strings = array ( 'LNK_NEW_CAMPAIGN' => 'Create Campaign', 'LNK_CAMPAIGN_LIST' => 'Campaigns', 'LNK_NEW_PROSPECT_LIST' => 'Create Target List', - 'LNK_PROSPECT_LIST_LIST' => 'View Target Lists', + 'LNK_PROSPECT_LIST_LIST' => 'Target Lists', 'LBL_MODIFIED_BY' => 'Modified by', 'LBL_CREATED_BY' => 'Created by', 'LBL_DATE_CREATED' => 'Created date', @@ -86,7 +86,6 @@ $mod_strings = array ( 'LBL_LIST_TYPE' => 'Type', 'LBL_LIST_TYPE_LIST_NAME'=>'Type', 'LBL_NEW_FORM_TITLE'=>'New Target List', - 'LBL_MARKETING_NAME'=>'Marketing Name', 'LBL_MARKETING_MESSAGE'=>'Email Marketing Message', 'LBL_DOMAIN_NAME'=>'Domain Name', 'LBL_DOMAIN'=>'No emails to Domain', diff --git a/modules/ProspectLists/metadata/listviewdefs.php b/modules/ProspectLists/metadata/listviewdefs.php index ed80486d..4028f77a 100644 --- a/modules/ProspectLists/metadata/listviewdefs.php +++ b/modules/ProspectLists/metadata/listviewdefs.php @@ -49,7 +49,7 @@ $listViewDefs['ProspectLists'] = array( 'label' => 'LBL_LIST_TYPE_LIST_NAME', 'default' => true), 'DESCRIPTION' => array( - 'width' => '40', + 'width' => '50', 'label' => 'LBL_LIST_DESCRIPTION', 'default' => true), 'ASSIGNED_USER_NAME' => array( @@ -58,9 +58,4 @@ $listViewDefs['ProspectLists'] = array( 'module' => 'Employees', 'id' => 'ASSIGNED_USER_ID', 'default' => true), - 'DATE_ENTERED' => array ( - 'type' => 'datetime', - 'label' => 'LBL_DATE_ENTERED', - 'width' => '10', - 'default' => true), ); diff --git a/modules/ProspectLists/vardefs.php b/modules/ProspectLists/vardefs.php index e2b90f30..d51d41f4 100644 --- a/modules/ProspectLists/vardefs.php +++ b/modules/ProspectLists/vardefs.php @@ -37,7 +37,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dictionary['ProspectList'] = array ( 'table' => 'prospect_lists', - 'unified_search' => true, 'fields' => array ( 'id' => array ( 'name' => 'id', @@ -52,7 +51,6 @@ $dictionary['ProspectList'] = array ( 'type' => 'varchar', 'len' => '50', 'importable' => 'required', - 'unified_search' => true, ), 'list_type' => array ( 'name' => 'list_type', @@ -93,6 +91,29 @@ $dictionary['ProspectList'] = array ( 'id_name' => 'modified_user_id', 'module' => 'Users', 'duplicate_merge' => 'disabled', + ), + 'assigned_user_id' => array ( + 'name' => 'assigned_user_id', + 'rname' => 'user_name', + 'id_name' => 'assigned_user_id', + 'vname' => 'LBL_ASSIGNED_TO', + 'type' => 'assigned_user_name', + 'table' => 'users', + 'isnull' => 'false', + 'dbType' => 'id', + 'reportable'=>true, + ), + 'assigned_user_name' => + array ( + 'name' => 'assigned_user_name', + 'vname' => 'LBL_ASSIGNED_TO_USER', + 'type' => 'relate', + 'reportable' => false, + 'source' => 'non-db', + 'table' => 'users', + 'id_name' => 'assigned_user_id', + 'module' => 'Users', + 'duplicate_merge' => 'disabled', ), 'created_by' => array ( 'name' => 'created_by', @@ -209,15 +230,8 @@ $dictionary['ProspectList'] = array ( 'fields'=>array('name') ), ), - 'relationships'=>array( - 'prospectlists_assigned_user' => - array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id', - 'rhs_module'=> 'prospectlists' , 'rhs_table'=> 'prospect_lists', 'rhs_key' => 'assigned_user_id', - 'relationship_type'=>'one-to-many') -) ); VardefManager::createVardef('ProspectLists','ProspectList', array( -'assignable', )); ?> diff --git a/modules/Prospects/Menu.php b/modules/Prospects/Menu.php index b6a183f6..d69508ac 100644 --- a/modules/Prospects/Menu.php +++ b/modules/Prospects/Menu.php @@ -45,6 +45,12 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); global $mod_strings, $app_strings; +if(ACLController::checkAccess('Campaigns', 'edit', true))$module_menu[]= Array("index.php?module=Campaigns&action=EditView&return_module=Campaigns&return_action=index", $mod_strings['LNK_NEW_CAMPAIGN'],"CreateCampaigns"); +if(ACLController::checkAccess('Campaigns', 'list', true))$module_menu[]= Array("index.php?module=Campaigns&action=index&return_module=Campaigns&return_action=index", $mod_strings['LNK_CAMPAIGN_LIST'],"Campaigns"); +if(ACLController::checkAccess('ProspectLists', 'edit', true))$module_menu[]= Array("index.php?module=ProspectLists&action=EditView&return_module=ProspectLists&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT_LIST'],"CreateProspectLists"); +if(ACLController::checkAccess('ProspectLists', 'list', true))$module_menu[]= Array("index.php?module=ProspectLists&action=index&return_module=ProspectLists&return_action=index", $mod_strings['LNK_PROSPECT_LIST_LIST'],"ProspectLists"); if(ACLController::checkAccess('Prospects', 'edit', true))$module_menu[]= Array("index.php?module=Prospects&action=EditView&return_module=Prospects&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT'],"CreateProspects"); if(ACLController::checkAccess('Prospects', 'list', true))$module_menu[]= Array("index.php?module=Prospects&action=index&return_module=Prospects&return_action=index", $mod_strings['LNK_PROSPECT_LIST'],"Prospects"); -if(ACLController::checkAccess('Prospects', 'import', true))$module_menu[]= Array("index.php?module=Import&action=Step1&import_module=Prospects&return_module=Prospects&return_action=index", $mod_strings['LNK_IMPORT_PROSPECT'],"Import"); \ No newline at end of file +if(ACLController::checkAccess('Prospects', 'import', true))$module_menu[]= Array("index.php?module=Import&action=Step1&import_module=Prospects&return_module=Prospects&return_action=index", $mod_strings['LNK_IMPORT_PROSPECTS'],"Import"); + +?> \ No newline at end of file diff --git a/modules/Prospects/Prospect.php b/modules/Prospects/Prospect.php index bfc15910..b0cd8ff1 100644 --- a/modules/Prospects/Prospect.php +++ b/modules/Prospects/Prospect.php @@ -116,7 +116,7 @@ class Prospect extends Person { if($custom_join) $custom_join['join'] .= $relate_link_join; $query = "SELECT - prospects.*,email_addresses.email_address email_address, + prospects.*,email_addresses.email_address email1, users.user_name as assigned_user_name "; if($custom_join){ $query .= $custom_join['select']; diff --git a/modules/Prospects/language/en_us.lang.php b/modules/Prospects/language/en_us.lang.php index 20051e6d..6671e1b6 100644 --- a/modules/Prospects/language/en_us.lang.php +++ b/modules/Prospects/language/en_us.lang.php @@ -129,7 +129,7 @@ $mod_strings = array ( 'LBL_IMPORT_VCARD' => 'Import vCard', 'LBL_IMPORT_VCARDTEXT' => 'Automatically create a new contact by importing a vCard from your file system.', 'LBL_DUPLICATE' => 'Possible Duplicate Targets', - 'MSG_SHOW_DUPLICATES' => 'The target record you are about to create might be a duplicate of a target record that already exists. Target records containing similar names and/or email addresses are listed below.
    Click Create Target to continue creating this new target, or select an existing target listed below.', + 'MSG_SHOW_DUPLICATES' => 'The target record you are about to create might be a duplicate of a target record that already exists. Target records containing similar names and/or email addresses are listed below.
    Click Save to continue creating this new target, or click Cancel to return to the module without creating the target.', 'MSG_DUPLICATE' => 'The target record you are about to create might be a duplicate of a target record that already exists. Target records containing similar names and/or email addresses are listed below.
    Click Save to continue creating this new target, or click Cancel to return to the module without creating the target.', 'LNK_IMPORT_VCARD' => 'Create From vCard', 'LNK_NEW_ACCOUNT' => 'Create Account', diff --git a/modules/Prospects/metadata/SearchFields.php b/modules/Prospects/metadata/SearchFields.php index 89e6a622..4e302eb2 100644 --- a/modules/Prospects/metadata/SearchFields.php +++ b/modules/Prospects/metadata/SearchFields.php @@ -58,13 +58,6 @@ $searchFields['Prospects'] = 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), 'assigned_user_id'=> array('query_type'=>'default'), - //Range Search Support - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - //Range Search Support + ); ?> diff --git a/modules/Prospects/metadata/additionalDetails.php b/modules/Prospects/metadata/additionalDetails.php index 372da3a1..cb5292a1 100644 --- a/modules/Prospects/metadata/additionalDetails.php +++ b/modules/Prospects/metadata/additionalDetails.php @@ -59,9 +59,9 @@ function additionalDetailsProspect($fields) { if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '
    '; if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '
    ') == strlen($overlib_string) - 4)) $overlib_string .= '
    '; - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= ''. $mod_strings['LBL_MOBILE_PHONE'] . ' ' . $fields['PHONE_MOBILE'] . '
    '; - if(!empty($fields['PHONE_HOME'])) $overlib_string .= ''. $mod_strings['LBL_HOME_PHONE'] . ' ' . $fields['PHONE_HOME'] . '
    '; - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= ''. $mod_strings['LBL_OTHER_PHONE'] . ' ' . $fields['PHONE_OTHER'] . '
    '; + if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= ''. $mod_strings['LBL_MOBILE_PHONE'] . ' ' . $fields['PHONE_MOBILE'] . '
    '; + if(!empty($fields['PHONE_HOME'])) $overlib_string .= ''. $mod_strings['LBL_HOME_PHONE'] . ' ' . $fields['PHONE_HOME'] . '
    '; + if(!empty($fields['PHONE_OTHER'])) $overlib_string .= ''. $mod_strings['LBL_OTHER_PHONE'] . ' ' . $fields['PHONE_OTHER'] . '
    '; if(!empty($fields['EMAIL1'])) $overlib_string .= ''. $mod_strings['LBL_EMAIL_ADDRESS'] . ' ' . diff --git a/modules/Prospects/metadata/detailviewdefs.php b/modules/Prospects/metadata/detailviewdefs.php index de2cc2e9..f10bab7d 100644 --- a/modules/Prospects/metadata/detailviewdefs.php +++ b/modules/Prospects/metadata/detailviewdefs.php @@ -51,10 +51,10 @@ $viewdefs['Prospects']['DetailView'] = array( 'panels' =>array ( 'lbl_prospect_information' => array( array ( - array ( - 'name'=>'full_name', + 'full_name', + + ), - ), array ( 'title', @@ -70,9 +70,7 @@ $viewdefs['Prospects']['DetailView'] = array( ), array ( - array ( - 'name' => 'account_name', - ), + 'account_name', 'phone_fax', ), diff --git a/modules/Prospects/metadata/listviewdefs.php b/modules/Prospects/metadata/listviewdefs.php index bd502d26..27c0c201 100644 --- a/modules/Prospects/metadata/listviewdefs.php +++ b/modules/Prospects/metadata/listviewdefs.php @@ -40,7 +40,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $listViewDefs['Prospects'] = array( 'FULL_NAME' => array( - 'width' => '20', + 'width' => '25', 'label' => 'LBL_LIST_NAME', 'link' => true, 'related_fields' => array('first_name', 'last_name'), @@ -61,12 +61,6 @@ $listViewDefs['Prospects'] = array( 'width' => '10', 'label' => 'LBL_LIST_PHONE', 'link' => false, - 'default' => true), - 'DATE_ENTERED' => array ( - 'type' => 'datetime', - 'label' => 'LBL_DATE_ENTERED', - 'width' => '10', - 'default' => true, - ), + 'default' => true), ); ?> diff --git a/modules/Prospects/vardefs.php b/modules/Prospects/vardefs.php index 330d7514..e5ced091 100644 --- a/modules/Prospects/vardefs.php +++ b/modules/Prospects/vardefs.php @@ -38,7 +38,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $dictionary['Prospect'] = array( 'table' => 'prospects', - 'unified_search' => true, 'fields' => array ( 'tracker_key' => array ( 'name' => 'tracker_key', diff --git a/modules/Prospects/views/view.list.php b/modules/Prospects/views/view.list.php deleted file mode 100644 index ab03800a..00000000 --- a/modules/Prospects/views/view.list.php +++ /dev/null @@ -1,48 +0,0 @@ -lv->targetList = true; - } -} diff --git a/modules/Releases/index.php b/modules/Releases/index.php index dbc0924a..05211608 100644 --- a/modules/Releases/index.php +++ b/modules/Releases/index.php @@ -53,7 +53,7 @@ if((!is_admin($GLOBALS['current_user']) && (!is_admin_for_module($GLOBALS['curre } $focus = new Release(); -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_TITLE']), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_TITLE'], true); $is_edit = false; if(!empty($_REQUEST['record'])) { $result = $focus->retrieve($_REQUEST['record']); diff --git a/modules/Roles/DetailView.php b/modules/Roles/DetailView.php index d4d601a9..21ac3357 100644 --- a/modules/Roles/DetailView.php +++ b/modules/Roles/DetailView.php @@ -70,7 +70,7 @@ if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) { } else { header("Location: index.php?module=Accounts&action=index"); } -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->get_summary_text()), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME']. ": " . $focus->get_summary_text(), true); $GLOBALS['log']->info("Role detail view"); diff --git a/modules/Roles/EditView.php b/modules/Roles/EditView.php index b808cc11..e7a9d55f 100644 --- a/modules/Roles/EditView.php +++ b/modules/Roles/EditView.php @@ -67,7 +67,7 @@ global $theme; $GLOBALS['log']->info("Role Edit View"); -echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$focus->name), true); +echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true); $xtpl=new XTemplate ('modules/Roles/EditView.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); diff --git a/modules/SavedSearch/ListView.php b/modules/SavedSearch/ListView.php index a7ecc17f..93860bf8 100644 --- a/modules/SavedSearch/ListView.php +++ b/modules/SavedSearch/ListView.php @@ -51,7 +51,7 @@ require_once('include/ListView/ListViewSmarty.php'); global $app_strings, $app_list_strings, $current_language, $currentModule, $mod_strings; -echo getClassicModuleTitle('SavedSearch', array($mod_strings['LBL_MODULE_TITLE']), false); +echo get_module_title('SavedSearch', $mod_strings['LBL_MODULE_TITLE'], false); echo get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false); $search_form = new XTemplate ('modules/SavedSearch/SearchForm.html'); diff --git a/modules/SavedSearch/SavedSearch.php b/modules/SavedSearch/SavedSearch.php index 8afd59bf..ca0b55cc 100644 --- a/modules/SavedSearch/SavedSearch.php +++ b/modules/SavedSearch/SavedSearch.php @@ -252,10 +252,10 @@ class SavedSearch extends SugarBean { header("Location: index.php?action=index&module={$_REQUEST['search_module']}&advanced={$_REQUEST['advanced']}&query=true&clear_query=true"); } - function handleSave($prefix, $redirect = true, $useRequired = false, $id = null, $searchModuleBean) { - - global $current_user, $timedate; + function handleSave($prefix, $redirect = true, $useRequired = false, $id = null) { + + global $current_user; $focus = new SavedSearch(); if($id) $focus->retrieve($id); @@ -269,57 +269,9 @@ class SavedSearch extends SugarBean { if($id == null) $focus->name = $contents['saved_search_name']; $focus->search_module = $contents['search_module']; - foreach($contents as $input=>$value) - { - if(in_array($input, $ignored_inputs)) - { - unset($contents[$input]); - continue; - } - - //Filter date fields to ensure it is saved to DB format, but also avoid empty values - if(!empty($value) && preg_match('/^(start_range_|end_range_|range_)?(.*?)(_advanced|_basic)$/', $input, $match)) - { - $field = $match[2]; - if(isset($searchModuleBean->field_defs[$field]['type'])) - { - $type = $searchModuleBean->field_defs[$field]['type']; - - //Avoid macro values for the date types - if(($type == 'date' || $type == 'datetime' || $type == 'datetimecombo') && !preg_match('/^\[.*?\]$/', $value)) - { - $db_format = $timedate->to_db_date($value, false); - $contents[$input] = $db_format; - } else if ($type == 'int' || $type == 'currency' || $type == 'decimal' || $type == 'float') { - - if(preg_match('/[^\d]/', $value)) { - require_once('modules/Currencies/Currency.php'); - $contents[$input] = unformat_number($value); - //Flag this value as having been unformatted - $contents[$input . '_unformatted_number'] = true; - //If the type is of currency and there was a currency symbol (non-digit), save the symbol - if($type == 'currency' && preg_match('/^([^\d])/', $value, $match)) - { - $contents[$input . '_currency_symbol'] = $match[1]; - } - } else { - //unset any flags - if(isset($contents[$input . '_unformatted_number'])) - { - unset($contents[$input . '_unformatted_number']); - } - - if(isset($contents[$input . '_currency_symbol'])) - { - unset($contents[$input . '_currency_symbol']); - } - } - } - } - } - + foreach($contents as $input => $value) { + if(in_array($input, $ignored_inputs)) unset($contents[$input]); } - $contents['advanced'] = true; $focus->contents = base64_encode(serialize($contents)); @@ -333,10 +285,7 @@ class SavedSearch extends SugarBean { $orderBy = empty($contents['orderBy'])? 'name' : $contents['orderBy']; $search_query = "&orderBy=" . $orderBy . "&sortOrder=".$contents['sortOrder'] . "&query=" . $_REQUEST['query'] . "&searchFormTab=" . $_REQUEST['searchFormTab'].'&showSSDIV=' . $contents['showSSDIV']; - if($redirect) - { - $this->handleRedirect($focus->search_module, $search_query, $saved_search_id, 'true'); - } + $this->handleRedirect($focus->search_module, $search_query, $saved_search_id, 'true'); } function handleRedirect($return_module, $search_query, $saved_search_id, $advanced = 'false') { @@ -362,43 +311,13 @@ class SavedSearch extends SugarBean { } function populateRequest(){ - - global $timedate; - - if(isset($this->contents['search_module'])) - { - $searchModuleBean = loadBean($this->contents['search_module']); - } - foreach($this->contents as $key=>$val){ - if($key != 'advanced' && $key != 'module' && !strpos($key, '_ORDER_BY') && $key != 'lvso') { - if(isset($searchModuleBean) && !empty($val) && preg_match('/^(start_range_|end_range_|range_)?(.*?)(_advanced|_basic)$/', $key, $match)) - { - $field = $match[2]; - if(isset($searchModuleBean->field_defs[$field]['type'])) - { - $type = $searchModuleBean->field_defs[$field]['type']; - - //Avoid macro values for the date types - if(($type == 'date' || $type == 'datetime' || $type == 'datetimecombo') && preg_match('/^\d{4}-\d{2}-\d{2}$/', $val) && !preg_match('/^\[.*?\]$/', $val)) - { - $val = $timedate->to_display_date($val, false); - } else if (($type == 'int' || $type == 'currency' || $type == 'decimal' || $type == 'float') && isset($this->contents[$key . '_unformatted_number']) && preg_match('/^\d+$/', $val)) { - require_once('modules/Currencies/Currency.php'); - $val = format_number($val); - if($type == 'currency' && isset($this->contents[$key . '_currency_symbol'])) - { - $val = $this->contents[$key . '_currency_symbol'] . $val; - } - } - } - } - + // todo wp: remove this + if($key != 'advanced' && $key != 'module' && !strpos($key, '_ORDER_BY') && $key != 'lvso') { // cn: bug 6546 storequery stomps correct value for 'module' in Activities $_REQUEST[$key] = $val; $_GET[$key] = $val; } } - } } diff --git a/modules/SavedSearch/SavedSearchForm.tpl b/modules/SavedSearch/SavedSearchForm.tpl index 2d6f9751..ac3bac80 100644 --- a/modules/SavedSearch/SavedSearchForm.tpl +++ b/modules/SavedSearch/SavedSearchForm.tpl @@ -60,10 +60,8 @@ {sugar_translate label='LBL_DIRECTION' module='SavedSearch'}
    -
     {$MOD.LBL_DESCENDING}
    - -
     {$MOD.LBL_ASCENDING} -
    + {$MOD.LBL_DESCENDING}
    + {$MOD.LBL_ASCENDING}
    - {MOD.LBL_CRONTAB_EXAMPLES} {MOD.LBL_CRONTAB_SERVER_TIME_PRE} {SERVER_TIMEZONE} {SERVER_OFFSET} {MOD.LBL_CRONTAB_SERVER_TIME_POST} - + {MOD.LBL_CRONTAB_EXAMPLES} +
    diff --git a/modules/Schedulers/EditView.php b/modules/Schedulers/EditView.php index 878a8f09..64043cc4 100644 --- a/modules/Schedulers/EditView.php +++ b/modules/Schedulers/EditView.php @@ -93,6 +93,7 @@ $javascript->setSugarBean($focus); $javascript->setFormName('EditView'); $javascript->addAllFields(''); $javascript->addFieldGeneric('mins', 'alpha', 'Mins', true, $prefix=''); +$javascript->addFieldGeneric('hours', 'alpha', 'Hours', true, $prefix=''); $javascript->addFieldGeneric('day_of_month', 'alpha', 'Days of Month', true, $prefix=''); $javascript->addFieldGeneric('months', 'alpha', 'Months', true, $prefix=''); $javascript->addFieldGeneric('day_of_week', 'alpha', 'Days of Week', true, $prefix=''); @@ -111,7 +112,7 @@ if(!empty($dtStart)) { $time_start = $exStart[1]; } else { $prefDate = $current_user->getUserDateTimePreferences(); - $date_start = $timedate->asUserDate($timedate->fromString('2005-01-01')); + $date_start = date($prefDate['date'], strtotime('2005-01-01')); $time_start = ''; } @@ -339,11 +340,8 @@ $xtpl->assign('MONTHS', $exInterval[3]); $xtpl->assign('DAY_OF_WEEK', $exInterval[4]); $xtpl->assign('ROLLOVER', $email->rolloverStyle); -$xtpl->assign('SERVER_TIMEZONE', date("T")); -$xtpl->assign('SERVER_OFFSET', date("O")); - $xtpl->parse("main"); $xtpl->out("main"); //$focus->displayCronInstructions(); -?> +?> \ No newline at end of file diff --git a/modules/Schedulers/JobThread.php b/modules/Schedulers/JobThread.php index eeaea3f3..0dd80a4e 100644 --- a/modules/Schedulers/JobThread.php +++ b/modules/Schedulers/JobThread.php @@ -59,7 +59,7 @@ if(!empty($_REQUEST['job_id'])) { $this->db->query($qLastRun); $job = new Job(); - $job->runtime = TimeDate::getInstance()->nowDb(); + $job->runtime = gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('now')); if($job->startJob($job_id)) { $GLOBALS['log']->info('----->Job [ '.$job_id.' ] was fired successfully'); } else { diff --git a/modules/Schedulers/Scheduler.php b/modules/Schedulers/Scheduler.php index 5077b193..4581001d 100644 --- a/modules/Schedulers/Scheduler.php +++ b/modules/Schedulers/Scheduler.php @@ -40,6 +40,11 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * Description: ********************************************************************************/ + + + + + class Scheduler extends SugarBean { // table columns var $id; @@ -87,7 +92,7 @@ class Scheduler extends SugarBean { parent::SugarBean(); if($init) { - + $user = new User(); $user->retrieve('1'); // Scheduler jobs run as Admin $this->user = $user; @@ -109,16 +114,16 @@ class Scheduler extends SugarBean { $exJob = explode('::', $this->job); if(is_array($exJob)) { // instantiate a new SchedulersJob object and prep it - - + + $trackerManager = TrackerManager::getInstance(); - $trackerManager->pause(); + $trackerManager->pause(); $job = new SchedulersJob(); $job->scheduler_id = $this->id; - $job->scheduler = $this; + $job->scheduler =& $this; $job->execute_time = $job->handleDateFormat('now'); $jobId = $job->save(); - $trackerManager->unPause(); + $trackerManager->unPause(); $job->retrieve($jobId); if($exJob[0] == 'function') { @@ -169,7 +174,7 @@ class Scheduler extends SugarBean { $GLOBALS['log']->debug('-----> Scheduler flushing dead jobs'); $lowerLimit = mktime(0, 0, 0, 1, 1, 2005); // jan 01, 2005, GMT-0 - $now = TimeDate::getInstance()->getNow()->ts; // current timestamp + $now = strtotime(gmdate('Y-m-d H:i:s', strtotime('now'))); // this garbage to make sure we're getting comprable data to the DB output $q = " SELECT s.id, s.name FROM schedulers s WHERE s.deleted=0 AND s.status = 'In Progress'"; $r = $this->db->query($q); @@ -218,9 +223,9 @@ class Scheduler extends SugarBean { return false; } - $now = TimeDate::getInstance()->getNow(); - $now = $now->setTime($now->hour, $now->min)->asDb(); + $now = gmdate('Y-m-d H:i', strtotime('now')); $validTimes = $this->deriveDBDateTimes($this); + //_pp('now: '.$now); _pp($validTimes); if(is_array($validTimes) && in_array($now, $validTimes)) { $GLOBALS['log']->debug('----->Scheduler found valid job ('.$this->name.') for time GMT('.$now.')'); @@ -230,6 +235,103 @@ class Scheduler extends SugarBean { return false; } } + + + + + + + + + /** + * Checks if any jobs qualify to run at this moment + */ + function checkPendingJobs2() { + $this->cleanJobLog(); + $allSchedulers = $this->get_full_list('', 'schedulers.status=\'Active\''); + + + if(!empty($allSchedulers)) { + + // cURL inits + $ch = curl_init(); +//// curl_setopt($ch, CURLOPT_FAILONERROR, true); // silent failure (code >300); +//// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); // do not follow location(); inits - we always use the current +//// curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); +//// curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false); // not thread-safe +// curl_setopt($ch, CURLOPT_TIMEOUT, 5); // never times out - bad idea? +// curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // 5 secs for connect timeout +// curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); // open brand new conn +//// curl_setopt($ch, CURLOPT_NOPROGRESS, true); // do not have progress bar +//// curl_setopt($ch, CURLOPT_PORT, $_SERVER['SERVER_PORT']); // set port as reported by Server +//// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // most customers will not have Certificate Authority account +//// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // most customers will not have Certificate Authority account +// if(constant('PHP_VERSION') > '5.0.0') { +//// curl_setopt($ch, CURLOPT_NOSIGNAL, true); // ignore any cURL signals to PHP (for multi-threading) +// } +// /* play with these options */ +//// curl_setopt($ch, CURLOPT_HEADER, false); // do not return header info with result +//// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return into a variable to continue program execution +// +// +// foreach($allSchedulers as $focus) { +// if($focus->fireQualified()) { +// $GLOBALS['log']->debug('---------------------- GOT A JOB FOR CURL -----------'); +// curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1/headdev/cronJob.php?id='.$focus->id); // set url +// } +// } + curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1/headdev/cronJob.php?id=82a9421a-9c60-111b-7212-4412394279e4'); // set url + curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1/headdev/cronJob.php?id=82a9421a-9c60-111b-7212-4412394279e4'); + + $result = curl_exec($ch); + $cInfo = curl_getinfo($ch);/* url,content_type,header_size,request_size,filetime,http_code,ssl_verify_result,total_time,namelookup_time,connect_time,pretransfer_time,size_upload,size_download,speed_download,speed_upload,download_content_length,upload_content_length,starttransfer_time,redirect_time */ + curl_close($ch); + + if($cInfo['http_code'] < 400) { + $GLOBALS['log']->debug('----->Firing was successful: ('.$focus->id.') at'); + $GLOBALS['log']->debug('----->WTIH RESULT: '.strip_tags($result).' AND '.strip_tags(print_r($cInfo))); + return true; + } else { + $GLOBALS['log']->fatal('Job errored: ('.$focus->id.')'); + return false; + } + + + + } else { + $GLOBALS['log']->debug('----->No Schedulers found'); + } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /** * Checks if any jobs qualify to run at this moment @@ -267,7 +369,6 @@ class Scheduler extends SugarBean { * @return false If we the Scheduler is not in scope, return false. */ function deriveDBDateTimes($focus) { - global $timedate; $GLOBALS['log']->debug('----->Schedulers->deriveDBDateTimes() got an object of type: '.$focus->object_name); /* [min][hr][dates][mon][days] */ $dateTimes = array(); @@ -277,7 +378,7 @@ class Scheduler extends SugarBean { $dates = $ints[2]; $hrs = $ints[1]; $mins = $ints[0]; - $today = getdate(TimeDate::getInstance()->getNow()->ts); + $today = getdate(gmmktime()); // derive day part if($days == '*') { @@ -324,7 +425,7 @@ class Scheduler extends SugarBean { $GLOBALS['log']->debug('----->got * months'); } elseif(strstr($mons, '*/')) { $mult = str_replace('*/','',$mons); - $startMon = $timedate->fromDb(date_time_start)->month; + $startMon = date('m', strtotime($focus->date_time_start)); $startFrom = ($startMon % $mult); for($i=$startFrom;$i<=12;$i+$mult) { @@ -368,7 +469,7 @@ class Scheduler extends SugarBean { $GLOBALS['log']->debug('----->got * dates'); } elseif(strstr($dates, '*/')) { $mult = str_replace('*/','',$dates); - $startDate = $timedate->fromDb($focus->date_time_start)->day; + $startDate = date('d', strtotime($focus->date_time_start)); $startFrom = ($startDate % $mult); for($i=$startFrom; $i<=31; $i+$mult) { @@ -446,7 +547,7 @@ class Scheduler extends SugarBean { //_pp($hrName); // derive minutes //$currentMin = date('i'); - $currentMin = $timedate->getNow()->minute; + $currentMin = date('i', strtotime($this->date_time_start)); if(substr($currentMin, 0, 1) == '0') { $currentMin = substr($currentMin, 1, 1); } @@ -461,7 +562,7 @@ class Scheduler extends SugarBean { } } elseif(strstr($mins,'*/')) { $mult = str_replace('*/','',$mins); - $startMin = $timedate->fromDb($focus->date_time_start)->minute; + $startMin = date('i',strtotime($focus->date_time_start)); $startFrom = ($startMin % $mult); for($i=$startFrom; $i<=59; $i) { if(($currentMin + $i) > 59) { @@ -525,13 +626,13 @@ class Scheduler extends SugarBean { if(!empty($focus->date_time_end)) { // do the same for date_time_end if not empty $dateTimeEnd = $focus->date_time_end; } else { - $dateTimeEnd = $timedate->getNow()+get('+1 day')->asDb(); + $dateTimeEnd = gmdate('Y-m-d H:i:s', strtotime('+1 day')); // $dateTimeEnd = '2020-12-31 23:59:59'; // if empty, set it to something ridiculous } $timeEndTs = strtotime($dateTimeEnd.' UTC'); // GMT end timestamp if necessary $timeEndTs++; /*_pp('hours:'); _pp($hrName);_pp('mins:'); _pp($minName);*/ - $nowTs = $timedate->getNow()->ts; + $nowTs = mktime(); // _pp('currentHour: '. $currentHour); // _pp('timeStartTs: '.date('r',$timeStartTs)); @@ -550,9 +651,9 @@ class Scheduler extends SugarBean { $hourSeen++; foreach($minName as $kMin=>$min) { if($hourSeen == 25) { - $theDate = TimeDate::getInstance()->asDbDate(TimeDate::getInstance()->getNow()->get('+1 day')); + $theDate = date('Y-m-d', strtotime('+1 day')); } else { - $theDate = TimeDate::getInstance()->nowDbDate(); + $theDate = date('Y-m-d'); } $tsGmt = strtotime($theDate.' '.str_pad($hr,2,'0',STR_PAD_LEFT).":".str_pad($min,2,'0',STR_PAD_LEFT).":00"); // this is LOCAL @@ -562,9 +663,9 @@ class Scheduler extends SugarBean { if($tsGmt > $lastRunTs) { // start from last run, last run should not be included if( $tsGmt <= $timeEndTs ) { // this is taken care of by the initial query - start is less than the date spec'd by admin if( $tsGmt <= $timeToTs ) { // start is less than the time_to - $validJobTime[] = $timedate->asDb($timedate->fromTimestamp($tsGmt)); + $validJobTime[] = gmdate('Y-m-d H:i', $tsGmt); } else { - //_pp('Job Time is NOT smaller that TimeTO: '.$tsGmt .'<='. $timeToTs); + //_pp('Job Time is NOT smaller that TimeTO: '.$tsGmt .'<='. $timeToTs); } } else { //_pp('Job Time is NOT smaller that DateTimeEnd: '.date('Y-m-d H:i:s',$tsGmt) .'<='. $dateTimeEnd); //_pp( $tsGmt .'<='. $timeEndTs ); @@ -587,14 +688,14 @@ class Scheduler extends SugarBean { if($focus->catch_up == 1) { if($focus->last_run == null) { // always "catch-up" - $validJobTime[] = $timedate->nowDb(); + $validJobTime[] = gmdate('Y-m-d H:i', strtotime('now')); } else { // determine what the interval in min/hours is // see if last_run is in it // if not, add NOW - $now = $timedate->nowDb(); + $now = gmdate('Y-m-d H:i', strtotime('now')); if(!empty($validJobTime) && ($focus->last_run < $validJobTime[0]) && ($now > $validJobTime[0])) { - // cn: empty() bug 5914; + // cn: empty() bug 5914; //if(!empty) should be checked, becasue if a scheduler is defined to run every day 4pm, then after 4pm, and it runs as 4pm, the $validJobTime will be empty, and it should not catch up //if $focus->last_run is the the day before yesterday, it should run yesterday and tomorrow, but it hadn't run yesterday, then it should catch up today. But today is already filtered out when doing date check before. The catch up will not work on this occasion. If the scheduler runs at least one time on each day, I think this bug can be avoided. $validJobTime[] = $now; @@ -781,7 +882,7 @@ class Scheduler extends SugarBean { * soft-deletes all job logs older than 24 hours */ function cleanJobLog() { - $this->db->query('DELETE FROM schedulers_times WHERE date_entered < '.db_convert('\''.TimeDate::getInstance()->nowDb(), strtotime('-24 hours')).'\'', 'datetime'.''); + $this->db->query('DELETE FROM schedulers_times WHERE date_entered < '.db_convert('\''.gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('-24 hours')).'\'', 'datetime').''); } /** diff --git a/modules/Schedulers/SchedulerDaemon.php b/modules/Schedulers/SchedulerDaemon.php index 8e53380b..bc8db859 100644 --- a/modules/Schedulers/SchedulerDaemon.php +++ b/modules/Schedulers/SchedulerDaemon.php @@ -89,17 +89,16 @@ class SchedulerDaemon extends Scheduler { */ function checkPendingJobs() { global $sugar_config; - global $timedate; + global $current_user; $GLOBALS['log']->debug(''); $GLOBALS['log']->debug('----->Scheduler checking for qualified jobs to run.'); if(empty($this->db)) { $this->db = DBManagerFactory::getInstance(); } + $fireTimeMinus = gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('now -1 min')); + $fireTimePlus = gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('now +1 min')); - $fireTimeMinus = $timedate->asDb($timedate->getNow()->get('-1 minute')); - $fireTimePlus = $timedate->asDb($timedate->getNow()->get('+1 minute')); - // collapse list of schedulers where "catch_up" is 0 and status is "ready" (not "in progress, completed, etc."); if($sugar_config['dbconfig']['db_type'] == 'oci8') { } else { @@ -143,7 +142,6 @@ class SchedulerDaemon extends Scheduler { * @return false If we the Scheduler is not in scope, return false. */ function deriveDBDateTimes($focus) { - global $timedate; $GLOBALS['log']->debug('deriveDBDateTimes got an object of type: '.$focus->object_name); /* [min][hr][dates][mon][days] */ $dateTimes = array(); @@ -153,8 +151,7 @@ class SchedulerDaemon extends Scheduler { $dates = $ints[2]; $hrs = $ints[1]; $mins = $ints[0]; - $today = getdate($timedate->getNow()->ts); - + $today = getdate(gmmktime()); // derive day part if($days == '*') { @@ -201,7 +198,7 @@ class SchedulerDaemon extends Scheduler { $GLOBALS['log']->debug('got * months'); } elseif(strstr($mons, '*/')) { $mult = str_replace('*/','',$mons); - $startMon = $timedate->fromTimestamp($focus->date_time_start)->month; + $startMon = date(strtotime('m',$focus->date_time_start)); $startFrom = ($startMon % $mult); for($i=$startFrom;$i<=12;$i+$mult) { @@ -245,7 +242,7 @@ class SchedulerDaemon extends Scheduler { $GLOBALS['log']->debug('got * dates'); } elseif(strstr($dates, '*/')) { $mult = str_replace('*/','',$dates); - $startDate = $timedate->fromTimestamp($focus->date_time_start)->day; + $startDate = date('d', strtotime($focus->date_time_start)); $startFrom = ($startDate % $mult); for($i=$startFrom; $i<=31; $i+$mult) { @@ -287,7 +284,7 @@ class SchedulerDaemon extends Scheduler { // derive hours part //$startHour = date('G', strtotime($focus->date_time_start)); //$currentHour = ($startHour < 1) ? 23 : date('G', strtotime($focus->date_time_start)); - $currentHour = $timedate->getNow()->hour; + $currentHour = date('G'); if($hrs == '*') { $GLOBALS['log']->debug('got * hours'); for($i=0;$i<=24; $i++) { @@ -330,7 +327,7 @@ class SchedulerDaemon extends Scheduler { } } // derive minutes - $currentMin = $timedate->getNow()->minute; + $currentMin = date('i'); if(substr($currentMin, 0, 1) == '0') { $currentMin = substr($currentMin, 1, 1); } @@ -345,7 +342,7 @@ class SchedulerDaemon extends Scheduler { } } elseif(strstr($mins,'*/')) { $mult = str_replace('*/','',$mins); - $startMin = $timedate->fromTimestmp($focus->date_time_start)->minute; + $startMin = date('i',strtotime($focus->date_time_start)); $startFrom = ($startMin % $mult); for($i=$startFrom; $i<=59; $i+$mult) { @@ -412,13 +409,13 @@ class SchedulerDaemon extends Scheduler { $dte2 = $timedate->to_db_date_time($dte[0],$dte[1]); $dateTimeEnd = $dte2[0]." ".$dte2[1]; } else { - $dateTimeEnd = $timedate->getNow()->get('+1 day')->asDb(); + $dateTimeEnd = date('Y-m-d H:i:s', strtotime('+1 day')); // $dateTimeEnd = '2020-12-31 23:59:59'; // if empty, set it to something ridiculous } $timeEndTs = strtotime($dateTimeEnd); // GMT end timestamp if necessary $timeEndTs++; /*_pp('hours:'); _pp($hrName);_pp('mins:'); _pp($minName);*/ - $nowTs = $timedate->getNow()->ts; + $nowTs = mktime(); // _pp('currentHour: '. $currentHour); // _pp('timeStartTs: '.date('r',$timeStartTs)); @@ -437,10 +434,11 @@ class SchedulerDaemon extends Scheduler { $hourSeen++; foreach($minName as $kMin=>$min) { if($hr < $currentHour || $hourSeen == 25) { - $theDate = $timedate->asDbDate($timedate->getNow()->get('+1 day')); + $theDate = date('Y-m-d', strtotime('+1 day')); } else { - $theDate = $timedate->nowDbDate(); + $theDate = date('Y-m-d'); } + $tsGmt = strtotime($theDate.' '.str_pad($hr,2,'0',STR_PAD_LEFT).":".str_pad($min,2,'0',STR_PAD_LEFT).":00"); // this is LOCAL // _pp(date('Y-m-d H:i:s',$tsGmt)); @@ -450,7 +448,8 @@ class SchedulerDaemon extends Scheduler { if( $tsGmt <= $timeToTs ) { // start is less than the time_to if( $tsGmt >= $nowTs ) { // we only want to add jobs that are in the future if( $tsGmt > $lastRunTs ) { //TODO figure if this is better than the above check - $validJobTime[] = $timedate->fromTimestamp($tsGmt)->asDb(); //_pp("Job Qualified for: ".date('Y-m-d H:i:s', $tsGmt)); + $validJobTime[] = gmdate('Y-m-d H:i:s', $tsGmt); + //_pp("Job Qualified for: ".date('Y-m-d H:i:s', $tsGmt)); } else { //_pp('Job Time is NOT greater than Last Run'); } @@ -493,8 +492,8 @@ class SchedulerDaemon extends Scheduler { VALUES ( '".$guid."', 0, - ".db_convert("'".TimeDate::getInstance()->nowDb()."'", 'datetime').", - ".db_convert("'".TimeDate::getInstance()->nowDb()."'", 'datetime').", + ".db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'", 'datetime').", + ".db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'", 'datetime').", '".$jobsArr['ids'][$k]."', ".db_convert("'".$time."'", 'datetime').", 'ready' @@ -545,8 +544,8 @@ class SchedulerDaemon extends Scheduler { "FROM schedulers " . "WHERE deleted=0 " . "AND status = 'Active' " . - "AND date_time_start < ".db_convert("'".TimeDate::getInstance()->nowDb()."'",'datetime')." " . - "AND (date_time_end > ".db_convert("'".TimeDate::getInstance()->nowDb()."'",'datetime')." OR date_time_end IS NULL)"; + "AND date_time_start < ".db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'",'datetime')." " . + "AND (date_time_end > ".db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format())."'",'datetime')." OR date_time_end IS NULL)"; $result = $this->db->query($query); $rows=0; diff --git a/modules/Schedulers/_AddJobsHere.php b/modules/Schedulers/_AddJobsHere.php index 55498b18..79bee37a 100644 --- a/modules/Schedulers/_AddJobsHere.php +++ b/modules/Schedulers/_AddJobsHere.php @@ -348,7 +348,7 @@ function pruneDatabase() { function trimTracker() { - global $sugar_config, $timedate; + global $sugar_config; $GLOBALS['log']->info('----->Scheduler fired job of type trimTracker()'); $db = DBManagerFactory::getInstance(); @@ -366,7 +366,7 @@ function trimTracker() continue; } - $timeStamp = db_convert("'". $timedate->asDb($timedate->getNow()->get("+"+$prune_interval+" days")) ."'" ,"datetime"); + $timeStamp = db_convert("'".gmdate($GLOBALS['timedate']->get_db_date_time_format(),time()+(86400 * -$prune_interval))."'" ,"datetime"); if($tableName == 'tracker_sessions') { $query = "DELETE FROM $tableName WHERE date_end < $timeStamp"; } else { diff --git a/modules/Schedulers/index.php b/modules/Schedulers/index.php index 1eff4779..e968b236 100644 --- a/modules/Schedulers/index.php +++ b/modules/Schedulers/index.php @@ -43,6 +43,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); if(!$current_user->is_admin) { sugar_die('You must have administrative access to proceed.'); } -echo getClassicModuleTitle($mod_strings['LBL_MODULE_TITLE'], array($mod_strings['LBL_MODULE_TITLE']), true); +echo get_module_title($mod_strings['LBL_MODULE_TITLE'], $mod_strings['LBL_MODULE_TITLE'], true); require_once('modules/Schedulers/ListView.php'); ?> diff --git a/modules/Schedulers/language/en_us.lang.php b/modules/Schedulers/language/en_us.lang.php index 46c3e461..5517938f 100644 --- a/modules/Schedulers/language/en_us.lang.php +++ b/modules/Schedulers/language/en_us.lang.php @@ -97,8 +97,6 @@ $mod_strings = array ( 'LBL_MONTHS' => 'mo', 'LBL_DAY_OF_WEEK' => 'day', 'LBL_CRONTAB_EXAMPLES' => 'The above uses standard crontab notation.', -'LBL_CRONTAB_SERVER_TIME_PRE' => 'The cron specifications run based on the server timezone (', -'LBL_CRONTAB_SERVER_TIME_POST' => '). Please specify the scheduler execution time accordingly.', // Labels 'LBL_ALWAYS' => 'Always', 'LBL_CATCH_UP' => 'Execute If Missed', diff --git a/modules/SchedulersJobs/SchedulersJob.php b/modules/SchedulersJobs/SchedulersJob.php index 1dbc4cda..9cff6232 100644 --- a/modules/SchedulersJobs/SchedulersJob.php +++ b/modules/SchedulersJobs/SchedulersJob.php @@ -59,30 +59,30 @@ class SchedulersJob extends SugarBean { // object specific attributes var $user; // User object var $scheduler; // Scheduler parent - + /** * Sole constructor. */ function SchedulersJob($init=true) { parent::SugarBean(); - + if($init) { - + $user = new User(); $user->retrieve('1'); // Scheduler jobs run as Admin $this->user = $user; } } - + /////////////////////////////////////////////////////////////////////////// //// SCHEDULERSJOB HELPER FUNCTIONS function fireSelf($id) { - + $sched = new Scheduler(); $sched->retrieve($id); - + $exJob = explode('::', $sched->job); if(is_array($exJob)) { @@ -90,16 +90,16 @@ class SchedulersJob extends SugarBean { $this->scheduler = $sched; $this->execute_time = $this->handleDateFormat('now'); $this->save(); - + if($exJob[0] == 'function') { $GLOBALS['log']->debug('----->Scheduler found a job of type FUNCTION'); require_once('modules/Schedulers/_AddJobsHere.php'); $this->setJobFlag(1); - + $func = $exJob[1]; $GLOBALS['log']->debug('----->SchedulersJob firing '.$func); - + $res = call_user_func($func); if($res) { $this->setJobFlag(2); @@ -113,7 +113,7 @@ class SchedulersJob extends SugarBean { if(function_exists('curl_init')) { $GLOBALS['log']->debug('----->SchedulersJob found a job of type URL'); $this->setJobFlag(1); - + $GLOBALS['log']->debug('----->SchedulersJob firing URL job: '.$exJob[1]); if($this->fireUrl($exJob[1])) { $this->setJobFlag(2); @@ -139,23 +139,27 @@ class SchedulersJob extends SugarBean { * @return string formatted time. */ function handleDateFormat($time, $user=null) { - $timedate = TimeDate::getInstance(); - + global $timedate; + + if(!isset($timedate) || empty($timedate)) { + $timedate = new TimeDate(); + } + // get proper user $user = (empty($user)) ? $this->user : $user; - $dbTime = $timedate->nowDb(); + $dbTime = gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime($time)); $ret = $timedate->to_display_date_time($dbTime, true, true, $user); return $ret; } - + function setJobFlag($flag) { $trackerManager = TrackerManager::getInstance(); - $trackerManager->pause(); + $trackerManager->pause(); $status = array (0 => 'ready', 1 => 'in progress', 2 => 'completed', 3 => 'failed', 4 => 'no curl'); $statusScheduler = array (0 => 'Active', 1 => 'In Progress', 2 => 'Active', 3 => 'Active', 4 => 'Active'); $GLOBALS['log']->info('-----> SchedulersJob setting Job flag: '.$status[$flag].' AND setting Scheduler status to: '.$statusScheduler[$flag]); - + $time = $this->handleDateFormat('now'); $this->status = $status[$flag]; $this->scheduler->retrieve($this->scheduler_id); @@ -165,7 +169,7 @@ class SchedulersJob extends SugarBean { $this->retrieve($this->id); $trackerManager->unPause(); } - + /** * This function takes a job_id, and updates schedulers last_run as well as * soft delete the job instance from schedulers_times @@ -173,15 +177,19 @@ class SchedulersJob extends SugarBean { */ function finishJob() { $trackerManager = TrackerManager::getInstance(); - $trackerManager->pause(); + $trackerManager->pause(); $GLOBALS['log']->debug('----->SchedulersJob updating Job Status and finishing Job execution.'); $this->scheduler->retrieve($this->scheduler->id); - $this->scheduler->last_run = TimeDate::getInstance()->nowDb(); + $this->scheduler->last_run = $this->handleDateFormat('now'); + if($this->scheduler->last_run == gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime('Jan 01 2000 00:00:00'))) { + $this->scheduler->last_run = $this->handleDateFormat('now'); + $GLOBALS['log']->fatal('Scheduler applying bogus date for "Last Run": '.$this->scheduler->last_run); + } $this->scheduler->save(); $trackerManager->unPause(); } - /** + /** * This function takes a passed URL and cURLs it to fake multi-threading with another httpd instance * @param $job String in URI-clean format * @param $timeout Int value in secs for cURL to timeout. 30 default. @@ -190,7 +198,7 @@ class SchedulersJob extends SugarBean { function fireUrl($job, $timeout=30) { // cURL inits $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $job); // set url + curl_setopt($ch, CURLOPT_URL, $job); // set url curl_setopt($ch, CURLOPT_FAILONERROR, true); // silent failure (code >300); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // do not follow location(); inits - we always use the current curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); @@ -201,19 +209,11 @@ class SchedulersJob extends SugarBean { curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); // open brand new conn curl_setopt($ch, CURLOPT_HEADER, true); // do not return header info with result curl_setopt($ch, CURLOPT_NOPROGRESS, true); // do not have progress bar - $urlparts = parse_url($job); - if(empty($urlparts['port'])) { - if($urlparts['scheme'] == 'https'){ - $urlparts['port'] = 443; - } else { - $urlparts['port'] = 80; - } - } - curl_setopt($ch, CURLOPT_PORT, $urlparts['port']); // set port as reported by Server + curl_setopt($ch, CURLOPT_PORT, $_SERVER['SERVER_PORT']); // set port as reported by Server //TODO make the below configurable curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // most customers will not have Certificate Authority account curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // most customers will not have Certificate Authority account - + if(constant('PHP_VERSION') > '5.0.0') { curl_setopt($ch, CURLOPT_NOSIGNAL, true); // ignore any cURL signals to PHP (for multi-threading) } @@ -225,9 +225,9 @@ class SchedulersJob extends SugarBean { //starttransfer_time,redirect_time curl_close($ch); - if($result !== FALSE && $cInfo['http_code'] < 400) { + if($cInfo['http_code'] < 400) { $GLOBALS['log']->debug('----->Firing was successful: ('.$job.') at '.$this->handleDateFormat('now')); - $GLOBALS['log']->debug('----->WTIH RESULT: '.strip_tags($result).' AND '.strip_tags(print_r($cInfo, true))); + $GLOBALS['log']->debug('----->WTIH RESULT: '.strip_tags($result).' AND '.strip_tags(print_r($cInfo))); return true; } else { $GLOBALS['log']->fatal('Job errored: ('.$job.') at '.$this->handleDateFormat('now')); @@ -254,7 +254,7 @@ class SchedulersJob extends SugarBean { } /** method stub for future customization - * + * */ function fill_in_additional_list_fields() { $this->fill_in_additional_detail_fields(); @@ -268,10 +268,10 @@ class SchedulersJob extends SugarBean { // $this->job_name = $row['name']; // $this->job = $row['job']; // $GLOBALS['log']->info('Assigned Name('.$this->job_name.') and Job('.$this->job.') to Job'); -// +// // $this->created_by_name = get_assigned_user_name($this->created_by); // $this->modified_by_name = get_assigned_user_name($this->modified_user_id); - + } /** @@ -286,5 +286,5 @@ class SchedulersJob extends SugarBean { * function overrides the one in SugarBean.php */ -} // end class Job -?> +} // end class Job +?> \ No newline at end of file diff --git a/modules/Studio/DropDowns/DropDownHelper.php b/modules/Studio/DropDowns/DropDownHelper.php index 52bacf07..c915bb4d 100644 --- a/modules/Studio/DropDowns/DropDownHelper.php +++ b/modules/Studio/DropDowns/DropDownHelper.php @@ -156,12 +156,8 @@ class DropDownHelper{ //add the new ones $contents .= "\n\$app_list_strings['$dropdown_name']=" . var_export_helper($dropdown) . ";"; } - - // Bug 40234 - If we have no contents, we don't write the file. Checking for "getDropDownModules(); $smarty = new Sugar_Smarty(); $smarty->assign('MOD', $GLOBALS['mod_strings']); -$title=getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_RENAME_TABS']), false); +$title=get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_RENAME_TABS'], true); $smarty->assign('title', $title); $selected_lang = (!empty($_REQUEST['dropdown_lang'])?$_REQUEST['dropdown_lang']:$_SESSION['authenticated_user_language']); if(empty($selected_lang)){ diff --git a/modules/Studio/TabGroups/EditViewTabs.php b/modules/Studio/TabGroups/EditViewTabs.php index e09f1189..7d381dbd 100644 --- a/modules/Studio/TabGroups/EditViewTabs.php +++ b/modules/Studio/TabGroups/EditViewTabs.php @@ -49,7 +49,7 @@ $smarty = new Sugar_Smarty(); if(empty($GLOBALS['tabStructure'])){ require_once('include/tabConfig.php'); } -$title=getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CONFIGURE_GROUP_TABS']), false); +$title=get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CONFIGURE_GROUP_TABS'], true); #30205 $selectedAppLanguages = return_application_language($tabGroupSelected_lang); diff --git a/modules/Studio/TabGroups/TabGroupHelper.php b/modules/Studio/TabGroups/TabGroupHelper.php index e1cf4ae7..369d9cfc 100644 --- a/modules/Studio/TabGroups/TabGroupHelper.php +++ b/modules/Studio/TabGroups/TabGroupHelper.php @@ -51,6 +51,9 @@ class TabGroupHelper{ foreach($GLOBALS['moduleList'] as $value){ $availableModules[$value] = array('label'=>$specifyLanguageAppListStrings['moduleList'][$value], 'value'=>$value); } + foreach($GLOBALS['modInvisListActivities'] as $value){ + $availableModules[$value] = array('label'=>$specifyLanguageAppListStrings['moduleList'][$value], 'value'=>$value); + } if(should_hide_iframes() && isset($availableModules['iFrames'])) { unset($availableModules['iFrames']); diff --git a/modules/Studio/parsers/StudioParser.php b/modules/Studio/parsers/StudioParser.php index 505802af..b0aa3113 100644 --- a/modules/Studio/parsers/StudioParser.php +++ b/modules/Studio/parsers/StudioParser.php @@ -415,7 +415,9 @@ EOQ; function populateRequestFromBuffer($file) { $results = array (); - $temp = sugar_file_get_contents($file); + $temp = sugar_fopen($file, 'r'); + $buffer = fread($temp, filesize($file)); + fclose($temp); preg_match_all("'name[\ ]*=[\ ]*[\']([^\']*)\''si", $buffer, $results); $res = $results[1]; foreach ($res as $r) { @@ -444,7 +446,9 @@ EOQ; $xtpl = $files[$_SESSION['studio']['selectedFileId']]['php_file']; $originalFile = $files[$_SESSION['studio']['selectedFileId']]['template_file']; $type = StudioParser::getFileType($files[$_SESSION['studio']['selectedFileId']]['type']); - $buffer = sugar_file_get_contents($xtpl); + $xtpl_fp = sugar_fopen($xtpl, 'r'); + $buffer = fread($xtpl_fp, filesize($xtpl)); + fclose($xtpl_fp); $cache_file = create_cache_directory('studio/'.$file); $xtpl_cache = create_cache_directory('studio/'.$xtpl); $module = $this->workingModule; diff --git a/modules/Studio/wizards/StudioWizard.php b/modules/Studio/wizards/StudioWizard.php index 728b41cf..36d669ec 100644 --- a/modules/Studio/wizards/StudioWizard.php +++ b/modules/Studio/wizards/StudioWizard.php @@ -116,7 +116,7 @@ class StudioWizard{ function fetch($error = ''){ global $mod_strings; - echo getClassicModuleTitle($mod_strings['LBL_MODULE_TITLE'], array($mod_strings['LBL_MODULE_TITLE']), false); + echo get_module_title($mod_strings['LBL_MODULE_TITLE'], $mod_strings['LBL_MODULE_TITLE'], true); $sugar_smarty = new Sugar_Smarty(); $sugar_smarty->assign('welcome', $this->welcome()); $sugar_smarty->assign('options', $this->options()); diff --git a/modules/SugarFeed/AdminSettings.php b/modules/SugarFeed/AdminSettings.php index 1cbf588a..58331bdf 100644 --- a/modules/SugarFeed/AdminSettings.php +++ b/modules/SugarFeed/AdminSettings.php @@ -147,7 +147,7 @@ echo getClassicModuleTitle( "".translate('LBL_MODULE_NAME','Administration')."", $mod_strings['LBL_MODULE_NAME'], ), - false + true ); $sugar_smarty->display('modules/SugarFeed/AdminSettings.tpl'); diff --git a/modules/SugarFeed/tpls/AdminSettings.tpl b/modules/SugarFeed/AdminSettings.tpl similarity index 98% rename from modules/SugarFeed/tpls/AdminSettings.tpl rename to modules/SugarFeed/AdminSettings.tpl index 0a9ff1ee..4387fef4 100644 --- a/modules/SugarFeed/tpls/AdminSettings.tpl +++ b/modules/SugarFeed/AdminSettings.tpl @@ -56,10 +56,11 @@ - + diff --git a/modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl b/modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl index 463b122d..d0d26dfa 100644 --- a/modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl +++ b/modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl @@ -42,7 +42,7 @@
    -
    + @@ -50,134 +50,28 @@
    {$mod.LBL_ENABLE_FEED}: +  
    {$mod.LBL_ENABLE_MODULE_LIST}:
    - - + -{if $isRefreshable} - - - -{/if} - - - + - - + - - -
    {$titleLBL} + {$titleLBL}
    - {$autoRefresh} - - -
    {$rowsLBL} + {$rowsLBL}
    {$categoriesLBL} - + {$categoriesLBL} + {html_options name='categories[]' options=$categories selected=$selectedCategories multiple=true size=6}
    -
    -
    -
    - +
    - -{/literal} \ No newline at end of file diff --git a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php index f1ac4206..66aeeb62 100644 --- a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php +++ b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php @@ -35,41 +35,36 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ +/********************************************************************************* + + * Description: Defines the English language pack for the base application. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + ********************************************************************************/ require_once('include/Dashlets/DashletGeneric.php'); -require_once('include/externalAPI/ExternalAPIFactory.php'); -class SugarFeedDashlet extends DashletGeneric { + +class SugarFeedDashlet extends DashletGeneric { var $displayRows = 15; var $categories; -var $userfeed_created; - var $selectedCategories = array(); - function SugarFeedDashlet($id, $def = null) { global $current_user, $app_strings, $app_list_strings; - require('modules/SugarFeed/metadata/dashletviewdefs.php'); $this->myItemsOnly = false; parent::DashletGeneric($id, $def); $this->myItemsOnly = false; $this->isConfigurable = true; $this->hasScript = true; - $pattern = array(); - $pattern[] = "/-/"; - $pattern[] = "/[0-9]/"; - $replacements = array(); - $replacements[] = ''; - $replacements[] = ''; - $this->idjs = preg_replace($pattern,$replacements,$this->id); // Add in some default categories. $this->categories['ALL'] = translate('LBL_ALL','SugarFeed'); // Need to get the rest of the active SugarFeed modules $module_list = SugarFeed::getActiveFeedModules(); - // Translate the category names if ( ! is_array($module_list) ) { $module_list = array(); } foreach ( $module_list as $module ) { @@ -81,18 +76,9 @@ var $selectedCategories = array(); } } - // Need to add the external api's here - $this->externalAPIList = ExternalAPIFactory::getModuleDropDown('SugarFeed',true); - if ( !is_array($this->externalAPIList) ) { $this->externalAPIList = array(); } - foreach ( $this->externalAPIList as $apiObj => $apiName ) { - $this->categories[$apiObj] = $apiName; - } - - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed'); if(!empty($def['rows']))$this->displayRows = $def['rows']; if(!empty($def['categories']))$this->selectedCategories = $def['categories']; - if(!empty($def['userfeed_created'])) $this->userfeed_created = $def['userfeed_created']; $this->searchFields = $dashletData['SugarFeedDashlet']['searchFields']; $this->columns = $dashletData['SugarFeedDashlet']['columns']; $catCount = count($this->categories); @@ -105,10 +91,9 @@ var $selectedCategories = array(); unset($this->selectedCategories[0]); } } - $this->seedBean = new SugarFeed(); } - + function process($lvsParams = array()) { global $current_user; @@ -137,13 +122,11 @@ var $selectedCategories = array(); $this->lvs->displayColumns = $displayColumns; $this->lvs->lvd->setVariableName($this->seedBean->object_name, array()); - + $lvsParams['overrideOrder'] = true; $lvsParams['orderBy'] = 'date_entered'; $lvsParams['sortOrder'] = 'DESC'; - $lvsParams['custom_from'] = ''; - - + // Get the real module list if (empty($this->selectedCategories)){ $mod_list = $this->categories; @@ -151,7 +134,6 @@ var $selectedCategories = array(); $mod_list = array_flip($this->selectedCategories);//27949, here the key of $this->selectedCategories is not module name, the value is module name, so array_flip it. } - $external_modules = array(); $admin_modules = array(); $owner_modules = array(); $regular_modules = array(); @@ -161,9 +143,6 @@ var $selectedCategories = array(); $regular_modules[] = 'UserFeed'; continue; } - if ( in_array($module,$this->externalAPIList) ) { - $external_modules[] = $module; - } if (ACLAction::getUserAccessLevel($current_user->id,$module,'view') <= ACL_ALLOW_NONE ) { // Not enough access to view any records, don't add it to any lists continue; @@ -181,20 +160,11 @@ var $selectedCategories = array(); $where = ''; if(!empty($whereArray)){ $where = '(' . implode(') AND (', $whereArray) . ')'; - - } - - $additional_where = ''; - + } $module_limiter = " sugarfeed.related_module in ('" . implode("','", $regular_modules) . "')"; - if( is_admin($GLOBALS['current_user'] ) ) - { - $all_modules = array_merge($regular_modules, $owner_modules, $admin_modules); - $module_limiter = " sugarfeed.related_module in ('" . implode("','", $all_modules) . "')"; - } - else if ( count($owner_modules) > 0 + if ( count($owner_modules) > 0 ) { $module_limiter = " ((sugarfeed.related_module IN ('".implode("','", $regular_modules)."') " .") "; @@ -205,23 +175,19 @@ var $selectedCategories = array(); $module_limiter .= ")"; } if(!empty($where)) { $where .= ' AND '; } - - $where .= $module_limiter; - $this->lvs->setup($this->seedBean, $this->displayTpl, $where , $lvsParams, 0, $this->displayRows, - array('name', - 'description', - 'date_entered', - 'created_by', - - 'link_url', + $this->lvs->setup($this->seedBean, $this->displayTpl, $where , $lvsParams, 0, $this->displayRows, + array('name', + 'description', + 'date_entered', + 'created_by', + 'link_url', 'link_type')); foreach($this->lvs->data['data'] as $row => $data) { - - $this->lvs->data['data'][$row]['NAME'] = str_replace("{this.CREATED_BY}",get_assigned_user_name($this->lvs->data['data'][$row]['ASSIGNED_USER_ID']),$data['NAME']); - + $this->lvs->data['data'][$row]['CREATED_BY'] = get_assigned_user_name($data['CREATED_BY']); + $this->lvs->data['data'][$row]['NAME'] = str_replace("{this.CREATED_BY}",$this->lvs->data['data'][$row]['CREATED_BY'],$data['NAME']); } // assign a baseURL w/ the action set as DisplayDashlet @@ -235,99 +201,36 @@ var $selectedCategories = array(); $this->lvs->ss->assign('dashletId', $this->id); - - } - - $td = $GLOBALS['timedate']; - $needResort = false; - $resortQueue = array(); - $feedErrors = array(); - - $fetchRecordCount = $this->displayRows + $this->lvs->data['pageData']['offsets']['current']; - - foreach ( $external_modules as $apiName ) { - $api = ExternalAPIFactory::loadAPI($apiName); - if ( $api !== FALSE ) { - // FIXME: Actually calculate the oldest sugar feed we can see, once we get an API that supports this sort of filter. - $reply = $api->getLatestUpdates(0,$fetchRecordCount); - if ( $reply['success'] && count($reply['messages']) > 0 ) { - array_splice($resortQueue, count($resortQueue), 0, $reply['messages']); - } else if ( !$reply['success'] ) { - $feedErrors[] = $reply['errorMessage']; - } - } - } - - if ( count($feedErrors) > 0 ) { - $this->lvs->ss->assign('feedErrors',$feedErrors); - } - - // If we need to resort, get to work! - foreach ( $this->lvs->data['data'] as $normalMessage ) { - list($user_date,$user_time) = explode(' ',$normalMessage['DATE_ENTERED']); - list($db_date,$db_time) = $td->to_db_date_time($user_date,$user_time); - - $unix_timestamp = strtotime($db_date.' '.$db_time); - - $normalMessage['sort_key'] = $unix_timestamp; - $normalMessage['NAME'] = ''.$normalMessage['NAME']; - - $resortQueue[] = $normalMessage; } - - usort($resortQueue,create_function('$a,$b','return $a["sort_key"]<$b["sort_key"];')); - - // Trim it down to the necessary number of records - $numRecords = count($resortQueue); - $numRecords = $numRecords - $this->lvs->data['pageData']['offsets']['current']; - $numRecords = min($this->displayRows,$numRecords); - - $this->lvs->data['data'] = $resortQueue; } - + function deleteUserFeed() { if(!empty($_REQUEST['record'])) { $feed = new SugarFeed(); $feed->retrieve($_REQUEST['record']); - if(is_admin($GLOBALS['current_user']) || $feed->created_by == $GLOBALS['current_user']->id){ + if(is_admin($GLOBALS['current_user']) || $feed->created_by == $GLOBALS['current_user']->id){ $feed->mark_deleted($_REQUEST['record']); } } } function pushUserFeed() { - if(!empty($_REQUEST['text']) || (!empty($_REQUEST['link_url']) && !empty($_REQUEST['link_type']))) { + if(!empty($_REQUEST['text'])) { $text = htmlspecialchars($_REQUEST['text']); //allow for bold and italic user tags $text = preg_replace('/&lt;(\/*[bi])&gt;/i','<$1>', $text); - SugarFeed::pushFeed($text, 'UserFeed', $GLOBALS['current_user']->id, + SugarFeed::pushFeed($text, 'UserFeed', $GLOBALS['current_user']->id, $GLOBALS['current_user']->id, $_REQUEST['link_type'], $_REQUEST['link_url'] ); } - - } - - function pushUserFeedReply( ) { - if(!empty($_REQUEST['text'])&&!empty($_REQUEST['parentFeed'])) { - $text = htmlspecialchars($_REQUEST['text']); - //allow for bold and italic user tags - $text = preg_replace('/&lt;(\/*[bi])&gt;/i','<$1>', $text); - SugarFeed::pushFeed($text, 'SugarFeed', $_REQUEST['parentFeed'], - $GLOBALS['current_user']->id, - '', '' - ); - } - + } - function displayOptions() { global $app_strings; - global $app_list_strings; $ss = new Sugar_Smarty(); $ss->assign('titleLBL', translate('LBL_TITLE', 'SugarFeed')); $ss->assign('categoriesLBL', translate('LBL_CATEGORIES', 'SugarFeed')); - $ss->assign('autenticationPendingLBL', translate('LBL_AUTHENTICATION_PENDING', 'SugarFeed')); $ss->assign('rowsLBL', translate('LBL_ROWS', 'SugarFeed')); $ss->assign('saveLBL', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('title', $this->title); @@ -337,57 +240,38 @@ var $selectedCategories = array(); } $ss->assign('selectedCategories', $this->selectedCategories); $ss->assign('rows', $this->displayRows); - $externalApis = array(); - foreach ( $this->externalAPIList as $apiObj => $apiName ) { - //only show external APis that the user has not created - if ( ! EAPM::getLoginInfo($apiName) ) { - $externalApis[] = $apiObj; - } - } - $ss->assign('externalApiList', JSON::encode($externalApis)); - $ss->assign('authenticateLBL', translate('LBL_AUTHENTICATE', 'SugarFeed')); $ss->assign('id', $this->id); - if($this->isAutoRefreshable()) { - $ss->assign('isRefreshable', true); - $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); - $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); - $ss->assign('autoRefreshSelect', $this->autoRefresh); - } return $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl'); - } - + } + /** * creats the values - * @return + * @return * @param $req Object */ function saveOptions($req) { global $sugar_config, $timedate, $current_user, $theme; $options = array(); - $options['title'] = $req['title']; + $options['title'] = $_REQUEST['title']; $rows = intval($_REQUEST['rows']); if($rows <= 0) { - $rows = 15; + $rows = 15; } if($rows > 100){ $rows = 100; } - if ( isset($req['autoRefresh']) ) - $options['autoRefresh'] = $req['autoRefresh']; $options['rows'] = $rows; - $options['categories'] = $req['categories']; + $options['categories'] = $_REQUEST['categories']; foreach($options['categories'] as $cat){ if($cat == 'ALL'){ unset($options['categories']); } } - - return $options; } - - + + function sugarFeedDisplayScript() { // Forces the quicksearch to reload anytime the dashlet gets refreshed return ''; } /** - * + * * @return javascript including QuickSearch for SugarFeeds */ function displayScript() { require_once('include/QuickSearchDefaults.php'); + $ss = new Sugar_Smarty(); $ss->assign('saving', translate('LBL_SAVING', 'SugarFeed')); $ss->assign('saved', translate('LBL_SAVED', 'SugarFeed')); $ss->assign('id', $this->id); - $ss->assign('idjs', $this->idjs); - + $str = $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl'); return $str; // return parent::display for title and such } - + /** - * + * * @return the fully rendered dashlet */ function display(){ - + $listview = parent::display(); $GLOBALS['current_sugarfeed'] = $this; - $listview = preg_replace_callback('/\{([^\^ }]+)\.([^\}]+)\}/', create_function( + $listview = preg_replace_callback('/\{([^\}]+)\.([^\}]+)\}/', create_function( '$matches', 'if($matches[1] == "this"){$var = $matches[2]; return $GLOBALS[\'current_sugarfeed\']->$var;}else{return translate($matches[2], $matches[1]);}' ),$listview); $listview = preg_replace('/\[(\w+)\:([\w\-\d]*)\:([^\]]*)\]/', '$3', $listview); - - return $listview.''; + + return $listview.''; } - - + + /** - * + * * @return the title and the user post form * @param $text Object */ function getHeader($text='') { - return parent::getHeader($text) . $this->getPostForm().$this->getDisabledWarning().$this->sugarFeedDisplayScript().'
    '; + return parent::getHeader($text) . $this->getPostForm().$this->getDisabledWarning().$this->sugarFeedDisplayScript().'
    '; } - - + + /** - * + * * @return a warning message if the sugar feed system is not enabled currently */ function getDisabledWarning(){ @@ -453,14 +337,13 @@ enableQS(false); } /** - * + * * @return the form for users posting custom messages to the feed stream */ function getPostForm(){ global $current_user; - if ( (!empty($this->selectedCategories) && !in_array('UserFeed',$this->selectedCategories)) - ) { + if ( empty($this->categories['UserFeed']) ) { // The user feed system isn't enabled, don't let them post notes return ''; } @@ -488,12 +371,12 @@ enableQS(false); } $ss->assign('link_types', $linkTypes); return $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl'); - + } - + // This is called from the include/MySugar/DashletsDialog/DashletsDialog.php and determines if we should display the SugarFeed dashlet as an option or not static function shouldDisplay() { - + $admin = new Administration(); $admin->retrieveSettings(); @@ -503,4 +386,4 @@ enableQS(false); return true; } } -} +} \ No newline at end of file diff --git a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl index e0d7024f..2b606612 100644 --- a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl +++ b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl @@ -69,55 +69,10 @@ if(typeof SugarFeed == 'undefined') { // since the dashlet can be included multi postData = 'to_pdf=1&module=Home&action=CallMethodDashlet&method=deleteUserFeed&id=' + id + '&record=' + record; var cObj = YAHOO.util.Connect.asyncRequest('POST','index.php', {success: SugarFeed.saved, failure: SugarFeed.saved, argument: id}, postData); - }, - buildReplyForm: function(record, id, elem) { - // See if we already have a blockquote - var myParentElem = elem.parentNode.parentNode.parentNode; - - var blockElem = myParentElem.getElementsByTagName('blockquote')[0]; - if ( typeof(blockElem) == 'undefined' || typeof(blockElem[0]) == 'undefined' ) { - // Need to create a blockquote element - // With a "clear" div in front of it. - var divElem = document.createElement('div'); - divElem.className = 'clear'; - myParentElem.appendChild(divElem); - blockElem = document.createElement('blockquote'); - myParentElem.appendChild(blockElem); - } else { - // Should only be one child blockquote element, so we'll just grab the first one - blockElem = blockElem[0]; - } - - // Move the reply form up over here - var formElem = document.getElementById('SugarFeedReplyForm_'+id); - formElem.parentNode.removeChild(formElem); - blockElem.appendChild(formElem); - formElem.getElementsByTagName('div')[0].style.display = 'block'; - formElem.parentFeed.value = record; - - }, - replyToFeed: function( id ) { - ajaxStatus.showStatus('{/literal}{$saving}{literal}'); // show that AJAX call is happening - // what data to post to the dashlet - - var formElem = document.getElementById('SugarFeedReplyForm_' + id); - postData = 'to_pdf=1&module=Home&action=CallMethodDashlet&method=pushUserFeedReply&id=' + id ; - YAHOO.util.Connect.setForm(formElem); - var cObj = YAHOO.util.Connect.asyncRequest('POST','index.php', - {success: SugarFeed.saved, failure: SugarFeed.saved, argument: id}, postData); - - }, - loaded: function(id) { - var scrollConent; - scrollContent = new iScroll('contentScroller' + id); - } + } }; }(); } - -if(SUGAR.util.isTouchScreen()) { - document.addEventListener('DOMContentLoaded', function(){SugarFeed.loaded('{/literal}{$idjs}{literal}')}, false); -} {/literal} "; echo $confirmDeleteJS; +?> diff --git a/modules/Users/DetailView.tpl b/modules/Users/DetailView.tpl index 0eee2959..4d157037 100644 --- a/modules/Users/DetailView.tpl +++ b/modules/Users/DetailView.tpl @@ -319,7 +319,7 @@ user_detailview_tabs.on('contentReady', function(e){
    {$MOD.LBL_PUBLISH_KEY}:{$CALENDAR_PUBLISH_KEY} {$CALENDAR_PUBLISH_KEY} {$MOD.LBL_CHOOSE_A_KEY} 
    @@ -135,7 +115,7 @@ EditView_tabs.on('contentReady', function(e){
  • {$MOD.LBL_THEME}
  • {/if}
  • {$MOD.LBL_ADVANCED}
  • - +
    @@ -152,7 +132,7 @@ EditView_tabs.on('contentReady', function(e){
    - {$USER_STATUS_OPTIONS} + {$USER_STATUS_OPTIONS} @@ -293,7 +273,7 @@ EditView_tabs.on('contentReady', function(e){ {if !empty($mail_smtpauth_req) } - + @@ -307,7 +287,7 @@ EditView_tabs.on('contentReady', function(e){ {/if} - + @@ -319,7 +299,7 @@ EditView_tabs.on('contentReady', function(e){
    - {if ($CHANGE_PWD) == '1'} + {if ($CHANGE_PWD) == '1'}
    - - {$BUTTONS}
    {$MOD.LBL_USER_TYPE}: {$USER_TYPE_LABEL} {sugar_help text=$USER_TYPE_DESC WIDTH=250} {$MOD.LBL_LAST_NAME}: {$APP.LBL_REQUIRED_SYMBOL} 
    {$MOD.LBL_MAIL_SMTPUSER}  
     
    @@ -354,7 +334,7 @@ EditView_tabs.on('contentReady', function(e){ {if ($REQUIRED_PASSWORD)}{$APP.LBL_REQUIRED_SYMBOL}{/if} - +
    - + @@ -380,9 +360,9 @@ EditView_tabs.on('contentReady', function(e){
    - + + - + @@ -490,7 +470,7 @@ EditView_tabs.on('contentReady', function(e){ - + @@ -508,11 +488,11 @@ EditView_tabs.on('contentReady', function(e){ - + @@ -550,7 +530,7 @@ EditView_tabs.on('contentReady', function(e){ - + - {if ($IS_ADMIN)} + {if ($IS_ADMIN)} {else} @@ -571,7 +551,7 @@ EditView_tabs.on('contentReady', function(e){ {capture name=SMARTY_LOCALE_NAME_FORMAT_DESC} {$MOD.LBL_LOCALE_NAME_FORMAT_DESC}
    {$MOD.LBL_LOCALE_NAME_FORMAT_DESC_2}{/capture} @@ -582,18 +562,18 @@ EditView_tabs.on('contentReady', function(e){ - +
    @@ -446,9 +426,9 @@ EditView_tabs.on('contentReady', function(e){ -
    {$MOD.LBL_EXPORT_CHARSET}: {sugar_help text=$MOD.LBL_EXPORT_CHARSET_DESC }

    {$MOD.LBL_LAYOUT_OPTIONS}

    {$MOD.LBL_USE_GROUP_TABS}: {sugar_help text=$MOD.LBL_NAVIGATION_PARADIGM_DESCRIPTION }
    {$MOD.LBL_MAX_TAB}: {sugar_help text=$MOD.LBL_MAX_TAB_DESCRIPTION }
    {$MOD.LBL_SUBPANEL_TABS}: {sugar_help text=$MOD.LBL_SUBPANEL_TABS_DESCRIPTION }
    {$MOD.LBL_TIMEZONE}: {sugar_help text=$MOD.LBL_TIMEZONE_TEXT } {$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}: @@ -561,7 +541,7 @@ EditView_tabs.on('contentReady', function(e){
    {$MOD.LBL_PROMPT_TIMEZONE}: {sugar_help text=$MOD.LBL_PROMPT_TIMEZONE_TEXT } {$MOD.LBL_NUMBER_GROUPING_SEP}: {sugar_help text=$MOD.LBL_NUMBER_GROUPING_SEP_TEXT }
    {$MOD.LBL_DECIMAL_SEP}: {sugar_help text=$MOD.LBL_DECIMAL_SEP_TEXT } -
    {$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}:
    - +
    @@ -623,9 +603,9 @@ EditView_tabs.on('contentReady', function(e){
    - - {$BUTTONS}
    @@ -681,11 +661,11 @@ function startOutBoundEmailSettingsTest() requires: ["datatable", "dragdrop", "treeview", "tabview"] }); loader.insert(); - + } -function testOutboundSettings() -{ +function testOutboundSettings() +{ var errorMessage = ''; var isError = false; var fromAddress = document.getElementById("outboundtest_from_address").value; @@ -694,36 +674,40 @@ function testOutboundSettings() var smtpServer = document.getElementById('mail_smtpserver').value; var mailsmtpauthreq = document.getElementById('mail_smtpauth_req'); - if(trim(smtpServer) == '' || trim(mail_smtpport) == '') + if(trim(smtpServer) == '' || trim(mail_smtpport) == '') { isError = true; errorMessage += "{/literal}{$MOD.LBL_MISSING_DEFAULT_OUTBOUND_SMTP_SETTINGS}{literal}" + "
    "; overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", errorMessage, 'alert'); return false; } - - - if(document.getElementById('mail_smtpuser') && trim(document.getElementById('mail_smtpuser').value) == '') + + + if(document.getElementById('mail_smtpuser') && trim(document.getElementById('mail_smtpuser').value) == '') { isError = true; errorMessage += "{/literal}{$APP.LBL_EMAIL_ACCOUNTS_SMTPUSER}{literal}" + "
    "; } - + + if(document.getElementById('mail_smtppass') && trim(document.getElementById('mail_smtppass').value) == '') + { + isError = true; + errorMessage += "{/literal}{$APP.LBL_EMAIL_ACCOUNTS_SMTPPASS}{literal}" + "
    "; + } if(isError) { overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", errorMessage, 'alert'); - return false; - } - + return false; + } + testOutboundSettingsDialog(); } function sendTestEmail() { - var toAddress = document.getElementById("outboundtest_from_address").value; var fromAddress = document.getElementById("outboundtest_from_address").value; - - if (trim(fromAddress) == "") + + if (trim(fromAddress) == "") { overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", "{{/literal}$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}{literal}", 'alert'); return; @@ -732,26 +716,26 @@ function sendTestEmail() overlay("{/literal}{$APP.ERR_INVALID_REQUIRED_FIELDS}{literal}", "{/literal}{$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}{literal}", 'alert'); return; } - + //Hide the email address window and show a message notifying the user that the test email is being sent. EmailMan.testOutboundDialog.hide(); overlay("{/literal}{$APP.LBL_EMAIL_PERFORMING_TASK}{literal}", "{/literal}{$APP.LBL_EMAIL_ONE_MOMENT}{literal}", 'alert'); - + var callbackOutboundTest = { success : function(o) { hideOverlay(); overlay("{/literal}{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}{literal}", "{/literal}{$APP.LBL_EMAIL_TEST_NOTIFICATION_SENT}{literal}", 'alert'); } - }; + }; var smtpServer = document.getElementById('mail_smtpserver').value; - + if(document.getElementById('mail_smtpuser') && document.getElementById('mail_smtppass')){ - var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&mail_smtpauth_req=true&mail_smtpuser=" + trim(document.getElementById('mail_smtpuser').value) + "&mail_smtppass=" + trim(document.getElementById('mail_smtppass').value) + "&outboundtest_from_address=" + fromAddress + "&outboundtest_to_address=" + toAddress; + var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&mail_smtpauth_req=true&mail_smtpuser=" + trim(document.getElementById('mail_smtpuser').value) + "&mail_smtppass=" + trim(document.getElementById('mail_smtppass').value) + "&outboundtest_from_address=" + fromAddress; } else{ - var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&outboundtest_from_address=" + fromAddress + "&outboundtest_to_address=" + toAddress; + var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&outboundtest_from_address=" + fromAddress; } - YAHOO.util.Connect.asyncRequest("POST", "index.php?action=testOutboundEmail&mail_name=system&module=EmailMan&to_pdf=true&sugar_body_only=true", callbackOutboundTest, postDataString); + YAHOO.util.Connect.asyncRequest("POST", "index.php?action=testOutboundEmail&module=EmailMan&to_pdf=true&sugar_body_only=true", callbackOutboundTest, postDataString); } function testOutboundSettingsDialog() { // lazy load dialogue @@ -767,7 +751,7 @@ function testOutboundSettingsDialog() { EmailMan.testOutboundDialog.setHeader("{/literal}{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}{literal}"); YAHOO.util.Dom.removeClass("testOutboundDialog", "yui-hidden"); } // end lazy load - + EmailMan.testOutboundDialog.render(); EmailMan.testOutboundDialog.show(); } // fn @@ -836,7 +820,7 @@ setSigDigits();
    - + - - + + @@ -208,7 +193,7 @@ if ( !empty($logindisplay) ) "; $sugar_smarty->assign('CAPTCHA', $Captcha); echo $captcha_js; - + }else{ echo " {/literal} - \ No newline at end of file diff --git a/themes/Sugar5/tpls/_headerModuleList.tpl b/themes/Sugar5/tpls/_headerModuleList.tpl index 118cc5be..8711fa37 100644 --- a/themes/Sugar5/tpls/_headerModuleList.tpl +++ b/themes/Sugar5/tpls/_headerModuleList.tpl @@ -35,60 +35,6 @@ ********************************************************************************/ *} -{if $USE_GROUP_TABS} -
    -
      -
    •  
    • - {assign var="groupSelected" value=false} - {foreach from=$groupTabs item=modules key=group name=groupList} - {capture name=extraparams assign=extraparams}parentTab={$group}{/capture} - {if ( ( $smarty.request.parentTab == $group || (!$smarty.request.parentTab && in_array($MODULE_TAB,$modules.modules)) ) && !$groupSelected ) || ($smarty.foreach.groupList.index == 0 && $defaultFirst)} -
    • -   - {$group} -   - {assign var="groupSelected" value=true} - {else} -
    • -   - {$group} -   - {/if} -
    • - {/foreach} -
    -
    -
    -
    - {assign var="groupSelected" value=false} - {foreach from=$groupTabs item=modules key=group name=moduleList} - {capture name=extraparams assign=extraparams}parentTab={$group}{/capture} - -
      - {foreach from=$modules.modules item=module key=modulekey} -
    • - {capture name=moduleTabId assign=moduleTabId}moduleTab_{$smarty.foreach.moduleList.index}_{$module}{/capture} - {sugar_link id=$moduleTabId module=$modulekey data=$module extraparams=$extraparams} -
    • - {/foreach} - {if !empty($modules.extra)} -
    • - >> -
        - {foreach from=$modules.extra item=submodulename key=submodule} -
      • - {$submodulename} - -
      • - {/foreach} -
      -
    • - {/if} -
    -
    - {/foreach} -
    -{else}
    •  
    • @@ -114,4 +60,3 @@ {/if}
    -{/if} diff --git a/themes/Sugar5/tpls/footer.tpl b/themes/Sugar5/tpls/footer.tpl index f0fbb76e..cb16c8ab 100644 --- a/themes/Sugar5/tpls/footer.tpl +++ b/themes/Sugar5/tpls/footer.tpl @@ -40,11 +40,7 @@
    - +
    - {$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR} + {$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR} {$APP.LBL_REQUIRED_SYMBOL} diff --git a/modules/Users/GeneratePassword.php b/modules/Users/GeneratePassword.php index 78c70cbd..58006199 100644 --- a/modules/Users/GeneratePassword.php +++ b/modules/Users/GeneratePassword.php @@ -47,7 +47,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('modules/Users/language/en_us.lang.php'); global $app_strings; - global $sugar_config; global $new_pwd; $mod_strings=return_module_language('','Users'); @@ -135,7 +134,7 @@ if (isset($_POST['link']) && $_POST['link'] == '1'){ global $timedate; $guid=create_guid(); $url=$GLOBALS['sugar_config']['site_url']."/index.php?entryPoint=Changenewpassword&guid=$guid"; - $time_now=TimeDate::getInstance()->nowDb(); + $time_now=gmdate($GLOBALS['timedate']->get_db_date_time_format()); //$q2="UPDATE `users_password_link` SET `deleted` = '1' WHERE `username` = '".$_POST['username']."'"; //$usr->db->query($q2); $q = "INSERT INTO users_password_link (id, username, date_generated) VALUES('".$guid."','".$_POST['username']."',' ".$time_now."' ) "; @@ -169,14 +168,10 @@ if (isset($_POST['link']) && $_POST['link'] == '1'){ $htmlBody = str_replace('$contact_user_user_hash', $password, $htmlBody); $body = str_replace('$contact_user_user_hash', $password, $body); } - // Bug 36833 - Add replacing of special value $instance_url - $htmlBody = str_replace('$config_site_url',$sugar_config['site_url'], $htmlBody); - $body = str_replace('$config_site_url',$sugar_config['site_url'], $body); - $htmlBody = str_replace('$contact_user_user_name', $usr->user_name, $htmlBody); - $htmlBody = str_replace('$contact_user_pwd_last_changed', TimeDate::getInstance()->nowDb(), $htmlBody); + $htmlBody = str_replace('$contact_user_pwd_last_changed', gmdate($GLOBALS['timedate']->get_db_date_time_format()), $htmlBody); $body = str_replace('$contact_user_user_name', $usr->user_name, $body); - $body = str_replace('$contact_user_pwd_last_changed', TimeDate::getInstance()->nowDb(), $body); + $body = str_replace('$contact_user_pwd_last_changed', gmdate($GLOBALS['timedate']->get_db_date_time_format()), $body); $emailTemp->body_html = $htmlBody; $emailTemp->body = $body; require_once('include/SugarPHPMailer.php'); @@ -241,7 +236,7 @@ if (isset($_POST['link']) && $_POST['link'] == '1'){ $emailObj->description_html =null; $emailObj->from_addr = $mail->From; $emailObj->parent_type = 'User'; - $emailObj->date_sent =TimeDate::getInstance()->nowDb(); + $emailObj->date_sent =gmdate($GLOBALS['timedate']->get_db_date_time_format()); $emailObj->modified_user_id = '1'; $emailObj->created_by = '1'; $emailObj->status='sent'; @@ -254,7 +249,7 @@ if (isset($_POST['link']) && $_POST['link'] == '1'){ $usr->setPreference('loginfailed','0'); $usr->savePreferencesToDB(); //set new password - $now=TimeDate::getInstance()->nowDb(); + $now=gmdate("Y-m-d H:i:s"); $query = "UPDATE $usr->table_name SET user_hash='$user_hash', system_generated_password='1', pwd_last_changed='$now' where id='$usr->id'"; $usr->db->query($query, true, "Error setting new password for $usr->user_name: "); echo $password; diff --git a/modules/Users/Login.php b/modules/Users/Login.php index 22a180ce..cb8f22c9 100644 --- a/modules/Users/Login.php +++ b/modules/Users/Login.php @@ -42,12 +42,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ -if(isset($_SESSION['authenticated_user_id'])) { - ob_clean(); - header("Location: index.php?module=Home&action=index"); - sugar_cleanup(true); - return; -} global $current_language, $mod_strings, $app_strings; if(isset($_REQUEST['login_language'])){ $lang = $_REQUEST['login_language']; @@ -64,15 +58,6 @@ global $app_language, $sugar_config; //we don't want the parent module's string file, but rather the string file specifc to this subpanel global $current_language; -// Get the login page image -if ( sugar_is_file('custom/include/images/sugar_md.png') ) { - $login_image = 'Sugar'; -} -else { - $login_image = 'Sugar'; -} -$sugar_smarty->assign('LOGIN_IMAGE',$login_image); - // See if any messages were passed along to display to the user. if(isset($_COOKIE['loginErrorMessage'])) { if ( !isset($_REQUEST['loginErrorMessage']) ) { @@ -84,7 +69,7 @@ if(isset($_REQUEST['loginErrorMessage'])) { if (isset($mod_strings[$_REQUEST['loginErrorMessage']])) { echo "

    ". $mod_strings[$_REQUEST['loginErrorMessage']]. "

    "; } else if (isset($app_strings[$_REQUEST['loginErrorMessage']])) { - echo "

    ". $app_strings[$_REQUEST['loginErrorMessage']]. "

    "; + echo "

    ". $app_strings[$_REQUEST['loginErrorMessage']]. "

    "; } } $query = "SELECT count(id) as total from users WHERE status='Active' AND deleted=0 AND is_group=0 AND portal_only=0"; @@ -151,17 +136,17 @@ if ( !empty($logindisplay) ) $sugar_smarty->assign('LOGIN_DISPLAY', $logindisplay);; // RECAPTCHA - + $admin = new Administration(); $admin->retrieveSettings('captcha'); $captcha_privatekey = ""; $captcha_publickey=""; $captcha_js = ""; $Captcha=''; - - // if the admin set the captcha stuff, assign javascript and div + + // if the admin set the captcha stuff, assign javascript and div if(isset($admin->settings['captcha_on'])&& $admin->settings['captcha_on']=='1' && !empty($admin->settings['captcha_private_key']) && !empty($admin->settings['captcha_public_key'])){ - + $captcha_privatekey = $admin->settings['captcha_private_key']; $captcha_publickey = $admin->settings['captcha_public_key']; $captcha_js .=" @@ -171,7 +156,7 @@ if ( !empty($logindisplay) ) Recaptcha.create('$captcha_publickey' ,'captchaImage',{theme:'custom'}); } window.onload=initCaptcha; - + var handleFailure=handleSuccess; var handleSuccess = function(o){ if(o.responseText!==undefined && o.responseText =='Success'){ @@ -185,7 +170,7 @@ if ( !empty($logindisplay) ) } } var callback2 ={ success:handleSuccess, failure: handleFailure }; - + function validateAndSubmit(){ var form = document.getElementById('form'); var url = '&to_pdf=1&module=Home&action=index&entryPoint=Changenewpassword&recaptcha_challenge_field='+Recaptcha.get_challenge()+'&recaptcha_response_field='+ Recaptcha.get_response(); @@ -194,10 +179,10 @@ if ( !empty($logindisplay) ) $Captcha.="
    ".$mod_strings['LBL_RECAPTCHA_INSTRUCTION'].":