Check-in [41f5267633]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add ->nl newline conversion, ->f_version filter, and url_user_icon() utilization (@github / @sourceforge / @launchpad), keep local part from email-style (gravatar/etc.) submitter if plain nick is absent, fix comparison to previous submitter name (else emptying `submitter_image`). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
41f526763361eb89c1a0054ae227370e |
User & Date: | mario 2014-12-07 21:18:08 |
Context
2014-12-07
| ||
21:20 | Document new gravatar/identicon options @github / @sourceforge / @launchpad. check-in: 54f1d36a8c user: mario tags: trunk | |
21:18 | Add ->nl newline conversion, ->f_version filter, and url_user_icon() utilization (@github / @sourceforge / @launchpad), keep local part from email-style (gravatar/etc.) submitter if plain nick is absent, fix comparison to previous submitter name (else emptying `submitter_image`). check-in: 41f5267633 user: mario tags: trunk | |
21:15 | Introduce `f_version()` filter to compact spaces, and strip leading "v". Complexer `url_user_icon()` to convert @github, @sourceforge and @launchpad user names to gravatar/user images. check-in: 3788dc5e44 user: mario tags: trunk | |
Changes
Changes to release.php.
︙ | ︙ | |||
82 83 84 85 86 87 88 | $newdata = array( "name" => $newdata->proj_name ->length…3…33["name"], "homepage" => $newdata->ascii->trim->http ->length…250["homepage"], "download" => $newdata->ascii->trim->url ->length…250["download"], "image" => $newdata->ascii->trim->http ->length…250["image"], "autoupdate_url" => $newdata->ascii->trim->http ->length…250["autoupdate_url"], "title" => $newdata->text ->length…100["title"], | | | | | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | $newdata = array( "name" => $newdata->proj_name ->length…3…33["name"], "homepage" => $newdata->ascii->trim->http ->length…250["homepage"], "download" => $newdata->ascii->trim->url ->length…250["download"], "image" => $newdata->ascii->trim->http ->length…250["image"], "autoupdate_url" => $newdata->ascii->trim->http ->length…250["autoupdate_url"], "title" => $newdata->text ->length…100["title"], "description" => $newdata->nl ->length…2000["description"], "license" => $newdata->words ->length…30["license"], "tags" => $newdata->words->f_tags ->length…150["tags"], "version" => $newdata->f_version ->length…30["version"], "state" => $newdata->words->strtolower ->length…30["state"], "scope" => $newdata->words->strtolower ->length…30["scope"], "changes" => $newdata->text->nl ->length…2000["changes"], "submitter" => $newdata->text ->length…100["submitter"], "urls" => $newdata->has_urls ->length…2000["urls"], "lock" => $newdata->raw ->length…2000["lock"], "autoupdate_module" => $newdata->id ->length…30["autoupdate_module"], "autoupdate_regex" => $newdata->raw->nl ->length…2000["autoupdate_regex"], ); // Base data for version/t_published lookup, in case we only got partial $newdata $name = $newdata["name"] ?: $this["name"]; $version = in_array("version", $newkeys) ? $newdata["version"] : $this["version"]; // Declare some automatic system flags |
︙ | ︙ | |||
166 167 168 169 170 171 172 | * in particular the email out of `submitter`. * */ function unpack(&$newdata) { // extract new img@gravatar if (!empty($newdata["submitter"]) and is_int(strpos($newdata["submitter"], "@")) | | | | > | | | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | * in particular the email out of `submitter`. * */ function unpack(&$newdata) { // extract new img@gravatar if (!empty($newdata["submitter"]) and is_int(strpos($newdata["submitter"], "@")) and preg_match($rx = "/([^,;\s]+)@[^,;\s]+/", $newdata["submitter"], $match)) { $newdata["submitter_image"] = url_user_icon($match[0]); $newdata["submitter"] = trim(preg_replace($rx, "", $newdata["submitter"]), ", ") or $newdata["submitter"] = strtok($match[0], "+@"); } // if name was changed, empty any previous _image data elseif (!empty($this["submitter"]) and soundex($this["submitter"]) != soundex($newdata["submitter"])) { $newdata["submitter_image"] = ""; } } /** * Retrieve latest published release version. |
︙ | ︙ |