mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:45:16 +02:00
Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
This commit is contained in:
parent
77dfbaa0bf
commit
e36f2bb1fb
212 changed files with 5160 additions and 5160 deletions
|
@ -58,7 +58,7 @@ if ((isset($title)) && (isset($text)) && (isset($url))) {
|
|||
}
|
||||
|
||||
if (isset($_POST['submit'])) {
|
||||
|
||||
|
||||
if (($_POST["friendica_acct_name"] != '') && ($_POST["friendica_password"] != '')) {
|
||||
$acctname = $_POST["friendica_acct_name"];
|
||||
$tmp_account_array = explode("@", $acctname);
|
||||
|
@ -70,32 +70,32 @@ if (isset($_POST['submit'])) {
|
|||
$content = $_POST["content"];
|
||||
|
||||
$url = "http://" . $hostname . '/api/statuses/update';
|
||||
$data = array('status' => $content);
|
||||
|
||||
$data = ['status' => $content];
|
||||
|
||||
// echo "posting to: $url<br/>";
|
||||
|
||||
$c = curl_init();
|
||||
curl_setopt($c, CURLOPT_URL, $url);
|
||||
curl_setopt($c, CURLOPT_URL, $url);
|
||||
curl_setopt($c, CURLOPT_USERPWD, "$username:$password");
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $data);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $data);
|
||||
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
|
||||
$c_result = curl_exec($c);
|
||||
if(curl_errno($c)){
|
||||
$c_result = curl_exec($c);
|
||||
if(curl_errno($c)){
|
||||
$error = curl_error($c);
|
||||
showForm($error, $content);
|
||||
}
|
||||
|
||||
|
||||
curl_close($c);
|
||||
if (!isset($error)) {
|
||||
echo '<script language="javascript" type="text/javascript">window.close();</script>';
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$error = "Missing account name and/or password...try again please";
|
||||
showForm($error, $content);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
showForm(null, $content);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ if (isset($_POST['submit'])) {
|
|||
function showForm($error, $content) {
|
||||
$username_cookie = $_COOKIE['username'];
|
||||
$password_cookie = $_COOKIE['password'];
|
||||
|
||||
|
||||
echo <<<EOF
|
||||
<div class='wrap1'>
|
||||
<h2><img class='logo' src='friendica-32.png' align='middle';/>
|
||||
|
@ -121,7 +121,7 @@ function showForm($error, $content) {
|
|||
<p></p>
|
||||
</div>
|
||||
EOF;
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue