]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
common_start_element -> common_element_start
authorEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 17:04:30 +0000 (13:04 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 17:04:30 +0000 (13:04 -0400)
darcs-hash:20080517170430-84dde-74f42b52695699f646b65b939f78fbbe95a05c7e.gz

13 files changed:
actions/all.php
actions/avatar.php
actions/login.php
actions/newnotice.php
actions/password.php
actions/profilesettings.php
actions/public.php
actions/register.php
actions/shownotice.php
actions/showstream.php
actions/subscribed.php
actions/subscriptions.php
lib/stream.php

index f1a2229f0340a8e6000c4bd2b8d0724b452ed4c4..452232929089abbbcf7cf6175f565f77c7332818 100644 (file)
@@ -40,12 +40,12 @@ class AllAction extends ShowstreamAction {
                
                $notice->find();
                
-               common_start_element('div', 'notices');
+               common_element_start('div', 'notices');
 
                while ($notice->fetch()) {
                        $this->show_notice($notice);
                }
                
-               common_end_element('div');
+               common_element_end('div');
        }
 }
index 2244e7c78257387b5468f19a959aad7a8eb3bd37..851ef23f4a257915a9b89ce6a2fbc68836f49066 100644 (file)
@@ -46,7 +46,7 @@ class AvatarAction extends SettingsAction {
                                                                                'height' => AVATAR_PROFILE_SIZE));
                }
 
-               common_start_element('form', array('enctype' => 'multipart/form-data',
+               common_element_start('form', array('enctype' => 'multipart/form-data',
                                                                                   'method' => 'POST',
                                                                                   'id' => 'avatar',
                                                                                   'action' =>
@@ -62,6 +62,7 @@ class AvatarAction extends SettingsAction {
                                                                          'type' => 'submit',
                                                                          'id' => 'submit'),
                                           _t('Upload'));
+               common_element_end('form');
        }
 
        function handle_post() {
index 3f096dc0c6a77a3acb941a1a72a8a532b8fa5d15..13e14f5bee6a10ecbe44b5061869955d872b7254 100644 (file)
@@ -53,7 +53,7 @@ class LoginAction extends Action {
                if (!is_null($error)) {
                        common_element('div', array('class' => 'error'), $msg);
                }
-               common_start_element('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url('login')));
                common_element('label', array('for' => 'username'),
@@ -74,5 +74,6 @@ class LoginAction extends Action {
                                                                          'type' => 'button',
                                                                          'id' => 'cancel'),
                                           _t('Cancel'));
+               common_element_end('form');
        }
 }
index b15232dec4a86f60605b982d329646635c3527da..9fc9103188cabb2b5605bc81b0d3185c2b6975fc 100644 (file)
@@ -54,11 +54,11 @@ class NewnoticeAction extends Action {
        }
        
        function show_form() {
-               common_start_element('form', array('id' => 'newnotice', 'method' => 'POST',
+               common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
                                                                                   'action' => common_local_url('newnotice')));
                common_element('span', 'nickname', $profile->nickname);
                common_element('textarea', array('rows' => 4, 'cols' => 80, 'id' => 'content'));
                common_element('input', array('type' => 'submit'), 'Send');
-               common_end_element('form');
+               common_element_end('form');
        }
 }
\ No newline at end of file
index fb670ecc9ea2a2bbffa938ff084b2a14b94a3c75..c9869f1778dd2111b6f7569b333dfaa442d9bd4f 100644 (file)
@@ -25,7 +25,7 @@ class PasswordAction extends SettingsAction {
                common_show_header(_t('Change password'));
                $this->settings_menu();
                $this->message($msg, $success);
-               common_start_element('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'password',
                                                                                   'action' => 
                                                                                   common_local_url('password')));
@@ -40,6 +40,7 @@ class PasswordAction extends SettingsAction {
                                                                          'type' => 'button',
                                                                          'id' => 'cancel'),
                                           _t('Cancel'));
+               common_element_end('form');
        }
        
        function handle_post() {
index f46045dde474d5b77293678ea8cccad04c642025..ae060dd9086e50f82fd3a2704a130998605be724 100644 (file)
@@ -25,7 +25,7 @@ class ProfilesettingsAction extends SettingsAction {
                common_show_header(_t('Profile settings'));
                $this->settings_menu();
                $this->message($msg, $success);
-               common_start_element('form', array('method' => 'POST',
+               common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'profilesettings',
                                                                                   'action' => 
                                                                                   common_local_url('profilesettings')));
@@ -43,6 +43,7 @@ class ProfilesettingsAction extends SettingsAction {
                                                                          'type' => 'button',
                                                                          'id' => 'cancel'),
                                           _t('Cancel'));
+               common_element_end('form');
                common_show_footer();
        }
        
