fixes to make it all lint
Ran everything through php -l, found out that it didn't compile. So: fixed the am-I-running-in-Laconica check at the top of each file. Some syntax fixes in shownotice, showstream, common. darcs-hash:20080517154701-84dde-8d38da89c5b9cb3b40704adb04a4de880c204181.gz
This commit is contained in:
parent
ffc729453d
commit
3b14b7901c
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
|
||||
?>
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user