changed: db: table item: url_subject into url
changed: item.url_subject into item.url changed: a new table: content with: id, subject, content, content_type (those from the item table) it helps to create hard links git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@466 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -35,7 +35,7 @@ void SetUrlSubjectFromSubject(Item & item)
|
||||
{
|
||||
std::string::iterator i;
|
||||
|
||||
item.url_subject.clear();
|
||||
item.url.clear();
|
||||
|
||||
for(i = item.subject.begin(); i!=item.subject.end() ; ++i)
|
||||
{
|
||||
@@ -47,18 +47,18 @@ std::string::iterator i;
|
||||
(c == '(' || c == ')' || c == '.' || c == ',' || c == '_' )
|
||||
)
|
||||
{
|
||||
item.url_subject += c;
|
||||
item.url += c;
|
||||
}
|
||||
else
|
||||
item.url_subject += '_';
|
||||
item.url += '_';
|
||||
}
|
||||
|
||||
if( item.url_subject.empty() )
|
||||
item.url_subject = "bez_nazwy";
|
||||
if( item.url.empty() )
|
||||
item.url = "bez_nazwy"; // !! wrzucic do pliku konfiguracyjnego
|
||||
else
|
||||
if( item.url_subject[0] >= '0' && item.url_subject[0] <= '9' )
|
||||
// url_subject must begin with a letter
|
||||
item.url_subject.insert(item.url_subject.begin(), '_');
|
||||
if( item.url[0] >= '0' && item.url[0] <= '9' )
|
||||
// url must begin with a letter
|
||||
item.url.insert(item.url.begin(), '_');
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user