index 698f991952afb2be1c652f9775cfa71cb2fbf4d1..c8e6e36cfa50536e314de4b33a23a188b58f1204 100644 (file)
@@ -46,13 +46,13 @@ class PublicAction extends StreamAction {
 
                $notice->find();
 
-               common_start_element('div', 'notices');
+               common_element_start('div', 'notices');
 
                while ($notice->fetch()) {
                        $this->show_notice($notice);
                }
 
-               common_end_element('div');
+               common_element_end('div');
        }
 }
 
index 369017b3bfa623cec540cf3c73dce0b97b7bf438..b8233784ddae9c3c5f67fa0d0b10a22527edea7c 100644 (file)
@@ -101,7 +101,7 @@ class RegisterAction extends Action {
                common_show_header(_t('Login'));
                common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'login',
-                                                                                  'action' => common_local_url('login')));
+                                                                                  'action' => common_local_url('register')));
                common_element('label', array('for' => 'username'),
                                           _t('Name'));
                common_element('input', array('name' => 'username',
index 21784e4fd286c01bd045747b9734e73c23549c07..b7a96f0ab0895b5af9087e399c35e7c7f2de022b 100644 (file)
@@ -50,7 +50,7 @@ class ShownoticeAction extends Action {
        function show_notice($notice) {
                $profile = $notice->getProfile();
                # XXX: RDFa
-               common_start_element('div', array('class' => 'notice'));
+               common_element_start('div', array('class' => 'notice'));
                $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
                if ($avatar) {
                        common_element('img', array('src' => $avatar->url,
@@ -61,17 +61,17 @@ class ShownoticeAction extends Action {
                                                                                ($profile->fullname) ? $profile->fullname : 
                                                                                                       $profile->nickname));
                }
-               common_start_element('a', array('href' => $profile->profileurl,
-                                                                               'class' => 'nickname',
-                                                                               'title' => 
-                                                                               ($profile->fullname) ? $profile->fullname :
-                                                                                                      $profile->nickname),
-                                                        $profile->nickname);
+               common_element('a', array('href' => $profile->profileurl,
+                                                                 'class' => 'nickname',
+                                                                 'title' => 
+                                                                 ($profile->fullname) ? $profile->fullname :
+                                                                 $profile->nickname),
+                                          $profile->nickname);
                # FIXME: URL, image, video, audio
                common_element('span', array('class' => 'content'),
                                           $notice->content);
                common_element('span', array('class' => 'date'),
                                           common_date_string($notice->created));
-               common_end_element('div');
+               common_element_end('div');
        }
 }
index c477ae29b7a29a64437d7ecc11ac53c48576aede..1f9fb935d4596ed2968aa3b67dfc0e93151015ff 100644 (file)
@@ -77,15 +77,15 @@ class ShowstreamAction extends StreamAction {
        }
        
        function notice_form() {
-               common_start_element('form', array('id' => 'newnotice', 'method' => 'POST',
+               common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
                                                                                   'action' => common_local_url('newnotice')));
                common_element('textarea', array('rows' => 4, 'cols' => 80, 'id' => 'content'));
                common_element('input', array('type' => 'submit'), 'Send');
-               common_end_element('form');
+               common_element_end('form');
        }
        
        function show_profile($profile) {
-               common_start_element('div', 'profile');
+               common_element_start('div', 'profile');
                $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
                if ($avatar) {
                        common_element('img', array('src' => $avatar->url,
@@ -113,42 +113,42 @@ class ShowstreamAction extends StreamAction {
        }
 
        function show_subscribe_form($profile) {
-               common_start_element('form', array('id' => 'subscribe', 'method' => 'POST',
+               common_element_start('form', array('id' => 'subscribe', 'method' => 'POST',
                                                                                   'action' => common_local_url('subscribe')));
                common_element('input', array('id' => 'subscribeto',
                                                                          'name' => 'subscribeto',
                                                                          'type' => 'hidden',
                                                                          'value' => $profile->nickname));
                common_element('input', array('type' => 'submit'), _t('subscribe'));
-               common_end_element('form');
+               common_element_end('form');
        }
 
        function show_unsubscribe_form($profile) {
-               common_start_element('form', array('id' => 'unsubscribe', 'method' => 'POST',
+               common_element_start('form', array('id' => 'unsubscribe', 'method' => 'POST',
                                                                                   'action' => common_local_url('unsubscribe')));
                common_element('input', array('id' => 'unsubscribeto',
                                                                          'name' => 'unsubscribeto',
                                                                          'type' => 'hidden',
                                                                          'value' => $profile->nickname));
                common_element('input', array('type' => 'submit'), _t('unsubscribe'));
-               common_end_element('form');
+               common_element_end('form');
        }
        
        function show_subscriptions($profile) {
                
                # XXX: add a limit
                $subs = $profile->getLink('id', 'subscription', 'subscriber');
-               common_start_element('div', 'subscriptions');
+               common_element_start('div', 'subscriptions');
                
                $cnt = 0;
                
                while ($subs->fetch()) {
                        $cnt++;
                        if ($cnt % SUBSCRIPTIONS_PER_ROW == 1) {
-                               common_start_element('div', 'row');
+                               common_element_start('div', 'row');
                        }
 
-                       common_start_element('a', array('title' => $subs->fullname ||
+                       common_element_start('a', array('title' => $subs->fullname ||
                                                                                                   $subs->nickname,
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
@@ -157,10 +157,10 @@ class ShowstreamAction extends StreamAction {
                                                                                'width' => AVATAR_MINI_SIZE,
                                                                                'height' => AVATAR_MINI_SIZE,
                                                                                'class' => 'avatar mini'));
-                       common_end_element('a');
+                       common_element_end('a');
                        
                        if ($cnt % SUBSCRIPTIONS_PER_ROW == 0) {
-                               common_end_element('div');
+                               common_element_end('div');
                        }
                        
                        if ($cnt == SUBSCRIPTIONS) {
@@ -173,7 +173,7 @@ class ShowstreamAction extends StreamAction {
                                                                  'class' => 'moresubscriptions'),
                                           _t('All subscriptions'));
 
-               common_end_element('div');
+               common_element_end('div');
        }
 
        function show_statistics($profile) {
@@ -192,14 +192,14 @@ class ShowstreamAction extends StreamAction {
                $notice_count = $notice->count();
                
                # Other stats...?
-               common_start_element('dl', 'statistics');
+               common_element_start('dl', 'statistics');
                common_element('dt', _t('Subscriptions'));
                common_element('dd', $subs_count);
                common_element('dt', _t('Subscribers'));
                common_element('dd', $subbed_count);
                common_element('dt', _t('Notices'));
                common_element('dd', $notice_count);
-               common_end_element('dl');
+               common_element_end('dl');
        }
        
        function show_notices($profile) {
@@ -215,13 +215,13 @@ class ShowstreamAction extends StreamAction {
                
                $notice->find();
 
-               common_start_element('div', 'notices');
+               common_element_start('div', 'notices');
                
                while ($notice->fetch()) {
                        $this->show_notice($notice);
                }
                
-               common_end_element('div');
+               common_element_end('div');
        }
        
        function show_last_notice($profile) {
index d28ff237d8043b3521d3b2a92b3b457cb8e3d2f7..8e0b2bc6b191c1e0a3ff98fadcd586806315ab2d 100644 (file)
@@ -50,17 +50,17 @@ class SubscribedAction extends Action {
 
                $subs_count = $subs->find();
                
-               common_start_element('div', 'subscriptions');
+               common_element_start('div', 'subscriptions');
                
                $idx = 0;
                
                while ($subs->fetch()) {
                        $idx++;
                        if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
-                               common_start_element('div', 'row');
+                               common_element_start('div', 'row');
                        }
 
-                       common_start_element('a', array('title' => $subs->fullname ||
+                       common_element_start('a', array('title' => $subs->fullname ||
                                                                                                   $subs->nickname,
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
@@ -69,12 +69,12 @@ class SubscribedAction extends Action {
                                                                                'width' => AVATAR_STREAM_SIZE,
                                                                                'height' => AVATAR_STREAM_SIZE,
                                                                                'class' => 'avatar stream'));
-                       common_end_element('a');
+                       common_element_end('a');
 
                        # XXX: subscribe form here
                        
                        if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
-                               common_end_element('div');
+                               common_element_end('div');
                        }
                        
                        if ($idx == SUBSCRIPTIONS_PER_PAGE) {
@@ -99,6 +99,6 @@ class SubscribedAction extends Action {
                                                                          'class' => 'next'),
                                           _t('Next'));
                }
-               common_end_element('div');
+               common_element_end('div');
        }
 }
\ No newline at end of file
index 60ceb0c983affe91684ec9be9f8bd7bfc39bb5ec..ef0e36e300fc7a65661c0e10d957b472018a9773 100644 (file)
@@ -47,17 +47,17 @@ class SubscriptionsAction extends Action {
 
                $subs_count = $subs->find();
                
-               common_start_element('div', 'subscriptions');
+               common_element_start('div', 'subscriptions');
                
                $idx = 0;
                
                while ($subs->fetch()) {
                        $idx++;
                        if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
-                               common_start_element('div', 'row');
+                               common_element_start('div', 'row');
                        }
 
-                       common_start_element('a', array('title' => $subs->fullname ||
+                       common_element_start('a', array('title' => $subs->fullname ||
                                                                                                   $subs->nickname,
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
@@ -66,12 +66,12 @@ class SubscriptionsAction extends Action {
                                                                                'width' => AVATAR_STREAM_SIZE,
                                                                                'height' => AVATAR_STREAM_SIZE,
                                                                                'class' => 'avatar stream'));
-                       common_end_element('a');
+                       common_element_end('a');
 
                        # XXX: subscribe form here
                        
                        if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
-                               common_end_element('div');
+                               common_element_end('div');
                        }
                        
                        if ($idx == SUBSCRIPTIONS_PER_PAGE) {
@@ -96,6 +96,6 @@ class SubscriptionsAction extends Action {
                                                                          'class' => 'next'),
                                           _t('Next'));
                }
-               common_end_element('div');
+               common_element_end('div');
        }
 }
\ No newline at end of file
index 2b8361a7351a50bbce191157d80c254bd395cdab..71a4865462b846bc53ea0c02f2bfdb3181ab913f 100644 (file)
@@ -31,9 +31,9 @@ class StreamAction extends Action {
        function show_notice($notice) {
                $profile = $notice->getProfile();
                # XXX: RDFa
-               common_start_element('div', array('class' => 'notice'));
+               common_element_start('div', array('class' => 'notice'));
                $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
-               common_start_element('a', array('href' => $profile->profileurl));
+               common_element_start('a', array('href' => $profile->profileurl));
                common_element('img', array('src' => ($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR,
                                                                        'class' => 'avatar stream',
                                                                        'width' => AVATAR_STREAM_SIZE,
@@ -41,7 +41,7 @@ class StreamAction extends Action {
                                                                        'alt' => 
                                                                        ($profile->fullname) ? $profile->fullname : 
                                                                        $profile->nickname));
-               common_end_element('a');
+               common_element_end('a');
                common_element('a', array('href' => $profile->profileurl,
                                                                  'class' => 'nickname'),
                                           $profile->nickname);
@@ -51,6 +51,6 @@ class StreamAction extends Action {
                common_element('a', array('class' => 'notice',
                                                                  'href' => $noticeurl),
                                           common_date_string($notice->created));
-               common_end_element('div');
+               common_element_end('div');
        }
 }