Permalink
Browse files

Minor fixes.

  • Loading branch information...
1 parent dc8569b commit 77fc4367486ea81a3a608ae4f65baa8ce1aa4782 @deiu deiu committed Apr 22, 2012
Showing with 39 additions and 26 deletions.
  1. +7 −0 bootstrap/bootstrap.css
  2. +2 −2 friends.php
  3. +28 −22 install.php
  4. +2 −2 profile.php
View
@@ -685,8 +685,15 @@ select[multiple] {
background-color: #ffffff;
}
textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
height: auto;
}
+
+textarea.bigtext {
+ height: 200px;
+ width: 600px;
+}
+
.uneditable-input {
background-color: #ffffff;
display: block;
View
@@ -53,7 +53,7 @@
// show something if there are friends for this webid
if (strlen($friends) > 0) {
- $ret .= '<script>
+ $ret .= '<script type="text/javascript">
var list = "' . (string)$friends . '";
var uris = list.split(",");
@@ -64,7 +64,7 @@
}
</script>';
- $ret .= '<script>
+ $ret .= '<script type="text/javascript">
var list = "' . (string)$friends . '";
var uris = list.split(",");
View
@@ -205,16 +205,6 @@ function split_sql_file($sql, $delimiter)
// proceed only if we have an empty database
if (mysql_num_rows(mysql_query("SHOW TABLES FROM " . $db_database)) == 0) {
- // create tables
- $sql_query = @fread(@fopen($db_schema, 'r'), @filesize($db_schema)) or die('problem ');
- $sql_query = remove_remarks($sql_query);
- $sql_query = split_sql_file($sql_query, ';');
-
- foreach($sql_query as $sql){
- mysql_query($sql) or die('error in query');
- }
- $sql_status = "<p><font color=\"green\"><strong>Success!</strong></font> " . mysql_num_rows(mysql_query("SHOW TABLES FROM " . $db_database)) . " database tables have been created.</p>\n";
-
// write configuration to config.php
$cf = fopen('config.php', 'w') or die('Cannot create the config.php file!');
@@ -247,26 +237,42 @@ function split_sql_file($sql, $delimiter)
fclose($cf);
$cf_status = "<p><font color=\"green\"><strong>Success!</strong></font> Configuration file has been saved to disk.</p>\n";
- // create cache dir
- if (!mkdir('cache/', 0775)) {
- die('Failed to create cache/ dir...');
- } else {
+ // create cache dir if it doesn't exist
+ if (!is_dir('cache/')) {
+ if (!mkdir('cache/', 0775))
+ die('Failed to create cache/ dir...');
$cache_status = "<p><font color=\"green\"><strong>Success!</strong></font> Cache dir has been created.</p>\n";
+ } else {
+ $cache_status = "<p><strong>Skipped.</strong> Cache dir already exists.</p>\n";
}
- // create logs dir
- if (!mkdir('logs/', 0775)) {
- die('Failed to create logs/ dir...');
- } else {
+ // create logs dir if it doesn't exist
+ if (!is_dir('logs/')) {
+ if (!mkdir('logs/', 0775))
+ die('Failed to create logs/ dir...');
$logs_status = "<p><font color=\"green\"><strong>Success!</strong></font> Logs dir has been created.</p>\n";
+ } else {
+ $logs_status = "<p><strong>Skipped.</strong> Logs dir already exists.</p>\n";
}
- // create dir where we store profiles
- if (!mkdir('people/', 0775)) {
- die('Failed to create people/ dir...');
- } else {
+ // create dir where we store profiles if it doesn't exist
+ if (!is_dir('people/')) {
+ if (!mkdir('people/', 0775))
+ die('Failed to create people/ dir...');
$people_status = "<p><font color=\"green\"><strong>Success!</strong></font> Profile root dir has been created.</p>\n";
+ } else {
+ $people_status = "<p><strong>Skipped.</strong> Profile root dir already exists.</p>\n";
+ }
+
+ // create database tables
+ $sql_query = @fread(@fopen($db_schema, 'r'), @filesize($db_schema)) or die('problem ');
+ $sql_query = remove_remarks($sql_query);
+ $sql_query = split_sql_file($sql_query, ';');
+
+ foreach($sql_query as $sql){
+ mysql_query($sql) or die('error in query');
}
+ $sql_status = "<p><font color=\"green\"><strong>Success!</strong></font> " . mysql_num_rows(mysql_query("SHOW TABLES FROM " . $db_database)) . " database tables have been created.</p>\n";
// display success
$ret .= "<p><font align=\"left\" style=\"font-size: 2em; text-shadow: 0 1px 1px #cccccc;\">MyProfile Installation</font></p>\n";
View
@@ -271,8 +271,8 @@
if (!isset($_REQUEST['action']))
$_REQUEST['action'] = 'new';
- // If needed load a bogus profile to be able to display the form
- $profile = (isset($_SESSION['myprofile'])) ? $_SESSION['myprofile'] : new MyProfile(null, $base_uri);
+ // If needed, load a bogus profile to be able to display the form
+ $profile = ((isset($_SESSION['myprofile'])) && ($_REQUEST['action'] == 'edit')) ? $_SESSION['myprofile'] : new MyProfile(null, $base_uri);
echo $profile->get_title($_REQUEST['action']);
echo $profile->form($_REQUEST['action']);

0 comments on commit 77fc436

Please sign in to comment.