Permalink
Browse files

version 0.8.8-alpha

  • Loading branch information...
1 parent 0213707 commit 04fc76463202702d6bd147be99ee516c5a00e07d @phpfreak committed Sep 6, 2011
Showing 693 changed files with 23,206 additions and 2,737 deletions.
View
@@ -0,0 +1,79 @@
+~~~~~~~~~~~~~~~~~~~
+System requirements
+~~~~~~~~~~~~~~~~~~~
+
+ProjectPier requires a PHP web server and MySQL. The recommended web
+server is Apache, but IIS 5 and above have been reported to work also.
+
+ProjectPier is not PHP4 compatible.
+
+Recommended configuration:
+
+: PHP 5.1 or greater
+: MySQL 4.1 or greater with InnoDB support (see notes below)
+: Apache 2.0 or greater
+
+If you do not have these installed on a server or your personal computer,
+you can visit the sites below to learn more about how to download and install
+them. They are all licensed under various compatible Open Source licenses.
+: PHP : http://www.php.net/
+: MySQL : http://www.mysql.com/
+: Apache : http://www.apache.org/
+
+~~~~~~~~~~~~
+Installation
+~~~~~~~~~~~~
+
+1. Make sure your server meets the requirements, see notes below regarding
+ enabling InnoDB support.
+2. Download ProjectPier from the project website - http://www.projectpier.org/.
+3. Unpack and upload the files to your web server.
+4. Direct your browser to the /public/install directory and follow the installation
+ procedure.
+
+~~~~~~~~~~~~~~~~~~~~~~~
+Enabling InnoDB Support
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Some installations of MySQL don't support InnoDB by default. The ProjectPier installer
+will tell you if your server is not configured to support InnoDB. This is easy to fix:
+
+1. Open your MySQL options file, the file name is my.cnf (Linux) - usually at /etc/my.cnf
+ or my.ini (Windows) - usually at c:/windows/my.ini. If you are using the Uniform Server
+ on Windows, the file will be named 'my-small' and will need to be edited with a unix
+ compatible editor such as PSPad or EditPad Lite.
+2. Comment the skip-innodb line by adding # in front of it (like #skip-innodb).
+3. It would also be good to increase max_allowed_packet to ensure that
+ you'll be able to upload files larger than 1MB. Just add this
+ line bellow #skip-innodb line:
+ set-variable = max_allowed_packet=64M
+
+Alternatively, just install without InnoDB support. The installer will allow you.
+
+~~~~~~~~~~~~~~~~~~~~~
+Changing the Language
+~~~~~~~~~~~~~~~~~~~~~
+
+ProjectPier installation screens are in English and English is the default language
+for the program. After installation is complete, the language can be changed.
+
+The following base languages are available:
+nl_nl = Dutch
+en_us = English (US)
+de_de = German
+es_es = Spanish
+fr_fr = French
+
+Other languages packs may be available for download at the site.
+
+~~~~~~~~~~~~~~~~
+Acknowledgements
+~~~~~~~~~~~~~~~~
+We would like to say thank you to all who are using this software and took the time to
+install the test versions. We were happy with the feedback and the contributions.
+In particular the following individuals get a special thank you:
+
+SethZora - for his remarks, ideas and testing
+Kemie - for fixing the Marine theme
+jokoe - for the French translation
+visor7 - for the Spanish translation
@@ -11,7 +11,7 @@
trace(__FILE__, 'begin');
define('FILE_STORAGE_FILE_SYSTEM', 'fs');
define('FILE_STORAGE_MYSQL', 'mysql');
- define('TOKEN_COOKIE_NAME', 'pp087' . TABLE_PREFIX);
+ define('TOKEN_COOKIE_NAME', 'pp088' . TABLE_PREFIX);
//$installation_root = config_option('installation_root', dirname($_SERVER['PHP_SELF']) );
$path=$_SERVER['PHP_SELF'];
$path=substr($path, 0, strpos($path, 'index.php'));
@@ -34,10 +34,10 @@
VersionChecker::check(false);
} // if
if (config_option('file_storage_adapter', 'mysql') == FILE_STORAGE_FILE_SYSTEM) {
- trace(__FILE__, 'CompanyWebsite::init() - use file storage');
+ trace(__FILE__, 'FileRepository::setBackend() - use file storage');
FileRepository::setBackend(new FileRepository_Backend_FileSystem(FILES_DIR));
} else {
- trace(__FILE__, 'CompanyWebsite::init() - use mysql storage');
+ trace(__FILE__, 'FileRepository::setBackend() - use mysql storage');
FileRepository::setBackend(new FileRepository_Backend_MySQL(DB::connection()->getLink(), TABLE_PREFIX));
} // if
@@ -244,6 +244,14 @@ function complete_installation() {
$administrator->save();
+ // Create the contact for administrator
+ $administrator_contact = new Contact();
+ $administrator_contact->setId(1);
+ $administrator_contact->setCompanyId(1);
+ $administrator_contact->setEmail(array_var($form_data, 'admin_email'));
+ $administrator_contact->setUserId($administrator->getId());
+ $administrator_contact->setDisplayName($administrator->getUsername());
+
// Create a company
$company = new Company();
$company->setId(1);
@@ -246,6 +246,7 @@ function update_permissions() {
} // if
tpl_assign('user', $user);
+ tpl_assign('contact', $user->getContact());
tpl_assign('company', $company);
tpl_assign('projects', $projects);
tpl_assign('permissions', $permissions);
@@ -59,7 +59,7 @@ function company() {
*/
function members() {
tpl_assign('company', owner_company());
- tpl_assign('users', owner_company()->getUsers());
+ tpl_assign('users', owner_company()->getContacts());
} // members
/**
@@ -320,7 +320,16 @@ function browse_log() {
} // browse_log
-
+ // ---------------------------------------------------
+ // Plugins
+ // ---------------------------------------------------
+
+ /**
+ * Displays all local plugins (enabled or not)
+ *
+ * @param void
+ * @return null
+ */
function plugins() {
trace(__FILE__,'plugins()');
$plugins = Plugins::getAllPlugins();
@@ -409,11 +418,11 @@ function update_plugins() {
}
}
}
- if ( count($errors) )
+ if ( count($errors) ) {
flash_error(lang('plugin activation failed', implode(", ",$errors)));
- else
+ } else {
flash_success(lang('plugins updated'));
-
+ }
$this->redirectTo('administration','plugins');
} // update
@@ -39,14 +39,14 @@ protected function setSidebar($template) {
* @access public
* @return null
*/
- function canGoOn()
- {
- if(active_project() == null || !logged_user()->isProjectUser(active_project()))
- {
- flash_error(lang('no access permissions'));
- $this->redirectTo('dashboard');
- } // if
- }// end canGoOn
+ function canGoOn()
+ {
+ if(active_project() == null || !logged_user()->isProjectUser(active_project()))
+ {
+ flash_error(lang('no access permissions'));
+ $this->redirectTo('dashboard', 'index');
+ } // if
+ }// end canGoOn
} // ApplicationController
@@ -39,7 +39,13 @@ function card() {
$this->redirectToReferer(ROOT_URL);
} // if
+ $contacts = $company->getContacts();
+ $active_projects = $company->getActiveProjects();
+
tpl_assign('company', $company);
+ tpl_assign('contacts', $contacts);
+ tpl_assign('active_projects', $active_projects);
+ $this->setSidebar(get_template_path('company_card_sidebar', 'company'));
} // card
/**
@@ -490,6 +496,43 @@ function hide_welcome_info() {
$this->redirectTo('dashboard');
} // hide_welcome_info
+
+ /**
+ * Toggle favorite status
+ *
+ * @param void
+ * @return null
+ */
+ function toggle_favorite() {
+ if (!logged_user()->isAdministrator()) {
+ flash_error('no access permisssions');
+ $this->redirectToReferer(get_url('dashboard'));
+ }
+
+ $company = Companies::findById(get_id());
+ if (!($company instanceof Company)) {
+ flash_error(lang('company dnx'));
+ $this->redirectToReferer(get_url('administration'));
+ } // if
+
+ if ($company->isOwner()) {
+ flash_error('no access permissions');
+ $this->redirectToReferer(get_url('dashboard'));
+ } // if
+
+ $company->setIsFavorite(!$company->isFavorite());
+
+ if (!$company->save()) {
+ flash_error(lang('could not save info'));
+ }
+
+ $redirect_to = urldecode(array_var($_GET, 'redirect_to'));
+ if ((trim($redirect_to)) == '' || !is_valid_url($redirect_to)) {
+ $redirect_to = $company->getViewUrl();
+ } // if
+
+ $this->redirectToUrl($redirect_to);
+ } // toggle_favorite
} // CompanyController
Oops, something went wrong.

0 comments on commit 04fc764

Please sign in to comment.