summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-17 09:51:38 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-17 09:51:38 -0400
commite0438b8223e7bb37e812e25bea502e31013333e5 (patch)
tree595e1d62e8373f4c30aeeb91226242d751df2ae5 /lib
parent3803cf2153091c4f319c379c3ac24cc8fc844b0a (diff)
bogus version of common_local_url()
Threw together a bogus version of common_local_url(), which should work for now. But eventually it should use pretty URLs if possible. darcs-hash:20080517135138-84dde-3c69c89ee8080568e92f655cbb3171867a7b38ce.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/common.php b/lib/common.php
index b4c2f9b6e..2625d08ef 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* XXX: break up into separate modules (HTTP, HTML, user, files) */
+
+
if (!defined('LACONICA')) { exit(1) }
define('AVATAR_PROFILE_SIZE', 96);
@@ -254,6 +257,16 @@ function common_avatar_url($filename) {
return $config['avatar']['path'] . '/' . $filename;
}
+function common_local_url($action, $args) {
+ /* XXX: pretty URLs */
+ $extra = '';
+ foreach ($args as $key => $value) {
+ $extra .= "&${key}=${value}";
+ }
+ /* XXX: correct path */
+ return "/index.php?action=${action}${extra}";
+}
+
// XXX: set up gettext
function _t($str) { $str }