Merge branch 'master' of https://github.com/redmatrix/redmatrix
This commit is contained in:
commit
291f3beccf
2
boot.php
2
boot.php
@ -49,7 +49,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||
define ( 'ZOT_REVISION', 1 );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1140 );
|
||||
define ( 'DB_UPDATE_VERSION', 1141 );
|
||||
|
||||
/**
|
||||
* @brief Constant with a HTML line break.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1140 );
|
||||
define( 'UPDATE_VERSION' , 1141 );
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1602,4 +1602,25 @@ function update_r1139() {
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function update_r1140() {
|
||||
$r = q("select * from clients where true");
|
||||
$x = false;
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
$m = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
|
||||
dbesc($rr['client_id']),
|
||||
intval($rr['uid']),
|
||||
dbesc('all')
|
||||
);
|
||||
if(! $m)
|
||||
$x = true;
|
||||
}
|
||||
}
|
||||
if($x)
|
||||
return UPDATE_FAILED;
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,18 +95,23 @@ function settings_post(&$a) {
|
||||
dbesc($name),
|
||||
dbesc($redirect),
|
||||
dbesc($icon),
|
||||
local_channel(),
|
||||
intval(local_channel()),
|
||||
dbesc($key));
|
||||
} else {
|
||||
$r = q("INSERT INTO clients
|
||||
(client_id, pw, name, redirect_uri, icon, uid)
|
||||
VALUES ('%s','%s','%s','%s','%s',%d)",
|
||||
dbesc($key),
|
||||
dbesc($secret),
|
||||
dbesc($name),
|
||||
dbesc($redirect),
|
||||
dbesc($icon),
|
||||
local_channel());
|
||||
$r = q("INSERT INTO clients (client_id, pw, name, redirect_uri, icon, uid)
|
||||
VALUES ('%s','%s','%s','%s','%s',%d)",
|
||||
dbesc($key),
|
||||
dbesc($secret),
|
||||
dbesc($name),
|
||||
dbesc($redirect),
|
||||
dbesc($icon),
|
||||
intval(local_channel())
|
||||
);
|
||||
$r = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
|
||||
dbesc($key),
|
||||
intval(local_channel()),
|
||||
dbesc('all')
|
||||
);
|
||||
}
|
||||
}
|
||||
goaway($a->get_baseurl(true)."/settings/oauth/");
|
||||
|
@ -1 +1 @@
|
||||
2015-05-13.1031
|
||||
2015-05-14.1032
|
||||
|
Reference in New Issue
Block a user