From: <re...@us...> - 2007-09-21 09:53:54
|
Revision: 563 http://sciret.svn.sourceforge.net/sciret/?rev=563&view=rev Author: reinerj Date: 2007-09-21 02:53:52 -0700 (Fri, 21 Sep 2007) Log Message: ----------- update the trunk to stable Modified Paths: -------------- trunk/CHANGELOG trunk/CONTRIBUTORS trunk/TODO trunk/VERSION trunk/actions/DeleteArticle.php trunk/actions/EditUser.php trunk/actions/Install.php trunk/actions/Login.php trunk/actions/MailArticle.php trunk/actions/SaveArticle.php trunk/actions/SaveCategory.php trunk/actions/SavePreferences.php trunk/actions/Upgrade.php trunk/classes/Controller.php trunk/fckeditor/editor/_source/classes/fckcontextmenu.js trunk/fckeditor/editor/_source/classes/fckdataprocessor.js trunk/fckeditor/editor/_source/classes/fckdomrange.js trunk/fckeditor/editor/_source/classes/fckdomrange_gecko.js trunk/fckeditor/editor/_source/classes/fckdomrange_ie.js trunk/fckeditor/editor/_source/classes/fckeditingarea.js trunk/fckeditor/editor/_source/classes/fckenterkey.js trunk/fckeditor/editor/_source/classes/fckevents.js trunk/fckeditor/editor/_source/classes/fckicon.js trunk/fckeditor/editor/_source/classes/fckiecleanup.js trunk/fckeditor/editor/_source/classes/fckkeystrokehandler.js trunk/fckeditor/editor/_source/classes/fckpanel.js trunk/fckeditor/editor/_source/classes/fckspecialcombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarbutton.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js trunk/fckeditor/editor/_source/commandclasses/fck_othercommands.js trunk/fckeditor/editor/_source/commandclasses/fckfitwindow.js trunk/fckeditor/editor/_source/commandclasses/fcktablecommand.js trunk/fckeditor/editor/_source/fckeditorapi.js trunk/fckeditor/editor/_source/fckscriptloader.js trunk/fckeditor/editor/_source/internals/fck.js trunk/fckeditor/editor/_source/internals/fck_contextmenu.js trunk/fckeditor/editor/_source/internals/fck_gecko.js trunk/fckeditor/editor/_source/internals/fck_ie.js trunk/fckeditor/editor/_source/internals/fckcommands.js trunk/fckeditor/editor/_source/internals/fckconfig.js trunk/fckeditor/editor/_source/internals/fckdocumentprocessor.js trunk/fckeditor/editor/_source/internals/fckdomtools.js trunk/fckeditor/editor/_source/internals/fcklanguagemanager.js trunk/fckeditor/editor/_source/internals/fcklistslib.js trunk/fckeditor/editor/_source/internals/fckselection.js trunk/fckeditor/editor/_source/internals/fckselection_gecko.js trunk/fckeditor/editor/_source/internals/fckselection_ie.js trunk/fckeditor/editor/_source/internals/fcktablehandler.js trunk/fckeditor/editor/_source/internals/fcktoolbarset.js trunk/fckeditor/editor/_source/internals/fcktools.js trunk/fckeditor/editor/_source/internals/fcktools_gecko.js trunk/fckeditor/editor/_source/internals/fcktools_ie.js trunk/fckeditor/editor/_source/internals/fckxhtml.js trunk/fckeditor/editor/_source/internals/fckxhtml_ie.js trunk/fckeditor/editor/_source/internals/fckxhtmlentities.js trunk/fckeditor/editor/dialog/fck_flash/fck_flash.js trunk/fckeditor/editor/dialog/fck_image/fck_image.js trunk/fckeditor/editor/dialog/fck_link/fck_link.js trunk/fckeditor/editor/dialog/fck_paste.html trunk/fckeditor/editor/dialog/fck_replace.html trunk/fckeditor/editor/dialog/fck_smiley.html trunk/fckeditor/editor/dialog/fck_specialchar.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm trunk/fckeditor/editor/dialog/fck_tablecell.html trunk/fckeditor/editor/fckdialog.html trunk/fckeditor/editor/fckeditor.html trunk/fckeditor/editor/filemanager/browser/default/browser.css trunk/fckeditor/editor/filemanager/browser/default/browser.html trunk/fckeditor/editor/filemanager/browser/default/frmfolders.html trunk/fckeditor/editor/filemanager/browser/default/frmresourceslist.html trunk/fckeditor/editor/filemanager/browser/default/frmupload.html trunk/fckeditor/editor/lang/_translationstatus.txt trunk/fckeditor/editor/lang/cs.js trunk/fckeditor/editor/lang/en-au.js trunk/fckeditor/editor/lang/en-ca.js trunk/fckeditor/editor/lang/en-uk.js trunk/fckeditor/editor/lang/en.js trunk/fckeditor/editor/lang/fi.js trunk/fckeditor/editor/lang/he.js trunk/fckeditor/editor/lang/zh-cn.js trunk/fckeditor/editor/lang/zh.js trunk/fckeditor/editor/plugins/tablecommands/fckplugin.js trunk/fckeditor/editor/skins/default/fck_dialog.css trunk/fckeditor/editor/skins/default/fck_strip.gif trunk/fckeditor/editor/skins/office2003/fck_dialog.css trunk/fckeditor/editor/skins/office2003/fck_strip.gif trunk/fckeditor/editor/skins/silver/fck_dialog.css trunk/fckeditor/editor/skins/silver/fck_strip.gif trunk/fckeditor/fckconfig.js trunk/fckeditor/fckeditor.js trunk/fckeditor/fckpackager.xml trunk/flowMap.php trunk/javascript/general.js trunk/languages/ChineseTraditional.txt trunk/languages/Czech.txt trunk/languages/Deutsch.txt trunk/languages/Dutch.txt trunk/languages/English.txt trunk/languages/Hebrew.txt trunk/languages/Italian.txt trunk/languages/Japanese.txt trunk/languages/Norsk.txt trunk/languages/Russian.txt trunk/languages/Spanish.txt trunk/languages/Svenska.txt trunk/models/Article.php trunk/models/ArticleGateway.php trunk/models/ArticleIterator.php trunk/models/Configuration.php trunk/models/Question.php trunk/models/User.php trunk/models/UserGateway.php trunk/setup/final.sql trunk/setup/sampleData.sql trunk/setup/versions.php trunk/templates/EditArticle.tpl trunk/templates/EditBookmark.tpl trunk/templates/EditCategories.tpl trunk/templates/EditCategory.tpl trunk/templates/EditPreferences.tpl trunk/templates/EditUser.tpl trunk/templates/MainView.tpl trunk/templates/RelatedArticles.tpl trunk/templates/ViewArticle.tpl trunk/templates/head.tpl trunk/templates/header.tpl trunk/views/EditArticle.php trunk/views/EditCategories.php trunk/views/EditPreferences.php trunk/views/EditUser.php trunk/views/InstallEnterCredentials.php trunk/views/MainView.php trunk/views/View.php trunk/views/ViewArticle.php trunk/views/ViewBookmark.php Modified: trunk/CHANGELOG =================================================================== --- trunk/CHANGELOG 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/CHANGELOG 2007-09-21 09:53:52 UTC (rev 563) @@ -1,20 +1,124 @@ -2007-08-24 Lucie Goga <lg...@th...> - * Add Italian translation from two students +2007-09-21 Lucie Goga <lg...@th...> + * Sciret 1.2.0 release -2007-07-18 Lucie Goga <lg...@th...> - * Sciret 1.1.0 - * extention Send mail as UTF-8, patch reported from Rune Hammersland +2007-09-03 Lucie Goga <lg...@th...> + * Sciret 1.2.0-RC1 + * Sciret language packs 1.2.0 +2007-09-05 Alejandro Pedraza <ale...@gm...> + * [BUG] Fix in the upgrade fuction + getValidatedUser() needs the config array to need what version we're on + +2007-09-03 Lucie Goga <lg...@th...> + * update language file Russian, Spanish, Svenska. + * update Roadmap + +2007-09-02 Lucie Goga <lg...@th...> + * update language file Hebrew, Japanese, Italian, Norsk, Russian, Spanish. + The file are sorted and extended. + +2007-08-24 Lucie Goga <lg...@th...> + * Add Italian translation from two students + * update language file Chinesetraditional, Czech, Dutch. + The file are sorted and extended. + +2007-08-22 Lucie Goga <lg...@th...> + * Add SF patch 1778378 from Trond Viggo Håpnes. This patch + Restrict the possibility to modify and delete articles. + * update German lang file + +2007-08-22 Alejandro Pedraza <ale...@gm...> + * [BUG] Fix SF bug 1778175 Bookmark save as draft + * [BUG] Fix SF bug 1772632 Expiration Date in Bookmarks + +2007-08-20 Lucie Goga <lg...@th...> + * Update the English and German lang file. + +2007-08-19 Lucie Goga <lg...@th...> + * Update the English and German lang file. + +2007-08-19 Alejandro Pedraza <ale...@gm...> + * New feature: download pdf for article + * New feature: repeat password field to avoid typos + * SQL Error + +2007-08-18 Alejandro Pedraza <ale...@gm...> + * FCKEditor: Make the config a little smarter by figuring out itself + where the upload dir must go + * Added explanatory message to error list + * Killed ConfigNotWritable view. Show missing requirements in the view + where the db credentials are shown. Also have additional + checks: for db version and check if upload dirs are writable. + +2007-08-16 Reiner Jung <rj...@th...> + * Update the English and German lang file. Files are sorted now and + duplicates are removed + +2007-08-16 Lucie Goga <lg...@th...> + * release 1.2.0-svn-r487 + * Add SF patch 1775353 from Trond Viggo Håpnes. This patch + allows / disallow coments and ratings. + +2007-08-16 Alejandro Pedraza <ale...@gm...> + * Allow users can manage the categories and hide them with the + Manage categories. + +2007-08-15 Lucie Goga <lg...@th...> + * [BUG] Add SF patch 1772600 from Trond Viggo Håpnes. This patch + allows the admin to remove the icon from a (sub)category. + +2007-08-13 Alejandro Pedraza <ale...@gm...> + * Show original question for articles that answer a question. + When an article was made to answer a question, show the + question text between the title and the article excerpt in + the list view, and between the title and the category in + the article detail view. Also, when an article that answers + a question is shown on the list view, use a question mark + as an icon, instead of the sheet icon currently used. + * update db structure + +2007-08-10 Reiner Jung <rj...@th...> + * Add SF patch 1765899 from Trond Viggo Håpnes. This patch removes + the mail-link from ViewArticle if the article is marked + for internal use only + * Fixed a typing error in EditArticle.tpl + +2007-08-04 Alejandro Pedraza <ale...@gm...> + * Let registered users edit their own profile. + * Added functionality to expire passwords and oblige users to + change them when that happens + * Be able to decide whether the KB is public or not + (set by the admin, in the preferences section) + +2007-08-02 Reiner Jung <rj...@th...> + * Add SF patch 1771482 from Trond Viggo Håpnes. This patch will + let the administrator decide if new articles should be marked + for internal or public use. Only the administrator can change + status on an article from internal to public. You can not email + an article marked for internal use only. + +2007-07-28 Reiner Jung <rj...@th...> + * Update the setup scripts for Sciret 1.2.0 + * Add SF patch 1762272 from Rune Hammersland. This patch enables + the admin to choose between sending e-mails through sendmail or + through an SMTP server of his choosing. The admin can also + choose the name and address used when sending e-mails. + * Update language files for SMTP settings + * Update Norsk translation + +2007-07-23 Reiner Jung <rj...@th...> + * Add XCache to the Sciret documentation. OpenBSD howto is still + missing with xcache + +2007-07-18 Lucie Goga <lg...@th...> + * Sciret 1.1.0 release + 2007-07-15 Alejandro Pedraza <ale...@gm...> * [BUG] Fix problem to send mail from Sciret 2007-07-12 Lucie Goga <lg...@th...> * Add Norwegian translation from Rune Hammersland -2007-07-10 Reiner Jung <rj...@th...> - * [BUG] Fix a problem that saving a draft article didn't appear - in the unpublished and drafts list - 2007-06-29 Reiner Jung <rj...@th...> * update scriptulus to last version Modified: trunk/CONTRIBUTORS =================================================================== --- trunk/CONTRIBUTORS 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/CONTRIBUTORS 2007-09-21 09:53:52 UTC (rev 563) @@ -1,9 +1,10 @@ Contributors to Sciret development - Patch contribution * Nikolai Essel submitted patches to sciret 0.9 and 1.1 + * Rune Hammersland submitted patches to sciret 1.1 and 1.2 + * Trond Viggo Håpnes submitted patches to sciret 1.2 Translations @@ -11,7 +12,7 @@ * Dutch translation R. de Milde * Hebrew translation from SF user Golanor * Japanese translation from SF user tm800720 - * Norwegian translation from Rune Hammersland + * Norway translation from Rune Hammersland * Swedish translation from Henrik Christensson Testing Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/TODO 2007-09-21 09:53:52 UTC (rev 563) @@ -1,30 +1,27 @@ -1.2 Release -- When edit a category and select a icon, the icon should be visible as a preview and not after it is selected -- Password protected access to Sciret that only signed in users have access. Should be a configuration option (SF request 1704597) -- A Question should be visible also in the categories where the question is assigned so long as it is answered. It must be marked - that it is clear visible this is a question -- Automatic password reset for users (SF request 1704597) -- Preferences for a user based view of the screen -- Pre Installation check for Sciret (Check the right file system rights ...) - 1.3 Release -- New User Interface for Sciret based on the work from Nuno Pinheiro +- Introduce group support. Admin can restrict access to User based work groups +- Search for articles by registerd users +- Make an article appear in more than one category +- Add tags and tag search to article, bookmarks and documents +- Admin must change the default password after first login 1.4 Release -- Document Management Functionality -- Add tags and tag search to article, bookmarks and documents +- New User Interface for Sciret based on the work from Nuno Pinheiro - Ubuntu/Debian Packages +- Cancel Editing +- Send mail as PDF 1.5 Release -- Introduce group support. Groups from admin for restricrted access and User based work groups -- Create PDF from Article +- Document Management Functionality +- A category will be only visible when there is a article or bookmark in. Otherwise it will be hidden - Authentication again LDAP - Authentication again AD 1.6 Release - One Time Passwords - Authentication with Secure Token -- Search for articles by registered users +- Category Content [Feature RQID 1776663] +- What links here [Feature RQ ID 1776661] 1.7 Release - Sciret will use PHPUnit testing. This will delay our further releases, but will give it more stability Modified: trunk/VERSION =================================================================== --- trunk/VERSION 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/VERSION 2007-09-21 09:53:52 UTC (rev 563) @@ -1 +1 @@ -1.1.0-SVN-Release-428 +1.2.0-SVN-Release-554 Modified: trunk/actions/DeleteArticle.php =================================================================== --- trunk/actions/DeleteArticle.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/DeleteArticle.php 2007-09-21 09:53:52 UTC (rev 563) @@ -17,6 +17,15 @@ function dispatch() { $artId = isset($_GET['id'])? (int)$_GET['id'] : 0; + if ($this->configuration->getConfigValue('restrictEditDelete')) { + $article = new Article($artId); + + if ($article->getUserId() != $this->user->getId() && ($this->user->getRole() & ROLE_ADMIN) != ROLE_ADMIN) { + $_SESSION['message'] = $this->user->lang('Sorry, only the author or an admin can delete this article.'); + Library::redirect(Library::getLink(array('view' => 'ViewArticle', 'id' => $artId))); + } + } + $articleGateway = new ArticleGateway; $articleGateway->delete($artId); Modified: trunk/actions/EditUser.php =================================================================== --- trunk/actions/EditUser.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/EditUser.php 2007-09-21 09:53:52 UTC (rev 563) @@ -15,6 +15,13 @@ class EditUser extends Action { function dispatch() { + + // security check + if (!$this->user->isAdmin() && $this->user->getId() != $_POST['userId']) { + $_SESSION['message'] = $this->user->lang('What are you trying to do??'); + Library::redirect(Library::getLink(array('view' => 'Login'))); + } + $userId = (int)$_POST['userId']; $user = new User($userId); @@ -36,18 +43,21 @@ $missingFieldsArr[] = $this->user->lang('password'); } - if (!$user->setPassword($_POST['password'])) { + $invalidPassword = false; + if ($_POST['password'] != $_POST['password2']) { + $_SESSION['message'] = $this->user->lang('Password and Repeat Password fields don\'t match'); + $invalidPassword = true; + } + elseif (!$user->setPassword($_POST['password'])) { $_SESSION['message'] = $this->user->lang('Invalid password. Please don\'t use any of these characters: %s', implode($user->getDisallowedPasswordChars())); $invalidPassword = true; - } else { - $invalidPassword = false; } if ($missingFieldsArr) { $_SESSION['message'] = $this->user->lang('You need to fill the following fields: ').implode(', ', $missingFieldsArr); } - if ($missingFields || $invalidPassword) { + if ($missingFieldsArr || $invalidPassword) { $_SESSION['formFields'] = array( 'firstName' => $_POST['firstName'], 'lastName' => $_POST['lastName'], @@ -60,19 +70,30 @@ } } else { - if ($_POST['password'] != '') { - if (!$user->changePassword($_POST['password'])) { - $_SESSION['message'] = $this->user->lang('Invalid password. Please don\'t use any of these characters: %s', implode(', ', $user->getDisallowedPasswordChars())); + + if ( + $user->isPasswordExpired($this->configuration->getConfigValue('passwordExpirationDays')) + && $user->getPassword() == md5($_POST['password']) + ) + { + $_SESSION['message'] = $this->user->lang('Your password has expired. Please change it below.'); Library::redirect(Library::getLink(array('view' => 'EditUser', 'userId' => $user->getId()))); - } } + + if ($_POST['password'] != $_POST['password2']) { + $_SESSION['message'] = $this->user->lang('Password and Repeat Password fields don\'t match'); + Library::redirect(Library::getLink(array('view' => 'EditUser', 'userId' => $user->getId()))); + } elseif (!$user->changePassword($_POST['password'])) { + $_SESSION['message'] = $this->user->lang('Invalid password. Please don\'t use any of these characters: %s', implode(', ', $user->getDisallowedPasswordChars())); + Library::redirect(Library::getLink(array('view' => 'EditUser', 'userId' => $user->getId()))); + } } $user->setFirstName($_POST['firstName']); $user->setLastName($_POST['lastName']); $user->setUserName($_POST['userName']); $user->setEmail($_POST['email']); - $user->setAdmin(isset($_POST['adminAccess'])); + $user->setAdmin($this->user->isAdmin() && isset($_POST['adminAccess'])); $user->save(); if (!$user->getId()) { @@ -80,7 +101,12 @@ } else { $_SESSION['message'] = $this->user->lang('User edited successfully'); } - Library::redirect(Library::getLink(array('view' => 'ManageUsers'))); + + if ($this->user->isAdmin()) { + Library::redirect(Library::getLink(array('view' => 'ManageUsers'))); + } else { + Library::redirect(Library::getLink(array('view' => 'EditUser', 'userId' => $user->getId()))); + } } } Modified: trunk/actions/Install.php =================================================================== --- trunk/actions/Install.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/Install.php 2007-09-21 09:53:52 UTC (rev 563) @@ -17,13 +17,6 @@ function dispatch() { - // is_writable() not working under windows - if (!$fp = @fopen(dirname(__FILE__).'/../config.php', 'a')) { - Library::redirect(Library::getLink(array('view' => 'ConfigNotWritable'))); - } else { - fclose($fp); - } - if (!isset($_GET['step'])) { $_GET['step'] = 0; } @@ -35,17 +28,35 @@ case 1: $this->db =& DB::DBFactory(DB_ENGINE, $_POST['host'], $_POST['username'], $_POST['password'], true); if (!$this->db->connect()) { - Library::redirect(Library::getLink(array('view' => 'InstallEnterCredentials', 'error' => urlencode($this->user->lang('Couldn\'t connect to database'))))); + Library::redirect(Library::getLink(array('view' => 'InstallEnterCredentials', 'error' => urlencode($this->user->lang('Couldn\'t connect to database, please check your credentials.'))))); } + + $errors = array(); + if (!$this->_isConfigWritable()) { + $errors[] = $this->user->lang('The config.php file must be writable'); + } + if (!$this->_areUploadDirsWritable()) { + $errors[] = $this->user->lang('All directories under the "uploads" and "uploads/editor" directories must be writable'); + } + if ($this->db->isLowerThan41()) { + $errors[] = $this->user->lang('You need a MySQL version no lower than 4.1'); + } + if (!$this->db->selectDb($_POST['database'])) { if (!$result = $this->db->createDB($_POST['database'])) { - Library::redirect(Library::getLink(array('view' => 'InstallEnterCredentials', 'error' => urlencode($this->user->lang('Couldn\'t create database. Please create it manually and try again.'))))); + $errors[] = $this->user->lang('Couldn\'t create database. Please create it manually and try again.'); + } else { + $this->db->selectDb($_POST['database']); } - $this->db->selectDb($_POST['database']); } + + if ($errors) { + Library::redirect(Library::getLink(array('view' => 'InstallEnterCredentials', 'error' => urlencode(implode('<br />', $errors))))); + } + $this->_writeConfig(DB_ENGINE, $_POST['host'], $_POST['database'], $_POST['username'], $_POST['password']); $this->_runSQLFILE('final.sql'); - if (isset($_POST['demodata'])) { + if (isset($_POST['demodata']) && $_POST['demodata']) { $this->_runSQLFILE('sampleData.sql'); } Library::redirect(Library::getLink(array('view' => 'InstallOk'))); @@ -101,6 +112,31 @@ } fclose($fp); } + + function _isConfigWritable() { + // is_writable() not working under windows + if (!$fp = @fopen(dirname(__FILE__).'/../config.php', 'a')) { + return false; + } + fclose($fp); + + return true; + } + + function _areUploadDirsWritable() { + foreach (array('files', 'icons', 'editor/File', 'editor/Flash', 'editor/Image', 'editor/Media') as $folder) { + // is_writable() not working under windows + if (!$fp = @fopen(dirname(__FILE__)."/../uploads/$folder/eraseme.txt", 'a')) { + return false; + } else { + fclose($fp); + unlink(dirname(__FILE__)."/../uploads/$folder/eraseme.txt"); + } + + } + + return true; + } } ?> Modified: trunk/actions/Login.php =================================================================== --- trunk/actions/Login.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/Login.php 2007-09-21 09:53:52 UTC (rev 563) @@ -16,12 +16,18 @@ function dispatch() { require 'models/UserGateway.php'; $userGateway = new UserGateway; - if (!$user = $userGateway->getValidatedUser($_POST['username'], $_POST['password'])) { + if (!$user = $userGateway->getValidatedUser($_POST['username'], $_POST['password'], $this->configuration)) { $_SESSION['message'] = $this->user->lang('Wrong Username or Password'); Library::redirect(Library::getLink(array('view' => 'Login'))); } $_SESSION['userId'] = $user->getId(); + + if ($user->isPasswordExpired($this->configuration->getConfigValue('passwordExpirationDays'))) { + $_SESSION['message'] = $this->user->lang('Your password has expired. Please change it below.'); + Library::redirect(Library::getLink(array('view' => 'EditUser', 'userId' => $user->getId()))); + } + Library::redirect(Library::getLink(array('view' => 'MainView'))); } } Modified: trunk/actions/MailArticle.php =================================================================== --- trunk/actions/MailArticle.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/MailArticle.php 2007-09-21 09:53:52 UTC (rev 563) @@ -23,7 +23,10 @@ if (!$article->getId()) { die($this->user->lang('Invalid article ID')); } - + if ($article->isInternal()) { + $_SESSION['message'] = $this->user->lang('Sorry, this article is for internal use only.'); + Library::redirect(Library::getLink(array('view' => 'ViewArticle', 'id' => $articleId))); + } if ($_POST['recipient'] == '' || !preg_match($this->regexp_valid_email, $_POST['recipient'])) { $_SESSION['message'] = $this->user->lang('Invalid recipient'); Library::redirect(Library::getLink(array('view' => 'MailArticle', 'artId' => $articleId))); @@ -33,9 +36,8 @@ Library::redirect(Library::getLink(array('view' => 'MailArticle', 'artId' => $articleId))); } - $mail = new PHPMailer(); - $mail->IsSendmail(); - $mail->CharSet = "utf-8"; + $mail = $this->setUpMailer(); + if ($_POST['replyTo'] != '') { $mail->AddReplyTo($_POST['replyTo']); } @@ -58,6 +60,30 @@ $_SESSION['message'] = $this->user->lang('E-mail has been successfuly sent'); Library::redirect(Library::getLink(array('view' => 'ViewArticle', 'id' => $articleId))); } + + function setUpMailer() { + $mail = new PHPMailer(); + + $config = $this->configuration; + $transport = $config->getConfigValue('mailTransport'); + + if ($transport == 'smtp') { + $mail->IsSMTP(); + $mail->Host = $config->getConfigValue('smtpServer'); + $mail->Username = $config->getConfigValue('smtpUser'); + $mail->Password = $config->getConfigValue('smtpPassword'); + $mail->Port = $config->getConfigValue('smtpPort'); + } else if ($transport == 'sendmail') { + $mail->IsSendmail(); + } + + $mail->CharSet = "utf-8"; + $mail->FromName = $config->getConfigValue('mailFromName'); + $mail->From = $config->getConfigValue('mailFromMail'); + + return $mail; + } + } ?> Modified: trunk/actions/SaveArticle.php =================================================================== --- trunk/actions/SaveArticle.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/SaveArticle.php 2007-09-21 09:53:52 UTC (rev 563) @@ -17,6 +17,15 @@ function dispatch() { $articleId = isset($_POST['articleId'])? (int)$_POST['articleId'] : 0; + if ($articleId > 0 && $this->configuration->getConfigValue('restrictEditDelete')) { + $article = new Article($articleId); + + if ($article->getUserId() != $this->user->getId() && ($this->user->getRole() & ROLE_ADMIN) != ROLE_ADMIN) { + $_SESSION['message'] = $this->user->lang('Sorry, only the author or an admin can modify this article.'); + Library::redirect(Library::getLink(array('view' => 'ViewArticle', 'id' => $articleId))); + } + } + // validation if ($_POST['title'] == '') { $_SESSION['message'] = $this->user->lang('Article can\'t be saved without a title.'); @@ -28,6 +37,12 @@ $art->setTitle($_POST['title']); $art->setContent($_POST['content']); + if (!isset($_POST['usage_id'])) { + $art->setInternal($this->configuration->getConfigValue('internalByDefault')? 1 : 0); + } else { + $art->setInternal($_POST['usage_id']); + } + if ($_POST['expDate'] == '') { $art->setExpDate('0000-00-00'); } else { @@ -39,14 +54,15 @@ $art->setModifiedByUserId($this->user->getId()); $historyMessage = $this->user->lang('Article modified'); } else { - $art->setPublished(($this->configuration->getConfigValue('publishArticlesAuto') == '1' && $_POST['draft'] != 1)? true : false); + $art->setPublished($this->configuration->getConfigValue('publishArticlesAuto') == '1'? true : false); $art->setUserId($this->user->getId()); $historyMessage = $this->user->lang('Article created'); if (isset($_POST['questionID'])) { - require 'models/QuestionGateway.php'; - $questionGateway = new QuestionGateway; - $questionGateway->delete($_POST['questionID']); + require 'models/Question.php'; + $question = new Question($_POST['questionID']); + $art->setQuestion($question->getContents()); + $question->delete(); } } $art->setDraft($_POST['draft']); Modified: trunk/actions/SaveCategory.php =================================================================== --- trunk/actions/SaveCategory.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/SaveCategory.php 2007-09-21 09:53:52 UTC (rev 563) @@ -26,9 +26,7 @@ $category->setParentId($_POST['parentCategory']); $category->setLabel($_POST['name']); $category->setDescription($_POST['description']); - if ($_POST['icon'] != 'blank.gif') { - $category->setIconFileName($_POST['icon']); - } + $category->setIconFileName($_POST['icon']); $category->save(); $_SESSION['message'] = $this->user->lang('Category saved successfully'); Modified: trunk/actions/SavePreferences.php =================================================================== --- trunk/actions/SavePreferences.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/SavePreferences.php 2007-09-21 09:53:52 UTC (rev 563) @@ -33,10 +33,22 @@ } if (($this->user->getRole() & ROLE_ADMIN) == ROLE_ADMIN) { + $this->configuration->setConfigValue('publishKB', $_POST['publishKB'] == '1'? '1' : '0'); $this->configuration->setConfigValue('publishArticlesAuto', $_POST['publishArticlesAuto'] == '1'? '1' : '0'); $this->configuration->setConfigValue('publishBookmarksAuto', $_POST['publishBookmarksAuto'] == '1'? '1' : '0'); $this->configuration->setConfigValue('publishCommentsAuto', $_POST['publishCommentsAuto'] == '1'? '1' : '0'); $this->configuration->setConfigValue('publishQuestionsAuto', $_POST['publishQuestionsAuto'] == '1'? '1' : '0'); + $this->configuration->setConfigValue('internalByDefault', $_POST['internalByDefault'] == '1'? '1' : '0'); + $this->configuration->setConfigValue('allowCommentsRatings', $_POST['allowCommentsRatings'] == '1'? '1' : '0'); + $this->configuration->setConfigValue('restrictEditDelete', $_POST['restrictEditDelete'] == '1'? '1' : '0'); + $this->configuration->setConfigValue('passwordExpirationDays', $_POST['passwordExpirationDays']); + $this->configuration->setConfigValue('mailTransport', $_POST['mailTransport'] == 'smtp' ? 'smtp' : 'sendmail'); + $this->configuration->setConfigValue('mailFromName', $_POST['mailFromName']); + $this->configuration->setConfigValue('mailFromMail', $_POST['mailFromMail']); + $this->configuration->setConfigValue('smtpServer', $_POST['smtpServer']); + $this->configuration->setConfigValue('smtpUser', $_POST['smtpUser']); + $this->configuration->setConfigValue('smtpPassword', $_POST['smtpPassword']); + $this->configuration->setConfigValue('smtpPort', $_POST['smtpPort']); $this->configuration->save(); } Modified: trunk/actions/Upgrade.php =================================================================== --- trunk/actions/Upgrade.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/actions/Upgrade.php 2007-09-21 09:53:52 UTC (rev 563) @@ -17,7 +17,7 @@ function dispatch() { require 'models/UserGateway.php'; $this->userGateway = new UserGateway; - if (!($user = $this->userGateway->getValidatedUser($_POST['username'], $_POST['password'])) || !$user->isAdmin()) { + if (!($user = $this->userGateway->getValidatedUser($_POST['username'], $_POST['password'], $this->configuration)) || !$user->isAdmin()) { $_SESSION['message'] = $this->user->lang('Wrong Username or Password'); Library::redirect(Library::getLink(array('view' => 'Upgrade'))); } Modified: trunk/classes/Controller.php =================================================================== --- trunk/classes/Controller.php 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/classes/Controller.php 2007-09-21 09:53:52 UTC (rev 563) @@ -12,6 +12,8 @@ define('MINIMUM_ROLE', 0); define('LOAD_CONFIGURATION', 1); define('SHOW_HEADER', 2); +define('ALLOW_VIEW_ONLY_IF_PUBLIC_KB', 3); +define('ALLOW_ACTION_ONLY_IF_PUBLIC_KB', 2); require 'models/Configuration.php'; @@ -52,7 +54,14 @@ $this->user->setSkipTranslations(true); } - if (($this->user->getRole() & $this->views[$view][MINIMUM_ROLE]) != $this->views[$view][MINIMUM_ROLE]) { + if ( + // user hasn't got enough privileges + (($this->user->getRole() & $this->views[$view][MINIMUM_ROLE]) != $this->views[$view][MINIMUM_ROLE]) + + // or user is anonymous and KB is not public + || ($this->user->getRole() == ROLE_ANONYMOUS && $this->views[$view][ALLOW_VIEW_ONLY_IF_PUBLIC_KB] && !$this->configuration->getConfigValue('publishKB')) + ) + { Library::redirect(Library::getLink(array('view' => 'Login'))); } require "views/$view.php"; Modified: trunk/fckeditor/editor/_source/classes/fckcontextmenu.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckcontextmenu.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckcontextmenu.js 2007-09-21 09:53:52 UTC (rev 563) @@ -94,9 +94,11 @@ FCKTools.CancelEvent( e ) ; FCKContextMenu_AttachedElement_OnContextMenu( e, el._FCKContextMenu, el ) ; + return false ; } el = el.parentNode ; } + return true ; } function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el ) @@ -140,4 +142,4 @@ { contextMenu._Panel.Hide() ; FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ; -} \ No newline at end of file +} Modified: trunk/fckeditor/editor/_source/classes/fckdataprocessor.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckdataprocessor.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckdataprocessor.js 2007-09-21 09:53:52 UTC (rev 563) @@ -79,16 +79,8 @@ if ( FCKBrowserInfo.IsIE && FCKConfig.DocType.length > 0 && !FCKRegexLib.Html4DocType.test( FCKConfig.DocType ) ) html += ' style="overflow-y: scroll"' ; - html += '><head><title></title></head><body' ; - - // Add id and class to the body. - if ( FCKConfig.BodyId.length > 0 ) - html += ' id="' + FCKConfig.BodyId + '"' ; - if ( FCKConfig.BodyClass.length > 0 ) - html += ' class="' + FCKConfig.BodyClass + '"' ; - - html += - '>' + + html += '><head><title></title></head>' + + '<body' + FCKConfig.GetBodyAttributes() + '>' + data + '</body></html>' ; Modified: trunk/fckeditor/editor/_source/classes/fckdomrange.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckdomrange.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckdomrange.js 2007-09-21 09:53:52 UTC (rev 563) @@ -276,6 +276,71 @@ this._UpdateElementInfo() ; }, + // Non-intrusive bookmark algorithm + CreateBookmark2 : function() + { + // If there is no range then get out of here. + // It happens on initial load in Safari #962 and if the editor it's hidden also in Firefox + if ( ! this._Range ) + return { "Start" : 0, "End" : 0 } ; + + // First, we record down the offset values + var bookmark = + { + "Start" : [ this._Range.startOffset ], + "End" : [ this._Range.endOffset ] + } ; + // Then, we record down the precise position of the container nodes + // by walking up the DOM tree and counting their childNode index + var curNode = this._Range.startContainer ; + while ( curNode && curNode != this.Window.document.documentElement ) + { + var curParent = curNode.parentNode ; + for( var i = 0 ; i < curParent.childNodes.length ; i++ ) + { + if ( curParent.childNodes.item( i ) == curNode ) + { + bookmark.Start.unshift( i ) ; + break ; + } + } + curNode = curParent; + } + curNode = this._Range.endContainer; + while ( curNode && curNode != this.Window.document.documentElement ) + { + var curParent = curNode.parentNode; + for ( var i = 0 ; i < curParent.childNodes.length ; i++ ) + { + if ( curParent.childNodes.item( i ) == curNode ) + { + bookmark.End.unshift( i ); + break; + } + } + curNode = curParent; + } + return bookmark; + }, + + MoveToBookmark2 : function( bookmark ) + { + // Reverse the childNode counting algorithm in CreateBookmark2() + var curStart = this.Window.document.documentElement ; + var curEnd = this.Window.document.documentElement ; + for ( var i = 0 ; i < bookmark.Start.length - 1 ; i++ ) + curStart = curStart.childNodes.item( bookmark.Start[ i ] ) ; + for ( var i = 0 ; i < bookmark.End.length - 1 ; i++ ) + curEnd = curEnd.childNodes.item( bookmark.End[ i ] ) ; + + // Generate the W3C Range object and update relevant data + this.Release( true ) ; + this._Range = new FCKW3CRange( this.Window.document ) ; + this._Range.setStart( curStart, bookmark.Start[ bookmark.Start.length - 1 ] ) ; + this._Range.setEnd( curEnd, bookmark.End[ bookmark.End.length - 1 ] ) ; + this._UpdateElementInfo() ; + }, + MoveToPosition : function( targetElement, position ) { this.SetStart( targetElement, position ) ; @@ -570,4 +635,20 @@ this.EndBlockLimit = null ; this._Range = null ; } -} ; \ No newline at end of file +} ; + +FCKDomRange.CompareCursors = function( cursor1, cursor2 ) +{ + for ( var i = 0 ; i < Math.min( cursor1.length, cursor2.length ) ; i++ ) + { + if ( cursor1[i] < cursor2[i] ) + return -1; + else if (cursor1[i] > cursor2[i] ) + return 1; + } + if ( cursor1.length < cursor2.length ) + return -1; + else if (cursor1.length > cursor2.length ) + return 1; + return 0; +} Modified: trunk/fckeditor/editor/_source/classes/fckdomrange_gecko.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckdomrange_gecko.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckdomrange_gecko.js 2007-09-21 09:53:52 UTC (rev 563) @@ -29,7 +29,7 @@ var oSel = this.Window.getSelection() ; - if ( oSel.rangeCount == 1 ) + if ( oSel && oSel.rangeCount > 0 ) { this._Range = FCKW3CRange.CreateFromRange( this.Window.document, oSel.getRangeAt(0) ) ; this._UpdateElementInfo() ; Modified: trunk/fckeditor/editor/_source/classes/fckdomrange_ie.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckdomrange_ie.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckdomrange_ie.js 2007-09-21 09:53:52 UTC (rev 563) @@ -33,15 +33,24 @@ if ( oSel.type != 'Control' ) { + var eMarkerStart = this._GetSelectionMarkerTag( true ) ; + var eMarkerEnd = this._GetSelectionMarkerTag( false ) ; + + if ( ! ( eMarkerStart && eMarkerEnd ) ) + { + this._Range.setStart( this.Window.document.body, 0 ); + this._Range.collapse( true ); + this._UpdateElementInfo(); + return; + } + // Set the start boundary. - eMarker = this._GetSelectionMarkerTag( true ) ; - this._Range.setStart( eMarker.parentNode, FCKDomTools.GetIndexOf( eMarker ) ) ; - eMarker.parentNode.removeChild( eMarker ) ; + this._Range.setStart( eMarkerStart.parentNode, FCKDomTools.GetIndexOf( eMarkerStart ) ) ; + eMarkerStart.parentNode.removeChild( eMarkerStart ) ; // Set the end boundary. - var eMarker = this._GetSelectionMarkerTag( false ) ; - this._Range.setEnd( eMarker.parentNode, FCKDomTools.GetIndexOf( eMarker ) ) ; - eMarker.parentNode.removeChild( eMarker ) ; + this._Range.setEnd( eMarkerEnd.parentNode, FCKDomTools.GetIndexOf( eMarkerEnd ) ) ; + eMarkerEnd.parentNode.removeChild( eMarkerEnd ) ; this._UpdateElementInfo() ; } @@ -122,6 +131,12 @@ var oRange = this.Window.document.selection.createRange() ; oRange.collapse( toStart === true ) ; + // IE might take the range object to the main window instead of inside the editor iframe window. + // This is known to happen when the editor window has not been selected before (See #933). + // We need to avoid that. + if (oRange.parentElement().document != this.Window.document) + return null; + // Paste a marker element at the collapsed range and get it from the DOM. var sMarkerId = 'fck_dom_range_temp_' + (new Date()).valueOf() + '_' + Math.floor(Math.random()*1000) ; oRange.pasteHTML( '<span id="' + sMarkerId + '"></span>' ) ; @@ -146,4 +161,4 @@ oRange.insertNode( eSpan ) ; return eSpan ; -} \ No newline at end of file +} Modified: trunk/fckeditor/editor/_source/classes/fckeditingarea.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckeditingarea.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckeditingarea.js 2007-09-21 09:53:52 UTC (rev 563) @@ -52,7 +52,12 @@ { // Create the editing area IFRAME. var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ; - oIFrame.src = 'javascript:void(0)' ; + + // Firefox will render the tables inside the body in Quirks mode if the + // source of the iframe is set to javascript. see #515 + if ( !FCKBrowserInfo.IsGecko ) + oIFrame.src = 'javascript:void(0)' ; + oIFrame.frameBorder = 0 ; oIFrame.width = oIFrame.height = '100%' ; @@ -130,6 +135,8 @@ eTextarea.dir = 'ltr' ; eTextarea.style.width = eTextarea.style.height = '100%' ; eTextarea.style.border = 'none' ; + // CSS3 http://www.w3.org/TR/css3-ui/#resize + eTextarea.style.resize = 'none' ; eTargetElement.appendChild( eTextarea ) ; eTextarea.value = html ; @@ -162,7 +169,13 @@ if ( FCKBrowserInfo.IsIE ) { + oDoc.body.unselectable = "on" ; oDoc.body.contentEditable = true ; + var enableFunc = function() + { + oDoc.body.removeAttribute("unselectable") ; + } + setTimeout( enableFunc, 1 ) ; /* The following commands don't throw errors, but have no effect. oDoc.execCommand( 'AutoDetect', false, false ) ; @@ -208,10 +221,42 @@ // Disable the standard table editing features of Firefox. oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ; } - catch (e) {} + catch (e) + { + // In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception + // So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is visible again + FCKTools.AddEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; + } + } } +// This function processes the notifications of the DOM Mutation event on the document +// We use it to know that the document will be ready to be editable again (or we hope so) +function FCKEditingArea_Document_AttributeNodeModified( evt ) +{ + var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ; + + // We want to run our function after the events no longer fire, so we can know that it's a stable situation + if ( editingArea._timer ) + window.clearTimeout( editingArea._timer ) ; + + editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ; +} + +// This function ideally should be called after the document is visible, it does clean up of the +// mutation tracking and tries again to make the area editable. +function FCKEditingArea_MakeEditableByMutation() +{ + // Clean up + delete this._timer ; + // Now we don't want to keep on getting this event + FCKTools.RemoveEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; + // Let's try now to set the editing area editable + // If it fails it will set up the Mutation Listener again automatically + this.MakeEditable() ; +} + FCKEditingArea.prototype.Focus = function() { try @@ -221,13 +266,21 @@ // The following check is important to avoid IE entering in a focus loop. Ref: // http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653 if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() ) + { + // In IE it can happen that the document is in theory focused but the active element is outside it + this.Document.body.setActive() ; return ; + } if ( FCKBrowserInfo.IsSafari ) this.IFrame.focus() ; else { this.Window.focus() ; + + // In IE it can happen that the document is in theory focused but the active element is outside it + if ( FCKBrowserInfo.IsIE ) + this.Document.body.setActive() ; } } else Modified: trunk/fckeditor/editor/_source/classes/fckenterkey.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckenterkey.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckenterkey.js 2007-09-21 09:53:52 UTC (rev 563) @@ -29,7 +29,7 @@ * @shiftEnterMode : the behavior for the <Shift>+<Enter> keystroke. * May be "p", "div", "br". Defaults to "br". */ -var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode ) +var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode, tabSpaces ) { this.Window = targetWindow ; this.EnterMode = enterMode || 'p' ; @@ -43,10 +43,18 @@ oKeystrokeHandler.SetKeystrokes( [ [ 13 , 'Enter' ], [ SHIFT + 13, 'ShiftEnter' ], + [ 9 , 'Tab' ], [ 8 , 'Backspace' ], [ 46 , 'Delete' ] ] ) ; + if ( tabSpaces > 0 ) + { + this.TabText = '' ; + while ( tabSpaces-- > 0 ) + this.TabText += '\xa0' ; + } + oKeystrokeHandler.AttachToElement( targetWindow.document ) ; } @@ -76,6 +84,9 @@ case 'Delete' : return oEnterKey.DoDelete() ; + break ; + case 'Tab' : + return oEnterKey.DoTab() ; } /* @Packager.RemoveLine } @@ -94,6 +105,9 @@ */ FCKEnterKey.prototype.DoEnter = function( mode, hasShift ) { + // Save an undo snapshot before doing anything + FCKUndo.SaveUndoStep() ; + this._HasShift = ( hasShift === true ) ; var sMode = mode || this.EnterMode ; @@ -124,7 +138,22 @@ oRange.MoveToSelection() ; if ( !oRange.CheckIsCollapsed() ) + { + // Bug #327, Backspace with an img selection would activate the default action in IE. + // Let's override that with our logic here. + if ( FCKBrowserInfo.IsIE && this.Window.document.selection.type.toLowerCase() == "control" ) + { + var controls = this.Window.document.selection.createRange() ; + for ( var i = controls.length - 1 ; i >= 0 ; i-- ) + { + var el = controls.item( i ) ; + el.parentNode.removeChild( el ) ; + } + return true ; + } + return false ; + } var oStartBlock = oRange.StartBlock ; var oEndBlock = oRange.EndBlock ; @@ -256,6 +285,10 @@ */ FCKEnterKey.prototype.DoDelete = function() { + // Save an undo snapshot before doing anything + // This is to conform with the behavior seen in MS Word + FCKUndo.SaveUndoStep() ; + // The <Delete> has the same effect as the <Backspace>, so we have the same // results if we just move to the next block and apply the same <Backspace> logic. @@ -279,6 +312,40 @@ return bCustom ; } +/* + * Executes the <Tab> key behavior. + */ +FCKEnterKey.prototype.DoTab = function() +{ + var oRange = new FCKDomRange( this.Window ); + oRange.MoveToSelection() ; + + // If the user pressed <tab> inside a table, we should give him the default behavior ( moving between cells ) + // instead of giving him more non-breaking spaces. (Bug #973) + var node = oRange._Range.startContainer ; + while ( node ) + { + if ( node.nodeType == 1 ) + { + var tagName = node.tagName.toLowerCase() ; + if ( tagName == "tr" || tagName == "td" || tagName == "th" || tagName == "tbody" || tagName == "table" ) + return false ; + else + break ; + } + node = node.parentNode ; + } + + if ( this.TabText ) + { + oRange.DeleteContents() ; + oRange.InsertNode( this.Window.document.createTextNode( this.TabText ) ) ; + oRange.Collapse( false ) ; + oRange.Select() ; + } + return true ; +} + FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range ) { // Get the current selection. @@ -338,7 +405,10 @@ else eNewBlock = this.Window.document.createElement( blockTag ) ; - if ( FCKBrowserInfo.IsGeckoLike ) + // Opera needs some text (even empty) to correctly position the caret (#214). + if ( FCKBrowserInfo.IsOpera ) + eNewBlock.appendChild( this.Window.document.createTextNode( '' ) ) ; + else if ( FCKBrowserInfo.IsGeckoLike ) eNewBlock.innerHTML = GECKO_BOGUS ; oRange.InsertNode( eNewBlock ) ; @@ -354,7 +424,7 @@ oRange.MoveToElementEditStart( bIsStartOfBlock ? eNextBlock : eNewBlock ) ; - if ( FCKBrowserInfo.IsGecko ) + if ( FCKBrowserInfo.IsGeckoLike ) eNewBlock.scrollIntoView( false ) ; } @@ -415,7 +485,7 @@ FCKDomTools.InsertAfterNode( eBr, this.Window.document.createTextNode( '' ) ) ; // If we are at the end of a block, we must be sure the bogus node is available in that block. - if ( bIsEndOfBlock && FCKBrowserInfo.IsGecko ) + if ( bIsEndOfBlock && FCKBrowserInfo.IsGeckoLike ) FCKTools.AppendBogusBr( eBr.parentNode ) ; if ( FCKBrowserInfo.IsIE ) @@ -456,4 +526,4 @@ range.MoveToBookmark( oBookmark ) ; range.Select() ; -} \ No newline at end of file +} Modified: trunk/fckeditor/editor/_source/classes/fckevents.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckevents.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckevents.js 2007-09-21 09:53:52 UTC (rev 563) @@ -46,7 +46,20 @@ if ( oCalls ) { for ( var i = 0 ; i < oCalls.length ; i++ ) - bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ; + { + try + { + bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ; + } + catch(e) + { + // Ignore the following error. It may happen if pointing to a + // script not anymore available (#934): + // -2146823277 = Can't execute code from a freed script + if ( e.number != -2146823277 ) + throw e ; + } + } } return bReturnValue ; Modified: trunk/fckeditor/editor/_source/classes/fckicon.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckicon.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckicon.js 2007-09-21 09:53:52 UTC (rev 563) @@ -74,7 +74,7 @@ eIcon = document.createElement( 'IMG' ) ; eIcon.src = FCK_SPACER_PATH ; eIcon.style.backgroundPosition = '0px ' + sPos ; - eIcon.style.backgroundImage = 'url(' + this.Path + ')' ; + eIcon.style.backgroundImage = 'url("' + this.Path + '")' ; } } else // It is using a single icon image. Modified: trunk/fckeditor/editor/_source/classes/fckiecleanup.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckiecleanup.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckiecleanup.js 2007-09-21 09:53:52 UTC (rev 563) @@ -43,7 +43,7 @@ function FCKIECleanup_Cleanup() { - if ( !this._FCKCleanupObj ) + if ( !this._FCKCleanupObj || !window.FCKUnloadFlag ) return ; var aItems = this._FCKCleanupObj.Items ; @@ -65,4 +65,4 @@ if ( CollectGarbage ) CollectGarbage() ; -} \ No newline at end of file +} Modified: trunk/fckeditor/editor/_source/classes/fckkeystrokehandler.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckkeystrokehandler.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckkeystrokehandler.js 2007-09-21 09:53:52 UTC (rev 563) @@ -133,4 +133,4 @@ } return true ; -} \ No newline at end of file +} Modified: trunk/fckeditor/editor/_source/classes/fckpanel.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckpanel.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckpanel.js 2007-09-21 09:53:52 UTC (rev 563) @@ -52,7 +52,21 @@ oIFrame.width = oIFrame.height = 0 ; if ( this._Window == window.parent && window.frameElement ) + { + var scrollPos = null ; + if ( FCKBrowserInfo.IsGecko && FCK && FCK.EditorDocument ) + scrollPos = [ FCK.EditorDocument.body.scrollLeft, FCK.EditorDocument.body.scrollTop ] ; window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ; + if ( scrollPos ) + { + var restoreFunc = function() + { + FCK.EditorDocument.body.scrollLeft = scrollPos[0] ; + FCK.EditorDocument.body.scrollTop = scrollPos[1] ; + } + setTimeout( restoreFunc, 500 ) ; + } + } else this._Window.document.body.appendChild( oIFrame ) ; @@ -60,9 +74,14 @@ oDocument = this.Document = oIFrameWindow.document ; + // Workaround for Safari 12256. Ticket #63 + var sBase = '' ; + if ( FCKBrowserInfo.IsSafari ) + sBase = '<base href="' + window.document.location + '">' ; + // Initialize the IFRAME document body. oDocument.open() ; - oDocument.write( '<html><head></head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ; + oDocument.write( '<html><head>' + sBase + '<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ; oDocument.close() ; FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ; @@ -156,7 +175,10 @@ // setting the _IFrame size (which returns "0"), and then after that, // to return the correct width. Remove the first step and it will not // work when the editor is in RTL. - iMainWidth = this.MainNode.offsetWidth ; + // + // The "|| this.MainNode.firstChild.offsetWidth" part has been added + // for Opera compatibility (see #570). + iMainWidth = this.MainNode.offsetWidth || this.MainNode.firstChild.offsetWidth ; var oPos = FCKTools.GetElementPosition( relElement.nodeType == 9 ? @@ -302,4 +324,4 @@ this._Window = null ; this.Document = null ; this.MainNode = null ; -} \ No newline at end of file +} Modified: trunk/fckeditor/editor/_source/classes/fckspecialcombo.js =================================================================== --- trunk/fckeditor/editor/_source/classes/fckspecialcombo.js 2007-09-21 09:35:20 UTC (rev 562) +++ trunk/fckeditor/editor/_source/classes/fckspecialcombo.js 2007-09-21 09:53:52 UTC (rev 563) @@ -1,363 +1,364 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2007 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKSpecialCombo Class: represents a special combo. - */ - -var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight, parentWindow ) -{ - // Default properties values. - this.FieldWidth = fieldWidth || 100 ; - this.PanelWidth = panelWidth || 150 ; - this.PanelMaxHeight = panelMaxHeight || 150 ; - this.Label = ' ' ; - this.Caption = caption ; - this.Tooltip = caption ; - this.Style = FCK_TOOLBARITEM_ICONTEXT ; - - this.Enabled = true ; - - this.Items = new Object() ; - - this._Panel = new FCKPanel( parentWindow || window ) ; - this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ; - this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; - this._PanelBox.className = 'SC_Panel' ; - this._PanelBox.style.width = this.PanelWidth + 'px' ; - - this._PanelBox.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ; - - this._ItemsHolderEl = this._PanelBox.getElementsByTagName('TD')[0] ; - - if ( FCK.IECleanup ) - FCK.IECleanup.AddItem( this, FCKSpecialCombo_Cleanup ) ; - -// this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ; -// this._Panel.Create() ; -// this._Panel.PanelDiv.className += ' SC_Panel' ; -// this._Panel.PanelDiv.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ; -// this._ItemsHolderEl = this._Panel.PanelDiv.getElementsByTagName('TD')[0] ; -} - -function FCKSpecialCombo_ItemOnMouseOver() -{ - this.className += ' SC_ItemOver' ; -} - -function FCKSpecialCombo_ItemOnMouseOut() -{ - this.className = this.originalClass ; -} - -function FCKSpecialCombo_ItemOnClick() -{ - this.className = this.originalClass ; - - this.FCKSpecialCombo._Panel.Hide() ; - - this.FCKSpecialCombo.SetLabel( this.FCKItemLabel ) ; - - if ( typeof( this.FCKSpecialCombo.OnSelect ) == 'function' ) - this.FCKSpecialCombo.OnSelect( this.FCKItemID, this ) ; -} - -FCKSpecialCombo.prototype.AddItem = function( id, html, label, bgColor ) -{ - // <div class="SC_Item" onmouseover="this.className='SC_Item SC_ItemOver';" onmouseout="this.className='SC_Item';"><b>Bold 1</b></div> - var oDiv = this._ItemsHolderEl.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; - oDiv.className = oDiv.originalClass = 'SC_Item' ; - oDiv.innerHTML = html ; - oDiv.FCKItemID = id ; - oDiv.FCKItemLabel = la... [truncated message content] |
From: <re...@us...> - 2007-09-21 09:58:22
|
Revision: 564 http://sciret.svn.sourceforge.net/sciret/?rev=564&view=rev Author: reinerj Date: 2007-09-21 02:58:18 -0700 (Fri, 21 Sep 2007) Log Message: ----------- update the trunk to stable Added Paths: ----------- trunk/tcpdf/ trunk/tcpdf/.eraseme.php.swp trunk/tcpdf/.eraseme2.php.swp trunk/tcpdf/.tcpdf.php.swp trunk/tcpdf/CHANGELOG.TXT trunk/tcpdf/LICENSE.TXT trunk/tcpdf/README.TXT trunk/tcpdf/barcode/ trunk/tcpdf/barcode/barcode.php trunk/tcpdf/barcode/c128aobject.php trunk/tcpdf/barcode/c128bobject.php trunk/tcpdf/barcode/c128cobject.php trunk/tcpdf/barcode/c39object.php trunk/tcpdf/barcode/i25object.php trunk/tcpdf/barcode/image.php trunk/tcpdf/barcode/lesser.txt trunk/tcpdf/cache/ trunk/tcpdf/config/ trunk/tcpdf/config/lang/ trunk/tcpdf/config/lang/eng.php trunk/tcpdf/config/tcpdf_config.php trunk/tcpdf/doc/ trunk/tcpdf/doc/blank.html trunk/tcpdf/doc/classtrees_com.tecnick.tcpdf.html trunk/tcpdf/doc/com.tecnick.tcpdf/ trunk/tcpdf/doc/com.tecnick.tcpdf/BarcodeObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C128AObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C128BObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C128CObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C39Object.html trunk/tcpdf/doc/com.tecnick.tcpdf/I25Object.html trunk/tcpdf/doc/com.tecnick.tcpdf/TCPDF.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_barcode_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c128aobject_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c128bobject_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c128cobject_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c39object_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_i25object_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_image_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_config_lang_eng_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_config_tcpdf_config_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_html_entity_decode_php4_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_tcpdf_php.html trunk/tcpdf/doc/elementindex.html trunk/tcpdf/doc/elementindex_com.tecnick.tcpdf.html trunk/tcpdf/doc/errors.html trunk/tcpdf/doc/index.html trunk/tcpdf/doc/li_com.tecnick.tcpdf.html trunk/tcpdf/doc/media/ trunk/tcpdf/doc/media/banner.css trunk/tcpdf/doc/media/stylesheet.css trunk/tcpdf/doc/packages.html trunk/tcpdf/fonts/ trunk/tcpdf/fonts/.noencode trunk/tcpdf/fonts/README.TXT trunk/tcpdf/fonts/dejavu-ttf-2.15/ trunk/tcpdf/fonts/dejavu-ttf-2.15/AUTHORS trunk/tcpdf/fonts/dejavu-ttf-2.15/BUGS trunk/tcpdf/fonts/dejavu-ttf-2.15/LICENSE trunk/tcpdf/fonts/dejavu-ttf-2.15/NEWS trunk/tcpdf/fonts/dejavu-ttf-2.15/README trunk/tcpdf/fonts/dejavu-ttf-2.15/langcover.txt trunk/tcpdf/fonts/dejavu-ttf-2.15/status.txt trunk/tcpdf/fonts/dejavu-ttf-2.15/unicover.txt trunk/tcpdf/fonts/dejavusans-bold.ctg.z trunk/tcpdf/fonts/dejavusans-bold.z trunk/tcpdf/fonts/dejavusans-boldoblique.ctg.z trunk/tcpdf/fonts/dejavusans-boldoblique.z trunk/tcpdf/fonts/dejavusans-extralight.ctg.z trunk/tcpdf/fonts/dejavusans-extralight.php trunk/tcpdf/fonts/dejavusans-extralight.z trunk/tcpdf/fonts/dejavusans-oblique.ctg.z trunk/tcpdf/fonts/dejavusans-oblique.z trunk/tcpdf/fonts/dejavusans.ctg.z trunk/tcpdf/fonts/dejavusans.php trunk/tcpdf/fonts/dejavusans.z trunk/tcpdf/fonts/dejavusansb.php trunk/tcpdf/fonts/dejavusansbi.php trunk/tcpdf/fonts/dejavusanscondensed-bold.ctg.z trunk/tcpdf/fonts/dejavusanscondensed-bold.z trunk/tcpdf/fonts/dejavusanscondensed-boldoblique.ctg.z trunk/tcpdf/fonts/dejavusanscondensed-boldoblique.z trunk/tcpdf/fonts/dejavusanscondensed-oblique.ctg.z trunk/tcpdf/fonts/dejavusanscondensed-oblique.z trunk/tcpdf/fonts/dejavusanscondensed.ctg.z trunk/tcpdf/fonts/dejavusanscondensed.php trunk/tcpdf/fonts/dejavusanscondensed.z trunk/tcpdf/fonts/dejavusanscondensedb.php trunk/tcpdf/fonts/dejavusanscondensedbi.php trunk/tcpdf/fonts/dejavusanscondensedi.php trunk/tcpdf/fonts/dejavusansi.php trunk/tcpdf/fonts/dejavusansmono-bold.ctg.z trunk/tcpdf/fonts/dejavusansmono-bold.z trunk/tcpdf/fonts/dejavusansmono-boldoblique.ctg.z trunk/tcpdf/fonts/dejavusansmono-boldoblique.z trunk/tcpdf/fonts/dejavusansmono-oblique.ctg.z trunk/tcpdf/fonts/dejavusansmono-oblique.z trunk/tcpdf/fonts/dejavusansmono.ctg.z trunk/tcpdf/fonts/dejavusansmono.php trunk/tcpdf/fonts/dejavusansmono.z trunk/tcpdf/fonts/dejavusansmonob.php trunk/tcpdf/fonts/dejavusansmonobi.php trunk/tcpdf/fonts/dejavusansmonoi.php trunk/tcpdf/fonts/dejavuserif-bold.ctg.z trunk/tcpdf/fonts/dejavuserif-bold.z trunk/tcpdf/fonts/dejavuserif-boldoblique.ctg.z trunk/tcpdf/fonts/dejavuserif-boldoblique.z trunk/tcpdf/fonts/dejavuserif-oblique.ctg.z trunk/tcpdf/fonts/dejavuserif-oblique.z trunk/tcpdf/fonts/dejavuserif.ctg.z trunk/tcpdf/fonts/dejavuserif.php trunk/tcpdf/fonts/dejavuserif.z trunk/tcpdf/fonts/dejavuserifb.php trunk/tcpdf/fonts/dejavuserifbi.php trunk/tcpdf/fonts/dejavuserifcondensed-bold.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed-bold.z trunk/tcpdf/fonts/dejavuserifcondensed-boldoblique.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed-boldoblique.z trunk/tcpdf/fonts/dejavuserifcondensed-oblique.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed-oblique.z trunk/tcpdf/fonts/dejavuserifcondensed.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed.php trunk/tcpdf/fonts/dejavuserifcondensed.z trunk/tcpdf/fonts/dejavuserifcondensedb.php trunk/tcpdf/fonts/dejavuserifcondensedbi.php trunk/tcpdf/fonts/dejavuserifcondensedi.php trunk/tcpdf/fonts/dejavuserifi.php trunk/tcpdf/fonts/freefont/ trunk/tcpdf/fonts/freefont/AUTHORS trunk/tcpdf/fonts/freefont/CREDITS trunk/tcpdf/fonts/freefont/ChangeLog trunk/tcpdf/fonts/freefont/INSTALL trunk/tcpdf/fonts/freefont/README trunk/tcpdf/fonts/freemono.ctg.z trunk/tcpdf/fonts/freemono.php trunk/tcpdf/fonts/freemono.z trunk/tcpdf/fonts/freemonob.php trunk/tcpdf/fonts/freemonobi.php trunk/tcpdf/fonts/freemonobold.ctg.z trunk/tcpdf/fonts/freemonobold.z trunk/tcpdf/fonts/freemonoboldoblique.ctg.z trunk/tcpdf/fonts/freemonoboldoblique.z trunk/tcpdf/fonts/freemonoi.php trunk/tcpdf/fonts/freemonooblique.ctg.z trunk/tcpdf/fonts/freemonooblique.z trunk/tcpdf/fonts/freesans.ctg.z trunk/tcpdf/fonts/freesans.php trunk/tcpdf/fonts/freesans.z trunk/tcpdf/fonts/freesansb.php trunk/tcpdf/fonts/freesansbi.php trunk/tcpdf/fonts/freesansbold.ctg.z trunk/tcpdf/fonts/freesansbold.z trunk/tcpdf/fonts/freesansboldoblique.ctg.z trunk/tcpdf/fonts/freesansboldoblique.z trunk/tcpdf/fonts/freesansi.php trunk/tcpdf/fonts/freesansoblique.ctg.z trunk/tcpdf/fonts/freesansoblique.z trunk/tcpdf/fonts/freeserif.ctg.z trunk/tcpdf/fonts/freeserif.php trunk/tcpdf/fonts/freeserif.z trunk/tcpdf/fonts/freeserifb.php trunk/tcpdf/fonts/freeserifbi.php trunk/tcpdf/fonts/freeserifbold.ctg.z trunk/tcpdf/fonts/freeserifbold.z trunk/tcpdf/fonts/freeserifbolditalic.ctg.z trunk/tcpdf/fonts/freeserifbolditalic.z trunk/tcpdf/fonts/freeserifi.php trunk/tcpdf/fonts/freeserifitalic.ctg.z trunk/tcpdf/fonts/freeserifitalic.z trunk/tcpdf/fonts/old/ trunk/tcpdf/fonts/old/.noencode trunk/tcpdf/fonts/old/courier.php trunk/tcpdf/fonts/old/helvetica.php trunk/tcpdf/fonts/old/helveticab.php trunk/tcpdf/fonts/old/helveticabi.php trunk/tcpdf/fonts/old/helveticai.php trunk/tcpdf/fonts/old/makefont/ trunk/tcpdf/fonts/old/makefont/cp1250.map trunk/tcpdf/fonts/old/makefont/cp1251.map trunk/tcpdf/fonts/old/makefont/cp1252.map trunk/tcpdf/fonts/old/makefont/cp1253.map trunk/tcpdf/fonts/old/makefont/cp1254.map trunk/tcpdf/fonts/old/makefont/cp1255.map trunk/tcpdf/fonts/old/makefont/cp1257.map trunk/tcpdf/fonts/old/makefont/cp1258.map trunk/tcpdf/fonts/old/makefont/cp874.map trunk/tcpdf/fonts/old/makefont/iso-8859-1.map trunk/tcpdf/fonts/old/makefont/iso-8859-11.map trunk/tcpdf/fonts/old/makefont/iso-8859-15.map trunk/tcpdf/fonts/old/makefont/iso-8859-16.map trunk/tcpdf/fonts/old/makefont/iso-8859-2.map trunk/tcpdf/fonts/old/makefont/iso-8859-4.map trunk/tcpdf/fonts/old/makefont/iso-8859-5.map trunk/tcpdf/fonts/old/makefont/iso-8859-7.map trunk/tcpdf/fonts/old/makefont/iso-8859-9.map trunk/tcpdf/fonts/old/makefont/koi8-r.map trunk/tcpdf/fonts/old/makefont/koi8-u.map trunk/tcpdf/fonts/old/makefont/makefont.php trunk/tcpdf/fonts/old/symbol.php trunk/tcpdf/fonts/old/times.php trunk/tcpdf/fonts/old/timesb.php trunk/tcpdf/fonts/old/timesbi.php trunk/tcpdf/fonts/old/timesi.php trunk/tcpdf/fonts/old/zapfdingbats.php trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/ trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/COPYRIGHT.TXT trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/README.TXT trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/RELEASENOTES.TXT trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/local.conf trunk/tcpdf/fonts/ttf2ufm/ trunk/tcpdf/fonts/ttf2ufm/README.TXT trunk/tcpdf/fonts/ttf2ufm/makefontuni.php trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/CHANGES trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/CHANGES.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/COPYRIGHT trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/FONTS.hpux.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/FONTS.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/Makefile trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/README.FIRST trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/RPM/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/RPM/ttf2pt1.spec.src trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/cjk-latex-config trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/cjk-latex-t1mapgen trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/sfd2map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/t1-xf86.334.patch trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/t1-xf86.39.patch trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/Makefile trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/fontsz.cf trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/notscape trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nsfilter trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nsfix.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nspr trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nsprint trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/psfonts.cf trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/bdf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/bitmap.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/byteorder.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/cygbuild.sh trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/adobestd/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/adobestd/adobe-std.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/README trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/encodings.alias trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/ibm-1251.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/ibm-866.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/iso8859-5.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/koi8-r.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/encodings.alias trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/ibm-1251.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/ibm-866.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/iso8859-5.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/koi8-r.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin1/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin1/iso8859-1.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin2/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin2/iso8859-2.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin4/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin4/iso8859-4 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin4/iso8859-4.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin5/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin5/iso8859-9 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/README trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/encodings.alias trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/ibm-1251.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/ibm-866.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/iso8859-5.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/koi8-r.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ft.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/global.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/CP1250.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/CP1251.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/T2A_compact.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/adobe-standard-encoding.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cubg5plus.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cubig5.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cugb.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cugbk.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ubig5.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ugb.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ugbk.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/unicode-sample.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/Makefile trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bmpfont.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bz.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bzscreen.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bzscreen.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/cmpf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/cntstems.pl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/dmpf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/lst.pl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/showdf trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/showg trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/pt1.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/pt1.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/runt1asm.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/convert trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/convert.cfg.sample trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/forceiso trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/frommap trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/html2man trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/inst_dir trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/inst_file trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/mkrel trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/t1fdir trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/trans trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/unhtml trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/x2gs trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/t1asm trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/t1asm.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1.1 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1_convert.1 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1_x2gs.1 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2ufm trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/version.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/winbuild.bat trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/windows.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm.exe trunk/tcpdf/fonts/vera.ctg.z trunk/tcpdf/fonts/vera.php trunk/tcpdf/fonts/vera.z trunk/tcpdf/fonts/verab.ctg.z trunk/tcpdf/fonts/verab.php trunk/tcpdf/fonts/verab.z trunk/tcpdf/fonts/verabi.ctg.z trunk/tcpdf/fonts/verabi.php trunk/tcpdf/fonts/verabi.z trunk/tcpdf/fonts/verai.ctg.z trunk/tcpdf/fonts/verai.php trunk/tcpdf/fonts/verai.z trunk/tcpdf/fonts/veramo.ctg.z trunk/tcpdf/fonts/veramo.php trunk/tcpdf/fonts/veramo.z trunk/tcpdf/fonts/veramob.ctg.z trunk/tcpdf/fonts/veramob.php trunk/tcpdf/fonts/veramob.z trunk/tcpdf/fonts/veramobi.ctg.z trunk/tcpdf/fonts/veramobi.php trunk/tcpdf/fonts/veramobi.z trunk/tcpdf/fonts/veramoi.ctg.z trunk/tcpdf/fonts/veramoi.php trunk/tcpdf/fonts/veramoi.z trunk/tcpdf/fonts/verase.ctg.z trunk/tcpdf/fonts/verase.php trunk/tcpdf/fonts/verase.z trunk/tcpdf/fonts/veraseb.ctg.z trunk/tcpdf/fonts/veraseb.php trunk/tcpdf/fonts/veraseb.z trunk/tcpdf/html_entity_decode_php4.php trunk/tcpdf/images/ trunk/tcpdf/images/_blank.png trunk/tcpdf/images/logo_example.png trunk/tcpdf/tcpdf.php trunk/tcpdf/test_old.php trunk/tcpdf/test_unicode.php trunk/tcpdf/utf8test.txt Added: trunk/tcpdf/.eraseme.php.swp =================================================================== (Binary files differ) Property changes on: trunk/tcpdf/.eraseme.php.swp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tcpdf/.eraseme2.php.swp =================================================================== (Binary files differ) Property changes on: trunk/tcpdf/.eraseme2.php.swp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tcpdf/.tcpdf.php.swp =================================================================== (Binary files differ) Property changes on: trunk/tcpdf/.tcpdf.php.swp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tcpdf/CHANGELOG.TXT =================================================================== --- trunk/tcpdf/CHANGELOG.TXT (rev 0) +++ trunk/tcpdf/CHANGELOG.TXT 2007-09-21 09:58:18 UTC (rev 564) @@ -0,0 +1,115 @@ +1.53.0.TC033_PHP4 (2007-07-30) + - fixed bug 1762550: case sensitive for font files + - NOTE: all fonts files names must be in lowercase! + +1.53.0.TC032_PHP4 (2007-07-27) + - setLastH method was added to resolve bug 1689071. + - all fonts names were converted in lowercase (bug 1713005). + - bug 1740954 was fixed. + - justification was addes as Cell option. + +1.53.0.TC031_PHP4 (2007-03-20) + - ToUnicode CMap were added on _puttruetypeunicode function. Now you may search and copy unicode text. + +1.53.0.TC030_PHP4 (2007-03-06) + - fixed bug on PHP4 version. + +1.53.0.TC029_PHP4 (2007-03-06) + - DejaVu Fonts were added. + +1.53.0.TC028_PHP4 (2007-03-03) + - MultiCell function signature were changed: the $ln parameter were added. Check documentation for further information. + - Greek language were added on example sentences. + - setPrintHeader() and setPrintFooter() functions were added to enable or disable page header and footer. + +1.53.0.TC027_PHP4 (2006-12-14) + - $attr['face'] bug were fixed. + - K_TCPDF_EXTERNAL_CONFIG control where introduced on /config/tcpdf_config.php to use external configuration files. + +1.53.0.TC026_PHP4 (2006-10-28) + - writeHTML function call were fixed on examples. + +1.53.0.TC025_PHP4 (2006-10-27) + - Bugs item #1421290 were fixed (0D - 0A substitution in some characters) + - Bugs item #1573174 were fixed (MultiCell documentation) + +1.53.0.TC024_PHP4 (2006-09-26) + - getPageHeight() function were fixed (bug 1543476). + - fixed missing breaks on closedHTMLTagHandler function (bug 1535263). + - fixed extra spaces on Write function (bug 1535262). + +1.53.0.TC023_PHP4 (2006-08-04) + - second parameter were removed from class_exists function. + - paths to barcode directory were fixed. + - documentation were updated. + +1.53.0.TC022_PHP4 (2006-07-16) + - fixed bug: [ 1516858 ] Probs with PHP autoloader and class_exists() + +1.53.0.TC021_PHP4 (2006-07-01) + - HTML attributes with whitespaces are now supported (thanks to Nelson Benitez for his support) + +1.53.0.TC020_PHP4 (2006-06-23) + - this version fixes the MBCS error on html_entity_decode + +1.53.0.TC019_PHP4 (2006-06-08) + - this version were backported to PHP4 + +1.53.0.TC019 (2006-05-21) + - fixed <strong> and <em> closing tags. + +1.53.0.TC018 (2006-05-18) + - fixed font names bug + +1.53.0.TC017 (2006-05-18) + - the TTF2UFM utility to convert True Type fonts for TCPDF were included on fonts folder. + - new free unicode fonts were included on /fonts/freefont. + - test_unicode.php example were exended. + - parameter $fill were added on Write, writeHTML and writeHTMLCell functions. + - documentation were updated. + +1.53.0.TC016 (2006-03-09) + - fixed closing <strong> tag on html parser. + +1.53.0.TC016 (2005-08-28) + - fpdf.php and tcpdf.php files were joined in one single class (you can still extend TCPDF with your own class). + - fixed problem when mb_internal_encoding is set. + +1.53.0.TC014 (2005-05-29) + - fixed WriteHTMLCell new page issue. + +1.53.0.TC013 (2005-05-29) + - fixed WriteHTMLCell across pages. + +1.53.0.TC012 (2005-05-29) + - font color attribute bug were fixed. + +1.53.0.TC011 (2005-03-31) + - SetFont function were fixed (thank Sjaak Lauwers for bug notice). + +1.53.0.TC010 (2005-03-22) + - the html functions were improved (thanks to Manfred Vervuert for bug reporting). + +1.53.0.TC009 (2005-03-19) + - a wrong reference to convertColorHexToDec were fixed. + +1.53.0.TC008 (2005-02-07) + - removed some extra bytes from PHP files. + +1.53.0.TC007 (2005-01-08) + - fill attribute were removed from writeHTMLCell method. + +1.53.0.TC006 (2005-01-08) + - the documentation were updated. + +1.53.0.TC005 (2005-01-05) + - Steven Wittens's unicode methods were removed. + - All unicode methods were rewritten from scratch. + - TCPDF is now licensed as LGPL. + +1.53.0.TC004 (2005-01-04) + - this changelog were added. + - removed comercial fonts for licensing issue. + - Bitstream Vera Fonts were added (http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html). + - Now the AddFont and SetFont functions returns the basic font if the styled version do not exist. + Added: trunk/tcpdf/LICENSE.TXT =================================================================== --- trunk/tcpdf/LICENSE.TXT (rev 0) +++ trunk/tcpdf/LICENSE.TXT 2007-09-21 09:58:18 UTC (rev 564) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + Added: trunk/tcpdf/README.TXT =================================================================== --- trunk/tcpdf/README.TXT (rev 0) +++ trunk/tcpdf/README.TXT 2007-09-21 09:58:18 UTC (rev 564) @@ -0,0 +1,61 @@ +TCPDF - README +============================================================ + +Name: + TCPDF + +Version: + 1.53.0.TC033_PHP4 + +Release date: + 2007-07-30 + +Author: + Nicola Asuni + +Copyright (c) 2001-2007: + Tecnick.com S.r.l. + Via Ugo Foscolo n.19 + 09045 Quartu Sant'Elena (CA) + ITALY + www.tecnick.com + +URLs: + http://tcpdf.sourceforge.net/ + http://tcpdf.sf.net/ + +Description: + TCPDF is a PHP4 class for generating PDF files on-the-fly without requiring external extensions. + TCPDF is an extension and improvement of the FPDF class by Olivier Plathey (http://www.fpdf.org). + + Main Features: + + - supports all ISO page formats; + - supports UTF-8 Unicode; + - includes methods to publish some xhtml code, supporting the following elements: h1, h2, h3, h4, h5, h6, b, u, i, a, img, p, br, strong, em, font, blockquote, li, ul, ol, hr, td, th, tr, table, sup, sub, small; + - includes a method to print various barcode formats using an improved version of "Generic Barcode Render Class" by Karim Mribti (http://www.mribti.com/barcode/) (require GD library: http://www.boutell.com/gd/) + - supports TrueTypeUnicode, TrueType, Type1 and encoding; + - supports custom page formats, margins and units of measure; + - includes methods for page header and footer management; + - supports automatic page break; + - supports automatic page numbering; + - supports automatic line break and text justification; + - supports JPEG and PNG images; + - supports colors; + - supports links; + - support page compression (require zlib extension: http://www.gzip.org/zlib/); + - the source code is full documented in PhpDocumentor Style (http://www.phpdoc.org). + +Installation: + 1. copy the folder on your Web server + 2. set your installation path on the config/tcpdf_config.php + 3. call the test_unicode.php page with your browser to see an example + NOTE: the test_old.php require proper font setup on tcpdf_config. + +Source Code Documentation: + doc/index.html + +License + GNU LESSER GENERAL PUBLIC LICENSE v.2.1 + http://www.gnu.org/copyleft/lesser.html +============================================================ \ No newline at end of file Added: trunk/tcpdf/barcode/barcode.php =================================================================== --- trunk/tcpdf/barcode/barcode.php (rev 0) +++ trunk/tcpdf/barcode/barcode.php 2007-09-21 09:58:18 UTC (rev 564) @@ -0,0 +1,441 @@ +<?php +//============================================================+ +// File name : barcode.php +// Begin : 2002-07-31 +// Last Update : 2005-01-02 +// Author : Karim Mribti [ba...@mr...] +// Version : 1.1 [0.0.8a (original code)] +// License : GNU LGPL (Lesser General Public License) 2.1 +// http://www.gnu.org/copyleft/lesser.txt +// Source Code : http://www.mribti.com/barcode/ +// +// Description : Generic Barcode Render Class for PHP using +// the GD graphics library. +// +// NOTE: +// This version contains changes by Nicola Asuni: +// - porting to PHP4 +// - code style and formatting +// - automatic php documentation in PhpDocumentor Style +// (www.phpdoc.org) +// - minor bug fixing +// - $mCharSet and $mChars variables were added here +//============================================================+ + +/** + * Barcode Render Class for PHP using the GD graphics library. + * @author Karim Mribti, Nicola Asuni + * @name BarcodeObject + * @package com.tecnick.tcpdf + * @version 0.0.8a 2001-04-01 (original code) + * @since 2001-03-25 + * @license http://www.gnu.org/copyleft/lesser.html LGPL + */ + +// Styles +// Global + +/** + * option: generate barcode border + */ +define("BCS_BORDER", 1); + +/** + * option: use transparent background + */ +define("BCS_TRANSPARENT", 2); + +/** + * option: center barcode + */ +define("BCS_ALIGN_CENTER", 4); + +/** + * option: align left + */ +define("BCS_ALIGN_LEFT", 8); + +/** + * option: align right + */ +define("BCS_ALIGN_RIGHT", 16); + +/** + * option: generate JPEG image + */ +define("BCS_IMAGE_JPEG", 32); + +/** + * option: generate PNG image + */ +define("BCS_IMAGE_PNG", 64); + +/** + * option: draw text + */ +define("BCS_DRAW_TEXT", 128); + +/** + * option: stretch text + */ +define("BCS_STRETCH_TEXT", 256); + +/** + * option: reverse color + */ +define("BCS_REVERSE_COLOR", 512); + +/** + * option: draw check + * (only for I25 code) + */ +define("BCS_I25_DRAW_CHECK", 2048); + +/** + * set default background color + */ +define("BCD_DEFAULT_BACKGROUND_COLOR", 0xFFFFFF); + +/** + * set default foreground color + */ +define("BCD_DEFAULT_FOREGROUND_COLOR", 0x000000); + +/** + * set default style options + */ +define("BCD_DEFAULT_STYLE", BCS_BORDER | BCS_ALIGN_CENTER | BCS_IMAGE_PNG); + +/** + * set default width + */ +define("BCD_DEFAULT_WIDTH", 460); + +/** + * set default height + */ +define("BCD_DEFAULT_HEIGHT", 120); + +/** + * set default font + */ +define("BCD_DEFAULT_FONT", 5); + +/** + * st default horizontal resolution + */ +define("BCD_DEFAULT_XRES", 2); + +// Margins + +/** + * set default margin + */ +define("BCD_DEFAULT_MAR_Y1", 0); + +/** + * set default margin + */ +define("BCD_DEFAULT_MAR_Y2", 0); + +/** + * set default text offset + */ +define("BCD_DEFAULT_TEXT_OFFSET", 2); + +// For the I25 Only + +/** + * narrow bar option + * (only for I25 code) + */ +define("BCD_I25_NARROW_BAR", 1); + +/** + * wide bar option + * (only for I25 code) + */ +define("BCD_I25_WIDE_BAR", 2); + +// For the C39 Only + +/** + * narrow bar option + * (only for c39 code) + */ +define("BCD_C39_NARROW_BAR", 1); + +/** + * wide bar option + * (only for c39 code) + */ +define("BCD_C39_WIDE_BAR", 2); + +// For Code 128 + +/** + * set type 1 bar + * (only for c128 code) + */ +define("BCD_C128_BAR_1", 1); + +/** + * set type 2 bar + * (only for c128 code) + */ +define("BCD_C128_BAR_2", 2); + +/** + * set type 3 bar + * (only for c128 code) + */ +define("BCD_C128_BAR_3", 3); + +/** + * set type 4 bar + * (only for c128 code) + */ +define("BCD_C128_BAR_4", 4); + +/** + * Barcode Render Class for PHP using the GD graphics library. + * @author Karim Mribti, Nicola Asuni + * @name BarcodeObject + * @package com.tecnick.tcpdf + * @version 0.0.8a 2001-04-01 (original code) + * @since 2001-03-25 + * @license http://www.gnu.org/copyleft/lesser.html LGPL + */ +class BarcodeObject { + /** + * @var Image width in pixels. + * @access protected + */ + var $mWidth; + + /** + * @var Image height in pixels. + * @access protected + */ + var $mHeight; + + /** + * @var Numeric code for Barcode style. + * @access protected + */ + var $mStyle; + + /** + * @var Background color. + * @access protected + */ + var $mBgcolor; + + /** + * @var Brush color. + * @access protected + */ + var $mBrush; + + /** + * @var Image object. + * @access protected + */ + var $mImg; + + /** + * @var Numeric code for character font. + * @access protected + */ + var $mFont; + + /** + * @var Error message. + * @access protected + */ + var $mError; + + /** + * @var Character Set. + * @access protected + */ + var $mCharSet; + + /** + * @var Allowed symbols. + * @access protected + */ + var $mChars; + + /** + * Class Constructor. + * @param int $Width Image width in pixels. + * @param int $Height Image height in pixels. + * @param int $Style Barcode style. + */ + function BarcodeObject($Width=BCD_DEFAULT_WIDTH, $Height=BCD_DEFAULT_HEIGHT, $Style=BCD_DEFAULT_STYLE) { + $this->mWidth = $Width; + $this->mHeight = $Height; + $this->mStyle = $Style; + $this->mFont = BCD_DEFAULT_FONT; + $this->mImg = ImageCreate($this->mWidth, $this->mHeight); + $dbColor = $this->mStyle & BCS_REVERSE_COLOR ? BCD_DEFAULT_FOREGROUND_COLOR : BCD_DEFAULT_BACKGROUND_COLOR; + $dfColor = $this->mStyle & BCS_REVERSE_COLOR ? BCD_DEFAULT_BACKGROUND_COLOR : BCD_DEFAULT_FOREGROUND_COLOR; + $this->mBgcolor = ImageColorAllocate($this->mImg, ($dbColor & 0xFF0000) >> 16, + ($dbColor & 0x00FF00) >> 8, $dbColor & 0x0000FF); + $this->mBrush = ImageColorAllocate($this->mImg, ($dfColor & 0xFF0000) >> 16, + ($dfColor & 0x00FF00) >> 8, $dfColor & 0x0000FF); + if (!($this->mStyle & BCS_TRANSPARENT)) { + ImageFill($this->mImg, $this->mWidth, $this->mHeight, $this->mBgcolor); + } + } + + /** + * Returns the image object. + * @return object image. + * @author Nicola Asuni + * @since 1.5.2 + */ + function getImage() { + return $this->mImg; + } + + /** + * Abstract method used to draw the barcode image. + * @param int $xres Horizontal resolution. + */ + function DrawObject($xres) { + /* there is not implementation neded, is simply the asbsract function. */ + return false; + } + + /** + * Draws the barcode border. + * @access protected + */ + function DrawBorder() { + ImageRectangle($this->mImg, 0, 0, $this->mWidth-1, $this->mHeight-1, $this->mBrush); + } + + /** + * Draws the alphanumeric code. + * @param int $Font Font type. + * @param int $xPos Horiziontal position. + * @param int $yPos Vertical position. + * @param int $Char Alphanumeric code to write. + * @access protected + */ + function DrawChar($Font, $xPos, $yPos, $Char) { + ImageString($this->mImg,$Font,$xPos,$yPos,$Char,$this->mBrush); + } + + /** + * Draws a character string. + * @param int $Font Font type. + * @param int $xPos Horiziontal position. + * @param int $yPos Vertical position. + * @param int $Char string to write. + * @access protected + */ + function DrawText($Font, $xPos, $yPos, $Char) { + ImageString($this->mImg,$Font,$xPos,$yPos,$Char,$this->mBrush); + } + + /** + * Draws a single barcode bar. + * @param int $xPos Horiziontal ... [truncated message content] |
From: <re...@us...> - 2007-09-21 10:01:30
|
Revision: 566 http://sciret.svn.sourceforge.net/sciret/?rev=566&view=rev Author: reinerj Date: 2007-09-21 03:01:29 -0700 (Fri, 21 Sep 2007) Log Message: ----------- some files was missing Added Paths: ----------- trunk/actions/ArticleToPdf.php trunk/actions/HideCategory.php trunk/actions/ShowCategory.php trunk/docs/sciret-install-OpenBSD-EN-images.html trunk/fckeditor/editor/_source/internals/fckundo.js trunk/fckeditor/editor/filemanager/connectors/ trunk/fckeditor/editor/filemanager/connectors/php/ trunk/fckeditor/editor/filemanager/connectors/php/basexml.php trunk/fckeditor/editor/filemanager/connectors/php/commands.php trunk/fckeditor/editor/filemanager/connectors/php/config.php trunk/fckeditor/editor/filemanager/connectors/php/connector.php trunk/fckeditor/editor/filemanager/connectors/php/io.php trunk/fckeditor/editor/filemanager/connectors/php/upload.php trunk/fckeditor/editor/filemanager/connectors/php/util.php trunk/fckeditor/editor/filemanager/connectors/test.html trunk/fckeditor/editor/filemanager/connectors/uploadtest.html trunk/fckeditor/editor/plugins/dragresizetable/ trunk/fckeditor/editor/plugins/dragresizetable/fckplugin.js trunk/images/file_pdf.gif trunk/images/question.png trunk/setup/upgrade_1.2.0.sql Added: trunk/actions/ArticleToPdf.php =================================================================== --- trunk/actions/ArticleToPdf.php (rev 0) +++ trunk/actions/ArticleToPdf.php 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,44 @@ +<?php + +require_once 'actions/Action.php'; +require_once 'models/Article.php'; +require_once 'tcpdf/tcpdf.php'; + +class ArticleToPdf extends Action { + + function dispatch() { + + $article = new Article($_GET['artId']); + if (!$article->getId()) { + die($this->user->lang('Error: article does not exist')); + } + if ($this->user->isAnonymous() && !$article->isPublished()) { + die($this->user->lang('Error: this article hasn\'t yet been published')); + } + + $name = $this->user->lang('article_').$article->getId(); + + set_time_limit(0); + + $pdf = new TCPDF('P', 'mm', 'A4', true); + $pdf->setHeaderFont(Array('freeserif', '', 10)); + $pdf->setFooterFont(Array('freeserif', '', 8)); + $pdf->AliasNbPages(); + $pdf->AddPage(); + $pdf->writeHTML($article->getContent(), true, 0); + $output = $pdf->Output($name, 'S'); + + if (ob_get_contents()) ob_end_clean(); + header("Content-type: application/octet-stream"); + header("Content-Disposition: attachment; filename=\"".$name.".pdf\""); + header("Content-Length: ".strlen($output)); + // work-around IE bug when using SSL + header("Pragma: public"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + header("Expires: 0"); + echo $output; + exit; + } +} + +?> Added: trunk/actions/HideCategory.php =================================================================== --- trunk/actions/HideCategory.php (rev 0) +++ trunk/actions/HideCategory.php 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,23 @@ +<?php + +require 'actions/Action.php'; + +class HideCategory extends Action { + + function dispatch() { + $hideCategories = $this->user->getPreference('hiddenCategories'); + if (!$hideCategories) { + $hideCategories = array(); + } else { + $hideCategories = explode(',', $hideCategories); + } + $hideCategories[] = (int)$_GET['catId']; + $this->user->setPreference('hiddenCategories', implode(',', $hideCategories)); + $this->user->save(); + + $_SESSION['message'] = $this->user->lang('Category won\'t be shown in the future'); + Library::redirect(Library::getLink(array('view' => 'EditCategories'))); + } +} + +?> Added: trunk/actions/ShowCategory.php =================================================================== --- trunk/actions/ShowCategory.php (rev 0) +++ trunk/actions/ShowCategory.php 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,31 @@ +<?php + +require 'actions/Action.php'; + +class ShowCategory extends Action { + + function dispatch() { + $hideCategories = $this->user->getPreference('hiddenCategories'); + if (!$hideCategories) { + $hideCategories = array(); + } else { + $hideCategories = explode(',', $hideCategories); + } + + $newHideCategories = array(); + foreach ($hideCategories as $catId) { + if ($catId == $_GET['catId']) { + continue; + } + $newHideCategories[] = $catId; + } + + $this->user->setPreference('hiddenCategories', implode(',', $newHideCategories)); + $this->user->save(); + + $_SESSION['message'] = $this->user->lang('Category will be shown in the future'); + Library::redirect(Library::getLink(array('view' => 'EditCategories'))); + } +} + +?> Added: trunk/docs/sciret-install-OpenBSD-EN-images.html =================================================================== --- trunk/docs/sciret-install-OpenBSD-EN-images.html (rev 0) +++ trunk/docs/sciret-install-OpenBSD-EN-images.html 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,1215 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<meta name="generator" content="AsciiDoc 8.2.1" /> +<style type="text/css"> +/* Debug borders */ +p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { +/* + border: 1px solid red; +*/ +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; +} + +strong { + font-weight: bold; +} + +tt { + color: navy; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + font-family: sans-serif; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1 { + border-bottom: 2px solid silver; +} +h2 { + border-bottom: 2px solid silver; + padding-top: 0.5em; +} + +div.sectionbody { + font-family: serif; + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +pre { + padding: 0; + margin: 0; +} + +span#author { + color: #527bbd; + font-family: sans-serif; + font-weight: bold; + font-size: 1.1em; +} +span#email { +} +span#revision { + font-family: sans-serif; +} + +div#footer { + font-family: sans-serif; + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +div#footer-text { + float: left; + padding-bottom: 0.5em; +} +div#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +div#preamble, +div.tableblock, div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-right: 10%; + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + font-family: sans-serif; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} + +div.listingblock { + margin-right: 0%; +} +div.listingblock > div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock > div.content { + padding-left: 2.0em; +} + +div.attribution { + text-align: right; +} +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 2px solid silver; +} + +div.exampleblock > div.content { + border-left: 2px solid silver; + padding: 0.5em; +} + +div.verseblock div.content { + white-space: pre; +} + +div.imageblock div.content { padding-left: 0; } +div.imageblock img { border: 1px solid silver; } +span.image img { border-style: none; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: italic; +} +dd > *:first-child { + margin-top: 0; +} + +ul, ol { + list-style-position: outside; +} +ol.olist2 { + list-style-type: lower-alpha; +} + +div.tableblock > table { + border: 3px solid #527bbd; +} +thead { + font-family: sans-serif; + font-weight: bold; +} +tfoot { + font-weight: bold; +} + +div.hlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hlist td { + padding-bottom: 5px; +} +td.hlist1 { + vertical-align: top; + font-style: italic; + padding-right: 0.8em; +} +td.hlist2 { + vertical-align: top; +} + +@media print { + div#footer-badges { display: none; } +} + +div#toctitle { + color: #527bbd; + font-family: sans-serif; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} +/* Workarounds for IE6's broken and incomplete CSS2. */ + +div.sidebar-content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} +div.sidebar-title, div.image-title { + font-family: sans-serif; + font-weight: bold; + margin-top: 0.0em; + margin-bottom: 0.5em; +} + +div.listingblock div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock-content { + padding-left: 2.0em; +} + +div.exampleblock-content { + border-left: 2px solid silver; + padding-left: 0.5em; +} + +/* IE6 sets dynamically generated links as visited. */ +div#toc a:visited { color: blue; } +</style> +<title>Howto install Sciret on OpenBSD</title> +</head> +<body> +<div id="header"> +<h1>Howto install Sciret on OpenBSD</h1> +<span id="author">v1.1.3, Mai 2007</span><br /> +Reiner Jung <rj...@th...> +</div> +<h2>1. Introduction</h2> +<div class="sectionbody"> +<p><strong>Sciret</strong></p> +<p>Sciret is an advanced knowledge based system written in PHP. The software self is platform independent and should run on every platform where PHP is supported. In the further development, Sciret will be extended to a full enterprise knowledge and information storage system.</p> +<p>Sciret was developed as a internal project from <a href="http://www.the-gang.net">TheGang</a>, a Open Source consulting and strategy company. After many month of internal usage, the decision was taken to release the code as an Open Source Project on <a href="http://www.sf.net">Sourceforge</a>. We hope that Sciret will also fulfill the requirements of other users and companies.</p> +<p><strong>OpenBSD</strong></p> +<p><a href="http://www.openbsd.org">OpenBSD</a> is a Unix-like computer operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995. The project is widely known for the developers insistence on open source code and quality documentation; uncompromising position on software licensing; and focus on security and code correctness. The project is coordinated from de Raadt's home in Calgary, Alberta, Canada. Its logo and mascot is Puffy, a blowfish.</p> +<p>OpenBSD includes a number of security features absent or optional in other operating systems and has a tradition of developers auditing the source code for software bugs and security problems. The project maintains strict policies on licensing and prefers the open source BSD licence and its variants in the past this has led to a comprehensive licence audit and moves to remove or replace code under licences found less acceptable.</p> +<p>OpenBSD is developed by volunteers. The project funds development and releases by selling <a href="http://openbsd.org/items.html">CDs</a> and <a href="http://openbsd.org/tshirts.html">T-shirts</a>, as well as <a href="http://openbsd.org/donations.html">donations</a> from organizations and individuals. These finances ensure that OpenBSD will continue to exist, and will remain <a href="http://openbsd.org/policy.html">free</a> for everyone to use and reuse as they see fit.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content">Some of the information of this document are not related to your Sciret version. Please read also the release announcements for your version!</td> +</tr></table> +</div> +</div> +<h2>2. Requirements</h2> +<div class="sectionbody"> +<p>To install Sciret, you need a couple of things enabled or installed</p> +<div class="hlist"><table> +<tr> +<td class="hlist1"> +<strong>Operation system</strong> +</td> +<td class="hlist2"> +<a href="http://www.OpenBSD.org">OpenBSD</a> +</td> +</tr> +<tr> +<td class="hlist1"> +<strong>Web Server</strong> +</td> +<td class="hlist2"> +<a href="http://httpd.apache.org">OpenBSD Apache Web Server</a> included in the core OS from OpenBSD +</td> +</tr> +<tr> +<td class="hlist1"> +<strong>PHP</strong> +</td> +<td class="hlist2"> +<a href="http://www.php.net/">PHP</a> version 5.x +</td> +</tr> +<tr> +<td class="hlist1"> +<strong>MySQL</strong> +</td> +<td class="hlist2"> +<a href="http://mysql.com/">MySQL database</a> +</td> +</tr> +</table></div> +</div> +<h2>3. Install the Operation System, the required packages and the configuration of the system</h2> +<div class="sectionbody"> +<p>We will not explain here how to install OpenBSD as OpenBSD is mostly self-explained. Information howto install OpenBSD you can found on the OpenBSD project web site. A typical installation from OpenBSD is done in less then 10 minutes when you follow the excellent <a href="http://www.openbsd.org/faq/faq4.html">instructions</a>.</p> +<p>After the base system in installed, you need to configure several parts to run Sciret.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Prepare to install OpenBSD packages</div> +<p>You can install the additional packages over HTTP or FTP. Please add as root user +the follow information to the file <strong>.profile</strong></p> +<div class="literalblock"> +<div class="content"> +<pre><tt># vi /root/.profile</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># export PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/"</tt></pre> +</div></div> +<p>You must logout and login from the Shell to activate the environment variables</p> +</td> +</tr></table> +</div> +<p>Now you can begin to install the additional packages, which are not part of your core +OpenBSD system. The PHP packages from OpenBSD are patched with +<a href="http://www.hardened-php.net/suhosin.127.html">Suhosin</a> for better security.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content"> +<div class="title">Install the required packages</div> +<p>Install the MySQL server with</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkg_add -v -i mysql-server</tt></pre> +</div></div> +<p>Install the PHP package</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkg_add -v -i php5-core</tt></pre> +</div></div> +<p>Copy the php.ini file</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># cp /usr/local/share/examples/php5/php.ini-recommended /var/www/conf/php.ini</tt></pre> +</div></div> +<p>Edit the php.ini file</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># vi /var/www/conf/php.ini</tt></pre> +</div></div> +<p>And change the value from</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>short_open_tag = off</tt></pre> +</div></div> +<p>to</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>short_open_tag = on</tt></pre> +</div></div> +<p>And activate the PHP package</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># /usr/local/sbin/phpxs -s</tt></pre> +</div></div> +<p>And install and activate the follow packages also</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkg_add -v -i php5-mysql</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># /usr/local/sbin/phpxs -a mysql</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkg_add -v -i php5-mcrypt</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># /usr/local/sbin/phpxs -a mcrypt</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkg_add -v -i php5-mhash</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># /usr/local/sbin/phpxs -a mhash</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkg_add -v -i php5-imap</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># /usr/local/sbin/phpxs -a imap/</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<p>After the packages are installed, you need to prepare the OpenBSD Apache to support PHP +and you need to create the /tmp directory for Sciret. The /tmp directory is required as +the OpenBSD Apache runs in a Chroot environment.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content"> +<div class="title">Configure OpenBSD Apache web server</div> +<p>To enable parsing of PHP scripts, add the following to /var/www/conf/httpd.conf:</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>AddType application/x-httpd-php .php</tt></pre> +</div></div> +<p>and add index.php to your DirectoryIndex that it looks like</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>DirectoryIndex index.html index.php</tt></pre> +</div></div> +<p>Now you need to create the /tmp directory for Apache with the follow commands</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># mkdir /var/www/tmp +# chown www /var/www/tmp</tt></pre> +</div></div> +<p>The base configuration from the Apache server is finished. Now you need to activate +the webserver that he start on system start. Please change in the file <strong>/etc/rc.conf</strong> +the value from</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>http_flags=NO</tt></pre> +</div></div> +<p>to</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>http_flags=""</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<p>PHP and the Apache web server are up and running and the first part of your installation +was successful finished. You can test now that there was no error in the configuration +until now.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Test the PHP and Apache functionality</div> +<p>Create the following file</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># vi /var/www/htdocs/info.php</tt></pre> +</div></div> +<p>and add to this file the follow line</p> +<div class="literalblock"> +<div class="content"> +<pre><tt><? +phpinfo(); +?></tt></pre> +</div></div> +<p>Now start your apache web server from the command line with the command</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># apachectl start</tt></pre> +</div></div> +<p>and point your browser to the follow addess</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>http://your-server-ip-address/info.php</tt></pre> +</div></div> +<p>When you see the PHP information, your web server and the PHP installation are working +and you can go to the next step. Please <strong>delete</strong> the info.php file before you continue.</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># rm /var/www/htdocs/info.php</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<p>Now you need to prepare your MySQL server that he start at system start and you need to +install the default database for your MySQL server.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content"> +<div class="title">Configuration of your MySQL server</div> +<p>To enable MySQL to start at boot enter the following line in /etc/rc.conf.local:</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>mysql=YES</tt></pre> +</div></div> +<p>Then enter the following lines into your /etc/rc.local <strong>after</strong> the line</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># Add your local startup actions here</tt></pre> +</div></div> +<p>and <strong>before</strong> the line</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>echo ´.´</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt>if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ]; then + echo -n " mysqld"; /usr/local/bin/mysqld_safe --user=_mysql --log --open-files-limit=256 & + for i in 1 2 3 4 5 6; do + if [ -S /var/run/mysql/mysql.sock ]; then + break + else + sleep 1 + echo -n "." + fi + done + # + # Apache chroot Settings + mkdir -p /var/www/var/run/mysql + sleep 2 + ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock +fi</tt></pre> +</div></div> +<p>You must add this line exactly as they are written here. Otherwise your chrooted Apache will not be +able to connect to the MySQL Database server!</p> +</td> +</tr></table> +</div> +<p>The basic installation from your OpenBSD system and the required servers are configured and you can +start now to install Sciret. Sciret will be available in the OpenBSD ports tree, so you can install +Sciret without pain. Before you can install Sciret, you need to prepare your database first. Please +follow the instructions below.</p> +</div> +<h2>4. Database</h2> +<div class="sectionbody"> +<p>Sciret requires a database. At the moment Sciret support only MySQL as database. +There are several ways to create a database and several tools</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">MySQL Administration</div> +<p>phpMyAdmin: Web based administration tool for MySQL is as a package available in +the OpenBSD ports tree. You can install the package like the other packages with +the command</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>pkg_add -v -i phpMyAdmin.</tt></pre> +</div></div> +<p>For more information about phpMyAdmin you can visit the project page.</p> +<p><a href="http://www.phpmyadmin.net">http://www.phpmyadmin.net/</a></p> +<p>MySQL Administrator is a other tool, provided by MySQL AB and this tool is also +available as package from the ports tree (mysql-administrator).</p> +<p><a href="http://www.mysql.com/products/tools/administrator">http://www.mysql.com/products/tools/administrator/</a></p> +</td> +</tr></table> +</div> +</div> +<h2>5. Disabling and configuring Services</h2> +<div class="sectionbody"> +<p>OpenBSD does come with a few unnecessary services enabled by default, which you don't need when you run Sciret. Turn these services off. This is completely optional and you must do so according to your own needs.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Disable unnecessary service</div> +<p>Edit the following file</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># vi /etc/inetd.conf</tt></pre> +</div></div> +<p>and comment out the following line:</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>#ident stream tcp nowait _identd /usr/libexec/identd identd -el +#ident stream tcp6 nowait _identd /usr/libexec/identd identd -el +#daytime stream tcp nowait root internal +#daytime stream tcp6 nowait root internal +#time stream tcp nowait root internal +#time stream tcp6 nowait root internal</tt></pre> +</div></div> +</td> +</tr></table> +</div> +</div> +<h2>6. Install Sciret from scratch</h2> +<div class="sectionbody"> +<p>When you install Sciret the first time, you should follow the instructions in this manual.</p> +<h3>6.1. Create your database and a user which can connect to the DB</h3> +<p>This example shows how to create a database under OpenBSD from the command line. +With the graphical tools the steps are the same as described here.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/warning.png" alt="Warning" /> +</td> +<td class="content">Many people run their applications under the MySQL Root account. <strong>Never</strong> use the database Root account as a user for your application. Create instead a dedicated user only for the application.</td> +</tr></table> +</div> +<div class="literalblock"> +<div class="title">Create the database</div> +<div class="content"> +<pre><tt> # mysqladmin –u your-mysqladmin-user –p create sciret-db-name + Enter password:</tt></pre> +</div></div> +<div class="literalblock"> +<div class="title">Create the Sciret DB user and give him DB access rights</div> +<div class="content"> +<pre><tt> # mysql –u your-mysqladmin-user –p + Enter password: + + mysql> grant all on sciret.* to sciret-db-user@localhost identified by “password”;</tt></pre> +</div></div> +<h3>6.2. Install Sciret sources on your web server</h3> +<p>You can <a href="http://sourceforge.net/project/showfiles.php?group_id=181327">download the Sciret sources</a> from the Project page or you can install the package as OpenBSD user from the OpenBSD ports tree direct from the command line. When you want have a preview to upcoming versions of Sciret, You can download the test releases or checkout directly from SVN.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">The preferred installation from Sciret on OpenBSD</div> +<p>You should use to install Sciret the packages available from OpenBSD. To install Sciret run the +follow command.</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># pkd_add -v -i sciret</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<p>When you have downloaded the Sources from <a href="http://www.sf.net">SourceForge</a>, you must unpack the sources in your web server root.</p> +<div class="literalblock"> +<div class="title">Install the sources</div> +<div class="content"> +<pre><tt> # cd /var/www/htdocs + + # tar xzvf sciret-rcx-x.x.x.tar.gz</tt></pre> +</div></div> +<p>After the sources from Sciret are installed on your server. You must change the permissions that your web server can read the files. For the <strong>upload</strong> directory you must give also write permissions to the web server user.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Under which user your Apache is running?</div> +<p>The OpenBSD apache runs under the user <strong>www</strong>.</p> +</td> +</tr></table> +</div> +<div class="literalblock"> +<div class="title">Change the access rights to your web server user</div> +<div class="content"> +<pre><tt> # cd /var/www/htdocs + + # chown -R root:www sciret + + # find sciret -type d -exec chmod 550 {} \; + + # find sciret -type f -exec chmod 440 {} \; + + # find sciret/uploads -type d -exec chmod 770 {} \; + + # chmod 660 sciret/config.php</tt></pre> +</div></div> +<p>Now you must set the <strong>$Config[<em>UserFilesPath</em>]</strong> variable to the path (relative to the web server root dir) where +you want to store image uploads.</p> +<div class="literalblock"> +<div class="title">Edit the follow files:</div> +<div class="content"> +<pre><tt> # vi fckeditor/editor/filemanager/browser/default/connectors/php/config.php + + // Path to user files relative to the document root. + $Config['UserFilesPath'] = '/sciret/uploads/editor' ; + + # vi fckeditor/editor/filemanager/upload/php/config.php + + // Path to uploaded files relative to the document root. + $Config['UserFilesPath'] = '/sciret/uploads/editor' ;</tt></pre> +</div></div> +<h3>6.3. Finish the Sciret installation</h3> +<p>After you configured the web server and all permissions are set, you can go to finish the installation. To finalize the Sciret setup, please point your browser to your web server Sciret URL and follow the instructions.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/note.png" alt="Note" /> +</td> +<td class="content"> +<div class="title">Finalize the installation</div> +<p>Point your browser to the URL or your Sciret installation to finalize the installation</p> +<p>http://www.servername.xx/index.php</p> +</td> +</tr></table> +</div> +<h3>6.4. Remove write access to the config file</h3> +<p>After successful installation from Sciret, you can remove the write access to the config.php from your web server user.</p> +<div class="literalblock"> +<div class="title">Change the access rights from the config.php back</div> +<div class="content"> +<pre><tt> # chmod 440 sciret/config.php</tt></pre> +</div></div> +<h3>6.5. Login to Sciret the first time</h3> +<p>When you finished your installation, you can login to Sciret the first time. Please take care to change the default password after your first login!</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content"> +<div class="title">Default login password</div> +<p>username = admin</p> +<p>password = admin</p> +</td> +</tr></table> +</div> +<h3>6.6. Secure your Sciret access with a web server certificate</h3> +<p>To protect your privacy, you can use a server certificate when you connect to your Sciret installation. With a certificate you can connect to your web server with an encrypted connection (using https instead of http). Without an https connection, other people can sniff your password or other personal information.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Self-signed server certificates.</div> +<div class="literalblock"> +<div class="content"> +<pre><tt>You can self-sign the certificate which you will create.</tt></pre> +</div></div> +<p><strong>Use a non-Profit Certificate Authority.</strong></p> +<p><a href="http://www.cacert.org/">CAcert</a></p> +<p><strong>Use a commercial Certificate Authority.</strong></p> +<p><a href="http://www.rapidssl.com/">RapidSSL</a></p> +<p><a href="http://www.geotrust.com/">GeoTrust</a></p> +<p><a href="http://www.thawte.com">Thawte</a></p> +</td> +</tr></table> +</div> +<h4>6.6.1. Use CAcert as Certificate Authority</h4> +<p>We will here explain the steps, which you need to register and create your certificate with CAcert. The reason for CAcert is not that it is better then the other authorities, the reason is that it is free of charge.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/note.png" alt="Note" /> +</td> +<td class="content"> +<div class="title">The CAcert homepage</div><a href="https://www.cacert.org/">https://www.cacert.org</a></td> +</tr></table> +</div> +<ol> +<li> +<p><em> +What to do first +</em></p> +<p> +First you must create an account at CAcert. For the account enrolment you must fill out the <a href="https://www.cacert.org/index.php?id=1">form</a>. When you have done this, you will receive a Email with more instructions. +</p> +</li> +<li> +<p><em> +Register your domain at CAcert +</em></p> +<p> +After you have created your account, register your domain at CAcert for which you want sign a certificate. When you have already more then 50 assurance points, then you can register your organization. To register your organization, you must send to su...@ca... some scanned copy(ies) of Certificate of Incorporation etc. +</p> +</li> +<li> +<p><em> +Creating your certificate signing request +</em></p> +<p> +On your Sciret server, you must create a server key and a certificate-signing request for your web server. +</p> +</li> +<li> +<p><em> +Sign the Certificate Signing Request +</em></p> +<p> +You Certificate Signing Request you can now sign on the CAcert website. Please follow the instruction on the site. +</p> +</li> +<li> +<p><em> +Install the certificate on your server +</em></p> +<p> +After your certificate is signed, install the Certificate on your server to protect your Sciret installation. +</p> +</li> +</ol> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">How create the certificates</div> +<p>Create you server certificate</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># /usr/sbin/openssl genrsa 1024 > /etc/ssl/private/server.key</tt></pre> +</div></div> +<p>Create your Certificate Signing Request (CSR)</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># usr/sbin/openssl req -new -key /etc/ssl/private/server.key \ + -out /etc/ssl/private/server.csr</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<p>Now your Sciret installation is basically protected again sniffing your password. There are other possibilities to protect your server and install it in a secure way. This will be targeted in a separate document in the future.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/note.png" alt="Note" /> +</td> +<td class="content"> +<div class="title">Comercial Certificate Vendors</div>The certificate creation process is similar for a commercial vendor.</td> +</tr></table> +</div> +</div> +<h2>7. Patch your Sciret installation</h2> +<div class="sectionbody"> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content">You can only patch the latest Sciret release. When you are not running the latest Sciret release, you need to upgrade your installation.</td> +</tr></table> +</div> +<p>Sometimes your Sciret installation needs to be patched to fix a bug. For small bug fixes you can download only the new file to patch you Sciret installation instead to download a new package.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/note.png" alt="Note" /> +</td> +<td class="content"> +<div class="title">Apply the patch</div> +<p>Download the patch from the Sciret SourceForge project page</p> +<p><a href="https://sourceforge.net/project/showfiles.php?group_id=181327">https://sourceforge.net/project/showfiles.php?group_id=181327</a></p> +<p>Overwrite the existing file with the new file</p> +</td> +</tr></table> +</div> +</div> +<h2>8. Upgrade the Sciret language package</h2> +<div class="sectionbody"> +<p>The Sciret project deliver a separate language package. With this package you can update you stable Sciret installation with additional translation. The reason for the separate package is that some translations are started or committed after a stable release from Sciret is released. To install the Sciret language package, please follow the instructions</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Install the language package</div> +<p>Download the package from the SourceForge project page</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>http://sourceforge.net/project/showfiles.php?group_id=181327&package_id=231283</tt></pre> +</div></div> +<p>and unpack the package it the folder</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># cd /var/www/htdocs/sciret/languages</tt></pre> +</div></div> +<p>On OpenBSD with</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># tar xzvf language-update-x.x.x.tar.gz</tt></pre> +</div></div> +</td> +</tr></table> +</div> +</div> +<h2>9. Install aditional icon sets on Sciret</h2> +<div class="sectionbody"> +<p>The Sciret project deliver several icon sets. With these packages you can installation and other icons set as Sciret ship it by default. To install the Sciret icon set package, please follow the instructions</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Install a alternative icon set</div> +<p>Download the package from the SourceForge project page</p> +<div class="literalblock"> +<div class="content"> +<pre><tt>http://sourceforge.net/project/showfiles.php?group_id=181327&package_id=231283</tt></pre> +</div></div> +<p>make a backup of your standard icon set</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># cd /var/www/htdocs/sciret/uploads/icons</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># tar czvf a-name-for-your-backup.tar.gz *</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># mv a-name-for-your-backup.tar.gz /root/</tt></pre> +</div></div> +<div class="literalblock"> +<div class="content"> +<pre><tt># rm -rf *</tt></pre> +</div></div> +<p>and unpack the new icon set in the same folder</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># tar xzvf name-of-the-new-icon-set.tar.gz</tt></pre> +</div></div> +</td> +</tr></table> +</div> +</div> +<h2>10. Upgrade Sciret</h2> +<div class="sectionbody"> +<p>With the release from Sciret 1.1.0, Sciret offer a full automatic upgrade to the next release. The automatic upgrade work only from the last stable release but not from a SVN version of Sciret.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content">Before you start any upgrade from Sciret, please <strong>make a backup</strong> from your Sciret database and your Sciret installation!</td> +</tr></table> +</div> +<h3>10.1. Backup your Sciret installation</h3> +<p>We will describe here a simple backup from Sciret. Please consider that on your platform, the backup procedure can be different.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/warning.png" alt="Warning" /> +</td> +<td class="content"> +<div class="title">Stop the web server</div> +<p>Before you start to make any backups, you should first stop +the web server.</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># apachectl stop</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<div class="literalblock"> +<div class="title">Backup the database and the Sciret web server root</div> +<div class="content"> +<pre><tt> # tar czvf sciret.tar.gz sciret + + # mv sciret.tar.gz /root/ + + # mysqldump –u your-mysqladmin-user -p --opt database > /root/database.sql</tt></pre> +</div></div> +<p>After you have backed up your installation, you can upgrade the database.</p> +<p>Now you can install the new sources from Sciret on your web server</p> +<div class="literalblock"> +<div class="title">Upgrade Sciret</div> +<div class="content"> +<pre><tt> # cp sciret/config.php /root/ + + # pkg_add -u -i -v sciret + + # cp /root/config.php sciret/</tt></pre> +</div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/note.png" alt="Note" /> +</td> +<td class="content"> +<div class="title">Start the web server</div> +<p>After your upgrade is done, you must start the web server again.</p> +<div class="literalblock"> +<div class="content"> +<pre><tt># apachectl start</tt></pre> +</div></div> +</td> +</tr></table> +</div> +<p>After you have update you must force a reload of your browser cache. Often a update from Sciret includes changes in the JavaScirpt engine or the CSS files.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">After the package upgrade</div> +<p>Point your browser to the Sciret site and follow the instruction to perform the automatic database upgrade</p> +</td> +</tr></table> +</div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content"> +<div class="title">Upgrade Sciret from a SVN development version</div> +<p>Before you upgrade Sciret to the latest release, please read the release notes and the file UPGRADE.TXT. Sometimes the database schema is changed and you need to alter your database first before you can upgrade Sciret.</p> +<p>If you update the code from the svn repository the automatic upgrade won't work since +you are in a kind of "limbo version". The system will only do clean +installs and upgrade from any stable version to the next stable version. To make your +current installs work you'll have, just for this time, to manually run +the SQL that you need under /setup/upgrade_x.x.x.sql and this: +INSERT INTO configuration (field, value) VALUES(<em>version</em>, <em>x.x.x</em>);</p> +</td> +</tr></table> +</div> +</div> +<h2>11. Install the Sciret development version</h2> +<div class="sectionbody"> +<p>When you want test Sciret and submit patches to Sciret, you should use the development version from Sciret and not the stable version of Sciret. Sciret development from Subversion is not recommended for production use. You must read the Changelog before you install the development version.</p> +<h3>11.1. Checkout Sciret from Subversion</h3> +<p>You can checkout the Sciret sources direct from Subversion on the Sourceforge project page. Please consider that the development version of Sciret have no support.</p> +<div class="literalblock"> +<div class="title">SVN checkout from Sourceforge</div> +<div class="content"> +<pre><tt> # svn co https://sciret.svn.sourceforge.net/svnroot/sciret/trunk sciret</tt></pre> +</div></div> +</div> +<h2>12. Report Bugs, Submit Patches …</h2> +<div class="sectionbody"> +<p>When you found any problems with Sciret or inside this howto, please let us know what is going wrong. All problems and patches should be reported to the <a href="http://sourceforge.net/project/stats/?group_id=181327&ugn=sciret">Sciret Sourceforge Project Page</a>. There are also the mailing lists and the forums, which you can use to communicate with other users or the developers from Sciret.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/important.png" alt="Important" /> +</td> +<td class="content"> +<div class="title">Important development addresses</div> +<p>When you report a bug about Sciret, it is important that you send us also the Version number from Sciret. The Version Number you can found in the Sciret root directory in the file VERSION</p> +<p><a href="http://sourceforge.net/tracker/?group_id=181327&atid=896759">The Sciret Bug Tracker</a></p> +<p><a href="http://sourceforge.net/tracker/?group_id=181327&atid=896762">The Sciret Feature Request Page</a></p> +<p><a href="http://sourceforge.net/tracker/?group_id=181327&atid=896761">The Sciret Patches Submitting Page</a></p> +</td> +</tr></table> +</div> +</div> +<h2>13. Other Information about Sciret</h2> +<div class="sectionbody"> +<p>When you are interested in more information about Sciret, you can also visit the Sciret homepage. Here are screenshots from Sciret published and you can play around with the Sciret demo.</p> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<img src="./asciidoc-images/tip.png" alt="Tip" /> +</td> +<td class="content"> +<div class="title">Please visit the Sciret homepage at</div><a href="http://www.sciret.org">http://www.sciret.org</a></td> +</tr></table> +</div> +</div> +<h2>14. Contributors to Sciret development</h2> +<div class="sectionbody"> +<p>Some people are contributed to the development with patches or with translations.</p> +<h3>14.1. Patch contribution</h3> +<ul> +<li> +<p> +Nikolai Essel submitted patches to Sciret 0.9/1.1 +</p> +</li> +<li> +<p> +Rune Hammersland submitted patches to Sciret 1.1 +</p> +</li> +</ul> +<h3>14.2. Testers</h3> +<ul> +<li> +<p> +Johnny Hsieh +</p> +</li> +</ul> +<h3>14.3. Translations</h3> +<ul> +<li> +<p> +Chinese Traditional Johnny Hsieh +</p> +</li> +<li> +<p> +Dutch translation Roy de Milde +</p> +</li> +<li> +<p> +Hebrew translation from SF user Golanor +</p> +</li> +<li> +<p> +Japanese translation from SF user tm800720 +</p> +</li> +<li> +<p> +Norway translation from from Rune Hammersland +</p> +</li> +<li> +<p> +Swedish translation from Henrik Christensson +</p> +</li> +</ul> +<h3>14.4. Graphical Layout</h3> +<ul> +<li> +<p> +The Sciret Logo and the New Sciret Layout is done by Nunu Pinheiro +</p> +</li> +</ul> +<h3>14.5. Packager</h3> +<ul> +<li> +<p> +OpenBSD Felix Kronlage +</p> +</li> +</ul> +</div> +<h2>15. License of this documentation</h2> +<div class="sectionbody"> +<p>This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-Share Alike 2.5 License</a>.</p> +</div> +<div id="footer"> +<div id="footer-text"> +Last updated 28-Jul-2007 10:11:41 CEST +</div> +</div> +</body> +</html> Added: trunk/fckeditor/editor/_source/internals/fckundo.js =================================================================== --- trunk/fckeditor/editor/_source/internals/fckundo.js (rev 0) +++ trunk/fckeditor/editor/_source/internals/fckundo.js 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,180 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2007 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Gecko specific implementation for the Undo/Redo system. + */ + +var FCKUndo = new Object() ; + +FCKUndo.SavedData = new Array() ; +FCKUndo.CurrentIndex = -1 ; +FCKUndo.TypesCount = 0 ; +FCKUndo.Changed = false ; // Is the document changed in respect to its initial image? +FCKUndo.MaxTypes = 25 ; +FCKUndo.Typing = false ; + +FCKUndo._GetBookmark = function() +{ + if ( FCKBrowserInfo.IsIE ) + { + var selection = FCK.EditorDocument.selection ; + if ( selection.type == 'Text' ) + return selection.createRange().getBookmark() ; + else + return null ; + } + else + { + var range = new FCKDomRange( FCK.EditorWindow ) ; + range.MoveToSelection() ; + return range.CreateBookmark2() ; + } +} + +FCKUndo._SelectBookmark = function( bookmark ) +{ + if ( ! bookmark ) + return ; + if ( FCKBrowserInfo.IsIE ) + { + var range = FCK.EditorDocument.selection.createRange() ; + range.moveToBookmark( bookmark ) ; + range.select() ; + } + else + { + var range = new FCKDomRange( FCK.EditorWindow ) ; + if ( bookmark instanceof Object ) + { + range.MoveToBookmark2( bookmark ) ; + try + { + // this does not always succeed, there are still some tricky cases where it fails + // e.g. add a special character at end of document, undo, redo -> error + range.Select() ; + } + catch ( e ) + { + // if select restore fails, put the caret at the end of the document + range.MoveToPosition( FCK.EditorDocument.body, 4 ) ; + range.Select() ; + } + } + } +} + +FCKUndo.SaveUndoStep = function() +{ + if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) + return ; + + // Assume the editor content is changed when SaveUndoStep() is called after the first time. + // This also enables the undo button in toolbar. + if ( this.SavedData.length ) + this.Changed = true ; + + // Get the HTML content. + var sHtml = FCK.EditorDocument.body.innerHTML ; + + // Shrink the array to the current level. + this.SavedData = this.SavedData.slice( 0, this.CurrentIndex + 1 ) ; + + // Cancel operation if the new step is identical to the previous one. + if ( this.CurrentIndex > 0 && sHtml == this.SavedData[ this.CurrentIndex ][0] ) + return ; + // Save the selection and caret position in the first undo level for the first change. + else if ( this.CurrentIndex == 0 && this.SavedData.length && sHtml == this.SavedData[0][0] ) + { + this.SavedData[0][1] = this._GetBookmark() ; + return ; + } + + // If we reach the Maximun number of undo levels, we must remove the first + // entry of the list shifting all elements. + if ( this.CurrentIndex + 1 >= FCKConfig.MaxUndoLevels ) + this.SavedData.shift() ; + else + this.CurrentIndex++ ; + + // Save the new level in front of the actual position. + this.SavedData[ this.CurrentIndex ] = [ sHtml, this._GetBookmark() ] ; + + FCK.Events.FireEvent( "OnSelectionChange" ) ; +} + +FCKUndo.CheckUndoState = function() +{ + return ( this.Changed || this.CurrentIndex > 0 ) ; +} + +FCKUndo.CheckRedoState = function() +{ + return ( this.CurrentIndex < ( this.SavedData.length - 1 ) ) ; +} + +FCKUndo.Undo = function() +{ + if ( this.CheckUndoState() ) + { + // If it is the first step. + if ( this.CurrentIndex == ( this.SavedData.length - 1 ) ) + { + // Save the actual state for a possible "Redo" call. + this.SaveUndoStep() ; + } + + // Go a step back. + this._ApplyUndoLevel( --this.CurrentIndex ) ; + + FCK.Events.FireEvent( "OnSelectionChange" ) ; + } +} + +FCKUndo.Redo = function() +{ + if ( this.CheckRedoState() ) + { + // Go a step forward. + this._ApplyUndoLevel( ++this.CurrentIndex ) ; + + FCK.Events.FireEvent( "OnSelectionChange" ) ; + } +} + +FCKUndo._ApplyUndoLevel = function( level ) +{ + var oData = this.SavedData[ level ] ; + + if ( !oData ) + return ; + + // Update the editor contents with that step data. + if ( FCKBrowserInfo.IsIE ) + FCK.SetInnerHtml( oData[0] ) ; + else + FCK.EditorDocument.body.innerHTML = oData[0] ; + + // Restore the selection + this._SelectBookmark( oData[1] ) ; + + this.TypesCount = 0 ; + this.Changed = false ; + this.Typing = false ; +} Added: trunk/fckeditor/editor/filemanager/connectors/php/basexml.php =================================================================== --- trunk/fckeditor/editor/filemanager/connectors/php/basexml.php (rev 0) +++ trunk/fckeditor/editor/filemanager/connectors/php/basexml.php 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,93 @@ +<?php +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2007 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * These functions define the base of the XML response sent by the PHP + * connector. + */ + +function SetXmlHeaders() +{ + ob_end_clean() ; + + // Prevent the browser from caching the result. + // Date in the past + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ; + // always modified + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ; + // HTTP/1.1 + header('Cache-Control: no-store, no-cache, must-revalidate') ; + header('Cache-Control: post-check=0, pre-check=0', false) ; + // HTTP/1.0 + header('Pragma: no-cache') ; + + // Set the response format. + header( 'Content-Type: text/xml; charset=utf-8' ) ; +} + +function CreateXmlHeader( $command, $resourceType, $currentFolder ) +{ + SetXmlHeaders() ; + + // Create the XML document header. + echo '<?xml version="1.0" encoding="utf-8" ?>' ; + + // Create the main "Connector" node. + echo '<Connector command="' . $command . '" resourceType="' . $resourceType . '">' ; + + // Add the current folder node. + echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder, $command ) ) . '" />' ; + + $GLOBALS['HeaderSent'] = true ; +} + +function CreateXmlFooter() +{ + echo '</Connector>' ; +} + +function SendError( $number, $text ) +{ + if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) + { + SendErrorNode( $number, $text ) ; + CreateXmlFooter() ; + } + else + { + SetXmlHeaders() ; + + // Create the XML document header + echo '<?xml version="1.0" encoding="utf-8" ?>' ; + + echo '<Connector>' ; + + SendErrorNode( $number, $text ) ; + + echo '</Connector>' ; + } + exit ; +} + +function SendErrorNode( $number, $text ) +{ + echo '<Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" />' ; +} +?> \ No newline at end of file Added: trunk/fckeditor/editor/filemanager/connectors/php/commands.php =================================================================== --- trunk/fckeditor/editor/filemanager/connectors/php/commands.php (rev 0) +++ trunk/fckeditor/editor/filemanager/connectors/php/commands.php 2007-09-21 10:01:29 UTC (rev 566) @@ -0,0 +1,219 @@ +<?php +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2007 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This is the File Manager Connector for PHP. + */ + +function GetFolders( $resourceType, $currentFolder ) +{ + // Map the virtual path to the local server path. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'GetFolders' ) ; + + // Array that will hold the folders names. + $aFolders = array() ; + + $oCurrentFolder = opendir( $sServerDir ) ; + + while ( $sFile = readdir( $oCurrentFolder ) ) + { + if ( $sFile != '.' && $sFile != '..' && is_dir( $sServerDir . $sFile ) ) + $aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; + } + + closedir( $oCurrentFolder ) ; + + // Open the "Folders" node. + echo "<Folders>" ; + + natcasesort( $aFolders ) ; + foreach ( $aFolders as $sFolder ) + echo $sFolder ; + + // Close the "Folders" node. + echo "</Folders>" ; +} + +function GetFoldersAndFiles( $resourceType, $currentFolder ) +{ + // Map the virtual path to the local server path. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'GetFoldersAndFiles' ) ; + + // Arrays that will hold the folders and files names. + $aFolders = array() ; + $aFiles = array() ; + + $oCurrentFolder = opendir( $sServerDir ) ; + + while ( $sFile = readdir( $oCurrentFolder ) ) + { + if ( $sFile != '.' && $sFile != '..' ) + { + if ( is_dir( $sServerDir . $sFile ) ) + $aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; + else + { + $iFileSize = filesize( $sServerDir . $sFile ) ; + if ( $iFileSize > 0 ) + { + $iFileSize = round( $iFileSize / 1024 ) ; + if ( $iFileSize < 1 ) $iFileSize = 1 ; + } + + $aFiles[] = '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ; + } + } + } + + // Send the folders + natcasesort( $aFolders ) ; + echo '<Folders>' ; + + foreach ( $aFolders as $sFolder ) + echo $sFolder ; + + echo '</Folders>' ; + + // Send the files + natcasesort( $aFiles ) ; + echo '<Files>' ; + + foreach ( $aFiles as $sFiles ) + echo $sFiles ; + + echo '</Files>' ; +} + +function CreateFolder( $resourceType, $currentFolder ) +{ + $sErrorNumber = '0' ; + $sErrorMsg = '' ; + + if ( isset( $_GET['NewFolderName'] ) ) + { + $sNewFolderName = $_GET['NewFolderName'] ; + $sNewFolderName = SanitizeFolderName( $sNewFolderName ) ; + + if ( strpos( $sNewFolderName, '..' ) !== FALSE ) + $sErrorNumber = '102' ; // Invalid folder name. + else + { + // Map the virtual path to the local server path of the current folder. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'CreateFolder' ) ; + + if ( is_writable( $sServerDir ) ) + { + $sServerDir .= $sNewFolderName ; + + $sErrorMsg = CreateServerFolder( $sServerDir ) ; + + switch ( $sErrorMsg ) + { + case '' : + $sErrorNumber = '0' ; + break ; + case 'Invalid argument' : + case 'No such file or directory' : + $sErrorNumber = '102' ; // Path too long. + break ; + default : + $sErrorNumber = '110' ; + break ; + } + } + else + $sErrorNumber = '103' ; + } + } + else + $sErrorNumber = '102' ; + + // Create the "Error" node. + echo '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ; +} + +function FileUpload( $resourceType, $currentFolder, $sCommand ) +{ + $sErrorNumber = '0' ; + $sFileName = '' ; + + if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) ) + { + global $Config ; + + $oFile = $_FILES['NewFile'] ; + + // Map the virtual path to the local server path. + $sServerDir = ServerMapFolder( $resourceType, $currentFolder, $sCommand ) ; + + // Get the uploaded file name. + $sFileName = $oFile['name'] ; + $sFileName = SanitizeFileName( $sFileName ) ; + + $sOriginalFileName = $sFileName ; + + // Get the extension. + $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; + $sExtension = strtolower( $sExtension ) ; + + // Check if it is an allowed extension. + if ( IsAllowedExt( $sExtension, $resourceType ) ) + { + $iCounter = 0 ; + + while ( true ) + { + $sFilePath = $sServerDir . $sFileName ; + + if ( is_file( $sFilePath ) ) + { + $iCounter++ ; + $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; + $sErrorNumber = '201' ; + } + else + { + move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; + + if ( is_file( $sFilePath ) ) + { + $oldumask = umask(0) ; + chmod( $sFilePath, 0777 ) ; + umask( $oldumask ) ; + } + + break ; + } + } + } + else + $sErrorNumber = '202' ; + } + else + $sErrorNumber = '202' ; + + + $sFileUrl = CombinePaths( GetResourceTypePath( $resourceType, $sCommand ) , $sFileName ) ; + + SendUploadResults( $sErrorNumber, $sFileUrl, $sFileName ) ; + + exit ; +} +?... [truncated message content] |
From: <al...@us...> - 2008-07-07 01:52:22
|
Revision: 594 http://sciret.svn.sourceforge.net/sciret/?rev=594&view=rev Author: alpeb Date: 2008-07-06 18:51:57 -0700 (Sun, 06 Jul 2008) Log Message: ----------- merged branches/release-candidates/sciret-1.2 -r 416:593 into the trunk Modified Paths: -------------- trunk/CHANGELOG trunk/CONTRIBUTORS trunk/classes/Controller.php trunk/config.php trunk/templates/EditCategories.tpl trunk/templates/ManageArticles.tpl trunk/views/EditCategories.php trunk/views/ManageArticles.php trunk/views/View.php trunk/views/ViewArticle.php Added Paths: ----------- trunk/actions/ArticleToPdf.php trunk/actions/HideCategory.php trunk/actions/ShowCategory.php trunk/docs/sciret-install-OpenBSD-EN-images.html trunk/fckeditor/editor/ trunk/fckeditor/editor/_source/ trunk/fckeditor/editor/_source/classes/ trunk/fckeditor/editor/_source/classes/fckcontextmenu.js trunk/fckeditor/editor/_source/classes/fckdataprocessor.js trunk/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js trunk/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js trunk/fckeditor/editor/_source/classes/fckdomrange.js trunk/fckeditor/editor/_source/classes/fckdomrange_gecko.js trunk/fckeditor/editor/_source/classes/fckdomrange_ie.js trunk/fckeditor/editor/_source/classes/fckeditingarea.js trunk/fckeditor/editor/_source/classes/fckelementpath.js trunk/fckeditor/editor/_source/classes/fckenterkey.js trunk/fckeditor/editor/_source/classes/fckevents.js trunk/fckeditor/editor/_source/classes/fckicon.js trunk/fckeditor/editor/_source/classes/fckiecleanup.js trunk/fckeditor/editor/_source/classes/fckimagepreloader.js trunk/fckeditor/editor/_source/classes/fckkeystrokehandler.js trunk/fckeditor/editor/_source/classes/fckmenublock.js trunk/fckeditor/editor/_source/classes/fckmenublockpanel.js trunk/fckeditor/editor/_source/classes/fckmenuitem.js trunk/fckeditor/editor/_source/classes/fckpanel.js trunk/fckeditor/editor/_source/classes/fckplugin.js trunk/fckeditor/editor/_source/classes/fckspecialcombo.js trunk/fckeditor/editor/_source/classes/fckstyledef.js trunk/fckeditor/editor/_source/classes/fckstyledef_gecko.js trunk/fckeditor/editor/_source/classes/fckstyledef_ie.js trunk/fckeditor/editor/_source/classes/fckstylesloader.js trunk/fckeditor/editor/_source/classes/fcktoolbar.js trunk/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js trunk/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js trunk/fckeditor/editor/_source/classes/fcktoolbarbutton.js trunk/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js trunk/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js trunk/fckeditor/editor/_source/classes/fckw3crange.js trunk/fckeditor/editor/_source/classes/fckxml_gecko.js trunk/fckeditor/editor/_source/classes/fckxml_ie.js trunk/fckeditor/editor/_source/commandclasses/ trunk/fckeditor/editor/_source/commandclasses/fck_othercommands.js trunk/fckeditor/editor/_source/commandclasses/fckfitwindow.js trunk/fckeditor/editor/_source/commandclasses/fcknamedcommand.js trunk/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js trunk/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js trunk/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js trunk/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js trunk/fckeditor/editor/_source/commandclasses/fckstylecommand.js trunk/fckeditor/editor/_source/commandclasses/fcktablecommand.js trunk/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js trunk/fckeditor/editor/_source/fckconstants.js trunk/fckeditor/editor/_source/fckeditorapi.js trunk/fckeditor/editor/_source/fckjscoreextensions.js trunk/fckeditor/editor/_source/fckscriptloader.js trunk/fckeditor/editor/_source/internals/ trunk/fckeditor/editor/_source/internals/fck.js trunk/fckeditor/editor/_source/internals/fck_contextmenu.js trunk/fckeditor/editor/_source/internals/fck_gecko.js trunk/fckeditor/editor/_source/internals/fck_ie.js trunk/fckeditor/editor/_source/internals/fckbrowserinfo.js trunk/fckeditor/editor/_source/internals/fckcodeformatter.js trunk/fckeditor/editor/_source/internals/fckcommands.js trunk/fckeditor/editor/_source/internals/fckconfig.js trunk/fckeditor/editor/_source/internals/fckdebug.js trunk/fckeditor/editor/_source/internals/fckdialog.js trunk/fckeditor/editor/_source/internals/fckdialog_gecko.js trunk/fckeditor/editor/_source/internals/fckdialog_ie.js trunk/fckeditor/editor/_source/internals/fckdocumentprocessor.js trunk/fckeditor/editor/_source/internals/fckdomtools.js trunk/fckeditor/editor/_source/internals/fcklanguagemanager.js trunk/fckeditor/editor/_source/internals/fcklisthandler.js trunk/fckeditor/editor/_source/internals/fcklistslib.js trunk/fckeditor/editor/_source/internals/fckplugins.js trunk/fckeditor/editor/_source/internals/fckregexlib.js trunk/fckeditor/editor/_source/internals/fckselection.js trunk/fckeditor/editor/_source/internals/fckselection_gecko.js trunk/fckeditor/editor/_source/internals/fckselection_ie.js trunk/fckeditor/editor/_source/internals/fcktablehandler.js trunk/fckeditor/editor/_source/internals/fcktablehandler_gecko.js trunk/fckeditor/editor/_source/internals/fcktablehandler_ie.js trunk/fckeditor/editor/_source/internals/fcktoolbaritems.js trunk/fckeditor/editor/_source/internals/fcktoolbarset.js trunk/fckeditor/editor/_source/internals/fcktools.js trunk/fckeditor/editor/_source/internals/fcktools_gecko.js trunk/fckeditor/editor/_source/internals/fcktools_ie.js trunk/fckeditor/editor/_source/internals/fckundo.js trunk/fckeditor/editor/_source/internals/fckundo_gecko.js trunk/fckeditor/editor/_source/internals/fckundo_ie.js trunk/fckeditor/editor/_source/internals/fckurlparams.js trunk/fckeditor/editor/_source/internals/fckxhtml.js trunk/fckeditor/editor/_source/internals/fckxhtml_gecko.js trunk/fckeditor/editor/_source/internals/fckxhtml_ie.js trunk/fckeditor/editor/_source/internals/fckxhtmlentities.js trunk/fckeditor/editor/css/ trunk/fckeditor/editor/css/behaviors/ trunk/fckeditor/editor/css/behaviors/disablehandles.htc trunk/fckeditor/editor/css/behaviors/showtableborders.htc trunk/fckeditor/editor/css/fck_editorarea.css trunk/fckeditor/editor/css/fck_internal.css trunk/fckeditor/editor/css/fck_showtableborders_gecko.css trunk/fckeditor/editor/css/images/ trunk/fckeditor/editor/css/images/fck_anchor.gif trunk/fckeditor/editor/css/images/fck_flashlogo.gif trunk/fckeditor/editor/css/images/fck_hiddenfield.gif trunk/fckeditor/editor/css/images/fck_pagebreak.gif trunk/fckeditor/editor/dialog/ trunk/fckeditor/editor/dialog/common/ trunk/fckeditor/editor/dialog/common/fck_dialog_common.css trunk/fckeditor/editor/dialog/common/fck_dialog_common.js trunk/fckeditor/editor/dialog/common/fcknumericfield.htc trunk/fckeditor/editor/dialog/common/images/ trunk/fckeditor/editor/dialog/common/images/locked.gif trunk/fckeditor/editor/dialog/common/images/reset.gif trunk/fckeditor/editor/dialog/common/images/unlocked.gif trunk/fckeditor/editor/dialog/common/moz-bindings.xml trunk/fckeditor/editor/dialog/fck_about/ trunk/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif trunk/fckeditor/editor/dialog/fck_about/logo_fredck.gif trunk/fckeditor/editor/dialog/fck_about.html trunk/fckeditor/editor/dialog/fck_anchor.html trunk/fckeditor/editor/dialog/fck_button.html trunk/fckeditor/editor/dialog/fck_checkbox.html trunk/fckeditor/editor/dialog/fck_colorselector.html trunk/fckeditor/editor/dialog/fck_docprops/ trunk/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html trunk/fckeditor/editor/dialog/fck_docprops.html trunk/fckeditor/editor/dialog/fck_find.html trunk/fckeditor/editor/dialog/fck_flash/ trunk/fckeditor/editor/dialog/fck_flash/fck_flash.js trunk/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html trunk/fckeditor/editor/dialog/fck_flash.html trunk/fckeditor/editor/dialog/fck_form.html trunk/fckeditor/editor/dialog/fck_hiddenfield.html trunk/fckeditor/editor/dialog/fck_image/ trunk/fckeditor/editor/dialog/fck_image/fck_image.js trunk/fckeditor/editor/dialog/fck_image/fck_image_preview.html trunk/fckeditor/editor/dialog/fck_image.html trunk/fckeditor/editor/dialog/fck_link/ trunk/fckeditor/editor/dialog/fck_link/fck_link.js trunk/fckeditor/editor/dialog/fck_link.html trunk/fckeditor/editor/dialog/fck_listprop.html trunk/fckeditor/editor/dialog/fck_paste.html trunk/fckeditor/editor/dialog/fck_radiobutton.html trunk/fckeditor/editor/dialog/fck_replace.html trunk/fckeditor/editor/dialog/fck_select/ trunk/fckeditor/editor/dialog/fck_select/fck_select.js trunk/fckeditor/editor/dialog/fck_select.html trunk/fckeditor/editor/dialog/fck_smiley.html trunk/fckeditor/editor/dialog/fck_source.html trunk/fckeditor/editor/dialog/fck_specialchar.html trunk/fckeditor/editor/dialog/fck_spellerpages/ trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/ trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/ trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js trunk/fckeditor/editor/dialog/fck_spellerpages.html trunk/fckeditor/editor/dialog/fck_table.html trunk/fckeditor/editor/dialog/fck_tablecell.html trunk/fckeditor/editor/dialog/fck_template/ trunk/fckeditor/editor/dialog/fck_template/images/ trunk/fckeditor/editor/dialog/fck_template/images/template1.gif trunk/fckeditor/editor/dialog/fck_template/images/template2.gif trunk/fckeditor/editor/dialog/fck_template/images/template3.gif trunk/fckeditor/editor/dialog/fck_template.html trunk/fckeditor/editor/dialog/fck_textarea.html trunk/fckeditor/editor/dialog/fck_textfield.html trunk/fckeditor/editor/fckdebug.html trunk/fckeditor/editor/fckdialog.html trunk/fckeditor/editor/fckeditor.html trunk/fckeditor/editor/filemanager/ trunk/fckeditor/editor/filemanager/browser/ trunk/fckeditor/editor/filemanager/browser/default/ trunk/fckeditor/editor/filemanager/browser/default/browser.css trunk/fckeditor/editor/filemanager/browser/default/browser.html trunk/fckeditor/editor/filemanager/browser/default/connectors/ trunk/fckeditor/editor/filemanager/browser/default/connectors/php/ trunk/fckeditor/editor/filemanager/browser/default/connectors/php/basexml.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/config.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/io.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/util.php trunk/fckeditor/editor/filemanager/browser/default/connectors/test.html trunk/fckeditor/editor/filemanager/browser/default/frmactualfolder.html trunk/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html trunk/fckeditor/editor/filemanager/browser/default/frmfolders.html trunk/fckeditor/editor/filemanager/browser/default/frmresourceslist.html trunk/fckeditor/editor/filemanager/browser/default/frmresourcetype.html trunk/fckeditor/editor/filemanager/browser/default/frmupload.html trunk/fckeditor/editor/filemanager/browser/default/images/ trunk/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif trunk/fckeditor/editor/filemanager/browser/default/images/Folder.gif trunk/fckeditor/editor/filemanager/browser/default/images/Folder32.gif trunk/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif trunk/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif trunk/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/ trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/ trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/html.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/js.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/png.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif trunk/fckeditor/editor/filemanager/browser/default/images/spacer.gif trunk/fckeditor/editor/filemanager/browser/default/js/ trunk/fckeditor/editor/filemanager/browser/default/js/common.js trunk/fckeditor/editor/filemanager/browser/default/js/fckxml.js trunk/fckeditor/editor/filemanager/connectors/ trunk/fckeditor/editor/filemanager/connectors/php/ trunk/fckeditor/editor/filemanager/connectors/php/basexml.php trunk/fckeditor/editor/filemanager/connectors/php/commands.php trunk/fckeditor/editor/filemanager/connectors/php/config.php trunk/fckeditor/editor/filemanager/connectors/php/connector.php trunk/fckeditor/editor/filemanager/connectors/php/io.php trunk/fckeditor/editor/filemanager/connectors/php/upload.php trunk/fckeditor/editor/filemanager/connectors/php/util.php trunk/fckeditor/editor/filemanager/connectors/test.html trunk/fckeditor/editor/filemanager/connectors/uploadtest.html trunk/fckeditor/editor/filemanager/upload/ trunk/fckeditor/editor/filemanager/upload/php/ trunk/fckeditor/editor/filemanager/upload/php/config.php trunk/fckeditor/editor/filemanager/upload/php/upload.php trunk/fckeditor/editor/filemanager/upload/php/util.php trunk/fckeditor/editor/filemanager/upload/test.html trunk/fckeditor/editor/images/ trunk/fckeditor/editor/images/anchor.gif trunk/fckeditor/editor/images/arrow_ltr.gif trunk/fckeditor/editor/images/arrow_rtl.gif trunk/fckeditor/editor/images/smiley/ trunk/fckeditor/editor/images/smiley/msn/ trunk/fckeditor/editor/images/smiley/msn/angel_smile.gif trunk/fckeditor/editor/images/smiley/msn/angry_smile.gif trunk/fckeditor/editor/images/smiley/msn/broken_heart.gif trunk/fckeditor/editor/images/smiley/msn/cake.gif trunk/fckeditor/editor/images/smiley/msn/confused_smile.gif trunk/fckeditor/editor/images/smiley/msn/cry_smile.gif trunk/fckeditor/editor/images/smiley/msn/devil_smile.gif trunk/fckeditor/editor/images/smiley/msn/embaressed_smile.gif trunk/fckeditor/editor/images/smiley/msn/envelope.gif trunk/fckeditor/editor/images/smiley/msn/heart.gif trunk/fckeditor/editor/images/smiley/msn/kiss.gif trunk/fckeditor/editor/images/smiley/msn/lightbulb.gif trunk/fckeditor/editor/images/smiley/msn/omg_smile.gif trunk/fckeditor/editor/images/smiley/msn/regular_smile.gif trunk/fckeditor/editor/images/smiley/msn/sad_smile.gif trunk/fckeditor/editor/images/smiley/msn/shades_smile.gif trunk/fckeditor/editor/images/smiley/msn/teeth_smile.gif trunk/fckeditor/editor/images/smiley/msn/thumbs_down.gif trunk/fckeditor/editor/images/smiley/msn/thumbs_up.gif trunk/fckeditor/editor/images/smiley/msn/tounge_smile.gif trunk/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif trunk/fckeditor/editor/images/smiley/msn/wink_smile.gif trunk/fckeditor/editor/images/spacer.gif trunk/fckeditor/editor/lang/ trunk/fckeditor/editor/lang/_getfontformat.html trunk/fckeditor/editor/lang/_translationstatus.txt trunk/fckeditor/editor/lang/af.js trunk/fckeditor/editor/lang/ar.js trunk/fckeditor/editor/lang/bg.js trunk/fckeditor/editor/lang/bn.js trunk/fckeditor/editor/lang/bs.js trunk/fckeditor/editor/lang/ca.js trunk/fckeditor/editor/lang/cs.js trunk/fckeditor/editor/lang/da.js trunk/fckeditor/editor/lang/de.js trunk/fckeditor/editor/lang/el.js trunk/fckeditor/editor/lang/en-au.js trunk/fckeditor/editor/lang/en-ca.js trunk/fckeditor/editor/lang/en-uk.js trunk/fckeditor/editor/lang/en.js trunk/fckeditor/editor/lang/eo.js trunk/fckeditor/editor/lang/es.js trunk/fckeditor/editor/lang/et.js trunk/fckeditor/editor/lang/eu.js trunk/fckeditor/editor/lang/fa.js trunk/fckeditor/editor/lang/fi.js trunk/fckeditor/editor/lang/fo.js trunk/fckeditor/editor/lang/fr.js trunk/fckeditor/editor/lang/gl.js trunk/fckeditor/editor/lang/he.js trunk/fckeditor/editor/lang/hi.js trunk/fckeditor/editor/lang/hr.js trunk/fckeditor/editor/lang/hu.js trunk/fckeditor/editor/lang/it.js trunk/fckeditor/editor/lang/ja.js trunk/fckeditor/editor/lang/km.js trunk/fckeditor/editor/lang/ko.js trunk/fckeditor/editor/lang/lt.js trunk/fckeditor/editor/lang/lv.js trunk/fckeditor/editor/lang/mn.js trunk/fckeditor/editor/lang/ms.js trunk/fckeditor/editor/lang/nb.js trunk/fckeditor/editor/lang/nl.js trunk/fckeditor/editor/lang/no.js trunk/fckeditor/editor/lang/pl.js trunk/fckeditor/editor/lang/pt-br.js trunk/fckeditor/editor/lang/pt.js trunk/fckeditor/editor/lang/ro.js trunk/fckeditor/editor/lang/ru.js trunk/fckeditor/editor/lang/sk.js trunk/fckeditor/editor/lang/sl.js trunk/fckeditor/editor/lang/sr-latn.js trunk/fckeditor/editor/lang/sr.js trunk/fckeditor/editor/lang/sv.js trunk/fckeditor/editor/lang/th.js trunk/fckeditor/editor/lang/tr.js trunk/fckeditor/editor/lang/uk.js trunk/fckeditor/editor/lang/vi.js trunk/fckeditor/editor/lang/zh-cn.js trunk/fckeditor/editor/lang/zh.js trunk/fckeditor/editor/plugins/ trunk/fckeditor/editor/plugins/autogrow/ trunk/fckeditor/editor/plugins/autogrow/fckplugin.js trunk/fckeditor/editor/plugins/bbcode/ trunk/fckeditor/editor/plugins/bbcode/_sample/ trunk/fckeditor/editor/plugins/bbcode/_sample/sample.config.js trunk/fckeditor/editor/plugins/bbcode/_sample/sample.html trunk/fckeditor/editor/plugins/bbcode/fckplugin.js trunk/fckeditor/editor/plugins/dragresizetable/ trunk/fckeditor/editor/plugins/dragresizetable/fckplugin.js trunk/fckeditor/editor/plugins/placeholder/ trunk/fckeditor/editor/plugins/placeholder/fck_placeholder.html trunk/fckeditor/editor/plugins/placeholder/fckplugin.js trunk/fckeditor/editor/plugins/placeholder/lang/ trunk/fckeditor/editor/plugins/placeholder/lang/de.js trunk/fckeditor/editor/plugins/placeholder/lang/en.js trunk/fckeditor/editor/plugins/placeholder/lang/fr.js trunk/fckeditor/editor/plugins/placeholder/lang/it.js trunk/fckeditor/editor/plugins/placeholder/lang/pl.js trunk/fckeditor/editor/plugins/placeholder/placeholder.gif trunk/fckeditor/editor/plugins/simplecommands/ trunk/fckeditor/editor/plugins/simplecommands/fckplugin.js trunk/fckeditor/editor/plugins/tablecommands/ trunk/fckeditor/editor/plugins/tablecommands/fckplugin.js trunk/fckeditor/editor/skins/ trunk/fckeditor/editor/skins/_fckviewstrips.html trunk/fckeditor/editor/skins/default/ trunk/fckeditor/editor/skins/default/fck_dialog.css trunk/fckeditor/editor/skins/default/fck_editor.css trunk/fckeditor/editor/skins/default/fck_strip.gif trunk/fckeditor/editor/skins/default/images/ trunk/fckeditor/editor/skins/default/images/toolbar.arrowright.gif trunk/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif trunk/fckeditor/editor/skins/default/images/toolbar.collapse.gif trunk/fckeditor/editor/skins/default/images/toolbar.end.gif trunk/fckeditor/editor/skins/default/images/toolbar.expand.gif trunk/fckeditor/editor/skins/default/images/toolbar.separator.gif trunk/fckeditor/editor/skins/default/images/toolbar.start.gif trunk/fckeditor/editor/skins/office2003/ trunk/fckeditor/editor/skins/office2003/fck_dialog.css trunk/fckeditor/editor/skins/office2003/fck_editor.css trunk/fckeditor/editor/skins/office2003/fck_strip.gif trunk/fckeditor/editor/skins/office2003/images/ trunk/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.bg.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.end.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.expand.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.separator.gif trunk/fckeditor/editor/skins/office2003/images/toolbar.start.gif trunk/fckeditor/editor/skins/silver/ trunk/fckeditor/editor/skins/silver/fck_dialog.css trunk/fckeditor/editor/skins/silver/fck_editor.css trunk/fckeditor/editor/skins/silver/fck_strip.gif trunk/fckeditor/editor/skins/silver/images/ trunk/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif trunk/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif trunk/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif trunk/fckeditor/editor/skins/silver/images/toolbar.collapse.gif trunk/fckeditor/editor/skins/silver/images/toolbar.end.gif trunk/fckeditor/editor/skins/silver/images/toolbar.expand.gif trunk/fckeditor/editor/skins/silver/images/toolbar.separator.gif trunk/fckeditor/editor/skins/silver/images/toolbar.start.gif trunk/fckeditor/fckconfig.js trunk/fckeditor/fckeditor.js trunk/fckeditor/fckeditor.php trunk/fckeditor/fckeditor_php4.php trunk/fckeditor/fckeditor_php5.php trunk/fckeditor/fckpackager.xml trunk/fckeditor/fckstyles.xml trunk/fckeditor/fcktemplates.xml trunk/fckeditor/license.txt trunk/images/file_pdf.gif trunk/images/question.png trunk/languages/BrazilPortuguese.txt trunk/languages/French.txt trunk/languages/Italian.txt trunk/languages/Norsk.txt trunk/languages/Svenska.txt trunk/setup/upgrade_1.1.0.sql trunk/setup/upgrade_1.2.0.sql trunk/tcpdf/ trunk/tcpdf/.eraseme.php.swp trunk/tcpdf/.eraseme2.php.swp trunk/tcpdf/.tcpdf.php.swp trunk/tcpdf/CHANGELOG.TXT trunk/tcpdf/LICENSE.TXT trunk/tcpdf/README.TXT trunk/tcpdf/barcode/ trunk/tcpdf/barcode/barcode.php trunk/tcpdf/barcode/c128aobject.php trunk/tcpdf/barcode/c128bobject.php trunk/tcpdf/barcode/c128cobject.php trunk/tcpdf/barcode/c39object.php trunk/tcpdf/barcode/i25object.php trunk/tcpdf/barcode/image.php trunk/tcpdf/barcode/lesser.txt trunk/tcpdf/cache/ trunk/tcpdf/config/ trunk/tcpdf/config/lang/ trunk/tcpdf/config/lang/eng.php trunk/tcpdf/config/tcpdf_config.php trunk/tcpdf/doc/ trunk/tcpdf/doc/blank.html trunk/tcpdf/doc/classtrees_com.tecnick.tcpdf.html trunk/tcpdf/doc/com.tecnick.tcpdf/ trunk/tcpdf/doc/com.tecnick.tcpdf/BarcodeObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C128AObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C128BObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C128CObject.html trunk/tcpdf/doc/com.tecnick.tcpdf/C39Object.html trunk/tcpdf/doc/com.tecnick.tcpdf/I25Object.html trunk/tcpdf/doc/com.tecnick.tcpdf/TCPDF.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_barcode_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c128aobject_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c128bobject_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c128cobject_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_c39object_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_i25object_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_barcode_image_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_config_lang_eng_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_config_tcpdf_config_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_html_entity_decode_php4_php.html trunk/tcpdf/doc/com.tecnick.tcpdf/_tcpdf_php4_tcpdf_php.html trunk/tcpdf/doc/elementindex.html trunk/tcpdf/doc/elementindex_com.tecnick.tcpdf.html trunk/tcpdf/doc/errors.html trunk/tcpdf/doc/index.html trunk/tcpdf/doc/li_com.tecnick.tcpdf.html trunk/tcpdf/doc/media/ trunk/tcpdf/doc/media/banner.css trunk/tcpdf/doc/media/stylesheet.css trunk/tcpdf/doc/packages.html trunk/tcpdf/fonts/ trunk/tcpdf/fonts/.noencode trunk/tcpdf/fonts/README.TXT trunk/tcpdf/fonts/dejavu-ttf-2.15/ trunk/tcpdf/fonts/dejavu-ttf-2.15/AUTHORS trunk/tcpdf/fonts/dejavu-ttf-2.15/BUGS trunk/tcpdf/fonts/dejavu-ttf-2.15/LICENSE trunk/tcpdf/fonts/dejavu-ttf-2.15/NEWS trunk/tcpdf/fonts/dejavu-ttf-2.15/README trunk/tcpdf/fonts/dejavu-ttf-2.15/langcover.txt trunk/tcpdf/fonts/dejavu-ttf-2.15/status.txt trunk/tcpdf/fonts/dejavu-ttf-2.15/unicover.txt trunk/tcpdf/fonts/dejavusans-bold.ctg.z trunk/tcpdf/fonts/dejavusans-bold.z trunk/tcpdf/fonts/dejavusans-boldoblique.ctg.z trunk/tcpdf/fonts/dejavusans-boldoblique.z trunk/tcpdf/fonts/dejavusans-extralight.ctg.z trunk/tcpdf/fonts/dejavusans-extralight.php trunk/tcpdf/fonts/dejavusans-extralight.z trunk/tcpdf/fonts/dejavusans-oblique.ctg.z trunk/tcpdf/fonts/dejavusans-oblique.z trunk/tcpdf/fonts/dejavusans.ctg.z trunk/tcpdf/fonts/dejavusans.php trunk/tcpdf/fonts/dejavusans.z trunk/tcpdf/fonts/dejavusansb.php trunk/tcpdf/fonts/dejavusansbi.php trunk/tcpdf/fonts/dejavusanscondensed-bold.ctg.z trunk/tcpdf/fonts/dejavusanscondensed-bold.z trunk/tcpdf/fonts/dejavusanscondensed-boldoblique.ctg.z trunk/tcpdf/fonts/dejavusanscondensed-boldoblique.z trunk/tcpdf/fonts/dejavusanscondensed-oblique.ctg.z trunk/tcpdf/fonts/dejavusanscondensed-oblique.z trunk/tcpdf/fonts/dejavusanscondensed.ctg.z trunk/tcpdf/fonts/dejavusanscondensed.php trunk/tcpdf/fonts/dejavusanscondensed.z trunk/tcpdf/fonts/dejavusanscondensedb.php trunk/tcpdf/fonts/dejavusanscondensedbi.php trunk/tcpdf/fonts/dejavusanscondensedi.php trunk/tcpdf/fonts/dejavusansi.php trunk/tcpdf/fonts/dejavusansmono-bold.ctg.z trunk/tcpdf/fonts/dejavusansmono-bold.z trunk/tcpdf/fonts/dejavusansmono-boldoblique.ctg.z trunk/tcpdf/fonts/dejavusansmono-boldoblique.z trunk/tcpdf/fonts/dejavusansmono-oblique.ctg.z trunk/tcpdf/fonts/dejavusansmono-oblique.z trunk/tcpdf/fonts/dejavusansmono.ctg.z trunk/tcpdf/fonts/dejavusansmono.php trunk/tcpdf/fonts/dejavusansmono.z trunk/tcpdf/fonts/dejavusansmonob.php trunk/tcpdf/fonts/dejavusansmonobi.php trunk/tcpdf/fonts/dejavusansmonoi.php trunk/tcpdf/fonts/dejavuserif-bold.ctg.z trunk/tcpdf/fonts/dejavuserif-bold.z trunk/tcpdf/fonts/dejavuserif-boldoblique.ctg.z trunk/tcpdf/fonts/dejavuserif-boldoblique.z trunk/tcpdf/fonts/dejavuserif-oblique.ctg.z trunk/tcpdf/fonts/dejavuserif-oblique.z trunk/tcpdf/fonts/dejavuserif.ctg.z trunk/tcpdf/fonts/dejavuserif.php trunk/tcpdf/fonts/dejavuserif.z trunk/tcpdf/fonts/dejavuserifb.php trunk/tcpdf/fonts/dejavuserifbi.php trunk/tcpdf/fonts/dejavuserifcondensed-bold.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed-bold.z trunk/tcpdf/fonts/dejavuserifcondensed-boldoblique.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed-boldoblique.z trunk/tcpdf/fonts/dejavuserifcondensed-oblique.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed-oblique.z trunk/tcpdf/fonts/dejavuserifcondensed.ctg.z trunk/tcpdf/fonts/dejavuserifcondensed.php trunk/tcpdf/fonts/dejavuserifcondensed.z trunk/tcpdf/fonts/dejavuserifcondensedb.php trunk/tcpdf/fonts/dejavuserifcondensedbi.php trunk/tcpdf/fonts/dejavuserifcondensedi.php trunk/tcpdf/fonts/dejavuserifi.php trunk/tcpdf/fonts/freefont/ trunk/tcpdf/fonts/freefont/AUTHORS trunk/tcpdf/fonts/freefont/CREDITS trunk/tcpdf/fonts/freefont/ChangeLog trunk/tcpdf/fonts/freefont/INSTALL trunk/tcpdf/fonts/freefont/README trunk/tcpdf/fonts/freemono.ctg.z trunk/tcpdf/fonts/freemono.php trunk/tcpdf/fonts/freemono.z trunk/tcpdf/fonts/freemonob.php trunk/tcpdf/fonts/freemonobi.php trunk/tcpdf/fonts/freemonobold.ctg.z trunk/tcpdf/fonts/freemonobold.z trunk/tcpdf/fonts/freemonoboldoblique.ctg.z trunk/tcpdf/fonts/freemonoboldoblique.z trunk/tcpdf/fonts/freemonoi.php trunk/tcpdf/fonts/freemonooblique.ctg.z trunk/tcpdf/fonts/freemonooblique.z trunk/tcpdf/fonts/freesans.ctg.z trunk/tcpdf/fonts/freesans.php trunk/tcpdf/fonts/freesans.z trunk/tcpdf/fonts/freesansb.php trunk/tcpdf/fonts/freesansbi.php trunk/tcpdf/fonts/freesansbold.ctg.z trunk/tcpdf/fonts/freesansbold.z trunk/tcpdf/fonts/freesansboldoblique.ctg.z trunk/tcpdf/fonts/freesansboldoblique.z trunk/tcpdf/fonts/freesansi.php trunk/tcpdf/fonts/freesansoblique.ctg.z trunk/tcpdf/fonts/freesansoblique.z trunk/tcpdf/fonts/freeserif.ctg.z trunk/tcpdf/fonts/freeserif.php trunk/tcpdf/fonts/freeserif.z trunk/tcpdf/fonts/freeserifb.php trunk/tcpdf/fonts/freeserifbi.php trunk/tcpdf/fonts/freeserifbold.ctg.z trunk/tcpdf/fonts/freeserifbold.z trunk/tcpdf/fonts/freeserifbolditalic.ctg.z trunk/tcpdf/fonts/freeserifbolditalic.z trunk/tcpdf/fonts/freeserifi.php trunk/tcpdf/fonts/freeserifitalic.ctg.z trunk/tcpdf/fonts/freeserifitalic.z trunk/tcpdf/fonts/old/ trunk/tcpdf/fonts/old/.noencode trunk/tcpdf/fonts/old/courier.php trunk/tcpdf/fonts/old/helvetica.php trunk/tcpdf/fonts/old/helveticab.php trunk/tcpdf/fonts/old/helveticabi.php trunk/tcpdf/fonts/old/helveticai.php trunk/tcpdf/fonts/old/makefont/ trunk/tcpdf/fonts/old/makefont/cp1250.map trunk/tcpdf/fonts/old/makefont/cp1251.map trunk/tcpdf/fonts/old/makefont/cp1252.map trunk/tcpdf/fonts/old/makefont/cp1253.map trunk/tcpdf/fonts/old/makefont/cp1254.map trunk/tcpdf/fonts/old/makefont/cp1255.map trunk/tcpdf/fonts/old/makefont/cp1257.map trunk/tcpdf/fonts/old/makefont/cp1258.map trunk/tcpdf/fonts/old/makefont/cp874.map trunk/tcpdf/fonts/old/makefont/iso-8859-1.map trunk/tcpdf/fonts/old/makefont/iso-8859-11.map trunk/tcpdf/fonts/old/makefont/iso-8859-15.map trunk/tcpdf/fonts/old/makefont/iso-8859-16.map trunk/tcpdf/fonts/old/makefont/iso-8859-2.map trunk/tcpdf/fonts/old/makefont/iso-8859-4.map trunk/tcpdf/fonts/old/makefont/iso-8859-5.map trunk/tcpdf/fonts/old/makefont/iso-8859-7.map trunk/tcpdf/fonts/old/makefont/iso-8859-9.map trunk/tcpdf/fonts/old/makefont/koi8-r.map trunk/tcpdf/fonts/old/makefont/koi8-u.map trunk/tcpdf/fonts/old/makefont/makefont.php trunk/tcpdf/fonts/old/symbol.php trunk/tcpdf/fonts/old/times.php trunk/tcpdf/fonts/old/timesb.php trunk/tcpdf/fonts/old/timesbi.php trunk/tcpdf/fonts/old/timesi.php trunk/tcpdf/fonts/old/zapfdingbats.php trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/ trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/COPYRIGHT.TXT trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/README.TXT trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/RELEASENOTES.TXT trunk/tcpdf/fonts/ttf-bitstream-vera-1.10/local.conf trunk/tcpdf/fonts/ttf2ufm/ trunk/tcpdf/fonts/ttf2ufm/README.TXT trunk/tcpdf/fonts/ttf2ufm/makefontuni.php trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/CHANGES trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/CHANGES.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/COPYRIGHT trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/FONTS.hpux.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/FONTS.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/Makefile trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/README.FIRST trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/RPM/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/RPM/ttf2pt1.spec.src trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/cjk-latex-config trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/cjk-latex-t1mapgen trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/TeX/sfd2map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/t1-xf86.334.patch trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/X11/t1-xf86.39.patch trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/Makefile trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/fontsz.cf trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/notscape trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nsfilter trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nsfix.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nspr trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/nsprint trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/app/netscape/psfonts.cf trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/bdf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/bitmap.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/byteorder.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/cygbuild.sh trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/adobestd/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/adobestd/adobe-std.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/README trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/encodings.alias trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/ibm-1251.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/ibm-866.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/iso8859-5.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/bulgarian/koi8-r.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/encodings.alias trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/ibm-1251.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/ibm-866.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/iso8859-5.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/cyrillic/koi8-r.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin1/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin1/iso8859-1.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin2/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin2/iso8859-2.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin4/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin4/iso8859-4 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin4/iso8859-4.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin5/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/latin5/iso8859-9 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/README trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/encodings.alias trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/ibm-1251.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/ibm-866.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/iso8859-5.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/encodings/russian/koi8-r.tbl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ft.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/global.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/CP1250.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/CP1251.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/T2A_compact.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/adobe-standard-encoding.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cubg5plus.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cubig5.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cugb.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/cugbk.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ubig5.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ugb.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/ugbk.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/maps/unicode-sample.map trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/Makefile trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/README.html trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bmpfont.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bz.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bzscreen.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/bzscreen.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/cmpf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/cntstems.pl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/dmpf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/lst.pl trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/showdf trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/other/showg trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/pt1.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/pt1.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/runt1asm.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/ trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/convert trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/convert.cfg.sample trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/forceiso trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/frommap trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/html2man trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/inst_dir trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/inst_file trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/mkrel trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/t1fdir trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/trans trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/unhtml trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/x2gs trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/t1asm trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/t1asm.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1.1 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1.c trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1_convert.1 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2pt1_x2gs.1 trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/ttf2ufm trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/version.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/winbuild.bat trunk/tcpdf/fonts/ttf2ufm/ttf2ufm-src/windows.h trunk/tcpdf/fonts/ttf2ufm/ttf2ufm.exe trunk/tcpdf/fonts/vera.ctg.z trunk/tcpdf/fonts/vera.php trunk/tcpdf/fonts/vera.z trunk/tcpdf/fonts/verab.ctg.z trunk/tcpdf/fonts/verab.php trunk/tcpdf/fonts/verab.z trunk/tcpdf/fonts/verabi.ctg.z trunk/tcpdf/fonts/verabi.php trunk/tcpdf/fonts/verabi.z trunk/tcpdf/fonts/verai.ctg.z trunk/tcpdf/fonts/verai.php trunk/tcpdf/fonts/verai.z trunk/tcpdf/fonts/veramo.ctg.z trunk/tcpdf/fonts/veramo.php trunk/tcpdf/fonts/veramo.z trunk/tcpdf/fonts/veramob.ctg.z trunk/tcpdf/fonts/veramob.php trunk/tcpdf/fonts/veramob.z trunk/tcpdf/fonts/veramobi.ctg.z trunk/tcpdf/fonts/veramobi.php trunk/tcpdf/fonts/veramobi.z trunk/tcpdf/fonts/veramoi.ctg.z trunk/tcpdf/fonts/veramoi.php trunk/tcpdf/fonts/veramoi.z trunk/tcpdf/fonts/verase.ctg.z trunk/tcpdf/fonts/verase.php trunk/tcpdf/fonts/verase.z trunk/tcpdf/fonts/veraseb.ctg.z trunk/tcpdf/fonts/veraseb.php trunk/tcpdf/fonts/veraseb.z trunk/tcpdf/html_entity_decode_php4.php trunk/tcpdf/images/ trunk/tcpdf/images/_blank.png trunk/tcpdf/images/logo_example.png trunk/tcpdf/tcpdf.php trunk/tcpdf/test_old.php trunk/tcpdf/test_unicode.php trunk/tcpdf/utf8test.txt Removed Paths: ------------- trunk/actions/ArticleToPdf.php trunk/actions/HideCategory.php trunk/actions/ShowCategory.php trunk/docs/sciret-install-OpenBSD-EN-images.html trunk/fckeditor/.htaccess trunk/fckeditor/editor/ trunk/fckeditor/editor/_source/ trunk/fckeditor/editor/_source/classes/ trunk/fckeditor/editor/_source/classes/fckcontextmenu.js trunk/fckeditor/editor/_source/classes/fckdataprocessor.js trunk/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js trunk/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js trunk/fckeditor/editor/_source/classes/fckdomrange.js trunk/fckeditor/editor/_source/classes/fckdomrange_gecko.js trunk/fckeditor/editor/_source/classes/fckdomrange_ie.js trunk/fckeditor/editor/_source/classes/fckeditingarea.js trunk/fckeditor/editor/_source/classes/fckelementpath.js trunk/fckeditor/editor/_source/classes/fckenterkey.js trunk/fckeditor/editor/_source/classes/fckevents.js trunk/fckeditor/editor/_source/classes/fckicon.js trunk/fckeditor/editor/_source/classes/fckiecleanup.js trunk/fckeditor/editor/_source/classes/fckimagepreloader.js trunk/fckeditor/editor/_source/classes/fckkeystrokehandler.js trunk/fckeditor/editor/_source/classes/fckmenublock.js trunk/fckeditor/editor/_source/classes/fckmenublockpanel.js trunk/fckeditor/editor/_source/classes/fckmenuitem.js trunk/fckeditor/editor/_source/classes/fckpanel.js trunk/fckeditor/editor/_source/classes/fckplugin.js trunk/fckeditor/editor/_source/classes/fckspecialcombo.js trunk/fckeditor/editor/_source/classes/fckstyledef.js trunk/fckeditor/editor/_source/classes/fckstyledef_gecko.js trunk/fckeditor/editor/_source/classes/fckstyledef_ie.js trunk/fckeditor/editor/_source/classes/fckstylesloader.js trunk/fckeditor/editor/_source/classes/fcktoolbar.js trunk/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js trunk/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js trunk/fckeditor/editor/_source/classes/fcktoolbarbutton.js trunk/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js trunk/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js trunk/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js trunk/fckeditor/editor/_source/classes/fckw3crange.js trunk/fckeditor/editor/_source/classes/fckxml_gecko.js trunk/fckeditor/editor/_source/classes/fckxml_ie.js trunk/fckeditor/editor/_source/commandclasses/ trunk/fckeditor/editor/_source/commandclasses/fck_othercommands.js trunk/fckeditor/editor/_source/commandclasses/fckfitwindow.js trunk/fckeditor/editor/_source/commandclasses/fcknamedcommand.js trunk/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js trunk/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js trunk/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js trunk/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js trunk/fckeditor/editor/_source/commandclasses/fckstylecommand.js trunk/fckeditor/editor/_source/commandclasses/fcktablecommand.js trunk/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js trunk/fckeditor/editor/_source/fckconstants.js trunk/fckeditor/editor/_source/fckeditorapi.js trunk/fckeditor/editor/_source/fckjscoreextensions.js trunk/fckeditor/editor/_source/fckscriptloader.js trunk/fckeditor/editor/_source/internals/ trunk/fckeditor/editor/_source/internals/fck.js trunk/fckeditor/editor/_source/internals/fck_contextmenu.js trunk/fckeditor/editor/_source/internals/fck_gecko.js trunk/fckeditor/editor/_source/internals/fck_ie.js trunk/fckeditor/editor/_source/internals/fckbrowserinfo.js trunk/fckeditor/editor/_source/internals/fckcodeformatter.js trunk/fckeditor/editor/_source/internals/fckcommands.js trunk/fckeditor/editor/_source/internals/fckconfig.js trunk/fckeditor/editor/_source/internals/fckdebug.js trunk/fckeditor/editor/_source/internals/fckdialog.js trunk/fckeditor/editor/_source/internals/fckdialog_gecko.js trunk/fckeditor/editor/_source/internals/fckdialog_ie.js trunk/fckeditor/editor/_source/internals/fckdocumentprocessor.js trunk/fckeditor/editor/_source/internals/fckdomtools.js trunk/fckeditor/editor/_source/internals/fcklanguagemanager.js trunk/fckeditor/editor/_source/internals/fcklisthandler.js trunk/fckeditor/editor/_source/internals/fcklistslib.js trunk/fckeditor/editor/_source/internals/fckplugins.js trunk/fckeditor/editor/_source/internals/fckregexlib.js trunk/fckeditor/editor/_source/internals/fckselection.js trunk/fckeditor/editor/_source/internals/fckselection_gecko.js trunk/fckeditor/editor/_source/internals/fckselection_ie.js trunk/fckeditor/editor/_source/internals/fcktablehandler.js trunk/fckeditor/editor/_source/internals/fcktablehandler_gecko.js trunk/fckeditor/editor/_source/internals/fcktablehandler_ie.js trunk/fckeditor/editor/_source/internals/fcktoolbaritems.js trunk/fckeditor/editor/_source/internals/fcktoolbarset.js trunk/fckeditor/editor/_source/internals/fcktools.js trunk/fckeditor/editor/_source/internals/fcktools_gecko.js trunk/fckeditor/editor/_source/internals/fcktools_ie.js trunk/fckeditor/editor/_source/internals/fckundo.js trunk/fckeditor/editor/_source/internals/fckundo_gecko.js trunk/fckeditor/editor/_source/internals/fckundo_ie.js trunk/fckeditor/editor/_source/internals/fckurlparams.js trunk/fckeditor/editor/_source/internals/fckxhtml.js trunk/fckeditor/editor/_source/internals/fckxhtml_gecko.js trunk/fckeditor/editor/_source/internals/fckxhtml_ie.js trunk/fckeditor/editor/_source/internals/fckxhtmlentities.js trunk/fckeditor/editor/css/ trunk/fckeditor/editor/css/behaviors/ trunk/fckeditor/editor/css/behaviors/disablehandles.htc trunk/fckeditor/editor/css/behaviors/showtableborders.htc trunk/fckeditor/editor/css/fck_editorarea.css trunk/fckeditor/editor/css/fck_internal.css trunk/fckeditor/editor/css/fck_showtableborders_gecko.css trunk/fckeditor/editor/css/images/ trunk/fckeditor/editor/css/images/fck_anchor.gif trunk/fckeditor/editor/css/images/fck_flashlogo.gif trunk/fckeditor/editor/css/images/fck_hiddenfield.gif trunk/fckeditor/editor/css/images/fck_pagebreak.gif trunk/fckeditor/editor/dialog/ trunk/fckeditor/editor/dialog/common/ trunk/fckeditor/editor/dialog/common/fck_dialog_common.css trunk/fckeditor/editor/dialog/common/fck_dialog_common.js trunk/fckeditor/editor/dialog/common/fcknumericfield.htc trunk/fckeditor/editor/dialog/common/images/ trunk/fckeditor/editor/dialog/common/images/locked.gif trunk/fckeditor/editor/dialog/common/images/reset.gif trunk/fckeditor/editor/dialog/common/images/unlocked.gif trunk/fckeditor/editor/dialog/common/moz-bindings.xml trunk/fckeditor/editor/dialog/fck_about/ trunk/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif trunk/fckeditor/editor/dialog/fck_about/logo_fredck.gif trunk/fckeditor/editor/dialog/fck_about.html trunk/fckeditor/editor/dialog/fck_anchor.html trunk/fckeditor/editor/dialog/fck_button.html trunk/fckeditor/editor/dialog/fck_checkbox.html trunk/fckeditor/editor/dialog/fck_colorselector.html trunk/fckeditor/editor/dialog/fck_docprops/ trunk/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html trunk/fckeditor/editor/dialog/fck_docprops.html trunk/fckeditor/editor/dialog/fck_find.html trunk/fckeditor/editor/dialog/fck_flash/ trunk/fckeditor/editor/dialog/fck_flash/fck_flash.js trunk/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html trunk/fckeditor/editor/dialog/fck_flash.html trunk/fckeditor/editor/dialog/fck_form.html trunk/fckeditor/editor/dialog/fck_hiddenfield.html trunk/fckeditor/editor/dialog/fck_image/ trunk/fckeditor/editor/dialog/fck_image/fck_image.js trunk/fckeditor/editor/dialog/fck_image/fck_image_preview.html trunk/fckeditor/editor/dialog/fck_image.html trunk/fckeditor/editor/dialog/fck_link/ trunk/fckeditor/editor/dialog/fck_link/fck_link.js trunk/fckeditor/editor/dialog/fck_link.html trunk/fckeditor/editor/dialog/fck_listprop.html trunk/fckeditor/editor/dialog/fck_paste.html trunk/fckeditor/editor/dialog/fck_radiobutton.html trunk/fckeditor/editor/dialog/fck_replace.html trunk/fckeditor/editor/dialog/fck_select/ trunk/fckeditor/editor/dialog/fck_select/fck_select.js trunk/fckeditor/editor/dialog/fck_select.html trunk/fckeditor/editor/dialog/fck_smiley.html trunk/fckeditor/editor/dialog/fck_source.html trunk/fckeditor/editor/dialog/fck_specialchar.html trunk/fckeditor/editor/dialog/fck_spellerpages/ trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/ trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/ trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css trunk/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js trunk/fckeditor/editor/dialog/fck_spellerpages.html trunk/fckeditor/editor/dialog/fck_table.html trunk/fckeditor/editor/dialog/fck_tablecell.html trunk/fckeditor/editor/dialog/fck_template/ trunk/fckeditor/editor/dialog/fck_template/images/ trunk/fckeditor/editor/dialog/fck_template/images/template1.gif trunk/fckeditor/editor/dialog/fck_template/images/template2.gif trunk/fckeditor/editor/dialog/fck_template/images/template3.gif trunk/fckeditor/editor/dialog/fck_template.html trunk/fckeditor/editor/dialog/fck_textarea.html trunk/fckeditor/editor/dialog/fck_textfield.html trunk/fckeditor/editor/fckdebug.html trunk/fckeditor/editor/fckdialog.html trunk/fckeditor/editor/fckeditor.html trunk/fckeditor/editor/filemanager/ trunk/fckeditor/editor/filemanager/browser/ trunk/fckeditor/editor/filemanager/browser/default/ trunk/fckeditor/editor/filemanager/browser/default/browser.css trunk/fckeditor/editor/filemanager/browser/default/browser.html trunk/fckeditor/editor/filemanager/browser/default/connectors/ trunk/fckeditor/editor/filemanager/browser/default/connectors/php/ trunk/fckeditor/editor/filemanager/browser/default/connectors/php/basexml.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/config.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/io.php trunk/fckeditor/editor/filemanager/browser/default/connectors/php/util.php trunk/fckeditor/editor/filemanager/browser/default/connectors/test.html trunk/fckeditor/editor/filemanager/browser/default/frmactualfolder.html trunk/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html trunk/fckeditor/editor/filemanager/browser/default/frmfolders.html trunk/fckeditor/editor/filemanager/browser/default/frmresourceslist.html trunk/fckeditor/editor/filemanager/browser/default/frmresourcetype.html trunk/fckeditor/editor/filemanager/browser/default/frmupload.html trunk/fckeditor/editor/filemanager/browser/default/images/ trunk/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif trunk/fckeditor/editor/filemanager/browser/default/images/Folder.gif trunk/fckeditor/editor/filemanager/browser/default/images/Folder32.gif trunk/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif trunk/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif trunk/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/ trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/ trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif trunk/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif trunk/fckeditor/editor/filemanager/browser/... [truncated message content] |
From: <al...@us...> - 2008-07-09 22:10:29
|
Revision: 608 http://sciret.svn.sourceforge.net/sciret/?rev=608&view=rev Author: alpeb Date: 2008-07-09 15:10:27 -0700 (Wed, 09 Jul 2008) Log Message: ----------- merged https://sciret.svn.sourceforge.net/svnroot/sciret/branches/release-candidates/sciret-1.2 -r 594:HEAD back into the trunk. Please no more unstable commits to the stable branch Modified Paths: -------------- trunk/actions/DeleteArticle.php trunk/actions/Install.php trunk/actions/Login.php trunk/actions/Logout.php trunk/actions/SaveArticle.php trunk/actions/SavePreferences.php trunk/classes/Controller.php trunk/classes/DB.php trunk/classes/MysqlResult.php trunk/flowMap.php trunk/index.php trunk/models/Article.php trunk/models/ArticleGateway.php trunk/models/ArticleIterator.php trunk/models/Category.php trunk/models/CategoryGateway.php trunk/models/Comment.php trunk/models/Configuration.php trunk/models/Favorite.php trunk/models/FavoriteGateway.php trunk/models/File.php trunk/models/History.php trunk/models/HistoryGateway.php trunk/models/Link.php trunk/models/Question.php trunk/models/QuestionGateway.php trunk/models/QuestionIterator.php trunk/models/Todo.php trunk/models/TodoGateway.php trunk/models/User.php trunk/models/UserGateway.php trunk/setup/final.sql trunk/views/EditArticle.php trunk/views/EditPreferences.php trunk/views/ManageUsers.php trunk/views/ViewArticle.php Added Paths: ----------- trunk/config.ini trunk/libs/ trunk/setup/upgrade_1.3.0.sql Removed Paths: ------------- trunk/config.php trunk/models/Model.php Modified: trunk/actions/DeleteArticle.php =================================================================== --- trunk/actions/DeleteArticle.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/actions/DeleteArticle.php 2008-07-09 22:10:27 UTC (rev 608) @@ -20,7 +20,7 @@ if ($this->configuration->getConfigValue('restrictEditDelete')) { $article = new Article($artId); - if ($article->getUserId() != $this->user->getId() && ($this->user->getRole() & ROLE_ADMIN) != ROLE_ADMIN) { + if ($article->getUserId() != $this->user->getId() && ($this->user->getRole() & User::ROLE_ADMIN) != User::ROLE_ADMIN) { $_SESSION['message'] = $this->user->lang('Sorry, only the author or an admin can delete this article.'); Library::redirect(Library::getLink(array('view' => 'ViewArticle', 'id' => $artId))); } Modified: trunk/actions/Install.php =================================================================== --- trunk/actions/Install.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/actions/Install.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,8 +9,6 @@ * @packager TheGang */ -require 'actions/Action.php'; - class Install extends Action { var $db; Modified: trunk/actions/Login.php =================================================================== --- trunk/actions/Login.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/actions/Login.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,20 +9,23 @@ * @packager TheGang */ -require 'actions/Action.php'; - class Login extends Action { function dispatch() { - require 'models/UserGateway.php'; - $userGateway = new UserGateway; - if (!$user = $userGateway->getValidatedUser($_POST['username'], $_POST['password'], $this->configuration)) { + $auth = Zend_Auth::getInstance(); + $db = Zend_Db::factory(Zend_Registry::get('config')->database); + $authAdapter = new Zend_Auth_Adapter_DbTable($db, 'users', 'username', 'password', 'MD5(?)'); + $authAdapter->setIdentity($_POST['username']) + ->setCredential($_POST['password']); + $result = $auth->authenticate($authAdapter); + if ($result->isValid()) { + $user = UserGateway::getValidatedUser($_POST['username'], $_POST['password'], $this->configuration); + $auth->getStorage()->write($user); + } else { $_SESSION['message'] = $this->user->lang('Wrong Username or Password'); Library::redirect(Library::getLink(array('view' => 'Login'))); } - $_SESSION['userId'] = $user->getId(); - if ($user->isPasswordExpired($this->configuration->getConfigValue('passwordExpirationDays'))) { $_SESSION['message'] = $this->user->lang('Your password has expired. Please change it below.'); Library::redirect(Library::getLink(array('view' => 'EditUser', 'userId' => $user->getId()))); Modified: trunk/actions/Logout.php =================================================================== --- trunk/actions/Logout.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/actions/Logout.php 2008-07-09 22:10:27 UTC (rev 608) @@ -14,7 +14,7 @@ class Logout extends Action { function dispatch() { - session_destroy(); + Zend_Auth::getInstance()->clearIdentity(); Library::Redirect(Library::getLink(array('view' => 'MainView'))); } } Modified: trunk/actions/SaveArticle.php =================================================================== --- trunk/actions/SaveArticle.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/actions/SaveArticle.php 2008-07-09 22:10:27 UTC (rev 608) @@ -20,7 +20,7 @@ if ($articleId > 0 && $this->configuration->getConfigValue('restrictEditDelete')) { $article = new Article($articleId); - if ($article->getUserId() != $this->user->getId() && ($this->user->getRole() & ROLE_ADMIN) != ROLE_ADMIN) { + if ($article->getUserId() != $this->user->getId() && ($this->user->getRole() & User::ROLE_ADMIN) != User::ROLE_ADMIN) { $_SESSION['message'] = $this->user->lang('Sorry, only the author or an admin can modify this article.'); Library::redirect(Library::getLink(array('view' => 'ViewArticle', 'id' => $articleId))); } Modified: trunk/actions/SavePreferences.php =================================================================== --- trunk/actions/SavePreferences.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/actions/SavePreferences.php 2008-07-09 22:10:27 UTC (rev 608) @@ -32,7 +32,7 @@ $this->user->setPreference('navigationType', $_POST['navigationType']); } - if (($this->user->getRole() & ROLE_ADMIN) == ROLE_ADMIN) { + if (($this->user->getRole() & User::ROLE_ADMIN) == User::ROLE_ADMIN) { $this->configuration->setConfigValue('publishKB', $_POST['publishKB'] == '1'? '1' : '0'); $this->configuration->setConfigValue('publishArticlesAuto', $_POST['publishArticlesAuto'] == '1'? '1' : '0'); $this->configuration->setConfigValue('publishBookmarksAuto', $_POST['publishBookmarksAuto'] == '1'? '1' : '0'); Modified: trunk/classes/Controller.php =================================================================== --- trunk/classes/Controller.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/classes/Controller.php 2008-07-09 22:10:27 UTC (rev 608) @@ -59,7 +59,7 @@ (($this->user->getRole() & $this->views[$view][MINIMUM_ROLE]) != $this->views[$view][MINIMUM_ROLE]) // or user is anonymous and KB is not public - || ($this->user->getRole() == ROLE_ANONYMOUS && $this->views[$view][ALLOW_VIEW_ONLY_IF_PUBLIC_KB] && !$this->configuration->getConfigValue('publishKB')) + || ($this->user->getRole() == User::ROLE_ANONYMOUS && $this->views[$view][ALLOW_VIEW_ONLY_IF_PUBLIC_KB] && !$this->configuration->getConfigValue('publishKB')) ) { Library::redirect(Library::getLink(array('view' => 'Login'))); Modified: trunk/classes/DB.php =================================================================== --- trunk/classes/DB.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/classes/DB.php 2008-07-09 22:10:27 UTC (rev 608) @@ -1,40 +1,20 @@ <?php -/* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net -* @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License -* @author Alejandro Pedraza -* @since Sciret 1.0 -* @package Sciret -* @packager TheGang -*/ - class DB { - // singleton PHP 4 hack - function DB($calledFromConnect = false) - { - if (!$calledFromConnect) { - trigger_error('Cannot instantiate class DB directly', E_USER_ERROR); - } - } + private static $instance; + + private static $skipFatalError = false; - // Database factory - // @access static - function &DBFactory($dbEngine, $dbHost, $dbUser, $dbPassword, $reconnect = false) { - static $db; + private function __construct() {} - $dbEngine = strtolower($dbEngine); + public static function setDBInstance($dbInstance) { + self::$instance =& $dbInstance; + } - if (!is_object($db) || $reconnect) { - switch ($dbEngine) { - default: - require_once 'classes/Mysql.php'; - $db = new MySQL($dbHost, $dbUser, $dbPassword); - } - } - - return $db; + public static function getInstance() + { + return self::$instance; } } Modified: trunk/classes/MysqlResult.php =================================================================== --- trunk/classes/MysqlResult.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/classes/MysqlResult.php 2008-07-09 22:10:27 UTC (rev 608) @@ -37,17 +37,16 @@ return mysql_num_rows($this->query); } + function rowCount() { + return $this->getNumRows(); + } + // @access public function getAffectedRows() { return mysql_affected_rows($this->mysql->dbConn); } // @access public - function getInsertId() { - return mysql_insert_id($this->mysql->dbConn); - } - - // @access public function getNumFields() { return mysql_num_fields($this->query); } Copied: trunk/config.ini (from rev 607, branches/release-candidates/sciret-1.2/config.ini) =================================================================== --- trunk/config.ini (rev 0) +++ trunk/config.ini 2008-07-09 22:10:27 UTC (rev 608) @@ -0,0 +1,10 @@ +[general] +slowdown_secs = 0 +language_default = "English" + +[database] +adapter = pdo_mysql +params.host = localhost +params.dbname = monkeys +params.username = root +params.password = Deleted: trunk/config.php =================================================================== --- trunk/config.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/config.php 2008-07-09 22:10:27 UTC (rev 608) @@ -1,14 +0,0 @@ -<?php - -define('DB_ENGINE', 'mysql'); -define('DB_HOST', 'localhost'); -define('DB_NAME', 'sciret'); -define('DB_USER', 'root'); -define('DB_PASSWORD', ''); - -define('LANGUAGE_DEFAULT', 'English'); - -// set to > 0 to simulate latency -define('SLOWDOWN_SECS', 0); - -?> \ No newline at end of file Modified: trunk/flowMap.php =================================================================== --- trunk/flowMap.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/flowMap.php 2008-07-09 22:10:27 UTC (rev 608) @@ -11,78 +11,78 @@ define('VIEW_DEFAULT', 'MainView'); -// ClassName => array(minimumRole, loadConfiguration, showHeader, allowOnlyIfPublicKB(for ROLE_ANONYMOUS)?) +// ClassName => array(minimumRole, loadConfiguration, showHeader, allowOnlyIfPublicKB(for User::ROLE_ANONYMOUS)?) $views = array( - 'NotInstalled' => array(ROLE_ANONYMOUS, false, false, false), - 'InstallEnterCredentials' => array(ROLE_ANONYMOUS, false, false, false), - 'InstallOk' => array(ROLE_ANONYMOUS, true, false, false), - 'Login' => array(ROLE_ANONYMOUS, true, true, false), - 'MainView' => array(ROLE_ANONYMOUS, true, true, true), - 'EditArticle' => array(ROLE_REGISTERED, true, true), - 'EditBookmark' => array(ROLE_REGISTERED, true, true), - 'ViewArticle' => array(ROLE_ANONYMOUS, true, true, true), - 'ViewBookmark' => array(ROLE_ANONYMOUS, true, true, true), - 'ManageUsers' => array(ROLE_ADMIN, true, true), - 'EditUser' => array(ROLE_REGISTERED, true, true), - 'AddQuestion' => array(ROLE_ANONYMOUS, true, true, true), - 'EditCategories' => array(ROLE_ANONYMOUS, true, true, true), - 'EditCategory' => array(ROLE_ADMIN, true, true), - 'EditPreferences' => array(ROLE_ANONYMOUS, true, true, true), - 'ManageArticles' => array(ROLE_REGISTERED, true, false), - 'ManageQuestions' => array(ROLE_REGISTERED, true, true), - 'SearchResults' => array(ROLE_ANONYMOUS, true, true, true), - 'AdvancedSearch' => array(ROLE_ANONYMOUS, true, true, true), - 'PrinterView' => array(ROLE_ANONYMOUS, true, false, true), - 'MailArticle' => array(ROLE_ANONYMOUS, true, true, true), - 'ViewComments' => array(ROLE_ANONYMOUS, true, false, true), - 'ViewBookmarkDetails' => array(ROLE_ANONYMOUS, true, false, true), - 'ViewRelatedArticles' => array(ROLE_ANONYMOUS, true, false, true), - 'GetFavoritesDropdown' => array(ROLE_REGISTERED, true, false), - 'GetTodosDropdown' => array(ROLE_REGISTERED, true, false), - 'EditTodo' => array(ROLE_REGISTERED, true, false), - 'Upgrade' => array(ROLE_ANONYMOUS, true, true, false), - 'UpgradeOk' => array(ROLE_ANONYMOUS, true, true, false), + 'NotInstalled' => array(User::ROLE_ANONYMOUS, false, false, false), + 'InstallEnterCredentials' => array(User::ROLE_ANONYMOUS, false, false, false), + 'InstallOk' => array(User::ROLE_ANONYMOUS, true, false, false), + 'Login' => array(User::ROLE_ANONYMOUS, true, true, false), + 'MainView' => array(User::ROLE_ANONYMOUS, true, true, true), + 'EditArticle' => array(User::ROLE_REGISTERED, true, true), + 'EditBookmark' => array(User::ROLE_REGISTERED, true, true), + 'ViewArticle' => array(User::ROLE_ANONYMOUS, true, true, true), + 'ViewBookmark' => array(User::ROLE_ANONYMOUS, true, true, true), + 'ManageUsers' => array(User::ROLE_ADMIN, true, true), + 'EditUser' => array(User::ROLE_REGISTERED, true, true), + 'AddQuestion' => array(User::ROLE_ANONYMOUS, true, true, true), + 'EditCategories' => array(User::ROLE_ANONYMOUS, true, true, true), + 'EditCategory' => array(User::ROLE_ADMIN, true, true), + 'EditPreferences' => array(User::ROLE_ANONYMOUS, true, true, true), + 'ManageArticles' => array(User::ROLE_REGISTERED, true, false), + 'ManageQuestions' => array(User::ROLE_REGISTERED, true, true), + 'SearchResults' => array(User::ROLE_ANONYMOUS, true, true, true), + 'AdvancedSearch' => array(User::ROLE_ANONYMOUS, true, true, true), + 'PrinterView' => array(User::ROLE_ANONYMOUS, true, false, true), + 'MailArticle' => array(User::ROLE_ANONYMOUS, true, true, true), + 'ViewComments' => array(User::ROLE_ANONYMOUS, true, false, true), + 'ViewBookmarkDetails' => array(User::ROLE_ANONYMOUS, true, false, true), + 'ViewRelatedArticles' => array(User::ROLE_ANONYMOUS, true, false, true), + 'GetFavoritesDropdown' => array(User::ROLE_REGISTERED, true, false), + 'GetTodosDropdown' => array(User::ROLE_REGISTERED, true, false), + 'EditTodo' => array(User::ROLE_REGISTERED, true, false), + 'Upgrade' => array(User::ROLE_ANONYMOUS, true, true, false), + 'UpgradeOk' => array(User::ROLE_ANONYMOUS, true, true, false), ); -// ClassName => array(minimumRole, loadConfiguration, allowOnlyIfPublicKB(for ROLE_ANONYMOUS)?) +// ClassName => array(minimumRole, loadConfiguration, allowOnlyIfPublicKB(for User::ROLE_ANONYMOUS)?) $actions = array( - 'Install' => array(ROLE_ANONYMOUS, false, false), - 'Login' => array(ROLE_ANONYMOUS, true, false), - 'Logout' => array(ROLE_REGISTERED, true), - 'SaveArticle' => array(ROLE_REGISTERED, true), - 'SaveBookmark' => array(ROLE_REGISTERED, true), - 'UploadFile' => array(ROLE_REGISTERED, true), - 'GetFile' => array(ROLE_ANONYMOUS, true, true), - 'DeleteFile' => array(ROLE_REGISTERED, true), - 'AddLink' => array(ROLE_REGISTERED, true), - 'DeleteLink' => array(ROLE_REGISTERED, true), - 'AddCommentAndRating' => array(ROLE_ANONYMOUS, true, true), - 'DeleteComment' => array(ROLE_REGISTERED, true), - 'PublishComment' => array(ROLE_REGISTERED, true), - 'EditUser' => array(ROLE_REGISTERED, true), - 'DeleteUser' => array(ROLE_ADMIN, true), - 'AddQuestion' => array(ROLE_ANONYMOUS, true, true), - 'SaveCategory' => array(ROLE_ADMIN, true), - 'DeleteCategory' => array(ROLE_ADMIN, true), - 'SavePreferences' => array(ROLE_ANONYMOUS, true, true), - 'DeleteArticle' => array(ROLE_REGISTERED, true), - 'PublishArticle' => array(ROLE_REGISTERED, true), - 'PublishQuestion' => array(ROLE_REGISTERED, true), - 'AddRelatedArticles' => array(ROLE_REGISTERED, true), - 'DeleteRelatedArticle' => array(ROLE_REGISTERED, true), - 'MailArticle' => array(ROLE_ANONYMOUS, true, true), - 'ArticleToPdf' => array(ROLE_ANONYMOUS, true, true), - 'DeleteQuestion' => array(ROLE_REGISTERED, true), - 'MarkArticle' => array(ROLE_REGISTERED, true), - 'MarkSearchResults' => array(ROLE_REGISTERED, true), - 'MarkLocation' => array(ROLE_REGISTERED, true), - 'SaveTodo' => array(ROLE_REGISTERED, true), - 'CompleteTodo' => array(ROLE_REGISTERED, true), - 'DeleteTodo' => array(ROLE_REGISTERED, true), - 'MarkArticleFinal' => array(ROLE_REGISTERED, true), - 'Upgrade' => array(ROLE_ANONYMOUS, true, false), - 'HideCategory' => array(ROLE_ANONYMOUS, true, true), - 'ShowCategory' => array(ROLE_ANONYMOUS, true, true), + 'Install' => array(User::ROLE_ANONYMOUS, false, false), + 'Login' => array(User::ROLE_ANONYMOUS, true, false), + 'Logout' => array(User::ROLE_REGISTERED, true), + 'SaveArticle' => array(User::ROLE_REGISTERED, true), + 'SaveBookmark' => array(User::ROLE_REGISTERED, true), + 'UploadFile' => array(User::ROLE_REGISTERED, true), + 'GetFile' => array(User::ROLE_ANONYMOUS, true, true), + 'DeleteFile' => array(User::ROLE_REGISTERED, true), + 'AddLink' => array(User::ROLE_REGISTERED, true), + 'DeleteLink' => array(User::ROLE_REGISTERED, true), + 'AddCommentAndRating' => array(User::ROLE_ANONYMOUS, true, true), + 'DeleteComment' => array(User::ROLE_REGISTERED, true), + 'PublishComment' => array(User::ROLE_REGISTERED, true), + 'EditUser' => array(User::ROLE_REGISTERED, true), + 'DeleteUser' => array(User::ROLE_ADMIN, true), + 'AddQuestion' => array(User::ROLE_ANONYMOUS, true, true), + 'SaveCategory' => array(User::ROLE_ADMIN, true), + 'DeleteCategory' => array(User::ROLE_ADMIN, true), + 'SavePreferences' => array(User::ROLE_ANONYMOUS, true, true), + 'DeleteArticle' => array(User::ROLE_REGISTERED, true), + 'PublishArticle' => array(User::ROLE_REGISTERED, true), + 'PublishQuestion' => array(User::ROLE_REGISTERED, true), + 'AddRelatedArticles' => array(User::ROLE_REGISTERED, true), + 'DeleteRelatedArticle' => array(User::ROLE_REGISTERED, true), + 'MailArticle' => array(User::ROLE_ANONYMOUS, true, true), + 'ArticleToPdf' => array(User::ROLE_ANONYMOUS, true, true), + 'DeleteQuestion' => array(User::ROLE_REGISTERED, true), + 'MarkArticle' => array(User::ROLE_REGISTERED, true), + 'MarkSearchResults' => array(User::ROLE_REGISTERED, true), + 'MarkLocation' => array(User::ROLE_REGISTERED, true), + 'SaveTodo' => array(User::ROLE_REGISTERED, true), + 'CompleteTodo' => array(User::ROLE_REGISTERED, true), + 'DeleteTodo' => array(User::ROLE_REGISTERED, true), + 'MarkArticleFinal' => array(User::ROLE_REGISTERED, true), + 'Upgrade' => array(User::ROLE_ANONYMOUS, true, false), + 'HideCategory' => array(User::ROLE_ANONYMOUS, true, true), + 'ShowCategory' => array(User::ROLE_ANONYMOUS, true, true), ); ?> Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/index.php 2008-07-09 22:10:27 UTC (rev 608) @@ -13,14 +13,25 @@ error_reporting(E_ALL); ini_set('display_errors', 1); +$pathList = array( + get_include_path(), + dirname(__FILE__), + dirname(__FILE__).'/libs', + dirname(__FILE__).'/classes', + dirname(__FILE__).'/models', + dirname(__FILE__).'/modules/default/models', + dirname(__FILE__).'/modules/blog/models', + dirname(__FILE__).'/actions', +); +set_include_path(implode(PATH_SEPARATOR, $pathList)); +require_once 'Zend/Loader.php'; + $times = explode(' ', microtime()); $GLOBALS['startTime'] = $times[0] + $times[1]; -require 'classes/Library.php'; -require 'classes/DB.php'; -require 'models/User.php'; -require 'classes/Controller.php'; -require 'config.php'; +$config = new Zend_Config_Ini(dirname(__FILE__). '/config.ini', null, array('allowModifications' => true)); +Zend_Registry::set('config', $config); + require 'flowMap.php'; // MAGIC_QUOTES HANDLING @@ -32,22 +43,45 @@ } set_magic_quotes_runtime(0); -$db =& DB::DBFactory(DB_ENGINE, DB_HOST, DB_USER, DB_PASSWORD); +/************************** +* DATABASE +/**************************/ +$config->database->params->driver_options = array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true); +$db = Zend_Db::factory($config->database); +$connectionFailed = false; +try { + $db->getConnection(); +} catch (Zend_Db_Adapter_Exception $e) { + $connectionFailed = true; +} +DB::setDBInstance($db); + if ((!in_array(@$_GET['action'], array('Install'))) && !in_array(@$_GET['view'], array('ConfigNotWritable', 'InstallEnterCredentials')) - && (DB_NAME == '' || !$db->connect() || !$db->selectDb(DB_NAME) || !$db->hasTables())) + && ($config->database->params->dbname == '' || $connectionFailed)) { $_GET['view'] = 'NotInstalled'; } -session_start(); -if (isset($_SESSION['userId'])) { - $user = new User($_SESSION['userId']); +Zend_Session::start(); +$auth = Zend_Auth::getInstance(); +if ($auth->hasIdentity()) { + $user = $auth->getStorage()->read(); + $user->init(); + if ($user->app == 'monkeys') { + $publicId = $user->publicId; + $user = new User($publicId); + $user->app = 'sciret'; + $auth->getStorage()->write($user); + } } else { - $user = new User; + // guest user + $user = new User(); } +Zend_Registry::set('user', $user); + $controller = new Controller($views, $actions, $user); if (isset($_GET['view'])) { @@ -58,4 +92,13 @@ $controller->processView(VIEW_DEFAULT); } + +/************************** +* AUTOLOADING FUNCTION +**************************/ +function __autoload($className) { + Zend_Loader::loadClass($className); +} + + ?> Copied: trunk/libs (from rev 607, branches/release-candidates/sciret-1.2/libs) Property changes on: trunk/libs ___________________________________________________________________ Name: svn:externals + Zend http://framework.zend.com/svn/framework/standard/tags/release-1.5.2/library/Zend Modified: trunk/models/Article.php =================================================================== --- trunk/models/Article.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Article.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,23 +9,20 @@ * @packager TheGang */ -require_once 'models/Model.php'; - -class Article extends Model { +class Article { var $id; var $isBookmark = 0; var $questionId; var $catId; var $catLabel; var $title; - var $URL; + var $URL = ''; var $expDate; - var $question; + var $question = ''; var $content; var $excerpt; var $published = 1; var $draft = 0; - var $user; var $userId; var $views = 0; var $creationDate; @@ -44,15 +41,15 @@ var $votes5 = 0; var $internal = 0; + private $user; + function Article($id = false) { - parent::Model(); - if ($id) { // left join because cat_id=0 doesn't exist in the db $query = 'SELECT is_bookmark, title, url, expires, question, content, art.cat_id, cat.name AS catLabel, published, draft, user_id, views, created, modified, modified_user_id, votes_1, votes_2, votes_3, votes_4, votes_5, internal ' .'FROM articles art LEFT JOIN categories cat ON cat.cat_id=art.cat_id ' .'WHERE art_id = ?'; - $result = $this->db->query($query, $id); + $result = DB::getInstance()->query($query, $id); if ($row = $result->fetch()) { $this->id = $id; $this->isBookmark = $row['is_bookmark']; @@ -81,13 +78,73 @@ } function save() { + $db = DB::getInstance(); if (!isset($this->id)) { $query = 'INSERT INTO articles (is_bookmark, title, url, expires, question, content, cat_id, published, draft, user_id, views, internal, created) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW())'; - $result = $this->db->query($query, $this->isBookmark, $this->title, $this->URL, $this->expDate, $this->question, $this->content, $this->catId, $this->published, $this->draft, $this->userId, $this->views, $this->internal); - $this->id = $result->getInsertId(); + $result = $db->query( $query, array( + $this->isBookmark, + $this->title, + $this->URL, + $this->expDate, + $this->question, + $this->content, + $this->catId, + $this->published, + $this->draft, + $this->userId, + $this->views, + $this->internal + ) + ); + $this->id = $db->lastInsertId(); } else { - $query = 'UPDATE articles SET is_bookmark=?, title=?, url=?, expires=?, question=?, content=?, cat_id=?, published=?, draft=?, user_id=?, views=?, created=?, modified=?, modified_user_id=?, votes_1=?, votes_2=?, votes_3=?, votes_4=?, votes_5=?, internal=? WHERE art_id=?'; - $this->db->query($query, $this->isBookmark, $this->title, $this->URL, $this->expDate, $this->question, $this->content, $this->catId, $this->published, $this->draft, $this->userId, $this->views, $this->creationDate, $this->modificationDate, $this->modifiedByUserId, $this->votes1, $this->votes2, $this->votes3, $this->votes4, $this->votes5, $this->internal, $this->id); + $query = 'UPDATE articles SET ' + .'is_bookmark=?, ' + .'title=?, ' + .'url=?, ' + .'expires=?, ' + .'question=?, ' + .'content=?, ' + .'cat_id=?, ' + .'published=?, ' + .'draft=?, ' + .'user_id=?, ' + .'views=?, ' + .'created=?, ' + .'modified=?, ' + .'modified_user_id=?, ' + .'votes_1=?, ' + .'votes_2=?, ' + .'votes_3=?, ' + .'votes_4=?, ' + .'votes_5=?, ' + .'internal=? ' + .'WHERE art_id=?'; + DB::getInstance()->query( $query, + array( + $this->isBookmark, + $this->title, + $this->URL, + $this->expDate, + $this->question, + $this->content, + $this->catId, + $this->published, + $this->draft, + $this->userId, + $this->views, + $this->creationDate, + $this->modificationDate, + $this->modifiedByUserId, + $this->votes1, + $this->votes2, + $this->votes3, + $this->votes4, + $this->votes5, + $this->internal, + $this->id + ) + ); } } @@ -213,6 +270,11 @@ $this->views = (int)$views; } + public function getFormatedCreationDate() { + preg_match('/(\d\d\d\d)-(\d\d)-(\d\d)/', $this->getCreationDate(), $matches); + return $matches[2].'/'.$matches[3].'/'.$matches[1]; + } + function getCreationDate() { return $this->creationDate; } @@ -244,11 +306,15 @@ } function getUser() { + if (!isset($this->user)) { + $this->user = new User($this->getUserId()); + } + return $this->user; } - function setUser($userObj) { - $this->user = $userObj; + function setUser(&$userObj) { + $this->user =& $userObj; } function getModificationDate() { @@ -348,7 +414,7 @@ if (!isset($this->files)) { $query = 'SELECT file_id, art_id, filename, comment, hash FROM files WHERE art_id=?'; - $result = $this->db->query($query, $this->id); + $result = DB::getInstance()->query($query, $this->id); $this->files = array(); while ($row = $result->fetch()) { $file = new File; @@ -377,7 +443,7 @@ if (!isset($this->links)) { $query = 'SELECT link_id, art_id, title, url FROM links WHERE art_id=?'; - $result = $this->db->query($query, $this->id); + $result = DB::getInstance()->query($query, $this->id); $this->links = array(); while ($row = $result->fetch()) { $link = new Link; @@ -395,7 +461,7 @@ function getRelatedArticles() { if (!isset($this->relatedArticles)) { $query = 'SELECT art_id, related_art_id FROM articles_related WHERE art_id=?'; - $result = $this->db->query($query, $this->id); + $result = DB::getInstance()->query($query, $this->id); $this->relatedArticles = array(); while ($row = $result->fetch()) { $this->relatedArticles[] = new Article($row['related_art_id']); @@ -420,7 +486,7 @@ $this->getRelatedArticles(); $query = 'DELETE FROM articles_related WHERE art_id=?'; - $this->db->query($query, $this->id); + DB::getInstance()->query($query, $this->id); foreach ($arrRelatedArticles as $relatedArtId) { $article = new Article; @@ -430,13 +496,13 @@ foreach ($this->relatedArticles as $article) { $query = 'INSERT INTO articles_related (art_id, related_art_id) VALUES (?, ?)'; - $this->db->query($query, $this->id, $article->getId()); + DB::getInstance()->query($query, $this->id, $article->getId()); } } function deleteRelatedArticle($artId) { $query = 'DELETE FROM articles_related WHERE art_id=? AND related_art_id=?'; - $this->db->query($query, $this->id, $artId); + DB::getInstance()->query($query, array($this->id, $artId)); } function getComments() { @@ -444,7 +510,7 @@ if (!isset($this->comments)) { $query = 'SELECT comment_id, username, contents, entered, published FROM comments WHERE art_id = ?'; - $result = $this->db->query($query, $this->id); + $result = DB::getInstance()->query($query, $this->id); $this->comments = array(); while ($row = $result->fetch()) { $comment = new Comment; Modified: trunk/models/ArticleGateway.php =================================================================== --- trunk/models/ArticleGateway.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/ArticleGateway.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,31 +9,25 @@ * @packager TheGang */ -require_once 'models/Model.php'; -require_once 'models/Article.php'; -require_once 'models/ArticleIterator.php'; - define('EXCERPT_LENGTH', 300); -class ArticleGateway extends Model { +class ArticleGateway { - function getArticles( $catId, - $includeSubCats, - $specialList = false, - $includeUnpublished = false, - $onlyUnpublished = false, - $offset = 0, - $numRecords = -1, - $set = 'all', - $sort = false, - $showExpired = false, - $showDrafts = false) + public static function getArticles( $catId, + $includeSubCats, + $specialList = false, + $includeUnpublished = false, + $onlyUnpublished = false, + $offset = 0, + $numRecords = -1, + $set = 'all', + $sort = false, + $showExpired = false, + $showDrafts = false) { // uncomment for testing //$numRecords = 3; - require_once 'models/CategoryGateway.php'; - $catId = (int)$catId; $whereArr = array(); @@ -111,14 +105,15 @@ break; } - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); if ($numRecords != -1) { $query2 = 'SELECT FOUND_ROWS()'; - $result2 = $this->db->query($query2); - list($totalNumItems) = $result2->fetch(); + $result2 = DB::getInstance()->query($query2); + $rows = $result2->fetch(); + $totalNumItems = $rows['FOUND_ROWS()']; } else { - $totalNumItems = $result->getNumRows(); + $totalNumItems = $result->rowCount(); } return new ArticleIterator($result, $totalNumItems); @@ -144,7 +139,7 @@ .'FROM articles art LEFT JOIN files f on art.art_id = f.art_id LEFT JOIN users u ON art.user_id = u.user_id ' ."WHERE $where " .'GROUP BY art.art_id'; - $result = $this->db->query($query, $searchQuery); + $result = DB::getInstance()->query($query, $searchQuery); } else { switch ($set) { case 'bookmarks': @@ -164,15 +159,16 @@ if ($numRecords != -1) { $query .= ' LIMIT ' . (int)$offset . ', ' . (int)$numRecords; } - $result = $this->db->query($query, $searchQuery, $searchQuery); + $result = DB::getInstance()->query($query, $searchQuery, $searchQuery); } if ($numRecords != -1) { $query2 = 'SELECT FOUND_ROWS()'; - $result2 = $this->db->query($query2); - list($totalNumItems) = $result2->fetch(); + $result2 = DB::getInstance()->query($query2); + $rows = $result2->fetch(); + $totalNumItems = $rows['FOUND_ROWS()']; } else { - $totalNumItems = $result->getNumRows(); + $totalNumItems = $result->rowCount(); } return new ArticleIterator($result, $totalNumItems); @@ -209,7 +205,7 @@ if ($allWords != '') { $wordList = explode(' ', $allWords); for ($i = 0; $i < count($wordList); $i++) { - $wordList[$i] = $this->db->escape_string($wordList[$i]); + $wordList[$i] = DB::escape_string($wordList[$i]); if ($ocurrences == 'title') { $wordList[$i] = "title LIKE '%{$wordList[$i]}%'"; } elseif ($ocurrences == 'content') { @@ -222,7 +218,7 @@ } if ($exactPhrase != '') { - $exactPhrase = $this->db->escape_string($exactPhrase); + $exactPhrase = DB::escape_string($exactPhrase); if ($ocurrences == 'title') { $whereArr[] = "title LIKE '%$exactPhrase%'"; } elseif ($ocurrences == 'content') { @@ -235,7 +231,7 @@ if ($oneWord != '') { $wordList = explode(' ', $oneWord); for ($i = 0; $i < count($wordList); $i++) { - $wordList[$i] = $this->db->escape_string($wordList[$i]); + $wordList[$i] = DB::escape_string($wordList[$i]); if ($ocurrences == 'title') { $wordList[$i] = "title LIKE '%{$wordList[$i]}%'"; } elseif ($ocurrences == 'content') { @@ -250,7 +246,7 @@ if ($excludeList != '') { $wordList = explode(' ', $excludeList); for ($i = 0; $i < count($wordList); $i++) { - $wordList[$i] = $this->db->escape_string($wordList[$i]); + $wordList[$i] = DB::escape_string($wordList[$i]); if ($ocurrences == 'title') { $wordList[$i] = "title NOT LIKE '%{$wordList[$i]}%'"; } elseif ($ocurrences == 'content') { @@ -317,14 +313,14 @@ if ($numRecords != -1) { $query .= ' LIMIT ' . (int)$offset . ', ' . (int)$numRecords; } - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); if ($numRecords != -1) { $query2 = 'SELECT FOUND_ROWS()'; - $result2 = $this->db->query($query2); + $result2 = DB::getInstance()->query($query2); list($totalNumItems) = $result2->fetch(); } else { - $totalNumItems = $result->getNumRows(); + $totalNumItems = $result->rowCount(); } return new ArticleIterator($result, $totalNumItems); @@ -337,26 +333,26 @@ } $query = 'DELETE FROM articles WHERE art_id=?'; - $this->db->query($query, $id); + DB::getInstance()->query($query, $id); $query = 'DELETE FROM articles_related WHERE art_id=? OR related_art_id=?'; - $this->db->query($query, $id, $id); + DB::getInstance()->query($query, array($id, $id)); $query = 'DELETE FROM comments WHERE art_id=?'; - $this->db->query($query, $id); + DB::getInstance()->query($query, $id); $query = 'DELETE FROM links WHERE art_id=?'; - $this->db->query($query, $id); + DB::getInstance()->query($query, $id); $query = 'DELETE FROM history WHERE art_id=?'; - $this->db->query($query, $id); + DB::getInstance()->query($query, $id); } function numUnpublishedArticles() { $query = "SELECT art_id FROM articles WHERE published = 0"; - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); - return $result->getNumRows(); + return $result->rowCount(); } } Modified: trunk/models/ArticleIterator.php =================================================================== --- trunk/models/ArticleIterator.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/ArticleIterator.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,10 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; -require_once 'models/Article.php'; - -class ArticleIterator extends Model { +class ArticleIterator { var $resultSet; var $totalNumItems; @@ -53,13 +50,6 @@ $article->setNumFiles($row['num_files']); } - if (isset($row['firstname'])) { - $tUser = new User; - $tUser->setFirstName($row['firstname']); - $tUser->setLastName($row['lastname']); - $article->setUser($tUser); - } - return $article; } Modified: trunk/models/Category.php =================================================================== --- trunk/models/Category.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Category.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,9 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; - -class Category extends Model { +class Category { var $id; var $label = ''; var $description = ''; @@ -20,11 +18,9 @@ var $iconFileName = ''; function Category($id = false) { - parent::Model(); - if ($id) { $query = 'SELECT cat_id, name, description, parent_id, icon FROM categories WHERE cat_id = ?'; - $result = $this->db->query($query, $id); + $result = DB::getInstance()->query($query, $id); if ($row = $result->fetch()) { $this->id = $id; $this->label = $row['name']; @@ -36,31 +32,32 @@ } function save() { + $db = DB::getInstance(); if (!isset($this->id)) { $query = 'INSERT INTO categories (name, description, parent_id, icon) VALUES(?, ?, ?, ?)'; - $result = $this->db->query($query, $this->label, $this->description, $this->parentId, $this->iconFileName); - $this->id = $result->getInsertId(); + $result = $db->query($query, array($this->label, $this->description, $this->parentId, $this->iconFileName)); + $this->id = $db->lastInsertId(); } else { $query = 'UPDATE categories SET name=?, description=?, parent_id=?, icon=? WHERE cat_id=?'; - $result = $this->db->query($query, $this->label, $this->description, $this->parentId, $this->iconFileName, $this->id); + $result = $db->query($query, array($this->label, $this->description, $this->parentId, $this->iconFileName, $this->id)); } } function delete() { $query = 'SELECT cat_id FROM categories WHERE parent_id=?'; - $result = $this->db->query($query, $this->id); + $result = DB::getInstance()->query($query, $this->id); if ($result->getNumRows() > 0) { return false; } $query = 'DELETE FROM categories WHERE cat_id=?'; - $this->db->query($query, $this->id); + DB::getInstance()->query($query, $this->id); $query = 'UPDATE articles SET cat_id=0 WHERE cat_id=?'; - $this->db->query($query, $this->id); + DB::getInstance()->query($query, $this->id); $query = 'UPDATE questions SET cat_id=0 WHERE cat_id=?'; - $this->db->query($query, $this->id); + DB::getInstance()->query($query, $this->id); return true; } Modified: trunk/models/CategoryGateway.php =================================================================== --- trunk/models/CategoryGateway.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/CategoryGateway.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,10 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; -require_once 'models/Category.php'; - -class CategoryGateway extends Model { +class CategoryGateway { var $categories; function getCategories() { @@ -22,7 +19,7 @@ $this->categories[0] = new Category; $query = 'SELECT cat_id, name, description, parent_id, icon FROM categories ORDER BY parent_id, name'; - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); while ($row = $result->fetch()) { $this->categories[$row['cat_id']] = new Category; $this->categories[$row['cat_id']]->setId($row['cat_id']); Modified: trunk/models/Comment.php =================================================================== --- trunk/models/Comment.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Comment.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,9 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; - -class Comment extends Model { +class Comment { var $id; var $userName; var $entered; @@ -20,11 +18,9 @@ var $articleId; function Comment($id = false) { - parent::Model(); - if ($id) { $query = 'SELECT username, contents, entered, art_id, published FROM comments WHERE comment_id=?'; - $result = $this->db->query($query, $id); + $result = DB::getInstance()->query($query, $id); if ($row = $result->fetch()) { $this->userName = $row['username']; $this->contents = $row['contents']; @@ -37,19 +33,20 @@ } function save() { + $db = DB::getInstance(); if (!isset($this->id)) { $query = 'INSERT INTO comments (username, contents, entered, art_id, published) VALUES(?, ?, ?, ?, ?)'; - $result = $this->db->query($query, $this->userName, $this->contents, $this->entered, $this->articleId, $this->published); - $this->id = $result->getInsertId(); + $result = $db->query($query, array($this->userName, $this->contents, $this->entered, $this->articleId, $this->published)); + $this->id = $db->lastInsertId(); } else { $query = 'UPDATE comments SET username=?, contents=?, entered=?, art_id=?, published=? WHERE comment_id=?'; - $this->db->query($query, $this->userName, $this->contents, $this->entered, $this->articleId, $this->published, $this->id); + $db->query($query, array($this->userName, $this->contents, $this->entered, $this->articleId, $this->published, $this->id)); } } function delete() { $query = 'DELETE FROM comments WHERE comment_id = ?'; - $this->db->query($query, $this->id); + DB::getInstance()->query($query, $this->id); } function getId() { Modified: trunk/models/Configuration.php =================================================================== --- trunk/models/Configuration.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Configuration.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,10 +9,8 @@ * @packager TheGang */ -require_once 'models/Model.php'; +class Configuration { -class Configuration extends Model { - var $configurationArray = array( // var name => array(defaultValue, isHidden) 'publishKB' => 1, @@ -25,10 +23,8 @@ ); function Configuration() { - parent::Model(); - $query = 'SELECT field, value FROM configuration'; - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); while ($row = $result->fetch()) { $this->configurationArray[$row['field']] = $row['value']; } @@ -36,11 +32,11 @@ function save() { $query = 'DELETE FROM configuration'; - $result = $this->db->query($query); + $result = DB::getInstance()->query($query); foreach ($this->configurationArray as $field => $value) { $query = 'INSERT INTO configuration (field, value) VALUES (?, ?)'; - $result = $this->db->query($query, $field, $value); + $result = DB::getInstance()->query($query, $field, $value); } } Modified: trunk/models/Favorite.php =================================================================== --- trunk/models/Favorite.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Favorite.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,13 +9,11 @@ * @packager TheGang */ -require_once 'models/Model.php'; - define('FAVORITE_TYPE_ARTICLE', 1); define('FAVORITE_TYPE_LOCATION', 2); define('FAVORITE_TYPE_SEARCHRESULT', 3); -class Favorite extends Model { +class Favorite { var $id; var $userId; var $type; @@ -24,11 +22,10 @@ var $searchStr = ''; function Favorite($id = false) { - parent::Model(); if ($id) { $query = 'SELECT favorite_id, user_id, favorite_type, art_id, cat_id, search_str FROM favorites WHERE favorite_id = ?'; - $result = $this->db->query($query, $id); + $result = DB::getInstance()->query($query, $id); if ($row = $result->fetch()) { $this->id = $id; $this->userId = $row['user_id']; @@ -42,9 +39,10 @@ function save() { if (!isset($this->id)) { + $db = DB::getInstance(); $query = 'INSERT INTO favorites (user_id, favorite_type, art_id, cat_id, search_str) VALUES (?, ?, ?, ?, ?)'; - $result = $this->db->query($query, $this->userId, $this->type, $this->artId, $this->catId, $this->searchStr); - $this->id = $result->getInsertId(); + $result = $db->query($query, array($this->userId, $this->type, $this->artId, $this->catId, $this->searchStr)); + $this->id = $db->lastInsertId(); } } Modified: trunk/models/FavoriteGateway.php =================================================================== --- trunk/models/FavoriteGateway.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/FavoriteGateway.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,10 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; -require_once 'models/Favorite.php'; - -class FavoriteGateway extends Model { +class FavoriteGateway { var $favorites; function getFavorites($userId) { @@ -20,7 +17,7 @@ $this->favorites = array(); $query = 'SELECT favorite_id, user_id, favorite_type, art_id, cat_id, search_str FROM favorites WHERE user_id = ?'; - $result = $this->db->query($query, $userId); + $result = DB::getInstance()->query($query, $userId); while ($row = $result->fetch()) { $favorite = new Favorite; @@ -39,36 +36,36 @@ function isArticleFavorite($artId, $userId) { $query = 'SELECT favorite_id FROM favorites WHERE art_id = ? AND user_id = ?'; - $result = $this->db->query($query, $artId, $userId); + $result = DB::getInstance()->query($query, array($artId, $userId)); - return ($result->getNumRows() > 0); + return ($result->rowCount() > 0); } function deleteArticleFavorite($artId, $userId) { $query = 'DELETE FROM favorites WHERE art_id = ? AND user_id = ?'; - $result = $this->db->query($query, $artId, $userId); + $result = DB::getInstance()->query($query, $artId, $userId); } function deleteSearchResultFavorite($queryStr, $userId) { $query = 'DELETE FROM favorites WHERE search_str = ? AND user_id = ?'; - $result = $this->db->query($query, $queryStr, $userId); + $result = DB::getInstance()->query($query, $queryStr, $userId); } function deleteLocationFavorite($catId, $userId) { $query = 'DELETE FROM favorites WHERE cat_id = ? AND user_id = ?'; - $result = $this->db->query($query, $catId, $userId); + $result = DB::getInstance()->query($query, $catId, $userId); } function isSearchResultFavorite($queryStr, $userId) { $query = 'SELECT favorite_id FROM favorites WHERE search_str = ? AND user_id = ?'; - $result = $this->db->query($query, $queryStr, $userId); + $result = DB::getInstance()->query($query, $queryStr, $userId); return ($result->getNumRows() > 0); } function isLocationFavorite($catId, $userId) { $query = 'SELECT favorite_id FROM favorites WHERE cat_id = ? AND user_id = ?'; - $result = $this->db->query($query, $catId, $userId); + $result = DB::getInstance()->query($query, $catId, $userId); return ($result->getNumRows() > 0); } Modified: trunk/models/File.php =================================================================== --- trunk/models/File.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/File.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,9 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; - -class File extends Model { +class File { var $id; var $articleId; var $fileName; @@ -19,11 +17,10 @@ var $hash; function File($id = false) { - parent::Model(); if ($id) { $query = 'SELECT art_id, filename, comment, hash FROM files WHERE file_id = ?'; - $result = $this->db->query($query, $id); + $result = DB::$instance->query($query, $id); if (!$row = $result->fetch()) { return; } @@ -38,15 +35,16 @@ function save() { if (!isset($this->id)) { + $db = DB::getInstance(); $query = 'INSERT INTO files (art_id, filename, comment, hash) VALUES (?, ?, ?, ?)'; - $result = $this->db->query($query, $this->articleId, $this->fileName, $this->comment, $this->hash); - $this->id = $result->getInsertId(); + $result = $db->query($query, array($this->articleId, $this->fileName, $this->comment, $this->hash)); + $this->id = $db->lastInsertId(); } } function delete() { $query = 'DELETE FROM files WHERE file_id=?'; - $this->db->query($query, $this->id); + DB::$instance->query($query, $this->id); return @unlink('uploads/files/'.$this->hash); } Modified: trunk/models/History.php =================================================================== --- trunk/models/History.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/History.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,9 +9,7 @@ * @packager TheGang */ -require_once 'models/Model.php'; - -class History extends Model { +class History { var $id; var $articleId; var $date; @@ -19,15 +17,12 @@ var $action; var $actionArgs = ''; - function History() { - parent::Model(); - } - function save() { if (!isset($this->id)) { + $db = DB::getInstance(); $query = 'INSERT INTO history (art_id, date, user, action, action_args) VALUES (?, ?, ?, ?, ?)'; - $result = $this->db->query($query, $this->articleId, $this->date, $this->userFullName, $this->action, $this->actionArgs); - $this->id = $result->getInsertId(); + $result = $db->query($query, array($this->articleId, $this->date, $this->userFullName, $this->action, $this->actionArgs)); + $this->id = $db->lastInsertId(); } } Modified: trunk/models/HistoryGateway.php =================================================================== --- trunk/models/HistoryGateway.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/HistoryGateway.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,18 +9,11 @@ * @packager TheGang */ -require_once 'models/Model.php'; -require_once 'models/History.php'; +class HistoryGateway { -class HistoryGateway extends Model { - - function HistoryGateway() { - parent::Model(); - } - function getEvents($articleId) { $query = 'SELECT history_id, art_id, date, user, action, action_args FROM history WHERE art_id=? ORDER BY date DESC'; - $result = $this->db->query($query, $articleId); + $result = DB::getInstance()->query($query, $articleId); $historyArr = array(); while ($row = $result->fetch()) { $history = new History; Modified: trunk/models/Link.php =================================================================== --- trunk/models/Link.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Link.php 2008-07-09 22:10:27 UTC (rev 608) @@ -9,20 +9,16 @@ * @packager TheGang */ -require_once 'models/Model.php'; - -class Link extends Model { +class Link { var $id; var $articleId; var $title; var $URL; function Link($id = false) { - parent::Model(); - if ($id) { $query = 'SELECT art_id, title, url FROM links WHERE link_id = ?'; - $result = $this->db->query($query, $id); + $result = DB::getInstance()->query($query, $id); if ($row = $result->fetch()) { $this->id = $id; $this->articleId = $row['art_id']; @@ -34,15 +30,16 @@ function save() { if (!isset($this->id)) { + $db = DB::getInstance(); $query = 'INSERT INTO links (art_id, title, url) VALUES (?, ?, ?)'; - $result = $this->db->query($query, $this->articleId, $this->title, $this->URL); - $this->id = $result->getInsertId(); + $result = $db->query($query, array($this->articleId, $this->title, $this->URL)); + $this->id = $db->lastInsertId(); } } function delete() { $query = 'DELETE FROM links WHERE link_id=?'; - $this->db->query($query, $this->id); + DB::getInstance()->query($query, $this->id); } function getId() { Deleted: trunk/models/Model.php =================================================================== --- trunk/models/Model.php 2008-07-09 21:43:26 UTC (rev 607) +++ trunk/models/Model.php 2008-07-09 22:10:27 UTC (rev 608) @@ -1,21 +0,0 @@ -<?php - -/* -* @copyright Copyright (C) 2005-2007 TheGang http://www.the-gang.net -* @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License -* @author Alejandro Pedraza -* @since Sciret 1.0 -* @package Sciret -* @packager TheGang -*/ - -class Model { - - var $db; - - function Model() { - $this->db =& DB::DBFactory(DB_ENGINE, DB_HOST, DB_USER, DB_PASSWORD); - } -} - -?> Modified: trunk/models/Question.php =================================================================== --- trunk/models/Question.php 2008-07-09 21:43:26 UTC (rev 607... [truncated message content] |