We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b53391e5 authored by Evan Prodromou's avatar Evan Prodromou

Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x

parents 7dd532b6 7cfbe7c2

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -24,7 +24,7 @@
* @author Evan Prodromou <evan@status.net>
* @author Zach Copley <zach@status.net>
* @author Sarven Capadisli <csarven@status.net>
* @copyright 2008-2010 StatusNet, Inc.
* @copyright 2008-2011 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
......@@ -92,7 +92,6 @@ class PathsadminpanelAction extends AdminPanelAction
'site' => array('path', 'locale_path', 'ssl', 'sslserver'),
'theme' => array('server', 'dir', 'path', 'sslserver', 'sslpath'),
'avatar' => array('server', 'dir', 'path'),
'background' => array('server', 'dir', 'path', 'sslserver', 'sslpath'),
'attachments' => array('server', 'dir', 'path', 'sslserver', 'sslpath')
);
......@@ -163,14 +162,6 @@ class PathsadminpanelAction extends AdminPanelAction
$this->clientError(sprintf(_('Avatar directory not writable: %s.'), $values['avatar']['dir']));
}
// Validate background dir
if (empty($values['background']['dir']) || !is_writable($values['background']['dir'])) {
// TRANS: Client error in Paths admin panel.
// TRANS: %s is the background directory that could not be written to.
$this->clientError(sprintf(_('Background directory not writable: %s.'), $values['background']['dir']));
}
// Validate locales dir
// XXX: What else do we need to validate for lacales path here? --Z
......
......@@ -142,7 +142,8 @@ class Memcached_DataObject extends Safe_DataObject
if (count($toFetch) > 0) {
$i = DB_DataObject::factory($cls);
if (empty($i)) {
throw new Exception(_('Cannot instantiate class ' . $cls));
// TRANS: Exception thrown when a program code class (%s) cannot be instantiated.
throw new Exception(sprintf(_('Cannot instantiate class %s.'),$cls));
}
foreach ($otherCols as $otherKeyCol => $otherKeyVal) {
$i->$otherKeyCol = $otherKeyVal;
......@@ -249,7 +250,8 @@ class Memcached_DataObject extends Safe_DataObject
{
$i = DB_DataObject::factory($cls);
if (empty($i)) {
throw new Exception(_('Cannot instantiate a ' . $cls));
// TRANS: Exception thrown when a program code class (%s) cannot be instantiated.
throw new Exception(sprintf(_('Cannot instantiate class %s.'),$cls));
}
$types = $i->keyTypes();
ksort($types);
......@@ -305,7 +307,8 @@ class Memcached_DataObject extends Safe_DataObject
if (count($toFetch) > 0) {
$i = DB_DataObject::factory($cls);
if (empty($i)) {
throw new Exception(_('Cannot instantiate class ' . $cls));
// TRANS: Exception thrown when a program code class (%s) cannot be instantiated.
throw new Exception(sprintf(_('Cannot instantiate class %s.'),$cls));
}
$i->whereAddIn($keyCol, $toFetch, $i->columnType($keyCol));
if ($i->find()) {
......
......@@ -317,7 +317,6 @@ class ApiAction extends Action
$twitter_status['source'] = $source;
$twitter_status['id'] = intval($notice->id);
$twitter_status['statusnet_conversation_id'] = intval($notice->conversation);
$replier_profile = null;
......@@ -376,7 +375,7 @@ class ApiAction extends Action
// StatusNet-specific
$twitter_status['statusnet_html'] = $notice->rendered;
$twitter_status['statusnet_conversation_id'] = $notice->conversation;
$twitter_status['statusnet_conversation_id'] = intval($notice->conversation);
return $twitter_status;
}
......
......@@ -41,7 +41,6 @@ define('MEMBERS_PER_SECTION', 27);
* @author Zach Copley <zach@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*
*/
class GroupAction extends Action
{
......@@ -140,12 +139,11 @@ class GroupAction extends Action
'class' => 'section'));
if (Event::handle('StartShowGroupMembersMiniList', array($this))) {
// TRANS: Header for mini list of group members on a group page (h2).
$this->elementStart('h2');
$this->element('a', array('href' => common_local_url('groupmembers', array('nickname' =>
$this->group->nickname))),
// TRANS: Header for mini list of group members on a group page (h2).
_('Members'));
$this->text(' ');
......@@ -176,7 +174,6 @@ class GroupAction extends Action
$this->elementEnd('div');
}
function showPending()
{
if ($this->group->join_policy != User_group::JOIN_POLICY_MODERATE) {
......@@ -204,6 +201,7 @@ class GroupAction extends Action
$this->element('a', array('href' => common_local_url('groupqueue', array('nickname' =>
$this->group->nickname))),
// TRANS: Header for mini list of users with a pending membership request on a group page (h2).
_('Pending'));
$this->text(' ');
......@@ -238,6 +236,7 @@ class GroupAction extends Action
$this->element('a', array('href' => common_local_url('blockedfromgroup', array('nickname' =>
$this->group->nickname))),
// TRANS: Header for mini list of users that are blocked in a group page (h2).
_('Blocked'));
$this->text(' ');
......@@ -279,7 +278,6 @@ class GroupAction extends Action
$adminSection->show();
}
function noticeFormOptions()
{
$options = parent::noticeFormOptions();
......@@ -376,4 +374,3 @@ class ThreadingGroupNoticeStream extends ThreadingNoticeStream
parent::__construct(new GroupNoticeStream($group, $profile));
}
}
......@@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class GroupProfileBlock extends ProfileBlock
{
protected $group = null;
......
......@@ -413,9 +413,7 @@ abstract class Installer
'server' => $this->server,
'path' => $this->path,
'db_database' => $this->db['database'],
'db_type' => $this->db['type'],
'site_profile' => $this->siteProfile,
'nickname' => $this->adminNick
'db_type' => $this->db['type']
));
// assemble configuration file in a string
......@@ -435,8 +433,34 @@ abstract class Installer
// database
"\$config['db']['database'] = {$vals['db_database']};\n\n".
($this->db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
"\$config['db']['type'] = {$vals['db_type']};\n\n".
"\$config['db']['type'] = {$vals['db_type']};\n\n";
// Normalize line endings for Windows servers
$cfg = str_replace("\n", PHP_EOL, $cfg);
// write configuration file out to install directory
$res = file_put_contents(INSTALLDIR.'/config.php', $cfg);
return $res;
}
/**
* Write the site profile. We do this after creating the initial user
* in case the site profile is set to single user. This gets around the
* 'chicken-and-egg' problem of the system requiring a valid user for
* single user mode, before the intial user is actually created. Yeah,
* we should probably do this in smarter way.
*
* @return int res number of bytes written
*/
function writeSiteProfile()
{
$vals = $this->phpVals(array(