diff options
-rw-r--r-- | actions/all.php | 2 | ||||
-rw-r--r-- | actions/avatar.php | 2 | ||||
-rw-r--r-- | actions/login.php | 2 | ||||
-rw-r--r-- | actions/logout.php | 2 | ||||
-rw-r--r-- | actions/newnotice.php | 2 | ||||
-rw-r--r-- | actions/password.php | 2 | ||||
-rw-r--r-- | actions/profilesettings.php | 2 | ||||
-rw-r--r-- | actions/public.php | 2 | ||||
-rw-r--r-- | actions/register.php | 2 | ||||
-rw-r--r-- | actions/shownotice.php | 6 | ||||
-rw-r--r-- | actions/showstream.php | 4 | ||||
-rw-r--r-- | actions/subscribe.php | 2 | ||||
-rw-r--r-- | actions/subscribed.php | 2 | ||||
-rw-r--r-- | actions/subscriptions.php | 2 | ||||
-rw-r--r-- | classes/Notice.php | 2 | ||||
-rw-r--r-- | classes/Profile.php | 2 | ||||
-rw-r--r-- | classes/Remote_profile.php | 2 | ||||
-rw-r--r-- | classes/Subscription.php | 2 | ||||
-rw-r--r-- | classes/User.php | 2 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | lib/action.php | 2 | ||||
-rw-r--r-- | lib/common.php | 19 | ||||
-rw-r--r-- | lib/settingsaction.php | 2 | ||||
-rw-r--r-- | lib/stream.php | 2 |
24 files changed, 37 insertions, 36 deletions
diff --git a/actions/all.php b/actions/all.php index 8efaa5a82..f1a2229f0 100644 --- a/actions/all.php +++ b/actions/all.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class AllAction extends ShowstreamAction { diff --git a/actions/avatar.php b/actions/avatar.php index b715e02de..2244e7c78 100644 --- a/actions/avatar.php +++ b/actions/avatar.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class AvatarAction extends SettingsAction { diff --git a/actions/login.php b/actions/login.php index c37f92b79..3f096dc0c 100644 --- a/actions/login.php +++ b/actions/login.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class LoginAction extends Action { diff --git a/actions/logout.php b/actions/logout.php index 3b6914411..b2f0628f2 100644 --- a/actions/logout.php +++ b/actions/logout.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class LogoutAction extends Action { function handle($args) { diff --git a/actions/newnotice.php b/actions/newnotice.php index 40a196a23..b15232dec 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class NewnoticeAction extends Action { diff --git a/actions/password.php b/actions/password.php index 3fd94b66a..fb670ecc9 100644 --- a/actions/password.php +++ b/actions/password.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class PasswordAction extends SettingsAction { diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 95462133e..f46045dde 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class ProfilesettingsAction extends SettingsAction { diff --git a/actions/public.php b/actions/public.php index 8cb854fec..698f99195 100644 --- a/actions/public.php +++ b/actions/public.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class PublicAction extends StreamAction { diff --git a/actions/register.php b/actions/register.php index 753c79ecb..80cc6aa7e 100644 --- a/actions/register.php +++ b/actions/register.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class RegisterAction extends Action { diff --git a/actions/shownotice.php b/actions/shownotice.php index 2e14963bb..21784e4fd 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class ShownoticeAction extends Action { @@ -64,8 +64,8 @@ class ShownoticeAction extends Action { common_start_element('a', array('href' => $profile->profileurl, 'class' => 'nickname', 'title' => - ($profile->fullname) ? $profile->fullname : - $profile->nickname)), + ($profile->fullname) ? $profile->fullname : + $profile->nickname), $profile->nickname); # FIXME: URL, image, video, audio common_element('span', array('class' => 'content'), diff --git a/actions/showstream.php b/actions/showstream.php index 8272e1038..c477ae29b 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } define('SUBSCRIPTIONS_PER_ROW', 5); define('SUBSCRIPTIONS', 80); @@ -169,7 +169,7 @@ class ShowstreamAction extends StreamAction { } common_element('a', array('href' => common_local_url('subscriptions', - array('profile' => $profile->nickname)) + array('profile' => $profile->nickname)), 'class' => 'moresubscriptions'), _t('All subscriptions')); diff --git a/actions/subscribe.php b/actions/subscribe.php index aab6c4b15..68fdd24e9 100644 --- a/actions/subscribe.php +++ b/actions/subscribe.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class SubscribeAction extends Action { function handle($args) { diff --git a/actions/subscribed.php b/actions/subscribed.php index f24470f02..d28ff237d 100644 --- a/actions/subscribed.php +++ b/actions/subscribed.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class SubscribedAction extends Action { diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 87b8a4e48..60ceb0c98 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class SubscriptionsAction extends Action { diff --git a/classes/Notice.php b/classes/Notice.php index 538ae9c01..24c813330 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } /** * Table Definition for notice diff --git a/classes/Profile.php b/classes/Profile.php index 4f756856e..686a79163 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } /** * Table Definition for profile diff --git a/classes/Remote_profile.php b/classes/Remote_profile.php index e9e4094b3..0aa727ad1 100644 --- a/classes/Remote_profile.php +++ b/classes/Remote_profile.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } /** * Table Definition for remote_profile diff --git a/classes/Subscription.php b/classes/Subscription.php index caa0553cb..ca2b21c02 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } /** * Table Definition for subscription diff --git a/classes/User.php b/classes/User.php index 2b8610a65..945309638 100644 --- a/classes/User.php +++ b/classes/User.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } /** * Table Definition for user */ @@ -28,10 +28,8 @@ $actionfile = INSTALLDIR."/actions/$action.php"; if (file_exists($actionfile)) { require_once($actionfile); $action_class = ucfirst($action) . "Action"; - if (function_exists($action_function)) { - call_user_func($action_function); + call_user_func(array($action_class, 'handle'), $_REQUEST); } else { common_user_error(_t('Unknown action')); } -?>
\ No newline at end of file diff --git a/lib/action.php b/lib/action.php index 049885acd..f8442a1f0 100644 --- a/lib/action.php +++ b/lib/action.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class Action { // lawsuit diff --git a/lib/common.php b/lib/common.php index 069541026..0d734e2b4 100644 --- a/lib/common.php +++ b/lib/common.php @@ -20,7 +20,7 @@ /* XXX: break up into separate modules (HTTP, HTML, user, files) */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } define('AVATAR_PROFILE_SIZE', 96); define('AVATAR_STREAM_SIZE', 48); @@ -41,10 +41,11 @@ $config = 'path' => '/'), 'avatar' => array('directory' => INSTALLDIR . 'files', - 'path' => '/files'), - 'db' => &PEAR::getStaticProperty('DB_DataObject','options'), + 'path' => '/files') ); +$config['db'] = &PEAR::getStaticProperty('DB_DataObject','options'); + $config['db'] = array('database' => 'YOU HAVE TO SET THIS IN config.php', 'schema_location' => $INSTALLDIR . '/classes', @@ -279,10 +280,10 @@ function commmon_date_string($dt) { } function common_redirect($url, $code=307) { - static $status = (301 => "Moved Permanently", - 302 => "Found", - 303 => "See Other", - 307 => "Temporary Redirect"); + static $status = array(301 => "Moved Permanently", + 302 => "Found", + 303 => "See Other", + 307 => "Temporary Redirect"); header("Status: ${code} $status[$code]"); header("Location: $url"); common_element('a', array('href' => $url), $url); @@ -299,4 +300,6 @@ function common_broadcast_notices($id) { // XXX: set up gettext -function _t($str) { $str } +function _t($str) { + return $str; +} diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 1795969f9..d74e226d8 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } class SettingsAction extends Action { diff --git a/lib/stream.php b/lib/stream.php index 6b2ab24ff..2b8361a73 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } define('NOTICES_PER_PAGE', 20); |