* 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 {
* 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 {
* 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 {
* 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) {
* 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 {
* 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 {
* 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 {
* 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 {
* 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 {
* 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 {
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'),
* 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);
}
common_element('a', array('href' => common_local_url('subscriptions',
- array('profile' => $profile->nickname))
+ array('profile' => $profile->nickname)),
'class' => 'moresubscriptions'),
_t('All subscriptions'));
* 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) {
* 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 {
* 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 {
* 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
* 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
* 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
* 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
* 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
*/
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
* 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
/* 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);
'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',
}
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);
// XXX: set up gettext
-function _t($str) { $str }
+function _t($str) {
+ return $str;
+}
* 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 {
* 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);